@wistia/vhs 4.0.1 → 4.0.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/helpers/copyToClipboard/copyToClipboard.ts","../src/helpers/datetimeHelpers/datetimeHelpers.ts","../src/helpers/datetimeHelpers/index.ts","../src/helpers/getBackgroundGradient/getBackgroundGradient.ts","../src/helpers/getBackgroundGradient/getSemiRandomBackgroundGradient.ts","../src/helpers/mq/mq.ts","../src/helpers/objectHelpers/isObject.ts","../src/helpers/objectHelpers/deepFreeze.ts","../src/helpers/objectHelpers/merge.ts","../src/helpers/objectHelpers/selectKeys.ts","../src/helpers/objectHelpers/index.ts","../src/helpers/stringHelpers/camelCase.ts","../src/helpers/stringHelpers/coerceToBoolean.ts","../src/helpers/stringHelpers/coerceToString.ts","../src/helpers/stringHelpers/isString.ts","../src/helpers/stringHelpers/isHttpUrl.ts","../src/helpers/stringHelpers/isUrl.ts","../src/helpers/stringHelpers/lowerFirst.ts","../src/helpers/stringHelpers/removeNewlines.ts","../src/helpers/stringHelpers/stripExtension.ts","../src/helpers/stringHelpers/truncate.ts","../src/helpers/stringHelpers/upperFirst.ts","../src/helpers/stringHelpers/index.ts","../src/providers/VHSProvider.tsx","../src/providers/VHSThemeProvider.tsx","../../../node_modules/@wistia/vhs-design-tokens/dist/js/designTokens.mjs","../src/theme.ts","../src/providers/WrapperProvider.tsx","../src/components/Toast/ToastProvider.tsx","../src/components/Toast/Toast.tsx","../src/components/Toast/ToastAnimation.tsx","../src/hooks/useTheme/useTheme.ts","../src/hooks/useWindowSize/useWindowSize.ts","../src/private/helpers/isClient/isClient.ts","../src/hooks/useMq/useMq.ts","../src/hooks/useThemeColor/useThemeColor.ts","../src/components/Button/Button.tsx","../src/components/Button/ButtonContent.tsx","../src/components/Icon/Icon.tsx","../src/components/Icon/iconMap.ts","../src/components/Icon/icons/index.ts","../src/components/Icon/icons/AbTestIcon.tsx","../src/components/Icon/icons/AllContentIcon.tsx","../src/components/Icon/icons/ArchivedIcon.tsx","../src/components/Icon/icons/ArrowDownIcon.tsx","../src/components/Icon/icons/ArrowLeftIcon.tsx","../src/components/Icon/icons/ArrowRightIcon.tsx","../src/components/Icon/icons/ArrowUpIcon.tsx","../src/components/Icon/icons/AsteriskIcon.tsx","../src/components/Icon/icons/AudienceIcon.tsx","../src/components/Icon/icons/CalendarIcon.tsx","../src/components/Icon/icons/CameraIcon.tsx","../src/components/Icon/icons/CaretDownIcon.tsx","../src/components/Icon/icons/CaretLeftIcon.tsx","../src/components/Icon/icons/CaretRightIcon.tsx","../src/components/Icon/icons/CaretUpIcon.tsx","../src/components/Icon/icons/ChannelIcon.tsx","../src/components/Icon/icons/CheckmarkCircleIcon.tsx","../src/components/Icon/icons/CheckmarkCircleOutlineIcon.tsx","../src/components/Icon/icons/CheckmarkCircleThreeQuartersIcon.tsx","../src/components/Icon/icons/CheckmarkIcon.tsx","../src/components/Icon/icons/CheckmarkUnderlinedIcon.tsx","../src/components/Icon/icons/CloseCircleIcon.tsx","../src/components/Icon/icons/CloseIcon.tsx","../src/components/Icon/icons/CollectVideoIcon.tsx","../src/components/Icon/icons/CommentIcon.tsx","../src/components/Icon/icons/CommunityIcon.tsx","../src/components/Icon/icons/ContactUsIcon.tsx","../src/components/Icon/icons/CopyDisabledIcon.tsx","../src/components/Icon/icons/CopyIcon.tsx","../src/components/Icon/icons/CreateIcon.tsx","../src/components/Icon/icons/DeleteIcon.tsx","../src/components/Icon/icons/DeleteSmIcon.tsx","../src/components/Icon/icons/DottieClockIcon.tsx","../src/components/Icon/icons/DownloadIcon.tsx","../src/components/Icon/icons/DraggableIcon.tsx","../src/components/Icon/icons/EllipsisIcon.tsx","../src/components/Icon/icons/EllipsisVerticalIcon.tsx","../src/components/Icon/icons/EmbedIcon.tsx","../src/components/Icon/icons/EpisodesIcon.tsx","../src/components/Icon/icons/ExpandIcon.tsx","../src/components/Icon/icons/FavoriteIcon.tsx","../src/components/Icon/icons/FavoriteOutlineIcon.tsx","../src/components/Icon/icons/FilterIcon.tsx","../src/components/Icon/icons/GearIcon.tsx","../src/components/Icon/icons/GettingStartedIcon.tsx","../src/components/Icon/icons/GlobeIcon.tsx","../src/components/Icon/icons/GridViewIcon.tsx","../src/components/Icon/icons/HamburgerIcon.tsx","../src/components/Icon/icons/HazardIcon.tsx","../src/components/Icon/icons/HelpCenterIcon.tsx","../src/components/Icon/icons/HideIcon.tsx","../src/components/Icon/icons/HomeIcon.tsx","../src/components/Icon/icons/HourglassIcon.tsx","../src/components/Icon/icons/ImportIcon.tsx","../src/components/Icon/icons/InfoIcon.tsx","../src/components/Icon/icons/IntegrationsIcon.tsx","../src/components/Icon/icons/InviteIcon.tsx","../src/components/Icon/icons/LightningBoltIcon.tsx","../src/components/Icon/icons/LinkIcon.tsx","../src/components/Icon/icons/ListViewIcon.tsx","../src/components/Icon/icons/LiveIcon.tsx","../src/components/Icon/icons/LockIcon.tsx","../src/components/Icon/icons/LogoutIcon.tsx","../src/components/Icon/icons/MediaIcon.tsx","../src/components/Icon/icons/MegaphoneIcon.tsx","../src/components/Icon/icons/MoreOptionsIcon.tsx","../src/components/Icon/icons/OpenNewIcon.tsx","../src/components/Icon/icons/OverviewIcon.tsx","../src/components/Icon/icons/PaintIcon.tsx","../src/components/Icon/icons/PencilIcon.tsx","../src/components/Icon/icons/PlayIcon.tsx","../src/components/Icon/icons/PodcastIcon.tsx","../src/components/Icon/icons/PreviewIcon.tsx","../src/components/Icon/icons/PrivateUserSessionsIcon.tsx","../src/components/Icon/icons/ProjectIcon.tsx","../src/components/Icon/icons/QuestionMarkIcon.tsx","../src/components/Icon/icons/ReactIcon.tsx","../src/components/Icon/icons/RecordIcon.tsx","../src/components/Icon/icons/RedoIcon.tsx","../src/components/Icon/icons/RemoveFromChannelIcon.tsx","../src/components/Icon/icons/ReplaceIcon.tsx","../src/components/Icon/icons/ReplyIcon.tsx","../src/components/Icon/icons/ScissorsIcon.tsx","../src/components/Icon/icons/SearchIcon.tsx","../src/components/Icon/icons/SendIcon.tsx","../src/components/Icon/icons/SettingsIcon.tsx","../src/components/Icon/icons/ShareIcon.tsx","../src/components/Icon/icons/SoapboxIcon.tsx","../src/components/Icon/icons/SortIcon.tsx","../src/components/Icon/icons/SparkleIcon.tsx","../src/components/Icon/icons/SpinnerIcon.tsx","../src/components/Icon/icons/StatsIcon.tsx","../src/components/Icon/icons/SwitchAccountsIcon.tsx","../src/components/Icon/icons/TagIcon.tsx","../src/components/Icon/icons/TeamIcon.tsx","../src/components/Icon/icons/ThumbsDownIcon.tsx","../src/components/Icon/icons/ThumbsUpIcon.tsx","../src/components/Icon/icons/TriangleIcon.tsx","../src/components/Icon/icons/UndoIcon.tsx","../src/components/Icon/icons/UnlockIcon.tsx","../src/components/Icon/icons/UploadIcon.tsx","../src/components/Icon/icons/UsersPermissionsIcon.tsx","../src/components/Icon/icons/ViewStreamIcon.tsx","../src/components/Icon/icons/WandIcon.tsx","../src/components/Icon/icons/ZoomInIcon.tsx","../src/components/Icon/icons/ZoomOutIcon.tsx","../src/components/Icon/icons/GroupRecordIcon.tsx","../src/components/Icon/icons/InviteToRecordIcon.tsx","../src/components/Icon/icons/CollectionIcon.tsx","../src/components/Icon/icons/PlaylistIcon.tsx","../src/components/Button/ButtonStyledComponent.tsx","../src/components/Button/getButtonColor.ts","../src/private/helpers/isServer/isServer.ts","../src/components/Toast/ToastContext.tsx","../src/components/ModalBase/ModalProvider.tsx","../src/components/ModalBase/ModalProviderContext.tsx","../src/css/GlobalStyle.tsx","../src/css/normalize.tsx","../src/css/baseline.tsx","../src/hooks/useBoolean/useBoolean.ts","../src/hooks/useClipboard/useClipboard.ts","../src/private/hooks/useTimedToggle/useTimedToggle.ts","../src/hooks/useElementObserver/useElementObserver.ts","../src/hooks/useEvent/useEvent.ts","../src/hooks/useFocusTrap/useFocusTrap.ts","../src/hooks/useFocusTrap/helpers.ts","../src/hooks/useForceUpdate/useForceUpdate.ts","../src/hooks/useFormikContext/index.ts","../src/hooks/useIsHovered/useIsHovered.ts","../src/hooks/useKey/useKey.ts","../src/hooks/useKeyPress/useKeyPress.ts","../src/private/hooks/useUpdateEffect/useUpdateEffect.ts","../src/hooks/useKeyPressOnce/useKeyPressOnce.ts","../src/hooks/useLocalStorage/useLocalStorage.ts","../src/hooks/useMergedRefs/useMergedRefs.ts","../src/hooks/useOnClickOutside/useOnClickOutside.ts","../src/hooks/usePreventScroll/usePreventScroll.ts","../src/hooks/usePreviousValue/usePreviousValue.ts","../src/components/ActionModal/ActionModal.tsx","../src/components/ModalBase/ModalBase.tsx","../src/private/components/ModalAnimation/ModalAnimation.tsx","../src/components/ButtonGroup/ButtonGroup.tsx","../src/components/Text/Text.tsx","../src/components/Ellipsis/Ellipsis.tsx","../src/components/Backdrop/Backdrop.tsx","../src/components/IconButton/IconButton.tsx","../src/components/ScreenReaderOnly/ScreenReaderOnly.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/Tooltip/TooltipContent.tsx","../src/components/Truncate/Truncate.tsx","../src/private/components/ModalCloseButton/ModalCloseButton.tsx","../src/components/ActionModal/getModalBackgroundGradient.ts","../src/components/Avatar/Avatar.tsx","../src/components/Avatar/generateContactAvatarColors.tsx","../src/components/Avatar/formatInitialsForDisplay.tsx","../src/components/BackgroundImage/BackgroundImage.tsx","../src/components/Badge/Badge.tsx","../src/components/Badge/getBadgeColors.ts","../src/components/Banner/Banner.tsx","../src/components/Banner/BannerChildComponents.tsx","../src/components/Box/Box.tsx","../src/components/ButtonLink/ButtonLink.tsx","../src/components/Link/Link.tsx","../src/components/Link/linkStyle.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Checkbox/OptionStyledComponent.tsx","../src/components/CheckboxGroup/CheckboxGroup.tsx","../src/private/components/FormFieldWrapper/FormFieldWrapper.tsx","../src/components/Label/Label.tsx","../src/components/FormFieldError/FormFieldError.tsx","../src/components/LabelDescription/LabelDescription.tsx","../src/components/ClickArea/ClickArea.tsx","../src/components/CloseButton/CloseButton.tsx","../src/components/CloseButton/CloseIcon.tsx","../src/components/CollapsibleGroup/CollapsibleGroup.tsx","../src/components/Divider/Divider.tsx","../src/components/FileSelect/FileSelect.tsx","../src/components/Form/Form.tsx","../src/components/FormGlobalError/FormGlobalError.tsx","../src/components/Toast/useToast.ts","../src/private/hooks/useDebounce/useDebounce.ts","../src/private/hooks/useTimeoutFunc/useTimeoutFunc.ts","../src/components/FormButtons/FormButtons.tsx","../src/private/components/FormConnectorButton/FormConnectorButton.tsx","../src/components/FormField/FormField.tsx","../src/components/FormField/inputTypeMap.ts","../src/private/components/FormConnectorCheckboxGroup/FormConnectorCheckboxGroup.tsx","../src/private/components/FormConnectorCustomField/FormConnectorCustomField.tsx","../src/private/components/FormConnectorInput/FormConnectorInput.tsx","../src/components/Input/Input.tsx","../src/components/Input/InputStyledComponent.tsx","../src/components/Input/ClickToCopy.tsx","../src/components/Input/timePositionUtils.ts","../src/private/components/FormConnectorRadioGroup/FormConnectorRadioGroup.tsx","../src/components/RadioGroup/RadioGroup.tsx","../src/components/Radio/Radio.tsx","../src/private/components/FormConnectorSelect/FormConnectorSelect.tsx","../src/components/Select/Select.tsx","../src/components/Select/SelectStyledComponent.tsx","../src/private/components/FormConnectorHidden/FormConnectorHidden.tsx","../src/private/components/FormConnectorRichTextEditor/FormConnectorRichTextEditor.tsx","../src/components/RichTextEditor/RichTextEditor.tsx","../src/components/RichTextEditor/serializers.ts","../src/private/helpers/escapeHtml/escapeHtml.ts","../src/components/RichTextEditor/Leaf.tsx","../src/components/RichTextEditor/Element.tsx","../src/components/RichTextEditor/EditorButtons.tsx","../src/components/RichTextEditor/utilities/withImagesPlugin.ts","../src/components/RichTextEditor/utilities/toggle.ts","../src/components/RichTextEditor/utilities/withLinksPlugin.ts","../src/components/RichTextEditor/utilities/handleListEscape.ts","../src/components/RichTextEditor/utilities/rteFormatTypes.ts","../src/private/components/Icon/Icon.tsx","../src/private/components/Icon/iconMap.ts","../src/private/components/Icon/icons/index.ts","../src/private/components/Icon/icons/BlockQuote.tsx","../src/private/components/Icon/icons/Bold.tsx","../src/private/components/Icon/icons/BulletedList.tsx","../src/private/components/Icon/icons/Heading.tsx","../src/private/components/Icon/icons/HeadingTwo.tsx","../src/private/components/Icon/icons/Image.tsx","../src/private/components/Icon/icons/Italic.tsx","../src/private/components/Icon/icons/Link.tsx","../src/private/components/Icon/icons/NumberedList.tsx","../src/private/components/Icon/icons/Strikethrough.tsx","../src/private/components/Icon/icons/Underline.tsx","../src/components/FullScreenModal/FullScreenModal.tsx","../src/components/Image/Image.tsx","../src/components/KeyboardShortcut/KeyboardShortcut.tsx","../src/components/LinkButton/LinkButton.tsx","../src/components/List/List.tsx","../src/components/List/ListItem.tsx","../src/components/Menu/index.ts","../src/components/Menu/Menu.tsx","../src/components/Menu/MenuItem.tsx","../src/components/Menu/MenuLabel.tsx","../src/components/Menu/SubMenu.tsx","../src/components/MenuButton/MenuButton.tsx","../src/private/components/Menu/Menu.tsx","../src/components/MenuButton/MenuHeader.tsx","../src/components/Modal/Modal.tsx","../src/components/Modal/Dialog.tsx","../src/components/Modal/ModalCloseContext.tsx","../src/components/Modal/ModalParts.tsx","../src/components/Paper/Paper.tsx","../src/components/ProgressBar/ProgressBar.tsx","../src/components/RangeSelector/RangeSelector.tsx","../src/private/components/RangeSelectorCalendar/RangeSelectorCalendar.tsx","../src/private/components/Calendar/Calendar.tsx","../src/private/components/RangeSelectorInput/RangeSelectorInput.tsx","../src/private/components/RangeSelectorInput/ErrorMessages.tsx","../src/private/components/RangeSelectorInput/constants.ts","../src/private/components/RangeSelectorInput/eventTypes.ts","../src/private/components/RangeSelectorInput/conversions.ts","../src/private/components/RangeSelectorInput/iterators.ts","../src/private/components/RangeSelectorInput/utils.ts","../src/private/components/RangeSelectorInput/selection.ts","../src/components/Slider/Slider.tsx","../src/components/Stack/Stack.tsx","../src/components/Switch/Switch.tsx","../src/components/Thumbnail/Thumbnail.tsx","../src/components/ThumbnailCollage/ThumbnailCollage.tsx","../src/components/WistiaLogo/WistiaLogo.tsx"],"sourcesContent":["// types\nexport type { VHSTheme } from './@types/vhs-theme';\n\n// helpers\nexport * from './helpers/copyToClipboard';\nexport * from './helpers/datetimeHelpers';\nexport * from './helpers/getBackgroundGradient';\nexport * from './helpers/getBackgroundGradient/getSemiRandomBackgroundGradient';\nexport * from './helpers/mq';\nexport * from './helpers/objectHelpers';\nexport * from './helpers/stringHelpers';\n\n// providers\nexport * from './providers/VHSProvider';\n\n// hooks\nexport * from './hooks/useBoolean';\nexport * from './hooks/useClipboard';\nexport * from './hooks/useElementObserver';\nexport * from './hooks/useEvent';\nexport * from './hooks/useFocusTrap';\nexport * from './hooks/useForceUpdate';\nexport * from './hooks/useFormikContext';\nexport * from './hooks/useIsHovered';\nexport * from './hooks/useKey';\nexport * from './hooks/useKeyPress';\nexport * from './hooks/useKeyPressOnce';\nexport * from './hooks/useLocalStorage';\nexport * from './hooks/useMergedRefs';\nexport * from './hooks/useMq';\nexport * from './hooks/useOnClickOutside';\nexport * from './hooks/usePreventScroll';\nexport * from './hooks/usePreviousValue';\nexport * from './hooks/useTheme';\nexport * from './hooks/useThemeColor';\nexport * from './hooks/useWindowSize';\n\n// components\nexport * from './components/ActionModal';\nexport * from './components/Avatar';\nexport * from './components/Backdrop';\nexport * from './components/BackgroundImage';\nexport * from './components/Badge';\nexport * from './components/Banner';\nexport * from './components/Box';\nexport * from './components/Button';\nexport * from './components/ButtonGroup';\nexport * from './components/ButtonLink';\nexport * from './components/Checkbox';\nexport * from './components/CheckboxGroup';\nexport * from './components/ClickArea';\nexport * from './components/CloseButton';\nexport * from './components/CollapsibleGroup';\nexport * from './components/Divider';\nexport * from './components/Ellipsis';\nexport * from './components/FileSelect';\nexport * from './components/Form';\nexport * from './components/FormButtons';\nexport * from './components/FormField';\nexport * from './components/FormFieldError';\nexport * from './components/FormGlobalError';\nexport * from './components/FullScreenModal';\nexport * from './components/Icon';\nexport * from './components/IconButton';\nexport * from './components/Image';\nexport * from './components/Input';\nexport * from './components/KeyboardShortcut';\nexport * from './components/Label';\nexport * from './components/LabelDescription';\nexport * from './components/Link';\nexport * from './components/LinkButton';\nexport * from './components/List';\nexport * from './components/Menu';\nexport * from './components/MenuButton';\nexport * from './components/Modal';\nexport * from './components/ModalBase';\nexport * from './components/Paper';\nexport * from './components/ProgressBar';\nexport * from './components/Radio';\nexport * from './components/RadioGroup';\nexport * from './components/RangeSelector';\nexport * from './components/RichTextEditor';\nexport * from './components/ScreenReaderOnly';\nexport * from './components/Select';\nexport * from './components/Slider';\nexport * from './components/Stack';\nexport * from './components/Switch';\nexport * from './components/Text';\nexport * from './components/Thumbnail';\nexport * from './components/ThumbnailCollage';\nexport * from './components/Toast';\nexport * from './components/Tooltip';\nexport * from './components/Truncate';\nexport * from './components/WistiaLogo';\n","/**\n * Copies a string to user's clipboard for easy pasting in another location\n *\n * @param {string} textToCopy - the string that will be copied to users clipboard\n * @returns {Promise} - Promise object that represents the copied string\n */\nexport const copyToClipboard = async (textToCopy: string): Promise<void> => {\n // use Clipboard API if available (https required)\n // https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API\n if (navigator.clipboard as Clipboard | undefined) {\n return navigator.clipboard.writeText(textToCopy).catch((error: unknown) => {\n if (error instanceof Error) {\n throw error;\n }\n throw new DOMException('The clipboard is not accessible', 'NotAllowedError');\n });\n }\n\n // document.execCommand() fallback\n\n // add the text to copy to a <span />\n const span = document.createElement('span');\n span.textContent = textToCopy;\n\n // preserve consecutive spaces and newlines\n span.style.whiteSpace = 'pre';\n\n // add the <span /> to the document\n document.body.appendChild(span);\n\n // make a selection object representing the range of text selected by the user\n const selection = window.getSelection();\n const range = window.document.createRange();\n selection?.removeAllRanges();\n range.selectNode(span);\n selection?.addRange(range);\n\n // copy text to the clipboard\n let success = false;\n try {\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- execCommand is deprecated but this is the fallback codepath\n success = window.document.execCommand('copy');\n } catch (error: unknown) {\n console.error('error', error); // eslint-disable-line no-console\n }\n\n // cleanup\n selection?.removeAllRanges();\n window.document.body.removeChild(span);\n\n if (success) {\n return Promise.resolve();\n }\n return Promise.reject(new DOMException('The request is not allowed', 'NotAllowedError'));\n};\n","import { isNil } from '@wistia/type-guards';\nimport { differenceInCalendarDays } from 'date-fns';\nimport { daysInWeek } from 'date-fns/constants';\n\ntype DateOnlyStringOptions = {\n timeZone?: string;\n omitYear?: boolean;\n};\n\ntype TimeAgoOptions = {\n nowAnchor?: Date;\n includeTime?: boolean;\n};\n\ntype Duration = {\n seconds: number;\n minutes: number;\n hours: number;\n};\n\ntype WistiaDateTimeObject = {\n minutes: number;\n hours: number;\n dayOfMonth: number;\n year: number;\n month: number;\n};\n\nconst milisecondsInSecond = 1000;\nconst secondsInMinute = 60;\nconst minutesInHour = 60;\nconst halfAnHourInMinutes = 30;\nconst defaultLocales = ['en-US'];\nconst defaultTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC';\n\n/**\n * @param {number} num - pads integer with leading zero\n * @returns {string} - integer with padding as string\n */\nconst padTimeInteger = (num: number): string => num.toString().padStart(2, '0');\n\n/**\n * @param {*} date - possible date value - unknown type\n * @returns {boolean} - whether it is a date object\n */\nexport const isDate = (date: unknown): date is Date => date instanceof Date;\n\n/**\n * @param {*} date - a Date object - could be unknown though\n * @returns {boolean} - whether it's a valid date\n */\nconst isInvalidDate = (date: unknown): boolean => !isDate(date) || date.getTime() === 0;\n\n/**\n * Converts a Date object into a date only string.\n *\n * e.g. Jun 3, 2021\n * @param {*} date a Date object you want to convert into a string - gracefully handles any input\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyString = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n dateStyle: 'medium',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date only string formatted numerically.\n *\n * e.g. 06/03/2021\n * @param {*} date a Date object you want to convert into a string - gracefully handles any input\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyStringNumeric = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date only string formatted to ISO8601.\n *\n * e.g. 2021-06-03\n * @param {*} date a Date object you want to convert into a string - gracefully handles any input\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyISOString = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n const formatter = new Intl.DateTimeFormat(defaultLocales, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n timeZone,\n });\n const parts = formatter.formatToParts(date);\n const partsAsObject = parts.reduce(\n (map: Partial<Record<Intl.DateTimeFormatPartTypes, string>>, obj) => {\n // eslint-disable-next-line no-param-reassign\n map[obj.type] = obj.value;\n return map;\n },\n {},\n ) as Record<Intl.DateTimeFormatPartTypes, string>;\n return `${partsAsObject.year}-${partsAsObject.month}-${partsAsObject.day}`;\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a month and day string formatted numerically.\n *\n * e.g. 06/03/2021\n * @param {*} date a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const monthDayStringNumeric = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n month: '2-digit',\n day: '2-digit',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a month and day string formatted numerically.\n *\n * e.g. Thursday\n * @param {Date} date a Date object you want to convert into a string\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dayOfWeekString = (\n date: Date | null,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (date === null) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n weekday: 'long',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a time only string.\n *\n * e.g. 7:30 AM\n * @param {*} date a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const timeOnlyString = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n timeStyle: 'short',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date and time string.\n *\n * e.g. Jun 3, 2021, 11:52 AM\n *\n * NOTE: you should probably use timeAgoString when trying to display\n * an updated/created timestamp.\n *\n * @param {*} date - a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateTimeString = (\n date: Date | number | string | null | undefined,\n { timeZone = defaultTimeZone, omitYear = false }: DateOnlyStringOptions = {},\n): string => {\n if (isNil(date)) {\n return '';\n }\n\n const formattedDate = new Date(date);\n\n if (isInvalidDate(formattedDate)) {\n return '';\n }\n\n try {\n const baseOptions: Intl.DateTimeFormatOptions = {\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n };\n\n const options = omitYear ? baseOptions : { ...baseOptions, year: 'numeric' };\n\n return formattedDate.toLocaleDateString(defaultLocales, options as Intl.DateTimeFormatOptions);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date and time string\n * for use in a sentence.\n *\n * e.g. June 3, 2021, 11:52 AM\n *\n * NOTE: you should probably use timeAgoString when trying to display\n * an updated/created timestamp.\n *\n * @param {*} date - a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateTimeStringForSentence = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n const { year, month, day, hour, minute, dayPeriod } = new Intl.DateTimeFormat(defaultLocales, {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n })\n .formatToParts(date)\n .reduce<Partial<Record<Intl.DateTimeFormatPartTypes, string>>>((acc, part) => {\n if (part.type !== 'literal') {\n acc[part.type] = part.value;\n }\n return acc;\n }, {}) as Record<Intl.DateTimeFormatPartTypes, string>;\n return `${month} ${day}, ${year}, ${hour}:${minute} ${dayPeriod}`;\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date only string\n * for use in a sentence.\n *\n * e.g. June 3, 2021\n *\n * @param {*} date - a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyStringForSentence = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n dateStyle: 'long',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Shows time ago relative to current time.\n *\n * examples:\n *\n * < 1 minute ago\n *\n * 33 minutes ago\n *\n * Today, 3:30 PM\n *\n * Yesterday, 6:22 AM\n *\n * Nov 11, 11:32 AM\n *\n * Feb 23, 2020, 1:55 PM\n *\n * or when `includeTime` is false:\n *\n * Today\n *\n * Yesterday\n *\n * on Thursday\n *\n * Nov 11\n *\n * Feb 23, 2020\n *\n * NOTE: timeAgoString doesn't support multiple time zones since doing so would\n * complicate calculations for whether to use \"Today\" or \"Yesterday\".\n * @param {Date} date - the date relative to now\n * @param {object} options -\n * @param {Date} options.nowAnchor - The date used to calculate relative to now. Defaults to current date but can be overwritten for tests.\n * @param {boolean} options.includeTime - Whether to include the time in the output. Defaults to true.\n * @returns {string} - a string representation of the date.\n */\nexport const timeAgoString = (\n date: Date,\n { nowAnchor = new Date(), includeTime = true }: TimeAgoOptions = {},\n): string => {\n if (isInvalidDate(date)) return '';\n\n const minutesAgo =\n (nowAnchor.valueOf() - date.valueOf()) / (secondsInMinute * milisecondsInSecond);\n const minutesAgoRounded = Math.round(minutesAgo);\n const differenceInDays = differenceInCalendarDays(nowAnchor, date);\n const isSameYear = date.getFullYear() === nowAnchor.getFullYear();\n\n // handle edge case where date is in future\n if (minutesAgo < 0) {\n return dateTimeString(date);\n }\n\n if (minutesAgo < 1) {\n return '< 1 minute ago';\n }\n\n if (minutesAgoRounded < 2) {\n return '1 minute ago';\n }\n\n if (minutesAgoRounded <= minutesInHour) {\n return `${minutesAgoRounded} minutes ago`;\n }\n if (differenceInDays === 0) {\n return includeTime\n ? `Today, ${Intl.DateTimeFormat(defaultLocales, { hour: 'numeric', minute: '2-digit' }).format(date)}`\n : 'Today';\n }\n\n if (differenceInDays === 1) {\n return includeTime\n ? `Yesterday, ${Intl.DateTimeFormat(defaultLocales, { hour: 'numeric', minute: '2-digit' }).format(date)}`\n : 'Yesterday';\n }\n\n if (differenceInDays < daysInWeek && !includeTime) {\n return `on ${dayOfWeekString(date)}`;\n }\n\n return includeTime\n ? dateTimeString(date, { omitYear: isSameYear })\n : dateOnlyString(date, { omitYear: isSameYear });\n};\n\n/**\n * Given a date, shows the UTC offset.\n * @param {Date} date a Date object for calculating offset.\n * @returns {string} - string representing the UTC offset\n */\nexport const dateUTCOffset = (date: Date): string => {\n const offsetInHours = (date.getTimezoneOffset() / minutesInHour) * -1;\n const hours = Math.round(offsetInHours);\n const minutes = (offsetInHours - hours) * minutesInHour;\n const prefix = hours >= 0 ? '+' : '';\n const hoursString = `${hours}`.padStart(2, '0');\n const minutesString = `${minutes}`.padStart(2, '0');\n\n return `${prefix}${hoursString}:${minutesString}`;\n};\n\n/**\n * @typedef {Object} Duration\n * @property {number} seconds - number of seconds\n * @property {number} minutes - number of minutes\n * @property {number} hours - number of hours\n */\n/**\n * Returns an object representing the duration in seconds, minutes and hours.\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {Duration} -\n */\nexport const buildTimeDuration = (numberOfMilliseconds: number): Duration => {\n const numberOfSeconds = Math.floor(numberOfMilliseconds / milisecondsInSecond);\n const numberOfMinutes = Math.floor(numberOfSeconds / secondsInMinute);\n const numberOfHours = Math.floor(numberOfMinutes / minutesInHour);\n const seconds = numberOfSeconds - numberOfMinutes * secondsInMinute;\n const minutes = numberOfMinutes - numberOfHours * minutesInHour;\n\n return { seconds, minutes, hours: numberOfHours };\n};\n\n/**\n * A string representation of a duration for a media. Assumes most medias\n * are under an hour so only shows hours if media is over hour.\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {string} - a string representation for duration\n */\nexport const mediaDurationString = (numberOfMilliseconds: number): string => {\n const { hours, minutes, seconds } = buildTimeDuration(numberOfMilliseconds);\n\n if (hours < 1) {\n return `${minutes}:${padTimeInteger(seconds)}`;\n }\n\n return `${hours}:${padTimeInteger(minutes)}:${padTimeInteger(seconds)}`;\n};\n\n/**\n * A string representation of a duration for a user session. Assumes that\n * sessions may or may not be more than an hour. To prevent confusion all\n * times show hours, even those that are less than an hour.\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {string} - a string representation of duration\n */\nexport const sessionDurationString = (numberOfMilliseconds: number): string => {\n const { hours, minutes, seconds } = buildTimeDuration(numberOfMilliseconds);\n\n return `${hours}:${padTimeInteger(minutes)}:${padTimeInteger(seconds)}`;\n};\n\n/**\n * @typedef {Object} WistiaDateTimeObject\n * @property {number} minutes - number of minutes\n * @property {number} hours - number of hours\n * @property {number} dayOfMonth - day of the month\n * @property {number} year - year\n * @property {number} month - month\n */\n/**\n * @param {Date | null | undefined} date - a Date object\n * @returns {WistiaDateTimeObject | null} - replaceMe\n */\nexport const dateToDateTime = (date: Date | null | undefined): WistiaDateTimeObject | null => {\n if (!isDate(date)) {\n return null;\n }\n\n return {\n year: date.getFullYear(),\n month: date.getMonth(),\n dayOfMonth: date.getDate(),\n hours: date.getHours(),\n minutes: date.getMinutes(),\n };\n};\n\n/**\n * @param {Partial<WistiaDateTimeObject> | null} dateTime - a dateTime object\n * @returns {Date | null} - the converted date or null if anything is missing\n */\nexport const dateTimeToDate = (\n dateTime: Partial<WistiaDateTimeObject> | null | undefined,\n): Date | null => {\n const { year, month, dayOfMonth, hours, minutes } = dateTime ?? {};\n\n if (year !== undefined && month !== undefined && dayOfMonth !== undefined) {\n return new Date(year, month, dayOfMonth, hours ?? 0, minutes ?? 0);\n }\n return null;\n};\n\n/**\n * @param {Partial<WistiaDateTimeObject>} dateTime - a dateTime object\n * @returns {string | null} - string with the ISO-8601 string or null\n */\nexport const dateTimeToISO = (dateTime: Partial<WistiaDateTimeObject>): string | null =>\n dateTimeToDate(dateTime)?.toISOString() ?? null;\n\ntype DateTimeRoundedOverload = {\n (dateTime: Date, toISOString?: true): string | null;\n (dateTime: Date, toISOString: false): Date | null;\n};\n\n/**\n * @param {Date} dateTime - a dateTime object\n * @param {boolean} toISOString - whether the return value should be an ISO string\n * @returns {string | Date | null} - string or date depending on if toIsoString is true or false. Could be null if there's an error.\n */\n// @ts-expect-error TS Compiler is having issues with the overload syntax here, but this should provide a good DX.\n\nexport const dateTimeRounded: DateTimeRoundedOverload = (dateTime: Date, toISOString = true) => {\n const first30Min = dateTime.getMinutes() <= halfAnHourInMinutes;\n const hours = first30Min ? dateTime.getHours() : dateTime.getHours() + 1;\n const minutes = first30Min ? halfAnHourInMinutes : 0;\n\n const dateWithTime = {\n ...dateToDateTime(dateTime),\n hours,\n minutes,\n };\n\n if (toISOString) {\n return dateTimeToISO(dateWithTime);\n }\n\n return dateTimeToDate(dateWithTime);\n};\n\n/**\n * Given number of miliseconds, returns the iso8601 string rounded down from\n * number of seconds. Mainly copied from https://github.com/wistia/player-modern/blob/master/src/utilities/iso8601Helper.js#L54\n * but modified to support milliseconds\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {string} an iso8601 string format of duration\n */\nexport const millisecondsToDurationISOString = (numberOfMilliseconds: number): string => {\n const { seconds, minutes, hours } = buildTimeDuration(numberOfMilliseconds);\n\n let string = 'PT';\n\n if (hours) {\n string += `${hours}H`;\n }\n\n if (minutes) {\n string += `${minutes}M`;\n }\n\n if (seconds) {\n string += `${seconds}S`;\n }\n\n if (!(seconds || minutes || hours)) {\n string += '0S';\n }\n\n return string;\n};\n","import {\n isDate,\n dateOnlyString,\n dateOnlyStringNumeric,\n dateOnlyISOString,\n monthDayStringNumeric,\n dayOfWeekString,\n timeOnlyString,\n dateTimeString,\n dateTimeStringForSentence,\n dateOnlyStringForSentence,\n timeAgoString,\n dateUTCOffset,\n buildTimeDuration,\n mediaDurationString,\n sessionDurationString,\n dateToDateTime,\n dateTimeToDate,\n dateTimeToISO,\n dateTimeRounded,\n millisecondsToDurationISOString,\n} from './datetimeHelpers';\n\nexport const datetimeHelpers = {\n isDate,\n dateOnlyString,\n dateOnlyStringNumeric,\n dateOnlyISOString,\n monthDayStringNumeric,\n dayOfWeekString,\n timeOnlyString,\n dateTimeString,\n dateTimeStringForSentence,\n dateOnlyStringForSentence,\n timeAgoString,\n dateUTCOffset,\n buildTimeDuration,\n mediaDurationString,\n sessionDurationString,\n dateToDateTime,\n dateTimeToDate,\n dateTimeToISO,\n dateTimeRounded,\n millisecondsToDurationISOString,\n};\n","import { isNotNil } from '@wistia/type-guards';\nimport { css } from 'styled-components';\n\nconst gradients = {\n defaultDarkOne: css`\n background-color: #222d66;\n background-image:\n radial-gradient(farthest-corner at top right, #222d66, transparent 70%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),\n radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);\n `,\n defaultDarkTwo: css`\n background-color: #222d66;\n background-image:\n radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),\n radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);\n `,\n defaultLightOne: css`\n background-color: #ccd5ff;\n background-image:\n radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),\n radial-gradient(farthest-corner at top left, #ccd5ff, transparent 65%),\n radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);\n `,\n defaultLightTwo: css`\n background-color: #ccd5ff;\n background-image:\n radial-gradient(ellipse at top, #ccd5ff, transparent),\n radial-gradient(ellipse at bottom, #6b84ff, transparent);\n `,\n defaultMidOne: css`\n background-color: #6b84ff;\n background-image:\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),\n radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);\n `,\n defaultMidTwo: css`\n background-color: #6b84ff;\n background-image:\n radial-gradient(ellipse at top, #2949e5, transparent),\n radial-gradient(ellipse at bottom, #ccd5ff, transparent);\n `,\n green: css`\n background-color: #fafffa;\n background-image:\n radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),\n radial-gradient(farthest-corner at top right, #268713, transparent 50%),\n radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);\n `,\n greenWithPop: css`\n background-color: #fafffa;\n background-image:\n radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);\n `,\n pink: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),\n radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),\n radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);\n `,\n pinkWithPop: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),\n radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),\n radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);\n `,\n playfulGradientOne: css`\n background-color: #f7f8ff;\n background-image:\n radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),\n radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);\n `,\n playfulGradientTwo: css`\n background-color: #f7f8ff;\n background-image:\n radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),\n radial-gradient(farthest-corner at bottom right, #eff18d, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);\n `,\n purple: css`\n background-color: #f2caff;\n background-image:\n radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),\n radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);\n `,\n purpleWithPop: css`\n background-color: #f2caff;\n background-image:\n radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),\n radial-gradient(farthest-corner at top left, #d65cff, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);\n `,\n yellow: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),\n radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),\n radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);\n `,\n yellowWithPop: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),\n radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),\n radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 55%);\n `,\n};\n\nexport type GradientNameType = keyof typeof gradients;\n\nexport const gradientMap: GradientNameType[] = Object.keys(gradients) as GradientNameType[];\n\nexport type GetBackgroundGradientType = GradientNameType | undefined;\n\n/**\n * Retrieves the CSS background gradient corresponding to the given gradient name.\n * If the specified gradient name is not found, the default gradient ('defaultDarkOne') is returned.\n * @param {GradientName} gradientName - The name of the gradient to retrieve.\n * @returns {FlattenSimpleInterpolation} The CSS string representing the specified gradient.\n */\nexport const getBackgroundGradient = (\n gradientName: GetBackgroundGradientType = undefined,\n): ReturnType<typeof css> => {\n return isNotNil(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;\n};\n","import { gradientMap } from './getBackgroundGradient';\nimport type { GradientNameType } from './getBackgroundGradient';\n\nconst MULTIPLIER = 31;\n\n/**\n * Retrieves a semi-random background gradient based on the given id.\n *\n * @param {string} id - The id to use to generate the semi-random background gradient.\n * @returns {GradientName} gradientName\n */\nexport const getSemiRandomBackgroundGradient = (id: string): GradientNameType | undefined => {\n let hashCode = null;\n\n if (typeof id === 'string' && id) {\n // Get a sufficiently unique number for this id\n // Adapted from https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0\n hashCode = Array.from(id).reduce(\n (num, char) => Math.imul(MULTIPLIER, num) + char.charCodeAt(0) || 0,\n 0,\n );\n } else {\n // If id is null or not a string, choose a default background\n // For example, use the first background as the default\n return gradientMap[0];\n }\n\n const index = Math.abs(hashCode) % gradientMap.length;\n return gradientMap[index];\n};\n","/* eslint-disable @typescript-eslint/no-unnecessary-type-parameters */\n// TODO: fix `T extends DefaultTheme = DefaultTheme`\n// not adding jsdocs atm because this is semi-private\n// mq stands for \"media query\"\n// https://github.com/wistia/vhs-design-tokens/blob/main/tokens/breakpoint.yaml\n\nimport { getValueAndUnit } from 'polished';\nimport type { DefaultTheme } from 'styled-components';\n\nconst getMaxWidth = (breakpoint: string) => {\n const breakpointBuffer = 0.0025;\n const [value, unit] = getValueAndUnit(breakpoint) as [number, string];\n return `@media (max-width: ${Math.max(value - breakpointBuffer, 0)}${unit})`;\n};\n\nconst xsAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.xs})`;\nconst smAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.sm})`;\nconst mdAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.md})`;\nconst lgAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.lg})`;\nconst xlAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.xl})`;\n\nconst xsAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.xs);\nconst smAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.sm);\nconst mdAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.md);\nconst lgAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.lg);\nconst xlAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.xl);\n\nexport const mq = {\n xsAndUp,\n smAndUp,\n mdAndUp,\n lgAndUp,\n xlAndUp,\n xsAndDown,\n smAndDown,\n mdAndDown,\n lgAndDown,\n xlAndDown,\n};\n","/**\n * Determines if a given value is an object\n *\n * @param {*} value - value of any type\n * @returns {boolean} - whether value is an object\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n value !== null &&\n value !== undefined &&\n (Object.getPrototypeOf(value) === null || value.constructor === Object);\n","/**\n * Recursively Object.freeze() objects\n *\n * @param {Object} obj - any object to freeze\n * @returns {Object} - new object\n */\nexport const deepFreeze = (obj: Record<string, unknown>): Record<string, unknown> => {\n Object.freeze(obj);\n\n // recurse through object properties for objects to freeze\n Object.getOwnPropertyNames(obj).forEach((prop) => {\n if (\n // eslint-disable-next-line prefer-object-has-own\n Object.prototype.hasOwnProperty.call(obj, prop) &&\n // avoids error in strict mode\n (typeof obj === 'function'\n ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'\n : true) &&\n obj[prop] !== null &&\n (typeof obj[prop] === 'object' || typeof obj[prop] === 'function') &&\n !Object.isFrozen(obj[prop])\n ) {\n deepFreeze(obj[prop] as Record<string, unknown>);\n }\n });\n\n return obj;\n};\n","// Note: if we ever need something better (ie. deep merging arrays) we should switch to deepmerge lib\n// https://www.npmjs.com/package/ts-deepmerge\nimport { isObject } from './isObject';\n\n/**\n * Merges two or more objects\n *\n * @param {Object} target - object that subsequent objects will be merged into\n * @param {...Object} sources - one or more objects\n * @returns {Object} - new object\n */\nexport const merge = (\n target: Record<string, unknown>,\n ...sources: Record<string, unknown>[]\n): Record<string, unknown> => {\n if (!sources.length) {\n return target;\n }\n\n const output = { ...target };\n sources.forEach((source) => {\n if (isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (output[key] === null || output[key] === undefined) {\n output[key] = { ...source[key] };\n } else {\n output[key] = merge(output[key] as Record<string, unknown>, source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n }\n });\n return output;\n};\n","/**\n * Creates an object composed of the selected keys\n *\n * @param {Object} obj - object we want a sub-selection of\n * @param {string[]} keys - array of keys to be selected from object\n * @returns {Object} - new object with only the selected keys (and their values) present\n */\nexport const selectKeys = (obj: Record<string, unknown>, keys: string[]): Record<string, unknown> =>\n keys.reduce<Record<string, unknown>>((obj2, key) => {\n // eslint-disable-next-line prefer-object-has-own\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n obj2[key] = obj[key]; // eslint-disable-line no-param-reassign\n }\n return obj2;\n }, {});\n","import { isObject } from './isObject';\nimport { deepFreeze } from './deepFreeze';\nimport { merge } from './merge';\nimport { selectKeys } from './selectKeys';\n\nexport const objectHelpers = { isObject, deepFreeze, merge, selectKeys };\n","/**\n * Converts a string to camel case\n *\n * @param {string} str - the string to convert\n * @returns {string} - the camelcased string\n */\nexport const camelCase = (str = ''): string =>\n // https://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case\n str.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, (match, index) => {\n if (+match === 0) {\n return '';\n }\n return index === 0 ? match.toLowerCase() : match.toUpperCase();\n });\n","/**\n * Converts a boolean string value `value` into a boolean. If passed\n * something other than 'true' or 'false' will coerce value to boolean.\n *\n * @param {*} value - a value of any type\n * @returns {boolean} - that value as a boolean\n */\nexport const coerceToBoolean = (value: unknown): boolean => {\n if (value === 'true' || value === 'false') {\n return value === 'true';\n }\n return Boolean(value);\n};\n","/**\n * Coerces a value `value` into a string. If passed a null or undefined\n * value, returns an empty string.\n *\n * @param {*} value - a value of any type\n * @returns {string} - that value as a string\n */\nexport const coerceToString = (value: unknown): string =>\n value === null || value === undefined ? '' : String(value); // eslint-disable-line @typescript-eslint/no-base-to-string\n","/**\n * Determines if a given value is a string\n *\n * @param {*} value - a value of any type\n * @returns {boolean} - whether value is a string\n */\nexport const isString = (value: unknown): value is string =>\n typeof value === 'string' || value instanceof String;\n","import { isString } from './isString';\n\n/**\n * Validates an http URL string\n *\n * @param {*} str - the url string to validate - could be an unknown type\n * @return {boolean} - whether string is a valid http url\n */\nexport const isHttpUrl = (str: unknown): boolean => {\n if (!isString(str)) {\n return false;\n }\n\n try {\n const url = new URL(str);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch (_: unknown) {\n return false;\n }\n};\n","import { isString } from './isString';\n\n/**\n * Loosely validates a URL string\n *\n * @param {*} str - a string to validate - could be an unknown type\n * @return {boolean} - whether string appears to be a url\n */\nexport const isUrl = (str: unknown): boolean => {\n // A URL must match #1 and then at least one of #2/#3\n // Use two levels of REs to avoid ReDoS\n // https://levelup.gitconnected.com/the-regular-expression-denial-of-service-redos-cheat-sheet-a78d0ed7d865\n const protocolAndDomain = /^(?:\\w+:)?\\/\\/(\\S+)$/;\n const localhostDomain = /^localhost[:?\\d]*(?:[^:?\\d]\\S*)?$/;\n const nonLocalhostDomain = /^[^\\s.]+\\.\\S{2,}$/;\n\n if (!isString(str)) {\n return false;\n }\n\n const match = protocolAndDomain.exec(str);\n\n if (!match) {\n return false;\n }\n\n // part of the string that is not the protocol\n const remaining = match[1];\n\n if (remaining === undefined || !remaining) {\n return false;\n }\n\n return localhostDomain.test(remaining) || nonLocalhostDomain.test(remaining);\n};\n","/**\n * Converts the first character of string to lower case\n *\n * @param {string} str - the string to convert\n * @returns {string} - the lowercased string\n */\nexport const lowerFirst = (str = ''): string => (str[0]?.toLowerCase() ?? '') + str.slice(1);\n","/**\n * Removes newlines (\\n) from string\n *\n * @param {string} str - string to have new lines removed from\n * @returns {string} - string with newlines removed\n */\nexport const removeNewlines = (str: string): string => str.replace(/\\n/g, '');\n","/**\n * Removes file extension from string\n *\n * @param {string} str - string to have file extension removed from\n * @returns {string} - string with file extension removed\n */\nexport const stripExtension = (str: string): string => (str || '').replace(/\\.[^/.]{1,4}$/, '');\n","/**\n * Truncates a string to desired char count and appends an ellipsis on the end\n *\n * @param {string} str - string to be truncated\n * @param {number} maxChars - maximum numbers of characters the string should have\n * @returns {string} - truncated string\n */\nexport const truncate = (str: string, maxChars: number): string => {\n if (str.length <= maxChars) {\n return str;\n }\n return `${str.slice(0, maxChars - 3)}...`;\n};\n","/**\n * Converts the first character of string to upper case\n * @param {string} str - the string to convert\n * @returns {string} - the uppercased string\n */\nexport const upperFirst = (str = ''): string => (str[0]?.toUpperCase() ?? '') + str.slice(1);\n","import { camelCase } from './camelCase';\nimport { coerceToBoolean } from './coerceToBoolean';\nimport { coerceToString } from './coerceToString';\nimport { isHttpUrl } from './isHttpUrl';\nimport { isString } from './isString';\nimport { isUrl } from './isUrl';\nimport { lowerFirst } from './lowerFirst';\nimport { removeNewlines } from './removeNewlines';\nimport { stripExtension } from './stripExtension';\nimport { truncate } from './truncate';\nimport { upperFirst } from './upperFirst';\n\nexport const stringHelpers = {\n camelCase,\n coerceToBoolean,\n coerceToString,\n isHttpUrl,\n isString,\n isUrl,\n lowerFirst,\n removeNewlines,\n stripExtension,\n truncate,\n upperFirst,\n};\n","import type { ReactNode } from 'react';\nimport { LiveAnnouncer } from 'react-aria-live';\nimport { MotionConfig } from 'motion/react';\nimport { VHSThemeProvider } from './VHSThemeProvider';\nimport type { WrapperProviderLinkType } from './WrapperProvider';\nimport { WrapperProvider } from './WrapperProvider';\nimport { ToastProvider } from '../components/Toast/ToastProvider';\nimport { ModalProvider } from '../components/ModalBase/ModalProvider';\nimport { GlobalStyle } from '../css/GlobalStyle';\n\nexport type { WrapperProviderLinkType } from './WrapperProvider';\n\nexport type VHSProviderProps = {\n children: ReactNode;\n globalStylesIncluded?: boolean;\n Link?: WrapperProviderLinkType;\n skipAnimations?: boolean;\n theme?: Record<string, unknown>;\n};\n\nexport const VHSProvider = ({\n children,\n theme = {},\n globalStylesIncluded = true,\n skipAnimations = false,\n Link,\n}: VHSProviderProps) => {\n const motionPreference = skipAnimations ? 'never' : 'user';\n\n return (\n <VHSThemeProvider theme={theme}>\n {globalStylesIncluded ? <GlobalStyle /> : null}\n <LiveAnnouncer>\n <MotionConfig reducedMotion={motionPreference}>\n <WrapperProvider value={{ Link }}>\n <ModalProvider>\n <ToastProvider>{children}</ToastProvider>\n </ModalProvider>\n </WrapperProvider>\n </MotionConfig>\n </LiveAnnouncer>\n </VHSThemeProvider>\n );\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { ThemeProvider } from 'styled-components';\nimport type { ReactNode } from 'react';\nimport type { PartialDeep } from 'type-fest';\nimport { theme as vhsTheme } from '../theme';\nimport { merge } from '../helpers/objectHelpers/merge';\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const VHSThemeProvider = <T extends PartialDeep<DefaultTheme>>({\n children,\n theme: overrideTheme,\n}: {\n children: ReactNode;\n theme: T;\n}) => {\n const theme = merge(vhsTheme, overrideTheme);\n\n return <ThemeProvider theme={theme as unknown as DefaultTheme}>{children}</ThemeProvider>;\n};\n","/**\n * Do not edit directly\n * Generated on Thu, 03 Jul 2025 11:47:59 GMT\n */\n\nexport const designTokens = {\n breakpoint: {\n xs: '0em',\n sm: '37.5em',\n md: '56.5625em',\n lg: '77.5em',\n xl: '90em',\n },\n color: {\n brandBlue100: '#E5E9FF',\n brandBlue200: '#CCD5FF',\n brandBlue300: '#99ABFF',\n brandBlue400: '#6B84FF',\n brandBlue500: '#2949E5',\n brandBlue600: '#1F3399',\n brandBlue700: '#222D66',\n brandBlue800: '#000934',\n purple100: '#FDF7FF',\n purple200: '#F9E5FF',\n purple300: '#F2CAFF',\n purple400: '#E093FA',\n purple500: '#D65CFF',\n purple600: '#AC12E0',\n purple700: '#752E8C',\n purple800: '#39004D',\n green100: '#F4FFF2',\n green200: '#DFFFD9',\n green300: '#B0E5A5',\n green400: '#76D962',\n green500: '#44B62D',\n green600: '#268713',\n green700: '#38662E',\n green800: '#093300',\n blue100: '#E9F5FF',\n blue200: '#C7E7FF',\n blue300: '#91CEFF',\n blue400: '#58B7FE',\n blue500: '#229FFF',\n blue600: '#1B7FDE',\n blue700: '#165FAC',\n blue800: '#0D407A',\n pink100: '#FFF8FC',\n pink200: '#FFE5F4',\n pink300: '#FFC7E8',\n pink400: '#FF8CD0',\n pink500: '#FF40B3',\n pink600: '#E0128E',\n pink700: '#661F4A',\n pink800: '#4D002E',\n red100: '#FFF7F9',\n red200: '#FFCCD5',\n red300: '#FF99AB',\n red400: '#FF6682',\n red500: '#FF2B51',\n red600: '#D60027',\n red700: '#99001C',\n red800: '#660013',\n yellow100: '#FFFFF0',\n yellow200: '#EFF18D',\n yellow300: '#E8EC1E',\n yellow400: '#D9DC25',\n yellow500: '#BCBF19',\n yellow600: '#9EA00F',\n yellow700: '#7C7E07',\n yellow800: '#4A4D00',\n orange100: '#FFF9F8',\n orange200: '#FFCABA',\n orange300: '#FF9D80',\n orange400: '#FF6C40',\n orange500: '#D1451A',\n orange600: '#B23009',\n orange700: '#80280D',\n orange800: '#4D1200',\n grey100: '#F8F8F9',\n grey200: '#EBEBED',\n grey300: '#DEDEE1',\n grey400: '#C4C4C8',\n grey500: '#A3A3AA',\n grey600: '#7B7B87',\n grey700: '#62626C',\n grey800: '#4A4A51',\n grey900: '#37373C',\n grey1000: '#1F1F22',\n grey1100: '#0B0D0E',\n error100: '#FFECEC',\n error200: '#FFCACA',\n error300: '#FF9A9A',\n error400: '#FF6962',\n error500: '#FA4040',\n error600: '#D63727',\n error700: '#AA0D15',\n error800: '#860011',\n success100: '#E6F9F3',\n success200: '#BFEFE0',\n success300: '#81E0C1',\n success400: '#41D0A3',\n success500: '#00C185',\n success600: '#00966E',\n success700: '#047063',\n success800: '#025050',\n warning100: '#FFF8E6',\n warning200: '#FFEFC8',\n warning300: '#FFDF96',\n warning400: '#FFCE5A',\n warning500: '#FABE1F',\n warning600: '#DC9601',\n warning700: '#BE7200',\n warning800: '#B45101',\n },\n duration: {\n productive: {\n fast: '70ms',\n moderate: '110ms',\n slow: '150ms',\n },\n expressive: {\n fast: '240ms',\n moderate: '400ms',\n slow: '700ms',\n },\n },\n easing: {\n standard: {\n productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',\n expressive: 'cubic-bezier(0.4, 0.14, 0.3, 1)',\n },\n entrance: {\n productive: 'cubic-bezier(0, 0, 0.38, 0.9)',\n expressive: 'cubic-bezier(0, 0, 0.3, 1)',\n },\n exit: {\n productive: 'cubic-bezier(0.2, 0, 1, 0.9)',\n expressive: 'cubic-bezier(0.4, 0.14, 1, 1)',\n },\n },\n font: {\n family: {\n default: 'InterVariable, Helvetica, Arial, sans-serif',\n monospace: '\"IBM Plex Mono\", Consolas, Monaco, monospace',\n },\n weight: {\n thin: 100,\n extraLight: 200,\n light: 300,\n regular: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n extraBold: 800,\n },\n size: {\n default: '16px',\n small: '14px',\n },\n },\n shadow: {\n elevation0: 'none',\n elevation1: '0 2px 4px rgba(0, 0, 0, 0.1)',\n elevation2: '0 0 64px 0 rgba(0, 0, 0, 0.08)',\n },\n spacing: {\n space01: '4px',\n space02: '8px',\n space03: '12px',\n space04: '16px',\n space05: '24px',\n space06: '32px',\n space07: '48px',\n space08: '64px',\n space09: '80px',\n space10: '96px',\n space11: '120px',\n },\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { designTokens } from '@wistia/vhs-design-tokens';\n\n// Z-Index Scale\n//\n// Define the zIndex of all our components in one place so we can easily\n// see their relationship and prevents bugs arising from arbitrary z-index values.\n//\n// Do not edit the z-index scale! Only add component-scoped z-index values.\n\n// const zIndex0 = 0;\nconst zIndex1 = 100;\nconst zIndex2 = 200;\nconst zIndex3 = 300;\n// const zIndex4 = 400;\nconst zIndex5 = 500;\n\nconst theme: DefaultTheme & Record<string, unknown> = {\n breakpoint: {\n ...designTokens.breakpoint,\n },\n\n color: {\n ...designTokens.color,\n },\n\n duration: {\n ...designTokens.duration,\n },\n\n easing: {\n ...designTokens.easing,\n },\n\n font: {\n family: {\n default: 'InterVariable, Helvetica, Arial, sans-serif',\n monospace: designTokens.font.family.monospace,\n },\n size: designTokens.font.size,\n weight: Object.fromEntries(\n Object.entries(designTokens.font.weight).map(([key, value]) => [key, Number(value)]),\n ) as DefaultTheme['font']['weight'],\n },\n\n shadow: {\n ...designTokens.shadow,\n },\n\n spacing: {\n ...designTokens.spacing,\n },\n\n zIndex: {\n ModalCloseButton: zIndex1,\n Backdrop: zIndex2,\n ActionModal: zIndex3,\n FullScreenModal: zIndex3,\n RangeSelector: zIndex5,\n MenuComponent: zIndex5,\n Toast: zIndex5,\n Tooltip: zIndex5,\n BackdropElevated: zIndex5,\n },\n\n button: {\n borderRadius: '4px',\n },\n\n buttonGroup: {\n gap: '16px',\n },\n\n headline: {\n family: designTokens.font.family,\n headline1: {\n weight: designTokens.font.weight.bold as DefaultTheme['font']['weight']['bold'],\n },\n headline2: {\n weight: designTokens.font.weight.medium as DefaultTheme['font']['weight']['medium'],\n },\n headline3: {\n weight: designTokens.font.weight.bold as DefaultTheme['font']['weight']['bold'],\n },\n },\n\n paper: {\n elevation0: designTokens.shadow.elevation0,\n elevation1: designTokens.shadow.elevation1,\n elevation2: designTokens.shadow.elevation2,\n },\n};\n\nexport { theme };\n","import { createContext, useContext } from 'react';\nimport type { JSX } from 'react';\nimport type { DefaultLinkWrapperProps } from '../components/Link/Link';\n\nexport type WrapperProviderLinkType = ((props: DefaultLinkWrapperProps) => JSX.Element) | undefined;\n\nconst WrapperContext = createContext<{ Link?: WrapperProviderLinkType }>({});\n\nexport const useWrappers = () => useContext(WrapperContext);\n\nexport const WrapperProvider = WrapperContext.Provider;\n","import type { ReactNode } from 'react';\nimport { useState, useCallback } from 'react';\nimport type { ToastVariants } from './Toast';\nimport { Toast, defaultTimeout, defaultVariant, defaultActionLabel } from './Toast';\nimport type { UseToastProps } from './ToastContext';\nimport { ToastContext } from './ToastContext';\n\nexport const ToastProvider = ({ children }: { children: ReactNode }) => {\n const [toastActionInterceptor, setToastActionInterceptor] = useState<(() => void) | undefined>(\n undefined,\n );\n const [toastActionLabel, setToastActionLabel] = useState('');\n const [toastColorOverride, setToastColorOverride] = useState<string | undefined>(undefined);\n const [toastMessage, setToastMessage] = useState('');\n const [toastShown, setToastShown] = useState(false);\n const [toastTimeout, setToastTimeout] = useState<number | undefined>(undefined);\n const [toastVariant, setToastVariant] = useState<ToastVariants | undefined>(undefined);\n\n const showToast = useCallback(\n ({\n message,\n variant = defaultVariant,\n actionLabel = defaultActionLabel,\n actionInterceptor,\n timeout = defaultTimeout,\n colorOverride,\n }: UseToastProps) => {\n setToastActionInterceptor(actionInterceptor ? () => actionInterceptor : undefined);\n setToastActionLabel(actionLabel);\n setToastColorOverride(colorOverride);\n setToastMessage(message);\n setToastShown(true);\n setToastTimeout(timeout);\n setToastVariant(variant);\n },\n [],\n );\n\n return (\n <>\n <ToastContext.Provider value={showToast}>{children}</ToastContext.Provider>\n <Toast\n actionInterceptor={toastActionInterceptor}\n actionLabel={toastActionLabel}\n colorOverride={toastColorOverride}\n isOpen={toastShown}\n message={toastMessage}\n onClose={() => setToastShown(false)}\n timeout={toastTimeout}\n variant={toastVariant}\n />\n <div id=\"toast-portal\" />\n </>\n );\n};\n","/* eslint-disable react-compiler/react-compiler */\nimport type { ReactNode, ComponentPropsWithoutRef } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { memo, useState, useEffect, useCallback, Fragment } from 'react';\nimport { createPortal } from 'react-dom';\nimport { LiveMessage } from 'react-aria-live';\nimport { styled } from 'styled-components';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { coerceToBoolean } from '../../helpers/stringHelpers/coerceToBoolean';\nimport { ToastAnimation } from './ToastAnimation';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { Button } from '../Button/Button';\nimport { isServer } from '../../private/helpers/isServer';\n\n// TODO consolidate variant values\nexport type ToastVariants = 'dangerous' | 'error' | 'success' | 'warning';\nexport const toastVariants: ToastVariants[] = ['success', 'warning', 'error', 'dangerous'];\nexport const defaultVariant = 'success';\nexport const defaultActionLabel = 'Dismiss';\nexport const defaultTimeout = 3000;\n\nconst getAccentColor = (\n colorOverride: string | undefined,\n variant: ToastVariants,\n allThemeColors: DefaultTheme['color'],\n) => {\n if (isNonEmptyString(colorOverride)) {\n return colorOverride;\n }\n\n if (!toastVariants.includes(variant)) {\n throw new Error(\n `Variant \"${variant}\" not supported, please update variant prop in Toast component.`,\n );\n }\n\n if (variant === 'dangerous') {\n return allThemeColors.error600;\n }\n if (variant === 'error') {\n return allThemeColors.error600;\n }\n if (variant === 'warning') {\n return allThemeColors.warning500;\n }\n\n // success/default\n return allThemeColors.brandBlue500;\n};\n\nconst ToastComponent = styled.div<{\n $accentColor: string;\n}>`\n align-items: center;\n background: white;\n border-left-color: ${({ $accentColor }) => $accentColor};\n border-left-style: solid;\n border-left-width: 8px; /* accent border */\n box-shadow: ${({ theme }) => theme.shadow.elevation2};\n display: flex;\n gap: ${({ theme }) => theme.spacing.space04};\n padding: ${({ theme }) =>\n `${theme.spacing.space04} ${theme.spacing.space04} ${theme.spacing.space04} ${theme.spacing.space04}`};\n`;\n\nconst ToastContent = styled.div`\n align-self: center;\n color: ${({ theme }) => theme.color.grey900};\n flex-grow: 1;\n font-size: 16px;\n\n /* in case a <p> tag is passed as Toast message this will\n remove any margins that may arrive with children */\n > * {\n margin: 0;\n }\n`;\n\nconst ToastPortal = ({ children }: { children: ReactNode }) => {\n if (isServer()) {\n return null;\n }\n\n const container = document.getElementById('toast-portal');\n\n // in the case that ToastProvider is not an ancestor, we should just render the\n // Toast in place instead of a Portal\n if (!container) {\n return null;\n }\n return createPortal(children, container);\n};\n\nlet displayTimer: ReturnType<typeof setTimeout> | null = null;\n\nexport type ToastProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * A function that will be invoked when the action button is clicked instead of the internal handler\n */\n actionInterceptor?: (() => void) | undefined;\n /**\n * The text of the \"action\" button on the right\n */\n actionLabel?: string | undefined;\n /**\n * A hex value that will override the color values defined by `variant`\n */\n colorOverride?: string | undefined;\n /**\n * @ignore\n * Avoids animation and positions Toast in normal flow for documentation/testing purposes\n */\n renderInPlace?: boolean;\n /**\n * Determines whether Toast is displayed\n */\n isOpen?: boolean;\n /**\n * The message displayed in the toast\n */\n message: string;\n /**\n * Callback that is invoked when toasts closes (via timeout or close button)\n */\n onClose: () => void;\n /**\n * The time in ms before the Toast calls the onClose function\n */\n timeout?: number | undefined;\n /**\n * The kind of Toast to display\n */\n variant?: ToastVariants | undefined;\n};\n\nexport const Toast = memo(\n ({\n actionInterceptor = undefined,\n actionLabel = defaultActionLabel,\n colorOverride = undefined,\n renderInPlace = false,\n isOpen = false,\n message,\n onClose,\n timeout = defaultTimeout,\n variant = defaultVariant,\n ...otherProps\n }: ToastProps) => {\n const [showToast, setShowToast] = useState<boolean>(isOpen);\n const isErrorOrWarning = variant === 'error' || variant === 'warning';\n const ariaLive = isErrorOrWarning ? 'assertive' : 'polite';\n\n const stopTimer = useCallback(() => {\n clearTimeout(displayTimer ?? undefined);\n displayTimer = null;\n }, []);\n\n const closeToast = () => {\n stopTimer();\n onClose();\n };\n\n const startTimer = () => {\n displayTimer = setTimeout(() => {\n closeToast();\n }, timeout);\n };\n\n // start timer as soon as Toast appears\n useEffect(() => {\n if (showToast && !renderInPlace) {\n startTimer();\n }\n return () => {\n if (coerceToBoolean(displayTimer)) {\n stopTimer();\n }\n };\n });\n\n useEffect(() => {\n setShowToast(isOpen);\n\n // if there's an active timer, stop it\n return () => {\n if (coerceToBoolean(displayTimer)) {\n stopTimer();\n }\n };\n }, [isOpen, stopTimer, setShowToast]);\n\n const accentColor = getAccentColor(colorOverride, variant, useThemeColor());\n\n // for documentation, we sometimes want to render the Toast in it's normal flow layout,\n // instead of it's absolute position at the bottom of the page; additionally for testing\n // purposes we sometimes do not want it rendered in a Portal\n const ToastWrapper = renderInPlace ? Fragment : ToastPortal;\n\n return (\n <ToastWrapper>\n <ToastAnimation\n in={showToast}\n renderInPlace={renderInPlace}\n >\n {/* eslint-disable-next-line styled-components-a11y/no-static-element-interactions */}\n <ToastComponent\n key={message}\n $accentColor={accentColor}\n aria-hidden={!showToast}\n onMouseEnter={stopTimer}\n onMouseLeave={startTimer} // if user hovers Toast do not allow it to self-dismiss\n {...otherProps}\n >\n <ToastContent data-testid=\"toast-message\">\n <LiveMessage\n aria-live={ariaLive}\n message={message}\n />\n {message}\n </ToastContent>\n <Button\n colorOverride={accentColor}\n data-testid=\"toast-action\"\n label={actionLabel}\n onClick={actionInterceptor ?? closeToast}\n variant=\"tertiary\"\n />\n </ToastComponent>\n </ToastAnimation>\n </ToastWrapper>\n );\n },\n);\n\nToast.displayName = 'Toast_VHS';\n","import { motion, AnimatePresence } from 'motion/react';\nimport type { ReactNode } from 'react';\nimport { useTheme } from '../../hooks/useTheme';\nimport { useMq } from '../../hooks/useMq';\n\ntype ToastAnimationProps = {\n children: ReactNode;\n in: boolean;\n renderInPlace: boolean;\n};\n\nconst toastPositionOffset = 24; // in pixels\n\nconst toastPositionStyles = {\n bottom: toastPositionOffset,\n left: toastPositionOffset,\n position: 'fixed',\n};\n\nconst toastWidth = {\n minWidth: '352px',\n width: '400px',\n};\n\nconst toastMobileWidth = {\n width: `calc(100% - ${toastPositionOffset * 2}px)`,\n};\n\nexport const ToastAnimation = ({ children, in: inProp, renderInPlace }: ToastAnimationProps) => {\n const { isSmAndUp } = useMq();\n const { duration, zIndex } = useTheme();\n const durationInSeconds = Number.parseInt(duration.expressive.fast, 10) / 1000;\n const toastStyle = {\n ...toastPositionStyles,\n ...(isSmAndUp ? toastWidth : toastMobileWidth), // adjust Toast width based on viewport size\n willChange: 'auto',\n zIndex: zIndex.Toast,\n };\n\n // skip the animation & positioning and just render a Toast in place\n if (renderInPlace) {\n return <>{children}</>; // eslint-disable-line react/jsx-no-useless-fragment\n }\n\n return (\n <AnimatePresence>\n {inProp ? (\n <motion.div\n animate={{ opacity: 1, y: '0%' }}\n exit={{ opacity: 0, y: '100%' }}\n initial={{ opacity: 0, y: '100%' }}\n // @ts-expect-error - framer-motion doesn't like `position: fixed` here but it seems to work fine?\n style={toastStyle}\n transition={{ duration: durationInSeconds }}\n >\n {children}\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { useTheme as useStyledComponentsTheme } from 'styled-components';\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const useTheme = <T extends DefaultTheme = DefaultTheme>() =>\n useStyledComponentsTheme() as T;\n","import { useState, useLayoutEffect } from 'react';\nimport { debounce } from 'throttle-debounce';\nimport { isClient } from '../../private/helpers/isClient';\n\nexport const useWindowSize = (interval = 0): { width: number; height: number } => {\n const [dimensions, setDimensions] = useState({\n width: isClient() ? window.innerWidth : 0,\n height: isClient() ? window.innerHeight : 0,\n });\n\n useLayoutEffect(() => {\n const handleResize = debounce(interval, () =>\n setDimensions({\n width: window.innerWidth,\n height: window.innerHeight,\n }),\n ) as EventListener;\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, [interval]);\n\n return dimensions;\n};\n","/* eslint-disable no-typeof-window-undefined/no-typeof-window-undefined */\n/**\n * @returns {boolean} - whether running in a browser environment\n */\nexport const isClient = (): boolean =>\n typeof window !== 'undefined' && typeof document !== 'undefined';\n","import { useWindowSize } from '../useWindowSize';\nimport { useTheme } from '../useTheme';\n\ntype MediaQueryBooleans = {\n isXsAndUp: boolean;\n isSmAndUp: boolean;\n isMdAndUp: boolean;\n isLgAndUp: boolean;\n isXlAndUp: boolean;\n isXsAndDown: boolean;\n isSmAndDown: boolean;\n isMdAndDown: boolean;\n isLgAndDown: boolean;\n isXlAndDown: boolean;\n};\n\nconst REM_SIZE = 16;\n\nexport const useMq = (): MediaQueryBooleans => {\n const viewportWidth = useWindowSize().width / REM_SIZE;\n const theme = useTheme();\n\n const isXsAndUp = true;\n const isSmAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.sm);\n const isMdAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.md);\n const isLgAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.lg);\n const isXlAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.xl);\n\n const isXsAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.sm);\n const isSmAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.md);\n const isMdAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.lg);\n const isLgAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.xl);\n const isXlAndDown = true;\n\n return {\n isXsAndUp,\n isSmAndUp,\n isMdAndUp,\n isLgAndUp,\n isXlAndUp,\n isXsAndDown,\n isSmAndDown,\n isMdAndDown,\n isLgAndDown,\n isXlAndDown,\n };\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { useTheme } from '../useTheme/useTheme';\n\ntype ColorKeysFromTheme<Theme extends DefaultTheme = DefaultTheme> = keyof Theme['color'];\n\nconst getColor = <T extends DefaultTheme = DefaultTheme>(\n colors: T['color'],\n colorName: ColorKeysFromTheme<T>,\n) => {\n // eslint-disable-next-line no-prototype-builtins\n if (!colors.hasOwnProperty(colorName)) {\n throw new Error(\n `\\`${String(\n colorName,\n )}\\` is not a defined theme color, check argument passed to \\`useThemeColor\\``,\n );\n }\n\n return colors[colorName];\n};\n\ntype UseThemeColor = {\n (): DefaultTheme['color'];\n <T extends DefaultTheme, K extends ColorKeysFromTheme<T>>(param: K): T['color'][K];\n <T extends DefaultTheme, K extends ColorKeysFromTheme<T>[]>(\n param: [...K],\n ): { [I in keyof K]: T['color'][K[I] & keyof T['color']] };\n};\n\nexport const useThemeColor: UseThemeColor = <T extends DefaultTheme = DefaultTheme>(\n colorName: ColorKeysFromTheme<T> | ColorKeysFromTheme<T>[] | null = null,\n) => {\n const theme = useTheme<T>();\n const colors = theme.color;\n const noColorsFound = !Object.keys({ ...colors }).length;\n\n if (noColorsFound) {\n throw new Error(\n 'The `useThemeColor` hook could not find any defined colors. A possible cause of this error is that your component is not wrapped in a theme provider such as `<VHSProvider />`',\n );\n }\n\n // if no color name is specified, just return them all\n if (colorName === null) {\n return colors;\n }\n\n // if an array of color names is provided return an array with their css color values\n if (Array.isArray(colorName)) {\n return colorName.map((color) => getColor<T>(colors, color)) as {\n [K in keyof typeof colorName]: T['color'][(typeof colorName)[K] & keyof T['color']];\n };\n }\n\n // return a single css color value\n return getColor(colors, colorName);\n};\n","import type { ReactNode, MouseEvent, ComponentPropsWithRef, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { ButtonContent } from './ButtonContent';\nimport { ButtonStyledComponent } from './ButtonStyledComponent';\nimport { getButtonColor } from './getButtonColor';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport type { iconMap } from '../Icon/iconMap';\n\nexport type TextAlignValues = 'center' | 'left' | 'right';\n\nexport type ButtonProps = ComponentPropsWithRef<'button'> & {\n /**\n * Text that appears inside of the button *THIS WILL OVERRIDE THE LABEL PROP*\n */\n children?: ReactNode;\n /**\n * Allows user to override default button colors\n */\n colorOverride?: string;\n /**\n * Disables button\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a button into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover' | undefined;\n /**\n * Is the button full-width?\n */\n fullWidth?: boolean;\n /**\n * An SVG component\n */\n icon?: ReactNode;\n /**\n * The \"type\" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*\n */\n iconName?: keyof typeof iconMap;\n /**\n * Should the icon appear at the start of the button or the end?\n */\n iconPosition?: 'end' | 'start';\n /**\n * Show a spinner when the button is in a loading state\n */\n isLoading?: boolean;\n /**\n * Text that appears inside the button\n */\n label?: string;\n /**\n * Should the label wrap if the button container is too narrow to fit the label text on one line\n * @deprecated Apply white-space styling as needed\n */\n labelWrap?: boolean;\n /**\n * Provides a button without any styling (useful for wrapping another element)\n */\n noStyle?: boolean;\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;\n /**\n * The size of button to display\n */\n size?: 'lg' | 'md' | 'sm';\n /**\n * If true then rounded corners will be squared\n */\n square?: boolean;\n /**\n * Alignment of the button label\n */\n textAlign?: TextAlignValues;\n /**\n * The type of button element that should be rendered\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * The visual type of button to display\n */\n variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n children,\n disabled = false,\n forceState,\n colorOverride,\n fullWidth = false,\n icon,\n iconName,\n iconPosition = 'start',\n label,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n labelWrap = false,\n isLoading = false,\n noStyle = false,\n onClick,\n size = 'lg',\n square = false,\n textAlign = 'center',\n type = 'button',\n variant = 'primary',\n ...otherProps\n }: ButtonProps,\n ref,\n ): JSX.Element => {\n const isAriaDisabled = () => isLoading || disabled;\n\n const handleClick = (event: MouseEvent) => {\n if (isAriaDisabled()) {\n event.preventDefault();\n return;\n }\n\n if (isNotNil(onClick)) {\n onClick(event); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n };\n\n const buttonColor = getButtonColor(colorOverride, variant, useThemeColor());\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const getContent = () => {\n if (isNotNil(children)) {\n return children;\n }\n if (isNotNil(label)) {\n return label;\n }\n return null;\n };\n\n return (\n <ButtonStyledComponent\n ref={ref as any} // eslint-disable-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any\n $buttonColor={buttonColor}\n $forceState={forceState}\n $fullWidth={fullWidth}\n $iconPosition={iconPosition}\n $isLoading={isLoading}\n $labelWrap={labelWrap}\n $noStyle={noStyle}\n $size={size}\n $square={square}\n $textAlign={textAlign}\n $variant={variant}\n aria-disabled={isAriaDisabled() || undefined}\n disabled={false}\n onClick={handleClick}\n type={type}\n {...otherProps}\n >\n <ButtonContent\n icon={icon}\n iconName={iconName}\n iconPosition={iconPosition}\n isLoading={isLoading}\n size={size}\n textAlign={textAlign}\n >\n {getContent()}\n </ButtonContent>\n </ButtonStyledComponent>\n );\n },\n);\n\nButton.displayName = 'Button_VHS';\n","import type { ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { LiveMessage } from 'react-aria-live';\nimport { Icon } from '../Icon';\nimport type { iconMap } from '../Icon/iconMap';\nimport type { TextAlignValues } from './Button';\n\ntype ButtonLoadingContainerProps = {\n $textAlign: TextAlignValues;\n};\n\nconst ButtonLoadingContainer = styled.span<ButtonLoadingContainerProps>`\n display: flex;\n justify-content: ${({ $textAlign }) => {\n if ($textAlign === 'left') {\n return 'start';\n }\n if ($textAlign === 'right') {\n return 'end';\n }\n return 'center';\n }};\n position: absolute;\n`;\n\ntype ButtonLabelContainerProps = {\n $iconPosition?: 'end' | 'start';\n $size: 'lg' | 'md' | 'sm';\n $isLoading: boolean;\n};\n\nconst ButtonLabelContainer = styled.div<ButtonLabelContainerProps>`\n align-items: center;\n display: inline-flex;\n flex-direction: ${({ $iconPosition }) => ($iconPosition === 'end' ? 'row-reverse' : 'row')};\n flex-grow: 1;\n gap: ${({ $size, theme }) => {\n if ($size === 'lg') {\n return theme.spacing.space03;\n }\n return theme.spacing.space02; // md & sm\n }};\n justify-content: center;\n opacity: ${({ $isLoading }) => ($isLoading ? 0 : 1)};\n position: relative;\n`;\n\ntype ButtonContentLabelProps = {\n $textAlign: TextAlignValues;\n};\n\nconst ButtonContentLabel = styled.div<ButtonContentLabelProps>`\n align-items: center;\n display: inline-flex;\n flex-grow: 1;\n justify-content: ${({ $textAlign }) => {\n if ($textAlign === 'left') {\n return 'start';\n }\n if ($textAlign === 'right') {\n return 'end';\n }\n return 'center';\n }};\n`;\n\nconst IconContainer = styled.div<{ $size: iconContainerSizeType }>`\n display: flex;\n\n & > svg {\n max-height: ${({ $size }) => $size};\n max-width: ${({ $size }) => $size};\n }\n`;\n\nconst iconSizeMap = Object.freeze({\n lg: 'md',\n md: 'md',\n sm: 'sm',\n});\n\ntype iconSizeType = keyof typeof iconSizeMap;\n\nconst iconContainerSizeMap = {\n lg: '16px',\n md: '16px',\n sm: '12px',\n};\n\ntype iconContainerSizeType = (typeof iconContainerSizeMap)[keyof typeof iconContainerSizeMap];\n\ntype ButtonContentProps = {\n children: ReactNode;\n icon?: ReactNode;\n iconName?: keyof typeof iconMap | undefined;\n iconPosition: 'end' | 'start';\n isLoading: boolean;\n size: iconSizeType;\n textAlign: TextAlignValues;\n};\n\nexport const ButtonContent = ({\n children,\n icon,\n iconName,\n iconPosition,\n isLoading,\n size,\n textAlign,\n}: ButtonContentProps): JSX.Element => {\n const renderButtonIcon = () => {\n if (isNotNil(icon) && isNotNil(iconName)) {\n throw new Error(\n `Do not use both icon and iconName props. If you are using a VHS icon, pass its type as a string to iconName. If you are using a custom icon, pass it as a component to the icon prop. `,\n );\n }\n if (isNotNil(icon)) {\n return (\n <IconContainer\n $size={iconContainerSizeMap[size]}\n data-testid=\"icon-container\"\n >\n {icon}\n </IconContainer>\n );\n }\n if (isNotNil(iconName)) {\n return (\n <Icon\n data-testid=\"iconName-icon\"\n size={iconSizeMap[size]}\n type={iconName}\n />\n );\n }\n return null;\n };\n\n return (\n <>\n {isLoading ? (\n <ButtonLoadingContainer\n $textAlign={textAlign}\n data-testid=\"button-content-loading\"\n >\n <LiveMessage\n aria-live=\"assertive\"\n message=\"Button has been disabled while action is in progress\"\n />\n <Icon\n size={iconSizeMap[size]}\n type=\"spinner\"\n />\n </ButtonLoadingContainer>\n ) : null}\n <ButtonLabelContainer\n $iconPosition={iconPosition}\n $isLoading={isLoading}\n $size={size}\n >\n <>{renderButtonIcon()}</>\n {isNotNil(children) ? (\n <ButtonContentLabel\n $textAlign={textAlign}\n data-testid=\"button-content-label\"\n >\n {children}\n </ButtonContentLabel>\n ) : null}\n </ButtonLabelContainer>\n </>\n );\n};\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { isNil } from '@wistia/type-guards';\nimport type { IconNameType } from './iconMap';\nimport { iconMap } from './iconMap';\nimport * as iconsManifest from './icons';\n\n// size in pixels\nexport const iconSizeMap = {\n sm: '12',\n md: '16',\n lg: '24',\n xl: '32',\n xxl: '48',\n};\n\nexport type IconProps = ComponentPropsWithoutRef<'svg'> & {\n /**\n * Color (as hex) of the Icon\n */\n color?: string;\n /**\n * The size of the icon to display\n */\n size?: keyof typeof iconSizeMap;\n /**\n * @ignore\n */\n style?: Record<string, unknown>;\n /**\n * Determines which icon to display\n */\n type: IconNameType;\n};\n\nexport const Icon = ({\n color = 'currentColor',\n size = 'lg',\n style,\n type,\n ...otherProps\n}: IconProps): JSX.Element => {\n if (isNil(type)) {\n throw new Error('An Icon component requires a `type` prop to be provided');\n }\n\n if (isNil(iconMap[type])) {\n throw new Error(`Type \"${type}\" does not exist, please update type prop in Icon component.`);\n }\n\n if (isNil(iconSizeMap[size])) {\n throw new Error(`Size \"${size}\" does not exist, please update size prop in Icon component.`);\n }\n\n const IconElement = iconsManifest[iconMap[type] as keyof typeof iconsManifest];\n\n // so we do not have to add this to each individual Icon but still allow overrides\n const defaultStyle = { verticalAlign: 'middle', ...style };\n\n return (\n <IconElement\n aria-hidden=\"true\"\n color={color}\n height={`${iconSizeMap[size]}px`}\n role=\"presentation\"\n style={defaultStyle}\n viewBox=\"0 0 24 24\"\n width={`${iconSizeMap[size]}px`}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...otherProps}\n />\n );\n};\n\nIcon.displayName = 'Icon_VHS';\n","export const iconMap = {\n 'ab-test': 'AbTestIcon',\n 'all-content': 'AllContentIcon',\n archived: 'ArchivedIcon',\n 'arrow-down': 'ArrowDownIcon',\n 'arrow-left': 'ArrowLeftIcon',\n 'arrow-right': 'ArrowRightIcon',\n 'arrow-up': 'ArrowUpIcon',\n asterisk: 'AsteriskIcon',\n audience: 'AudienceIcon',\n calendar: 'CalendarIcon',\n camera: 'CameraIcon',\n 'caret-down': 'CaretDownIcon',\n 'caret-left': 'CaretLeftIcon',\n 'caret-right': 'CaretRightIcon',\n 'caret-up': 'CaretUpIcon',\n channel: 'ChannelIcon',\n checkmark: 'CheckmarkIcon',\n 'checkmark-circle': 'CheckmarkCircleIcon',\n 'checkmark-circle-outline': 'CheckmarkCircleOutlineIcon',\n 'checkmark-circle-three-quarters': 'CheckmarkCircleThreeQuartersIcon',\n 'checkmark-underlined': 'CheckmarkUnderlinedIcon',\n close: 'CloseIcon',\n 'close-circle': 'CloseCircleIcon',\n 'collect-video': 'CollectVideoIcon',\n collection: 'CollectionIcon',\n comment: 'CommentIcon',\n community: 'CommunityIcon',\n 'contact-us': 'ContactUsIcon',\n copy: 'CopyIcon',\n 'copy-disabled': 'CopyDisabledIcon',\n create: 'CreateIcon',\n delete: 'DeleteIcon',\n 'delete-sm': 'DeleteSmIcon',\n 'dottie-clock': 'DottieClockIcon',\n download: 'DownloadIcon',\n draggable: 'DraggableIcon',\n edit: 'PencilIcon',\n ellipsis: 'EllipsisIcon',\n 'ellipsis-vertical': 'EllipsisVerticalIcon',\n embed: 'EmbedIcon',\n episodes: 'EpisodesIcon',\n error: 'TriangleIcon',\n expand: 'ExpandIcon',\n export: 'DownloadIcon',\n favorite: 'FavoriteIcon',\n 'favorite-outline': 'FavoriteOutlineIcon',\n filter: 'FilterIcon',\n gear: 'GearIcon',\n 'getting-started': 'GettingStartedIcon',\n globe: 'GlobeIcon',\n 'grid-view': 'GridViewIcon',\n 'group-record': 'GroupRecordIcon',\n hamburger: 'HamburgerIcon',\n hazard: 'HazardIcon',\n 'help-center': 'HelpCenterIcon',\n hide: 'HideIcon',\n home: 'HomeIcon',\n hourglass: 'HourglassIcon',\n import: 'ImportIcon',\n info: 'InfoIcon',\n integrations: 'IntegrationsIcon',\n invite: 'InviteIcon',\n 'invite-to-record': 'InviteToRecordIcon',\n 'lightning-bolt': 'LightningBoltIcon',\n link: 'LinkIcon',\n 'list-view': 'ListViewIcon',\n live: 'LiveIcon',\n lock: 'LockIcon',\n logout: 'LogoutIcon',\n media: 'MediaIcon',\n megaphone: 'MegaphoneIcon',\n 'more-options': 'MoreOptionsIcon',\n 'open-new': 'OpenNewIcon',\n overview: 'OverviewIcon',\n paint: 'PaintIcon',\n pencil: 'PencilIcon',\n play: 'PlayIcon',\n playlist: 'PlaylistIcon',\n podcast: 'PodcastIcon',\n preview: 'PreviewIcon',\n 'private-user-sessions': 'PrivateUserSessionsIcon',\n project: 'ProjectIcon',\n 'question-mark': 'QuestionMarkIcon',\n react: 'ReactIcon',\n record: 'RecordIcon',\n redo: 'RedoIcon',\n 'remove-from-channel': 'RemoveFromChannelIcon',\n replace: 'ReplaceIcon',\n reply: 'ReplyIcon',\n 'save-copy': 'CopyIcon',\n scissors: 'ScissorsIcon',\n search: 'SearchIcon',\n send: 'SendIcon',\n settings: 'SettingsIcon',\n share: 'ShareIcon',\n soapbox: 'SoapboxIcon',\n sort: 'SortIcon',\n sparkle: 'SparkleIcon',\n spinner: 'SpinnerIcon',\n stats: 'StatsIcon',\n 'switch-accounts': 'SwitchAccountsIcon',\n tag: 'TagIcon',\n team: 'TeamIcon',\n 'thumbs-down': 'ThumbsDownIcon',\n 'thumbs-up': 'ThumbsUpIcon',\n triangle: 'TriangleIcon',\n undo: 'UndoIcon',\n unlock: 'UnlockIcon',\n upload: 'UploadIcon',\n 'users-permissions': 'UsersPermissionsIcon',\n 'view-stream': 'ViewStreamIcon',\n wand: 'WandIcon',\n 'zoom-in': 'ZoomInIcon',\n 'zoom-out': 'ZoomOutIcon',\n};\n\nexport type IconNameType = keyof typeof iconMap;\n","export { AbTestIcon } from './AbTestIcon';\nexport { AllContentIcon } from './AllContentIcon';\nexport { ArchivedIcon } from './ArchivedIcon';\nexport { ArrowDownIcon } from './ArrowDownIcon';\nexport { ArrowLeftIcon } from './ArrowLeftIcon';\nexport { ArrowRightIcon } from './ArrowRightIcon';\nexport { ArrowUpIcon } from './ArrowUpIcon';\nexport { AsteriskIcon } from './AsteriskIcon';\nexport { AudienceIcon } from './AudienceIcon';\nexport { CalendarIcon } from './CalendarIcon';\nexport { CameraIcon } from './CameraIcon';\nexport { CaretDownIcon } from './CaretDownIcon';\nexport { CaretLeftIcon } from './CaretLeftIcon';\nexport { CaretRightIcon } from './CaretRightIcon';\nexport { CaretUpIcon } from './CaretUpIcon';\nexport { ChannelIcon } from './ChannelIcon';\nexport { CheckmarkCircleIcon } from './CheckmarkCircleIcon';\nexport { CheckmarkCircleOutlineIcon } from './CheckmarkCircleOutlineIcon';\nexport { CheckmarkCircleThreeQuartersIcon } from './CheckmarkCircleThreeQuartersIcon';\nexport { CheckmarkIcon } from './CheckmarkIcon';\nexport { CheckmarkUnderlinedIcon } from './CheckmarkUnderlinedIcon';\nexport { CloseCircleIcon } from './CloseCircleIcon';\nexport { CloseIcon } from './CloseIcon';\nexport { CollectVideoIcon } from './CollectVideoIcon';\nexport { CommentIcon } from './CommentIcon';\nexport { CommunityIcon } from './CommunityIcon';\nexport { ContactUsIcon } from './ContactUsIcon';\nexport { CopyDisabledIcon } from './CopyDisabledIcon';\nexport { CopyIcon } from './CopyIcon';\nexport { CreateIcon } from './CreateIcon';\nexport { DeleteIcon } from './DeleteIcon';\nexport { DeleteSmIcon } from './DeleteSmIcon';\nexport { DottieClockIcon } from './DottieClockIcon';\nexport { DownloadIcon } from './DownloadIcon';\nexport { DraggableIcon } from './DraggableIcon';\nexport { EllipsisIcon } from './EllipsisIcon';\nexport { EllipsisVerticalIcon } from './EllipsisVerticalIcon';\nexport { EmbedIcon } from './EmbedIcon';\nexport { EpisodesIcon } from './EpisodesIcon';\nexport { ExpandIcon } from './ExpandIcon';\nexport { FavoriteIcon } from './FavoriteIcon';\nexport { FavoriteOutlineIcon } from './FavoriteOutlineIcon';\nexport { FilterIcon } from './FilterIcon';\nexport { GearIcon } from './GearIcon';\nexport { GettingStartedIcon } from './GettingStartedIcon';\nexport { GlobeIcon } from './GlobeIcon';\nexport { GridViewIcon } from './GridViewIcon';\nexport { HamburgerIcon } from './HamburgerIcon';\nexport { HazardIcon } from './HazardIcon';\nexport { HelpCenterIcon } from './HelpCenterIcon';\nexport { HideIcon } from './HideIcon';\nexport { HomeIcon } from './HomeIcon';\nexport { HourglassIcon } from './HourglassIcon';\nexport { ImportIcon } from './ImportIcon';\nexport { InfoIcon } from './InfoIcon';\nexport { IntegrationsIcon } from './IntegrationsIcon';\nexport { InviteIcon } from './InviteIcon';\nexport { LightningBoltIcon } from './LightningBoltIcon';\nexport { LinkIcon } from './LinkIcon';\nexport { ListViewIcon } from './ListViewIcon';\nexport { LiveIcon } from './LiveIcon';\nexport { LockIcon } from './LockIcon';\nexport { LogoutIcon } from './LogoutIcon';\nexport { MediaIcon } from './MediaIcon';\nexport { MegaphoneIcon } from './MegaphoneIcon';\nexport { MoreOptionsIcon } from './MoreOptionsIcon';\nexport { OpenNewIcon } from './OpenNewIcon';\nexport { OverviewIcon } from './OverviewIcon';\nexport { PaintIcon } from './PaintIcon';\nexport { PencilIcon } from './PencilIcon';\nexport { PlayIcon } from './PlayIcon';\nexport { PodcastIcon } from './PodcastIcon';\nexport { PreviewIcon } from './PreviewIcon';\nexport { PrivateUserSessionsIcon } from './PrivateUserSessionsIcon';\nexport { ProjectIcon } from './ProjectIcon';\nexport { QuestionMarkIcon } from './QuestionMarkIcon';\nexport { ReactIcon } from './ReactIcon';\nexport { RecordIcon } from './RecordIcon';\nexport { RedoIcon } from './RedoIcon';\nexport { RemoveFromChannelIcon } from './RemoveFromChannelIcon';\nexport { ReplaceIcon } from './ReplaceIcon';\nexport { ReplyIcon } from './ReplyIcon';\nexport { ScissorsIcon } from './ScissorsIcon';\nexport { SearchIcon } from './SearchIcon';\nexport { SendIcon } from './SendIcon';\nexport { SettingsIcon } from './SettingsIcon';\nexport { ShareIcon } from './ShareIcon';\nexport { SoapboxIcon } from './SoapboxIcon';\nexport { SortIcon } from './SortIcon';\nexport { SparkleIcon } from './SparkleIcon';\nexport { SpinnerIcon } from './SpinnerIcon';\nexport { StatsIcon } from './StatsIcon';\nexport { SwitchAccountsIcon } from './SwitchAccountsIcon';\nexport { TagIcon } from './TagIcon';\nexport { TeamIcon } from './TeamIcon';\nexport { ThumbsDownIcon } from './ThumbsDownIcon';\nexport { ThumbsUpIcon } from './ThumbsUpIcon';\nexport { TriangleIcon } from './TriangleIcon';\nexport { UndoIcon } from './UndoIcon';\nexport { UnlockIcon } from './UnlockIcon';\nexport { UploadIcon } from './UploadIcon';\nexport { UsersPermissionsIcon } from './UsersPermissionsIcon';\nexport { ViewStreamIcon } from './ViewStreamIcon';\nexport { WandIcon } from './WandIcon';\nexport { ZoomInIcon } from './ZoomInIcon';\nexport { ZoomOutIcon } from './ZoomOutIcon';\nexport { GroupRecordIcon } from './GroupRecordIcon';\nexport { InviteToRecordIcon } from './InviteToRecordIcon';\nexport { CollectionIcon } from './CollectionIcon';\nexport { PlaylistIcon } from './PlaylistIcon';\n","import type { SVGProps } from 'react';\n\nexport const AbTestIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M8.78042 2.11118C6.86612 2.34876 6.94137 3.15354 6.99208 3.69591V3.69599C6.99476 3.72465 6.99738 3.75258 6.99962 3.77965C7.04436 4.31904 7.55048 5.39025 8.78042 5.39025H8.79735L8.79731 5.40433C8.79731 5.40433 9.05197 8.22842 8.79731 9.662C8.63183 10.5935 8.18982 11.2329 7.69474 11.865C8.39927 11.9016 9.14688 11.9764 9.93037 12.0994C10.4699 12.1842 10.8383 12.6879 10.753 13.2246C10.6678 13.7612 10.1613 14.1276 9.62166 14.0428C8.33927 13.8413 7.1731 13.7835 6.16316 13.812C5.48376 14.6589 4.44391 15.9821 3.58432 17.1925C5.12252 17.2343 7.05517 17.2692 9.48309 17.1438C10.0287 17.1157 10.4939 17.5327 10.5222 18.0753C10.5504 18.6178 10.1312 19.0805 9.58566 19.1086C6.78798 19.253 4.53527 19.189 2.90579 19.1426C2.71222 19.1371 2.52744 19.1319 2.35159 19.1273C1.49048 20.8558 2.24968 21.573 4.20714 21.7855C6.33564 22.0165 18.0133 22.1217 19.9478 21.7855C21.8825 21.4493 22.5323 19.9214 21.5397 18.6499C20.547 17.3783 17.7768 13.4113 16.9172 11.9984C16.7004 11.642 16.4948 11.3282 16.3083 11.0435C15.7556 10.1997 15.3708 9.61242 15.36 8.93404L15.3601 5.40433L15.36 5.39025H15.3746C16.8928 5.34284 17.0231 4.6562 17.0231 3.75071C17.0231 2.84523 16.285 2.11118 15.3746 2.11118C15.3746 2.11118 10.7959 1.86103 8.78042 2.11118Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const AllContentIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m3.09059 3.5023c.5523 0 1 .4477 1 1l-.00092.70188c-.01018 3.93536-.10142 7.15092-.08848 9.77572.0068 1.3587.0426 2.4727.1299 3.3301.071.6968.16857 1.1263.25679 1.3643l.00412.0107.04589.0175c.01953.007.04171.0145.06676.0224l.08404.025c.2655.0742.6435.1409 1.1387.1952.9865.1081 2.3084.1539 3.8524.1644 3.14371.0213 6.85261-.0993 10.44111-.0993l.1166.0067c.4974.0578.8834.4805.8834.9933 0 .5522-.4477 1-1 1l-.738.0017c-3.232.0147-6.8753.1168-9.71671.0976-1.558-.0106-2.9641-.0566-4.0568-.1763-.5444-.0597-1.0437-.141-1.4591-.2571-.3702-.1035-.8555-.2808-1.185-.649l-.05731-.0703-.05079-.0751-.10286-.186c-.29118-.5812-.4296-1.3656-.51294-2.183-.0974-.9568-.1333-2.1494-.1402-3.5229-.0133-2.6853.0894-6.4106.0894-10.4876l.00673-.11652c.05776-.49735.48042-.88338.99327-.88338zm6.5557-1.37637.53051.02595c1.8616.09188 3.7138.19142 3.7138.19142s1.0423-.01829 2.2175-.02072l.4451-.0001c.8957.00155 1.802.01442 2.3355.05302 2.564.2222 2.6272 1.1409 2.7026 2.237.0118.172.024.3485.0461.5273.2722 2.1214.4627 4.9141.4627 6.5213 0 1.6393-.0545 5.1864-.245 5.4757-.2721.4178-.7348.9964-2.6398.8357-1.5154-.1278-7.0949-.2353-9.79337-.2416l-.43309-.0001c-.46931.0011-.80752.0065-.95905.0167-.9525.0643-2.0683-.0643-2.2588-1.125-.17942-.9182-.22215-3.2602-.2137-5.7009l.00427-.7725c.01347-1.80295.04985-3.58372.07493-4.8122.0148-.7225.0256-1.254.0256-1.4866 0-.0124-.0004-.0308-.001-.0543-.0081-.3442-.0425-1.796.8683-1.796.39926 0 1.70989.05778 3.1169.12593zm1.68581 5.01357c-.0356.94577-.0413 3.5445-.0421 5.0123l-.0002.688c0 .1695.1692.2755.3172.1907.9725-.551 3.89-2.2463 4.7145-3.327.0846-.106.0423-.2543-.0634-.3179l-4.6089-2.4156c-.148-.0848-.3171.0212-.3171.1695z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArchivedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m1.73061 4.12674c-.00015-.04078-.00031-.08299-.0006-.12674.00196-.01564.00388-.03112.00579-.04645.14457-1.16135.18151-1.45809 3.76421-1.95355 4.033-.558 11.67499-.278 15.49699.892.433.133 1.003.608 1.003 1.108 0 .63366.0008.64812.0016.66226.0007.01356.0014.02683.0014.58474-.1073.53269-.783.38874-1.8549.16039-.8357-.17804-1.9122-.40739-3.1481-.40739-.9352 0-2.0855-.03207-3.3103-.06622-2.7041-.07539-5.7715-.16091-7.68969.06622-.93175.05647-1.70731.17102-2.3234.26202-.91133.1346-1.47374.21767-1.6766-.01502-.26635-.30625-.26743-.59442-.2694-1.12026zm.38218 9.34776.0002.0065c.027.913.053 1.802.033 2.573l-.01.316-.00009.0031c-.05397 1.901-.10965 3.8622.37509 4.4189.34.39 1.277.743 3.591.743 2.315 0 11.63801.264 12.80501.403 1.168.14 2.548.112 2.739-.836.303-1.4255.306-4.3452.308-6.2904v-.0386c0-.625 0-1.147.01-1.48.031-1.25-.024-1.967-.081-2.702-.021-.266-.042-.534-.059-.83-.005-.146-.008-.281-.01-.406l-.0001-.00311c-.0169-.82786-.0249-1.21719-.8169-1.45989-3.822-1.171-11.46401-1.45-15.49701-.892-3.195.442-3.233.992-3.297 1.935-.00056.00797-.00112.01597-.00168.024-.00848.12097-.01744.24897-.03432.384-.14378 1.1792-.09814 2.6835-.0542 4.1315zm5.0572-1.8505c-.316-.349-.254-1.079-.149-1.376.114-.297 3.05201-.268 5.00901-.214 1.5006.0502 2.997.1864 4.482.408.298.052.613.705.465 1.175l-.023.075c-.037.13-.075.263-.17.274-.36.012-6.747-.068-6.747-.068s-2.55201.074-2.86701-.274z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowDownIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m19.7685 14.8636c.615-.555.6637-1.5035.1087-2.1185-.555-.6151-1.5035-.6637-2.1185-.1088l-4.2587 3.8429v-12.27446c0-.82845-.6716-1.5-1.5-1.5s-1.5.67155-1.5 1.5v12.27446l-4.25874-3.8429c-.615-.555-1.56345-.5063-2.11845.1088-.555.615-.5064 1.5635.10875 2.1185l6.76354 6.1031c.5709.5152 1.4389.5152 2.0098 0z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowLeftIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M9.1653 19.7974C9.72028 20.4124 10.6688 20.4611 11.2838 19.9061C11.8989 19.3512 11.9476 18.4027 11.3926 17.7876L7.54974 13.5289L19.8242 13.5289C20.6526 13.5289 21.3242 12.8573 21.3242 12.0289C21.3242 11.2005 20.6526 10.5289 19.8242 10.5289L7.54975 10.5289L11.3926 6.27019C11.9476 5.65519 11.8989 4.70674 11.2838 4.15174C10.6688 3.59674 9.72028 3.64534 9.16529 4.26049L3.06217 11.024C2.54703 11.5949 2.54703 12.4629 3.06217 13.0338L9.1653 19.7974Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowRightIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M14.8347 4.26044C14.2797 3.6454 13.3312 3.59671 12.7162 4.15169C12.1011 4.70668 12.0524 5.65517 12.6074 6.27022L16.4502 10.5289L4.17581 10.5289C3.34736 10.5289 2.67581 11.2005 2.67581 12.0289C2.67581 12.8573 3.34736 13.5289 4.17581 13.5289L16.4502 13.5289L12.6074 17.7877C12.0524 18.4027 12.1011 19.3511 12.7161 19.9061C13.3312 20.4611 14.2797 20.4125 14.8347 19.7974L20.9378 13.0338C21.453 12.4629 21.453 11.5949 20.9378 11.024L14.8347 4.26044Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowUpIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M4.23151 9.19422C3.61647 9.7492 3.56778 10.6977 4.12276 11.3127C4.67775 11.9278 5.62624 11.9765 6.24129 11.4215L10.5 7.57866L10.5 19.8531C10.5 20.6815 11.1716 21.3531 12 21.3531C12.8284 21.3531 13.5 20.6815 13.5 19.8531L13.5 7.57867L17.7587 11.4215C18.3737 11.9765 19.3222 11.9278 19.8772 11.3128C20.4322 10.6977 20.3836 9.7492 19.7684 9.19422L13.0049 3.09109C12.434 2.57595 11.566 2.57595 10.9951 3.09109L4.23151 9.19422\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const AsteriskIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M14.4425 22L13.9358 15.3633L19.5575 19.0908L22 14.9542L15.3642 11.9542L22 9L19.5575 4.86333L13.9358 8.63667L14.4425 2H9.5575L10.0183 8.68167L4.39667 4.90917L2 9.04583L8.4975 12L2 14.9092L4.39667 19L10.0183 15.2725L9.5575 22H14.4425Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const AudienceIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m11.1744 3.04659c2.6835 2.33688 2.1425 8.06531-2.85234 7.99341-4.99483-.0719-5.03082-5.26362-3.69418-7.27726 1.33665-2.01364 4.64706-2.37021 6.54652-.71615zm8.511 8.47051c1.505 1.3105 1.2016 4.523-1.5995 4.4827-2.8011-.0404-2.8213-2.9519-2.0717-4.0811s2.6061-1.3292 3.6712-.4016zm-16.99799 10.3336c-.32545.0141-.61759-.3577-.6444-.8086-.15145-2.3574.04693-5.2652 1.4129-7.0804 2.86859-3.7922 9.46089-1.5366 10.60059 2.1134.236.7357.4008 1.5352.4961 2.3645.1371-.16.2718-.3099.3984-.4466 1.7601-1.8904 5.8048-.766 6.5041 1.0535.2965.751.4096 1.6354.3492 2.5077-.0098.2438-.2089.4477-.4506.4458h-7.4492-.0132-.0022-.4484c-.0235.0008-.0471-.0016-.0706-.0069z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CalendarIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m7.5 2.9895c.82843 0 1.5.67157 1.5 1.5v1.51041l6 .00003c0-.00001 0 .00001 0 0v-1.51044c0-.82843.6716-1.5 1.5-1.5s1.5.67157 1.5 1.5v1.51041c0-.00001 0 .00001 0 0l1.5.00003c.8284 0 1.5.67157 1.5 1.5v1.5c0 .82843-.6716 1.49996-1.5 1.49996h-15c-.82843 0-1.5-.67153-1.5-1.49996v-1.5c0-.82843.67157-1.5 1.5-1.5h1.5v-1.51044c0-.82843.67157-1.5 1.5-1.5zm-3 9.0104c-.82843 0-1.5.6716-1.5 1.5v6c0 .8285.67157 1.5 1.5 1.5h15c.8284 0 1.5-.6715 1.5-1.5v-6c0-.8284-.6716-1.5-1.5-1.5z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CameraIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M11.3162 20.979C11.6222 20.9857 11.9282 20.9924 12.2342 21V20.992C12.276 20.992 12.3178 20.9924 12.3595 20.9928C12.443 20.9935 12.5264 20.9942 12.6096 20.992C12.9666 20.9825 13.3235 20.9735 13.6805 20.9645C14.6678 20.9395 15.6552 20.9144 16.6423 20.8803C17.3374 20.8559 18.032 20.8127 18.7251 20.7569C19.3748 20.7048 20.0238 20.6415 20.6727 20.5783C20.9177 20.5544 21.1626 20.5305 21.4076 20.5072C21.8887 20.4612 22.2848 20.0971 22.3749 19.624C22.5973 18.4536 22.7728 17.2761 22.8625 16.0887C22.9258 15.2478 22.9671 14.403 22.9784 13.5597C22.9883 12.8257 22.9578 12.0898 22.9174 11.3563C22.8803 10.6899 22.8278 10.023 22.7433 9.36129C22.6605 8.71089 22.5531 8.06362 22.4457 7.41667C22.4215 7.27097 22.3974 7.12528 22.3735 6.97958C22.2928 6.48916 21.8624 6.12123 21.3663 6.08228C21.0761 6.05955 20.7863 6.03115 20.4965 6.00274C20.2656 5.98012 20.0347 5.9575 19.8036 5.93773C19.2277 5.88845 18.6514 5.84434 18.0747 5.80586C17.9794 5.79929 17.9418 5.76737 17.9151 5.67868L17.8955 5.61308C17.7345 5.07457 17.5734 4.53581 17.3998 4.00139C17.2445 3.5227 16.7784 3.15664 16.3077 3.1313C16.1265 3.12155 15.9453 3.11126 15.7641 3.10098C15.1608 3.06675 14.5575 3.03253 13.9537 3.01773C12.2178 2.97502 10.4823 3.00787 8.75008 3.13365C8.62103 3.14303 8.48634 3.17917 8.36901 3.23455C8.02173 3.39833 7.773 3.66208 7.65567 4.03236C7.56181 4.32848 7.47105 4.62568 7.38028 4.92287C7.3013 5.18146 7.22232 5.44004 7.14131 5.69792C7.12817 5.73922 7.07937 5.79131 7.04041 5.79741C6.95316 5.81131 6.86434 5.81585 6.77551 5.82041C6.73533 5.82246 6.69516 5.82452 6.65512 5.82744C6.53247 5.83652 6.40978 5.84531 6.28709 5.8541C5.96567 5.87712 5.64421 5.90015 5.32324 5.92834C5.07994 5.94972 4.83701 5.97418 4.59413 5.99864C4.29308 6.02896 3.99209 6.05927 3.69053 6.08368C3.21982 6.1217 2.78478 6.49432 2.70453 6.96316C2.66943 7.16876 2.63372 7.37429 2.59802 7.57982C2.47619 8.28117 2.35434 8.98263 2.25634 9.68746C2.15263 10.4327 2.06674 11.1841 2.03202 11.9354C1.99259 12.782 1.9879 13.6329 2.02732 14.479C2.06674 15.3322 2.1545 16.1854 2.26714 17.032C2.35101 17.6614 2.46316 18.287 2.5753 18.9124C2.61877 19.1549 2.66224 19.3973 2.70406 19.64C2.77868 20.0708 3.19542 20.4636 3.61263 20.5044C3.69683 20.5127 3.78099 20.5213 3.86514 20.5298C4.03332 20.5469 4.20149 20.564 4.37008 20.579C4.58912 20.5986 4.80813 20.6188 5.02715 20.639C5.58193 20.6903 6.13681 20.7416 6.69266 20.7813C7.51863 20.8404 8.34601 20.8897 9.17386 20.9207C9.88781 20.9476 10.602 20.9633 11.3162 20.979ZM6.3909 12.7131C6.41718 9.38992 9.19264 6.63089 12.5083 6.64872C15.8811 6.66703 18.5796 9.38664 18.5707 12.7375C18.5618 16.0676 15.807 18.8534 12.4721 18.8328C9.15556 18.8121 6.36462 16.0512 6.3909 12.7131ZM16.2261 12.7248C16.2383 10.658 14.5539 8.99148 12.4754 8.99524L12.4749 8.99571C10.4006 8.99899 8.72848 10.6655 8.73318 12.7243C8.73834 14.7935 10.4217 16.4942 12.4806 16.4867C14.5619 16.4792 16.2139 14.8104 16.2261 12.7248Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretDownIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.68581 7.2381c.52393-.57331 1.39057-.64667 2.00074-.19312l.11843.09775 7.19402 6.57527 7.196-6.57527c.5733-.52393 1.443-.51915 2.01-.01262l.1092.10799c.5239.57331.5191 1.44304.0126 2.01l-.108.10918-8.2069 7.50002c-.5348.4887-1.3351.5213-1.9053.0977l-.1185-.0977-8.20691-7.50002c-.61154-.55886-.65424-1.50764-.09538-2.11918z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretLeftIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.7619 2.68582c.5733.52393.6467 1.39057.1931 2.00074l-.0977.11844-6.5753 7.194 6.5753 7.196c.5239.5733.5191 1.443.0126 2.01l-.108.1092c-.5733.5239-1.443.5191-2.01.0126l-.1092-.108-7.49998-8.2069c-.48873-.5348-.52131-1.3351-.09775-1.9053l.09775-.1185 7.49998-8.2069c.5589-.61153 1.5077-.65423 2.1192-.09538z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretRightIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m7.23808 21.3142c-.57331-.524-.64667-1.3906-.19312-2.0008l.09774-.1184 6.5753-7.194-6.57529-7.196c-.52393-.57331-.51915-1.44303-.01262-2.01l.10799-.10917c.57331-.52393 1.44303-.51915 2.01-.01262l.10917.10799 7.50005 8.2069c.4887.5348.5213 1.3351.0977 1.9053l-.0977.1185-7.50004 8.2069c-.55886.6115-1.50765.6542-2.11918.0954z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretUpIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m21.3141 16.7619c-.5239.5733-1.3905.6467-2.0007.1931l-.1184-.0977-7.194-6.5753-7.19602 6.5753c-.57331.5239-1.44304.5191-2.01.0126l-.10918-.108c-.52393-.5733-.51915-1.443-.01261-2.01l.10798-.1092 8.20683-7.49998c.5348-.48873 1.3352-.52131 1.9054-.09775l.1184.09775 8.207 7.49998c.6115.5589.6542 1.5077.0953 2.1192z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ChannelIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m5.64571 1.19092c-.44678-.324663-1.07216-.225666-1.39682.22112-.32466.44678-.22567 1.07215.22111 1.39682 1.28625.93467 2.48092 2.19849 3.54704 3.39817-1.62947-.00332-2.92814.02027-3.46778.08086-1.98082.22241-2.2359 1.3046-2.45624 2.97122-.22035 1.66659.01731 8.61489.2821 10.20679s1.03019 2.2578 3.23903 2.2185c1.36389-.0243 5.14395.102 8.22435.2049 1.9081.0637 3.5484.1185 4.1789.123l.0126.0001c1.6426.0116 2.973.0211 3.5839-1.2509.6125-1.2752.3643-9.5706.2662-11.15071-.0982-1.58008-.6322-2.71681-1.8871-2.99303-.4032-.08875-1.9372-.17748-3.8995-.24967.9793-1.0846 2.1361-2.34437 3.5284-3.63478.405-.37542.4291-1.00813.0536-1.41319-.3754-.405062-1.0081-.429086-1.4132-.05366-1.61 1.49224-2.9274 2.95491-3.9684 4.11064-.1937.21508-.3778.41955-.5525.61158-.0947.10407-.1859.20373-.2738.29896-.9155-.02314-1.8546-.0422-2.7663-.056-.1596-.18054-.3281-.37314-.5061-.57663l-.1089-.12441c-1.18229-1.35084-2.71275-3.08411-4.44059-4.33968zm9.86039 12.42148c-1.0777 1.4126-4.8912 3.6285-6.16234 4.3486-.19344.1108-.41451-.0277-.41451-.2493 0-1.468 0-5.9827.05527-7.4507 0-.1939.22107-.3324.4145-.2216l6.02418 3.1576c.1382.0831.1934.2769.0829.4154z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkCircleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m21.8158 14.5648c3.0982-10.94829-8.8224-15.41821-15.39746-10.85188-4.65388 3.23212-6.673329 10.24658-3.15895 14.34028 3.51439 4.0936 15.45811 7.4598 18.55641-3.4884zm-4.1007-5.8658c.3861-.39496.3788-1.02808-.0161-1.41413-.395-.38604-1.0281-.37882-1.4141.01613l-6.127 6.2684-2.44277-2.4992c-.38605-.3949-1.01917-.4021-1.41413-.0161-.39495.3861-.40217 1.0192-.01612 1.4141l3.15789 3.2308c.18815.1925.44596.301.71513.301.2692 0 .527-.1085.7151-.301z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { JSX } from 'react';\n\nexport const CheckmarkCircleOutlineIcon = ({ ...props }): JSX.Element => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M11.25 2.5C6.41751 2.5 2.5 6.41751 2.5 11.25C2.5 16.0825 6.41751 20 11.25 20C16.0825 20 20 16.0825 20 11.25C20 6.41751 16.0825 2.5 11.25 2.5ZM0 11.25C0 5.0368 5.0368 0 11.25 0C17.4632 0 22.5 5.0368 22.5 11.25C22.5 17.4632 17.4632 22.5 11.25 22.5C5.0368 22.5 0 17.4632 0 11.25Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M17.1237 7.35609C17.6174 7.83865 17.6265 8.63005 17.1439 9.12374L10.3018 16.1237C10.0666 16.3644 9.74436 16.5 9.4079 16.5C9.07143 16.5 8.74918 16.3644 8.51399 16.1237L5.35609 12.893C4.87354 12.3993 4.88256 11.6079 5.37626 11.1253C5.86995 10.6428 6.66135 10.6518 7.14391 11.1455L9.4079 13.4617L15.3561 7.37626C15.8386 6.88256 16.6301 6.87354 17.1237 7.35609Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkCircleThreeQuartersIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m5.06066 10.1406c1.02693-3.83255 4.96634-6.10695 8.79884-5.08003.8844.23699 1.7935-.28787 2.0305-1.1723.237-.88444-.2879-1.79352-1.1723-2.0305-5.60142-1.500892-11.35896 1.82322-12.85985 7.42462-1.500884 5.60141 1.82323 11.35891 7.42463 12.85981 5.60142 1.5009 11.35892-1.8232 12.85982-7.4246.237-.8844-.2879-1.7935-1.1723-2.0305s-1.7935.2879-2.0305 1.1723c-1.0269 3.8325-4.9663 6.1069-8.7988 5.08-3.83257-1.0269-6.10696-4.9663-5.08004-8.7988zm16.57534-2.98696c.6582-.63651.6758-1.68609.0392-2.34429-.6365-.65821-1.686-.67579-2.3442-.03928l-7.5698 7.32023-2.17928-2.46975c-.60581-.68657-1.65349-.75203-2.34005-.14621-.68656.60576-.75202 1.65346-.14621 2.34006l2.94474 3.3372c.8339.9451 2.2881 1.0027 3.1942.1265z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.79289 18.7054-6.50001-6.5374c-.39051-.3927-.39051-1.0295 0-1.4223l1.41418-1.42238c.39051-.39279 1.02371-.39279 1.41422 0l4.37872 4.40388 9.3787-9.43263c.3905-.39276 1.0237-.39276 1.4142 0l1.4142 1.42235c.3905.39275.3905 1.02956 0 1.42235l-11.5 11.56613c-.39054.3928-1.0237.3928-1.41421 0z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkUnderlinedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M9.54401 12.95L17.994 4.49995C18.194 4.29995 18.4315 4.19995 18.7065 4.19995C18.9815 4.19995 19.219 4.29995 19.419 4.49995C19.619 4.69995 19.719 4.93745 19.719 5.21245C19.719 5.48745 19.619 5.72495 19.419 5.92495L10.244 15.1C10.044 15.3 9.81067 15.4 9.54401 15.4C9.27734 15.4 9.04401 15.3 8.84401 15.1L4.56901 10.825C4.36901 10.625 4.27317 10.3875 4.28151 10.1125C4.28984 9.83745 4.39401 9.59995 4.59401 9.39995C4.79401 9.19995 5.03151 9.09995 5.30651 9.09995C5.58151 9.09995 5.81901 9.19995 6.01901 9.39995L9.54401 12.95ZM5.99401 19.8C5.71067 19.8 5.47317 19.7041 5.28151 19.5125C5.08984 19.3208 4.99401 19.0833 4.99401 18.8C4.99401 18.5166 5.08984 18.2791 5.28151 18.0875C5.47317 17.8958 5.71067 17.8 5.99401 17.8H17.994C18.2773 17.8 18.5148 17.8958 18.7065 18.0875C18.8982 18.2791 18.994 18.5166 18.994 18.8C18.994 19.0833 18.8982 19.3208 18.7065 19.5125C18.5148 19.7041 18.2773 19.8 17.994 19.8H5.99401Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CloseCircleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M13.8186 20.4731C4.60239 22.893 -2.98829 15.5818 3.31523 6.74072C9.6261 -2.10038 19.5705 4.8504 21.402 9.84467C23.2334 14.8389 19.0556 19.105 13.8186 20.4731Z \n M15.0413 8.87414C15.4318 8.48355 15.4318 7.85028 15.0413 7.45969C14.6508 7.0691 14.0178 7.0691 13.6273 7.45969L11.0001 10.0878L8.37284 7.4597C7.98238 7.06911 7.34932 7.06911 6.95886 7.4597C6.5684 7.85029 6.5684 8.48356 6.95886 8.87415L9.5861 11.5023L6.95886 14.1304C6.5684 14.5209 6.5684 15.1542 6.95886 15.5448C7.34932 15.9354 7.98238 15.9354 8.37284 15.5448L11.0001 12.9167L13.6273 15.5448C14.0178 15.9354 14.6508 15.9354 15.0413 15.5448C15.4318 15.1542 15.4318 14.521 15.0413 14.1304L12.4141 11.5023L15.0413 8.87414Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CloseIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m17.7742 19.618c.5091.5093 1.3347.5093 1.8439 0 .5091-.5091.5091-1.3347 0-1.8438l-5.7742-5.7742 5.7742-5.77422c.5091-.50918.5091-1.3347 0-1.84387-.5092-.50917-1.3348-.50917-1.8439 0l-5.7742 5.77419-5.77426-5.77422c-.50917-.50917-1.33469-.50917-1.84387 0-.50916.50917-.50916 1.3347 0 1.84386l5.77423 5.77426-5.77421 5.7742c-.50918.5092-.50918 1.3347 0 1.8439.50916.5092 1.33469.5092 1.84385 0l5.77426-5.7742z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CollectVideoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M12 6.85714H3V4.92857C3 3.864 3.864 3 4.92857 3H8.74072C9.17014 3 9.57257 3.21471 9.81043 3.57214L12 6.85714ZM3 6.85718H19.0714C20.136 6.85718 21 7.72118 21 8.78575V13.1438C20.9149 13.1202 20.8253 13.1077 20.7328 13.1077H13.3066L14.7071 11.7071C15.0976 11.3166 15.0976 10.6834 14.7071 10.2929C14.3166 9.90237 13.6834 9.90237 13.2929 10.2929L10.2929 13.2929C10.1054 13.4804 10 13.7348 10 14C10 14.2652 10.1054 14.5196 10.2929 14.7071L13.2929 17.7071C13.6834 18.0976 14.3166 18.0976 14.7071 17.7071C15.0976 17.3166 15.0976 16.6834 14.7071 16.2929L13.5219 15.1077H20.7328C20.8253 15.1077 20.9149 15.0951 21 15.0716V17.1429C21 19.272 19.272 21 17.1429 21H6.85714C4.728 21 3 19.272 3 17.1429V6.85718Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CommentIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2.0994 10.6931C2.04002 8.22692 1.96942 5.29509 2.11584 4.25593C2.13365 4.13216 2.14292 4.01528 2.1517 3.90469C2.21613 3.09248 2.25369 2.61894 5.44865 2.23843C9.48199 1.75807 17.1241 1.99825 20.9452 3.007C21.7385 3.21574 21.7461 3.55147 21.7624 4.26645C21.7648 4.37414 21.7675 4.49044 21.773 4.6162C21.8367 5.57691 22.0066 10.2604 21.9641 11.7255C21.9538 12.0123 21.9535 12.4616 21.9532 13.001V13.001C21.9522 14.6749 21.9507 17.2153 21.6457 18.4505C21.4546 19.2671 20.0748 19.2911 18.9073 19.171C18.4972 19.1289 17.0813 19.0734 15.3164 19.0193C14.4586 19.7428 13.2551 20.8268 12.6703 21.669C12.4667 21.9623 12.1951 22 11.9708 22C11.7566 22 11.6986 21.9343 11.3756 21.5684L11.3281 21.5147C10.6506 20.7484 9.58149 19.5267 9.00085 18.8624C7.74516 18.8383 6.69432 18.8234 6.10233 18.8234C3.78846 18.8234 2.85054 18.5199 2.51089 18.1837C2.02619 17.7038 2.08219 16.014 2.13647 14.3759L2.14543 14.1031C2.16606 13.462 2.13471 12.1599 2.0994 10.6931ZM4.33635 7.16713C4.33635 7.16713 3.83065 8.24157 4.01326 8.52809C4.14949 8.74182 8.25659 8.84926 10.9526 8.91979L10.9527 8.91979C11.8709 8.94381 12.6253 8.96354 13.0036 8.98174C14.1695 9.05337 17.7376 8.83848 19.2126 8.74298C19.24 8.74161 19.2672 8.74047 19.2943 8.73935C19.7381 8.72089 20.1152 8.7052 19.943 7.69241C19.9149 7.5014 19.8166 7.38202 19.634 7.38202C19.044 7.38202 9.89913 7.38202 7.90439 7.191L7.64546 7.16615C5.81529 6.99024 4.8063 6.89326 4.33635 7.16713ZM19.8977 11.4732C20.0908 11.7527 19.6254 12.8452 19.6254 12.8452C19.166 13.1363 18.1541 13.0769 16.3186 12.9692C16.2338 12.9642 16.1473 12.9591 16.059 12.9539C14.0586 12.8372 4.92114 13.177 4.33049 13.199L4.33037 13.199C4.14788 13.2058 4.04518 13.0901 4.01001 12.9003C3.80035 11.8946 4.17656 11.8649 4.61942 11.83C4.64638 11.8278 4.67359 11.8257 4.70093 11.8233C6.17134 11.673 9.72893 11.3257 10.8967 11.3539C11.2754 11.3581 12.0301 11.3498 12.9486 11.3396C15.6454 11.3099 19.7536 11.2646 19.8977 11.4732Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CommunityIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m14.8307 3.14077c.3645.16757.686.31534.9541.40981l.0186.00652c1.2355.43528 5.3747 1.89346 6.0303 4.36204.5612 2.11356-.3999 4.17296-1.3677 6.24656-.1682.3606-.3367.7217-.4975 1.0835-.0379.0854-.0756.1704-.1132.255-1.4657 3.3022-2.6018 5.8617-4.6582 6.3731-2.1092.5247-5.1606-.7312-7.71054-1.9147-.05102-.0244-.10251-.0491-.15441-.0738-1.99154-.951-4.60465-2.1987-5.20489-4.1987-.61588-2.0523 1.14517-6.02627 2.25161-7.92519.20562-.35289.40011-.72469.59807-1.10314.86724-1.65795 1.80113-3.44328 4.02973-4.32392 2.19233-.86633 4.35703.12865 5.82403.80292zm-2.2269 2.13686c-.5027-.24679-1.1143-.04716-1.366.44591l-.6538 1.281-1.30983-.64294c-.50277-.24679-1.11436-.04714-1.36603.44591-.25167.49306-.04812 1.09282.45465 1.33961l1.3098.64293-1.50554 2.94955-1.44199-.7078c-.50276-.2468-1.11435-.0471-1.36602.4459-.25167.4931-.04812 1.0928.45465 1.3396l1.44198.7078-.77998 1.5281c-.25167.4931-.04812 1.0929.45464 1.3396.50277.2468 1.11436.0472 1.36603-.4459l.77999-1.5281 2.98935 1.4674-.7622 1.4931c-.2517.4931-.0481 1.0929.4547 1.3397.5027.2467 1.1143.0471 1.366-.446l.7622-1.4931 1.4413.7075c.5028.2468 1.1144.0471 1.366-.446.2517-.4929.0482-1.0928-.4546-1.3396l-1.4414-.7074 1.5055-2.9496 1.5735.7724c.5028.2468 1.1144.0472 1.3661-.4459.2516-.4931.0481-1.0928-.4546-1.3396l-1.5736-.7724.6717-1.31597c.2518-.49306.0482-1.09282-.4546-1.33961-.5027-.24679-1.1143-.04715-1.366.4459l-.6718 1.31598-2.9892-1.46736.6538-1.281c.2517-.49306.0481-1.09283-.4547-1.33961zm1.8788 5.87347-1.5055 2.9496-2.98937-1.4674 1.50557-2.94954z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ContactUsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2 7.13053c1.02794.75462 2.30848 1.82137 3.61006 2.90567 0 0 5.06424 3.9629 5.81564 3.9629 1.8549 0 3.7992-1.8146 5.1678-2.8746 1.3176-1.0205 2.7467-2.21282 4.0625-3.31055.1651-.13774.3285-.27408.4895-.40831-.0011.22999.0035.44719.0315.64131.3947 2.63975.4326 8.17435 0 11.09695-.3145.4144-.8493.9882-3.0513.8288s-11.82778-.2869-12.92877-.2231c-1.101.0637-2.39073-.0638-2.61093-1.1158-.40264-1.7682-.5511-8.74247-.586-11.50327zm16.4311-2.99936c1.2812.09529 1.9619.48357 2.322 1.00077-.4574.37757-.9338.77506-1.4207 1.18138-1.2989 1.0838-2.6732 2.23056-3.9636 3.22999-.9655.74789-1.8517 1.38729-2.5896 1.83539-.3691.2242-.6815.3884-.9342.4939-.2367.0989-.3632.1358-.5917.0084-.2306-.1286-.5322-.3283-.8998-.5958-.73248-.5331-1.63926-1.2708-2.61739-2.08202-.26991-.22385-.54604-.45404-.8253-.68686-.21657-.18055-.43504-.36268-.65398-.54466l-.65679-.54374c-1.20143-.98965-2.37365-1.92213-3.27827-2.50838.22838-.42619.59195-.78832 1.14091-.78831 1.57531.00002 3.21902-.03191 4.885-.06428 3.39902-.06604 6.89072-.13388 10.08342.06422z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CopyDisabledIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m23.7071 1.70711c.3905-.39053.3905-1.023692 0-1.414217-.3905-.3905241-1.0237-.3905241-1.4142 0l-22.000007 22.000007c-.3905238.3905-.3905242 1.0237 0 1.4142.390524.3905 1.023687.3905 1.414217 0zm-5.0845.29289c.1737 0 .3443.01298.5109.03803l-3.3066 3.30661h-8.21351c-.93263 0-1.68869-.74873-1.68869-1.67232 0-.92361.75606-1.67232 1.68869-1.67232zm-14.9339 4.94911h10.5338l-12.2225 12.22249v-10.55017c0-.92359.75605-1.67232 1.6887-1.67232zm13.5095 2.68113-12.36977 12.36976h10.68107c.9327 0 1.6887-.7487 1.6887-1.6723zm4.7671-4.76707-3.3427 3.34265v8.10658c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-.1635-.0118-.32425-.0347-.48147z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CopyIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m18.6226 16.3124c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-1.8472-1.5122-3.34464-3.3774-3.34464h-11.00921c-.93263 0-1.68869.74871-1.68869 1.67232 0 .92359.75606 1.67232 1.68869 1.67232h11.00921zm-3.1131 5.6876c.9327 0 1.6887-.7487 1.6887-1.6723v-11.70627c0-.92359-.756-1.67232-1.6887-1.67232h-11.8208c-.93265 0-1.6887.74873-1.6887 1.67232v11.70627c0 .9236.75605 1.6723 1.6887 1.6723z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CreateIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.3966 3.60341c0-.88553.7179-1.60341 1.6034-1.60341s1.6034.71788 1.6034 1.60341v6.79319h6.7932c.8856 0 1.6034.7179 1.6034 1.6034 0 .8856-.7178 1.6034-1.6034 1.6034h-6.7932v6.7932c0 .8856-.7179 1.6034-1.6034 1.6034s-1.6034-.7178-1.6034-1.6034v-6.7932h-6.7932c-.88554 0-1.6034-.7178-1.6034-1.6034 0-.8855.71786-1.6034 1.6034-1.6034h6.7932z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DeleteIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m14.904 2.36857c.6808.18014 1.0637 1.89327 1.3326 3.11843 1.0626.02303 2.1802.06975 3.3652.15126.5509.0379.9669.51528.929 1.06626-.0379.55099-.5153.96692-1.0663.92902-3.2573-.22405-5.9961-.17824-8.5308-.1036-.3474.01023-.6918.02104-1.03385.03178-2.1416.06726-4.18778.13153-6.28166.02989-.55163-.02678-.97711-.49568-.95034-1.04731.02678-.55164.49568-.97712 1.04731-.95034 1.04212.05058 2.0709.0584 3.11959.04482.08961-.94493.83902-2.66045 1.49748-3.27021.72917-.67525 5.56337-.2668 6.57177 0zm-8.53971 18.93913c-.38411-1.7907-1.43613-8.7724-1.60784-10.1112-.01239-.0967-.02523-.1887-.03746-.2764-.1573-1.12763-.21516-1.5424 2.05023-1.84784 2.71293-.36579 9.32588-.45722 11.89608.31093.5336.15895.5387.4146.5496.95901.0017.082.0035.1706.0072.2664 0 2.8358-.6932 5.8331-1.3554 8.6963-.1564.6763-.3112 1.3453-.4546 2.0028-.1285.6219-1.0566.6401-1.842.5487-.7853-.0915-5.4362-.2926-6.99265-.2926-1.55635 0-1.98471 0-2.21316-.2561zm8.97891-9.2246c-.0298-.5515-.501-.9744-1.0525-.9446s-.9744.501-.9446 1.0525c.0309.5711-.027 1.5863-.123 2.7715-.0544.6721-.1166 1.3496-.1763 2.0013-.0459.5008-.0905.9868-.1291 1.4427-.0465.5504.3619 1.0342.9122 1.0807.5503.0466 1.0342-.3618 1.0807-.9122.0351-.4152.0789-.8939.1249-1.3962l.0002-.0017.0001-.0015c.0616-.6734.1271-1.3892.1808-2.0516.094-1.1611.166-2.312.1266-3.0409zm-5.56465 7.4093c.55025.0479 1.03505-.3594 1.08295-.9096.0632-.7272.0291-1.8798-.0269-3.0434-.0319-.6643-.0739-1.3823-.1135-2.0578-.0295-.504-.0576-.985-.0791-1.4014-.0285-.5516-.4987-.9756-1.05025-.9472-.55156.0285-.97562.4987-.94716 1.0502.02358.4571.05217.944.08167 1.4462.03835.653.07827 1.3328.11063 2.006.0571 1.1878.08163 2.2042.03206 2.7741-.04786.5502.3594 1.035.9096 1.0829z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DeleteSmIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <g fill=\"currentColor\">\n <path d=\"m9.05042 2c-.64391 0-1.23256.35667-1.52052.92132l-1.23015 2.41201h-1.59974c-.9389 0-1.70001.74619-1.70001 1.66667 0 .92047.76111 1.66667 1.70001 1.66667h14.59999c.9389 0 1.7-.7462 1.7-1.66667 0-.92048-.7611-1.66667-1.7-1.66667h-1.8003l-1.2301-2.41201c-.288-.56465-.8765-.92132-1.5205-.92132z\" />\n <path d=\"m6.63212 10c-.9389 0-1.63212.7462-1.63212 1.6667v8.8333c0 .9205.36086 1.5 1.29975 1.5h11.19995c.9389 0 1.5003-.5795 1.5003-1.5l-.1-8.8333c0-.9205-.4611-1.6667-1.4-1.6667z\" />\n </g>\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DottieClockIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M10 18.8889C9.54004 18.8889 9.16671 18.5155 9.16671 18.0555C9.16671 17.5955 9.54004 17.2222 10 17.2222C13.9823 17.2222 17.2223 13.9822 17.2223 9.99997C17.2223 6.01775 13.9823 2.77775 10 2.77775C9.54004 2.77775 9.16671 2.40442 9.16671 1.94442C9.16671 1.48442 9.54004 1.11108 10 1.11108C14.9012 1.11108 18.8889 5.09886 18.8889 9.99997C18.8889 14.9011 14.9012 18.8889 10 18.8889ZM13.61 13.3333C13.4478 13.3333 13.2812 13.2855 13.1367 13.1855L9.5256 10.6855C9.30115 10.53 9.16671 10.2733 9.16671 9.99997V5.27775C9.16671 4.81775 9.54004 4.44442 10 4.44442C10.46 4.44442 10.8334 4.81775 10.8334 5.27775V9.56331L14.0856 11.8144C14.4645 12.0766 14.5589 12.5955 14.2956 12.9733C14.1334 13.2066 13.8745 13.3322 13.61 13.3322V13.3333ZM5.13676 15.6966C5.13676 16.1568 4.76366 16.5299 4.30343 16.5299C3.84319 16.5299 3.47009 16.1568 3.47009 15.6966C3.47009 15.2363 3.84319 14.8632 4.30343 14.8632C4.76366 14.8632 5.13676 15.2363 5.13676 15.6966ZM1.94442 10.8333C2.40465 10.8333 2.77775 10.4602 2.77775 9.99994C2.77775 9.5397 2.40465 9.16661 1.94442 9.16661C1.48418 9.16661 1.11108 9.5397 1.11108 9.99994C1.11108 10.4602 1.48418 10.8333 1.94442 10.8333ZM5.13676 4.30332C5.13676 4.76356 4.76366 5.13666 4.30343 5.13666C3.84319 5.13666 3.47009 4.76356 3.47009 4.30332C3.47009 3.84309 3.84319 3.46999 4.30343 3.46999C4.76366 3.46999 5.13676 3.84309 5.13676 4.30332ZM6.91777 18.2755C7.378 18.2755 7.7511 17.9024 7.7511 17.4422C7.7511 16.9819 7.378 16.6088 6.91777 16.6088C6.45753 16.6088 6.08443 16.9819 6.08443 17.4422C6.08443 17.9024 6.45753 18.2755 6.91777 18.2755ZM3.39115 13.0822C3.39115 13.5425 3.01806 13.9155 2.55782 13.9155C2.09758 13.9155 1.72449 13.5425 1.72449 13.0822C1.72449 12.622 2.09758 12.2489 2.55782 12.2489C3.01806 12.2489 3.39115 12.622 3.39115 13.0822ZM2.55782 7.751C3.01806 7.751 3.39115 7.3779 3.39115 6.91766C3.39115 6.45743 3.01806 6.08433 2.55782 6.08433C2.09758 6.08433 1.72449 6.45743 1.72449 6.91766C1.72449 7.3779 2.09758 7.751 2.55782 7.751ZM7.7511 2.55772C7.7511 3.01796 7.378 3.39105 6.91777 3.39105C6.45753 3.39105 6.08443 3.01796 6.08443 2.55772C6.08443 2.09748 6.45753 1.72439 6.91777 1.72439C7.378 1.72439 7.7511 2.09748 7.7511 2.55772Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DownloadIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.60831 3.62342c0-.89747.72755-1.625 1.62499-1.625h3.25c.8974 0 1.6249.72753 1.6249 1.625l-.0733 5.37819h2.169c1.5012 0 2.1996 1.86149 1.0688 2.84899l-5.4188 4.7324c-.6123.5347-1.5256.5347-2.1378 0l-5.41894-4.7324c-1.13072-.9875-.43233-2.84899 1.06891-2.84899h2.16889zm-4.94834 15.12818c-.89747 0-1.625.7275-1.625 1.625s.72753 1.625 1.625 1.625h16.68003c.8975 0 1.625-.7275 1.625-1.625s-.7275-1.625-1.625-1.625z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DraggableIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.4 22c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437zm7.2 0c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EllipsisIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m6.8654 12.0577c0 1.2745-1.03319 2.3077-2.3077 2.3077s-2.3077-1.0332-2.3077-2.3077 1.03319-2.3077 2.3077-2.3077 2.3077 1.0332 2.3077 2.3077zm7.6923 0c0 1.2745-1.0331 2.3077-2.3077 2.3077-1.2745 0-2.30766-1.0332-2.30766-2.3077s1.03316-2.3077 2.30766-2.3077c1.2746 0 2.3077 1.0332 2.3077 2.3077zm5.3846 2.3077c1.2746 0 2.3077-1.0332 2.3077-2.3077s-1.0331-2.3077-2.3077-2.3077c-1.2745 0-2.3077 1.0332-2.3077 2.3077s1.0332 2.3077 2.3077 2.3077z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EllipsisVerticalIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12.25 6.67311c-1.2745 0-2.30769-1.03319-2.30769-2.30771 0-1.27451 1.03319-2.3077 2.30769-2.3077s2.3077 1.03319 2.3077 2.3077c0 1.27452-1.0332 2.30771-2.3077 2.30771zm0 7.69229c-1.2745 0-2.30769-1.0331-2.30769-2.3077 0-1.2745 1.03319-2.30766 2.30769-2.30766s2.3077 1.03316 2.3077 2.30766c0 1.2746-1.0332 2.3077-2.3077 2.3077zm-2.30769 5.3846c0 1.2746 1.03319 2.3077 2.30769 2.3077s2.3077-1.0331 2.3077-2.3077c0-1.2745-1.0332-2.3077-2.3077-2.3077s-2.30769 1.0332-2.30769 2.3077z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EmbedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m13.7617 2c.0584 0 .12.00417.18.01417.6751.1 1.1442.745 1.0451 1.43166l-2.5243 17.47497c-.09.6259-.6225 1.0792-1.2251 1.0792-.0591 0-.1191-.005-.18-.0142-.6733-.1-1.14336-.745-1.0442-1.4316l2.5226-17.4767c.09-.625.6242-1.0775 1.2251-1.0775zm-7.00456 5c.31886 0 .63772.12667.87943.38167.48343.50833.48343 1.33916 0 1.8475l-2.63657 2.77083 2.63743 2.7708c.48343.5084.48343 1.3409 0 1.8492-.24172.2533-.56057.38-.87943.38-.318 0-.63771-.1267-.87857-.38l-3.51686-3.6967c-.48343-.5083-.48343-1.3391 0-1.8466l3.51686-3.69503c.24086-.255.56057-.38167.87771-.38167zm10.48556 0c.3179 0 .6376.12667.8784.38167l3.5164 3.69503c.4833.5083.4833 1.3391 0 1.8466l-3.5164 3.6967c-.2408.2533-.5605.38-.8784.38-.3188 0-.6376-.1267-.8793-.38-.4834-.5083-.4834-1.3408 0-1.8475l2.6362-2.7725-2.6371-2.77083c-.4833-.50834-.4833-1.33917 0-1.8475.2417-.255.5605-.38167.8793-.38167z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EpisodesIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M1.412 6.647c.78 0 1.412.633 1.412 1.412v12.706H16.94c.78 0 1.412.632 1.412 1.411 0 .78-.633 1.412-1.412 1.412H1.411C.633 23.588 0 22.956 0 22.176V8.06c0-.78.632-1.412 1.412-1.412zM22.588 1C23.368 1 24 1.632 24 2.412v14.117c0 .78-.632 1.412-1.412 1.412H7.058c-.778 0-1.41-.632-1.41-1.412V2.412c0-.78.632-1.412 1.41-1.412h15.53zm-1.412 2.824H8.471v11.294h12.705V3.824zm-8.755 2.531c.252-.142.77-.138 1.019.01l4.02 2.416c.24.145.383.406.383.69 0 .282-.162.544-.403.689l-4.052 2.415c-.127.077-.324.115-.466.115-.137 0-.378-.034-.501-.105-.253-.142-.617-.409-.617-.7v-4.83c0-.289.364-.557.617-.7z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ExpandIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m13.0984 3.43938c-.5858-.58578-1.5356-.58578-2.1214 0l-3.76881 3.76885c-.58579.58579-.58579 1.53554 0 2.12132.58578.58579 1.53553.58579 2.12132 0l2.70819-2.70819 2.7082 2.70819c.5858.58579 1.5355.58579 2.1213 0 .5858-.58578.5858-1.53553 0-2.12132zm-5.9543 13.41652 3.8329 3.8329c.5858.5858 1.5356.5858 2.1214 0l3.8329-3.8329c.5858-.5858.5858-1.5356 0-2.1214s-1.5355-.5858-2.1213 0l-2.7723 2.7723-2.77228-2.7723c-.58579-.5858-1.53553-.5858-2.12132 0s-.58579 1.5356 0 2.1214z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const FavoriteIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.5016 2.97092c.6129-1.29459 2.3837-1.29459 2.9966.00001l1.7958 3.79325c.2434.51408.7138.8704 1.258.95284l4.0155.60828c1.3705.2076 1.9177 1.9633.926 2.971l-2.9056 2.9526c-.3938.4002-.5735.9767-.4805 1.5418l.6859 4.1691c.2341 1.4229-1.1985 2.508-2.4243 1.8362l-3.5916-1.9684c-.4867-.2668-1.0682-.2668-1.555 0l-3.59154 1.9684c-1.22576.6718-2.65839-.4132-2.42429-1.8361l.68593-4.1692c.09296-.5651-.08673-1.1416-.48052-1.5418l-2.90564-2.9526c-.99167-1.0077-.44446-2.7634.92599-2.971l4.0155-.60828c.5442-.08244 1.01465-.43876 1.25803-.95284z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const FavoriteOutlineIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m11.985 5.812-1.0288 2.17325c-.586 1.23773-1.74668 2.14615-3.14789 2.35845l-2.51017.3802 1.88529 1.9158c.96838.984 1.38702 2.3703 1.16718 3.7065l-.42276 2.5696 2.07515-1.1373c1.2371-.678 2.727-.678 3.9641 0l2.0751 1.1373-.4227-2.5696c-.2199-1.3362.1988-2.7225 1.1672-3.7065l1.8853-1.9158-2.5102-.3802c-1.4012-.2123-2.5619-1.12072-3.1479-2.35845zm1.4983-2.69239c-.6128-1.2946-2.3837-1.2946-2.9965 0l-1.79583 3.79325c-.24338.51408-.71383.87041-1.25803.95284l-4.0155.60828c-1.37045.2076-1.91766 1.96332-.926 2.97102l2.90565 2.9526c.39379.4002.57348.9767.48052 1.5417l-.68593 4.1692c-.2341 1.4229 1.19852 2.508 2.42429 1.8362l3.59153-1.9684c.4868-.2668 1.0683-.2668 1.5551 0l3.5915 1.9684c1.2258.6718 2.6584-.4133 2.4243-1.8362l-.6859-4.1692c-.093-.565.0867-1.1415.4805-1.5417l2.9057-2.9526c.9916-1.0077.4444-2.76342-.926-2.97102l-4.0155-.60828c-.5442-.08243-1.0147-.43875-1.2581-.95284z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const FilterIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2 6.28571C2 5.49673 2.63959 4.85714 3.42857 4.85714H20.5714C21.3604 4.85714 22 5.49673 22 6.28571C22 7.07469 21.3604 7.71428 20.5714 7.71428H3.42857C2.63959 7.71428 2 7.07469 2 6.28571ZM4.85714 12C4.85714 11.211 5.49674 10.5714 6.28571 10.5714H17.7143C18.5033 10.5714 19.1429 11.211 19.1429 12C19.1429 12.789 18.5033 13.4286 17.7143 13.4286H6.28571C5.49674 13.4286 4.85714 12.789 4.85714 12ZM9.85714 16.2857C9.06816 16.2857 8.42857 16.9253 8.42857 17.7143C8.42857 18.5033 9.06817 19.1429 9.85714 19.1429H14.1429C14.9318 19.1429 15.5714 18.5033 15.5714 17.7143C15.5714 16.9253 14.9318 16.2857 14.1429 16.2857H9.85714Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const GearIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.67556 21.6465 1.89584.3535.3926-1.9249c1.1027.034 2.1897-.0828 3.2074-.367l1.0729 1.7617 1.6555-.9092c.6409-.3283 1.255-.7575 1.7891-1.2373l1.3885-1.2374-1.4908-1.4954c.5245-.7911.9285-1.7273 1.1783-2.8192l2.0748.1226.1335-1.7929c.0268-.3282.0268-.6817.0268-1.01v-.2273-.0001c0-.2525 0-.4545-.0268-.6818l-.1335-1.81815-2.1093.12467c-.3096-1.10015-.8292-1.97313-1.4952-2.64471l1.0411-1.92441-1.7089-.83334c-.6676-.30303-1.3885-.55556-2.1629-.70708l-1.8692-.37878-.4549 2.02227c-1.0724.02298-2.1706.21979-3.21617.5585l-.97506-1.72218-1.68224.85858c-.61415.30303-1.2016.68182-1.76234 1.08586l-1.52203 1.16163 1.46422 1.72321c-.47141.78434-.85454 1.74705-1.11019 2.78393l-2.06298-.1637-.1602 1.8182c-.02671.4041-.05341.808-.05341 1.1869 0 .2524 0 .505.0267.7575l.10681 1.8182 2.10099-.1241c.27942 1.014.75807 1.9261 1.47723 2.6267l-.8813 2.0681 1.76235.6566c.0465.0165.09173.033.13625.0493.16001.0583.31079.1132.4779.1528.48065.1262.98799.2524 1.46863.3282zm.61417-12.55053c2.29637-1.71717 6.72897-1.81818 6.78237 2.34843.0534 4.1668-3.3378 5.2526-6.22162 4.4192-2.88385-.8333-2.13619-5.606-.56075-6.76763z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const GettingStartedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.217 3.06901c.04358-.54546-.36709-1.02266-.91726-1.06587-.55017-.0432-1.03149.36395-1.07507.9094-.40883 5.11717-.16781 10.44226.00568 14.27546.07054 1.5585.12991 2.8704.12992 3.8213 0 .5472.44739.9907.99929.9907.55188 0 .99928-.4435.99928-.9907 0-1.0818-.06403-2.4873-.13829-4.1175-.1733-3.8042-.40231-8.83162-.00355-13.82279zm9.9563 12.74949c-2.2507.1558-5.3327.2449-6.97506-.1558-.97326-.2449-1.05436-.7346-1.1963-5.3426l-.00276-.09c-.13968-4.53423-.17773-5.76919.12443-6.47688.34469-.8459 1.56125-1.06851 2.98058-1.29111 1.27741-.20035 11.58171-.88811 12.66971 0 .5698.46517-.7384 1.42159-2.4235 2.65368-1.5322 1.12022-3.376 2.46834-4.4034 3.88231 1.3949 1.3481 3.0566 2.4259 4.4165 3.308 1.8792 1.2189 3.1824 2.0642 2.4104 2.7326-.6999.6059-2.7027.6408-4.8097.6775-.9455.0165-1.9119.0333-2.7909.1023z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","export const GlobeIcon = ({ ...props }) => {\n return (\n <svg {...props}>\n <g id=\"path\">\n <path\n d=\"M7.65627 1.71562C6.06613 2.32378 4.62011 3.29415 3.51622 4.59949C1.96831 6.4299 1.05108 8.79219 0.845234 11.1393C1.09887 11.1103 1.40015 11.0776 1.74531 11.0428C2.57641 10.9591 3.66238 10.8638 4.95062 10.7817C5.01134 9.27806 5.28616 7.82783 5.67836 6.4794C6.19762 4.69416 6.92703 3.0717 7.65627 1.71562Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M6.45598 10.6976C6.52204 9.38849 6.76617 8.11027 7.11867 6.89833C7.77653 4.63656 8.80374 2.63467 9.71201 1.14475C10.3391 1.03232 10.9748 0.972202 11.6088 0.96582C11.6319 1.0021 11.6561 1.04012 11.6811 1.07984C11.9491 1.50469 12.3203 2.12264 12.7281 2.88811C13.5459 4.42302 14.5009 6.53176 15.0748 8.85394C15.2228 9.45317 15.3448 10.0635 15.4326 10.6794C12.1484 10.5285 9.13304 10.5738 6.653 10.6883C6.58695 10.6913 6.52127 10.6944 6.45598 10.6976Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M4.9638 12.284C3.73179 12.3635 2.69271 12.455 1.89556 12.5353C1.45914 12.5792 1.09536 12.6198 0.812256 12.6531C0.93317 15.3097 2.01391 17.7905 4.17645 19.2687C5.27269 20.018 6.85073 20.5926 8.60938 20.8635C6.93244 18.9808 5.91554 16.9895 5.38983 14.9839C5.15227 14.0776 5.01657 13.1745 4.9638 12.284Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M10.8824 21.0346C8.63427 18.9674 7.40822 16.7683 6.84082 14.6036C6.63042 13.8009 6.50902 12.9969 6.46149 12.1991C6.54769 12.1949 6.63459 12.1907 6.72216 12.1867C9.22193 12.0713 12.2664 12.0277 15.575 12.1878C15.6313 13.4726 15.5143 14.7616 15.1537 16.0051C14.6398 17.7773 13.6207 19.4948 11.8349 21.0003C11.5168 21.0226 11.1988 21.0338 10.8824 21.0346Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M16.5944 16.4229C16.1733 17.875 15.4618 19.2766 14.3822 20.5674C17.6751 19.644 20.5203 17.2629 21.094 12.6429C19.7333 12.4812 18.3897 12.3608 17.0794 12.2739C17.1265 13.6484 16.9926 15.0498 16.5944 16.4229Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M16.531 8.4941C16.7122 9.22762 16.8596 9.98738 16.9572 10.7629C18.3381 10.8507 19.7575 10.9751 21.1969 11.1446L21.1977 11.0964C21.2835 4.96044 17.6372 1.77532 13.4486 1.10179C13.6348 1.42031 13.8387 1.78254 14.0519 2.18276C14.905 3.78384 15.9176 6.01212 16.531 8.4941Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n );\n};\n","import type { SVGProps } from 'react';\n\nexport const GridViewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m14.6005 10.65c-.6903 0-1.25-.5597-1.25-1.25002v-6.14997c0-.69036.5597-1.25001 1.25-1.25001h6.1497c.6903 0 1.25.55965 1.25 1.25001v6.14997c0 .69032-.5597 1.25002-1.25 1.25002zm-12.6005 10.1c0 .6904.55965 1.25 1.25001 1.25h6.14961c.69038 0 1.25008-.5596 1.25008-1.25v-6.1499c0-.6903-.5597-1.25-1.25008-1.25h-6.14961c-.69036 0-1.25001.5597-1.25001 1.25zm11.3505 0c0 .6904.5597 1.25 1.25 1.25h6.1497c.6903 0 1.25-.5596 1.25-1.25v-6.1499c0-.6903-.5597-1.25-1.25-1.25h-6.1497c-.6903 0-1.25.5597-1.25 1.25zm-11.3505-11.35002c0 .69032.55965 1.25002 1.25001 1.25002h6.14961c.69038 0 1.25008-.5597 1.25008-1.25002v-6.14997c0-.69036-.5597-1.25001-1.25008-1.25001h-6.14961c-.69036 0-1.25001.55965-1.25001 1.25001z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HamburgerIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m22.0882 7.28569c-.0338.55114-.5079.9675-1.0591.92995-3.7464-.25521-6.8936-.23457-9.7993-.18333-.3986.00703-.7934.01466-1.1851.02223-2.4532.04744-4.78505.09252-7.17257-.02796-.55162-.02783-.97929-.49765-.95522-1.04937s.49076-.97641 1.04239-.94857c2.31236.11668 4.56689.07325 7.02439.0259.39351-.00758.79231-.01527 1.19731-.02241 2.9241-.05155 6.1384-.0734 9.9705.18765.5511.03754.9705.51477.9367 1.06591zm0 5.78541c-.0338.5512-.5079.9675-1.0591.93-3.7464-.2552-6.8936-.2346-9.7993-.1834-.3988.0071-.7938.0147-1.1857.0223-2.45322.0474-4.78446.0925-7.17197-.028-.55162-.0278-.97929-.4976-.95522-1.0493.02407-.5518.49076-.9765 1.04239-.9486 2.31235.1167 4.56688.0732 7.02436.0259.39354-.0076.79234-.0153 1.19734-.0224 2.9241-.0516 6.1384-.0734 9.9705.1876.5511.0376.9705.5148.9367 1.0659zm-.9753 6.5159c.552-.008.99-.4623.9782-1.0147-.0118-.5523-.4689-.9936-1.0209-.9856-6.2773.0914-10.4894-.01-14.77115-.1131-1.10589-.0266-2.21649-.0533-3.36847-.0769-.5521-.0113-1.00577.4273-1.01329.9796-.00753.5523.43393 1.0092.98603 1.0205 1.14246.0234 2.2471.05 3.3496.0765 4.28668.1032 8.54098.2057 14.85998.1137z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HazardIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12.7865 2.94054c.7413.21443 1.3767.75049 1.8003 1.39377l6.9896 12.43669c.2118.4288.4236.9649.4236 1.5009 0 1.6082-1.2708 2.8948-2.8594 2.8948h-14.19093c-.52951 0-1.05902-.1072-1.48264-.4289-1.37673-.8577-1.90624-2.6803-1.05902-4.0741l7.09548-12.32939c.2118-.42885.63541-.8577 1.05901-1.07213.6354-.42885 1.4826-.53606 2.224-.32164zm-.5295 2.03704h-.2119c-.2118 0-.3177 0-.4236.10721l-.1588.16082-.1589.16082-7.09545 12.43667c-.2118.3216-.1059.8577.31771 1.0721.08825.0893.25005.1042.36282.1067l14.25172.0005c.4236 0 .8472-.3216.8472-.8577 0-.1072 0-.3216-.1059-.4288l-7.2013-12.32947c-.1059-.21442-.2118-.32164-.4236-.42885zm.6354 11.47172c.4236.4289.4236 1.1794 0 1.6082-.3177.2144-.6354.3216-.8473.3216-.1059 0-.3177 0-.4236-.1072s-.2118-.1072-.3177-.2144c-.3953-.4003-.4217-1.0807-.079-1.5183l.079-.0899c.4236-.4288 1.165-.4288 1.5886 0zm.4236-7.93371v.21443l-.4236 5.03898c0 .7505-.2118 1.3938-.8473 1.3938-.7413 0-.9531-.6433-.9531-1.2866l-.4236-5.03897c0-.75049.5295-1.39376 1.2708-1.50097.7414-.10722 1.3768.42885 1.3768 1.17933z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HelpCenterIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m3.81493 6.36059c3.08876-4.51878 10.40947-5.95666 14.79867-2.2448 6.2012 5.24418 4.951 18.09941-6.5912 17.93811-11.542153-.1614-11.296231-11.1745-8.20747-15.69331zm.3161 4.74441c-.21438 1.3577-.18185 2.8247.21769 4.1649.39061 1.3102 1.11527 2.4485 2.26201 3.2804.47657.3457 1.05138.6568 1.74342.9052l.22047-2.8886c-1.45328-.9896-2.00163-2.605-1.99252-4.1767zm15.52497-2.11314-2.0825 1.92114c.4477 2.0742-.1406 4.3636-1.9318 5.6316l.1812 2.9024c.678-.2623 1.2582-.5962 1.7512-.9755 1.2454-.9582 2.0658-2.3068 2.4595-3.8531.4672-1.8346.3121-3.8498-.3776-5.62654zm-5.2445.22952c-.6711-.57069-1.6504-.81143-2.7043-.63891-1.0636.17412-1.97562.73537-2.47215 1.45763-.52483.7633-.86487 2.2708-.50246 3.4986.16442.557.45675 1.0039.90194 1.3287.44947.328 1.20237.6385 2.46407.6595 1.1982.02 1.9722-.2946 2.4683-.6741.5044-.3858.8546-.9408 1.0289-1.6177.3699-1.4361-.1222-3.1105-1.1843-4.01372zm-3.3565-5.09683c-.9833.16372-1.92577.48149-2.77592.92687l2.16822 1.78626c.6128-.20104 1.2593-.30765 1.903-.30943l1.694-2.39577c-.96-.17519-1.9746-.17686-2.9893-.00793z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HideIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n {...props}\n viewBox=\"0 0 24 24\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"m4.99451 4.11717c-.26525.00112-.51919.10753-.70601.29583-.18671.18841-.29096.44324-.28983.70849.00112.26525.10753.51919.29583.70601l.009.009.0045-.0045 13.932 13.8195-.0045.0045c.1909.1788.4442.2758.7056.2701.2615-.0056.5104-.1134.6934-.3003.1829-.1869.2855-.438.2856-.6995.0001-.2616-.1023-.5128-.2851-.6998l-1.4775-1.4655c2.0625-1.6245 3.9225-3.5325 3.84-4.6875.0675-.957-1.209-2.49-3.024-4.179-2.8755-2.6775-7.899-3.9105-11.553-1.7835l-1.7175-1.704c-.18841-.18671-.44325-.29096-.70849-.28983zm5.95399 5.49333-1.464-1.4505c1.5315-.7665 3.6135-.636 4.9635.519 1.533 1.311 1.983 3.738 1.113 5.508l-1.455-1.4445c.2235-.9285-.081-2.01-.825-2.64-.6315-.534-1.5405-.684-2.3325-.492zm-8.946 2.3145c-.06-.8415.915-2.088 2.25-3.33l3.1155 3.09c-.138 2.1285.897 4.5885 4.3065 4.6365.121.0017.2421-.0003.363-.006l2.4315 2.412c-3.3015.792-7.0905-.432-9.4425-2.622-1.8135-1.689-3.0915-3.2205-3.024-4.1805z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HomeIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m20.2951 12.8675c.39.3916 1.0223.3916 1.4123 0 .3901-.3915.3901-1.0264 0-1.418-.5441-.5463-1.0963-1.185-1.7355-1.92403-1.5548-1.798-3.6235-4.19026-7.3397-7.29367-.3677-.30698-.9005-.30929-1.2707-.00552-2.80856 2.30436-4.3166 3.73206-9.11644 9.27432-.3619.4179-.31787 1.0512.09835 1.4145.41623.3634 1.04703.3192 1.40893-.0987.22242-.2568.43756-.5046.64588-.7437-.12635 2.67-.31165 6.9451-.23082 7.493.03562.2352.06232.4794.08762.7106.05894.539.11018 1.0073.24856 1.1258.2571.2118.73171.2329 2.49178.2541.43145.0052 1.20203.0212 2.13063.0436-.04005-.8221-.09121-2.9385-.11733-4.0194l-.00919-.3784c-.01478-.1881-.01071-.5289-.00583-.9389.00278-.2332.00583-.4887.00583-.7514.02316-1.5293.99606-2.8171 2.31633-3.0049 1.4361-.2147 2.71.9122 2.9649 2.5488.0232.1342.0463.2683.0694.3756.1622.8049.278 4.9904.139 6.0636-.013.0978-.0151.1825-.0169.2563v.0011c1.1948.0404 2.1271.0788 2.4112.1058.8899.0847 1.9183.0847 2.0567-.4233.2768-1.0162.4548-5.9783.4548-6.6981.0122-.5599.0019-1.8728-.017-2.9434.3011.335.6026.6584.9172.9743z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HourglassIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m15.7232 10.2988c-.6792.8959-.3199 2.4081.2552 2.9902.575.5821.2595.2692 2.8516 3.3035 2.5921 3.0344-.2717 3.8307-2.8485 3.8203l-7.07912-.0286c-2.54232-.0103-5.19674-1.1217-2.25149-4.8988.67569-.7818 1.33873-1.5406 1.9048-2.1733.77137-.8621.78975-2.2582.04095-3.1399-.89303-1.05163-1.88693-2.29888-2.76384-3.4247-1.43635-2.02599-.07259-3.1681 1.57519-3.16031l9.31711.04403c1.6246.00768 2.5595 1.84424 1.601 3.15606-.8543 1.16929-1.8098 2.46542-2.6029 3.51152zm.8976 8.1748c-1.0924.2669-6.5677.2362-8.11503-.0174-1.54734-.2535-.98222-1.1902-.42583-1.8964.55639-.7061 1.20002-1.166 1.79963-1.8301.45553-.5046.92993-.9558 1.41473-1.4203.0189-.0182.0205-.0197.0076-.0097.3977-.3063 1.1425-.4605 1.6217-.2591.6321.2657 1.1417.8642 1.6292 1.3291.7252.6914 1.6262 1.596 2.4986 2.5248.5045.537.6617 1.3122-.4306 1.5791z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ImportIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M20.9995 14.0626C20.9631 16.5163 18.9626 18.4942 16.5002 18.4942H13.263V12.8027L14.6115 14.1068C15.0581 14.5387 15.7702 14.5268 16.2022 14.0802C16.6342 13.6336 16.6222 12.9213 16.1757 12.4894L13.0084 9.42632C12.9532 9.359 12.8904 9.2982 12.8212 9.24525C12.3745 8.81431 11.6631 8.82653 11.2314 9.27282L7.98828 12.6262C7.55634 13.0729 7.56825 13.7851 8.01486 14.217C8.46148 14.649 9.17371 14.6371 9.60565 14.1904L11.013 12.7352V18.4942H7.50003C5.03754 18.4942 3.03702 16.5163 3.00051 14.0626L3 14.0284V13.9943C3.03192 11.8494 4.56491 10.0682 6.59484 9.65361C6.72933 6.7847 9.09789 4.5 12.0001 4.5C14.9886 4.5 17.4114 6.92271 17.4114 9.91127C17.4114 9.98315 17.4099 10.0546 17.4072 10.1256C19.3761 10.1616 20.9661 11.8738 20.9995 13.9943L21 14.0281L20.9995 14.0626Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const InfoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m21.9985 12.0962c.156-11.337814-12.26789-12.565873-17.33611-6.47453-3.58731 4.31149-3.71983 11.58443.64734 14.61853 4.36716 3.034 16.53287 3.1937 16.68877-8.144zm-8.5688-1.5609v7.29h-2.4297v-7.29zm-.3492-2.77932c-.2329.23288-.5214.34931-.8656.34931s-.6328-.11643-.8656-.34931c-.2329-.23287-.3493-.52144-.3493-.86569s.1164-.63281.3493-.86568c.2328-.23288.5214-.34932.8656-.34932s.6327.11644.8656.34932c.2328.23287.3492.52143.3492.86568s-.1164.63282-.3492.86569z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const IntegrationsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m17.556 2c-.5523 0-1 .44771-1 1v2.43713h-2.4371c-.5523 0-1 .44772-1 1 0 .55229.4477 1 1 1h2.4371v2.43706c0 .55231.4477 1.00001 1 1.00001s1-.4477 1-1.00001v-2.43706h2.4371c.5523 0 1-.44771 1-1 0-.55228-.4477-1-1-1h-2.4371v-2.43713c0-.55229-.4477-1-1-1zm-11.16851 1.26404c1.23017-.04521 2.91132-.02893 3.79511.2616.5235.17684.5544.48675.507 3.38818l-.001.05678c-.0467 2.85493-.0594 3.6326-.2431 4.0706-.2107.5239-.87939.6353-1.65859.742-.70121.096-5.08453.1317-5.9701-.1168-.54681-.1498-.67672-.7304-.73486-3.74861-.06216-3.43916.04971-3.98138.6889-4.17828.6165-.18385 2.06436-.40204 3.61664-.47547zm.12642 18.83116c-1.22709.0981-2.90743.1543-3.80287-.098-.53064-.1541-.57486-.4625-.65224-3.3633l-.00151-.0567c-.07615-2.8543-.0969-3.6317.06784-4.0772.18793-.5325.85123-.6727 1.62507-.8128.69645-.1261 5.07421-.3503 5.96961-.1401.55279.1261.70749.7007.89549 3.7136.21 3.4333.1212 4.1716-.5089 4.3958-.54029.1923-1.46289.2656-2.56636.3533h-.00003-.00022c-.32776.026-.67148.0534-1.02588.0854zm5.85269-7.7969c-.2522.8955-.3521 2.4643-.254 3.6914.1402 1.5478.3059 2.9399.5161 3.5479.2242.6301 1.1312.7485 4.5645.5384 3.0129-.1879 3.5875-.3426 3.7136-.8953.2102-.8955-.014-5.2733-.1401-5.9698-.1402-.7737-.2803-1.4371-.8128-1.625-.4455-.1647-1.2229-.144-4.0773-.0678l-.0567.0015c-2.9008.0774-3.2991.2481-3.4533.7787z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const InviteIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M15.125 3.12081C18.0843 5.62343 17.4877 11.7582 11.9795 11.6812C6.47136 11.6042 6.43167 6.04421 7.90568 3.88776C9.37969 1.73131 13.0303 1.34944 15.125 3.12081ZM3.0867 22.0565C2.57221 22.0699 2.11037 21.7159 2.06799 21.2867C1.82858 19.0425 2.14219 16.2745 4.3016 14.5465C7.60285 11.9186 14.0238 12.3416 17.9678 14.1067C15.7016 14.5823 14 16.5924 14 19C14 20.1954 14.4195 21.2928 15.1193 22.153L3.0867 22.0565Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M18.3015 16.7C18.3015 16.3134 18.6149 16 19.0015 16C19.3881 16 19.7015 16.3134 19.7015 16.7V18.3012H21.3025C21.6891 18.3012 22.0025 18.6146 22.0025 19.0012C22.0025 19.3878 21.6891 19.7012 21.3025 19.7012H19.7015V21.3025C19.7015 21.6891 19.3881 22.0025 19.0015 22.0025C18.6149 22.0025 18.3015 21.6891 18.3015 21.3025V19.7012H16.7C16.3134 19.7012 16 19.3878 16 19.0012C16 18.6146 16.3134 18.3012 16.7 18.3012H18.3015V16.7Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { JSX } from 'react';\n\nexport const LightningBoltIcon = ({ ...props }): JSX.Element => {\n return (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M10.9912 2.11398C13.1572 1.94882 16.3205 1.97579 18.5935 2.11398C19.3811 2.16116 20.1345 2.60607 19.4239 3.66777C18.2339 5.44738 16.9412 6.85287 15.3189 8.67629C16.6715 8.64259 18.1183 8.58866 19.5865 8.62911C20.8579 8.66618 21.5256 9.28972 20.494 10.3649C16.9027 14.1028 12.2839 17.9788 7.77226 21.0493C5.69192 22.4649 4.57469 22.384 5.34947 20.2337C6.00011 18.4305 7.42982 15.4139 8.80387 12.9399C7.47262 13.0074 5.53782 13.0208 4.18945 12.9939C3.1878 12.9737 2.81539 12.4276 3.08507 11.6962C4.02679 9.1212 6.26123 5.60579 8.21743 3.39476C9.04786 2.45777 9.48448 2.22857 10.9912 2.11398Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import type { SVGProps } from 'react';\n\nexport const LinkIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m19.1411 3.22522c-1.6336-1.63363-4.2823-1.63363-5.9159 0l-4.42241 4.42244c-1.63362 1.63364-1.63362 4.28224 0 5.91594l1.12908 1.1291c.54453.5445 1.42743.5445 1.97203 0 .5445-.5446.5445-1.4275 0-1.972l-1.1291-1.1291c-.5446-.5445-.5446-1.4274 0-1.97196l4.4224-4.42245c.5445-.54454 1.4275-.54454 1.972 0l1.6336 1.63364c.5446.54455.5446 1.42744 0 1.97198l-1.514 1.51399c-.5445.5445-.5445 1.4274 0 1.972.5445.5445 1.4274.5445 1.972 0l1.514-1.514c1.6337-1.63365 1.6337-4.28229 0-5.91593zm-14.28222 17.54948c1.63363 1.6337 4.28228 1.6337 5.91592 0l4.4224-4.4224c1.6337-1.6336 1.6337-4.2822 0-5.9159l-.891-.89097c-.5445-.54454-1.4274-.54454-1.9719 0-.5446.54457-.5446 1.42747 0 1.97197l.891.891c.5445.5445.5445 1.4274 0 1.972l-4.42248 4.4224c-.54455.5445-1.42742.5445-1.97198 0l-1.63365-1.6337c-.54454-.5445-.54454-1.4274 0-1.9719l1.51404-1.5141c.54454-.5445.54454-1.4274 0-1.9719-.54455-.5446-1.42744-.5446-1.97197 0l-1.51405 1.514c-1.63362 1.6337-1.63361 4.2823.00002 5.9159z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ListViewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m9.59493 13.25c.70527 0 1.19227.4311 1.25817 1.0932l.0077.1568v6.25c0 .6964-.4366 1.1773-1.10708 1.2424l-.15879.0076h-6.3291c-.70525 0-1.19221-.4311-1.25817-1.0932l-.00766-.1568v-6.25c0-.6964.43658-1.1773 1.10704-1.2424l.15879-.0076zm11.13927 5c.7595 0 1.2658.5 1.2658 1.25 0 .6964-.4366 1.1773-1.107 1.2424l-.1588.0076h-6.3291c-.7595 0-1.2659-.5-1.2659-1.25 0-.6964.4366-1.1773 1.1071-1.2424l.1588-.0076zm0-3.75c.7595 0 1.2658.5 1.2658 1.25 0 .6964-.4366 1.1773-1.107 1.2424l-.1588.0076h-6.3291c-.7595 0-1.2659-.5-1.2659-1.25 0-.6964.4366-1.1773 1.1071-1.2424l.1588-.0076zm-11.13927-12.5c.70527 0 1.19227.43112 1.25817 1.0932l.0077.1568v6.25c0 .6964-.4366 1.1773-1.10708 1.2424l-.15879.0076h-6.3291c-.70525 0-1.19221-.4311-1.25817-1.0932l-.00766-.1568v-6.25c0-.69643.43658-1.1773 1.10704-1.24244l.15879-.00756zm11.13927 5c.7595 0 1.2658.5 1.2658 1.25 0 .69642-.4366 1.17729-1.107 1.24243l-.1588.00757h-6.3291c-.7595 0-1.2659-.5-1.2659-1.25 0-.69642.4366-1.17729 1.1071-1.24243l.1588-.00757zm0-3.75c.7595 0 1.2658.5 1.2658 1.25 0 .69642-.4366 1.1773-1.107 1.24244l-.1588.00756h-6.3291c-.6329 0-1.2659-.5-1.2659-1.25 0-.69643.4366-1.1773 1.1071-1.24244l.1588-.00756z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const LiveIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m22.9958 11.8791c-.0478 1.702-.5318 3.3895-1.4008 4.8848-.0956.168-.2708.2707-.4681.2768-.19.0048-.3505-.0762-.4498-.2225-.0464-.0856-.1002-.1603-.1479-.2267l-.0004-.0005c-.0171-.023-.0331-.0459-.0539-.0762-.1373-.1849-.1557-.4073-.0527-.5959.7145-1.2596 1.0981-2.6291 1.1398-4.0809v-.2671c0-2.35354-.929-4.59584-2.6166-6.31354-1.7648-1.79263-4.1375-2.81406-6.6878-2.87571h-.2574c-2.49402 0-4.85688.92593-6.65354 2.60857-1.80157 1.68626-2.83103 3.94308-2.89721 6.35578-.04167 1.6585.36644 3.2819 1.17653 4.6865.1103.2067.09804.4461-.04167.6516-.00792.0135-.0171.0274-.02656.0417-.00665.01-.01343.0203-.02001.0308-.01961.029-.03922.0592-.05393.0822-.11642.1813-.31374.2889-.53434.2841-.21815-.0037-.40566-.1112-.51596-.2938-.99269-1.6838-1.486591-3.5913-1.42899-5.5169.07966-2.82857 1.29786-5.4589 3.4291-7.40627 2.05893-1.87967 4.73186-2.90593 7.55798-2.90593.103 0 .2059 0 .3088.00484 2.9438.07615 5.6731 1.25109 7.6867 3.30604 2.0197 2.05253 3.0884 4.74088 3.0087 7.56822zm-3.391.5476c-.0307 1.1242-.277 2.1855-.7341 3.1598-.0834.1837-.2304.3203-.413.3844-.1778.0604-.3689.0459-.5405-.0399l-.0662-.0339h-.0172c-.3394-.2018-.4644-.6467-.2843-1.0419.3481-.764.5442-1.621.5662-2.4768.0441-1.6742-.5466-3.26741-1.6643-4.48829-1.1263-1.21725-2.6484-1.91352-4.2931-1.95945h-.1581c-1.5969 0-3.10922.63461-4.25878 1.78538-1.14712 1.14956-1.80402 2.68836-1.84569 4.33106-.02206.8462.1152 1.6718.40934 2.4539.14094.3663.0147.7712-.29291.9719l-.07966.035c-.17525.0907-.38482.1016-.57233.0327-.19242-.0726-.34071-.2164-.41547-.4086-.39462-.9949-.57968-2.0525-.54904-3.1465.05515-2.15044.9449-4.1377 2.5038-5.5955 1.46576-1.37077 3.35434-2.09484 5.31404-2.04165 1.9351.04956 3.7428.84374 5.1203 2.2411l-.0086.00846.1937.20912c1.4057 1.52187 2.1471 3.51757 2.0859 5.61967zm-5.3532-2.91072c2.1287 1.76482 1.7071 6.09952-2.2624 6.04882-3.95856-.0508-3.9892-3.989-2.93032-5.5085 1.05892-1.51944 3.68152-1.79505 5.19272-.54032zm-8.66839 13.38252c-.37011.0109-.69979-.2345-.73043-.5403v-.0012c-.17525-1.5811.05148-3.5394 1.60425-4.7639 3.25997-2.5602 10.76767-1.0407 12.06317 1.4179.5453 1.0106.761 2.2145.6483 3.3871-.0111.3263-.3812.6019-.8334.6019z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const LockIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12 3c3.3137 0 5.9999 2.68629 5.9999 6 .8285 0 1.5.67158 1.5 1.5v9c0 .8284-.6715 1.5-1.5 1.5h-11.9999c-.82844 0-1.5-.6716-1.5-1.5v-9c0-.82842.67156-1.5 1.5-1.5 0-3.31371 2.68629-6 6-6zm0 3c-1.6569 0-3 1.34314-3 3h5.9999c0-1.65686-1.343-3-2.9999-3zm0 12c1.6569 0 2.9999-1.3431 2.9999-3s-1.343-3-2.9999-3-3 1.3431-3 3 1.3431 3 3 3z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const LogoutIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.70507 7.67368c1.74622-5.02899 8.66503-6.766142 13.67123-4.38094 7.0728 3.36988 9.1132 15.77696-1.6595 18.53426-10.77276 2.7573-13.757949-9.1243-12.01173-14.15332zm7.80893-.83709c-.3854-.38176-1.00379-.37523-1.38114.0146l-2.96599 3.06372c-.02406.02443-.04687.05013-.06831.07698-.0482.06031-.08835.12501-.12044.19261-.05827.1225-.09227.259-.09573.4033-.00048.0193-.00031.0386.00025.0579.00388.1177.02812.2303.06928.3341.04648.1175.11615.2278.20904.3237l2.9719 3.0699c.37735.3898.99574.3963 1.38114.0145.3853-.3818.3918-1.0072.0143-1.3971l-1.34627-1.3907h1.58317c2.6969 0 4.8831 2.2116 4.8831 4.9397v.4083c0 .5457.4372.988.9766.988s.9766-.4423.9766-.988v-.4083c0-3.8194-3.0607-6.91554-6.8363-6.91554h-1.58306l1.34616-1.39058c.3775-.38982.371-1.01532-.0143-1.39709z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const MediaIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m12.0946 20.4146c-2.54091-.0423-5.06588-.0847-6.15454-.0847-3.43484 0-3.51232-.6046-3.74674-2.4432-.024-.1906-.0495-.381-.07648-.5712-.19072-1.292-.10927-9.0787-.02682-10.80108.00993-.23536.01092-.45497.0139-.66079.01689-1.62391.02384-2.35363 3.34445-2.35363 2.48524 0 7.86103.07189 11.47163.12113 1.8247.02462 3.1985.04333 3.5193.04333.9555.03348 1.4194 1.09311 1.474 2.08774.0547.99463.0269 5.566 0 7.0569-.0079.3349.011.8312.0338 1.4103.0586 1.5461.1391 3.6801-.1976 4.8845-.3 1.1935-1.7204 1.3925-2.9213 1.3925-.7103.0177-3.7329-.0325-6.7336-.0818zm-7.78952-14.74217.03775.9769c.00376.10022.04593.19523.11791.26568s.16836.11103.26947.11347l1.28136.03052c.05395.00123.10758-.00845.15762-.02844.05005-.01999.09547-.04988.13348-.08785.03801-.03796.06783-.0832.08763-.13296.0198-.04977.02917-.10301.02753-.15648l-.02781-.92766c-.00278-.09829-.04254-.19199-.11147-.2627-.06892-.0707-.16203-.11329-.26102-.1194l-1.29129-.07878c-.05542-.00335-.11094.00486-.16297.0241-.05203.01923-.09941.04907-.13909.08757-.03969.03851-.07079.08484-.0913.136-.02051.05115-.02998.10502-.0278.16003zm3.23121.9769-.03774-.97591c-.00219-.05501.00728-.10987.0278-.16102.02051-.05116.05161-.09749.09129-.136.03969-.0385.08707-.06834.1391-.08757.05203-.01924.10754-.02745.16297-.0241l1.29129.07878c.09899.00611.19209.0487.26102.1194.06892.07071.10869.16441.11147.2627l.02781.92766c.00164.05356-.00776.10688-.02762.15671s-.04976.09512-.08789.1331c-.03812.03798-.08365.06785-.13382.08778-.05016.01993-.1039.02951-.15792.02814l-1.28037-.03052c-.10112-.00244-.19749-.04302-.26947-.11347s-.11415-.16546-.11792-.26568zm11.65041 11.52887-.0397-.9769c-.004-.1001-.0463-.1948-.1182-.2651-.072-.0702-.1682-.1107-.2692-.1131l-1.2794-.0315c-.054-.0014-.1077.0082-.1579.0282-.0502.0199-.0957.0498-.1338.0877-.0381.038-.068.0833-.0879.1331-.0199.0499-.0293.1032-.0276.1567l.0278.9287c.0028.0983.0425.192.1115.2627.0689.0707.162.1133.261.1194l1.2913.0788c.0555.0035.1111-.0046.1633-.0238.0521-.0192.0996-.049.1394-.0875s.071-.0849.0916-.1362c.0205-.0512.03-.1061.0278-.1612zm-8.4579-11.52887-.0388-.97591c-.0022-.0551.0073-.11004.0279-.16127s.0518-.09761.0916-.13613c.0397-.03852.0873-.06834.1394-.08751s.1078-.02727.1633-.02378l1.2913.07878c.099.00611.1921.0487.261.1194.0689.07071.1087.16441.1115.2627l.0278.92766c.0016.05356-.0078.10688-.0276.15671-.0199.04983-.0498.09512-.0879.1331-.0382.03798-.0837.06785-.1339.08778-.0501.01993-.1039.02951-.1579.02814l-1.2803-.03052c-.1012-.00244-.1975-.04302-.2695-.11347s-.1142-.16546-.1179-.26568zm3.1547 10.56767.0397.9769c.0038.1003.046.1953.1179.2657.072.0705.1684.111.2695.1135l1.2794.0305c.054.0014.1077-.0082.1579-.0281.0502-.02.0957-.0498.1338-.0878.0382-.038.0681-.0833.0879-.1331.0199-.0498.0293-.1032.0276-.1567l-.0278-.9277c-.0028-.0983-.0425-.192-.1114-.2627-.069-.0707-.1621-.1133-.2611-.1194l-1.2913-.0788c-.0554-.0034-.1109.0046-.163.0237-.0521.0192-.0995.0489-.1393.0873s-.071.0847-.0916.1358c-.0207.0511-.0303.1059-.0282.1609zm2.07-11.56033.0388.97691c.0022.0551-.0073.11004-.0279.16126-.0206.05123-.0518.09761-.0916.13613-.0397.03853-.0873.06834-.1394.08751s-.1078.02727-.1633.02378l-1.2913-.07878c-.099-.00611-.1921-.0487-.261-.1194s-.1087-.16441-.1115-.2627l-.0268-.92865c-.0015-.05347.008-.10668.0279-.1564.02-.04971.0499-.09488.088-.13275.0381-.03788.0836-.06766.1337-.08753s.1037-.02942.1577-.02806l1.2793.03053c.101.00242.1972.04286.2692.11311.0719.07024.1142.16501.1182.26504zm-3.1547 12.52153-.0397-.9769c-.004-.1001-.0463-.1948-.1183-.2651-.0719-.0702-.1682-.1107-.2691-.1131l-1.2794-.0315c-.054-.0014-.1077.0082-.1579.0282-.0502.0199-.0957.0498-.1338.0877-.0382.038-.0681.0833-.0879.1331-.0199.0499-.0293.1032-.0276.1567l.0278.9287c.0028.0983.0425.192.1114.2627.069.0707.1621.1133.2611.1194l1.2913.0788c.0555.0035.1111-.0046.1632-.0238.0522-.0192.0997-.049.1395-.0875s.071-.0849.0915-.1362c.0206-.0512.0301-.1061.0279-.1612zm4.3169-11.52887-.0387-.97591c-.0022-.0551.0073-.11004.0278-.16127.0206-.05123.0518-.09761.0916-.13613s.0873-.06834.1394-.08751c.0522-.01917.1078-.02727.1633-.02378l1.2913.07878c.099.00611.1921.0487.261.1194.0689.07071.1087.16441.1115.2627l.0268.92766c.0017.05356-.0077.10688-.0276.15671s-.0498.09512-.0879.1331-.0836.06785-.1338.08778-.1039.02951-.1579.02814l-1.2794-.03052c-.1011-.00244-.1975-.04302-.2695-.11347s-.1141-.16546-.1179-.26568zm-9.61715 10.56767.03774.9769c.00377.1003.04594.1953.11792.2657.07198.0705.16835.111.26947.1135l1.28037.0305c.05402.0014.10776-.0082.15792-.0281.05017-.02.0957-.0498.13382-.0878.03813-.038.06803-.0833.08789-.1331s.02926-.1032.02762-.1567l-.02781-.9277c-.00278-.0983-.04255-.192-.11147-.2627-.06893-.0707-.16203-.1133-.26102-.1194l-1.29129-.0788c-.05534-.0033-.11077.0049-.16273.0241-.05196.0191-.09929.0489-.13896.0873-.03966.0384-.07079.0846-.09136.1356-.02058.0511-.03016.1058-.02811.1607zm-1.12442-.0157.03874.9769c.0022.0551-.0073.11-.02787.1612-.02057.0513-.05177.0977-.09156.1362s-.0873.0683-.13945.0875c-.05214.0192-.10777.0273-.16328.0238l-1.29129-.0788c-.09899-.0061-.19209-.0487-.26102-.1194-.06892-.0707-.10868-.1644-.11147-.2627l-.02682-.9287c-.00163-.0535.00776-.1068.02762-.1567.01987-.0498.04977-.0951.08789-.1331.03812-.0379.08366-.0678.13382-.0877.05017-.02.1039-.0296.15793-.0282l1.27937.0315c.10095.0024.19719.0429.26914.1131.07196.0703.11424.165.11825.2651zm3.80237-2.9248c.7986-.4491 3.1935-1.8288 3.8699-2.7082.0695-.0866.0348-.2068-.0517-.259l-3.7834-1.9656c-.1212-.06893-.26029.01773-.26029.13787-.03477.91383-.03476 3.72543-.03476 4.63833 0 .1379.13905.2245.26025.1556z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const MegaphoneIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m17.5195 3.01289c-4.627 1.42268-11.69556 3.59505-15.22532 6.18514-.42573.28958-.38276 3.56277.08595 3.85137l3.70565.9222c0 1.5508.65158 6.8268 4.88692 7.9398 2.7752.5721 4.9538-1.682 6.3529-5.1187 1.3822.3522 2.4765.6347 3.0381.787.9834.4561 1.0593.1413 1.1653-.2986l.028-.113c.7675-5.272.3407-12.86975.1699-14.64054-.042-.41268-.6806-.65887-1.2353-.45404-.7635.26032-1.7888.57512-2.9721.93937zm-1.9957 13.32381c-2.4993-.6302-4.9994-1.2571-7.50025-1.8808.13291 2.0079.52966 4.711 3.14105 5.2478 2.3435.7133 3.1889-.9989 4.1973-3.0391z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const MoreOptionsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m20.5717 17.2858c.79 0 1.4283.6384 1.4283 1.4284s-.6383 1.4283-1.4283 1.4283h-11.43003c-.78834 0-1.42834-.6383-1.42834-1.4283s.64-1.4284 1.42834-1.4284zm-17.14337 0c.79 0 1.42917.6384 1.42917 1.4284s-.63917 1.4283-1.42917 1.4283c-.78833 0-1.42833-.6383-1.42833-1.4283s.64-1.4284 1.42833-1.4284zm17.14337-7.1433c.79 0 1.4283.6392 1.4283 1.4292s-.6383 1.4283-1.4283 1.4283h-11.43003c-.78834 0-1.42834-.6383-1.42834-1.4283s.64-1.4292 1.42834-1.4292zm-17.14337 0c.79 0 1.42917.6392 1.42917 1.4292s-.63917 1.4283-1.42917 1.4283c-.78833 0-1.42833-.6383-1.42833-1.4283s.64-1.4292 1.42833-1.4292zm17.14337-7.1425c.79 0 1.4283.63833 1.4283 1.42833s-.6383 1.42917-1.4283 1.42917h-11.43003c-.78834 0-1.42834-.63917-1.42834-1.42917.00084-.79.64084-1.42833 1.42917-1.42833zm-17.14337 0c.79 0 1.42917.63833 1.42917 1.42833s-.63917 1.43-1.42917 1.43c-.78833-.00083-1.42833-.64-1.42833-1.43s.64-1.42833 1.42833-1.42833z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const OpenNewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12.3369 3.55763c.0451-.89627.7944-1.58554 1.6736-1.53953l6.1462.32164c.8161.04271 1.4683.7076 1.5101 1.53953l.3155 6.26593c.0452.8963-.6309 1.6602-1.5101 1.7062-.8791.046-1.6284-.6433-1.6735-1.5396l-.1317-2.61568-7.4804 7.62608c-.6225.6346-1.6317.6346-2.25417 0s-.62247-1.6635 0-2.2981l7.48037-7.62606-2.5658-.13428c-.8791-.046-1.5552-.80987-1.5101-1.70613zm8.9774 15.19197c0 1.7778-1.4412 3.219-3.2191 3.219h-12.87616c-1.77784 0-3.21905-1.4412-3.21905-3.219v-13.18963c0-1.77783 1.44122-3.21905 3.21905-3.21905h3.21904c.88892 0 1.60952.72061 1.60952 1.60953s-.7206 1.60952-1.60952 1.60952h-3.21904v13.18963h12.87616v-3.3131c0-.8889.7206-1.6095 1.6095-1.6095.889 0 1.6096.7206 1.6096 1.6095z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const OverviewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m18.6532 18.6542c-.325.325-.8316.4883-1.5066.4883-.7042 0-1.5059-.1883-2.3484-.505.6984-.5475 1.3859-1.1392 2.0417-1.7958.6533-.6517 1.2375-1.3359 1.785-2.0317.0442.1158.11.2375.1483.3517.5284 1.5833.4834 2.89-.12 3.4925zm-11.79996.4883c-.675 0-1.18166-.1642-1.50583-.4883-.60417-.6025-.64833-1.9084-.12-3.4925.0375-.1142.10417-.2359.1475-.3517.54667.6958 1.1325 1.38 1.78333 2.0317.6575.6566 1.34417 1.2483 2.0425 1.7958-.84166.3167-1.64333.505-2.3475.505zm-1.625-10.305c-.52916-1.58333-.485-2.88917.11917-3.49167.325-.325.83-.48833 1.50583-.48833.70417 0 1.505.18833 2.3475.505-.69833.5475-1.385 1.13917-2.04166 1.795-.65167.6525-1.2375 1.33667-1.78417 2.0325-.04333-.11583-.11-.23833-.1475-.3525zm11.92166 3.1625c-.6558.9717-1.4392 1.9333-2.3283 2.8217-.9.9008-1.8592 1.6808-2.82 2.3333-.9634-.6525-1.9225-1.4325-2.82252-2.3333-.88917-.8892-1.67167-1.85-2.32917-2.8217.6575-.9717 1.44-1.9333 2.32833-2.8225.89996-.9 1.85916-1.68167 2.82246-2.33167.9609.65 1.9209 1.43167 2.82 2.33167.8892.8892 1.6725 1.8508 2.3292 2.8225zm-.0025-7.1425c.675 0 1.1825.16417 1.5067.48833.6025.6025.6483 1.90834.12 3.49167-.0384.11417-.1042.23667-.1484.3525-.5475-.69583-1.1316-1.38-1.7841-2.03333-.6567-.655-1.3442-1.24667-2.0417-1.79417.8417-.31667 1.6433-.505 2.3475-.505zm3.3242 7.1425c.405-.7575.7641-1.5142 1.0108-2.25833.9042-2.71167.6167-4.99-.81-6.41667-.8642-.86667-2.085-1.325-3.5258-1.325-1.5559 0-3.3417.54833-5.1467 1.51583-1.805-.96666-3.59166-1.51583-5.14666-1.51583-1.44 0-2.65916.45833-3.525 1.325-1.42666 1.4275-1.715 3.70583-.81166 6.41667.2475.74413.60583 1.50083 1.01333 2.25833-.4075.7575-.76667 1.5142-1.01333 2.2575-.90334 2.7125-.615 4.9917.81166 6.4167.86584.8675 2.085 1.3258 3.525 1.3258 1.555 0 3.34166-.5483 5.14746-1.5158 1.8034.9666 3.59 1.5158 5.1459 1.5158 1.4408 0 2.6608-.4583 3.5258-1.325 1.4267-1.4267 1.7142-3.705.81-6.4175-.2467-.7433-.6058-1.5-1.0108-2.2575z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PaintIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m22.0003 11.4141c-.1004-11.304369-11.1037-11.060891-16.78934-6.40002-3.84615 3.16522-5.317726 14.50432 1.80602 16.73042 2.31016.7268 2.59201-.1753 3.02362-1.5568.312-.9985.7022-2.2475 1.9931-3.3128.8231-.6896 2.2559-.6232 3.7827-.5525 2.9397.1361 6.2279.2884 6.1839-4.9083zm-16.32113 5.6348c.23411.3826.63545.5913 1.03679.5913.23411 0 .43478-.0348.602-.1739.56856-.3827.73579-1.1479.40134-1.7392l-.03344-.0348c-.33445-.5913-1.07024-.7652-1.6388-.3826s-.70234 1.1479-.36789 1.7392zm12.14043-5.0087c.0669.6608.5686 1.1478 1.204 1.1478h.0669c.6689-.0696 1.1706-.6609 1.1037-1.3565v-.0696-.0348c-.0669-.6608-.6689-1.1478-1.3378-1.0782-.6354.0695-1.1037.6956-1.0368 1.3913zm-12.17388-.4522c.13378.0348.26756.0696.40134.0696.50167 0 1.00334-.3479 1.13712-.8348.23412-.6609-.10033-1.35655-.73578-1.60002-.63545-.24348-1.30435.10434-1.53846.76521v.03481c-.23412.6261.10033 1.3217.73578 1.5652zm9.63208-3.72175c.2007.13913.4348.2087.6689.2087.4014 0 .7693-.2087 1.0034-.5913.3344-.59131.2006-1.35653-.3679-1.73913l-.0335-.03479c-.5685-.34782-1.2709-.17391-1.6388.41739-.3679.59131-.2006 1.35653.3679 1.73913zm-6.22071-1.32173c.16723.52173.63545.83478 1.13711.83478.1108 0 .2217-.02387.3515-.05184.0269-.00579.0546-.01176.0833-.01773.6355-.24348.9699-.93913.7358-1.6s-.903-1.00869-1.53848-.76521h-.03344c-.63545.24347-.9699.93913-.73579 1.6z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PencilIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m13.4144 6 4.5856 4.5857-9.95735 9.9576-4.0884.4514c-.54731.0605-1.00974-.4023-.94885-.9496l.45491-4.0914zm7.1077-.47944-2.0427-2.04268c-.6371-.63717-1.6705-.63717-2.3077 0l-1.9217 1.9217 4.3504 4.35042 1.9217-1.9217c.6372-.63751.6372-1.67057 0-2.30774z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PlayIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M19.5427 9.71299C21.3396 10.7505 21.3396 13.3441 19.5427 14.3816L6.89773 21.6822C5.10078 22.7196 2.8546 21.4228 2.8546 19.3479L2.8546 4.74675C2.8546 2.67181 5.10078 1.37497 6.89774 2.41244L19.5427 9.71299Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PodcastIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m5.03666 10.8522c.51251.0183.92109.4193.96101.9183l.00255.1168.00044.1828c.01531.6885.18571 1.6057.62783 2.4885.78316 1.5638 2.20547 2.5134 4.58571 2.5969 2.7301.0958 4.4504-.6666 5.4599-1.9712.3259-.4211.5542-.8737.7008-1.3244.0282-.0868.0512-.1658.0695-.2354l.0421-.1798.0185-.1156c.0553-.5495.5457-.9501 1.0952-.8947.5495.0553.9501.5456.8947 1.0951-.0767.7623-.4212 1.8219-1.2391 2.8788-1.1367 1.469-2.8727 2.4274-5.2555 2.6851l-.0013.924 1.001.0008c.5522 0 1 .4477 1 1 0 .5129-.3861.9355-.8834.9933l-.1166.0067h-4.00004c-.55229 0-1-.4477-1-1 0-.5128.38604-.9355.88338-.9932l.11662-.0068.99904-.0008v-.871l-.1745-.008c-2.94807-.1902-4.91745-1.554-5.98428-3.6842-.37658-.7519-.61294-1.5476-.73949-2.3471-.06944-.4386-.09766-.8183-.10067-1.1147l.00144-.1767c.01977-.5519.48323-.9833 1.03516-.9635zm5.14174-8.74976c.3849-.068 1.1957-.02029 2.0375.03843l.5056.03571c.3354.02358.6631.04556.9579.05926 1.319.079 2.426 1.7858 2.3807 4.4442-.0308 1.80785-.0421 2.74853-.0441 3.80146v.6471c.0004.1822.0012.3292.0023.4367.023 1.5111-.5191 3.3964-1.467 3.7293-.4376.1976-1.7443.3194-2.7857.2553-.7982-.047-2.15774-.2241-2.94204-.6081s-1.1882-1.903-1.1703-2.7445c.0117-.942.1799-4.32316.2155-6.00616.0797-2.6608 1.1813-3.878 2.30964-4.0887z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PreviewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.7498 2.00041c4.8325 0 8.75 3.9175 8.75 8.74999 0 1.9642-.655 3.7733-1.7492 5.2333l3.8834 3.885c.4883.4859.4883 1.2809 0 1.7667-.2417.2433-.5617.3642-.8834.3642-.32 0-.64-.1209-.8833-.3634l-3.8833-3.8833c-1.4617 1.0917-3.2692 1.7467-5.2342 1.7467-4.83335.0008-8.75001-3.9159-8.75001-8.7492 0-4.83165 3.91666-8.74999 8.75001-8.74999zm0 2.5c-3.44668 0-6.25001 2.8025-6.25001 6.24999 0 3.4475 2.80333 6.25 6.25001 6.25 3.4458 0 6.25-2.8033 6.25-6.25 0-3.44665-2.8042-6.24999-6.25-6.24999zm-1.75001 3.49167c.22333-.12667.68166-.1225.90333.00833l3.55748 2.13919c.215.1275.34.36.34.61 0 .2508-.1425.4833-.3566.6108l-3.58755 2.14c-.1125.0667-.28583.1008-.41333.1008-.12 0-.33333-.03-.44417-.0916-.2225-.1267-.545-.3642-.545-.6209v-4.27662c0-.25834.3225-.4925.545-.62z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PrivateUserSessionsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.3564 2c1.5175.00328 2.7654.05959 3.3551.19802 1.2681.28936 1.6232 1.60755 2.0544 8.51998.4819 7.877.2781 9.5709-1.1676 10.0853-1.2394.441-3.3562.6093-5.8879.8106l-.5708.0456c-.5773.0463-1.1734.0953-1.7834.1505-2.81531.2251-6.67048.3537-8.72489-.225-1.21742-.3537-1.31887-1.061-1.49641-7.7162l-.00348-.1303c-.07337-2.7504-.12433-4.66021-.13075-6.02614l.00004-.55296c.00836-1.50623.08983-2.24363.28637-2.77512.43117-1.22173 1.95295-1.54324 3.72836-1.86475 1.11233-.20143 6.31756-.51193 10.07126-.51953zm3.1428 5.19947-15.49271 1.15568c.01637 1.28708.06245 3.01455.12591 5.39325l.00179.067c.09105 3.4133.16207 5.0486.32392 5.9018l.00263.0138c.76761.1673 1.90292.2576 3.26301.268 1.49142.0114 3.09275-.0725 4.46275-.1818.87-.0787 1.6602-.1412 2.401-.1999.8576-.0679 1.6491-.1306 2.4216-.207 1.3162-.1301 2.2225-.2729 2.7833-.4464.0351-.1138.0851-.3222.126-.6736.1469-1.2621.0949-3.4668-.1487-7.4489-.0929-1.4893-.1808-2.68305-.2705-3.64193zm-11.14647 2.93623c2.58087-1.8752 6.39687-1.02448 8.52877.9606 1.2696 1.1821 2.1643 2.255 2.1166 2.9255l-.0003.1105c-.0672.9454-1.7348 2.4982-3.3505 3.6722-2.5808 1.8753-6.39694 1.0245-8.52883-.9606-1.26956-1.1821-2.16431-2.255-2.11656-2.9254l.00028-.1104c.06722-.9455 1.73482-2.4983 3.35054-3.6724zm.90454 1.9887c-.90992 1.3477-.88542 4.8225 2.51483 4.8706 3.4002.0482 3.7685-3.7858 1.9417-5.3499-1.293-1.107-3.5466-.8684-4.45653.4793zm3.63903.5174c1.0567.8936.8436 3.0841-1.1232 3.0566-1.96671-.0275-1.98091-2.0128-1.4546-2.7827.5263-.77 1.8299-.9064 2.5778-.2739z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ProjectIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.25954 20.5314c.23026 1.1309 1.57918 1.268 2.7308 1.1994 1.15151-.0685 11.21906.0686 13.52216.2399 2.303.1713 2.8623-.4456 3.1913-.891.2304-.3084.2962-4.0903.2962-5.8381 0-1.7135-.2304-4.691-.5594-6.95284-.1974-1.40511.2632-2.67311-3.3229-2.94722-1.6121-.10278-3.0812-.10278-6.0423-.03433-.296-.78822-1.2946-2.8142-1.9526-3.15687-.98704-.41132-6.54729.13701-7.23818.27412-.75669.17133-.75669.58265-.75669 1.50788v2.98165c0 1.30222-.36187 11.38971.13161 13.61741z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const QuestionMarkIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m21.9985 12.0962c.156-11.337813-12.26789-12.565874-17.33611-6.47453-3.58731 4.31149-3.71983 11.58443.64734 14.61853 4.36716 3.034 16.53287 3.1937 16.68877-8.144zm-8.8773 1.238h-2.3237v-.1495c0-.9268.1764-1.4649 1.0589-2.0629l.6912-.4634c.5736-.3886.8236-.77726.8236-1.40508 0-.7175-.4706-1.16594-1.1472-1.16594-.8236 0-1.4265.46339-1.4265 1.55459h-2.35319c0-1.8984 1.22069-3.37826 3.85329-3.37826 2.0295 0 3.4561 1.01647 3.4561 2.88497 0 1.30052-.6912 2.03292-1.456 2.61592l-.603.4484c-.4412.3439-.5735.5531-.5735.9418zm.3676 2.2571c0 .8371-.6765 1.5397-1.5295 1.5397-.8677 0-1.5295-.7026-1.5295-1.5397s.6618-1.5247 1.5295-1.5247c.853 0 1.5295.6876 1.5295 1.5247z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ReactIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m12 22c5.5228 0 10-4.4772 10-10 0-5.52285-4.4772-10-10-10-5.52285 0-10 4.47715-10 10 0 5.5228 4.47715 10 10 10zm-3.33333-11.6667c.92047 0 1.66663-.74616 1.66663-1.66663 0-.92048-.74616-1.66667-1.66663-1.66667s-1.66667.74619-1.66667 1.66667c0 .92047.7462 1.66663 1.66667 1.66663zm8.33333 3.3334c0 2.7614-2.2386 5-5 5-2.76142 0-5-2.2386-5-5zm0-5.00003c0 .92047-.7462 1.66663-1.6667 1.66663-.9204 0-1.6666-.74616-1.6666-1.66663 0-.92048.7462-1.66667 1.6666-1.66667.9205 0 1.6667.74619 1.6667 1.66667z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const RecordIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M5.72808 6.57665L5.72808 6.57666C4.21821 8.39134 3.44905 10.8031 3.50262 13.081C3.5562 15.3591 4.44354 17.634 6.41174 19.0014C8.31623 20.3245 11.728 20.952 14.6917 20.132C16.2039 19.7135 17.6545 18.9039 18.734 17.5601C19.8183 16.2104 20.467 14.3977 20.4988 12.0859C20.5306 9.7716 19.9186 7.89371 18.8485 6.48004C17.7808 5.06955 16.3051 4.18499 14.7177 3.77414C11.5832 2.96286 7.89555 3.97164 5.72808 6.57665Z\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <path\n d=\"M7.66621 8.21881C9.16184 6.42126 11.7691 5.68812 13.9883 6.26249C15.0878 6.54707 16.077 7.14918 16.787 8.08709C17.4957 9.0234 17.9503 10.3264 17.9266 12.0543C17.9028 13.7834 17.4234 15.0307 16.7129 15.9152C16 16.8027 15.0236 17.3629 13.9441 17.6616C11.7547 18.2675 9.2536 17.7685 7.98327 16.886C6.7448 16.0256 6.1109 14.5403 6.07219 12.894C6.03347 11.2477 6.59545 9.50574 7.66621 8.21881Z\"\n fill=\"currentColor\"\n stroke=\"transparent\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const RedoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m6.87391 20.4397c-1.80165-.6674-3.34245-1.8936-4.39695-3.4997-1.0545-1.6059-1.567498-3.5072-1.46385-5.4256.10365-1.91847.81855-3.7534 2.04-5.23636s2.8854-2.53613 4.74855-3.00542c1.863-.46929 3.82734-.33007 5.60554.39728 1.7783.72735 3.2771 2.00467 4.2772 3.64507.7418 1.21674 1.1804 2.58587 1.2889 3.99293l.642-.536c.6359-.531 1.5818-.4459 2.1128.1899.5309.6359.4459 1.5819-.19 2.1128l-2.996 2.5018c-.5567.4648-1.3662.4648-1.9228 0l-2.996-2.5018c-.6359-.5309-.721-1.4769-.19-2.1128.531-.6358 1.4769-.7209 2.1128-.1899l.385.3215c-.1193-.7805-.3922-1.53458-.8082-2.21675-.6667-1.0936-1.6659-1.94515-2.8514-2.43006-1.1855-.4849-2.49506-.57771-3.73709-.26485-1.242.31287-2.3514 1.01497-3.16575 2.00362-.8142.98864-1.2909 2.21194-1.3599 3.49094-.06915 1.2789.27285 2.5464.9759 3.617.70305 1.0707 1.73025 1.8882 2.9313 2.3331 1.20109.4449 2.51304.4938 3.74384.1394.7961-.2291 1.6273.2304 1.8565 1.0266.2291.796-.2304 1.6272-1.0265 1.8564-1.8463.5314-3.81421.4582-5.61589-.2091z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const RemoveFromChannelIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M5.64571 1.19092C5.19893 0.866257 4.57355 0.965254 4.24889 1.41204C3.92423 1.85882 4.02322 2.48419 4.47 2.80886C5.75625 3.74353 6.95092 5.00735 8.01704 6.20703C6.38757 6.20371 5.0889 6.2273 4.54926 6.28789C2.56844 6.5103 2.31336 7.59249 2.09302 9.25911C1.87267 10.9257 2.11033 17.874 2.37512 19.4659C2.63991 21.0578 3.40531 21.7237 5.61415 21.6844C6.9775 21.6601 10.7551 21.7863 13.8349 21.8892L13.8531 21.8898C15.7549 21.9533 17.3885 22.0078 18.0174 22.0123L18.03 22.0124C19.6724 22.024 21.003 22.0334 21.6139 20.7615C22.2264 19.4863 21.9782 11.1909 21.8801 9.61079C21.7819 8.03071 21.2479 6.89398 19.993 6.61776C19.5898 6.52901 18.0558 6.44028 16.0935 6.36809C17.0728 5.28349 18.2296 4.02372 19.6219 2.73331C20.0269 2.35789 20.051 1.72518 19.6755 1.32012C19.3001 0.915058 18.6674 0.891034 18.2623 1.26646C16.6527 2.7583 15.3356 4.22058 14.2947 5.37616L14.2798 5.39271C14.0913 5.60208 13.9119 5.8013 13.7414 5.98868C13.6467 6.09275 13.5555 6.19241 13.4676 6.28764C12.5521 6.2645 11.613 6.24544 10.7013 6.23164C10.5417 6.0511 10.3732 5.8585 10.1952 5.65501L10.0863 5.5306C8.90401 4.17976 7.37355 2.44649 5.64571 1.19092ZM6.2929 14.9216C5.95119 14.5799 5.90848 14.0524 6.16476 13.6642C6.20137 13.6088 6.24408 13.5562 6.2929 13.5074L9.82843 9.97183C10.219 9.5813 10.8521 9.5813 11.2426 9.97183C11.6332 10.3623 11.6332 10.9955 11.2426 11.386L9.46447 13.1642H16.5858C17.1381 13.1642 17.5858 13.6119 17.5858 14.1642C17.5858 14.7165 17.1381 15.1642 16.5858 15.1642H9.36396L11.2426 17.0429C11.6332 17.4334 11.6332 18.0666 11.2426 18.4571C10.8521 18.8476 10.219 18.8476 9.82843 18.4571L6.2929 14.9216Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ReplaceIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m11.6953 2c-2.36214 0-4.62753.93836-6.29781 2.60864-.58578.58578-.58578 1.53553 0 2.12131.58579.58579 1.53553.58579 2.12133 0 1.10766-1.10768 2.60998-1.72995 4.17648-1.72995s3.0688.62227 4.1765 1.72995c.7623.76237 1.2948 1.7117 1.5527 2.7402l-.5756-.48053c-.6358-.53098-1.5817-.44591-2.1127.18997-.531.63589-.446 1.58181.1899 2.11281l2.9961 2.5017c.5566.4648 1.3662.4648 1.9228 0l2.996-2.5017c.6358-.531.7209-1.47692.19-2.11281-.531-.63588-1.477-.72095-2.1129-.18997l-.4506.37628c-.3144-1.79011-1.1718-3.45466-2.4744-4.75726-1.6702-1.67028-3.9357-2.60864-6.2978-2.60864zm7.4377 16.8867c-1.5536 1.7794-3.7502 2.869-6.1069 3.0288-2.3567.1599-4.68042-.623-6.45992-2.1765-1.32667-1.1582-2.26984-2.6738-2.73018-4.3469l-.17388.2132c-.52381.6417-1.46874.7374-2.11053.2136-.641801-.5238-.737441-1.4687-.21363-2.1105l2.57465-3.1546c.26245-.3216.64644-.52 1.06057-.5481.41414-.02809.82139.1167 1.12487.3999l2.97703 2.778c.60569.5652.63851 1.5143.07332 2.12-.5652.6057-1.51437.6386-2.12005.0734l-.04151-.0389c.34575.8142.87327 1.5482 1.55225 2.141 1.18009 1.03 2.72111 1.5493 4.28401 1.4433 1.5628-.1061 3.0196-.8285 4.0498-2.0087.5448-.624 1.4924-.6883 2.1165-.1435.624.5448.6884 1.4923.1436 2.1165z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ReplyIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m3.43934 7.93934c-.58579.58579-.58579 1.53553 0 2.12136l4.5 4.5c.58579.5857 1.53553.5857 2.12136 0 .5857-.5858.5857-1.5356 0-2.1214l-1.93938-1.9393h.87868c4.9706 0 9 4.0294 9 9 0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5c0-6.6274-5.3726-12-12-12h-.87868l1.93938-1.93934c.5857-.58579.5857-1.53553 0-2.12132-.58583-.58579-1.53557-.58579-2.12136 0z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ScissorsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.03043 13.6607c-.29507.3401-.77967.4312-1.22762.3856-.26063-.0266-.53261-.0225-.83308-.0225-2.20558 0-3.95014 2.0802-3.992 3.992-.04187 1.9117 1.25486 4.1879 3.992 3.992 2.73715-.1959 3.99201-1.7864 3.99201-3.992 0-.3414-.04361-.6694-.125-.982-.10544-.4049-.03782-.8512.25806-1.1471l1.1558-1.1558c.3906-.3905 1.0237-.3905 1.4142 0l1.1558 1.1558c.296.2959.3636.7422.2581 1.1471-.0813.3126-.125.6406-.125.982 0 2.2056 1.2079 4.1121 3.992 3.992 2.1682 0 3.9313-1.7263 3.9905-3.8801.0021-.0742.0111-.1481.0221-.2214.249-1.6525-2.0736-4.0873-4.0126-3.8825-.3396 0-.6661.0432-.9773.1238-.4074.1055-.8563.036-1.152-.2635l-.2823-.286c-.3353-.3396-.3855-.8665-.1187-1.2621 1.2897-1.9126 4.8975-7.29122 5.5061-8.5084.5957-1.19133-.0999-1.55313-.4001-1.64993-.0817-.02633-.1675-.02743-.2521-.01311-.3067.0519-1.1141.23047-1.8398.75302-.8699.6263-7.2522 7.11612-10.39907 10.74312zm-.0647 4.3551c0 1.0978-.33819 2.1849-2.02833 2.2762-1.69015.0913-1.93466-.9724-1.96367-2.2762s.81534-1.7091 1.92989-1.7429 2.06211.6451 2.06211 1.7429zm11.62977-.1c0 1.0978-.6104 1.7735-1.7181 1.7735-1.1078 0-1.6627-.5095-1.6627-1.6073s.4995-1.7181 1.6072-1.7181c1.1078 0 1.7736.4541 1.7736 1.5519zm-16.00097-13.65035c.36312.61452 4.38321 5.68498 5.13739 6.04815.75418.3631 3.01228-2.35364 2.62128-3.13575-.3911-.78212-6.57133-4.945-7.37947-5.13008-.51609-.11819-.77828.15828-.90039.37355-.07895.13919-.07354.30477-.02904.45848.09686.33451.29621.95576.55023 1.38565z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SearchIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m18.1805 10.0368c.1262-9.02516-9.92582-10.002742-14.02641-5.15382-2.90243 3.43213-3.00965 9.22162.52374 11.63682 2.18864 1.496 6.79817 2.1141 10.01977.223.1591.1745.3297.3626.5089.5601l.0011.0012.028.0308c.3639.4012.7527.8439 1.1456 1.2911 1.4196 1.6159 2.8916 3.2914 3.4268 3.2876.9201-.0065 1.8533-.8438 1.8058-1.6624-.0358-.617-3.0505-4.1585-4.5332-5.8655.6663-1.1243 1.0748-2.556 1.0999-4.3489zm-3.0735-.0148c.078-5.63543-6.13398-6.24583-8.66808-3.21812-1.79365 2.14306-1.85991 5.75812.32367 7.26612 1.35254.9342 4.20111 1.3201 6.19201.1393.3521-.2089 1.2447-.8717 1.4727-1.4718.0304-.08.062-.1614.0941-.2443h.0001c.2656-.6842.5717-1.4727.5855-2.4712z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SendIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.08399 13.9107c.0602 3.3015.20898 6.331.4105 7.6243.0499.3202.29259.5164.60534.4312 3.13827-.855 18.95577-8.2148 18.95577-9.9463 0-1.2384-16.56256-9.66456-19.1655-10.02992-.19461-.02731-.34033.09248-.39323.28174-.29629 1.05988-.42832 4.29228-.44124 7.85348l14.16417 1.8946z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SettingsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m6.24843 6.77277c.74955 2.13722 3.90597 2.17402 4.61477.46032.0683-.1408.125-.2811.1707-.42046.6058-.00536 1.1978-.0136 1.7785-.0229.4047-.00648.8032-.01346 1.1969-.02035 2.4581-.04305 4.7202-.08264 7.0401.0237.5014.02298.9266-.36485.9495-.86627.023-.50141-.3648-.92652-.8662-.94951-2.382-.10919-4.7076-.06836-7.1622-.02525-.3921.00689-.7877.01383-1.1872.02023-.57.00912-1.1495.01719-1.7411.02251-.1944-.59562-.5734-1.11691-1.05139-1.50894-.92757-.76087-3.35974-.86696-3.825 1.46603-1.01999-.03054-2.08381-.07744-3.2008-.14657-.50098-.031-.93224.34999-.96324.85097-.03101.50098.34999.93224.85097.96325 1.18803.07352 2.31663.12231 3.39569.15324zm-4.2483 5.54683c0-.5019.4069-.9088.90884-.9088 1.40629 0 2.64238-.0161 3.88561-.0323 1.96291-.0254 3.94372-.0511 6.64042-.0143.5017-2.38934 3.3463-2.2812 4.2812-1.51432.5667.46472.9111 1.01612 1.0122 1.64502.7524.0257 1.5502.0552 2.3993.0894.5015.0202.8917.443.8716.9445-.0202.5016-.4431.8919-.9447.8717-.9361-.0376-1.8091-.0697-2.6268-.097-.0222.0498-.0455.0999-.0699.1503-.7019 1.6972-3.9734 1.7795-4.8058-.2702-2.7348-.0393-4.72571-.0135-6.71331.0124-1.24973.0162-2.49855.0325-3.92982.0325-.50194 0-.90884-.4069-.90884-.9089zm0 6.1328c-.00116-.5019.40481-.9097.90675-.9109 1.07677-.0025 2.10118-.0058 3.08174-.0089.11298-.0004.2258-.0008.33762-.0011.05692-.1747.12895-.3528.21677-.5339.73063-1.7666 3.87449-1.7897 4.45259.5249 3.676.0025 6.8235.0408 10.1372.1927.5014.0229.8892.4481.8662.9495-.0229.5014-.4481.8892-.9495.8663-3.2903-.1508-6.4125-.1885-10.0872-.1907-.5634 2.1212-2.87808 1.9991-3.77763 1.2612-.42273-.3467-.72861-.77-.89095-1.2522-.09774.0003-.19592.0006-.29455.001-.98121.003-2.00765.0064-3.0881.0089-.50195.0011-.90979-.4048-.91094-.9068z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ShareIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.6913 7.39911c.578 0 1.0471.46807 1.0471 1.04714 0 .57802-.4691 1.04714-1.0471 1.04714h-6.59702v9.31951h15.39302v-5.7592c0-.5791.468-1.0472 1.0471-1.0472s1.0471.4681 1.0471 1.0472v6.8064c0 .5791-.468 1.0471-1.0471 1.0471h-17.48726c-.57907 0-1.04714-.468-1.04714-1.0471v-11.41385c0-.57907.46807-1.04714 1.04714-1.04714zm5.8803-4.34459 4.7121 1.57071c.288.09529.5194.31205.6367.59268.1162.27959.1047.59687-.0314.86913l-2.4074 4.81686c-.1833.3675-.5539.5791-.9382.5791-.1571 0-.3173-.0356-.4671-.11-.5173-.2597-.7277-.888-.4691-1.40526l1.1889-2.37891c-4.0996 1.68797-6.3249 4.53987-6.3249 8.18697 0 .5791-.4681 1.0472-1.0471 1.0472-.5791 0-1.0472-.4681-1.0472-1.0472 0-4.4699 2.7028-8.04278 7.5143-10.07421l-1.9824-.66064c-.5477-.18221-.844-.77594-.6608-1.32464.1822-.54765.7717-.84609 1.3236-.66179z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SoapboxIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m15.7829 19.9195c1.7831-.0396 2.688-.079 3.4524-.079 2.4101 0 2.4643-.5698 2.6291-2.2998.0161-.1681.0331-.3472.0535-.5377.1341-1.2162.0766-8.54397.0191-10.16543-.0064-.2209-.008-.42798-.0095-.62158-.0121-1.52821-.0174-2.21601-2.3473-2.21601-1.7437 0-4.6496.06881-7.1831.115-1.2804.02334-2.2443.04093-2.46946.04093-.67064.03118-.99638 1.029-1.0347 1.96448-.02098.51212-.02473 2.03357-.02069 3.53602-2.0997-1.99934-5.23506-4.27551-5.94338-4.62817-.23692-.17101-.5951.06006-.65895.36744-.51522 2.4804-.24785 10.79872.42166 14.00882.10701.5131.5848.5653.89181.352 1.82324-1.2674 3.87556-3.4426 5.27447-5.2548-.03781 1.4028-.06521 3.1549.15005 4.1851.21076 1.1226 1.20719 1.3097 2.05019 1.3097.4981.0169 2.6193-.0302 4.7248-.077z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SortIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2 6.28572C2 5.49674 2.63959 4.85715 3.42857 4.85715H20.5714C21.3604 4.85715 22 5.49674 22 6.28572C22 7.0747 21.3604 7.71429 20.5714 7.71429H3.42857C2.63959 7.71429 2 7.0747 2 6.28572ZM2 12C2 11.211 2.63959 10.5714 3.42857 10.5714H14.8571C15.6461 10.5714 16.2857 11.211 16.2857 12C16.2857 12.789 15.6461 13.4286 14.8571 13.4286H3.42857C2.63959 13.4286 2 12.789 2 12ZM3.42857 16.2857C2.63959 16.2857 2 16.9253 2 17.7143C2 18.5033 2.63959 19.1429 3.42857 19.1429H7.71429C8.50326 19.1429 9.14286 18.5033 9.14286 17.7143C9.14286 16.9253 8.50326 16.2857 7.71428 16.2857H3.42857Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SparkleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m18.4814 8.67568-.6644 2.03912c-.1208.3764-.7329.3834-.8658.0139l-.8174-2.24473c-.1531-.4148-.4953-.75988-.9463-.9481l-1.9289-.80868c-.3584-.14988-.3342-.59953.0403-.72153l1.9449-.62742c.5316-.1708.9423-.54725 1.1074-1.01433l.741-2.08443c.1328-.38343.7651-.366.8738.0244l.5798 2.10534c.1289.46359.4954.85399.9947 1.05964l2.2027.90279c.3785.15337.3342.63091-.0685.73199l-1.9409.48103c-.6081.14988-1.0792.56467-1.2524 1.09101zm-11.00752 2.19872 1.03356-3.39854c.18792-.62742 1.14004-.63904 1.34675-.02324l1.27161 3.74128c.238.6913.7705 1.2665 1.472 1.5802l3.0005 1.3478c.5575.2498.5199.9992-.0627 1.2025l-3.0255 1.0457c-.8268.2847-1.4658.9121-1.7226 1.6906l-1.15255 3.474c-.20671.6391-1.19015.61-1.35928-.0406l-.90201-3.5089c-.20045-.7727-.77047-1.4234-1.54721-1.7661l-3.4264-1.5047c-.58881-.2556-.51991-1.0515.10649-1.2199l3.01924-.8018c.94586-.2498 1.67875-.9411 1.9481-1.8183z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SpinnerIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12 5.33333c-3.6819 0-6.66667 2.98475-6.66667 6.66667 0 3.6819 2.98477 6.6667 6.66667 6.6667s6.6667-2.9848 6.6667-6.6667c0-.9205.7461-1.6667 1.6666-1.6667s1.6667.7462 1.6667 1.6667c0 5.5228-4.4772 10-10 10-5.52285 0-10-4.4772-10-10 0-5.52283 4.47715-10 10-10 .9205 0 1.6667.74617 1.6667 1.66667s-.7462 1.66666-1.6667 1.66666z\"\n fill=\"currentColor\"\n >\n <animateTransform\n attributeName=\"transform\"\n dur=\"1.5s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n type=\"rotate\"\n values=\"0 12 12;360 12 12\"\n />\n </path>\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const StatsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.5566 10.0643c-.0138-1.76364-.0349-4.48222.0778-6.10188.0712-1.21794.7119-1.9487 2.3848-1.9487 1.4949-.09744 1.8509.34102 2.0644.77948 1.1747 2.63075.9255 14.9563.8187 16.9537-.0103.1819-.0095.3498-.0088.5049.0044.9247.0067 1.3953-2.3404 1.6874-2.3136.2923-2.5627-.4872-2.634-1.9487-.0711-1.1692-.3203-7.0153-.3558-8.7692 0-.2944-.0032-.6926-.0067-1.157zm-14.48339-1.50187c-.14486 1.45517-.03621 4.88197 0 5.86777.03621 1.2674.32593 5.3514.39835 6.1963.07243 1.0797.18107 1.5491 2.57119 1.3144 2.38974-.2414 2.38569-.931 2.38125-1.6846-.00073-.1258-.00149-.2533.00887-.3809.10864-1.4552-.21728-8.872-.39835-9.9986-.06291-.39135-.10395-.76005-.13985-1.08248-.06745-.60575-.11671-1.04819-.25851-1.17073-.28971-.28165-.76049-.70413-2.49876-.61025-1.77448.14083-1.95554.70413-2.06419 1.54909zm12.34129 3.27277c.1806.8473.2413 2.5838.2777 3.6225.0093.2658.0171.4859.0247.6338.0379.9189-.0378 3.9177-.0755 4.5464-.0379.7739-.1513 1.3059-2.6088 1.3543-2.49154.0828-2.51834-.5076-2.54541-1.104-.00455-.1004-.00912-.201-.02546-.2986-.18904-1.0157-.37808-7.8354.18903-8.9479.18904-.3385.64274-.7255 2.45744-.8706s2.155.4837 2.3063 1.0641z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SwitchAccountsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m19.9646 3.56989c1.8831 1.70948 2.0107 4.32673 2.0173 6.99611l-.0001.9022c0 .5142.0048 1.0139.0095 1.4974.0315 3.247.0561 5.7743-1.4399 7.1725-1.292 1.2075-3.7521 1.737-6.1439 1.8298-.7898.0306-2.3731.0535-3.3766 0-2.50856-.1338-5.72463-.3411-7.52574-1.8764-1.58915-1.3545-1.45707-4.3243-1.46202-6.8769-.00066-.3406-.0013-.6675-.00565-.9747-.00365-.2567-.0094-.5236-.01531-.7981-.05418-2.51434-.12193-5.65891 1.29137-7.39433 1.56755-1.92485 6.85845-2.02051 8.54555-2.02051.1646 0 .3708-.00475.6101-.01026 1.8411-.04241 5.6413-.12995 7.4954 1.55319zm-13.46158 6.43131c-.27704.0188-.53391.1518-.70948.3673l-1.99272 2.4455c-.35041.43-.28643 1.0632.14291 1.4142s1.06144.2869 1.41186-.1431l.33308-.4088c.31302 1.3863 1.05786 2.648 2.14023 3.5944 1.3458 1.1767 3.1031 1.7698 4.8856 1.6487 1.7824-.1211 3.4436-.9464 4.6185-2.2944.3644-.4182.3215-1.0531-.0961-1.4182-.4174-.365-1.0513-.322-1.4157.0962-.8248.9464-1.9912 1.5258-3.2425 1.6109-1.2514.085-2.4852-.3314-3.43001-1.1576-.70847-.6194-1.21095-1.4312-1.45381-2.327l.49561.4632c.40517.3787 1.04013.3567 1.41822-.0492.3781-.4058.35612-1.0418-.04906-1.4205l-2.30414-2.1536c-.20301-.1898-.47546-.28678-.75249-.268zm5.45468-5.37285c-1.7866 0-3.49982.71082-4.76304 1.97611-.39187.39251-.39187 1.02889 0 1.42141.39187.3925 1.02721.3925 1.41908 0 .8869-.88831 2.08976-1.38736 3.34396-1.38736s2.457.49905 3.3438 1.38736c.6097.61063 1.0357 1.3708 1.2424 2.19443l-.3233-.30964c-.4006-.3836-1.0358-.36931-1.4187.03186-.383.40118-.3688 1.03748.0318 1.42108l2.0251 1.9394c.388.3715.9991.3715 1.387 0l2.0251-1.9394c.4006-.3836.4149-1.0199.0319-1.42108-.383-.40117-1.0181-.41546-1.4187-.03186l-.2948.28234c-.2399-1.35029-.8873-2.60548-1.8687-3.58853-1.2633-1.2653-2.9765-1.97612-4.7629-1.97612z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const TagIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.11263 5.04041c-.18667 1.92432.04424 9.01979.00001 11.01579-.04423 1.9961.12249 4.3531.29625 5.0481.15491.6196 1.84727 1.5368 3.03625.3225 1.18899-1.2142 2.57456-2.7822 4.57456-4.1325 2.0186 1.5231 3.2093 2.9179 4.4324 4.1325 1.2231 1.2147 3.0966.6257 3.2493-.3225.3224-1.8964.2206-6.4423.2546-7.8088.0339-1.7012-.1019-7.13954-.1528-8.25509-.0339-1.11555.0771-1.94224-.6526-2.22113-3.0546-1.17133-9.17301-1.09763-12.39732-.53985-2.90187.502-2.52186 1.56177-2.64065 2.76098z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const TeamIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2 4a2 2 0 012-2h8a2 2 0 012 2v18H2V4zm5.5 3a1.5 1.5 0 100 3h1a1.5 1.5 0 100-3h-1zm0 7a1.5 1.5 0 000 3h1a1.5 1.5 0 000-3h-1zm8.5-4h5a1 1 0 011 1v11h-6V10z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ThumbsDownIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m17.2519 13.3364-3.0265-11.67337c-.0339-.00525-.0679-.01016-.102-.01475-2.9405-.39243-6.71014-.39244-8.53416-.21004-2.95711.29848-2.5315 2.75261-2.5315 2.75261-1.58081 1.62503-.6467 3.6425-.6467 3.6425-2.023 2.24965-.4643 3.95755-.4643 3.95755-1.835066 1.6858-.45876 3.5817 1.111 3.7144 1.19943.105 4.08468.0663 5.3836.0442.33164-.0055.58591.2985.5251.6246-.87331 4.9193 1.00597 8.1196 3.03446 7.8045 1.0853-.1713 1.0845-1.7357 1.0838-3.0809-.0003-.6075-.0006-1.1702.0991-1.5399.3316-1.2326 1.614-2.9405 2.9295-4.444.4315-.4931.8118-1.0216 1.1386-1.5774zm-1.9146-11.36956c.0096.00386.0193.00776.0289.01168-.015-.10585-.0277-.20524-.0379-.29704-.0884-.818045.0608-.912012 1.4979-1.298924 1.4371-.38691271 1.8185-.4864 2.1004-.270833.1495.114118.2991.595245.4945 1.223977.079.25439.1656.53295.2627.82114.3372 1.00044 2.0341 7.87086 2.2054 9.24716.0154.1205.0372.2305.0575.3323.1255.6317.1892.952-1.7433 1.547-1.043.3216-1.5483.4667-1.8348.3757z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ThumbsUpIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m5.81817 10.6635 3.02644 11.6734c.0339.0053.06791.0102.10202.0148 2.94057.3924 6.71017.3924 8.53417.21 2.9571-.2985 2.5315-2.7526 2.5315-2.7526 1.5808-1.625.6467-3.6425.6467-3.6425 2.023-2.2496.4643-3.9576.4643-3.9576 1.8351-1.6858.4588-3.58165-1.111-3.71431-1.1994-.10502-4.0847-.06633-5.3836-.04422-.3316.00553-.5859-.29848-.5251-.62459.8733-4.91931-1.006-8.119626-3.0345-7.8045688-1.08524.1713558-1.08442 1.7357188-1.08372 3.0809688.00032.60744.00061 1.1702-.09912 1.53987-.33164 1.23259-1.61397 2.94053-2.92947 4.44396-.43149.49313-.81189 1.02159-1.13862 1.57739zm1.91462 11.3696c-.00967-.0038-.01932-.0077-.02895-.0117.01497.1059.02772.2053.03792.2971.08843.818-.06082.912-1.49792 1.2989s-1.81848.4864-2.10037.2708c-.14954-.1141-.29907-.5952-.49448-1.2239-.07906-.2544-.16564-.533-.26276-.8212-.33717-1.0004-2.03406-7.8709-2.20541-9.2472-.01535-.1205-.0372-.2304-.05744-.3323-.12554-.6316-.189207-.952 1.74328-1.547 1.04301-.3216 1.54824-.4667 1.83482-.3757z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const TriangleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m20.2254 20.7499h-16.26331c-.7475 0-1.30834-.37-1.6825-.9258-.37334-.5559-.37334-1.2967 0-1.8517l8.03831-13.88917c.7484-1.11083 2.8042-1.11083 3.365 0l8.0375 13.88917c.3734.555.3734 1.2958 0 1.8517-.3741.5558-.935.9258-1.4958.9258zm-12.89831-3.7033h9.71921l-5.0459-8.33337-4.67248 8.33337z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UndoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.2028 20.4397c1.8016-.6674 3.3424-1.8936 4.3969-3.4997 1.0545-1.6059 1.5675-3.5072 1.4639-5.4256-.1037-1.91847-.8185-3.7534-2.04-5.23636s-2.8854-2.53613-4.7486-3.00542c-1.863-.46929-3.8273-.33007-5.60553.39728-1.77825.72735-3.27706 2.00467-4.27719 3.64507-.74181 1.21674-1.18038 2.58587-1.28892 3.99293l-.64191-.536c-.63589-.531-1.58182-.4459-2.11279.1899-.530981.6359-.44593 1.5819.18996 2.1128l2.99601 2.5018c.55666.4648 1.36615.4648 1.92282 0l2.99601-2.5018c.63594-.5309.72094-1.4769.18997-2.1128-.53098-.6358-1.47691-.7209-2.11281-.1899l-.385.3215c.11931-.7805.39223-1.53458.80815-2.21675.66674-1.0936 1.66595-1.94515 2.85143-2.43006 1.1855-.4849 2.4951-.57771 3.7371-.26485 1.242.31287 2.3514 1.01497 3.1657 2.00362.8142.98864 1.2909 2.21194 1.3599 3.49094.0692 1.2789-.2728 2.5464-.9759 3.617-.703 1.0707-1.7302 1.8882-2.9313 2.3331-1.201.4449-2.513.4938-3.7438.1394-.7961-.2291-1.62728.2304-1.85645 1.0266-.22918.796.2304 1.6272 1.02645 1.8564 1.8463.5314 3.8142.4582 5.6159-.2091z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UnlockIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m18.4 8.86859h-.3298c.1092-2.46877-1.1518-4.89701-3.4269-6.11864-2.6473-1.42146-5.82043-.75428-7.72874 1.42683-.59024.67464-.27474 1.6864.50816 2.10678.78292.42037 1.74028.0553 2.47566-.44737.94172-.64368 2.18772-.75397 3.26102-.1777 1.1838.63567 1.8185 1.92477 1.7035 3.2101h-9.26289c-.88367 0-1.60001.73488-1.60001 1.64141v9.8486c0 .9065.71634 1.6414 1.60001 1.6414h12.79999c.8837 0 1.6-.7349 1.6-1.6414v-9.8486c0-.90653-.7163-1.64141-1.6-1.64141zm-6.4 9.84861c1.7674 0 3.2-1.4698 3.2-3.2829s-1.4326-3.2828-3.2-3.2828c-1.7673 0-3.19998 1.4697-3.19998 3.2828s1.43268 3.2829 3.19998 3.2829z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UploadIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m15.4036 20.3766c0 .8975-.7301 1.625-1.6307 1.625h-3.2614c-.9006 0-1.63067-.7275-1.63067-1.625l.07361-5.3782h-2.17666c-1.50644 0-2.20732-1.8615-1.07251-2.849l5.43783-4.73245c.6145-.53462 1.5309-.53462 2.1453 0l5.438 4.73245c1.1347.9875.4338 2.849-1.0727 2.849h-2.1765zm4.9657-15.12818c.9006 0 1.6307-.72751 1.6307-1.625s-.7301-1.625-1.6307-1.625h-16.73859c-.90064 0-1.63071.72751-1.63071 1.625s.73007 1.625 1.63071 1.625z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UsersPermissionsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m11.9795 11.586c5.5082.0762 6.1048-5.99821 3.1455-8.47622-2.0947-1.75393-5.74531-1.37583-7.21932.75941s-1.43432 7.64051 4.07382 7.71681zm-9.91151 9.511c.04238.425.50422.7755 1.01871.7622l17.7118.1408c.6229.0035 1.1358-.382 1.161-.843.1556-1.6495-.1357-3.3218-.8998-4.7419-1.8017-3.4404-12.22326-5.5665-16.7581-1.992-2.15941 1.711-2.47302 4.4518-2.23361 6.6739z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ViewStreamIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m18.9737 7.86457c1.8137 1.68881 3.0919 3.22143 3.0237 4.17933.0942 1.3301-2.3864 3.6597-4.787 5.4039-3.6869 2.679-9.13851 1.4637-12.1841-1.3722-1.81366-1.6888-3.0919-3.2215-3.0237-4.1793-.09423-1.3301 2.38644-3.65971 4.78695-5.40395 3.68695-2.67898 9.13855-1.46365 12.18415 1.37222zm-4.5254.78409c-1.8472-1.58151-5.06662-1.24058-6.36652.68474-1.29991 1.9253-1.26491 6.8893 3.59262 6.9581 4.8576.0688 5.3837-5.4084 2.7739-7.64284zm-2.7724 5.79044c2.8097.0393 3.1141-3.09 1.6045-4.3666-1.0685-.90364-2.9307-.70885-3.68257.3912-.7519 1.1-.73165 3.9362 2.07807 3.9754z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const WandIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m14.48 4.5c-.6775 0-1.23-.55333-1.23-1.23v-.04c0-.67583.5525-1.23 1.23-1.23s1.23.55333 1.23 1.23v.04c0 .67667-.5525 1.23-1.23 1.23zm5 1.25c-.6775 0-1.23-.55333-1.23-1.23v-.04c0-.67667.5525-1.23 1.23-1.23s1.23.55333 1.23 1.23v.04c0 .67667-.5525 1.23-1.23 1.23zm.0583 3.73083v-.03916c0-.6775.5542-1.23084 1.23-1.23084.6775 0 1.2317.55334 1.2317 1.23084v.03916c0 .67587-.5542 1.22997-1.2317 1.22997-.6758 0-1.23-.5541-1.23-1.22997zm-.0583 3.76917c.6775 0 1.23.5542 1.23 1.23v.04c0 .6767-.5525 1.23-1.23 1.23s-1.23-.5542-1.23-1.23v-.04c0-.6767.5525-1.23 1.23-1.23zm-9.96083-7.5c-.6775 0-1.23-.55333-1.23-1.23v-.04c0-.67667.5525-1.23 1.23-1.23.67753 0 1.23003.55333 1.23003 1.23v.04c0 .67667-.5525 1.23-1.23003 1.23zm-.01917 3.73083v.03834c0 .67663-.55417 1.23163-1.23 1.23163-.6775 0-1.23167-.555-1.23167-1.23163v-.03834c0-.6775.55417-1.23 1.23167-1.23.67583-.00083 1.23.5525 1.23 1.23zm4.98 5.01917c.6775 0 1.23.5542 1.23 1.23v.04c0 .6758-.5525 1.23-1.23 1.23s-1.23-.5542-1.23-1.23v-.04c0-.6758.5525-1.23 1.23-1.23zm-1.23-5c0 .6883.5608 1.25 1.25 1.25.6883 0 1.25-.5617 1.25-1.25 0-.69-.5617-1.25-1.25-1.25-.6892 0-1.25.56-1.25 1.25zm-10.885 12.135c-.48667-.4867-.48667-1.2817 0-1.7675l8.76-8.76c-.2333-.4892-.375-1.03-.375-1.6075 0-2.07167 1.6783-3.75 3.75-3.75 2.0708 0 3.75 1.67833 3.75 3.75 0 2.0717-1.6792 3.75-3.75 3.75-.5775 0-1.1192-.1417-1.6083-.375l-8.75837 8.76c-.2425.2425-.56416.365-.88333.365-.32083 0-.64167-.1225-.88417-.365z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ZoomInIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.34613 4.96934c4.1006-4.848919 14.15257-3.87134 14.02637 5.15386-.0251 1.7929-.4336 3.2246-1.0999 4.3489 1.4827 1.707 4.4974 5.2485 4.5332 5.8655.0475.8186-.696 1.5695-1.6161 1.576-.6833.0048-3.0833-2.6413-4.7621-4.4923-.1897-.2092-.3703-.4082-.538-.5921-3.2216 1.8911-7.83109 1.273-10.01973-.2231-3.53338-2.4152-3.42617-8.20463-.52374-11.63676zm4.93672 1.64027c0-.55228.44772-1 1.00005-1 .5522 0 1 .44772 1 1v2.43714h2.437c.5523 0 1 .44771 1 .99995 0 .5523-.4477 1-1 1h-2.437v2.4371c0 .5523-.4478 1-1 1-.55233 0-1.00005-.4477-1.00005-1v-2.4371h-2.4371c-.55229 0-1-.4477-1-1 0-.55224.44771-.99995 1-.99995h2.4371z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ZoomOutIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.34613 4.96934c4.10059-4.848919 14.15257-3.87134 14.02637 5.15386-.0251 1.7929-.4336 3.2246-1.0999 4.3489 1.4827 1.707 4.4974 5.2485 4.5332 5.8655.0475.8186-.696 1.5695-1.6161 1.576-.6833.0048-3.0833-2.6413-4.7621-4.4923-.1898-.2092-.3703-.4082-.538-.5921-3.2216 1.8911-7.83109 1.273-10.01973-.2231-3.53339-2.4152-3.42617-8.20463-.52374-11.63676zm1.49962 5.07736c0 .5523.44771 1 1 1h6.87415c.5523 0 1-.4477 1-1 0-.55224-.4477-.99995-1-.99995h-6.87415c-.55229 0-1 .44771-1 .99995z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const GroupRecordIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M 7.6660156 13.333984 C 4.6033687 13.333984 1.8196082 15.261562 0.73828125 18.130859 C 0.52228147 18.702859 0.54974052 19.324766 0.81640625 19.884766 C 1.091068 20.460765 1.5970887 20.908628 2.2050781 21.111328 C 3.9717464 21.700628 5.8100275 22 7.6660156 22 C 9.4455743 22 11.208675 21.721851 12.908203 21.179688 C 12.33347 20.258643 12 19.170101 12 18 C 12 17.017544 12.235211 16.092267 12.650391 15.275391 C 11.311039 14.056643 9.5409138 13.333984 7.6660156 13.333984 z \"\n fill=\"currentColor\"\n id=\"path1080\"\n />\n <path\n d=\"M 16 10 C 14.110702 10 12.33098 10.736657 10.988281 11.972656 C 12.030725 12.37129 12.995063 12.950091 13.835938 13.675781 C 14.913535 12.638129 16.378956 12 18 12 C 19.911892 12 21.607843 12.886783 22.705078 14.271484 C 21.496969 11.695436 18.871278 10 16 10 z \"\n fill=\"currentColor\"\n id=\"path1078\"\n />\n <path\n d=\"M 11.3332,8.3333 C 11.3332,10.3583 9.69162,12 7.66659,12 5.64155,12 3.99993,10.3583 3.99993,8.3333 c 0,-2.02504 1.64162,-3.66666 3.66666,-3.66666 2.02503,0 3.66661,1.64162 3.66661,3.66666 z\"\n fill=\"currentColor\"\n id=\"path1076\"\n />\n <path\n d=\"m 19.6666,4.99997 c 0,2.02504 -1.6417,3.66666 -3.6667,3.66666 -2.025,0 -3.6667,-1.64162 -3.6667,-3.66666 0,-2.02504 1.6417,-3.66666 3.6667,-3.66666 2.025,0 3.6667,1.64162 3.6667,3.66666 z\"\n fill=\"currentColor\"\n id=\"path90\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M13.2 18C13.2 15.3534 15.3534 13.2 18 13.2C20.6466 13.2 22.8 15.3534 22.8 18C22.8 20.6466 20.6466 22.8 18 22.8C15.3534 22.8 13.2 20.6466 13.2 18ZM14.1 18C14.1 20.1504 15.8496 21.9 18 21.9C20.1504 21.9 21.9 20.1504 21.9 18C21.9 15.8496 20.1504 14.1 18 14.1C15.8496 14.1 14.1 15.8496 14.1 18ZM21 18C21 19.6569 19.6568 21 18 21C16.3431 21 15 19.6569 15 18C15 16.3432 16.3431 15 18 15C19.6568 15 21 16.3432 21 18Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n id=\"path94\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const InviteToRecordIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <g\n clipPath=\"url(#clip0_23610_312)\"\n id=\"g8\"\n >\n <path\n d=\"M 3.8007812 2 C 2.8071822 2 2 2.8071822 2 3.8007812 L 2 5.5996094 L 2 15.199219 C 2 17.186417 3.6124214 18.800781 5.5996094 18.800781 L 12.054688 18.800781 C 12.019999 18.538708 12 18.271851 12 18 C 12 14.676003 14.676003 12 18 12 C 18.271851 12 18.538708 12.019999 18.800781 12.054688 L 18.800781 7.4003906 C 18.800781 6.4067916 17.993599 5.5996094 17 5.5996094 L 10.400391 5.5996094 L 8.3554688 2.5332031 C 8.133479 2.1996035 7.7582215 2 7.3574219 2 L 3.8007812 2 z \"\n fill=\"currentColor\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M13.2 18C13.2 15.3534 15.3534 13.2 18 13.2C20.6466 13.2 22.8 15.3534 22.8 18C22.8 20.6466 20.6466 22.8 18 22.8C15.3534 22.8 13.2 20.6466 13.2 18ZM14.1 18C14.1 20.1504 15.8496 21.9 18 21.9C20.1504 21.9 21.9 20.1504 21.9 18C21.9 15.8496 20.1504 14.1 18 14.1C15.8496 14.1 14.1 15.8496 14.1 18ZM21 18C21 19.6569 19.6568 21 18 21C16.3431 21 15 19.6569 15 18C15 16.3432 16.3431 15 18 15C19.6568 15 21 16.3432 21 18Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n id=\"path6\"\n />\n </g>\n <defs id=\"defs13\">\n <clipPath id=\"clip0_23610_312\">\n <rect\n fill=\"white\"\n height=\"23.9999\"\n id=\"rect10\"\n width=\"23.9999\"\n />\n </clipPath>\n </defs>\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CollectionIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n {...props}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.00037 13.111C8.61387 13.1112 9.11072 13.6088 9.11072 14.2224C9.11066 14.8358 8.61383 15.3335 8.00037 15.3337C7.38675 15.3337 6.88909 14.836 6.88904 14.2224C6.88904 13.6087 7.38672 13.111 8.00037 13.111ZM4.4447 13.3337C4.93552 13.3338 5.33337 13.7315 5.33337 14.2224C5.33332 14.7132 4.93549 15.1109 4.4447 15.111C3.95382 15.111 3.55608 14.7132 3.55603 14.2224C3.55603 13.7314 3.95378 13.3337 4.4447 13.3337ZM11.556 13.3337C12.0468 13.3339 12.4447 13.7316 12.4447 14.2224C12.4446 14.7131 12.0467 15.1108 11.556 15.111C11.0651 15.111 10.6664 14.7132 10.6664 14.2224C10.6664 13.7314 11.0651 13.3337 11.556 13.3337ZM12.6664 1.77802C14.0164 1.77802 15.1107 2.87232 15.1107 4.22235V9.55536C15.1107 10.9054 14.0164 11.9997 12.6664 11.9997H3.33337C1.98335 11.9997 0.889038 10.9054 0.889038 9.55536V4.22235C0.889038 2.87232 1.98335 1.77802 3.33337 1.77802H12.6664Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PlaylistIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n {...props}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.4127 11.582C13.8595 11.5821 14.2223 11.9801 14.2223 12.4707C14.2222 12.9612 13.8595 13.3593 13.4127 13.3594H5.23401C4.78722 13.3594 4.42455 12.9613 4.42444 12.4707C4.42444 11.98 4.78715 11.582 5.23401 11.582H13.4127ZM2.15588 5.62109C2.38676 5.51013 2.6605 5.54203 2.86096 5.70215L5.08362 7.47949C5.24149 7.60572 5.33362 7.79739 5.33362 8C5.3336 8.20261 5.24152 8.39421 5.08362 8.52051L2.86096 10.2979C2.6605 10.4579 2.38677 10.4899 2.15588 10.3789C1.92451 10.2682 1.77795 10.0334 1.77795 9.77734V6.22266C1.77795 5.96657 1.92451 5.73176 2.15588 5.62109ZM13.4127 7.33301C13.8596 7.33301 14.2223 7.73199 14.2223 8.22266C14.2221 8.71312 13.8594 9.11133 13.4127 9.11133H7.4762C7.02948 9.11132 6.66684 8.71312 6.66663 8.22266C6.66663 7.732 7.02935 7.33302 7.4762 7.33301H13.4127ZM13.4127 2.66699C13.8595 2.66704 14.2223 3.06503 14.2223 3.55566C14.2222 4.04625 13.8595 4.44428 13.4127 4.44434H5.23401C4.78718 4.44434 4.42449 4.04628 4.42444 3.55566C4.42444 3.065 4.78715 2.66699 5.23401 2.66699H13.4127Z\"\n fill=\"currentColor\"\n id=\"Vector\"\n />\n </svg>\n);\n","import type { ReactNode, MouseEvent, AriaAttributes, ComponentPropsWithRef } from 'react';\nimport { styled, css } from 'styled-components';\nimport { darken, transparentize } from 'polished';\nimport type { iconMap } from '../Icon/iconMap';\nimport type { TextAlignValues } from './Button';\n\nconst hoverDarken = '0.04';\nconst activeDarken = '0.08';\nconst hoverTransparency = 0.9;\nconst activeTransparency = 0.8;\n\n// this style removes default styles applied by various browsers\nexport const buttonResetStyle = css`\n align-items: center;\n background-color: transparent;\n background-image: none;\n border: none;\n box-shadow: none;\n color: inherit;\n cursor: pointer;\n display: inline-flex;\n font: inherit;\n justify-content: center;\n line-height: 1;\n padding: 0;\n text-align: left;\n vertical-align: middle;\n\n /*\n * Fixes input types in iOS. Higher specificity for Safari to deal with\n * Normalize defaults\n */\n &,\n &[type='button'],\n &[type='reset'],\n &[type='submit'] {\n appearance: none;\n }\n\n /* Normalize focus behavior of Firefox */\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n\n /* add some default affordance for a focused button */\n &:focus {\n outline: thin dotted #999999;\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n }\n`;\n\nconst primaryHoverStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => darken(hoverDarken, $buttonColor)};\n border-color: ${({ $buttonColor }) => darken(hoverDarken, $buttonColor)};\n`;\n\nconst primaryActiveStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => darken(activeDarken, $buttonColor)};\n border-color: ${({ $buttonColor }) => darken(activeDarken, $buttonColor)};\n`;\n\nconst primaryFocusStyle = css`\n box-shadow: inset 0 0 0 1px white;\n`;\n\nconst primaryStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => $buttonColor};\n border-color: ${({ $buttonColor }) => $buttonColor};\n color: white;\n\n &:focus-visible {\n ${primaryFocusStyle}\n }\n\n &:hover:not([aria-disabled='true']) {\n ${primaryHoverStyle}\n }\n\n &:active:not([aria-disabled='true']) {\n ${primaryActiveStyle}\n }\n`;\n\nconst secondaryHoverStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(hoverTransparency, $buttonColor)};\n`;\n\nconst secondaryActiveStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(activeTransparency, $buttonColor)};\n`;\n\nconst secondaryFocusStyle = css<{ $buttonColor: string }>`\n box-shadow:\n inset 0 0 0 1px white,\n inset 0 0 0 2px ${({ $buttonColor }) => $buttonColor};\n`;\n\nconst secondaryStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(1, $buttonColor)};\n border-color: ${({ $buttonColor }) => $buttonColor};\n color: ${({ $buttonColor }) => $buttonColor};\n\n &:focus-visible {\n ${secondaryFocusStyle}\n }\n\n &:hover:not([aria-disabled='true']) {\n ${secondaryHoverStyle}\n }\n\n &:active:not([aria-disabled='true']) {\n ${secondaryActiveStyle}\n }\n`;\n\nconst tertiaryHoverStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(hoverTransparency, $buttonColor)};\n`;\n\nconst tertiaryActiveStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(activeTransparency, $buttonColor)};\n`;\n\nconst tertiaryFocusStyle = css<{ $buttonColor: string }>`\n border-color: ${({ $buttonColor }) => $buttonColor};\n box-shadow:\n inset 0 0 0 1px white,\n inset 0 0 0 2px ${({ $buttonColor }) => $buttonColor};\n`;\n\nconst tertiaryStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(1, $buttonColor)};\n border-color: ${({ $buttonColor }) => transparentize(1, $buttonColor)};\n color: ${({ $buttonColor }) => $buttonColor};\n\n &:focus-visible {\n ${tertiaryFocusStyle}\n }\n\n &:hover:not([aria-disabled='true']) {\n ${tertiaryHoverStyle}\n }\n\n &:active:not([aria-disabled='true']) {\n ${tertiaryActiveStyle}\n }\n`;\n\nconst squareStyle = css`\n border-radius: 0;\n`;\n\nexport const disabledButtonStyle = css`\n opacity: 0.4;\n`;\n\nexport const largeButtonStyle = css`\n font-size: 16px;\n line-height: 24px;\n padding: ${({ theme }) => `${theme.spacing.space02} ${theme.spacing.space04}`};\n`;\n\nexport const mediumButtonStyle = css`\n font-size: 14px;\n line-height: 20px;\n padding: ${({ theme }) => `${theme.spacing.space02} ${theme.spacing.space03}`};\n`;\n\nexport const smallButtonStyle = css`\n font-size: 12px;\n line-height: 18px;\n padding: ${({ theme }) => `2px ${theme.spacing.space02}`};\n`;\n\nexport const fullWidthButtonStyle = css`\n width: 100%;\n`;\n\nexport type ButtonStyleProps = AriaAttributes &\n ComponentPropsWithRef<'button'> & {\n $buttonColor: string;\n $colorOverride?: string;\n $forceState?: 'active' | 'focus' | 'hover' | undefined;\n $fullWidth?: boolean;\n $icon?: ReactNode;\n $iconName?: keyof typeof iconMap;\n $iconPosition?: 'end' | 'start';\n $isLoading?: boolean;\n $label?: string;\n $labelWrap?: boolean;\n $noStyle?: boolean;\n $size?: 'lg' | 'md' | 'sm';\n $square?: boolean;\n $textAlign: TextAlignValues;\n $variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';\n children?: ReactNode;\n disabled?: boolean;\n onClick?: (event: MouseEvent) => void;\n type?: 'button' | 'reset' | 'submit';\n };\n\nexport type ButtonStyledComponentProps = ButtonStyleProps & {\n $noStyle: boolean;\n};\n\n// we also use this style in ButtonLink\n/* eslint-disable sonarjs/cognitive-complexity */\nexport const buttonStyle = css<ButtonStyleProps>`\n ${buttonResetStyle}\n border-radius: ${({ theme }) => theme.button.borderRadius};\n border-style: solid;\n border-width: 1px;\n cursor: pointer;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n text-decoration: none;\n transition: all ${({ theme }) => theme.duration.productive.moderate};\n\n &:focus {\n outline: none;\n }\n\n &[aria-disabled='true'] {\n ${disabledButtonStyle}\n }\n\n /* border-radius */\n ${({ $square }) => $square === true && squareStyle}\n\n /* label wrapping */\n white-space: ${({ $labelWrap }) => ($labelWrap === true ? 'wrap' : 'nowrap')};\n\n /* apply various button variant styles */\n ${({ $variant }) => {\n if ($variant === 'primary' || $variant === 'dangerous') {\n return primaryStyle;\n }\n if ($variant === 'secondary') {\n return secondaryStyle;\n }\n if ($variant === 'tertiary') {\n return tertiaryStyle;\n }\n return undefined;\n }}\n\n /* primarily used for documentation/debugging */\n ${({ $variant, $forceState }) => {\n if ($variant === 'primary' || $variant === 'dangerous') {\n if ($forceState === 'hover') {\n return primaryHoverStyle;\n }\n if ($forceState === 'active') {\n return primaryActiveStyle;\n }\n if ($forceState === 'focus') {\n return primaryFocusStyle;\n }\n }\n if ($variant === 'secondary') {\n if ($forceState === 'hover') {\n return secondaryHoverStyle;\n }\n if ($forceState === 'active') {\n return secondaryActiveStyle;\n }\n if ($forceState === 'focus') {\n return secondaryFocusStyle;\n }\n }\n if ($variant === 'tertiary') {\n if ($forceState === 'hover') {\n return tertiaryHoverStyle;\n }\n if ($forceState === 'active') {\n return tertiaryActiveStyle;\n }\n if ($forceState === 'focus') {\n return tertiaryFocusStyle;\n }\n }\n return undefined;\n }}\n\n ${({ $size }) => {\n if ($size === 'lg') {\n return largeButtonStyle;\n }\n if ($size === 'md') {\n return mediumButtonStyle;\n }\n if ($size === 'sm') {\n return smallButtonStyle;\n }\n return undefined;\n }}\n\n ${({ $fullWidth }) => {\n if ($fullWidth) {\n return fullWidthButtonStyle;\n }\n return undefined;\n }}\n`;\n/* eslint-enable sonarjs/cognitive-complexity */\n\nexport const ButtonStyledComponent = styled.button<ButtonStyledComponentProps>`\n ${({ $noStyle }) => ($noStyle ? buttonResetStyle : buttonStyle)}\n`;\n","import { isNonEmptyString } from '@wistia/type-guards';\nimport type { DefaultTheme } from 'styled-components';\n\nexport const getButtonColor = (\n colorOverride: string | null | undefined,\n variant: string,\n allThemeColors: DefaultTheme['color'],\n): string => {\n if (isNonEmptyString(colorOverride)) {\n return colorOverride;\n }\n if (variant === 'primary') {\n return allThemeColors.brandBlue500;\n }\n if (variant === 'secondary') {\n return allThemeColors.grey900;\n }\n if (variant === 'tertiary') {\n return allThemeColors.grey900;\n }\n if (variant === 'dangerous') {\n return allThemeColors.red600;\n }\n return allThemeColors.brandBlue500; // default\n};\n","/* eslint-disable no-typeof-window-undefined/no-typeof-window-undefined */\n/**\n * @returns {boolean} - whether running in a server environment\n */\nexport const isServer = () => typeof window === 'undefined' || typeof document === 'undefined';\n","import { createContext } from 'react';\nimport type { ToastVariants } from './Toast';\n\nexport type UseToastProps = {\n message: string;\n variant?: ToastVariants;\n actionLabel?: string;\n actionInterceptor?: () => void;\n timeout?: number;\n colorOverride?: string | undefined;\n};\n\nexport type UseToastFn = (props: UseToastProps) => void;\n\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nexport const ToastContext = createContext<UseToastFn>(null!);\n","import type { ReactNode, JSX } from 'react';\nimport { useRef, useCallback, useMemo } from 'react';\nimport { isFunction } from '@wistia/type-guards';\nimport { ModalProviderContext } from './ModalProviderContext';\n\nexport type ModalProviderProps = {\n /**\n * Pass an arbitrary child node\n */\n children: ReactNode;\n};\ntype SetIsShownFunction = (b: boolean) => void;\n\nexport const ModalProvider = ({ children }: ModalProviderProps): JSX.Element => {\n const modalQueueRef = useRef(new Set<SetIsShownFunction>());\n\n const modalQueue = modalQueueRef.current;\n\n const isFirstCallback = useCallback(\n (setIsShown: SetIsShownFunction) => modalQueue.values().next().value === setIsShown,\n [modalQueue],\n );\n\n const showFirstModal = useCallback(() => {\n const setIsShown = modalQueue.values().next().value;\n\n if (isFunction(setIsShown)) {\n setIsShown(true);\n }\n }, [modalQueue]);\n\n const hideFirstModal = useCallback(() => {\n const setIsShown = modalQueue.values().next().value;\n\n if (isFunction(setIsShown)) {\n setIsShown(false);\n }\n }, [modalQueue]);\n\n const attemptShowModal = useCallback(\n (setIsShown: SetIsShownFunction) => {\n modalQueue.add(setIsShown);\n\n if (isFirstCallback(setIsShown)) {\n showFirstModal();\n }\n },\n [modalQueue, isFirstCallback, showFirstModal],\n );\n\n const attemptHideModal = useCallback(\n (setIsShown: SetIsShownFunction) => {\n modalQueue.add(setIsShown);\n\n if (isFirstCallback(setIsShown)) {\n hideFirstModal();\n modalQueue.delete(setIsShown);\n showFirstModal();\n } else {\n modalQueue.delete(setIsShown);\n }\n },\n [modalQueue, isFirstCallback, hideFirstModal, showFirstModal],\n );\n\n const removeModalFromQueue = useCallback(\n (setIsShown: SetIsShownFunction) => {\n modalQueue.delete(setIsShown);\n },\n [modalQueue],\n );\n\n const modalProviderCoordinator = useMemo(\n () => ({\n attemptShowModal,\n attemptHideModal,\n removeModalFromQueue,\n }),\n [attemptShowModal, attemptHideModal, removeModalFromQueue],\n );\n\n return (\n <ModalProviderContext.Provider value={modalProviderCoordinator}>\n {children}\n </ModalProviderContext.Provider>\n );\n};\n","import type { Dispatch, SetStateAction } from 'react';\nimport { createContext, useContext } from 'react';\n\ntype ModalProviderContextType = {\n attemptShowModal?: (setIsShown: Dispatch<SetStateAction<boolean>>) => void;\n attemptHideModal?: (setIsShown: Dispatch<SetStateAction<boolean>>) => void;\n removeModalFromQueue?: (setIsShown: Dispatch<SetStateAction<boolean>>) => void;\n};\n\nexport const ModalProviderContext = createContext<ModalProviderContextType>({});\n\nexport const useModalProviderContext = () => useContext(ModalProviderContext);\n","import { createGlobalStyle } from 'styled-components';\nimport { normalize } from './normalize';\nimport { baseline } from './baseline';\n\nexport const GlobalStyle = createGlobalStyle`\n ${normalize}\n ${baseline}\n`;\n","import { css } from 'styled-components';\n\nexport const normalize = css`\n /* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n /* Document\n ========================================================================== */\n\n /**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\n html {\n line-height: 1.15; /* 1 */\n text-size-adjust: 100%; /* 2 */\n }\n\n /* Sections\n ========================================================================== */\n\n /**\n * Remove the margin in all browsers.\n */\n\n body {\n margin: 0;\n }\n\n /**\n * Render the 'main' element consistently in IE.\n */\n\n main {\n display: block;\n }\n\n /**\n * Correct the font size and margin on 'h1' elements within 'section' and\n * 'article' contexts in Chrome, Firefox, and Safari.\n */\n\n h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n\n /* Grouping content\n ========================================================================== */\n\n /**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\n hr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n }\n\n /**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd 'em' font sizing in all browsers.\n */\n /* stylelint-disable */\n pre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n }\n /* stylelint-enable */\n\n /* Text-level semantics\n ========================================================================== */\n\n /**\n * Remove the gray background on active links in IE 10.\n */\n\n a {\n background-color: transparent;\n }\n\n /**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\n abbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n }\n\n /**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\n b,\n strong {\n font-weight: bolder;\n }\n\n /**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd 'em' font sizing in all browsers.\n */\n\n /* stylelint-disable */\n code,\n kbd,\n samp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n }\n /* stylelint-enable */\n\n /**\n * Add the correct font size in all browsers.\n */\n\n small {\n font-size: 80%;\n }\n\n /**\n * Prevent 'sub' and 'sup' elements from affecting the line height in\n * all browsers.\n */\n\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n /* Embedded content\n ========================================================================== */\n\n /**\n * Remove the border on images inside links in IE 10.\n */\n\n img {\n border-style: none;\n }\n\n /* Forms\n ========================================================================== */\n\n /**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n }\n\n /**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\n button,\n input {\n /* 1 */\n overflow: visible;\n }\n\n /**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\n button,\n select {\n /* 1 */\n text-transform: none;\n }\n\n /**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n appearance: auto;\n }\n\n /**\n * Remove the inner border and padding in Firefox.\n */\n\n button::-moz-focus-inner,\n [type='button']::-moz-focus-inner,\n [type='reset']::-moz-focus-inner,\n [type='submit']::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n\n /**\n * Restore the focus styles unset by the previous rule.\n */\n\n button:-moz-focusring,\n [type='button']:-moz-focusring,\n [type='reset']:-moz-focusring,\n [type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n }\n\n /**\n * Correct the padding in Firefox.\n */\n\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n /**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from 'fieldset' elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * 'fieldset' elements in all browsers.\n */\n\n legend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n }\n\n /**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\n progress {\n vertical-align: baseline;\n }\n\n /**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\n textarea {\n overflow: auto;\n }\n\n /**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n [type='checkbox'],\n [type='radio'] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n }\n\n /**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n [type='number']::-webkit-inner-spin-button,\n [type='number']::-webkit-outer-spin-button {\n height: auto;\n }\n\n /**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n [type='search'] {\n appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n }\n\n /**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n [type='search']::-webkit-search-decoration {\n appearance: none;\n }\n\n /**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to 'inherit' in Safari.\n */\n\n ::-webkit-file-upload-button {\n appearance: auto; /* 1 */\n font: inherit; /* 2 */\n }\n\n /* Interactive\n ========================================================================== */\n\n /*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\n details {\n display: block;\n }\n\n /*\n * Add the correct display in all browsers.\n */\n\n summary {\n display: list-item;\n }\n\n /* Misc\n ========================================================================== */\n\n /**\n * Add the correct display in IE 10+.\n */\n\n template {\n display: none;\n }\n\n /**\n * Add the correct display in IE 10.\n */\n\n [hidden] {\n display: none;\n }\n`;\n","import { css } from 'styled-components';\n\nexport const baseline = css`\n /**\n * 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'\n * 2. Ensure the iOS tap highlight is transparent\n */\n html {\n box-sizing: border-box; /* 1 */\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%); /* 2 */\n }\n\n /**\n * 1. See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/\n */\n *,\n *::before,\n *::after {\n box-sizing: inherit; /* 1 */\n }\n\n /**\n * 1. Without this fonts are too heavy weight in OS X Firefox\n * 2. Design decision\n * 3. Preferable for the body to fill viewport, even when empty\n */\n body {\n -moz-osx-font-smoothing: grayscale; /* 1 */\n -webkit-font-smoothing: antialiased; /* 2 */\n color: ${({ theme }) => theme.color.grey900};\n font-family: ${({ theme }) => theme.font.family.default};\n font-size: ${({ theme }) => theme.font.size.default};\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n min-height: 100vh; /* 3 */\n }\n`;\n","import type { Dispatch, SetStateAction } from 'react';\nimport { useState, useCallback } from 'react';\n\nexport type UseBooleanReturn = [\n boolean,\n () => void,\n () => void,\n () => void,\n Dispatch<SetStateAction<boolean>>,\n];\n\nexport const useBoolean = (initialValue = false): UseBooleanReturn => {\n const [value, setValue] = useState(initialValue);\n\n const toggle = useCallback(() => setValue((val) => !val), []);\n const setTrue = useCallback(() => setValue(true), []);\n const setFalse = useCallback(() => setValue(false), []);\n\n return [value, toggle, setTrue, setFalse, setValue];\n};\n","import { useCallback } from 'react';\nimport { copyToClipboard } from '../../helpers/copyToClipboard';\nimport { useTimedToggle } from '../../private/hooks/useTimedToggle';\n\nexport const useClipboard = (\n textToCopy: string,\n timeout = 1500,\n): [() => Promise<void>, boolean, boolean] => {\n const [hasCopied, toggleHasCopied] = useTimedToggle(false);\n const [failedToCopy, toggleFailedToCopy] = useTimedToggle(false);\n\n const onCopy = useCallback(async () => {\n try {\n await copyToClipboard(textToCopy);\n\n // if there's no timeout value there's no need to set toggleHasCopied\n if (timeout && timeout > 0) {\n toggleHasCopied(timeout);\n }\n } catch (error: unknown) {\n if (error instanceof Error) {\n toggleFailedToCopy(timeout);\n }\n }\n }, [textToCopy, timeout, toggleHasCopied, toggleFailedToCopy]);\n\n return [onCopy, hasCopied, failedToCopy];\n};\n","import { useEffect, useRef, useState } from 'react';\n\nexport const useTimedToggle = (initialValue: boolean): [boolean, (timeout: number) => void] => {\n const [value, setValue] = useState<boolean>(false);\n const timeoutRef = useRef<number | undefined>(undefined);\n const initialValueRef = useRef(initialValue);\n\n const toggleValue = (timeout: number) => {\n clearTimeout(timeoutRef.current);\n setValue(!initialValueRef.current);\n timeoutRef.current = window.setTimeout(() => setValue(initialValueRef.current), timeout);\n };\n\n useEffect(() => () => clearTimeout(timeoutRef.current), []);\n\n return [value, toggleValue];\n};\n","import type { RefObject } from 'react';\nimport { useMemo, useState, useRef, useLayoutEffect } from 'react';\n\ntype Rect = {\n width: number;\n height: number;\n top: number;\n left: number;\n bottom: number;\n right: number;\n x: number;\n y: number;\n};\n\nconst initialRect: Rect = {\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n x: 0,\n y: 0,\n};\n\nexport const useElementObserver = <T extends HTMLElement>(): [RefObject<T | null>, Rect] => {\n const ref = useRef<T | null>(null);\n const [rect, setRect] = useState<Rect>(initialRect);\n const observer = useMemo(\n () =>\n new window.ResizeObserver((entries) => {\n if (entries[0]) {\n const { width, height, top, left, bottom, right, x, y } = entries[0].contentRect;\n setRect({ width, height, top, left, bottom, right, x, y });\n }\n }),\n [],\n );\n\n useLayoutEffect(() => {\n if (!ref.current) {\n return;\n }\n\n observer.observe(ref.current);\n\n // eslint-disable-next-line consistent-return\n return () => {\n observer.disconnect();\n };\n }, [observer]);\n\n return [ref, rect];\n};\n","import { useEffect, useRef } from 'react';\n\ntype AddEventListenerType = (\n type: string,\n listener: (evt: Event) => void,\n options?: AddEventListenerOptions | boolean,\n) => void;\n\ntype RemoveEventListenerType = (\n type: string,\n listener: (evt: Event) => void,\n options?: AddEventListenerOptions | boolean,\n) => void;\n\ntype Listenable = {\n addEventListener: AddEventListenerType;\n removeEventListener: RemoveEventListenerType;\n};\n\n// ensure element supports addEventListener\nconst isEventTargetSupported = (eventTarget: unknown): eventTarget is Listenable =>\n // @ts-expect-error the compiler thinks that addEventListener may not exist on eventTarget, but we still need to check it.\n\n Boolean(typeof eventTarget === 'object' && eventTarget?.addEventListener);\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const useEvent = <T extends Event>(\n eventName: Parameters<AddEventListenerType>[0],\n eventHandler: (event: T) => unknown,\n eventTarget: unknown = window,\n eventOptions: Parameters<RemoveEventListenerType>[2] = {},\n) => {\n // refs to store eventHandler & eventOptions\n const savedEventHandler = useRef<typeof eventHandler | undefined>(undefined);\n const savedEventOptions = useRef<typeof eventOptions | undefined>(undefined);\n\n // update ref when handler changes;\n // avoids effect dependencies array which could cause effect to re-run every render\n useEffect(() => {\n savedEventHandler.current = eventHandler;\n }, [eventHandler]);\n\n // update ref when options changes\n useEffect(() => {\n savedEventOptions.current = eventOptions;\n }, [eventOptions]);\n\n useEffect(() => {\n // early return if we can't do anything useful with this hook\n if (!eventName || !isEventTargetSupported(eventTarget)) {\n return;\n }\n\n const eventListener = (event: Event) => {\n if (savedEventHandler.current !== undefined) {\n return savedEventHandler.current(event as T);\n }\n return (): void => {}; // eslint-disable-line @typescript-eslint/no-empty-function\n };\n\n eventTarget.addEventListener(eventName, eventListener, savedEventOptions.current);\n\n // remove event listener on unmount\n // eslint-disable-next-line consistent-return\n return () => {\n eventTarget.removeEventListener(eventName, eventListener, savedEventOptions.current);\n };\n }, [eventName, eventTarget, savedEventOptions]);\n};\n","import type { RefObject } from 'react';\nimport { useRef, useCallback, useEffect } from 'react';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport {\n FOCUSABLE_ELEMENT_SELECTORS,\n createAriaHider,\n isFocusableElement,\n isTabbableElement,\n markForFocusLater,\n returnFocus,\n scopeTab,\n setupScopedFocus,\n teardownScopedFocus,\n} from './helpers';\n\ntype UseFocusTrapOptions = {\n disableAriaHider?: boolean;\n focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;\n};\n\nconst isRef = <T extends HTMLElement>(val: unknown): val is RefObject<T | null> => {\n return val !== null && typeof val === 'object' && 'current' in val;\n};\n\nexport const useFocusTrap = (active = true, options: UseFocusTrapOptions = {}) => {\n const ref = useRef<HTMLElement | null>(null);\n const restoreAriaRef = useRef<(() => void) | null>(null);\n\n const setRef = useCallback(\n (node: HTMLElement | null | undefined) => {\n if (restoreAriaRef.current !== null) {\n restoreAriaRef.current();\n }\n\n if (ref.current) {\n returnFocus();\n teardownScopedFocus();\n }\n\n if (active && node !== null && node !== undefined) {\n setupScopedFocus(node);\n markForFocusLater();\n\n const processNode = (node2: HTMLElement) => {\n // check if we should disable aria\n restoreAriaRef.current = !(options.disableAriaHider ?? false)\n ? createAriaHider(node2)\n : null; // Find the initial focus element\n\n let focusElement: HTMLElement | null = null;\n if (isNotUndefined(options.focusSelector)) {\n if (isRef(options.focusSelector)) {\n focusElement = options.focusSelector.current;\n } else {\n focusElement =\n typeof options.focusSelector === 'string'\n ? node2.querySelector(options.focusSelector)\n : options.focusSelector;\n }\n }\n\n if (!focusElement) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const children = Array.from(\n node2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS),\n ) as HTMLElement[];\n focusElement = // Prefer tabbable elements, But fallback to any focusable element\n children.find(isTabbableElement) ?? // But fallback to any focusable element\n children.find(isFocusableElement) ?? // Nothing found\n null; // If everything else fails, see if the node itself can handle focus\n\n if (!focusElement && isFocusableElement(node2)) {\n focusElement = node2;\n }\n }\n\n if (focusElement) {\n // Set the initial focus inside the traps\n focusElement.focus();\n }\n\n if (!focusElement && process.env['NODE_ENV'] === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '[useFocusTrap]: Failed to find a focusable element after activating the focus trap. Make sure to include at an element that can recieve focus. As a fallback, you can also set \"tabIndex={-1}\" on the focus trap node.',\n node2,\n );\n }\n }; // Delay processing the HTML node by a frame. This ensures focus is assigned correctly.\n\n setTimeout(() => {\n // node.ownerDocument should always be a truthy value\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions\n if (node.ownerDocument) {\n processNode(node);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions\n if (!node.ownerDocument && process.env['NODE_ENV'] === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '[useFocusTrap]: The focus trap is not part of the DOM yet, so it is unable to correctly set focus. Make sure to render the ref node.',\n node,\n );\n }\n });\n\n ref.current = node;\n } else {\n ref.current = null;\n }\n },\n [active, options.focusSelector, options.disableAriaHider],\n );\n\n useEffect(() => {\n if (!active) {\n return undefined;\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Tab' && ref.current) {\n scopeTab(ref.current, event);\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [active]);\n\n return setRef;\n};\n","import { coerceToString } from '../../helpers/stringHelpers/coerceToString';\n\nexport const focusSelector = 'a, input, select, textarea, button, object, [tabindex]';\n\nexport const FOCUSABLE_ELEMENT_SELECTORS =\n 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, [tabindex=\"0\"], [contenteditable]';\n\nconst isHiddenElement = (element: HTMLElement) => {\n const { display, visibility } = window.getComputedStyle(element);\n const isHidden =\n display === 'none' ||\n element.style.display === 'none' ||\n visibility === 'none' ||\n element.style.visibility === 'hidden';\n return (element.offsetWidth <= 0 && element.offsetHeight <= 0) || isHidden;\n};\n\nconst isVisibleElement = (element: HTMLElement) => {\n let parentElement: HTMLElement | null = element;\n\n while (parentElement) {\n if (parentElement === document.body) {\n break;\n }\n if (isHiddenElement(parentElement)) {\n return false;\n }\n parentElement = parentElement.parentNode as HTMLElement | null;\n }\n\n return true;\n};\n\nconst getElementTabIndex = (element: HTMLElement) => {\n const tabIndex = element.getAttribute('tabindex');\n\n // @ts-expect-error - The logic was written this way pre-TS conversion, and there are checks for NaN below which is the case if the index is undefined\n return Number.parseInt(tabIndex ?? undefined, 10);\n};\n\nconst isTabIndexNaN = (element: HTMLElement) => {\n const tabIndex = getElementTabIndex(element);\n return Number.isNaN(tabIndex);\n};\n\nexport const isFocusableElement = (element: HTMLElement) => {\n const tabbableNodeRegEx = /input|select|textarea|button|object/;\n const nodeName = element.nodeName.toLowerCase();\n const isTabIndexNotNaN = !isTabIndexNaN(element);\n const isFocusable =\n // @ts-expect-error - Disabled is specific to buttons and inputs, but we could be dealing with any number of types here. Disabled would be undefined for those, so ignoring.\n (tabbableNodeRegEx.test(nodeName) && !(element.disabled as boolean)) ||\n (element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n\n return Boolean(isFocusable) && isVisibleElement(element);\n};\n\n// elements a user can tab between, excluding elements with tabIndex=-1\nexport const isTabbableElement = (element: HTMLElement) => {\n const tabIndex = getElementTabIndex(element);\n return (isTabIndexNaN(element) || tabIndex >= 0) && isFocusableElement(element);\n};\n\nconst findTabbableDescendants = (element: HTMLElement) =>\n Array.from<HTMLElement>(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter(\n isTabbableElement,\n );\n\nconst focusLaterElements: HTMLElement[] = [];\n\nlet focusElement: HTMLElement | null = null;\nlet needToFocus = false;\n\nconst handleBlur = () => {\n needToFocus = true;\n};\n\nconst handleFocus = () => {\n if (needToFocus) {\n needToFocus = false;\n\n if (!focusElement) {\n return;\n }\n\n if (focusElement.contains(document.activeElement)) {\n return;\n }\n\n const element = findTabbableDescendants(focusElement)[0] ?? focusElement;\n element.focus();\n }\n};\n\nexport const markForFocusLater = () => {\n const element = document.activeElement as HTMLElement | null;\n\n if (element !== null) {\n focusLaterElements.push(element);\n }\n};\n\nexport const returnFocus = () => {\n let toFocus = null;\n\n try {\n toFocus = focusLaterElements.pop();\n if (toFocus) {\n toFocus.focus();\n }\n } catch {\n // eslint-disable-next-line no-console\n console.warn(\n `You tried to return focus to ${coerceToString(toFocus)} but it is not in the DOM anymore`,\n );\n }\n};\n\nexport const setupScopedFocus = (element: HTMLElement) => {\n focusElement = element;\n document.addEventListener('focusout', handleBlur, false);\n document.addEventListener('focusin', handleFocus, true);\n};\n\nexport const teardownScopedFocus = () => {\n focusElement = null;\n document.removeEventListener('focusout', handleBlur);\n document.removeEventListener('focusin', handleFocus);\n};\n\n// Controls tabbing, so it stays inside the node element\nexport const scopeTab = (node: HTMLElement, event: KeyboardEvent) => {\n const tabbable = findTabbableDescendants(node);\n\n if (!tabbable.length) {\n event.preventDefault();\n return;\n }\n\n const finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1];\n\n // handle immediate shift+tab after opening with mouse\n const leavingFinalTabbable =\n finalTabbable === document.activeElement || node === document.activeElement;\n\n if (!leavingFinalTabbable) {\n return;\n }\n\n event.preventDefault();\n\n const target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];\n\n if (target) {\n target.focus();\n }\n};\n\n// Sets `aria-hidden` on all elements on the body, except for the active node\nexport const createAriaHider = (containerNode: HTMLElement, selector?: string) => {\n selector ??= 'body > :not(script)'; // eslint-disable-line no-param-reassign\n\n const rootNodes = Array.from(document.querySelectorAll(selector)).map((node) => {\n if (node.contains(containerNode)) {\n return undefined;\n }\n\n const ariaHidden = node.getAttribute('aria-hidden');\n\n if (ariaHidden === null || ariaHidden === 'false') {\n node.setAttribute('aria-hidden', 'true');\n }\n\n return {\n node,\n ariaHidden,\n };\n });\n\n return () => {\n rootNodes.forEach((item) => {\n if (!item) {\n return;\n }\n\n if (item.ariaHidden === null) {\n item.node.removeAttribute('aria-hidden');\n } else {\n item.node.setAttribute('aria-hidden', item.ariaHidden);\n }\n });\n };\n};\n","import { useCallback, useState } from 'react';\n\n// returning a new object reference guarantees that a before-and-after\n// equivalence check will always be false, resulting in a re-render,\n// even when multiple calls to forceUpdate are batched\nexport const useForceUpdate = (): (() => void) => {\n // eslint-disable-next-line react/hook-use-state\n const [, dispatch] = useState(Object.create(null));\n\n // turn dispatch(required_parameter) into dispatch()\n return useCallback(() => {\n dispatch(Object.create(null));\n }, [dispatch]);\n};\n","export { useFormikContext } from 'formik';\n","import { useState } from 'react';\n\ntype HoverProps = {\n onFocus: () => void;\n onMouseEnter: () => void;\n onBlur: () => void;\n onMouseLeave: () => void;\n onMouseMove?: () => void;\n};\n\nexport const useIsHovered = (): [boolean, HoverProps, (hovered: boolean) => void] => {\n const [isHovered, setIsHovered] = useState(false);\n\n const onFocus = () => setIsHovered(true);\n const onMouseEnter = () => setIsHovered(true);\n const onMouseMove = () => setIsHovered(true);\n const onBlur = () => setIsHovered(false);\n const onMouseLeave = () => setIsHovered(false);\n\n const hoverProps: HoverProps = {\n onFocus,\n onMouseEnter,\n onBlur,\n onMouseLeave,\n };\n\n if (!isHovered) {\n hoverProps.onMouseMove = onMouseMove;\n }\n\n return [isHovered, hoverProps, setIsHovered];\n};\n","/* eslint-disable react-compiler/react-compiler */\nimport { useMemo } from 'react';\nimport { useEvent } from '../useEvent';\n\ntype KeyFilterPredicate = (evt: KeyboardEvent) => boolean;\ntype KeyFilter = KeyFilterPredicate | boolean | string | null | undefined;\n\nconst createKeyPredicate = (keyFilter: KeyFilter): KeyFilterPredicate => {\n // key arg is a function so just return the function\n if (typeof keyFilter === 'function') {\n return keyFilter;\n }\n // key arg is probably a KeyboardEvent key\n if (typeof keyFilter === 'string') {\n return (event: KeyboardEvent) => event.key === keyFilter;\n }\n // key arg is truthy\n if (keyFilter !== null && keyFilter !== undefined && Boolean(keyFilter)) {\n return () => true;\n }\n // key arg is falsey\n return () => false;\n};\n\ntype EventHandler = (event: KeyboardEvent) => unknown;\n\ntype UseKeyOptions = {\n eventName?: string;\n eventTarget?: Parameters<typeof useEvent>[2];\n eventOptions?: Parameters<typeof useEvent>[3];\n};\n\nexport const useKey = (\n key: KeyFilter,\n eventHandler: EventHandler,\n options: UseKeyOptions = {},\n dependencies: unknown[] = [key],\n) => {\n const { eventName = 'keydown', eventTarget, eventOptions } = options;\n\n const memoizedEventHandler = useMemo(() => {\n const predicate = createKeyPredicate(key);\n\n // @ts-expect-error Not all code paths return a value.\n return (handlerEvent: KeyboardEvent) => {\n // key events that happen *inside* an input should be ignored; this is to avoid issues\n // where typing into an input is inadvertently triggering actions the user does not want\n if (\n ['INPUT', 'TEXTAREA', 'SELECT'].includes(document.activeElement?.nodeName ?? '') ||\n (document.activeElement as HTMLElement | null)?.isContentEditable\n ) {\n return;\n }\n if (predicate(handlerEvent)) {\n return eventHandler(handlerEvent); // eslint-disable-line consistent-return\n }\n };\n }, dependencies); // eslint-disable-line react-hooks/exhaustive-deps\n\n useEvent(eventName, memoizedEventHandler, eventTarget, eventOptions);\n};\n","import { useState } from 'react';\nimport { useKey } from '../useKey';\n\ntype KeyPressState = [boolean, KeyboardEvent | null];\n\nexport const useKeyPress = (keyFilter: Parameters<typeof useKey>[0]): KeyPressState => {\n const [state, setState] = useState<KeyPressState>([false, null]);\n\n useKey(keyFilter, (event: KeyboardEvent) => setState([true, event]), { eventName: 'keydown' }, [\n state,\n ]);\n useKey(keyFilter, (event: KeyboardEvent) => setState([false, event]), { eventName: 'keyup' }, [\n state,\n ]);\n\n return state;\n};\n","import { useEffect, useRef } from 'react';\n\nexport const useUpdateEffect = (effect: () => () => void, dependencies: unknown[]): void => {\n const isInitialMount = useRef(true);\n\n useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n return effect();\n }, dependencies); // eslint-disable-line react-hooks/exhaustive-deps\n};\n","import { useKeyPress } from '../useKeyPress';\nimport { useUpdateEffect } from '../../private/hooks/useUpdateEffect';\n\ntype KeyEventHandler = (keyboardEvent: KeyboardEvent) => unknown;\n\nexport const useKeyPressOnce = (\n key: Parameters<typeof useKeyPress>[0],\n keydownHandler: KeyEventHandler | null | undefined = undefined,\n keyupHandler: KeyEventHandler | null | undefined = undefined,\n) => {\n const [pressed, event] = useKeyPress(key);\n\n useUpdateEffect(() => {\n if (!pressed && keyupHandler && event !== null) {\n keyupHandler(event);\n } else if (pressed && keydownHandler && event !== null) {\n keydownHandler(event);\n } else {\n // do nothing\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }, [pressed]);\n};\n","import { useState } from 'react';\n\ntype SetItemType = Storage['setItem'];\n\n// https://usehooks.com/useLocalStorage/\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- TODO this is load-bearing, the build fails without it\nexport const useLocalStorage = <T, _>(\n key: Parameters<SetItemType>[0],\n initialValue: T,\n storage: Storage = window.localStorage,\n): [T | undefined, (newValue: T) => void, () => void] => {\n // State to store our value\n // Pass initial state function to useState so logic is only executed once\n const [storedValue, setStoredValue] = useState<T | undefined>(() => {\n try {\n // Get from local storage by key\n const item = storage.getItem(key);\n // Parse stored json or if none return initialValue\n return item !== null && Boolean(item) ? (JSON.parse(item) as T | undefined) : initialValue;\n } catch (error: unknown) {\n // If error also return initialValue\n console.log(error); // eslint-disable-line no-console\n return initialValue;\n }\n });\n\n // Return a wrapped version of useState's setter function that ...\n // ... persists the new value to localStorage.\n const setValue = (value: T | ((currentValue: T | undefined) => T | undefined)) => {\n try {\n // Allow value to be a function so we have same API as useState\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n // Save state\n setStoredValue(valueToStore);\n // Save to local storage\n storage.setItem(key, JSON.stringify(valueToStore));\n } catch (error: unknown) {\n // A more advanced implementation would handle the error case\n console.error(error); // eslint-disable-line no-console\n }\n };\n\n const removeValue = () => {\n storage.removeItem(key);\n setStoredValue(undefined);\n };\n\n return [storedValue, setValue, removeValue];\n};\n","import type { MutableRefObject, ReactNode, JSX } from 'react';\n\ntype AcceptedElementTypes = HTMLElement | JSX.Element | ReactNode;\ntype AcceptedRefs =\n | MutableRefObject<unknown> // eslint-disable-line @typescript-eslint/no-deprecated\n | ((element: AcceptedElementTypes) => unknown)\n | null\n | undefined;\n\nexport const useMergedRefs = (refs: AcceptedRefs[]) => (element: AcceptedElementTypes) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(element);\n } else if (ref != null) {\n ref.current = element; // eslint-disable-line no-param-reassign\n } else {\n // do nothing\n }\n });\n};\n","import type { RefObject } from 'react';\nimport { useEffect } from 'react';\n\nexport const useOnClickOutside = (\n ref: RefObject<HTMLElement | null | undefined>,\n handler: (event: Event) => unknown,\n) => {\n useEffect(() => {\n const listener = (event: Event): void => {\n // don't do anything if the click event is on the ref element or descendent elements\n if (!ref.current || ref.current.contains(event.target as Node)) {\n return;\n }\n\n handler(event);\n };\n\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, [ref, handler]);\n};\n","import { useLayoutEffect } from 'react';\n\nexport const usePreventScroll = (locked: boolean): void => {\n useLayoutEffect(() => {\n if (locked) {\n // stash original body overflow\n const originalStyle = window.getComputedStyle(document.body).overflow;\n // prevent scrolling on mount\n document.body.style.overflow = 'hidden';\n\n return () => {\n // restore scrolling on unmount\n document.body.style.overflow = originalStyle;\n };\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }, [locked]);\n};\n","import { useEffect, useRef } from 'react';\n\n// eslint-disable-next-line prettier/prettier\nexport const usePreviousValue = <T,>(value: T): T | undefined => {\n const ref = useRef<T>(undefined);\n\n useEffect(() => {\n ref.current = value;\n });\n\n return ref.current;\n};\n","import { styled } from 'styled-components';\nimport type { MouseEvent, RefObject, ReactNode, ComponentPropsWithoutRef } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { ModalBase } from '../ModalBase';\nimport { ButtonGroup } from '../ButtonGroup';\nimport { Text } from '../Text';\nimport { Backdrop } from '../Backdrop';\nimport { ModalCloseButton } from '../../private/components/ModalCloseButton';\nimport { mq } from '../../helpers/mq';\nimport type { OnBeforeHideInterface } from '../ModalBase/ModalBase';\nimport { getModalBackgroundGradient } from './getModalBackgroundGradient';\n\nconst defaultWidth = '532px';\nconst illustrationDiameter = 160;\n\ntype DialogueProps = {\n $fullHeight: boolean;\n};\n\nconst Dialogue = styled.div<DialogueProps>`\n background-color: white;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n height: 100vh;\n overflow: auto;\n position: relative;\n width: 100vw;\n\n ${mq.smAndUp} {\n border-radius: 16px;\n height: ${({ $fullHeight }) => ($fullHeight ? 'min-content' : 'auto')};\n margin: ${({ theme }) => theme.spacing.space05};\n ${({ $fullHeight }) => ($fullHeight ? 'min-height: calc(100vh - 48px);' : '')}\n overflow: visible;\n width: min-content;\n }\n\n ${mq.mdAndUp} {\n flex-direction: row;\n }\n`;\n\ntype BodyProps = {\n width: string;\n};\n\nconst Body = styled.div<BodyProps>`\n display: flex;\n flex-direction: column;\n padding: ${({ theme }) => theme.spacing.space06};\n\n ${mq.smAndUp} {\n width: ${({ width }) => width};\n }\n\n p {\n margin-top: 0;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n`;\n\nconst Message = styled.div`\n flex-grow: 1;\n`;\n\ntype IllustrationWrapperProps = {\n illustrationBackgroundColor: string;\n};\nconst IllustrationWrapper = styled.div<IllustrationWrapperProps>`\n ${({ illustrationBackgroundColor }) => getModalBackgroundGradient(illustrationBackgroundColor)};\n align-items: center;\n background-position: center;\n background-size: cover;\n border-radius: 0;\n box-sizing: content-box;\n display: flex;\n justify-content: center;\n min-height: 192px;\n min-width: 192px;\n padding: ${({ theme }) => `${theme.spacing.space04} ${theme.spacing.space06}`};\n\n ${mq.smAndUp} {\n border-radius: 16px 16px 0 0;\n }\n\n ${mq.mdAndUp} {\n border-radius: 16px 0 0 16px;\n padding: ${({ theme }) => theme.spacing.space06};\n }\n\n img {\n height: ${illustrationDiameter}px;\n width: ${illustrationDiameter}px;\n }\n`;\n\nexport type ActionModalProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Horizontally align modal to the left, center, or right of the container\n */\n alignHorizontal?: 'center' | 'left' | 'normal' | 'right';\n /**\n * Vertically align modal to the top, center, or bottom of the container\n */\n alignVertical?: 'bottom' | 'center' | 'normal' | 'top';\n /**\n * Buttons to be shown at the bottom of the modal\n */\n buttons?: ReactNode | ((hide: () => void) => ReactNode);\n /**\n * Contents of the modal\n */\n children?: ReactNode;\n /**\n * Class to be applied to the base element of the modal\n */\n className?: string;\n /**\n * A prop that determines whether the modal will span the entirety of the screen vertically\n */\n fullHeight?: boolean;\n /**\n * Allows user to override default icon color\n */\n closeIconColorOverride?: string;\n /**\n * Increase the zIndex of the Modal, this should be used when calling ActionModal from a Menu\n * this will prevent the Menu from staying above the ActionModal\n */\n elevated?: boolean;\n /**\n * Optional illustration to display alongside the modal\n */\n illustration?: ReactNode;\n /**\n * Background color that appears behind the optional illustration\n * Can be any css background color or \"blue\", \"brandBlue\", \"green\",\n * \"pink\", \"purple\", or \"yellow\" for theme colors\n */\n\n illustrationBackgroundColor?: string;\n\n /**\n * Render the modal initially in shown state\n */\n initialShownState?: boolean;\n /**\n * Allow the user to close the modal via x button or backdrop click\n */\n isDismissible?: boolean;\n /**\n * Callback invoked before the modal is hidden\n */\n onBeforeHide?: () => OnBeforeHideInterface;\n /**\n * Callback invoked when the modal is dismissed\n */\n onHide?: () => void;\n /**\n * Callback invoked when the modal is shown\n */\n onShow?: () => void;\n /**\n * Optional function that exposes the `hide` function at the call site allowing\n * the option to call the `hide` function from outside of this component\n */\n render?: (hide: (event?: MouseEvent) => void) => ReactNode;\n /**\n * Title to display in the modal\n */\n title: string;\n /**\n * function(show, ref) that returns a node to open the modal\n */\n toggle?: (\n show: () => unknown,\n toggleButtonRef?: RefObject<HTMLElement | null | undefined>,\n ) => ReactNode;\n /**\n * The css width property of the modal. Ex - 'max-content', '532px', '100%', etc\n */\n width?: string;\n};\n\n/**\n * @deprecated Please use Modal component, see [documentation](?path=/docs/components-modal--docs).\n *\n * #### Why ActionModal is being deprecated\n * ActionModal's API tightly couples the modal itself with the button or element that toggles it. This makes it difficult to\n * implement in several scenarios (such as within a Menu) or if it needs to be programatically opened by an external action.\n *\n * [Modal](?path=/docs/components-modal--docs) allows for a separate state control to toggle its visibility and is also more composable\n * allowing for more variation.\n */\nexport const ActionModal = ({\n alignHorizontal = 'center',\n alignVertical = 'center',\n buttons,\n children,\n className,\n elevated = true,\n fullHeight = false,\n closeIconColorOverride = undefined,\n illustration = null,\n illustrationBackgroundColor = 'brandBlue',\n initialShownState = false,\n isDismissible = true,\n onBeforeHide,\n onHide,\n onShow,\n render,\n title,\n toggle,\n width = defaultWidth,\n ...otherProps\n}: ActionModalProps) => {\n return (\n <ModalBase\n className={className}\n initialShownState={initialShownState}\n isDismissible={isDismissible}\n onBeforeHide={onBeforeHide}\n onHide={onHide}\n onShow={onShow}\n render={(hide: () => void) => (\n <Backdrop\n alignHorizontal={alignHorizontal}\n alignVertical={alignVertical}\n elevated={elevated}\n onClick={(event) => {\n // clicking on the background of the modal causes a redirect to a different\n // page when the parent is a Link component\n if (!isDismissible) {\n return;\n }\n event.stopPropagation();\n hide();\n }}\n >\n {\n // don't let clicks from within the dialogue bubble up to the root. this\n // would result in the modal closing anytime the dialogue is clicked!\n }\n {/* eslint-disable-next-line styled-components-a11y/no-noninteractive-element-interactions, styled-components-a11y/click-events-have-key-events */}\n <Dialogue\n $fullHeight={fullHeight}\n aria-labelledby=\"dialogTitle\"\n data-testid=\"action-modal-dialogue\"\n onClick={(event) => event.stopPropagation()}\n role=\"dialog\"\n {...otherProps}\n >\n {isDismissible ? (\n <ModalCloseButton\n closeIconColorOverride={closeIconColorOverride}\n onClick={hide}\n />\n ) : null}\n\n {isNotNil(illustration) ? (\n <IllustrationWrapper illustrationBackgroundColor={illustrationBackgroundColor}>\n {typeof illustration === 'string' ? (\n <img\n alt=\"\"\n src={illustration}\n />\n ) : (\n illustration\n )}\n </IllustrationWrapper>\n ) : null}\n\n <Body width={width}>\n <Message>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>\n {title ? (\n <Text\n id=\"dialogTitle\"\n renderAs=\"h2\"\n style={{ marginBottom: '16px' }}\n variant=\"headline1\"\n >\n {title}\n </Text>\n ) : null}\n </>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{render === undefined ? children : render(hide)}</>\n </Message>\n <ButtonGroup\n align=\"right\"\n style={{ flexGrow: '0', marginTop: '24px' }}\n >\n {typeof buttons === 'function' ? buttons(hide) : buttons}\n </ButtonGroup>\n </Body>\n </Dialogue>\n </Backdrop>\n )}\n toggle={toggle}\n />\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nActionModal.displayName = 'ActionModal_VHS';\n","import type { RefObject, ReactNode } from 'react';\nimport { useEffect, useRef, useState, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { createGlobalStyle } from 'styled-components';\nimport isEqual from 'react-fast-compare';\nimport { isNotUndefined, isUndefined, isNotNil } from '@wistia/type-guards';\nimport { ModalAnimation } from '../../private/components/ModalAnimation';\nimport { useModalProviderContext } from './ModalProviderContext';\nimport { usePreviousValue } from '../../hooks/usePreviousValue';\nimport { ModalProvider } from './ModalProvider';\n\nconst LOCKED_SCROLL_CLASSNAME = 'is-scroll-locked';\n\n// we need to prevent scrolling on the document when the modal is open. since\n// the `body` node lives outside the react-root, we manually toggle a class\n// on body styled by a global css rule.\nconst GlobalStyle = createGlobalStyle`\n .${LOCKED_SCROLL_CLASSNAME} {\n overflow: hidden;\n }\n`;\n\nconst getFocusableElements = (root: HTMLElement | typeof document | null = document) => {\n const potentialElements = isNotNil(root)\n ? root.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n )\n : [];\n\n // if a normally focusable element isn't displayed, don't include it in the list\n return Array.from(potentialElements).filter(\n (element) => window.getComputedStyle(element).getPropertyValue('display') !== 'none',\n );\n};\n\nconst keepFocusWithinModal = (modalRoot: RefObject<HTMLElement | null>, event: KeyboardEvent) => {\n const focusable = getFocusableElements(modalRoot.current);\n\n if (focusable.length === 0) {\n event.preventDefault();\n return;\n }\n\n const firstFocusable = focusable[0] as HTMLElement;\n const lastFocusable = focusable[focusable.length - 1] as HTMLElement;\n\n if (focusable.length === 1) {\n event.preventDefault();\n firstFocusable.focus();\n return;\n }\n\n // if we're tabbing backwards and on the first focusable element, manually focus the last\n // focusable element to keep focus within the modal.\n if (event.shiftKey) {\n if (document.activeElement === firstFocusable) {\n event.preventDefault();\n lastFocusable.focus();\n }\n return;\n }\n\n // if we're tabbing forward and hit the last focusable element, focus the first focusable\n if (document.activeElement === lastFocusable) {\n event.preventDefault();\n firstFocusable.focus();\n }\n};\n\nexport type OnBeforeHideInterface = {\n shouldShowMessage: boolean;\n message: string;\n};\n\nexport type ModalBaseContentProps = {\n /**\n * Class name applied to the modal root\n */\n className?: string | undefined;\n /**\n * Render the modal initially in shown state\n */\n initialShownState?: boolean;\n /**\n * The modal can be dismissed via esc button\n */\n isDismissible?: boolean;\n /**\n * Callback invoked before the modal is hidden\n */\n onBeforeHide?: (() => OnBeforeHideInterface) | undefined;\n /**\n * Callback invoked when the modal is dismissed\n */\n onHide?: ((...args: unknown[]) => unknown) | undefined;\n /**\n * Callback invoked when the modal is shown\n */\n onShow?: ((...args: unknown[]) => unknown) | undefined;\n /**\n * Optional function that exposes the `hide` function at the call site allowing\n * the option to call the `hide` function from outside of this component\n */\n render?: (attemptHide: () => unknown) => ReactNode;\n /**\n * function(show, ref) that returns a node to open the modal\n */\n toggle?:\n | ((\n show: () => unknown,\n toggleButtonRef?: RefObject<HTMLElement | null | undefined>,\n ) => ReactNode)\n | undefined;\n};\n\nconst ModalBaseContent = ({\n className,\n initialShownState = false,\n isDismissible = true,\n onBeforeHide,\n onHide,\n onShow,\n render,\n toggle,\n}: ModalBaseContentProps) => {\n const { attemptShowModal, attemptHideModal, removeModalFromQueue } = useModalProviderContext();\n const [isShown, setIsShown] = useState<boolean>(false);\n const [isShownAttempted, setIsShownAttempted] = useState(initialShownState);\n const wasJustShown = usePreviousValue(isShown);\n const hide = () => setIsShownAttempted(false);\n const show = useCallback(() => setIsShownAttempted(true), []);\n const toggleButtonRef = useRef<HTMLElement | undefined>(undefined);\n\n // TODO need to fix for SSR compat\n // eslint-disable-next-line ssr-friendly/no-dom-globals-in-react-fc\n const modalEl = document.createElement('div');\n\n modalEl.classList.add('Modal');\n\n if (isNotUndefined(className)) {\n modalEl.classList.add(className);\n }\n\n const modalRoot = useRef<HTMLElement>(modalEl);\n\n const attemptHide = useCallback(() => {\n if (isNotUndefined(onBeforeHide)) {\n const { shouldShowMessage, message } = Object(onBeforeHide()) as OnBeforeHideInterface;\n if (shouldShowMessage) {\n // eslint-disable-next-line no-alert\n const shouldProceed = window.confirm(message);\n if (!shouldProceed) {\n return;\n }\n }\n }\n\n hide();\n if (onHide) {\n onHide();\n }\n }, [onBeforeHide, onHide]);\n\n // - bind to global keyup and close the modal when escape is pressed.\n // - toggle a classname on the document body to prevent scrolling when modal is open.\n useEffect(() => {\n const onKeyup = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isDismissible) {\n attemptHide();\n }\n };\n\n if (isShown) {\n document.addEventListener('keyup', onKeyup);\n document.querySelector('body')?.classList.add(LOCKED_SCROLL_CLASSNAME);\n }\n\n return () => {\n document.removeEventListener('keyup', onKeyup);\n document.querySelector('body')?.classList.remove(LOCKED_SCROLL_CLASSNAME);\n };\n }, [isShown, attemptHide, isDismissible]);\n\n // respond to initialShownState prop changes\n useEffect(() => {\n setIsShownAttempted(initialShownState);\n }, [setIsShownAttempted, initialShownState]);\n\n // focus the first focusable element when the modal opens.\n // make sure focus doesn't leave the modal\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n keepFocusWithinModal(modalRoot, event);\n }\n };\n\n if (isShown) {\n const focusable = getFocusableElements(modalRoot.current);\n\n // if the current activeElement is in our focusable list we don't need to\n // affect focus at all\n if (!focusable.find((element) => element === document.activeElement)) {\n const firstFocusable = focusable[0];\n\n if (firstFocusable) {\n (firstFocusable as HTMLElement).focus();\n }\n }\n\n document.addEventListener('keydown', onKeyDown);\n\n if (onShow) {\n onShow();\n }\n }\n\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [isShown, onShow]);\n\n // if a ref was assigned via the `toggle` render prop, return focus to it\n // when the modal closes. this allows the user to resume where they left off\n // before opening the modal.\n useEffect(() => {\n if (!isShown && isNotNil(wasJustShown) && wasJustShown && toggleButtonRef.current) {\n toggleButtonRef.current.focus();\n }\n }, [isShown, wasJustShown]);\n\n // on mount, append this modal's portal target to the DOM. remove on unmount.\n // this allows us to render multiple modals on a page w/o them clobbering\n // each other.\n useEffect(() => {\n const modalRootEl = modalRoot.current;\n document.body.appendChild(modalRootEl);\n return () => modalRootEl.remove();\n }, []);\n\n // when component disappears, remove from\n // queue so next modal can be shown\n useEffect(\n () => () => {\n if (isUndefined(removeModalFromQueue)) {\n return;\n }\n removeModalFromQueue(setIsShown);\n },\n [removeModalFromQueue],\n );\n\n // when isShownAttempted changes, notify provider.\n useEffect(() => {\n if (isShownAttempted && isNotUndefined(attemptShowModal)) {\n attemptShowModal(setIsShown);\n } else {\n if (isUndefined(attemptHideModal)) {\n return;\n }\n attemptHideModal(setIsShown);\n }\n }, [attemptShowModal, attemptHideModal, isShownAttempted]);\n\n if (!attemptShowModal || !attemptHideModal || !removeModalFromQueue) {\n return null;\n }\n\n return (\n <>\n <GlobalStyle />\n {isNotUndefined(toggle) && toggle(show, toggleButtonRef)}\n {createPortal(\n <ModalAnimation>\n {isShown && isNotUndefined(render) ? render(attemptHide) : undefined}\n </ModalAnimation>,\n modalRoot.current,\n )}\n </>\n );\n};\n\nexport const ModalBase = (props: ModalBaseContentProps) => {\n const modalProviderContext = useModalProviderContext();\n if (!isEqual(modalProviderContext, {})) {\n return <ModalBaseContent {...props} />;\n }\n\n return (\n <ModalProvider>\n <ModalBaseContent {...props} />\n </ModalProvider>\n );\n};\n\nModalBase.displayName = 'ModalBase_VHS';\n","import type { ReactNode, ReactElement, JSX } from 'react';\nimport { Children } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport { isNotNil } from '@wistia/type-guards';\n\nconst TRANSITION_TIME = 100;\n\nexport type ModalAnimationProps = {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode | undefined;\n};\n\nexport const ModalAnimation = ({ children }: ModalAnimationProps): JSX.Element => {\n const kids = Children.map(children, (child) => child)?.filter(Boolean) as ReactElement[]; // eslint-disable-line @typescript-eslint/promise-function-async\n\n return (\n <AnimatePresence>\n {isNotNil(kids)\n ? kids.map((child) => (\n <motion.div\n key={child.key}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n initial={{ opacity: 0 }}\n style={{ willChange: 'auto' }}\n transition={{ duration: TRANSITION_TIME / 1000 }}\n >\n {child}\n </motion.div>\n ))\n : null}\n </AnimatePresence>\n );\n};\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNil } from '@wistia/type-guards';\nimport { mq } from '../../helpers/mq';\n\nexport type ButtonGroupComponentProps = {\n $align: 'center' | 'left' | 'right';\n $fullWidth: boolean;\n};\n\nexport type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Align buttons to the left or right of their container\n */\n align?: 'center' | 'left' | 'right';\n /**\n * Buttons that will be rendered in grouping\n */\n children?: ReactNode;\n /**\n * Force ButtonGroup to fill the width of it's container\n */\n fullWidth?: boolean;\n};\n\nconst getAlignment = (align: string) => {\n if (align === 'center') {\n return 'center';\n }\n if (align === 'left') {\n return 'flex-start';\n }\n if (align === 'right') {\n return 'flex-end';\n }\n return undefined;\n};\n\nconst ButtonGroupComponent = styled.div<ButtonGroupComponentProps>`\n display: flex;\n\n /* this helps ensure that primary buttons appear at the top of the column */\n flex-direction: ${({ $align }) => ($align === 'right' ? 'column-reverse' : 'column')};\n gap: ${({ theme }) => theme.buttonGroup.gap};\n justify-content: ${({ $align }) => getAlignment($align)};\n width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};\n\n ${mq.smAndUp} {\n flex-direction: row;\n }\n\n button,\n input,\n a,\n .MenuButton {\n width: 100%;\n\n ${mq.smAndUp} {\n width: auto;\n }\n }\n`;\n\nexport const ButtonGroup = ({\n children,\n align = 'left',\n fullWidth = false,\n ...otherProps\n}: ButtonGroupProps): JSX.Element | null => {\n if (isNil(children)) {\n return null;\n }\n\n return (\n <ButtonGroupComponent\n $align={align}\n $fullWidth={fullWidth}\n {...otherProps}\n >\n {children}\n </ButtonGroupComponent>\n );\n};\n\nButtonGroup.displayName = 'ButtonGroup_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX, ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport { styled, css } from 'styled-components';\nimport { ellipsisStyle } from '../Ellipsis';\n\nconst alignMap = {\n left: 'left',\n right: 'right',\n center: 'center',\n justify: 'justify',\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst renderMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n div: 'div',\n label: 'label',\n p: 'p', // eslint-disable-line id-length\n pre: 'pre',\n span: 'span',\n};\n\nconst headline1TextStyle = css`\n font-family: ${({ theme }) => theme.headline.family};\n font-size: 24px;\n font-weight: ${({ theme }) => theme.headline.headline1.weight};\n line-height: 1.25;\n`;\n\nconst headline2TextStyle = css`\n font-family: ${({ theme }) => theme.headline.family};\n font-size: 20px;\n font-weight: ${({ theme }) => theme.headline.headline2.weight};\n line-height: 1.25;\n`;\n\nconst headline3TextStyle = css`\n font-family: ${({ theme }) => theme.headline.family};\n font-size: 16px;\n font-weight: ${({ theme }) => theme.headline.headline3.weight};\n line-height: 1.25;\n`;\n\nconst overlineTextStyle = css`\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n line-height: 1.25;\n text-transform: uppercase;\n`;\n\nconst body1TextStyle = css`\n font-size: 16px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nconst body2TextStyle = css`\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nconst captionTextStyle = css`\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nconst subtitle1TextStyle = css`\n font-size: 16px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n line-height: 1.5;\n`;\n\nconst subtitle2TextStyle = css`\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n line-height: 1.5;\n`;\n\nconst monospaceTextStyle = css`\n font-family: ${({ theme }) => theme.font.family.monospace};\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nexport const variantStyleMap = {\n headline1: headline1TextStyle,\n headline2: headline2TextStyle,\n headline3: headline3TextStyle,\n overline: overlineTextStyle,\n body1: body1TextStyle,\n body2: body2TextStyle,\n caption: captionTextStyle,\n subtitle1: subtitle1TextStyle,\n subtitle2: subtitle2TextStyle,\n monospace: monospaceTextStyle,\n};\n\nexport type TextComponentProps = {\n $align: keyof typeof alignMap;\n $bold: boolean;\n $colorOverride?: string | undefined;\n $disabled: boolean;\n $ellipsis: boolean;\n $inline: boolean;\n $italic: boolean;\n $preventUserSelect: boolean;\n as: keyof typeof renderMap;\n $variant: keyof typeof variantStyleMap;\n};\n\nexport type TextProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The horizontal alignment\n * <br />\n * _Note: this only affects block elements_\n */\n align?: keyof typeof alignMap;\n /**\n * Displays text as bold type\n */\n bold?: boolean;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode | undefined;\n /**\n * Allows user to override default button colors\n */\n colorOverride?: string;\n /**\n * Used to indicate text is part of a \"disabled\" UI\n */\n disabled?: boolean;\n /**\n * Attempt to keep the text to a single line by truncating with an ellipsis\n * <br />\n * _Note: this only affects block elements_\n */\n ellipsis?: boolean;\n /**\n * Display the text as inline content\n */\n inline?: boolean;\n /**\n * Displays text as italic type\n */\n italic?: boolean;\n /**\n * Prevents text from being highlighted and copied\n */\n preventUserSelect?: boolean;\n /**\n * The type of html element to render as\n */\n renderAs?: keyof typeof renderMap;\n /**\n * The text style to display\n */\n variant?: keyof typeof variantStyleMap;\n};\n\nconst TextComponent = styled.div<TextComponentProps>`\n color: ${({ theme, $colorOverride }) => $colorOverride ?? theme.color.grey900};\n font-style: normal;\n margin: 0;\n ${({ $variant }) => variantStyleMap[$variant]}\n ${({ $ellipsis }) => $ellipsis && ellipsisStyle};\n ${({ $bold }) =>\n $bold &&\n css`\n font-weight: ${({ theme }) => theme.font.weight.bold} !important;\n `}\n ${({ $italic }) =>\n $italic &&\n css`\n font-style: italic;\n `}\n ${({ $inline }) =>\n $inline &&\n css`\n display: inline-block;\n `}\n ${({ $disabled }) =>\n $disabled &&\n css`\n opacity: 0.5;\n `}\n ${({ $preventUserSelect }) =>\n $preventUserSelect &&\n css`\n user-select: none;\n `}\n ${({ $align }) => css`\n text-align: ${alignMap[$align]};\n `}\n ${({ as, theme }) =>\n as === 'p' &&\n css`\n display: block;\n margin-bottom: ${theme.spacing.space05};\n `}\n`;\n\nexport const Text = forwardRef(\n (\n {\n align = 'left',\n bold = false,\n children,\n colorOverride,\n disabled = false,\n ellipsis = false,\n inline = false,\n italic = false,\n preventUserSelect = false,\n renderAs = 'div',\n variant = 'body1',\n ...otherProps\n }: TextProps,\n ref: ForwardedRef<HTMLElement>,\n ): JSX.Element => (\n <TextComponent\n ref={ref}\n $align={align}\n $bold={bold}\n $colorOverride={colorOverride}\n $disabled={disabled}\n $ellipsis={ellipsis}\n $inline={inline}\n $italic={italic}\n $preventUserSelect={preventUserSelect}\n $variant={variant}\n as={renderAs}\n {...otherProps}\n >\n {children}\n </TextComponent>\n ),\n);\n\nText.displayName = 'Text_VHS';\n","import type { ReactNode, ComponentPropsWithoutRef, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\n\nexport const ellipsisStyle = css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n /*\n Using feature detection (i.e., -webkit-named-image) we only target Safari browsers\n with this additional styling to prevent a bug that's exclusive to Safari.\n\n Note that Safari does not properly hide the truncated text for non-inline/inline-block\n elements so we need to apply display: inline to all the paragraphs in the description.\n see https://stackoverflow.com/a/70683084\n */\n @supports (background: - webkit-named-image(i)) {\n & > div > div:has(p) {\n margin-top: 16px;\n }\n\n & > div > div > p {\n display: inline;\n }\n }\n`;\n\n// so that flex children will truncate too\nexport const ellipsisFlexParentStyle = css`\n min-width: 0;\n`;\n\nexport type EllipsisComponentProps = {\n lines: number | undefined;\n};\n\nconst EllipsisComponent = styled.div<EllipsisComponentProps>`\n ${ellipsisStyle};\n ${({ lines }) => {\n if (isNotNil(lines)) {\n return css`\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ${lines};\n display: -webkit-box;\n white-space: initial;\n `;\n }\n return undefined;\n }}\n`;\n\nexport type EllipsisProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The text that will be truncated with an ellipsis\n */\n children?: ReactNode;\n /**\n * The number that will be truncated with an ellipsis\n */\n lines?: number;\n};\n\nexport const Ellipsis = ({ children, lines, ...otherProps }: EllipsisProps): JSX.Element => (\n <EllipsisComponent\n lines={lines}\n {...otherProps}\n >\n {children}\n </EllipsisComponent>\n);\n\nEllipsis.displayName = 'Ellipsis_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\n\nconst alignVerticalMap = {\n normal: 'normal',\n top: 'start',\n center: 'center',\n bottom: 'end',\n};\n\nconst alignHorizontalMap = {\n normal: 'normal',\n left: 'start',\n center: 'center',\n right: 'end',\n};\n\nexport type BackdropComponentProps = {\n $alignHorizontal: keyof typeof alignHorizontalMap;\n $alignVertical: keyof typeof alignVerticalMap;\n $backgroundColor: string;\n $elevated: boolean;\n};\n\nexport type BackdropProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Optional prop to align the child content along the horizontal axis\n */\n alignHorizontal?: keyof typeof alignHorizontalMap;\n /**\n * Optional prop to align the child content along the vertical axis\n */\n alignVertical?: keyof typeof alignVerticalMap;\n /**\n * Color of the backdrop\n */\n backgroundColor?: string;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * increase the z-index (workaround for ActionModals called within Menu)\n */\n elevated?: boolean;\n};\n\nconst BackdropComponent = styled.div<BackdropComponentProps>`\n align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};\n background: ${({ $backgroundColor }) => $backgroundColor};\n bottom: 0;\n display: grid;\n justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};\n left: 0;\n overflow-y: auto;\n position: fixed;\n right: 0;\n top: 0;\n z-index: ${({ theme, $elevated }) =>\n $elevated ? theme.zIndex.BackdropElevated : theme.zIndex.Backdrop};\n`;\n\nexport const Backdrop = ({\n alignHorizontal = 'normal',\n alignVertical = 'normal',\n backgroundColor = 'rgba(0, 0, 0, 0.4)',\n children,\n elevated = false,\n ...otherProps\n}: BackdropProps): JSX.Element => (\n <BackdropComponent\n $alignHorizontal={alignHorizontal}\n $alignVertical={alignVertical}\n $backgroundColor={backgroundColor}\n $elevated={elevated}\n {...otherProps}\n >\n {children}\n </BackdropComponent>\n);\n\nBackdrop.displayName = 'Backdrop_VHS';\n","import type { ComponentPropsWithRef, ReactNode, MouseEvent, JSX } from 'react';\nimport { forwardRef, useMemo } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled, css } from 'styled-components';\nimport { transparentize } from 'polished';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { buttonResetStyle } from '../Button/ButtonStyledComponent';\nimport { ScreenReaderOnly } from '../ScreenReaderOnly';\nimport { Tooltip } from '../Tooltip';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\n// size in pixels\nexport const sizeMap = {\n sm: '12',\n md: '16',\n lg: '24',\n};\n\n// styles\nexport const componentStyleMap = {\n light: 'light',\n dark: 'dark',\n};\n\ntype sizeType = keyof typeof sizeMap;\ntype componentStyleType = keyof typeof componentStyleMap;\n\nconst smSizeStyle = css`\n max-height: 16px;\n max-width: 16px;\n min-height: 16px;\n min-width: 16px;\n\n svg {\n max-height: 12px;\n max-width: 12px;\n min-height: 12px;\n min-width: 12px;\n }\n`;\n\nconst mdSizeStyle = css`\n max-height: 24px;\n max-width: 24px;\n min-height: 24px;\n min-width: 24px;\n\n svg {\n max-height: 16px;\n max-width: 16px;\n min-height: 16px;\n min-width: 16px;\n }\n`;\n\nconst lgSizeStyle = css`\n max-height: 32px;\n max-width: 32px;\n min-height: 32px;\n min-width: 32px;\n\n svg {\n max-height: 24px;\n max-width: 24px;\n min-height: 24px;\n min-width: 24px;\n }\n`;\n\n/* eslint-disable @typescript-eslint/no-magic-numbers */\nconst disabledStyle = css<{ $iconButtonColor: string }>`\n cursor: not-allowed;\n\n svg {\n color: ${({ $iconButtonColor }) => transparentize(0.5, $iconButtonColor)};\n }\n\n &:hover,\n &:focus {\n background-color: transparent;\n\n svg {\n color: ${({ $iconButtonColor }) => transparentize(0.5, $iconButtonColor)};\n }\n }\n`;\n\nconst iconButtonStyle = css<{ $iconButtonColor: string }>`\n background-color: ${({ $iconButtonColor }) => transparentize(1, $iconButtonColor)};\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n svg {\n color: ${({ $iconButtonColor }) => $iconButtonColor};\n }\n\n &:hover,\n &:focus-visible {\n background-color: ${({ $iconButtonColor }) => transparentize(0.8, $iconButtonColor)};\n\n svg {\n color: ${({ $iconButtonColor }) => $iconButtonColor};\n }\n }\n\n &:active {\n background-color: ${({ $iconButtonColor }) => transparentize(0.6, $iconButtonColor)};\n\n svg {\n color: ${({ $iconButtonColor }) => $iconButtonColor};\n }\n }\n`;\n/* eslint-enable @typescript-eslint/no-magic-numbers */\n\nconst getIconButtonColor = (\n colorOverride: string | undefined,\n componentStyle: componentStyleType,\n allThemeColors: DefaultTheme['color'],\n): string => {\n if (isNonEmptyString(colorOverride)) {\n return colorOverride;\n }\n if (componentStyle === 'dark') {\n return allThemeColors.grey700;\n }\n return '#fff';\n};\n\ntype IconButtonComponentProps = {\n $componentStyle: componentStyleType;\n disabled?: boolean;\n $iconButtonColor: string;\n size: sizeType;\n};\n\nconst IconButtonComponent = styled.button<IconButtonComponentProps>`\n ${buttonResetStyle}\n ${iconButtonStyle}\n transition: all ${({ theme }) => theme.duration.productive.moderate};\n ${({ disabled }) => (disabled ? disabledStyle : undefined)}\n ${({ size }) => {\n if (size === 'sm') {\n return smSizeStyle;\n }\n if (size === 'md') {\n return mdSizeStyle;\n }\n return lgSizeStyle;\n }};\n`;\n\nexport type IconButtonProps = ComponentPropsWithRef<'button'> & {\n /**\n * Allows user to override default button colors\n */\n colorOverride?: string | undefined;\n /**\n * Choose light styles if this component appears on a dark background\n */\n componentStyle?: componentStyleType;\n /**\n * Disables button\n */\n disabled?: boolean;\n /**\n * An SVG component\n */\n icon?: ReactNode;\n /**\n * Text that appears as a tooltip when the user hovers over the button\n */\n label?: string;\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: ((event: MouseEvent) => void) | undefined;\n /**\n * Prevent a Tooltip from appearing on hover\n */\n preventTooltip?: boolean;\n /**\n * The size of the button\n */\n size?: sizeType;\n /**\n * The direction of the tooltip\n */\n tooltipDirection?: 'bottom' | 'left' | 'right' | 'top';\n};\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n colorOverride,\n componentStyle = 'dark',\n disabled = false,\n icon,\n label,\n onClick,\n preventTooltip = false,\n size = 'md',\n tooltipDirection = 'top',\n ...otherProps\n }: IconButtonProps,\n ref,\n ): JSX.Element => {\n const iconButtonColor = getIconButtonColor(colorOverride, componentStyle, useThemeColor());\n\n const Button = useMemo(\n () => (\n <IconButtonComponent\n ref={ref}\n $componentStyle={componentStyle}\n $iconButtonColor={iconButtonColor}\n disabled={disabled}\n onClick={onClick}\n size={size}\n {...otherProps}\n >\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{icon}</>\n <ScreenReaderOnly>{label}</ScreenReaderOnly>\n </IconButtonComponent>\n ),\n [componentStyle, disabled, icon, iconButtonColor, label, onClick, otherProps, ref, size],\n );\n\n if (preventTooltip) {\n return Button;\n }\n\n return (\n <Tooltip\n direction={tooltipDirection}\n label={label}\n >\n {Button}\n </Tooltip>\n );\n },\n);\n\nIconButton.displayName = 'IconButton_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { styled, css } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\n\n// https://hugogiraudel.com/2016/10/13/css-hide-and-seek/\nexport const screenReaderOnlyStyle = css`\n border: 0;\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n\nconst VisuallyHidden = styled.div`\n ${screenReaderOnlyStyle}\n`;\n\nconst VisuallyHiddenButFocusable = styled.div`\n &:not(:focus-within) {\n ${screenReaderOnlyStyle}\n }\n`;\n\nexport type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Display content _only_ when it's focused.\n */\n focusable?: boolean;\n /**\n * The text that will appear to screenreaders but not be displayed on screen\n * (alternatively you can pass children)\n */\n text?: ReactNode;\n};\n\nexport const ScreenReaderOnly = ({\n text,\n children,\n focusable = false,\n ...otherProps\n}: ScreenReaderOnlyProps) => {\n const accessibleText = isNotNil(text) ? text : children;\n\n if (focusable) {\n return (\n <VisuallyHiddenButFocusable {...otherProps}>{accessibleText}</VisuallyHiddenButFocusable>\n );\n }\n\n return <VisuallyHidden {...otherProps}>{accessibleText}</VisuallyHidden>;\n};\n\nScreenReaderOnly.displayName = 'ScreenReaderOnly_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { useEffect, useState, useRef, useMemo, useId } from 'react';\nimport { styled } from 'styled-components';\nimport { isString } from '@wistia/type-guards';\nimport { TooltipContent } from './TooltipContent';\nimport { Truncate } from '../Truncate';\n\nconst TooltipWrapper = styled.div`\n display: inline-block;\n position: relative;\n width: inherit;\n`;\n\nexport type TooltipProps = Omit<ComponentPropsWithoutRef<'div'>, 'id'> & {\n /**\n * The node that will be wrapped by the Tooltip\n */\n children: ReactNode;\n /**\n * Where the tooltip should appear in relation to wrapped component\n */\n direction?: 'bottom' | 'left' | 'right' | 'top';\n /**\n * Length of time to wait before dismissing Tooltip for click eventType\n */\n duration?: boolean | number | string;\n /**\n * The type of event that triggers display of Tooltip\n */\n eventType?: 'click' | 'hover';\n /**\n * @ignore\n * Force a Tooltip to display it's content without user interaction (for debugging)\n */\n forceState?: 'open' | undefined;\n /**\n * ID for tooltip (automatically created if omitted)\n */\n id?: string | null | undefined;\n /**\n * The content that will appear in the Tooltip popup\n */\n label: ReactNode;\n /**\n * The maximum number of characters to display inside the Tooltip\n */\n maxChars?: number | null;\n /**\n * Whether content within the label should wrap\n */\n shouldWrap?: boolean;\n /**\n * Color to override background of the tooltip.\n */\n backgroundColorOverride?: string;\n /**\n * Color to override font color of the tooltip.\n */\n fontColorOverride?: string;\n};\n\nexport const Tooltip = ({\n label,\n direction = 'top',\n duration = 2000,\n eventType = 'hover',\n forceState = undefined,\n maxChars = null,\n children,\n id = null,\n shouldWrap = false,\n backgroundColorOverride,\n fontColorOverride,\n ...otherProps\n}: TooltipProps): JSX.Element => {\n const [active, setActive] = useState(false);\n // a11y id generation to associate tooltip labels\n const generatedId = `vhs-tooltip-${useId()}`;\n const tooltipID = useMemo(() => id ?? generatedId, [id, generatedId]);\n const tooltipEl = useRef<HTMLDivElement | null>(null);\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const startTimer = () => {\n if (timer.current) {\n clearTimeout(timer.current);\n }\n timer.current = setTimeout(() => {\n setActive(false);\n }, duration as number);\n };\n\n const handleClick = () => {\n setActive(true);\n // we should revisit this logic and the lint disable at some point in the future, but I don't want to change the logic during TS conversion\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (duration) {\n clearTimeout(timer.current ?? undefined);\n startTimer();\n }\n };\n\n const handleMouseOver = () => setActive(true);\n const handleMouseLeave = () => setActive(false);\n const handleFocus = () => handleClick();\n const handleBlur = () => setActive(false);\n\n useEffect(() => {\n const handleWindowClick = (event: Event) => {\n if (active) {\n if (tooltipEl.current === null || tooltipEl.current.contains(event.target as Node)) {\n return;\n }\n setActive(false);\n }\n };\n\n // if no duration is set then we need to listen for a click \"outside\" of\n // the tooltip in order to dismiss it\n // TODO should `esc` also dismiss? what happens with a tooltip inside a modal?\n // we should revisit this logic and the lint disable at some point in the future, but I don't want to change the logic during TS conversion\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (!duration) {\n document.addEventListener('mousedown', handleWindowClick, false);\n }\n\n return () => {\n if (timer.current) {\n clearTimeout(timer.current);\n }\n document.removeEventListener('mousedown', handleWindowClick, false);\n };\n }, [active, timer, duration]);\n\n // edge case: prop-type warnings should catch most of these but you could\n // potentially have a situation where an empty string was provided, and we\n // don't want to display an empty tooltip bubble\n\n if (isString(label) && !label.length) {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n }\n\n let tooltipLabel = label;\n\n if (maxChars !== null) {\n tooltipLabel = (\n <Truncate\n breakOnWords={true}\n maxChars={maxChars}\n >\n {label as string}\n </Truncate>\n );\n }\n\n // hover vs click tooltips have some shared props & some unique props\n const getProps = () => {\n const hoverProps = {\n onFocus: handleFocus,\n onMouseLeave: handleMouseLeave,\n onMouseOver: handleMouseOver,\n onBlur: handleBlur,\n };\n\n const clickProps = {\n onClick: handleClick,\n ref: tooltipEl,\n };\n\n if (eventType === 'hover') {\n return hoverProps;\n }\n return clickProps;\n };\n\n return (\n <TooltipWrapper\n aria-labelledby={tooltipID}\n role=\"tooltip\"\n {...getProps()}\n {...otherProps}\n >\n <TooltipContent\n active={active}\n backgroundColorOverride={backgroundColorOverride}\n direction={direction}\n fontColorOverride={fontColorOverride}\n forceState={forceState}\n id={tooltipID}\n shouldWrap={shouldWrap}\n >\n {tooltipLabel}\n </TooltipContent>\n {children}\n </TooltipWrapper>\n );\n};\n\nTooltip.displayName = 'Tooltip_VHS';\n","import type { ReactNode } from 'react';\nimport { styled, css } from 'styled-components';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\ntype TooltipContentProps = {\n active: boolean;\n children: ReactNode;\n direction: 'bottom' | 'left' | 'right' | 'top';\n forceState?: string | undefined;\n id?: string | undefined;\n shouldWrap: boolean;\n backgroundColorOverride: string | undefined;\n fontColorOverride: string | undefined;\n};\n\nconst ARROW_SIZE = 8;\n\nconst StyledTooltipLabel = styled.div<{ $fontColorOverride: string | undefined }>`\n color: ${({ $fontColorOverride }) => $fontColorOverride ?? 'white'};\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 18px;\n padding: ${({ theme }) => theme.spacing.space03};\n position: relative;\n\n a {\n color: white;\n }\n\n &::after {\n border: solid transparent;\n border-width: ${ARROW_SIZE}px;\n content: ' ';\n height: 0;\n margin-left: -${ARROW_SIZE}px;\n pointer-events: none;\n position: absolute;\n width: 0;\n }\n`;\n\nconst tooltipTopStyle = css<{ $backgroundColor: string }>`\n left: 50%;\n top: -10px;\n transform: translate(-50%, -100%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-top-color: ${({ $backgroundColor }) => $backgroundColor};\n left: 50%;\n top: 100%;\n }\n }\n`;\n\nconst tooltipBottomStyle = css<{ $backgroundColor: string }>`\n bottom: -10px;\n left: 50%;\n transform: translate(-50%, 100%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-bottom-color: ${({ $backgroundColor }) => $backgroundColor};\n left: 50%;\n top: -${ARROW_SIZE * 2}px;\n }\n }\n`;\n\nconst tooltipLeftStyle = css<{ $backgroundColor: string }>`\n left: calc(-${ARROW_SIZE}px - 5px);\n top: 50%;\n transform: translate(-100%, -50%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-left-color: ${({ $backgroundColor }) => $backgroundColor};\n left: 100%;\n margin-left: 0;\n margin-top: -${ARROW_SIZE}px;\n top: 50%;\n }\n }\n`;\n\nconst tooltipRightStyle = css<{ $backgroundColor: string }>`\n right: calc(-${ARROW_SIZE}px - 5px);\n top: 50%;\n transform: translate(100%, -50%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-right-color: ${({ $backgroundColor }) => $backgroundColor};\n margin-left: 0;\n margin-top: -${ARROW_SIZE}px;\n right: 100%;\n top: 50%;\n }\n }\n`;\n\ntype StyledTooltipContentProps = {\n $active: boolean;\n $direction: 'bottom' | 'left' | 'right' | 'top';\n $fontColorOverride: string | undefined;\n $forceState?: string | undefined;\n id?: string | undefined;\n $shouldWrap: boolean;\n $backgroundColor: string;\n};\n\nconst StyledTooltipContent = styled.div<StyledTooltipContentProps>`\n background: ${({ $backgroundColor }) => $backgroundColor};\n border: solid 1px ${({ $backgroundColor }) => $backgroundColor};\n border-radius: 4px;\n color: ${({ $fontColorOverride }) => $fontColorOverride ?? 'white'};\n display: ${({ $active, $forceState }) => ($active || $forceState === 'open' ? 'block' : 'none')};\n position: absolute;\n transition: all ${({ theme }) => theme.duration.productive.moderate};\n z-index: ${({ theme }) => theme.zIndex.Tooltip};\n\n * {\n margin: 0;\n white-space: ${({ $shouldWrap }) => ($shouldWrap ? 'normal' : 'nowrap')};\n }\n\n ${({ $direction }) => {\n switch ($direction) {\n case 'top':\n return tooltipTopStyle;\n case 'bottom':\n return tooltipBottomStyle;\n case 'left':\n return tooltipLeftStyle;\n case 'right':\n return tooltipRightStyle;\n default:\n return undefined;\n }\n }}\n`;\n\nexport const TooltipContent = ({\n id,\n active,\n direction,\n children,\n forceState,\n shouldWrap,\n backgroundColorOverride,\n fontColorOverride,\n}: TooltipContentProps) => {\n const backgroundColor = useThemeColor('grey900');\n\n return (\n <StyledTooltipContent\n $active={active}\n $backgroundColor={backgroundColorOverride ?? backgroundColor}\n $direction={direction}\n $fontColorOverride={fontColorOverride}\n $forceState={forceState}\n $shouldWrap={shouldWrap}\n aria-hidden={!active}\n data-testid=\"tooltip-content\"\n id={id}\n >\n <StyledTooltipLabel $fontColorOverride={fontColorOverride}>{children}</StyledTooltipLabel>\n </StyledTooltipContent>\n );\n};\n","import { isString, isNil } from '@wistia/type-guards';\nimport type { JSX } from 'react';\n\nexport type TruncateProps = {\n /**\n * Prevent ellipsis from truncating mid-word\n */\n breakOnWords?: boolean;\n /**\n * The string to be truncated\n */\n children: string | null | undefined;\n /**\n * The maximum number of characters to display inside the Tooltip\n */\n maxChars: number;\n /**\n * A string to append to the truncated string\n */\n terminator?: string;\n};\n\nexport const Truncate = ({\n children,\n maxChars,\n terminator = '...',\n breakOnWords = false,\n}: TruncateProps): JSX.Element | null => {\n // don't render anything if there's no children\n if (isNil(children)) {\n return null;\n }\n\n const canBeTruncated = children.length + terminator.length >= maxChars;\n\n // types will warn about these but we can avoid blowing up\n // the page in case console warnings are ignored\n\n if (!isString(children) || maxChars <= 0 || !canBeTruncated) {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n }\n\n let truncatedChild = children.slice(0, maxChars - terminator.length);\n\n if (breakOnWords) {\n const index = Math.max(truncatedChild.lastIndexOf(' '), truncatedChild.lastIndexOf('\\n'));\n truncatedChild = truncatedChild.slice(0, index);\n }\n\n // don't allow truncated string to end in a space before ellipsis\n truncatedChild = `${truncatedChild.trim()}${terminator}`;\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{truncatedChild}</>;\n};\n\nTruncate.displayName = 'Truncate_VHS';\n","import type { MouseEvent, JSX } from 'react';\nimport { Icon } from '../../../components/Icon';\nimport { IconButton } from '../../../components/IconButton';\n\nexport type ModalCloseButtonProps = {\n /**\n * Callback invoked when the button is clicked\n */\n onClick?: (event: MouseEvent) => void;\n /**\n * Allows user to override default icon color\n */\n closeIconColorOverride?: string | undefined;\n};\n\nexport const ModalCloseButton = ({\n onClick,\n closeIconColorOverride,\n}: ModalCloseButtonProps): JSX.Element => (\n <IconButton\n aria-label=\"Close\"\n colorOverride={closeIconColorOverride}\n icon={\n <Icon\n size=\"sm\"\n type=\"close\"\n />\n }\n onClick={onClick}\n preventTooltip={true}\n style={{ position: 'absolute', right: '16px', top: '16px', zIndex: 1 }}\n />\n);\n\nModalCloseButton.displayName = 'ModalCloseButton';\n","import { css } from 'styled-components';\nimport { getBackgroundGradient } from '../../helpers/getBackgroundGradient';\n\nexport const getModalBackgroundGradient = (illustrationBackgroundColor: string) => {\n switch (illustrationBackgroundColor) {\n case 'green':\n return getBackgroundGradient('green');\n case 'pink':\n return getBackgroundGradient('pink');\n case 'purple':\n return getBackgroundGradient('purple');\n case 'yellow':\n return getBackgroundGradient('yellow');\n case 'brandBlue':\n return getBackgroundGradient('defaultLightOne');\n case 'blue':\n return getBackgroundGradient('defaultLightOne');\n default:\n return css`\n background-color: ${illustrationBackgroundColor};\n `;\n }\n};\n","import type { JSX, ComponentPropsWithoutRef } from 'react';\nimport { useMemo, useState, useEffect } from 'react';\nimport { isNil } from '@wistia/type-guards';\nimport { styled } from 'styled-components';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { generateContactAvatarColors } from './generateContactAvatarColors';\nimport { formatInitialsForDisplay } from './formatInitialsForDisplay';\n\nexport type AvatarInstanceType = 'image' | 'initials';\n\ntype AvatarImageLoadState = 'error' | 'loaded' | 'loading';\n\ntype AvatarWrapperProps = {\n $maxHeight: number;\n};\n\ntype InitialsContainerProps = {\n $backgroundColor: string;\n $heightAndWidth: number;\n};\n\nexport type AvatarProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The height and width of the avatar\n */\n heightAndWidth?: number;\n /**\n * The URL of the image to display\n */\n imageUrl?: string | null;\n /**\n * Initials to display if no image is provided\n *\n * _note: only first initial shown regardless of characters provided_\n */\n initials?: string | null;\n /**\n * A string that will deterministicly set the background color of the avatar\n */\n name?: string | null;\n /**\n * A callback that is invoked after the image has loaded or failed to load\n */\n onImageLoad?: (avatarType: AvatarInstanceType) => void;\n};\n\nconst AvatarImage = styled.img<{\n $heightAndWidth: number;\n}>`\n align-items: center;\n background-color: white;\n border-radius: 50%;\n color: white;\n display: flex;\n height: ${({ $heightAndWidth }) => $heightAndWidth}px;\n justify-content: center;\n object-fit: cover;\n overflow: hidden;\n pointer-events: none;\n user-select: none;\n width: ${({ $heightAndWidth }) => $heightAndWidth}px;\n border: ${({ theme }) => `2px solid ${theme.color.grey200}`};\n\n a:hover & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 25%);\n }\n\n a:active & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 50%);\n }\n`;\n\nconst fontSizeScaleMultiplier = 0.55;\n\nconst InitialsContainer = styled.div<InitialsContainerProps>`\n align-items: center;\n background-color: ${({ $backgroundColor }) => $backgroundColor};\n border-radius: 50%;\n color: white;\n display: flex;\n font-size: ${({ $heightAndWidth }) => $heightAndWidth * fontSizeScaleMultiplier}px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n height: ${({ $heightAndWidth }) => $heightAndWidth}px;\n justify-content: center;\n overflow: hidden;\n width: ${({ $heightAndWidth }) => $heightAndWidth}px;\n\n a:hover & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 25%);\n }\n\n a:active & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 50%);\n }\n`;\n\nconst AvatarWrapper = styled.div<AvatarWrapperProps>`\n max-height: ${({ $maxHeight }) => $maxHeight}px;\n`;\n\nexport const Avatar = ({\n imageUrl,\n heightAndWidth = 24,\n initials,\n name,\n onImageLoad,\n ...otherProps\n}: AvatarProps): JSX.Element => {\n const [imageLoadState, setImageLoadState] = useState<AvatarImageLoadState | null>(null);\n const themeColors = useThemeColor();\n\n const avatarColor = useMemo(() => {\n if (isNil(name) || name === 'Anonymous') {\n return themeColors.grey600;\n }\n\n return generateContactAvatarColors({\n seed: name,\n themeColors,\n })[0];\n }, [name, themeColors]);\n\n useEffect(() => {\n setImageLoadState(null);\n }, [imageUrl]);\n\n const handleImageLoad = () => {\n setImageLoadState('loaded');\n onImageLoad?.('image');\n };\n\n const handleImageLoadError = () => {\n setImageLoadState('error');\n onImageLoad?.('initials');\n };\n\n const showInitials = isNil(imageUrl) || imageLoadState === 'error';\n\n return (\n <AvatarWrapper\n {...otherProps}\n $maxHeight={heightAndWidth}\n >\n {showInitials ? (\n <InitialsContainer\n $backgroundColor={avatarColor ?? ''}\n $heightAndWidth={heightAndWidth}\n >\n {formatInitialsForDisplay(initials)}\n </InitialsContainer>\n ) : (\n <AvatarImage\n $heightAndWidth={heightAndWidth}\n alt={name ?? 'Unavailable'}\n onError={handleImageLoadError}\n onLoad={handleImageLoad}\n src={imageUrl}\n />\n )}\n </AvatarWrapper>\n );\n};\n\nAvatar.displayName = 'Avatar_VHS';\n","/**\n * Given an ID this function will return a semi-random color from AVATAR_COLORS\n * that will persist across page loads if given the same ID value\n *\n * Logic for generating a random number from the ID value adapted from:\n * https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0\n */\n\ntype UseContactAvatarColorProps = {\n seed: string;\n themeColors: Record<string, string>;\n};\n\nconst colorVariants = {\n blue: ['blue600', 'blue700', 'blue800'],\n brandBlue: ['brandBlue600', 'brandBlue700', 'brandBlue800'],\n green: ['green600', 'green700', 'green800'],\n pink: ['pink600', 'pink700', 'pink800'],\n purple: ['purple600', 'purple700', 'purple800'],\n red: ['red600', 'red700', 'red800'],\n yellow: ['yellow700', 'yellow800', 'yellow900'],\n};\nconst colorVariantKeys = Object.keys(colorVariants);\nconst multiplier = 31;\n\nconst hashCode = (str: string) =>\n Array.from(str).reduce((sum, char) => (Math.imul(multiplier, sum) + char.charCodeAt(0)) | 0, 0); // eslint-disable-line no-bitwise\n\nexport const generateContactAvatarColors = ({\n seed,\n themeColors,\n}: UseContactAvatarColorProps): string[] => {\n const index = Math.abs(hashCode(seed)) % colorVariantKeys.length;\n const colorVariantsKeyFromIndex = colorVariantKeys[index] as keyof typeof colorVariants;\n\n return colorVariants[colorVariantsKeyFromIndex]\n .map((themeColorToken) => themeColors[themeColorToken])\n .filter((color): color is string => color !== undefined);\n};\n","import { isNil, isString, isEmptyString } from '@wistia/type-guards';\n\nconst containsEmojiCharacter = (char: string): boolean => {\n // this combines Unicode character class escape - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape\n // with the `Extended_Pictograph` property - https://unicode.org/reports/tr51/\n const emojiRegex = /<a?:.+?:\\d{18}>|\\p{Extended_Pictographic}/gu;\n\n return emojiRegex.test(char);\n};\n\nexport const formatInitialsForDisplay = (initials: string | null | undefined): string => {\n // fallback initials are `U` for User\n if (\n isNil(initials) ||\n isEmptyString(initials) ||\n (isString(initials) && containsEmojiCharacter(initials))\n ) {\n return 'U';\n }\n\n if (typeof initials !== 'string') {\n return 'U';\n }\n\n // only display the first character as initial\n const firstChar = initials.substring(0, 1);\n // always return an uppercase initial\n return firstChar.toUpperCase();\n};\n","import { styled } from 'styled-components';\nimport type { ReactNode, ComponentPropsWithoutRef } from 'react';\nimport { isString } from '@wistia/type-guards';\nimport { isObject } from '../../helpers/objectHelpers/isObject';\n\n// note: the point of this function is to make BackgroundImage behave similarly to the Image\n// component where you can just provide an image url or path via `src` prop; but we also\n// need to support the various background-image functions, including \"url\"\nconst shouldWrap = (src: string): boolean => {\n // see: https://developer.mozilla.org/en-US/docs/Web/CSS/background-image#see_also\n const imageFunctionList = [\n 'cross-fade',\n 'element',\n 'image',\n 'image-set',\n 'linear-gradient',\n 'radial-gradient',\n 'conic-gradient',\n 'repeating-linear-gradient',\n 'repeating-radial-gradient',\n 'repeating-conic-gradient',\n 'paint',\n 'url',\n ];\n return !imageFunctionList.some((imageFunction) => src.startsWith(imageFunction));\n};\n\nexport const getBackgroundImageValue = (src: string[] | string | undefined): string | undefined => {\n if (src !== undefined && Array.isArray(src)) {\n return src\n .map((imageSrc) => (shouldWrap(imageSrc) ? `url('${imageSrc}')` : imageSrc))\n .join(', ');\n }\n\n if (src !== undefined && src !== '' && isString(src)) {\n return shouldWrap(src) ? `url('${src}')` : src;\n }\n\n return undefined;\n};\n\ntype OverflowObject = {\n horizontal: string;\n vertical: string;\n};\n\nconst getOverflowStyle = (overflow: OverflowObject | string): string | undefined => {\n if (overflow !== '') {\n if (isObject(overflow)) {\n Object.keys(overflow).forEach((key) => {\n if (!['horizontal', 'vertical'].includes(key)) {\n throw new ReferenceError(\n `\"${key}\" is not a valid key for BackgroundImage component overflow prop; only \"horizontal\" or \"vertical\" allowed`,\n );\n }\n });\n return Object.entries(overflow)\n .map(([key, value]) => {\n if (key === 'horizontal') {\n return `overflow-x: ${value};`;\n }\n if (key === 'vertical') {\n return `overflow-y: ${value};`;\n }\n return undefined;\n })\n .join('');\n }\n return `overflow: ${overflow};`;\n }\n return undefined;\n};\n\ntype BackgroundImageComponentProps = {\n $bgAttachment: string;\n $bgClip: string;\n $bgColor?: string | undefined;\n $bgImage?: string[] | string | undefined;\n $bgOrigin?: string | undefined;\n $bgPosition: string;\n $bgRepeat: string;\n $bgSize: string;\n $elHeight: string;\n $elOverflow: OverflowObject | string;\n $elWidth: string;\n};\n\nconst BackgroundImageComponent = styled.div<BackgroundImageComponentProps>`\n background-attachment: ${({ $bgAttachment }) => $bgAttachment};\n background-clip: ${({ $bgClip }) => $bgClip};\n background-color: ${({ $bgColor }) => $bgColor};\n background-image: ${({ $bgImage }) => getBackgroundImageValue($bgImage)};\n background-origin: ${({ $bgOrigin }) => $bgOrigin};\n background-position: ${({ $bgPosition }) => $bgPosition};\n background-repeat: ${({ $bgRepeat }) => $bgRepeat};\n background-size: ${({ $bgSize }) => $bgSize};\n display: flex;\n height: ${({ $elHeight }) => $elHeight};\n justify-content: center;\n ${({ $elOverflow }) => getOverflowStyle($elOverflow)};\n position: relative;\n width: ${({ $elWidth }) => $elWidth};\n`;\n\nexport type BackgroundImageProps = Omit<ComponentPropsWithoutRef<'img'>, 'src'> & {\n /**\n * The content that will be rendered inside\n */\n children?: ReactNode;\n /**\n * Sets whether a background image's position is fixed within the viewport,\n * or scrolls with its containing block. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment).\n */\n attachment?: string;\n /**\n * Sets whether an element's background extends underneath its border box,\n * padding box, or content box. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip).\n */\n clip?: string;\n /**\n * Color (as hex) of the component\n */\n color?: string | undefined;\n /**\n * Height of the component\n */\n height?: string;\n /**\n * Sets the background's origin: from the border start, inside the border, or inside the padding.\n * _Note: origin is ignored when attachment is `fixed`._\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin).\n */\n origin?: string;\n /**\n * Sets the desired behavior for an element's overflow (i.e. when an element's content is\n * too big to fit in its block formatting context).\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow).\n */\n overflow?: OverflowObject | string;\n /**\n * Sets the initial position for each image; relative to the position layer\n * set by origin. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position).\n */\n position?: string;\n /**\n * Sets how background images are repeated.\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat).\n */\n repeat?: string;\n /**\n * Sets the size of the element's background image.\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size).\n */\n size?: string;\n /**\n * URL(s) to image file\n */\n src?: string[] | string;\n /**\n * Width of the component\n */\n width?: string;\n};\n\nexport const BackgroundImage = ({\n children = undefined,\n attachment: bgAttachment = 'scroll',\n clip: bgClip = 'border-box',\n color: bgColor = undefined,\n height: elHeight = 'auto',\n origin: bgOrigin = undefined,\n overflow: elOverflow = 'hidden',\n position: bgPosition = 'center',\n repeat: bgRepeat = 'no-repeat',\n size: bgSize = 'cover',\n src: bgImage = undefined,\n width: elWidth = '100%',\n ...otherProps\n}: BackgroundImageProps) => (\n <BackgroundImageComponent\n $bgAttachment={bgAttachment}\n $bgClip={bgClip}\n $bgColor={bgColor}\n $bgImage={bgImage}\n $bgOrigin={bgOrigin}\n $bgPosition={bgPosition}\n $bgRepeat={bgRepeat}\n $bgSize={bgSize}\n $elHeight={elHeight}\n $elOverflow={elOverflow}\n $elWidth={elWidth}\n {...otherProps}\n >\n {children}\n </BackgroundImageComponent>\n);\n\nBackgroundImage.displayName = 'BackgroundImage_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { getBadgeColors } from './getBadgeColors';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { Icon } from '../Icon';\nimport type { IconNameType } from '../Icon/iconMap';\n\ntype BadgeComponentProps = {\n $textColor: string;\n $backgroundColor: string;\n $hasIcon: boolean;\n};\n\nexport type BadgeColorScheme =\n | 'brandBlue'\n | 'error'\n | 'green'\n | 'grey'\n | 'orange'\n | 'pink'\n | 'purple'\n | 'red'\n | 'success'\n | 'warning'\n | 'yellow';\n\nexport type BadgeProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The color scheme to use for the badge\n */\n colorScheme?: BadgeColorScheme;\n /**\n * The icon to display in the badge\n */\n icon?: IconNameType;\n /**\n * The text to display in the badge\n */\n label: string;\n};\n\nconst BadgeComponent = styled.div<BadgeComponentProps>`\n align-items: center;\n background: ${({ $backgroundColor }) => $backgroundColor};\n border-radius: 999px;\n color: ${({ $textColor }) => $textColor};\n display: inline-flex;\n font-size: 12px;\n font-weight: 600;\n gap: ${({ theme }) => theme.spacing.space01}; /* space between icon and label */\n padding-left: ${({ $hasIcon }) => ($hasIcon ? '4px' : '6px')};\n padding-right: 6px;\n width: fit-content;\n`;\n\nexport const Badge = ({\n colorScheme = 'brandBlue',\n label,\n icon,\n ...otherProps\n}: BadgeProps): JSX.Element => {\n const { backgroundColor, textColor } = getBadgeColors(colorScheme, useThemeColor());\n return (\n <BadgeComponent\n {...otherProps}\n $backgroundColor={backgroundColor}\n $hasIcon={isNotNil(icon)}\n $textColor={textColor}\n >\n {isNotNil(icon) && (\n <Icon\n data-testid=\"badge-icon\"\n size=\"sm\"\n type={icon}\n />\n )}\n\n <span>{label}</span>\n </BadgeComponent>\n );\n};\n\nBadge.displayName = 'Badge_VHS';\n","import type { DefaultTheme } from 'styled-components';\nimport type { BadgeColorScheme } from './Badge';\n\nexport const getBadgeColors = (\n badgeColor: BadgeColorScheme,\n allThemeColors: DefaultTheme['color'],\n): { backgroundColor: string; textColor: string } => {\n switch (badgeColor) {\n case 'error':\n return {\n backgroundColor: allThemeColors.error300,\n textColor: allThemeColors.error800,\n };\n case 'green':\n return {\n backgroundColor: allThemeColors.green300,\n textColor: allThemeColors.green800,\n };\n case 'grey':\n return {\n backgroundColor: allThemeColors.grey300,\n textColor: allThemeColors.grey1000,\n };\n case 'orange':\n return {\n backgroundColor: allThemeColors.orange200,\n textColor: allThemeColors.orange800,\n };\n case 'pink':\n return {\n backgroundColor: allThemeColors.pink300,\n textColor: allThemeColors.pink800,\n };\n case 'purple':\n return {\n backgroundColor: allThemeColors.purple300,\n textColor: allThemeColors.purple800,\n };\n case 'red':\n return {\n backgroundColor: allThemeColors.red300,\n textColor: allThemeColors.red800,\n };\n case 'success':\n return {\n backgroundColor: allThemeColors.success200,\n textColor: allThemeColors.success800,\n };\n case 'warning':\n return {\n backgroundColor: allThemeColors.warning300,\n textColor: allThemeColors.warning800,\n };\n case 'yellow':\n return {\n backgroundColor: allThemeColors.yellow200,\n textColor: allThemeColors.yellow800,\n };\n case 'brandBlue':\n default:\n return {\n backgroundColor: allThemeColors.brandBlue200,\n textColor: allThemeColors.brandBlue700,\n };\n }\n};\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { Body, RightGutter, Title } from './BannerChildComponents';\nimport { mq } from '../../helpers/mq';\n\ntype BannerComponentProps = {\n backgroundColor?: string | undefined;\n};\n\nconst BannerComponent = styled.div<BannerComponentProps>`\n background: ${({ theme, backgroundColor }) => backgroundColor ?? theme.color.grey200};\n border-radius: 8px;\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n padding: ${({ theme }) => `${theme.spacing.space04} ${theme.spacing.space05}`};\n`;\n\nconst IconWrapper = styled.div`\n align-items: center;\n display: flex;\n margin-right: ${({ theme }) => theme.spacing.space05};\n margin-top: ${({ theme }) => theme.spacing.space01};\n`;\n\nconst ChildrenWrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${mq.smAndUp} {\n flex-direction: row;\n }\n`;\n\nexport type BannerProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * color string\n */\n backgroundColor?: string;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * icon name from the icon library to be displayed on left side of banner\n */\n icon?: ReactNode;\n};\n\nexport const Banner = ({ backgroundColor, icon, children, ...otherProps }: BannerProps) => (\n <BannerComponent\n backgroundColor={backgroundColor}\n {...otherProps}\n >\n {isNotNil(icon) ? <IconWrapper data-testid=\"banner-icon\">{icon}</IconWrapper> : null}\n <ChildrenWrapper>{children}</ChildrenWrapper>\n </BannerComponent>\n);\n\nBanner.Body = Body;\nBanner.RightGutter = RightGutter;\nBanner.Title = Title;\n\nBanner.displayName = 'Banner_VHS';\n","import type { ReactNode } from 'react';\nimport { styled, css } from 'styled-components';\nimport { mq } from '../../helpers/mq';\n\nconst BodyComponent = styled.div`\n color: ${({ theme }) => theme.color.grey900};\n flex: 1;\n font-size: 14px;\n line-height: 20px;\n`;\ntype BodyProps = {\n children?: ReactNode;\n};\n\nconst Body = ({ children }: BodyProps) => <BodyComponent>{children}</BodyComponent>;\n\nconst TitleComponent = styled.h2`\n font-size: 16px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n line-height: 24px;\n margin: ${({ theme }) => `0 0 ${theme.spacing.space01}`};\n\n a {\n font-weight: ${({ theme }) => theme.font.weight.medium};\n }\n`;\n\ntype TitleProps = {\n children?: ReactNode;\n};\n\nconst Title = ({ children }: TitleProps) => <TitleComponent>{children}</TitleComponent>;\n\nconst RightGutterActions = css`\n button,\n a {\n margin-top: ${({ theme }) => theme.spacing.space02};\n\n &:not([role='switch']) {\n width: 100%;\n }\n\n ${mq.smAndUp} {\n margin-left: ${({ theme }) => theme.spacing.space02};\n margin-top: 0;\n }\n }\n`;\n\nconst getVerticalAlign = (align: string | undefined): string => {\n switch (align) {\n case 'center':\n return 'center';\n case 'top':\n case undefined:\n default:\n return 'flex-start';\n }\n};\n\ntype RightGutterComponentProps = {\n $verticalAlign?: string | undefined;\n};\n\nconst RightGutterComponent = styled.div<RightGutterComponentProps>`\n align-items: ${({ $verticalAlign }) => getVerticalAlign($verticalAlign)};\n display: flex;\n ${RightGutterActions}\n\n ${mq.smAndUp} {\n margin-left: ${({ theme }) => theme.spacing.space05};\n }\n`;\n\ntype RightGutterProps = {\n children?: ReactNode;\n verticalAlign?: string;\n};\n\nconst RightGutter = ({ verticalAlign, children }: RightGutterProps) => (\n <RightGutterComponent $verticalAlign={verticalAlign}>{children}</RightGutterComponent>\n);\n\nexport { Body, RightGutter, Title };\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { isObject } from '../../helpers/objectHelpers/isObject';\n\nconst ALIGN_CONTENT_MAP = {\n around: 'space-around',\n between: 'space-between',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n};\n\nconst ALIGN_ITEMS_MAP = {\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n};\n\nconst JUSTIFY_CONTENT_MAP = {\n around: 'space-around',\n between: 'space-between',\n center: 'center',\n end: 'flex-end',\n evenly: 'space-evenly',\n start: 'flex-start',\n};\n\nconst ALIGN_SELF_MAP = {\n auto: 'auto',\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n};\n\nconst getFillStyle = (fill: boolean | 'horizontal' | 'vertical'): string | undefined => {\n if (fill === 'horizontal') {\n return 'width: 100%;';\n }\n if (fill === 'vertical') {\n return 'height: 100%;';\n }\n if (fill) {\n return `\n width: 100%;\n height: 100%;\n `;\n }\n return undefined;\n};\n\nconst getFillViewportStyle = (\n fillViewport: boolean | 'horizontal' | 'vertical',\n): string | undefined => {\n if (fillViewport === 'horizontal') {\n return 'width: 100vw;';\n }\n if (fillViewport === 'vertical') {\n return 'height: 100vh;';\n }\n if (fillViewport) {\n return `\n width: 100vw;\n height: 100vh;\n `;\n }\n return undefined;\n};\n\nconst getGapStyle = (gap?: Gap | number | string) => {\n if (isNotNil(gap)) {\n if (isObject(gap)) {\n return Object.entries(gap)\n .map(([key, value]) => `${key}-gap: ${value as string};`)\n .join('');\n }\n return `gap: ${gap as string};`;\n }\n return undefined;\n};\n\ntype BoxComponentProps = {\n $alignContent: 'around' | 'between' | 'center' | 'end' | 'start' | 'stretch';\n $alignItems: 'baseline' | 'center' | 'end' | 'start' | 'stretch';\n $alignSelf?: 'auto' | 'baseline' | 'center' | 'end' | 'start' | 'stretch' | undefined;\n $basis?: number | string | undefined;\n $flexDirection: 'column-reverse' | 'column' | 'row-reverse' | 'row';\n $fillBox: boolean | 'horizontal' | 'vertical';\n $fillViewport: boolean | 'horizontal' | 'vertical';\n $gap?: Gap | number | string | undefined;\n $grow?: number | undefined;\n $inline?: boolean;\n $justifyContent: 'around' | 'between' | 'center' | 'end' | 'evenly' | 'start';\n $order?: number | 'inherit' | 'initial' | 'unset' | undefined;\n $shrink?: number | undefined;\n $wrapItems: boolean;\n children?: ReactNode;\n as?: string;\n};\n\nconst BoxComponent = styled.div<BoxComponentProps>`\n align-content: ${({ $alignContent }) => ALIGN_CONTENT_MAP[$alignContent]};\n align-items: ${({ $alignItems }) => ALIGN_ITEMS_MAP[$alignItems]};\n align-self: ${({ $alignSelf }) => ($alignSelf ? ALIGN_SELF_MAP[$alignSelf] : null)};\n display: ${({ $inline }) => (isNotNil($inline) && $inline ? 'inline-flex' : 'flex')};\n flex-basis: ${({ $basis }) => (isNotNil($basis) ? $basis : null)};\n flex-direction: ${({ $flexDirection }) => $flexDirection};\n ${({ $fillBox }) => getFillStyle($fillBox)};\n ${({ $fillViewport }) => getFillViewportStyle($fillViewport)};\n\n /* Box children styles */\n flex-grow: ${({ $grow }) => (isNotNil($grow) ? $grow : null)};\n flex-shrink: ${({ $shrink }) => (isNotNil($shrink) ? $shrink : null)};\n flex-wrap: ${({ $wrapItems }) => ($wrapItems ? 'wrap' : 'nowrap')};\n ${({ $gap }) => getGapStyle($gap)};\n justify-content: ${({ $justifyContent }) => JUSTIFY_CONTENT_MAP[$justifyContent]};\n order: ${({ $order }) => (isNotNil($order) ? $order : null)};\n`;\n\ntype Gap = {\n column: number | string;\n row: number | string;\n};\n\nexport type BoxProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Specifies how the browser distributes space between and around\n * items along the cross-axis of their container; has no effect on\n * single line flexible boxes\n */\n alignContent?: 'around' | 'between' | 'center' | 'end' | 'start' | 'stretch';\n /**\n * Specifies how the browser distributes space between and around\n * items along the cross-axis of their container; the difference\n * to the alignContent prop is that alignItems specifies the\n * alignment of the items within the current container's line,\n * whereas alignContent specifies the alignment of the lines themselves\n */\n alignItems?: 'baseline' | 'center' | 'end' | 'start' | 'stretch';\n /**\n * Specifies how the browser aligns items of the current line, overriding the\n * alignItems value of parent; if any of the item's cross-axis margin is set to auto,\n * then alignSelf is ignored\n *\n * *Note: only works for nested `<Box />`*\n */\n alignSelf?: 'auto' | 'baseline' | 'center' | 'end' | 'start' | 'stretch';\n /**\n * Specifies the initial main size of an item\n *\n * *Note: only works for nested `<Box />`*\n */\n basis?: number | string;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Specifies the main axis of the container\n */\n direction?: 'column-reverse' | 'column' | 'row-reverse' | 'row';\n /**\n * Specifies whether the width and/or height should fill the container\n */\n fill?: boolean | 'horizontal' | 'vertical';\n /**\n * Specifies whether the width and/or height should fill the viewport\n */\n fillViewport?: boolean | 'horizontal' | 'vertical';\n /**\n * Specifies the gaps (gutters) between rows and columns\n */\n gap?: Gap | number | string;\n /**\n * Specifies what amount of space inside the flex container the item should take up\n *\n * *Note: only works for nested `<Box />`*\n */\n grow?: number;\n /**\n * Make Layout behave like an inline element but still lay out its content according to flexbox model\n */\n inline?: boolean;\n /**\n * Specifies how the browser distributes space between and around\n * items along the main axis of their container\n */\n justifyContent?: 'around' | 'between' | 'center' | 'end' | 'evenly' | 'start';\n /**\n * Specifies the order used to lay out an item in its container. Items within the same\n * container are rendered in ascending order according to their order values.\n * Elements with the _same_ order value are rendered in the order in which they appear in code\n *\n * *Note: only works for nested `<Box />`*\n */\n order?: number | 'inherit' | 'initial' | 'unset';\n /**\n * The DOM tag to use for the element\n */\n renderAs?: keyof JSX.IntrinsicElements;\n /**\n * Specifies how items will shrink inside the container when the default size of\n * items is larger than their container\n *\n * *Note: only works for nested `<Box />`*\n */\n shrink?: number;\n /**\n * Specifies whether items are forced into a single line or can be wrapped onto multiple lines\n */\n wrapItems?: boolean;\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n alignContent = 'stretch',\n alignItems = 'start',\n alignSelf,\n basis,\n children,\n direction = 'row',\n fill = false,\n fillViewport = false,\n gap,\n grow,\n inline = false,\n justifyContent = 'start',\n order,\n renderAs = 'div',\n shrink,\n wrapItems = false,\n ...otherProps\n }: BoxProps,\n ref,\n ): JSX.Element => {\n return (\n <BoxComponent\n ref={ref}\n $alignContent={alignContent}\n $alignItems={alignItems}\n $alignSelf={alignSelf}\n $basis={basis}\n $fillBox={fill}\n $fillViewport={fillViewport}\n $flexDirection={direction}\n $gap={gap}\n $grow={grow}\n $inline={inline}\n $justifyContent={justifyContent}\n $order={order}\n $shrink={shrink}\n $wrapItems={wrapItems}\n as={renderAs}\n {...otherProps}\n >\n {children}\n </BoxComponent>\n );\n },\n);\n\nBox.displayName = 'Box_VHS';\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { ButtonStyleProps } from '../Button/ButtonStyledComponent';\nimport type { LinkProps } from '../Link/Link';\nimport type { iconMap } from '../Icon/iconMap';\nimport type { TextAlignValues } from '../Button/Button';\nimport { buttonStyle, disabledButtonStyle } from '../Button/ButtonStyledComponent';\nimport { Link } from '../Link/Link';\nimport { getButtonColor } from '../Button/getButtonColor';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { ButtonContent } from '../Button/ButtonContent';\n\n// combined type for button styling on links - excludes button-specific type attribute\ntype ButtonLinkStyleProps = Omit<ButtonStyleProps, 'type'> & Pick<LinkProps, 'type'>;\n\n// we pass `unstyled` here to remove the default styles of Link\nconst StyledButtonLink = styled(Link)<ButtonLinkStyleProps>`\n ${buttonStyle as never};\n\n /* Links are disabled by removing their href */\n &:not([href]) {\n ${disabledButtonStyle};\n }\n`;\n\nexport type ButtonLinkProps = ComponentPropsWithRef<'a'> & {\n /**\n * A Promise to invoke before navigating to location.\n * _Caution: if used with `external` type prop a new window will **not** be opened_\n */\n beforeAction?: (() => Promise<void>) | (() => void);\n /**\n * The content that will be rendered inside the button\n */\n children?: ReactNode;\n /**\n * Option CSS color string\n */\n colorOverride?: string;\n /**\n * Disables Link\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Link into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * Is the button full-width?\n */\n fullWidth?: boolean;\n /**\n * The entity to link to (url, email address, telephone number)\n */\n href: string;\n /**\n * An SVG component\n */\n icon?: ReactNode;\n /**\n * The \"type\" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*\n */\n iconName?: keyof typeof iconMap;\n /**\n * Should the icon appear at the start of the button or the end?\n */\n iconPosition?: 'end' | 'start';\n /**\n * Text that appears inside the button\n */\n label?: string;\n /**\n * Should the label wrap if the button container is too narrow to fit the label text on one line\n */\n labelWrap?: boolean;\n /**\n * An object that will be converted into a search parameter string and appended to\n * the `to` prop value\n */\n\n params?: Record<string, string>;\n /**\n * The size of button to display\n */\n size?: 'lg' | 'md' | 'sm';\n /**\n * If true, rounded corners are disabled\n */\n square?: boolean;\n /**\n * Alignment of the button label\n */\n textAlign?: TextAlignValues;\n /**\n * Type of link to display\n *\n * * `email` creates a mailto\n * * `phone` creates a telephone number\n * * `external` will open links in a new window\n */\n type?: 'default' | 'email' | 'external' | 'phone';\n /**\n * The visual type of button to display\n */\n variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';\n // TODO share types with Button when it's converted to typescript\n};\n\n/**\n * The `ButtonLink` component is useful for getting the functionality of a\n * `Link` with the styling of a `Button`.\n *\n * A useful heuristic for using this component: Do you have an `href`? Some of the advantages are having a right-click\n * context menu available opening a new tab, and copying the URL.\n *\n * **Note:** the props table below is incomplete; please\n * refer to [Link](?path=/docs/link--link-stories) for additional props.\n */\nexport const ButtonLink = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonLinkProps>(\n (\n {\n beforeAction,\n children,\n colorOverride,\n disabled = false,\n forceState,\n fullWidth = false,\n href,\n icon,\n iconName,\n iconPosition = 'start',\n label,\n labelWrap = false,\n params,\n size = 'lg',\n square = false,\n textAlign = 'center',\n type = 'default',\n variant = 'primary',\n ...otherProps\n }: ButtonLinkProps,\n ref,\n ): JSX.Element => {\n const buttonColor = getButtonColor(colorOverride, variant, useThemeColor());\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const getContent = () => {\n if (isNotNil(children)) {\n return children;\n }\n if (isNotNil(label)) {\n return label;\n }\n return null;\n };\n\n const styledProps = {\n ref,\n $buttonColor: buttonColor,\n $forceState: forceState,\n $fullWidth: fullWidth,\n $icon: icon,\n $iconPosition: iconPosition,\n $isLoading: false,\n $labelWrap: labelWrap,\n $size: size,\n $square: square,\n $textAlign: textAlign,\n $variant: variant,\n beforeAction,\n disabled,\n href,\n params,\n type,\n unstyled: true,\n ...otherProps,\n } as Parameters<typeof StyledButtonLink>[0];\n\n return (\n <StyledButtonLink {...styledProps}>\n <ButtonContent\n icon={icon}\n iconName={iconName}\n iconPosition={iconPosition}\n isLoading={false}\n size={size}\n textAlign={textAlign}\n >\n {getContent()}\n </ButtonContent>\n </StyledButtonLink>\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { forwardRef } from 'react';\nimport type { LinkStyleProps } from './linkStyle';\nimport { linkStyle, unstyledLinkStyle } from './linkStyle';\nimport { useWrappers } from '../../providers/WrapperProvider';\n\nconst LinkComponent = styled.a<LinkStyleProps>`\n ${linkStyle}\n`;\n\nconst UnstyledLinkComponent = styled.a<LinkStyleProps>`\n ${unstyledLinkStyle}\n`;\n\ntype LinkURLParameters = Record<string, string>;\ntype LinkTypes = 'default' | 'email' | 'external' | 'phone';\n\nconst appendParams = (href: string, params: LinkURLParameters): string => {\n const keys = Object.keys(params);\n\n if (!keys.length) {\n return href;\n }\n\n const url = new URL(href);\n\n keys.forEach((key) => {\n // disabling no-non-null-assertion because we know the keys are not null/undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n url.searchParams.set(key, params[key]!);\n });\n\n return url.toString();\n};\n\nconst generateHref = (\n href: string,\n type: LinkTypes | undefined,\n params: LinkURLParameters | undefined,\n disabled: boolean,\n): string | null => {\n // when a link is disabled, we don't want an href value because\n // the browser displays a tooltip \"hint\" of the href to the user\n if (disabled) {\n return null;\n }\n\n let to = href;\n\n if (type === 'phone') {\n to = `tel:${href}`;\n }\n\n if (type === 'email') {\n to = `mailto:${href}`;\n }\n\n if (params !== undefined) {\n to = appendParams(to, params);\n }\n\n return to;\n};\n\nexport type DefaultLinkWrapperProps = {\n [anchorProps: string]: unknown;\n RenderedLink: ({ ...args }) => JSX.Element;\n children: ReactNode;\n};\n\nconst DefaultLinkWrapper = ({\n RenderedLink,\n children,\n ...anchorProps\n}: DefaultLinkWrapperProps) => <RenderedLink {...anchorProps}>{children}</RenderedLink>;\n\nexport type LinkProps = ComponentPropsWithoutRef<'a'> & {\n /**\n * A Promise to invoke before navigating to location.\n * _Caution: if used with `external` type prop a new window will **not** be opened_\n */\n beforeAction?: (() => Promise<void>) | (() => void);\n /**\n * The content that will be rendered inside the link\n */\n children: ReactNode;\n /**\n * Disables Link\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Link into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * The entity to link to (url, email address, telephone number)\n */\n href: string;\n /**\n * Use this if your link is \"nested\" inside another link\n */\n nested?: boolean;\n /**\n * An object that will be converted into a search parameter string and appended to\n * the `to` prop value\n */\n params?: LinkURLParameters;\n /**\n * Type of link to display\n *\n * * `email` creates a mailto\n * * `phone` creates a telephone number\n * * `external` will open links in a new window\n */\n type?: LinkTypes;\n /**\n * Will only display an underline when the Link is in a hover state\n */\n underlineOnHover?: boolean;\n /**\n * Renders a link without any of the default styling applied\n */\n unstyled?: boolean;\n /**\n * The visual type of Link to display\n */\n variant?: 'dangerous' | 'primary' | 'secondary';\n};\n\nexport const Link = forwardRef<HTMLAnchorElement | HTMLButtonElement, LinkProps>(\n (\n {\n href,\n beforeAction,\n children,\n disabled = false,\n forceState,\n nested = false,\n params,\n type = 'default',\n unstyled = false,\n variant = 'primary',\n underlineOnHover = false,\n ...otherProps\n }: LinkProps,\n ref,\n ) => {\n const to = generateHref(href, type, params, disabled);\n\n // opens in new window/tab and prevents security vulnerability:\n // see: https://mathiasbynens.github.io/rel-noopener/\n const externalLinkProps =\n type === 'external' ? { target: '_blank', rel: 'noopener noreferrer' } : null;\n\n // note: an external type link would require `window.open(this.href,'_blank')` here\n // but that will be swallowed by the browser popup blocker\n // better to just treat an external link with a beforeAction as a default link\n // see: https://www.w3.org/TR/DOM-Level-3-Events/#trusted-events\n const handleClick = async (event: MouseEvent, routingCallback: (() => void) | null = null) => {\n if (disabled) {\n event.preventDefault();\n } else if (beforeAction) {\n event.preventDefault();\n try {\n await beforeAction();\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n } finally {\n if (routingCallback !== null) {\n routingCallback();\n } else {\n // We know that to is not null in this case\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n window.location.assign(to!);\n }\n }\n } else {\n // do nothing\n }\n };\n\n // Note: the unstyled prop is deliberately hidden from the props table because it is an escape hatch\n const RenderedLink = unstyled ? UnstyledLinkComponent : LinkComponent;\n // We need to investigate this type further. Lint complains, but useWrappers could be empty in the case of rendering a link outside the context\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/no-unnecessary-condition\n const { Link: LinkWrapper = DefaultLinkWrapper } = useWrappers() || {};\n\n const component = (\n <LinkWrapper\n ref={ref}\n $disabledLink={disabled}\n $forceState={forceState}\n $underlineOnHover={underlineOnHover}\n $unstyled={unstyled}\n $variant={variant}\n href={to}\n onClick={handleClick}\n RenderedLink={RenderedLink}\n {...externalLinkProps}\n {...otherProps}\n >\n {children}\n </LinkWrapper>\n );\n\n if (nested) {\n // this is a hack that allows us to nest a Link *inside* another Link\n // see: https://www.kizu.ru/nested-links/\n return (\n <object\n data-testid=\"link-object\"\n type=\"hacky/hack\"\n >\n {component}\n </object>\n );\n }\n\n return component;\n },\n);\n\nLink.displayName = 'Link_VHS';\n","import { css } from 'styled-components';\nimport { darken } from 'polished';\n\nconst HOVER_DARKEN = 0.08;\n\nconst primaryHoverStyle = css`\n color: ${({ theme }) => darken(HOVER_DARKEN, theme.color.brandBlue500)};\n`;\n\nconst primaryStyle = css`\n color: ${({ theme }) => theme.color.brandBlue500};\n\n &:hover,\n &:focus {\n ${primaryHoverStyle}\n }\n`;\n\nconst secondaryHoverStyle = css`\n color: rgb(255 255 255 / 80%);\n`;\n\nconst secondaryStyle = css`\n color: white;\n\n &:hover,\n &:focus {\n ${secondaryHoverStyle}\n }\n`;\n\nconst dangerousHoverStyle = css`\n color: ${({ theme }) => darken(HOVER_DARKEN, theme.color.red600)};\n`;\n\nconst dangerousStyle = css`\n color: ${({ theme }) => theme.color.red600};\n\n &:hover,\n &:focus {\n ${dangerousHoverStyle}\n }\n`;\n\nexport const disabledStyle = css`\n color: ${({ theme }) => theme.color.grey700};\n cursor: not-allowed;\n\n &:hover,\n &:focus {\n color: ${({ theme }) => theme.color.grey700};\n }\n`;\n\nexport const underlineOnHoverStyle = css`\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n`;\n\nexport type LinkStyleProps = {\n $underlineOnHover: boolean;\n $disabledLink: boolean;\n $variant?: 'dangerous' | 'primary' | 'secondary';\n $forceState?: 'active' | 'focus' | 'hover' | undefined;\n};\n\nexport const linkStyle = css<LinkStyleProps>`\n cursor: pointer;\n font-weight: 400;\n text-decoration: underline;\n ${({ $underlineOnHover }) => $underlineOnHover && underlineOnHoverStyle}\n ${({ $disabledLink }) => $disabledLink && disabledStyle}\n ${({ $variant }) => {\n if ($variant === 'primary') {\n return primaryStyle;\n }\n if ($variant === 'secondary') {\n return secondaryStyle;\n }\n if ($variant === 'dangerous') {\n return dangerousStyle;\n }\n return primaryStyle;\n }}\n ${({ $variant, $forceState }) => {\n switch ($forceState) {\n case 'hover':\n case 'focus':\n if ($variant === 'primary') {\n return primaryHoverStyle;\n }\n if ($variant === 'secondary') {\n return secondaryHoverStyle;\n }\n if ($variant === 'dangerous') {\n return dangerousHoverStyle;\n }\n break;\n /* no active styles yet */\n case 'active':\n case undefined:\n default:\n return undefined;\n }\n return undefined;\n }}\n`;\n\nexport const unstyledLinkStyle = css<LinkStyleProps>`\n color: inherit;\n cursor: pointer;\n text-decoration: underline;\n ${({ $underlineOnHover }) => $underlineOnHover && underlineOnHoverStyle}\n`;\n","import type { ChangeEvent, ComponentPropsWithRef, JSX } from 'react';\nimport { forwardRef, useState, isValidElement } from 'react';\nimport { isNonEmptyString, isNotUndefined } from '@wistia/type-guards';\nimport { Container, OptionWrapper, OptionLabel, OptionSubLabel } from './OptionStyledComponent';\n\nexport type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {\n /**\n * Indicates the state of the checkbox\n */\n checked?: boolean;\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables checkbox\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Checkbox into a particular css state (for debugging)\n */\n forceState?: 'focus' | 'hover';\n /**\n * Indicates that there is an error with the input\n */\n hasError?: boolean;\n /**\n * Provides an ID for the checkbox\n */\n id?: string;\n /**\n * The label for the checkbox\n */\n label?: JSX.Element | string | undefined;\n /**\n * The description for the checkbox\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Should match the ID attribute of the checkbox.\n * Can be used to group together multiple checkboxes\n */\n name?: string;\n /**\n * Callback function invoked when the checkbox value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Make Input a required element\n */\n required?: boolean;\n /**\n * The value attribute of the checkbox\n */\n value?: string;\n};\n\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(\n (\n {\n checked,\n direction = 'column',\n disabled = false,\n forceState,\n hasError = false,\n id = 'default',\n label = 'default',\n labelDescription,\n name,\n onChange,\n required = false,\n value = 'false',\n ...otherProps\n }: CheckboxProps,\n ref,\n ) => {\n const [focused, setFocused] = useState(false);\n return (\n <Container\n ref={ref}\n $direction={direction}\n $disabled={disabled}\n $forceState={forceState}\n $hasError={hasError}\n $isFocused={focused}\n aria-invalid={isNotUndefined(hasError) && hasError ? 'true' : 'false'}\n {...otherProps}\n >\n <OptionWrapper\n aria-checked={checked}\n checked={checked}\n data-testid=\"checkbox-option-wrapper\"\n disabled={disabled}\n id={id}\n name={name}\n onBlur={() => setFocused(false)}\n onChange={onChange}\n onFocus={() => setFocused(true)}\n required={required}\n type=\"checkbox\"\n value={value}\n />\n <OptionLabel>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{label}</>\n {isNonEmptyString(labelDescription) || isValidElement(labelDescription) ? (\n <OptionSubLabel data-testid=\"checkbox-option-sub-label\">\n {labelDescription}\n </OptionSubLabel>\n ) : null}\n </OptionLabel>\n </Container>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox_VHS';\n","import type { ComponentPropsWithRef } from 'react';\nimport { styled, css } from 'styled-components';\n\nexport const OptionWrapper = styled.input`\n align-self: flex-start;\n border-radius: 3px;\n box-shadow: ${({ type }) =>\n type === 'checkbox' ? 'inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)' : 'none'};\n margin-top: ${({ theme }) => theme.spacing.space01};\n\n /*\n * There are some high-level styles for VMA modals that broadly target input[type=\"radio\"]\n * and input[type=\"checkbox\"], so this extra specificity is needed to override those styles.\n */\n &&& {\n margin: ${({ theme }) => theme.spacing.space01} 0 0;\n }\n`;\n\nexport const OptionLabel = styled.div`\n color: ${({ theme }) => theme.color.grey900};\n font-size: 14px;\n line-height: 20px;\n`;\n\nexport const OptionSubLabel = styled.div`\n color: ${({ theme }) => theme.color.grey900};\n font-size: 12px;\n line-height: 16px;\n`;\n\nexport const disabledStyle = css`\n cursor: not-allowed;\n opacity: 0.5;\n`;\n\nexport const errorHoverStyle = css`\n border-color: transparent;\n`;\n\nexport const errorFocusedStyle = css`\n outline: none;\n`;\n\nexport const errorStyle = css`\n background-color: ${({ theme }) => theme.color.error100};\n border: 1px solid ${({ theme }) => theme.color.error500};\n\n &:hover,\n &:focus,\n &:active {\n border-color: transparent !important;\n }\n`;\n\nexport const defaultHoverStyle = css`\n background-color: ${({ theme }) => theme.color.grey300};\n cursor: pointer;\n`;\n\nexport const defaultFocusedStyle = css`\n ${defaultHoverStyle}\n`;\n\ntype ContainerProps = ComponentPropsWithRef<'label'> & {\n $direction: 'column' | 'row';\n $disabled: boolean;\n $forceState?: 'focus' | 'hover' | undefined;\n $hasError: boolean;\n $isFocused: boolean;\n};\nexport const Container = styled.label<ContainerProps>`\n align-items: center;\n border: 1px solid transparent;\n border-radius: 4px;\n display: flex;\n gap: ${({ theme }) => theme.spacing.space04};\n padding: ${({ theme }) => theme.spacing.space02};\n width: ${({ $direction }) => ($direction === 'column' ? '100%' : 'auto')};\n\n &:hover {\n ${defaultHoverStyle}\n }\n\n ${({ $hasError }) => $hasError && errorStyle};\n ${({ $disabled }) => $disabled && disabledStyle};\n ${({ $isFocused }) => $isFocused && defaultFocusedStyle};\n ${({ $isFocused, $hasError }) => $isFocused && $hasError && errorFocusedStyle};\n ${({ $forceState }) => $forceState === 'focus' && defaultFocusedStyle};\n ${({ $forceState }) => $forceState === 'hover' && defaultHoverStyle};\n ${({ $forceState, $hasError }) => $forceState === 'focus' && $hasError && errorFocusedStyle};\n ${({ $forceState, $hasError }) => $forceState === 'hover' && $hasError && errorHoverStyle};\n`;\n","import { styled } from 'styled-components';\nimport type { ChangeEvent, ComponentPropsWithoutRef, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { Checkbox } from '../Checkbox';\nimport type { CheckboxProps } from '../Checkbox/Checkbox';\nimport { FormFieldWrapper } from '../../private/components/FormFieldWrapper';\n\ntype StyledOptionContainerProps = {\n direction: 'column' | 'row';\n};\n\nconst StyledOptionContainer = styled.div<StyledOptionContainerProps>`\n display: flex;\n flex-direction: ${({ direction }) => (direction === 'row' ? 'row' : 'column')};\n gap: ${({ direction, theme }) =>\n direction === 'row' ? theme.spacing.space04 : theme.spacing.space01};\n`;\n\ntype CheckboxPropsWithName = Omit<CheckboxProps, 'name'> & { name: string };\n\nexport type CheckboxGroupProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Whether CheckboxGroup is disabled\n */\n disabled?: boolean;\n /**\n * Error message to be displayed\n */\n error?: string | undefined;\n /**\n * The label for the form field\n */\n label?: JSX.Element | string | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Name of the form element\n */\n name: string;\n /**\n * Callback function invoked when the value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>, name: string) => unknown;\n /**\n * Array of checkbox attributes\n */\n options: CheckboxPropsWithName[];\n /**\n * Currently selected checkbox value\n */\n value?: string[] | boolean | undefined;\n};\n\nexport const CheckboxGroup = ({\n direction = 'column',\n disabled = false,\n error,\n label,\n labelDescription,\n labelProps = {},\n name,\n onChange,\n options,\n value = false,\n ...otherProps\n}: CheckboxGroupProps): JSX.Element => (\n <FormFieldWrapper\n disabled={disabled}\n error={error}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n labelType=\"legend\"\n name={name}\n role=\"group\"\n {...otherProps}\n >\n <StyledOptionContainer direction={direction}>\n {options.map((option) => {\n const isChecked = Array.isArray(value) ? value.includes(option.name) : value;\n return (\n <Checkbox\n key={option.name}\n checked={isChecked}\n direction={direction}\n disabled={disabled}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n isNotNil(onChange) ? onChange(event, option.name) : undefined\n }\n {...option}\n />\n );\n })}\n </StyledOptionContainer>\n </FormFieldWrapper>\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup_VHS';\n","import { styled } from 'styled-components';\nimport type { ReactNode, ComponentPropsWithoutRef, JSX } from 'react';\nimport { Label } from '../../../components/Label';\nimport { FormFieldError } from '../../../components/FormFieldError';\nimport { LabelDescription } from '../../../components/LabelDescription';\n\nconst StyledFormFieldWrapper = styled.div`\n width: 100%;\n`;\n\nexport const FormFieldWrapper = ({\n disabled = false,\n error = null,\n label = null,\n labelDescription = null,\n labelProps = {},\n labelType = 'label',\n name,\n children,\n labelId = null,\n ...otherProps\n}: FormFieldWrapperProps) => {\n const computedId = labelId ?? `group-id-${name}`;\n const computedAriaLabelledby = labelType === 'legend' ? computedId : null;\n const combinedLabelProps = {\n id: computedId,\n htmlFor: `field-${name}`,\n renderAs: labelType,\n disabled: labelProps.disabled ?? disabled,\n screenReaderOnly: labelProps.screenReaderOnly ?? false,\n };\n return (\n <StyledFormFieldWrapper\n {...otherProps}\n aria-labelledby={computedAriaLabelledby ?? undefined}\n >\n {label !== null ? <Label {...combinedLabelProps}>{label}</Label> : null}\n {labelDescription !== null ? (\n <LabelDescription disabled={disabled}>{labelDescription}</LabelDescription>\n ) : null}\n {error !== null ? (\n <FormFieldError data-testid={`form-field-error-${name}`}>{error}</FormFieldError>\n ) : null}\n {children}\n </StyledFormFieldWrapper>\n );\n};\n\ntype FormFieldWrapperProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Pass an arbitrary child node\n */\n children: ReactNode;\n /**\n * Disables the field\n */\n disabled?: boolean | undefined;\n /**\n * Visual label above the input\n */\n error?: ReactNode | null;\n /**\n * The label for the form field\n */\n label?: JSX.Element | string | null | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode | null | undefined;\n /**\n * option label id for aria-labelledby\n */\n labelId?: string | null | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?:\n | {\n disabled?: boolean | undefined;\n screenReaderOnly?: boolean | undefined;\n }\n | undefined;\n /**\n * Choose between legend and label\n */\n labelType?: 'label' | 'legend' | undefined;\n /**\n * Field name\n */\n name: string;\n};\n\nFormFieldWrapper.displayName = 'FormFieldWrapper';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled, css } from 'styled-components';\nimport { screenReaderOnlyStyle } from '../ScreenReaderOnly';\n\nconst requiredStyle = css`\n &::after {\n color: red;\n content: ' *';\n }\n`;\n\nconst disabledStyle = css`\n color: ${({ theme }) => theme.color.grey500};\n`;\n\nconst SPACE_BETWEEN_LABEL_AND_INPUT = '8px';\n\nexport type LabelComponentProps = Pick<ComponentPropsWithoutRef<'label'>, 'htmlFor'> & {\n $disabled: boolean;\n $renderAs: string;\n $required: boolean;\n $screenReaderOnly: boolean;\n};\n\nexport type LabelProps = ComponentPropsWithoutRef<'label'> & {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * To indicate that the label is for a disabled form component\n */\n disabled?: boolean;\n /**\n * ID of the form component that the label should be associated with\n */\n htmlFor?: string | undefined;\n /**\n * To use 'legend', 'p', 'span', or other instead of 'label'\n */\n renderAs?: 'div' | 'label' | 'legend' | 'p' | 'span' | undefined;\n /**\n * Use if label describes a required form component\n */\n required?: boolean;\n /**\n * For label text that needs to be available to assistive technology (e.g. screen readers)\n * but otherwise hidden on screen.\n */\n screenReaderOnly?: boolean;\n};\n\nconst LabelComponent = styled.label<LabelComponentProps>`\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.semiBold};\n margin-bottom: ${SPACE_BETWEEN_LABEL_AND_INPUT};\n width: 100%;\n\n /* if label is wrapping an input this ensures it appears beneath the label with a nice margin */\n > input,\n > textarea,\n > select {\n display: block;\n margin-top: ${SPACE_BETWEEN_LABEL_AND_INPUT};\n }\n\n > label {\n font-weight: normal;\n }\n\n ${({ $screenReaderOnly }) => $screenReaderOnly && screenReaderOnlyStyle}\n ${({ $disabled }) => $disabled && disabledStyle}\n ${({ $required }) => $required && requiredStyle}\n`;\n\nexport const Label = ({\n renderAs = 'label',\n children,\n disabled = false,\n htmlFor,\n required = false,\n screenReaderOnly = false,\n ...otherProps\n}: LabelProps): JSX.Element => (\n <LabelComponent\n $disabled={disabled}\n $renderAs={renderAs}\n $required={required}\n $screenReaderOnly={screenReaderOnly}\n as={renderAs}\n htmlFor={renderAs === 'label' ? htmlFor : ''}\n {...otherProps}\n >\n {children}\n </LabelComponent>\n);\n\nLabel.displayName = 'Label_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNil } from '@wistia/type-guards';\n\nconst FieldError = styled.div`\n align-items: center;\n border-left: 4px solid ${({ theme }) => theme.color.error500};\n color: ${({ theme }) => theme.color.error600};\n font-size: 12px;\n line-height: 16px;\n margin-top: ${({ theme }) => theme.spacing.space02};\n padding-left: ${({ theme }) => theme.spacing.space02};\n`;\n\nexport type FormFieldErrorProps = ComponentPropsWithoutRef<'div'> & {\n children?: ReactNode | undefined;\n};\n\nexport const FormFieldError = ({\n children,\n ...otherProps\n}: FormFieldErrorProps): JSX.Element | null => {\n if (isNil(children)) {\n return null;\n }\n\n return <FieldError {...otherProps}>{children}</FieldError>;\n};\n\nFormFieldError.displayName = 'FormFieldError_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled, css } from 'styled-components';\n\nexport type LabelDescriptionComponentProps = {\n disabled: boolean;\n};\n\nexport type LabelDescriptionProps = ComponentPropsWithoutRef<'div'> & {\n children: ReactNode;\n disabled?: boolean;\n};\n\nconst disabledStyle = css`\n color: ${({ theme }) => theme.color.grey500};\n`;\n\nconst LabelDescriptionComponent = styled.div<LabelDescriptionComponentProps>`\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-size: 14px;\n margin-bottom: ${({ theme }) => theme.spacing.space03};\n ${({ disabled }) => disabled && disabledStyle};\n`;\n\nexport const LabelDescription = ({\n children,\n disabled = false,\n ...otherProps\n}: LabelDescriptionProps): JSX.Element => (\n <LabelDescriptionComponent\n disabled={disabled}\n {...otherProps}\n >\n {children}\n </LabelDescriptionComponent>\n);\n\nLabelDescription.displayName = 'LabelDescription_VHS';\n","import type { ReactNode, ComponentPropsWithRef, Ref, ElementType, RefObject } from 'react';\nimport { forwardRef, useCallback } from 'react';\nimport { styled } from 'styled-components';\n\nexport type ClickAreaProps = ComponentPropsWithRef<'div'> & {\n /**\n * Supply an element or Component to render as the root compoennt (default is div)\n */\n renderAs?: ElementType;\n /**\n * The content within the clickarea\n */\n children: ReactNode;\n /**\n * If provided, this click event happens instead of the target ref's click event\n */\n onClick?: (event: Event) => void;\n /**\n * A ref to the element within chldren that will be used as the target of the click event\n * Should typically be a button or link\n */\n targetRef: RefObject<HTMLElement | null>;\n};\n\nconst ClickAreaComponent = styled.div`\n cursor: pointer;\n`;\n\n/**\n * ClickArea is useful when you want an entire element to be clickable, such as a card or an item in a list. Making the\n * entire element clickable provides a better click target for users, especially on mobile devices. The problem with this is\n * clickable divs are not accessible or tabbable. Using a `button` or `a` tag causes both styling and screenreader problems.\n *\n * To solve these issues, `ClickArea` maps a click event on the container element to a click event on a button or link within\n * it, via a ref. Assistive devices can utilize the target element and ignore the container element's click property.\n *\n * ClickArea also makes having interactive elements within the clickable container easier. For example, if you have a card element\n * that is clickable but with a \"close\" button in the top right, include `event.preventDefault()` in the close button's click handler\n * to prevent the container's click handler from firing.\n *\n */\nexport const ClickArea = forwardRef(\n (\n { renderAs = 'div', className, onClick, targetRef, ...props }: ClickAreaProps,\n ref: Ref<HTMLElement>,\n ) => {\n const handleClick = useCallback(\n (event: Event) => {\n const node = targetRef.current;\n if (node === null) {\n return;\n }\n\n if (event.defaultPrevented) {\n return;\n }\n\n // If we clicked `targetRef` or its descendants, call `onClick` and bubble.\n if (node.contains(event.target as Node)) {\n if (onClick) {\n onClick(event);\n }\n } else {\n // Otherwise, prevent bubbling, prevent default, and click the target.\n event.stopPropagation();\n event.preventDefault();\n node.focus();\n node.click();\n }\n },\n [onClick, targetRef],\n );\n return (\n <ClickAreaComponent\n ref={ref}\n as={renderAs}\n role=\"presentation\"\n {...props}\n onClick={handleClick}\n />\n );\n },\n);\n\nClickArea.displayName = 'ClickArea_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { CloseIcon } from './CloseIcon';\n\nconst Button = styled.button`\n align-items: center;\n background: none;\n border: none;\n color: ${({ theme }) => theme.color.grey700};\n cursor: pointer;\n display: flex;\n height: 42px;\n justify-content: center;\n pointer-events: auto;\n width: 42px;\n\n /* Normalize focus behavior of Firefox */\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n\n &:focus {\n outline: thin dotted ${({ theme }) => theme.color.grey500};\n }\n\n &:hover {\n color: ${({ theme }) => theme.color.grey900};\n }\n`;\n\nexport type CloseButtonProps = ComponentPropsWithoutRef<'button'> & {\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: () => void;\n};\n\nexport const CloseButton = ({ onClick, ...otherProps }: CloseButtonProps): JSX.Element => (\n <Button\n onClick={onClick}\n title=\"Close\"\n {...otherProps}\n >\n <CloseIcon />\n </Button>\n);\n\nCloseButton.displayName = 'CloseButton_VHS';\n","export const CloseIcon = () => (\n <svg\n height=\"22\"\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ display: 'block' }}\n viewBox=\"0 0 20 20\"\n width=\"22\"\n >\n <path\n d=\"M17 15.85289l-5.8533769-5.85435067L17 4.14710997 15.85289 3l-5.8514293 5.85240314L4.14710997 3 3 4.14710997l5.85240314 5.85240314L3 15.85289 4.14710997 17l5.85435073-5.8524031L15.8519163 17z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { useEffect, useLayoutEffect, useState, useId } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled, css } from 'styled-components';\nimport { darken } from 'polished';\nimport { isNil, isNonEmptyString, isNotUndefined } from '@wistia/type-guards';\nimport { useElementObserver } from '../../hooks/useElementObserver';\nimport { Icon } from '../Icon';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\n\nconst DARKENING_AMOUNT = 0.08;\nconst BAR_HEIGHT = 48;\nconst BUTTON_OFFSET = 16;\nconst CARET_SIZE = 16;\nconst PADDING_X = 16;\nconst TRANSITION_TIME = '0.2s';\nconst VARIANT_BRAND_BLUE = 'brandblue';\nconst CARET_DIRECTION_UP = 'up';\nconst CARET_DIRECTION_DOWN = 'down';\nconst CARET_DIRECTION_LEFT = 'left';\nconst CARET_DIRECTION_RIGHT = 'right';\n\nconst StyledCollapsibleGroup = styled.div`\n & + & {\n margin-top: ${({ theme }) => theme.spacing.space01};\n }\n`;\n\ntype ComputeBackgroundColorProps = {\n backgroundColor?: string | undefined;\n open: boolean;\n theme: DefaultTheme;\n variant?: typeof VARIANT_BRAND_BLUE | undefined;\n};\n\nconst computeBackgroundColor = ({\n backgroundColor,\n open,\n theme,\n variant,\n}: ComputeBackgroundColorProps): string => {\n const closedBgColor = backgroundColor ?? theme.color.grey100;\n const openBgColor = variant === VARIANT_BRAND_BLUE ? theme.color.brandBlue100 : closedBgColor;\n return open ? openBgColor : closedBgColor;\n};\n\ntype StyledControlWrapperProps = {\n $backgroundColor?: string | undefined;\n $open: boolean;\n theme: DefaultTheme;\n $variant?: typeof VARIANT_BRAND_BLUE | undefined;\n};\n\nconst StyledControlWrapper = styled.div<StyledControlWrapperProps>`\n align-items: center;\n background-color: ${({ theme, $backgroundColor, $open, $variant }) =>\n computeBackgroundColor({\n backgroundColor: $backgroundColor,\n open: $open,\n theme,\n variant: $variant,\n })};\n color: ${({ $open, theme }) => ($open ? theme.color.brandBlue600 : theme.color.grey900)};\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n min-height: ${BAR_HEIGHT}px;\n padding-right: ${PADDING_X}px;\n\n &:hover {\n background-color: ${({ theme, $backgroundColor, $open, $variant }) =>\n darken(\n DARKENING_AMOUNT,\n computeBackgroundColor({\n backgroundColor: $backgroundColor,\n open: $open,\n theme,\n variant: $variant,\n }),\n )};\n }\n`;\n\ntype CaretProps = {\n $isOpen: boolean;\n $variant?: string | undefined;\n $direction:\n | typeof CARET_DIRECTION_DOWN\n | typeof CARET_DIRECTION_LEFT\n | typeof CARET_DIRECTION_RIGHT\n | typeof CARET_DIRECTION_UP;\n $layout: 'leading' | 'trailing';\n};\n\nconst Caret = styled.span<CaretProps>`\n color: ${({ $isOpen, theme, $variant }) =>\n $isOpen && $variant === VARIANT_BRAND_BLUE ? theme.color.brandBlue600 : theme.color.grey500};\n display: inline-flex;\n height: ${CARET_SIZE}px;\n transform: rotate(\n ${({ $direction }) => {\n switch ($direction) {\n case CARET_DIRECTION_UP:\n return '-180deg';\n case CARET_DIRECTION_DOWN:\n return '0deg';\n case CARET_DIRECTION_LEFT:\n return '90deg';\n case CARET_DIRECTION_RIGHT:\n return '-90deg';\n default:\n return '0deg';\n }\n }}\n );\n transition: transform ${TRANSITION_TIME} ease-out;\n width: ${CARET_SIZE}px;\n\n > svg {\n height: 100%;\n width: 100%;\n }\n`;\n\ntype CssStyleType = ReturnType<typeof css>;\n\nconst showOnHoverStyles = (): CssStyleType => css`\n opacity: 0;\n transition: opacity ${TRANSITION_TIME} ease-out;\n\n ${StyledControlWrapper}:hover &,\n ${StyledControlWrapper}:focus &,\n ${StyledControlWrapper}:focus-within & {\n opacity: 1;\n }\n`;\n\ntype StyledLabelProps = ComponentPropsWithoutRef<'label'> & {\n $open: boolean;\n $styleVariant: string | undefined;\n};\n\nconst StyledLabel = styled(Text)<StyledLabelProps>`\n /*\n * This should be able to support an input field when used to rename itself\n */\n\n color: ${({ $open, theme, $styleVariant }) =>\n $open && $styleVariant === VARIANT_BRAND_BLUE ? theme.color.brandBlue600 : null};\n line-height: ${BAR_HEIGHT}px;\n margin: 0 auto 0 ${BUTTON_OFFSET}px;\n user-select: none;\n width: 100%;\n`;\n\ntype StyledContentProps = {\n $backgroundColor: string | undefined;\n $isOpen: boolean;\n $contentPadding: string | null | undefined;\n $showTransition: boolean;\n $height: number | undefined;\n $maxHeight: number | undefined;\n $variant?: typeof VARIANT_BRAND_BLUE | undefined;\n};\n\nconst StyledContent = styled.div<StyledContentProps>`\n background-color: ${({ $backgroundColor }) => $backgroundColor};\n overflow: ${({ $isOpen }) => ($isOpen ? 'visible' : 'hidden')};\n padding: ${({ $contentPadding }) => $contentPadding ?? 0};\n transition: ${({ $showTransition }) =>\n $showTransition ? `height ${TRANSITION_TIME} ease-out` : undefined};\n visibility: ${({ $isOpen }) => ($isOpen ? 'visible' : 'hidden')};\n ${({ $height, $isOpen }) =>\n isNotUndefined($height) &&\n Number.isFinite($height) &&\n `\n height: ${$isOpen ? $height : 0}px;\n `};\n ${({ $maxHeight }) =>\n isNotUndefined($maxHeight) &&\n Number.isFinite($maxHeight) &&\n `\n max-height: ${$maxHeight}px;\n `};\n`;\n\ntype CaretButtonProps = ComponentPropsWithoutRef<'button'> & {\n $layout: 'leading' | 'trailing';\n};\n\nconst CaretButton = styled(Button)<CaretButtonProps>`\n height: 24px;\n margin-left: ${BUTTON_OFFSET}px;\n order: ${({ $layout }) => ($layout === 'leading' ? -1 : 1)};\n width: 24px;\n\n &:focus {\n outline: 1px dashed ${({ theme }) => theme.color.grey500};\n }\n`;\n\ntype StyledActionControlProps = {\n $showActionsOnHover: boolean;\n};\n\nconst StyledActionControl = styled.span<StyledActionControlProps>`\n ${({ $showActionsOnHover }) => $showActionsOnHover && showOnHoverStyles()};\n align-items: center;\n display: inline-flex;\n flex-shrink: 0;\n justify-content: center;\n margin-right: -${PADDING_X}px;\n min-height: ${BAR_HEIGHT}px;\n width: ${BAR_HEIGHT}px;\n\n > * {\n flex-shrink: 0;\n min-width: 0;\n }\n`;\n\ntype ActionControlProps = {\n children: ReactNode;\n showActionsOnHover: boolean;\n};\nconst ActionControl = ({ children, showActionsOnHover }: ActionControlProps) => {\n if (isNil(children)) {\n return null;\n }\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <StyledActionControl\n $showActionsOnHover={showActionsOnHover}\n onClick={(event) => {\n event.stopPropagation();\n }}\n >\n {children}\n </StyledActionControl>\n );\n};\n\nexport type CollapsibleGroupProps = {\n /**\n * Slot for adjacent options\n */\n actions?: ReactNode;\n /**\n * Custom background color\n */\n backgroundColor?: string;\n /**\n * Custom direction of the caret when open or closed\n */\n caretDirection?: {\n closed:\n | typeof CARET_DIRECTION_DOWN\n | typeof CARET_DIRECTION_LEFT\n | typeof CARET_DIRECTION_RIGHT\n | typeof CARET_DIRECTION_UP;\n open:\n | typeof CARET_DIRECTION_DOWN\n | typeof CARET_DIRECTION_LEFT\n | typeof CARET_DIRECTION_RIGHT\n | typeof CARET_DIRECTION_UP;\n };\n /**\n * Toggleable contents\n */\n children?: ReactNode;\n /**\n * Optional CSS padding to be applied to the content container\n */\n contentPadding?: string | null;\n /**\n * The control has a caret by default. Set this to true to suppress the caret\n */\n hideCaret?: boolean;\n /**\n * Optional ID attribute\n */\n id?: string;\n /**\n * Control the initial open state. If not provided, the default is to start closed.\n */\n isOpen?: boolean;\n /**\n * Clickable text label for the control, or perhaps an inline editable\n * control? Whatever suits you */\n label?: ReactNode | (({ open, caret }: { open: boolean; caret: JSX.Element }) => ReactNode);\n /**\n * Choose on which side the caret shows\n */\n layout?: 'leading' | 'trailing';\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: () => unknown;\n /**\n * Callback function invoked when the open state changes\n */\n onOpenChange?: (newOpen: boolean) => unknown;\n /**\n * Extra actions are hidden by default and shown on hover. Set this to false\n * to make always visible\n */\n showActionsOnHover?: boolean;\n /**\n * Display the open / close transition animation\n */\n showTransition?: boolean;\n /**\n * Changes the styling of the collapsible group banner when active\n */\n variant?: typeof VARIANT_BRAND_BLUE;\n};\n\ntype DimensionType = {\n height: number | undefined;\n width: number | undefined;\n};\n\nexport const CollapsibleGroup = ({\n actions,\n backgroundColor,\n caretDirection = { open: CARET_DIRECTION_DOWN, closed: CARET_DIRECTION_RIGHT },\n children = null,\n contentPadding = null,\n hideCaret = false,\n id,\n isOpen,\n label,\n layout = 'leading',\n onOpenChange,\n showActionsOnHover = true,\n showTransition = false,\n variant,\n ...otherProps\n}: CollapsibleGroupProps) => {\n const [open, setOpen] = useState(isOpen ?? false);\n const [dimensions, setDimensions] = useState<DimensionType>({\n width: undefined,\n height: undefined,\n });\n const [wasEditingOnMouseDown, setWasEditingOnMouseDown] = useState(false);\n const [targetRef, targetBox] = useElementObserver<HTMLDivElement>();\n const caretDirectionOpen = caretDirection.open;\n const caretDirectionClosed = caretDirection.closed;\n const generatedId = useId();\n const computedId = isNonEmptyString(id) ? id : `vhs-collapsible-group-${generatedId}`;\n\n useEffect(() => {\n setDimensions({\n height: targetBox.height,\n width: targetBox.width,\n });\n }, [targetBox]);\n\n useEffect(() => {\n if (isOpen !== undefined) {\n setOpen(isOpen);\n }\n }, [isOpen]);\n\n useLayoutEffect(() => {\n if (!targetRef.current) {\n return;\n }\n\n setDimensions({\n height: targetRef.current.offsetHeight,\n width: targetRef.current.offsetWidth,\n });\n }, [targetRef]);\n\n const onClick = () => {\n if (wasEditingOnMouseDown) {\n setWasEditingOnMouseDown(false);\n return;\n }\n\n const newOpen = !open;\n\n setOpen(newOpen);\n\n if (onOpenChange) {\n onOpenChange(newOpen);\n }\n };\n\n const caret = (\n <CaretButton\n $layout={layout}\n aria-expanded={open}\n aria-labelledby={computedId}\n noStyle={true}\n onClick={onClick}\n >\n <Caret\n $direction={open ? caretDirectionOpen : caretDirectionClosed}\n $isOpen={open}\n $layout={layout}\n $variant={variant}\n >\n <Icon type=\"caret-down\" />\n </Caret>\n </CaretButton>\n );\n\n return (\n <StyledCollapsibleGroup {...otherProps}>\n {/* eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions */}\n <StyledControlWrapper\n $backgroundColor={backgroundColor}\n $open={open}\n $variant={variant}\n onClick={onClick}\n >\n <StyledLabel\n $open={open}\n $styleVariant={variant}\n id={computedId}\n renderAs=\"div\"\n variant=\"subtitle1\"\n >\n {typeof label === 'function' ? label({ open, caret }) : label}\n </StyledLabel>\n {!hideCaret && caret}\n <ActionControl showActionsOnHover={showActionsOnHover}>{actions}</ActionControl>\n </StyledControlWrapper>\n <StyledContent\n $backgroundColor={backgroundColor}\n $contentPadding={contentPadding}\n $height={dimensions.height}\n $isOpen={open}\n $maxHeight={dimensions.height}\n $showTransition={showTransition}\n $variant={variant}\n data-testid=\"collapsible-group-content\"\n >\n <div\n ref={targetRef}\n style={{ width: '100%', display: 'inline-block' }}\n >\n {children}\n </div>\n </StyledContent>\n </StyledCollapsibleGroup>\n );\n};\n\nCollapsibleGroup.displayName = 'CollapsibleGroup_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\nexport type DividerComponentProps = {\n $borderHeight: number;\n $fillColor: string;\n $variant: string;\n};\n\nexport type DividerProps = ComponentPropsWithoutRef<'hr'> & {\n /**\n * Allows user to override default divider color\n */\n colorOverride?: string;\n /**\n * Height (in pixels) of divider\n */\n height?: number;\n /**\n * The visual type of divider to display\n */\n variant?: 'dashed' | 'solid';\n};\n\nconst DividerComponent = styled.hr<DividerComponentProps>`\n background: none;\n border-bottom: none;\n border-left: none;\n border-right: none;\n border-top-color: ${({ $fillColor }) => $fillColor};\n border-top-style: ${({ $variant }) => $variant};\n border-top-width: ${({ $borderHeight }) => `${$borderHeight}px`};\n clear: both;\n height: 0;\n line-height: 0;\n margin: 0;\n`;\n\nexport const Divider = ({\n colorOverride = undefined,\n height = 1,\n variant = 'dashed',\n ...otherProps\n}: DividerProps): JSX.Element => {\n const defaultFillColor: string = useThemeColor('grey300');\n const fillColor: string = colorOverride ?? defaultFillColor;\n\n return (\n <DividerComponent\n $borderHeight={height}\n $fillColor={fillColor}\n $variant={variant}\n {...otherProps}\n />\n );\n};\n\nDivider.displayName = 'Divider_VHS';\n","import type { ChangeEvent, ComponentPropsWithoutRef, ReactNode, Ref, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\n\n// default maximum file size is 26gb (one gig more than Vimeo's limit)\nconst maxFileSizeInGigs = 26;\n// 26gb, see https://wistia.slack.com/archives/CSQPJV9PE/p1618499722090100 for discussion\nconst defaultMaximumFileSize = maxFileSizeInGigs * 1024;\n\n// in order to customize a file-upload input we use this wrapper\n// around an arbitrary child element (button, icon, link, etc.)\n\ntype FileSelectComponentProps = ComponentPropsWithoutRef<'label'> & {\n $disabled: boolean;\n 'aria-controls': string;\n};\nconst FileSelectComponent = styled.label<FileSelectComponentProps>`\n display: inline-block;\n overflow: hidden;\n position: relative;\n\n /* capture clicks with a large positioned file input with 0 opacity */\n input[type='file'] {\n &::-webkit-file-upload-button {\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n }\n\n bottom: 0;\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n font-size: 10rem;\n left: 0;\n opacity: 0;\n position: absolute;\n right: 0;\n top: 0;\n }\n`;\n\nexport type FileSelectProps = {\n /**\n * Allowlist of file types that the server will accept\n * (see: <a href=\"https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-accept\">file input docs</a>)\n */\n accept: string;\n /**\n * Pass an arbitrary child node\n */\n children: ReactNode;\n /**\n * Disable the input. <em>Note: Does not \"disable\" the child component, only the hidden input</em>\n */\n disabled?: boolean;\n /**\n * ID of the input\n */\n id: string;\n /**\n * File size limit specified in MB\n */\n maxSize?: number;\n /**\n * Allow multiple files to be selected\n */\n multiple?: boolean;\n /**\n * Name of the input\n */\n name?: string;\n /**\n * Callback invoked when file has been selected\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Callback invoked when the file input is clicked (before the file has been selected)\n */\n onClick?: (...args: unknown[]) => unknown;\n /**\n * Callback invoked when there is an error selecting file(s)\n */\n onError?: (error: Error) => void;\n};\n\nexport const FileSelect = forwardRef(\n (\n {\n accept,\n children,\n disabled = false,\n id,\n maxSize = defaultMaximumFileSize,\n multiple = false,\n name = 'file-upload',\n onClick,\n onChange,\n onError,\n ...otherProps\n }: FileSelectProps,\n ref: Ref<HTMLInputElement> | undefined,\n ): JSX.Element => {\n const handleOnChange = (event: ChangeEvent<HTMLInputElement>) => {\n const { files } = event.target as HTMLInputElement;\n\n if (maxSize && files) {\n const maxSizeInBytes = maxSize * 1024 * 1024;\n const inputFiles = Array.from(files);\n\n if (inputFiles.some((file) => file.size > maxSizeInBytes)) {\n if (onError) {\n onError(new Error(`File not accepted. Please choose a file under ${maxSize}MB.`));\n }\n return false;\n }\n }\n if (onChange) {\n onChange(event);\n }\n return true;\n };\n\n return (\n <FileSelectComponent\n $disabled={disabled}\n aria-controls=\"filename\"\n htmlFor={id}\n {...otherProps}\n >\n {children}\n <input\n ref={ref}\n accept={accept}\n data-testid=\"file-select-input\"\n disabled={disabled}\n id={id}\n multiple={multiple}\n name={name}\n onChange={handleOnChange}\n onClick={onClick}\n tabIndex={-1}\n type=\"file\"\n />\n </FileSelectComponent>\n );\n },\n);\n\nFileSelect.displayName = 'FileSelect_VHS';\n","/* eslint-disable react-compiler/react-compiler, react-hooks/rules-of-hooks */\nimport type { ForwardedRef, ReactNode, RefObject, JSX, Ref } from 'react';\nimport type { FormikProps, FormikHelpers, FormikErrors } from 'formik';\nimport { useState, useEffect } from 'react';\nimport { Formik, Form as FormikForm } from 'formik';\nimport { isNotNil, isNotUndefined, isUndefined } from '@wistia/type-guards';\nimport { FormGlobalError } from '../FormGlobalError';\nimport { useToast } from '../Toast';\nimport { useDebounce } from '../../private/hooks/useDebounce';\n\ntype ValuesType = Record<string, unknown>;\n\nconst didValuesChange = (newValues: ValuesType, oldValues: ValuesType) =>\n JSON.stringify(newValues) !== JSON.stringify(oldValues);\n\nconst handleInitialValues = (\n initialValues: ValuesType,\n validationSchema: ValidationSchemaType | undefined,\n) => {\n const filteredInitialValues: Record<string, unknown> = {};\n\n Object.keys(initialValues).forEach((key) => {\n if (initialValues[key] === null) {\n if (\n isNotUndefined(validationSchema) &&\n isNotUndefined(validationSchema.fields) &&\n isNotUndefined(validationSchema.fields[key]) &&\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (validationSchema.fields[key] as any)._type === 'boolean' // eslint-disable-line no-underscore-dangle\n ) {\n // set booleans to false (null is falsy)\n filteredInitialValues[key] = false;\n } else {\n // change null (from DB) to undefined (for form fields)\n filteredInitialValues[key] = undefined;\n }\n } else {\n // otherwise keep the existing value\n filteredInitialValues[key] = initialValues[key];\n }\n });\n\n return filteredInitialValues;\n};\n\nexport type Values = Record<string, unknown>;\n\nexport type FormState = FormikProps<Values>;\n\nexport type FormProps = {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Class(es) to be applied to formik container\n */\n className?: string;\n /**\n * Unique ID for Form, used for React Testing Library\n */\n formId: string;\n /**\n * Ref required to be ref of FormGlobalError. Simply assign `const globalErrorRef = useRef(null)`. Either a function or the instance of a DOM native element.\n */\n globalErrorRef: RefObject<HTMLElement | null | undefined>;\n /**\n * Form input values on initial load, often populated from server\n */\n initialValues: ValuesType;\n /**\n * Ref to access the form's state and API\n */\n innerRef?: Ref<FormState>;\n /**\n * On-submit callback\n */\n onSubmit: (values: Record<string, unknown>, ref: FormikHelpers<Values>) => unknown;\n /**\n * On form submission with errors (isValid=false), scroll to GlobalError section\n */\n scrollToFormErrorsOnSubmit?: boolean;\n /**\n * On-validate callback, params include values, and the rest of the form state params available in [Formik](https://jaredpalmer.com/formik/docs/api/formik#props-1)\n */\n shareFormContext?: (props: FormikProps<Values>) => unknown;\n /**\n * Show a top-level rundown of all the errors in the form\n */\n showGlobalError?: boolean;\n /**\n * Style object applied to Form component\n */\n style?: Record<string, string>;\n /**\n * Should form submit when an input's onChange is invoked?\n */\n submitOnChange?: boolean;\n /**\n * Validate function passed to formik\n */\n // eslint-disable-next-line @typescript-eslint/no-invalid-void-type -- match Formik's validate type\n validate?: (values: Values) => Promise<FormikErrors<Values>> | object | void;\n /**\n * Should form run validate function on form blur?\n */\n validateOnBlur?: boolean;\n /**\n * Should form run validate function on form change?\n */\n validateOnChange?: boolean;\n /**\n * __[`yup` schema](https://github.com/jquense/yup#yup)__\n */\n validationSchema?: ValidationSchemaType;\n};\n\ntype ValidationSchemaType = {\n fields: Record<string, unknown>;\n};\n\nexport const Form = ({\n children,\n className,\n formId,\n initialValues,\n onSubmit,\n scrollToFormErrorsOnSubmit = true,\n shareFormContext,\n style,\n submitOnChange = false,\n validate,\n validateOnBlur = false,\n validateOnChange = false,\n validationSchema,\n globalErrorRef,\n showGlobalError = true,\n innerRef,\n}: FormProps) => {\n // On invalid form submission, scroll to global errors section\n const [isSubmitting, setIsSubmitting] = useState<boolean | undefined>();\n const [isValid, setIsValid] = useState<boolean | undefined>();\n const [errorCount, setErrorCount] = useState<number>(0);\n const showToast = useToast();\n\n // (values: Values, formikHelpers: FormikHelpers<Values>) => void | Promise<any>\n\n const handleSubmit = (values: ValuesType, ref: FormikHelpers<Values>) => {\n const filteredValues: Record<string, unknown> = {};\n\n // filter/coerce the values to be submitted uniformly\n Object.keys(values).forEach((key) => {\n const keyValue = values[key];\n const isStringType =\n isNotUndefined(validationSchema) &&\n isNotUndefined(validationSchema.fields[key]) &&\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (validationSchema.fields[key] as any)._type === 'string'; // eslint-disable-line no-underscore-dangle\n\n if (keyValue === null || keyValue === undefined) {\n filteredValues[key] = null;\n return;\n }\n\n if (typeof keyValue === 'number') {\n // Catch numbers before !keyValue catches the 0 case\n filteredValues[key] = keyValue;\n return;\n }\n\n if (keyValue === false) {\n // Can't say !keyValue because that'd include empty strings.\n // `false` must remain as `false`, not fall into undefined group.\n filteredValues[key] = false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions -- TS is narrowing any to be only an empty {} here\n if (isStringType && !keyValue) {\n // Handle empty strings\n filteredValues[key] = null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions -- TS is narrowing any to be only an empty {} here\n if (keyValue) {\n // @ts-expect-error -- TS is narrowing any to be only an empty {} here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n filteredValues[key] = isStringType ? keyValue.trim() : keyValue;\n }\n });\n\n onSubmit(filteredValues, ref);\n };\n\n // current?.scrollIntoView conditional check required for unit test\n const shouldScrollToFormErrorsOnSubmit =\n scrollToFormErrorsOnSubmit &&\n (isUndefined(isSubmitting) || !isSubmitting) &&\n (isUndefined(isValid) || !isValid) &&\n // eslint-disable-next-line @typescript-eslint/unbound-method\n isNotUndefined(globalErrorRef.current?.scrollIntoView);\n\n useEffect(() => {\n const formElement = document.querySelector(`form[data-testid=\"${formId}\"]`);\n if (\n (isUndefined(isSubmitting) || !isSubmitting) &&\n isNotUndefined(isValid) &&\n isValid &&\n formElement?.contains(document.activeElement)\n ) {\n /*\n * blur on valid submission\n *\n * Don't leave focus on any elements. A submitted form is dirty=false, but\n * if the focus is still on an input whose value will be coerced (ie.\n * <input type=\"number\" />), and then clicking away from the page via navigation\n * or refresh causes the form to then go \"dirty\".\n *\n * A future alternative if scrolling to the top of the page is ok:\n * document.activeElement = \"#top\"\n *\n */\n (document.activeElement as HTMLElement).blur();\n }\n\n if (shouldScrollToFormErrorsOnSubmit) {\n const errorMessage = errorCount > 1 ? `there are ${errorCount} errors` : \"there's an error!\";\n showToast({\n variant: 'error',\n message: `Uh oh, ${errorMessage}`,\n });\n\n if (globalErrorRef.current) {\n globalErrorRef.current.scrollIntoView({ behavior: 'smooth' });\n }\n }\n }, [\n errorCount,\n globalErrorRef,\n isSubmitting,\n isValid,\n shouldScrollToFormErrorsOnSubmit,\n showToast,\n formId,\n ]);\n\n const configuredInitialValues = handleInitialValues(initialValues, validationSchema);\n const debounceDelay = 750;\n\n return (\n <Formik\n enableReinitialize={true}\n initialValues={configuredInitialValues}\n innerRef={isNotNil(innerRef) ? innerRef : () => {}} // eslint-disable-line @typescript-eslint/no-empty-function\n onSubmit={handleSubmit}\n validate={isNotNil(validate) ? validate : () => {}} // eslint-disable-line @typescript-eslint/no-empty-function\n validateOnBlur={validateOnBlur}\n validateOnChange={validateOnChange}\n validationSchema={validationSchema}\n >\n {(props: FormikProps<Values>): JSX.Element => {\n const [values, setValues] = useState(props.values);\n\n useEffect(() => {\n if (isNotUndefined(shareFormContext)) {\n shareFormContext(props);\n }\n setIsSubmitting(props.isSubmitting);\n setIsValid(props.isValid);\n setErrorCount(Object.keys(props.errors).length);\n\n if (submitOnChange && didValuesChange(props.values, values)) {\n setValues(props.values);\n }\n }, [props, values]);\n\n if (submitOnChange) {\n const [,] = useDebounce(\n () => {\n if (didValuesChange(initialValues, values)) {\n void props.submitForm();\n }\n },\n\n debounceDelay,\n [values],\n );\n }\n\n return (\n <FormikForm\n className={className}\n data-testid={formId}\n noValidate={true}\n style={style}\n >\n {showGlobalError ? (\n <FormGlobalError ref={globalErrorRef as ForwardedRef<HTMLDivElement>} />\n ) : null}\n {children}\n </FormikForm>\n );\n }}\n </Formik>\n );\n};\n\nForm.displayName = 'Form_VHS';\n","import type { ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport type { FormikErrors } from 'formik';\nimport { useFormikContext } from 'formik';\nimport { styled } from 'styled-components';\nimport { isNonEmptyString, isNotNil } from '@wistia/type-guards';\nimport { coerceToBoolean } from '../../helpers/stringHelpers/coerceToBoolean';\n\nconst GlobalErrorsContainer = styled.div`\n border-left: 4px solid;\n border-left-color: ${({ theme }) => theme.color.error500};\n margin-bottom: ${({ theme }) => theme.spacing.space07};\n padding-left: ${({ theme }) => theme.spacing.space02};\n`;\n\nconst ErrorsText = styled.p`\n font-size: 16px;\n font-weight: 500;\n line-height: 1.5;\n margin-bottom: ${({ theme }) => theme.spacing.space02};\n`;\n\nconst ErrorOrderedList = styled.ol`\n list-style: none;\n margin: 0;\n padding-left: 0;\n`;\n\nconst ErrorText = styled.span`\n color: ${({ theme }) => theme.color.error600};\n line-height: 1.5;\n`;\n\nconst ErrorLink = styled(ErrorText)`\n cursor: pointer;\n text-decoration: underline;\n`;\n\nconst errorsTitle = (count: number) => {\n let errorText = 'error';\n if (count > 1) {\n errorText += 's';\n }\n\n return `${count} ${errorText} found on page`;\n};\n\nconst scrollToField = (fieldName: string) => {\n const globalErrorElement = document.getElementById(`fieldset-${fieldName}`);\n globalErrorElement?.scrollIntoView({ behavior: 'smooth' });\n};\n\ntype FieldErrorsListProps = {\n errors?: Record<string, string>;\n statusError?: string | undefined;\n};\n\nconst FieldErrorsList = ({ errors = {}, statusError }: FieldErrorsListProps) => (\n <ErrorOrderedList>\n {isNonEmptyString(statusError) ? <ErrorText>{statusError}</ErrorText> : null}\n {Object.keys(errors).map((field) => (\n <li key={field}>\n {/* eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions */}\n <ErrorLink\n data-testid={`form-global-error-${field}`}\n onClick={(event) => {\n event.preventDefault();\n scrollToField(field);\n }}\n >\n {errors[field]}\n </ErrorLink>\n </li>\n ))}\n </ErrorOrderedList>\n);\n\ntype FormGlobalErrorValues = {\n status?: Record<string, unknown>;\n errors: FormikErrors<FormGlobalErrorValues>;\n};\n\nexport const FormGlobalError = forwardRef((_, ref: ForwardedRef<HTMLDivElement>) => {\n const formikContext = useFormikContext<FormGlobalErrorValues>();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Any is set by Formik\n const { status, errors }: FormGlobalErrorValues = formikContext;\n\n let errorsCount = Object.keys(errors).length;\n if (isNotNil(status) && (status['length'] as number) > 0) {\n errorsCount += 1;\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n const showErrorContainer = (isNotNil(status) && !status['success']) || errorsCount;\n\n if (coerceToBoolean(showErrorContainer)) {\n return (\n <GlobalErrorsContainer ref={ref}>\n <ErrorsText>{errorsTitle(errorsCount)}</ErrorsText>\n <FieldErrorsList\n errors={errors as Record<string, string>} // From Formik regarding errors type: Should always be an object of strings, but any is allowed to support i18n libraries.\n statusError={status as unknown as string} // TODO: Revisit this after the TS conversion. RM.\n />\n </GlobalErrorsContainer>\n );\n }\n\n return null;\n});\n\nFormGlobalError.displayName = 'FormGlobalError_VHS';\n","import { useContext } from 'react';\nimport { ToastContext } from './ToastContext';\n\nexport const useToast = () => useContext(ToastContext);\n","import type { DependencyList } from 'react';\nimport { useEffect } from 'react';\nimport { useTimeoutFunc } from '../useTimeoutFunc';\n\nexport type UseDebounceReturn = [() => boolean | null, () => void];\n\nexport const useDebounce = (\n func: () => void,\n timeout = 0,\n dependencies: DependencyList = [],\n): UseDebounceReturn => {\n const [isReady, cancel, reset] = useTimeoutFunc(func, timeout);\n\n useEffect(reset, dependencies); // eslint-disable-line react-hooks/exhaustive-deps\n\n return [isReady, cancel];\n};\n","import { useCallback, useEffect, useRef } from 'react';\n\nexport type UseTimeoutFnReturn = [() => boolean | null, () => void, () => void];\n\nexport const useTimeoutFunc = (func: () => void, timeout = 0): UseTimeoutFnReturn => {\n const readyRef = useRef<boolean | null>(false);\n const timeoutRef = useRef<ReturnType<typeof setTimeout>>(undefined);\n const callbackRef = useRef(func);\n const isReady = useCallback(() => readyRef.current, []);\n\n const set = useCallback(() => {\n readyRef.current = false;\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n timeoutRef.current = setTimeout(() => {\n readyRef.current = true;\n callbackRef.current();\n }, timeout);\n }, [timeout]);\n\n const clear = useCallback(() => {\n readyRef.current = null;\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n }, []);\n\n // update ref when func changes\n useEffect(() => {\n callbackRef.current = func;\n }, [func]);\n\n // set on mount & clear on unmount\n useEffect(() => {\n set();\n\n return clear;\n }, [timeout]); // eslint-disable-line react-hooks/exhaustive-deps\n\n return [isReady, clear, set];\n};\n","import type { MouseEvent, JSX } from 'react';\nimport { useFormikContext } from 'formik';\nimport { ButtonGroup } from '../ButtonGroup';\nimport { FormConnectorButton } from '../../private/components/FormConnectorButton';\n\n// This fixes a bug that prevented single clicks from registering\n// https://github.com/formium/formik/issues/1796#issuecomment-606643671\nconst handleMouseDown = (event: MouseEvent) => event.preventDefault();\n\ntype ButtonsType = {\n [key: string]: unknown;\n name: string;\n type?: 'button' | 'reset' | 'submit' | undefined;\n};\n\nexport type FormButtonsProps = {\n /**\n * Align button left (typically on a page) or right (typically on a modal).\n */\n align?: 'left' | 'right';\n /**\n * Each button object must have a name, but can also be passed any props that apply to a Button component.\n */\n buttons: ButtonsType[];\n};\n\nexport const FormButtons = ({\n buttons,\n align = 'left',\n ...props\n}: FormButtonsProps): JSX.Element => {\n const { isSubmitting } = useFormikContext();\n\n return (\n <ButtonGroup\n align={align}\n {...props}\n >\n {buttons.map(({ name, type, ...buttonProps }) => (\n <FormConnectorButton\n key={name}\n isSubmitting={isSubmitting}\n type={type}\n {...buttonProps}\n onMouseDown={handleMouseDown}\n >\n {name}\n </FormConnectorButton>\n ))}\n </ButtonGroup>\n );\n};\n\nFormButtons.displayName = 'FormButtons_VHS';\n","import type { ComponentPropsWithRef, MouseEvent, ReactNode } from 'react';\nimport { Button } from '../../../components/Button';\n\n// type FormConnectorButtonProps = Omit<ComponentPropsWithoutRef<'button'>, 'onClick'> & {\ntype FormConnectorButtonProps = ComponentPropsWithRef<'button'> & {\n children: ReactNode;\n disabled?: boolean;\n onClick?: ((event: MouseEvent) => void) | undefined;\n isSubmitting?: boolean;\n type?: 'button' | 'reset' | 'submit' | undefined;\n};\n\nexport const FormConnectorButton = ({\n type = 'submit',\n isSubmitting = false,\n children,\n disabled = false,\n ...props\n}: FormConnectorButtonProps) => {\n const isDisabled = isSubmitting || disabled;\n\n return (\n <Button\n disabled={isDisabled}\n type={type}\n {...props}\n >\n {children}\n </Button>\n );\n};\n\nFormConnectorButton.displayName = 'FormConnectorButton';\n","import type { ComponentPropsWithRef, ReactNode, JSX, ComponentClass, ComponentProps } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\nimport { Field } from 'formik';\nimport { inputTypeMap } from './inputTypeMap';\nimport { FormConnectorCheckboxGroup } from '../../private/components/FormConnectorCheckboxGroup';\nimport type { CustomComponentClass } from '../../private/components/FormConnectorCustomField';\nimport { FormConnectorCustomField } from '../../private/components/FormConnectorCustomField';\nimport { FormConnectorInput } from '../../private/components/FormConnectorInput';\nimport { FormConnectorRadioGroup } from '../../private/components/FormConnectorRadioGroup';\nimport { FormConnectorSelect } from '../../private/components/FormConnectorSelect';\nimport { FormConnectorHidden } from '../../private/components/FormConnectorHidden';\nimport { FormConnectorRichTextEditor } from '../../private/components/FormConnectorRichTextEditor';\nimport type { rteFormatTypes } from '../RichTextEditor/utilities';\n\nconst FormFieldSet = styled.fieldset`\n border: 0;\n flex-grow: 1;\n margin: ${({ theme }) => `0 0 ${theme.spacing.space05}`};\n min-width: 0;\n padding: 0;\n\n &[disabled] {\n label {\n pointer-events: none;\n }\n }\n`;\n\ntype FieldWrapperProps = {\n $resize: 'horizontal' | 'none' | 'vertical';\n};\nconst FieldWrapper = styled(Field)<FieldWrapperProps>`\n resize: ${({ $resize }) => $resize as string};\n`;\n\nexport type FormFieldProps = Omit<ComponentPropsWithRef<'input'>, 'placeholder'> & {\n /**\n * A custom component that acts as a field and that needs access to Formik fields\n */\n customComponent?:\n | ComponentClass<CustomComponentClass>\n | ((arg?: ComponentProps<typeof Field>) => ReactNode)\n | ((arg?: Record<string, unknown>) => ReactNode)\n | undefined;\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables form field\n */\n disabled?: boolean;\n /**\n * Only takes effect if type is richTextEditor. An array of formats that should be enabled in the toolbar.\n */\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n /**\n * Visual label above the input\n */\n label?: JSX.Element | string | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * HTML \"name\" attribute. Also needs to be unique in the form\n */\n name?: string;\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (value: string) => unknown;\n /**\n * Options passed down to the `<Field>` component\n */\n options?: Record<string, unknown>[];\n /**\n * Input's visual placeholder text\n */\n placeholder?: string | null | undefined;\n /**\n * Allows user to vertically or horizontally resize the form field, or to disable resizing altogether\n */\n resize?: 'horizontal' | 'none' | 'vertical';\n /**\n * The type of the field sets the type of input or select, texarea, radio, checkbox, etc.\n */\n type:\n | 'checkbox'\n | 'custom'\n | 'email'\n | 'hidden'\n | 'multiline'\n | 'number'\n | 'password'\n | 'radio'\n | 'richTextEditor'\n | 'select'\n | 'text'\n | 'url';\n};\n\nconst fieldsMap = {\n FormConnectorCheckboxGroup,\n FormConnectorCustomField,\n FormConnectorInput,\n FormConnectorRadioGroup,\n FormConnectorSelect,\n FormConnectorHidden,\n FormConnectorRichTextEditor,\n};\n\nexport const FormField = forwardRef(\n (\n {\n resize = 'vertical',\n customComponent,\n direction = 'column',\n disabled = false,\n label,\n labelDescription,\n labelProps = {},\n name = '',\n onChangeCustom,\n options,\n placeholder = null,\n type = 'text',\n ...otherProps\n }: FormFieldProps,\n ref,\n ) => (\n <FormFieldSet\n disabled={disabled}\n id={`fieldset-${name}`}\n >\n <FieldWrapper\n $resize={resize}\n component={\n fieldsMap[\n inputTypeMap[type as keyof typeof inputTypeMap].component as keyof typeof fieldsMap\n ]\n }\n customComponent={customComponent}\n direction={direction}\n disabled={disabled}\n id={`field-${name}`}\n innerRef={ref}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n onChangeCustom={onChangeCustom}\n options={options}\n placeholder={placeholder}\n type={type}\n {...otherProps}\n />\n </FormFieldSet>\n ),\n);\n\nFormField.displayName = 'FormField_VHS';\n","// @component - Component used to render this <FormInput/> component's type\n// @inputType - \"<input />\" type attribute inserted into <Input/> component\n\nexport const inputTypeMap = {\n checkbox: {\n component: 'FormConnectorCheckboxGroup',\n inputType: null,\n },\n custom: {\n component: 'FormConnectorCustomField',\n inputType: null,\n },\n email: {\n component: 'FormConnectorInput',\n inputType: 'email',\n },\n hidden: {\n component: 'FormConnectorHidden',\n inputType: 'hidden',\n },\n multiline: {\n component: 'FormConnectorInput',\n inputType: null, // we render as `textarea` so no type needed\n },\n number: {\n component: 'FormConnectorInput',\n inputType: 'number',\n },\n password: {\n component: 'FormConnectorInput',\n inputType: 'password',\n },\n phone: {\n component: 'FormConnectorInput',\n inputType: 'tel',\n },\n radio: {\n component: 'FormConnectorRadioGroup',\n inputType: null,\n },\n search: {\n component: 'FormConnectorInput',\n inputType: 'search',\n },\n select: {\n component: 'FormConnectorSelect',\n inputType: null,\n },\n text: {\n component: 'FormConnectorInput',\n inputType: 'text',\n },\n time: {\n component: 'FormConnectorInput',\n inputType: 'time',\n },\n timePosition: {\n component: 'FormConnectorInput',\n inputType: 'text',\n },\n url: {\n component: 'FormConnectorInput',\n inputType: 'url',\n },\n richTextEditor: {\n component: 'FormConnectorRichTextEditor',\n inputType: null,\n },\n};\n","import type { ChangeEvent } from 'react';\nimport { isArray, isNotNil } from '@wistia/type-guards';\nimport { CheckboxGroup } from '../../../components/CheckboxGroup';\nimport type { CheckboxGroupProps } from '../../../components/CheckboxGroup/CheckboxGroup';\n\nexport type FormConnectorCheckboxGroupProps = {\n /**\n * Should the checkboxes be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables form control\n */\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n value?: string[] | boolean;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors?: Record<string, string> | undefined;\n setFieldValue: (name: string, optionValue: unknown) => unknown;\n values?: Record<string, string> | undefined;\n };\n /**\n * The label for the form field\n */\n label?: CheckboxGroupProps['label'];\n /**\n * The hint/helper text under the label\n */\n labelDescription?: CheckboxGroupProps['labelDescription'];\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (value: boolean) => unknown;\n /**\n * Checkbox options\n */\n options?: { name: string; label?: string; labelDescription?: string }[];\n};\n\nexport const FormConnectorCheckboxGroup = ({\n direction = 'column',\n disabled = false,\n field: { name, value },\n form: { errors, setFieldValue },\n label,\n labelDescription,\n labelProps = {},\n onChangeCustom,\n options = [],\n}: FormConnectorCheckboxGroupProps) => {\n const onChangeSingle = (event: ChangeEvent<HTMLInputElement>, optionValue: string) => {\n setFieldValue(optionValue, event.target.checked);\n };\n\n const onChangeMultiple = (event: ChangeEvent<HTMLInputElement>, optionValue: string) => {\n const fieldValues = value;\n // narrow the type here since we're changing multiple so must be working with arrays.\n if (isArray(fieldValues)) {\n if (event.target.checked) {\n fieldValues.push(optionValue);\n } else {\n const index = fieldValues.indexOf(optionValue);\n if (index > -1) {\n fieldValues.splice(index, 1);\n }\n }\n }\n\n setFieldValue(optionValue, fieldValues);\n };\n\n const onChange = Array.isArray(value) && options.length > 1 ? onChangeMultiple : onChangeSingle;\n const safeOptions = Array.isArray(options) ? options : [options];\n\n return (\n <CheckboxGroup\n direction={direction}\n disabled={disabled}\n error={isNotNil(errors) ? errors[name] : undefined}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n onChange={(event: ChangeEvent<HTMLInputElement>, optionValue) => {\n onChange(event, optionValue);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(event.target.checked);\n }\n }}\n options={safeOptions}\n value={value}\n />\n );\n};\n\nFormConnectorCheckboxGroup.displayName = 'FormConnectorCheckboxGroup';\n","import type { ReactNode, JSX, ComponentClass } from 'react';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\n\nexport type CustomComponentClass = {\n field: {\n name: string;\n value?: unknown;\n };\n form: {\n errors?: Record<string, string> | undefined;\n setFieldValue?: ((name: string, optionValue: string) => unknown) | undefined;\n values?: Record<string, string> | undefined;\n };\n};\n\nexport type FormConnectorCustomFieldProps = {\n /**\n * A custom component that acts as a field and that needs access to Formik fields\n */\n customComponent: ComponentClass<CustomComponentClass> | (() => JSX.Element);\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n value?: unknown;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors?: Record<string, string> | undefined;\n setFieldValue?: ((name: string, optionValue: string) => unknown) | undefined;\n values?: Record<string, string> | undefined;\n };\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n};\n\nexport const FormConnectorCustomField = ({\n customComponent: Element,\n field,\n form,\n label = '',\n labelDescription,\n labelProps = {},\n ...otherProps\n}: FormConnectorCustomFieldProps) => {\n const { name } = field;\n const { errors } = form;\n\n return (\n <FormFieldWrapper\n error={isNotUndefined(errors) ? errors[name] : undefined}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n >\n <Element\n field={field}\n form={form}\n {...otherProps}\n />\n </FormFieldWrapper>\n );\n};\n\nFormConnectorCustomField.displayName = 'FormConnectorCustomField';\n","import type { ChangeEvent, ReactNode } from 'react';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\nimport { Input } from '../../../components/Input';\n\n// check inputTypeMap.jsx for all types\nconst TRIMMABLE_INPUTS = new Set(['text', 'multiline', 'url', 'email']);\n\ntype FormInterface = {\n errors: Record<string, string> | undefined;\n setFieldValue: (name: string, optionValue: string) => unknown;\n values?: Record<string, string> | undefined;\n};\n\nexport type FormConnectorInputProps = {\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onBlur: (event: ChangeEvent) => unknown;\n onChange: (event: ChangeEvent) => unknown;\n value?: number | string;\n };\n /**\n * Form passed from Formik lib\n */\n form: FormInterface;\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n onChangeCustom?: (value: string) => unknown;\n /**\n * Triggers onFocusToSelect if is equal to input's value\n */\n onFocusToSelectValue?: string;\n placeholder?: string;\n type: string;\n};\n\nexport const FormConnectorInput = ({\n disabled,\n field: { name, value, onChange, onBlur },\n form: { errors, setFieldValue },\n label,\n labelDescription,\n labelProps,\n onChangeCustom,\n placeholder,\n type,\n onFocusToSelectValue,\n ...otherProps\n}: FormConnectorInputProps) => {\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange(event);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(event.target.value);\n }\n };\n\n const handleBlur = (event: ChangeEvent<HTMLInputElement>) => {\n onBlur(event);\n\n // trim whitespace for some inputs types\n if (TRIMMABLE_INPUTS.has(type)) {\n const trimmedValue = (event.target.value || '').trim();\n setFieldValue(name, trimmedValue);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n const handleFocusToSelect = value === onFocusToSelectValue ? () => {} : undefined;\n\n return (\n <FormFieldWrapper\n disabled={disabled}\n error={isNotUndefined(errors) ? errors[name] : undefined}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n >\n <Input\n data-testid={`input-${name}`}\n disabled={disabled}\n name={name}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocusToSelect={handleFocusToSelect}\n placeholder={placeholder}\n type={type}\n value={value}\n {...otherProps}\n />\n </FormFieldWrapper>\n );\n};\n\nFormConnectorInput.displayName = 'FormConnectorInput';\n","import type {\n ReactNode,\n ComponentPropsWithRef,\n ChangeEvent,\n FocusEvent,\n HTMLInputTypeAttribute,\n RefObject,\n} from 'react';\nimport { forwardRef, useEffect, useRef } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { coerceToString } from '../../helpers/stringHelpers/coerceToString';\nimport { InputStyledComponent } from './InputStyledComponent';\nimport { ClickToCopy } from './ClickToCopy';\nimport { Icon } from '../Icon';\nimport { timePositionFormat } from './timePositionUtils';\nimport { useMergedRefs } from '../../hooks/useMergedRefs';\n\nexport type IconPositionStrings = 'end' | 'start';\nexport type ForcedStateStrings = 'active' | 'focus' | 'hover';\n\n// we need to track which types of inputs have an icon because we need to\n// add some right-side padding when there's an icon in the input so that\n// long strings don't fall behind the icon\nconst INPUT_TYPES_WITH_ICONS = new Set(['search']);\n\ntype InputWrapperTypes = {\n $disabled: boolean;\n $fullWidth: boolean;\n $iconPosition: IconPositionStrings;\n};\n\n// this wrapper exists to allow svg icons to be positioned *inside* an input\nconst InputWrapper = styled.div<InputWrapperTypes>`\n position: relative;\n\n svg {\n color: ${({ theme, $disabled }) => ($disabled ? theme.color.grey300 : theme.color.grey500)};\n cursor: text;\n pointer-events: none;\n position: absolute;\n top: 11px;\n ${({ $iconPosition, theme }) => {\n if ($iconPosition === 'start') {\n return `left: ${theme.spacing.space03};`;\n }\n return `right: ${theme.spacing.space03};`;\n }}\n }\n\n width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};\n`;\n\n// eslint-disable-next-line @typescript-eslint/promise-function-async\nconst renderIcon = (icon: ReactNode, type: string) => {\n if (isNotNil(icon)) {\n return icon;\n }\n if (type === 'search') {\n return (\n <Icon\n size=\"md\"\n type=\"search\"\n />\n );\n }\n return null;\n};\n\nexport type InputProps = ComponentPropsWithRef<'input'> & {\n /**\n * Copy-to-clipboard-on-click of input's value with copy icon\n */\n clickToCopy?: boolean;\n /**\n * Disables Input\n */\n disabled?: boolean | undefined;\n /**\n * @ignore\n * Force an Input into a particular css state (for debugging)\n */\n forceState?: ForcedStateStrings;\n /**\n * Should Input occupy 100% of available space\n */\n fullWidth?: boolean;\n /**\n * Indicates that there is an error with the input\n */\n hasError?: boolean;\n /**\n * An SVG component that will appear on the right-hand side of the input\n * _Note:_ some input types will apply a icon by default\n */\n icon?: ReactNode;\n /**\n * Indicates on which side of the input the icon should render. Will default to `end` unless the `type` prop is `search`.\n */\n iconPosition?: IconPositionStrings;\n /**\n * @ignore\n * This is a prop that is here for use by FormField. Otherwise,\n * the ref prop should just be used\n */\n innerRef?: RefObject<HTMLInputElement | null>;\n // TODO\n // PropTypes.oneOfType([\n // PropTypes.func,\n // PropTypes.shape({ current: PropTypes.instanceOf(Element) }),\n // ]),\n /**\n * Displays text in monospace font\n */\n monospace?: boolean;\n /**\n * Callback function invoked when the input focus blurs\n */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Callback function invoked when the input value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Callback function invoked when the input value is copied\n */\n onClickToCopy?: () => void;\n /**\n * Callback function invoked when the input is focused\n */\n onFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Callback function that will select input text when input is focused;\n * receives event object but if that is not needed just pass a no-op function\n */\n onFocusToSelect?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;\n /**\n * A short hint for the user about what value the Input expects\n */\n placeholder?: string | undefined;\n /**\n * Prevent the Input from being writable (different styling from disabled)\n */\n readOnly?: boolean;\n /**\n * Make Input a required element\n */\n required?: boolean;\n /**\n * The type of Input to render\n */\n type?: HTMLInputTypeAttribute;\n /**\n * The content of Input\n */\n value?: number | string | undefined;\n};\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n clickToCopy = false,\n disabled = false,\n forceState,\n fullWidth = true,\n hasError = false,\n icon,\n iconPosition = 'end',\n innerRef,\n monospace = false,\n onBlur,\n onChange,\n onClickToCopy,\n onFocus,\n onFocusToSelect,\n placeholder,\n readOnly = false,\n required = false,\n type = 'text',\n value,\n ...otherProps\n }: InputProps,\n ref,\n ) => {\n const defaultRef = useRef<HTMLInputElement | null>(null);\n const mergedRefs = useMergedRefs([\n innerRef,\n ref as RefObject<HTMLInputElement | null>,\n defaultRef,\n ]);\n const elementType = type === 'multiline' ? ('textarea' as const) : ('input' as const);\n const isReadOnly = readOnly || clickToCopy;\n const hasIcon = isNotNil(icon) || clickToCopy || INPUT_TYPES_WITH_ICONS.has(type);\n\n useEffect(() => {\n if (type === 'timePosition' && isNotNil(defaultRef.current)) {\n // time position's value needs to be formatted on load\n defaultRef.current.value = timePositionFormat(value ?? 0);\n }\n }, [type, value]);\n\n const handleOnFocus = (event: FocusEvent<HTMLInputElement>) => {\n if (onFocusToSelect) {\n event.target.select();\n onFocusToSelect(event);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleOnBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (type === 'timePosition' && isNotNil(defaultRef.current)) {\n defaultRef.current.value = timePositionFormat(event.target.value);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n // TODO attempt to infer an autocomplete value?\n const baseProps = {\n 'aria-invalid': hasError ? ('true' as const) : ('false' as const),\n as: elementType,\n $clickToCopy: clickToCopy,\n disabled,\n $forceState: forceState,\n $hasError: hasError,\n $hasIcon: hasIcon,\n $iconPosition: type === 'search' ? 'start' : iconPosition,\n $monospace: monospace,\n onBlur: handleOnBlur,\n onChange,\n onFocus: handleOnFocus,\n placeholder,\n readOnly: isReadOnly,\n ref: mergedRefs,\n required,\n type,\n };\n\n const clickToCopyProps = {\n value: coerceToString(value),\n ...baseProps,\n ...otherProps,\n };\n\n const inputProps = {\n value,\n ...baseProps,\n ...otherProps,\n };\n\n if (clickToCopy) {\n return (\n <ClickToCopy\n inputComponent={InputStyledComponent}\n inputProps={clickToCopyProps}\n onClick={onClickToCopy}\n />\n );\n }\n\n return (\n <InputWrapper\n $disabled={disabled}\n $fullWidth={fullWidth}\n $iconPosition={inputProps.$iconPosition}\n >\n <InputStyledComponent {...inputProps} />\n {renderIcon(icon, type)}\n </InputWrapper>\n );\n },\n);\n\nInput.displayName = 'Input_VHS';\n","import { styled, css } from 'styled-components';\nimport type { IconPositionStrings, ForcedStateStrings } from './Input';\nimport { ellipsisStyle } from '../Ellipsis';\n\nconst focusStyle = css`\n border-color: ${({ theme }) => theme.color.brandBlue500};\n outline: none;\n`;\n\nconst errorStyle = css`\n border-color: ${({ theme }) => theme.color.error500};\n\n &:focus {\n border-color: ${({ theme }) => theme.color.error600};\n }\n`;\n\nconst disabledStyle = css`\n -webkit-opacity: 0.5;\n -webkit-text-fill-color: ${({ theme }) => theme.color.grey700};\n color: ${({ theme }) => theme.color.grey900}; /* iOS */\n cursor: not-allowed;\n opacity: 0.5 !important;\n\n &:focus {\n border-color: ${({ theme }) => theme.color.grey300};\n }\n`;\n\nconst readOnlyStyle = css`\n border: dashed 1px ${({ theme }) => theme.color.grey400};\n color: ${({ theme }) => theme.color.grey700};\n outline: none;\n\n &:focus {\n border-color: ${({ theme }) => theme.color.grey300} !important;\n }\n`;\n\nconst clickToCopyStyle = css`\n ${readOnlyStyle}\n flex: 1;\n`;\n\nconst textareaStyle = css`\n line-height: 20px;\n min-height: 80px;\n`;\n\nconst inputStyle = css<{\n $hasIcon: boolean;\n $iconPosition: IconPositionStrings;\n $monospace: boolean;\n}>`\n background-color: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-family: ${({ theme, $monospace }) => $monospace && theme.font.family.monospace};\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 20px;\n padding: ${({ theme }) => theme.spacing.space02};\n width: 100%;\n\n /* prevent text from appearing underneath icon */\n ${({ $hasIcon, $iconPosition }) => {\n if ($hasIcon) {\n if ($iconPosition === 'start') {\n return `padding-left: 36px;`;\n }\n return `padding-right: 36px;`;\n }\n return undefined;\n }}\n\n &::placeholder {\n color: ${({ theme }) => theme.color.grey500};\n opacity: 1; /* Firefox */\n }\n\n /* Microsoft Edge */\n /* stylelint-disable-next-line selector-no-vendor-prefix */\n &::-ms-input-placeholder {\n color: ${({ theme }) => theme.color.grey500};\n }\n\n &:focus {\n ${focusStyle}\n }\n\n /* Handle unwanted zoom into inputs on iOS devices\n * https://uxcellence.com/2014/fix-ios-input-zoom\n */\n @media (max-width: 450px) {\n input[type='email'],\n input[type='number'],\n input[type='password'],\n input[type='search'],\n input[type='tel'],\n input[type='text'],\n input[type='url'],\n textarea,\n select {\n font-size: 16px;\n }\n }\n`;\n\ntype InputStyledComponentProps = {\n as: 'input' | 'textarea';\n $clickToCopy: boolean;\n disabled: boolean;\n $forceState?: ForcedStateStrings | undefined;\n $hasError: boolean;\n $hasIcon: boolean;\n $iconPosition: IconPositionStrings;\n $monospace: boolean;\n readOnly: boolean;\n};\n\nexport const InputStyledComponent = styled.input<InputStyledComponentProps>`\n ${inputStyle}\n ${({ as }) => as === 'textarea' && textareaStyle};\n ${({ as }) => as !== 'textarea' && ellipsisStyle};\n ${({ $clickToCopy }) => $clickToCopy && clickToCopyStyle};\n ${({ disabled }) => disabled && disabledStyle};\n ${({ $forceState }) => $forceState === 'focus' && focusStyle};\n ${({ $hasError }) => $hasError && errorStyle};\n ${({ readOnly }) => readOnly && readOnlyStyle};\n`;\n","import type { MouseEvent, JSX } from 'react';\nimport { useState, useEffect } from 'react';\nimport { styled, css } from 'styled-components';\nimport { isFunction } from '@wistia/type-guards';\nimport { darken } from 'polished';\nimport { Button } from '../Button';\nimport { Icon } from '../Icon';\nimport { useToast } from '../Toast';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { copyToClipboard } from '../../helpers/copyToClipboard';\n\nconst clickToCopyWrapperEnabledStyles = css`\n input {\n cursor: pointer;\n }\n\n textarea {\n cursor: pointer;\n }\n`;\n\nconst ClickToCopyWrapper = styled.div<{\n $disabled: boolean;\n}>`\n align-items: center;\n display: flex;\n position: relative;\n ${({ $disabled }) => !$disabled && clickToCopyWrapperEnabledStyles}\n`;\n\nconst disabledClickToCopyButtonStyles = css`\n cursor: not-allowed;\n`;\n\nconst enabledClickToCopyButtonStyles = css`\n &:hover {\n color: ${({ theme }) => darken('4%', theme.color.grey700)};\n }\n\n &:active {\n color: ${({ theme }) => darken('8%', theme.color.grey700)};\n }\n\n &:focus {\n outline: none;\n }\n`;\n\nconst ClickToCopyButtonComponent = styled(Button)<{\n disabled: boolean;\n}>`\n color: ${({ theme }) => theme.color.grey700};\n position: absolute;\n right: ${({ theme }) => `calc(${theme.spacing.space02} + 1px)`}; /* space + border width */\n transition: color 0.1s ease;\n ${({ disabled }) => (disabled ? disabledClickToCopyButtonStyles : enabledClickToCopyButtonStyles)}\n`;\n\nconst ClickToCopyIcon = styled(Icon)<{ disabled: boolean }>`\n ${({ disabled }) => (disabled ? `cursor: not-allowed;` : 'cursor: pointer;')}\n`;\n\ntype ClickToCopyButtonProps = {\n disabled?: boolean;\n onClick: (event: MouseEvent) => void;\n};\n\nexport const ClickToCopyButton = ({ onClick, disabled = false }: ClickToCopyButtonProps) => {\n const disabledColor: string = useThemeColor('grey500');\n\n return (\n <ClickToCopyButtonComponent\n aria-disabled={disabled}\n aria-label=\"Click to Copy\"\n disabled={disabled}\n noStyle={true}\n onClick={onClick}\n >\n <ClickToCopyIcon\n color={disabled ? disabledColor : 'currentColor'}\n disabled={disabled}\n size=\"md\"\n type={disabled ? 'copy-disabled' : 'copy'}\n />\n </ClickToCopyButtonComponent>\n );\n};\n\ntype ClickToCopyInputProps = {\n disabled?: boolean | undefined;\n value: string;\n};\n\ntype ClickToCopyProps = {\n inputComponent: (props: ClickToCopyInputProps) => JSX.Element;\n inputProps: ClickToCopyInputProps;\n onClick?: (() => void) | undefined;\n};\n\nexport const ClickToCopy = ({\n inputComponent: InputStyledComponent,\n inputProps,\n onClick,\n}: ClickToCopyProps) => {\n const showToast = useToast();\n const [focusTime, setFocusTime] = useState(0);\n const { value, disabled } = inputProps;\n const disabledValue = disabled ?? false;\n\n useEffect(() => {\n if (focusTime > 0) {\n const timer = setTimeout(() => setFocusTime(focusTime - 1), 1000);\n return () => clearTimeout(timer);\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }, [focusTime]);\n\n const handleOnClick = () => {\n void (async () => {\n if (disabledValue) {\n return;\n }\n\n await copyToClipboard(value);\n\n if (isFunction(onClick)) {\n onClick();\n }\n\n showToast({ message: 'Copied to clipboard' });\n\n // Focus input for 5 seconds\n setFocusTime(5);\n })();\n };\n\n const forceState =\n focusTime > 0\n ? {\n $forceState: 'focus',\n }\n : undefined;\n\n const inputComponentProps = {\n ...inputProps,\n ...forceState,\n };\n\n const buttonProps = {\n onClick: handleOnClick,\n disabled: disabledValue,\n 'aria-disabled': disabledValue,\n };\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <ClickToCopyWrapper\n $disabled={disabledValue}\n onClick={handleOnClick}\n >\n <InputStyledComponent {...inputComponentProps} />\n <ClickToCopyButton {...buttonProps} />\n </ClickToCopyWrapper>\n );\n};\n","import { isNil, isNotNil, isNotUndefined, isString } from '@wistia/type-guards';\n\nconst SEC_AND_MIN_MAX = 60;\n\n// Valid characters are \"0-9\" and \":\". Removes invalid characters and spaces\nexport const stripInvalidCharacters = (string: string) => string.replace(/[^0-9:]/g, '');\n\nconst parseNumber = (string: string) => (string ? Number.parseFloat(string) : 0);\n\nexport const timeUnitsToString = (\n seconds: number | string,\n minutes: number | string,\n hours?: number | string,\n) => {\n let formattedString = isNotNil(hours) && Number(hours) > 0 ? `${hours}:` : '';\n formattedString += `${minutes}:${seconds}`;\n return formattedString;\n};\n\nexport const formatString = (string: string) => {\n const stringArray = string.split(':');\n const [initialSeconds, initialMinutes, initialHours] = stringArray\n .reverse()\n .map((stringNumber) => parseNumber(stringNumber));\n\n let seconds: number | string = 0;\n let minutes: number | string = 0;\n let hours: number | string = 0;\n\n // Reduce seconds to correct number\n if (isNotNil(initialSeconds)) {\n minutes = Math.floor(initialSeconds / SEC_AND_MIN_MAX);\n\n if (isNotNil(initialMinutes)) {\n minutes += initialMinutes;\n }\n }\n\n if (isNotNil(initialSeconds)) {\n seconds = initialSeconds % SEC_AND_MIN_MAX;\n }\n\n // Pad seconds with leading zero\n const secondsString = seconds.toString();\n if (secondsString.length === 1) {\n seconds = secondsString.padStart(2, '0');\n }\n\n // Reduce minutes and hours to correct number\n const initialHoursOr0 = isNotUndefined(initialHours) ? initialHours : 0;\n hours = Math.floor(minutes / SEC_AND_MIN_MAX) + initialHoursOr0;\n minutes %= SEC_AND_MIN_MAX;\n\n // Pad minutes with leading zero\n const minutesString = minutes.toString();\n if (hours && minutesString.length === 1) {\n minutes = minutesString.padStart(2, '0');\n }\n\n return timeUnitsToString(seconds, minutes, hours);\n};\n\nexport const timePositionFormat = (value?: number | string) => {\n if (isNil(value) || !isString(value)) {\n return '0:00';\n }\n\n const cleanString = stripInvalidCharacters(value);\n\n return formatString(cleanString);\n};\n","import { useCallback } from 'react';\nimport { RadioGroup } from '../../../components/RadioGroup';\nimport type { RadioGroupProps } from '../../../components/RadioGroup/RadioGroup';\nimport type { RadioProps } from '../../../components/Radio/Radio';\n\nexport type FormConnectorRadioGroupProps = {\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables form control\n */\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n };\n /**\n * Form passed from Formik lib\n */\n // asdf: fieldValu;\n form: {\n errors: Record<string, string>;\n setFieldValue: (name: string, optionValue: RadioProps['value']) => unknown;\n values: Record<string, string>;\n };\n /**\n * The label for the form field\n */\n label?: RadioGroupProps['label'];\n /**\n * The hint/helper text under the label\n */\n labelDescription?: RadioGroupProps['labelDescription'];\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (optionValue: RadioProps['value']) => unknown;\n /**\n * Checkbox options\n */\n options: { label: string; labelDescription?: string; value: string; disabled?: boolean }[];\n};\n\nexport const FormConnectorRadioGroup = ({\n direction = 'column',\n disabled = false,\n field: { name },\n form: { errors, values, setFieldValue },\n label = '',\n labelDescription,\n labelProps = {},\n onChangeCustom,\n options,\n}: FormConnectorRadioGroupProps) => {\n const handleOnChange = useCallback<NonNullable<RadioGroupProps['onChange']>>(\n (_event, optionValue) => {\n setFieldValue(name, optionValue);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(optionValue);\n }\n },\n [setFieldValue, name, onChangeCustom],\n );\n\n return (\n <RadioGroup\n direction={direction}\n disabled={disabled}\n error={errors[name]}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n onChange={handleOnChange}\n options={options}\n value={values[name]}\n />\n );\n};\n\nFormConnectorRadioGroup.displayName = 'FormConnectorRadioGroup';\n","import type { ComponentPropsWithoutRef, ChangeEvent, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { Radio } from '../Radio';\nimport { FormFieldWrapper } from '../../private/components/FormFieldWrapper';\nimport type { RadioProps } from '../Radio/Radio';\n\ntype StyledOptionContainerProps = {\n direction: 'column' | 'row';\n};\n\nconst StyledOptionContainer = styled.div<StyledOptionContainerProps>`\n display: flex;\n flex-direction: ${({ direction }) => (direction === 'row' ? 'row' : 'column')};\n gap: ${({ direction, theme }) =>\n direction === 'row' ? theme.spacing.space04 : theme.spacing.space01};\n`;\n\nexport type RadioGroupProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Whether RadioGroup is disabled\n */\n disabled?: boolean;\n /**\n * Error message to be displayed\n */\n error?: string | undefined;\n /**\n * The label for the form field\n */\n label?: JSX.Element | string | null | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Should match the ID attribute of the radio. Can be used to group together multiple radios\n */\n name: string;\n /**\n * Fires on checking or unchecking radios in group\n */\n onChange?: (event: ChangeEvent, value: RadioProps['value']) => unknown;\n /**\n * Array of radios attributes\n */\n options: Pick<RadioProps, 'disabled' | 'label' | 'labelDescription' | 'value'>[];\n /**\n * Currently selected radio value\n */\n value?: string | undefined;\n};\n\nexport const RadioGroup = ({\n direction = 'column',\n disabled = false,\n error,\n label,\n labelDescription,\n labelProps = {},\n name,\n onChange,\n options,\n value,\n ...otherProps\n}: RadioGroupProps): JSX.Element => (\n <FormFieldWrapper\n disabled={disabled}\n error={error}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n labelType=\"legend\"\n name={name}\n role=\"radiogroup\"\n {...otherProps}\n >\n <StyledOptionContainer direction={direction}>\n {options.map((option) => (\n <Radio\n key={option.value}\n checked={value === option.value}\n direction={direction}\n disabled={disabled}\n labelDescription={option.labelDescription}\n name={name}\n onChange={(event: ChangeEvent) =>\n isNotNil(onChange) ? onChange(event, option.value) : undefined\n }\n {...option}\n />\n ))}\n </StyledOptionContainer>\n </FormFieldWrapper>\n);\n\nRadioGroup.displayName = 'RadioGroup_VHS';\n","import type { ChangeEvent, ComponentPropsWithoutRef, JSX } from 'react';\nimport { forwardRef, useState, isValidElement } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport {\n Container,\n OptionWrapper,\n OptionLabel,\n OptionSubLabel,\n} from '../Checkbox/OptionStyledComponent';\n\nexport type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'value'> & {\n /**\n * Indicates the state of the radio\n */\n checked?: boolean;\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables input\n */\n disabled?: boolean;\n /**\n * @ignore // I don't know what to do with this\n * Force a Radio into a particular css state (for debugging)\n */\n forceState?: 'focus' | 'hover';\n /**\n * Indicates that there is an error with the input\n */\n hasError?: boolean;\n /**\n * Provides an ID for the input\n */\n id?: string;\n /**\n * The label for the input\n */\n label: JSX.Element | string;\n /**\n * The description for the input\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Should match the ID attribute of the radio.\n * Can be used to group together multiple radios\n */\n name?: string;\n /**\n * Callback function invoked when the value changes\n */\n onChange?: (event: ChangeEvent) => unknown;\n /**\n * The value attribute of the input\n */\n value?: string;\n};\n\nexport const Radio = forwardRef<HTMLLabelElement, RadioProps>(\n (\n {\n checked,\n direction = 'column',\n disabled = false,\n forceState,\n hasError = false,\n id,\n label,\n labelDescription,\n name,\n onChange,\n value = 'false',\n ...otherProps\n }: RadioProps,\n ref,\n ): JSX.Element => {\n const [focused, setFocused] = useState(false);\n return (\n <Container\n ref={ref}\n $direction={direction}\n $disabled={disabled}\n $forceState={forceState}\n $hasError={hasError}\n $isFocused={focused}\n >\n <OptionWrapper\n aria-checked={checked}\n checked={checked}\n data-testid=\"radio-option-wrapper\"\n disabled={disabled}\n id={id}\n name={name}\n onBlur={() => setFocused(false)}\n onChange={onChange}\n onFocus={() => setFocused(true)}\n role=\"radio\"\n type=\"radio\"\n value={value}\n {...otherProps}\n />\n <OptionLabel>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{label}</>\n {isNotNil(labelDescription) || isValidElement(labelDescription) ? (\n <OptionSubLabel data-testid=\"radio-option-sub-label\">{labelDescription}</OptionSubLabel>\n ) : null}\n </OptionLabel>\n </Container>\n );\n },\n);\n\nRadio.displayName = 'Radio_VHS';\n","import type { ChangeEvent, ReactNode } from 'react';\nimport { isNil, isBoolean } from '@wistia/type-guards';\nimport { Select } from '../../../components/Select';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\nimport { coerceToString } from '../../../helpers/stringHelpers/coerceToString';\n\nexport type FormConnectorSelectProps = {\n /**\n * Disables form control\n */\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onBlur: () => unknown;\n onChange: (event: ChangeEvent) => unknown;\n value?: boolean | number | string;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors: Record<string, string>;\n setFieldValue?: (name: string, optionValue: string) => unknown;\n values?: Record<string, string>;\n };\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (value: string) => unknown;\n /**\n * Select options\n */\n options: { label?: string; value?: number | string }[];\n /**\n * Value of text to appear by default as first option in Select; use `null` for none\n */\n placeholder?: string;\n};\n\nexport const FormConnectorSelect = ({\n disabled = false,\n field: { name, value, onChange, onBlur },\n form: { errors },\n label,\n labelDescription,\n labelProps = {},\n options,\n placeholder,\n onChangeCustom,\n ...otherProps\n}: FormConnectorSelectProps) => {\n const getValue = (val: boolean | number | string | undefined): number | string => {\n if (isNil(val)) {\n return '';\n }\n if (isBoolean(val)) {\n return coerceToString(value);\n }\n return val;\n };\n return (\n <FormFieldWrapper\n disabled={disabled}\n error={errors[name]}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n >\n <Select\n data-testid={`select-${name}`}\n disabled={disabled}\n name={name}\n onBlur={onBlur}\n onChange={(event) => {\n onChange(event);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(event.target.value);\n }\n }}\n options={options}\n placeholder={placeholder}\n value={getValue(value)}\n {...otherProps}\n />\n </FormFieldWrapper>\n );\n};\n\nFormConnectorSelect.displayName = 'FormConnectorSelect';\n","import type { ComponentPropsWithRef, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled, css } from 'styled-components';\nimport { isBoolean, isNonEmptyString, isNotNil } from '@wistia/type-guards';\nimport { SelectStyledComponent } from './SelectStyledComponent';\nimport { Icon } from '../Icon';\nimport { coerceToString } from '../../helpers/stringHelpers/coerceToString';\n\nconst getSvgColor = (theme: DefaultTheme, disabled: boolean, focused: boolean): string => {\n if (disabled) {\n return theme.color.grey300;\n }\n if (focused) {\n return theme.color.brandBlue500;\n }\n return theme.color.grey700;\n};\n\ntype SelectWrapperProps = {\n $disabled: boolean;\n $forceState: 'active' | 'focus' | 'hover' | undefined;\n $fullWidth: boolean;\n};\n\n// this wrapper exists to allow an svg icon to be positioned *on top of* a select\nconst SelectWrapper = styled.div<SelectWrapperProps>`\n position: relative;\n\n /* svg here is referring to the caret that appears on the left */\n svg {\n color: ${({ theme, $disabled }) => getSvgColor(theme, $disabled, false)};\n cursor: pointer;\n pointer-events: none;\n position: absolute;\n right: ${({ theme }) => theme.spacing.space02};\n top: ${({ theme }) => theme.spacing.space03};\n\n /* fakes the focus state of the svg for documentation purposes */\n ${({ theme, $forceState }) =>\n $forceState === 'focus' &&\n css`\n color: ${getSvgColor(theme, false, true)};\n `}\n }\n\n /* match border focus color */\n ${SelectStyledComponent}:focus + svg {\n color: ${({ theme }) => getSvgColor(theme, false, true)};\n }\n\n width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};\n`;\n\nconst renderOptions = (options: OptionsType | [], labelName?: string, valueName?: string) => {\n const renderOptionGroup = ({\n groupLabel,\n groupOptions,\n disabled = false,\n }: GroupOptionType): JSX.Element => (\n <optgroup\n key={groupLabel}\n data-testid={groupLabel}\n disabled={disabled}\n label={groupLabel}\n >\n {renderOptions(groupOptions)}\n </optgroup>\n );\n\n return options.map((option) => {\n // if option has a `groupLabel` key we assume we've received a group object\n // eslint-disable-next-line prefer-object-has-own\n if (Object.prototype.hasOwnProperty.call(option, 'groupLabel')) {\n return renderOptionGroup(option as GroupOptionType);\n }\n\n const { label, value, disabled = false } = option as OptionType;\n let optionValue = isNonEmptyString(valueName)\n ? option[valueName as keyof typeof option]\n : value;\n\n const optionLabel = isNonEmptyString(labelName)\n ? option[labelName as keyof typeof option]\n : label;\n\n if (isBoolean(optionValue)) {\n optionValue = coerceToString(optionValue);\n }\n\n return (\n <option\n key={`${coerceToString(optionLabel)}--${coerceToString(optionValue)}`}\n disabled={disabled}\n value={optionValue}\n >\n {optionLabel}\n </option>\n );\n });\n};\n\nconst renderPlaceholder = (\n placeholder: string | null,\n preventPlaceholderSelection: boolean,\n multiple: boolean,\n) => {\n // do not show a placeholder for multiple select even if one is provided\n if (isNotNil(placeholder) && !multiple) {\n return renderOptions([\n { label: placeholder, value: '', disabled: preventPlaceholderSelection },\n ]);\n }\n return null;\n};\n\nconst renderIcon = (multiple: boolean) => {\n // we don't want to show a dropdown icon when\n if (multiple) {\n return null;\n }\n return (\n <Icon\n size=\"md\"\n type=\"caret-down\"\n />\n );\n};\n\ntype GroupOptionType = {\n disabled?: boolean;\n groupLabel?: string;\n groupOptions: OptionType[];\n};\n\ntype OptionType = {\n disabled?: boolean;\n label?: string;\n value?: boolean | number | string;\n};\nexport type OptionsType = GroupOptionType[] | OptionType[];\n\n// Omit placholder from <select> passthrough props because we want to also allow for 'null'\nexport type SelectProps = Omit<ComponentPropsWithRef<'select'>, 'placeholder'> & {\n /**\n * Optional accessible label for when there is no accompanying <label> element\n */\n ariaLabel?: string;\n /**\n * Disables Select\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Select into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * Should Select occupy 100% of available space\n */\n fullWidth?: boolean;\n /**\n * Indicates that there is an error with the Select\n */\n hasError?: boolean;\n /**\n * Change option's label name from \"label\"\n */\n labelName?: string;\n /**\n * Allow multiple options in the list to be selected at the same time\n */\n multiple?: boolean;\n /**\n * Data structure to populate option labels & values. (`{ label, value, disabled }`)\n * Additionally this can be used to render option groupings. (`{ groupLabel, groupOptions, disabled }`)\n */\n options: OptionsType;\n /**\n * Value of text to appear by default as first option in Select, use `null` for none\n */\n placeholder?: string | null | undefined;\n /**\n * Prevent the placeholder value from being selected\n */\n preventPlaceholderSelection?: boolean;\n /**\n * Make Select a required element\n */\n required?: boolean;\n /**\n * Change option's value name from \"value\"\n */\n valueName?: string;\n};\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n ariaLabel,\n disabled = false,\n forceState,\n fullWidth = true,\n hasError = false,\n labelName = 'label',\n multiple = false,\n options,\n placeholder = 'Please select...',\n preventPlaceholderSelection = false,\n required = false,\n valueName = 'value',\n ...otherProps\n }: SelectProps,\n ref,\n ) => (\n <SelectWrapper\n $disabled={disabled}\n $forceState={forceState}\n $fullWidth={fullWidth}\n >\n <SelectStyledComponent\n ref={ref}\n $forceState={forceState}\n $hasError={hasError}\n aria-invalid={hasError ? 'true' : 'false'}\n aria-label={ariaLabel}\n disabled={disabled}\n multiple={multiple}\n required={required}\n {...otherProps}\n >\n {renderPlaceholder(placeholder, preventPlaceholderSelection, multiple)}\n {renderOptions(options, labelName, valueName)}\n </SelectStyledComponent>\n {renderIcon(multiple)}\n </SelectWrapper>\n ),\n);\n\nSelect.displayName = 'Select_VHS';\n","import { styled, css } from 'styled-components';\nimport { ellipsisStyle } from '../Ellipsis';\n\nconst focusStyle = css`\n border: 1px solid ${({ theme }) => theme.color.brandBlue500};\n`;\n\nconst disabledStyle = css`\n color: ${({ theme }) => theme.color.grey900};\n cursor: not-allowed;\n opacity: 0.5;\n\n &:focus {\n border-color: ${({ theme }) => theme.color.grey300};\n }\n`;\n\nconst errorStyle = css`\n border: 1px solid ${({ theme }) => theme.color.error500};\n`;\n\ntype SelectStyledComponentProps = {\n $forceState: 'active' | 'focus' | 'hover' | undefined;\n $hasError: boolean;\n disabled: boolean;\n multiple: boolean;\n};\n\nexport const SelectStyledComponent = styled.select<SelectStyledComponentProps>`\n ${ellipsisStyle}\n appearance: none;\n background-color: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey900};\n cursor: pointer;\n display: block;\n font-size: 14px;\n height: ${({ multiple }) => (multiple ? '66px' : 'auto')};\n line-height: 20px;\n margin: 0;\n outline: none;\n\n /* selects w/ multiple need to be able to scroll */\n overflow-y: ${({ multiple }) => (multiple ? 'scroll' : 'hidden')};\n\n /* right padding is to prevent text collision with caret icon */\n padding: ${({ theme }) => `7px ${theme.spacing.space06} 7px ${theme.spacing.space02}`};\n width: 100%;\n\n &:focus {\n ${focusStyle}\n }\n\n /* this removes a dotted border around select text when focusing in Firefox */\n &:-moz-focusring {\n color: transparent;\n text-shadow: 0 0 0 #000000;\n }\n\n /* remove drop-down arrow in IE */\n &::-ms-expand {\n display: none;\n }\n\n ${({ disabled }) => disabled && disabledStyle}\n ${({ $hasError }) => $hasError && errorStyle}\n ${({ $forceState }) => $forceState === 'focus' && focusStyle};\n`;\n","import type { ChangeEvent } from 'react';\nimport { useEffect } from 'react';\nimport { isNil, isNotUndefined } from '@wistia/type-guards';\nimport { Input } from '../../../components/Input';\n\nexport type FormConnectorHiddenProps = {\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onChange: (event: ChangeEvent) => unknown;\n value?: number | string | undefined;\n };\n /**\n * Form passed from Formik lib\n */\n form?: {\n errors?: Record<string, string> | undefined;\n setFieldValue?: ((name: string, optionValue: string) => unknown) | undefined;\n values?: Record<string, string> | undefined;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom: (value: string) => unknown;\n /**\n * Hidden fields may be changed on the client, so updating this prop will update Formik with the new value for this field\n */\n valueState?: string;\n};\n\nexport const FormConnectorHidden = ({\n field: { name, value, onChange },\n form: { setFieldValue } = {},\n onChangeCustom,\n valueState = '',\n ...otherProps\n}: FormConnectorHiddenProps) => {\n useEffect(() => {\n // Don't continue if valueState (new value) is still null, undefined, or ''\n if (!valueState && isNil(value)) {\n return;\n }\n\n // If the parent component passes down an updated \"valueState\" that's different\n // from the current value, update Formik with that value.\n if (valueState !== value && isNotUndefined(setFieldValue)) {\n setFieldValue(name, valueState);\n }\n }, [setFieldValue, name, valueState, value]);\n\n return (\n <Input\n data-testid={`input-${name}`}\n name={name}\n onChange={(event: ChangeEvent<HTMLInputElement>) => {\n onChange(event);\n // Custom onChange handler that provides new selected value\n if (isNotUndefined(onChangeCustom)) {\n onChangeCustom(event.target.value);\n }\n }}\n type=\"hidden\"\n value={isNil(value) ? '' : value}\n {...otherProps}\n />\n );\n};\n\nFormConnectorHidden.displayName = 'FormConnectorHidden';\n","import type { ChangeEvent, ReactNode } from 'react';\nimport { useState, useEffect } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport type { Descendant } from 'slate';\nimport { coerceToString } from '../../../helpers/stringHelpers/coerceToString';\nimport {\n RichTextEditor,\n rteFormatTypes,\n rteDeserializeHTML,\n rteSerializeToHTML,\n} from '../../../components/RichTextEditor';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\n\nconst Wrapper = styled.div`\n margin-top: ${({ theme }) => theme.spacing.space02};\n`;\n\nexport type FormConnectorRichTextEditorProps = {\n disabled?: boolean;\n /**\n * Formats to enable in editor, restricted to rteFormatTypes\n */\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onBlur?: (name: string) => (event: ChangeEvent) => unknown;\n onChange: (name: string) => (serializedValue: unknown) => unknown;\n value?: number | string;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors: Record<string, string>;\n setFieldValue?: (name: string, optionValue: string) => unknown;\n values?: Record<string, string>;\n };\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n // Note: the Formik Field placeholder behaves differently from the RTE placeholder.\n // If you want a placeholder, you'll need to pass it in explicitly at the Field level. The default RTE placeholder won't take effect.\n placeholder?: string;\n /**\n * Whether to update the editor when the value prop changes\n */\n useExternalValue?: boolean;\n /**\n * Custom height of editor\n */\n height?: string | undefined;\n};\n\nexport const FormConnectorRichTextEditor = ({\n field: { name, value, onChange },\n form: { errors },\n label,\n labelDescription,\n labelProps = {},\n placeholder = '',\n disabled = false,\n enabledFormats = Object.values(rteFormatTypes),\n useExternalValue = false,\n height = undefined,\n ...otherProps\n}: FormConnectorRichTextEditorProps) => {\n // serializers haven't been converted to TS yet\n const [rteValue, setRTEValue] = useState<\n (Descendant | string | null)[] | Descendant | string | null | undefined\n >(rteDeserializeHTML(coerceToString(value)));\n const labelId = isNotUndefined(label) ? `${name}-label-id` : undefined;\n\n useEffect(() => {\n if (useExternalValue) {\n // serializers haven't been converted to TS yet\n setRTEValue(rteDeserializeHTML(coerceToString(value)));\n }\n }, [useExternalValue, value]);\n\n return (\n <FormFieldWrapper\n disabled={disabled}\n error={errors[name]}\n label={label}\n labelDescription={labelDescription}\n labelId={labelId}\n labelProps={labelProps}\n name={name}\n >\n <Wrapper data-testid={`richTextEditor-${name}`}>\n <RichTextEditor\n ariaLabelledBy={labelId}\n disabled={disabled}\n enabledFormats={enabledFormats}\n height={height}\n onChange={(event) => {\n setRTEValue(event);\n // Formik expects values to be at least a string\n // TODO: Revisit this when serializers are converted to TS\n const serializedValue = rteSerializeToHTML(event) ?? '';\n onChange(name)(serializedValue);\n }}\n placeholder={placeholder}\n useExternalValue={useExternalValue}\n value={rteValue as Descendant[]}\n {...otherProps}\n />\n </Wrapper>\n </FormFieldWrapper>\n );\n};\n\nFormConnectorRichTextEditor.displayName = 'FormConnectorRichTextEditor';\n","import type { JSX, FocusEvent } from 'react';\nimport type { RenderLeafProps, RenderElementProps } from 'slate-react';\nimport type { Descendant, Editor, Node } from 'slate';\nimport { useCallback, useMemo, useEffect } from 'react';\nimport { styled } from 'styled-components';\nimport { Editable, withReact, Slate, ReactEditor } from 'slate-react';\nimport { createEditor, Transforms, Element, Text } from 'slate';\nimport { withHistory } from 'slate-history';\nimport { isHotkey } from 'is-hotkey';\nimport { isNil, isNotNil, isNonEmptyString } from '@wistia/type-guards';\nimport isEqual from 'react-fast-compare';\nimport { rteSerializeToHTML } from './serializers';\nimport { Leaf } from './Leaf';\nimport { Element as ElementToRender } from './Element';\nimport { EditorButtons } from './EditorButtons';\nimport {\n rteFormatTypes,\n handleListEscape,\n withLinks,\n withImages,\n toggleMark,\n toggleBlck,\n} from './utilities';\nimport type { NodeElementObject } from './types';\n\nconst EditableWrapper = styled(Editable)`\n color: ${({ theme }) => theme.color.grey900};\n outline: none; /* prevent blue accessibility outline from appearing on focus */\n`;\n\ntype EditorWrapperProps = {\n disabled: boolean;\n dataTestId?: string;\n height?: string | undefined;\n};\n\nconst defaultHeight = '300px';\nconst EditorWrapper = styled.div<EditorWrapperProps>`\n background: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'auto')};\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n height: ${({ height }) => height ?? defaultHeight};\n overflow: auto;\n padding: 0 ${({ theme }) => theme.spacing.space04};\n\n strong {\n font-weight: ${({ theme }) => theme.font.weight.bold};\n }\n`;\n\nconst HOTKEYS = {\n 'mod+b': 'bold',\n 'mod+i': 'italic',\n 'mod+u': 'underline',\n};\n\nexport type RichTextEditorProps = {\n /**\n * Optional id to set aria-labelledby\n */\n ariaLabelledBy?: string | undefined;\n /**\n * @ignore\n */\n 'data-testid'?: string;\n /**\n * Determines whether editor is clickable/read-only\n */\n disabled?: boolean;\n /**\n * Formats to enable in editor, restricted to rteFormatTypes\n */\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n /**\n * Function to be called after editor state update\n */\n onChange?: ((value: NodeElementObject[]) => void) | undefined;\n /**\n * Function to be called when editor loses focus\n */\n onBlur?: ((value: NodeElementObject[]) => void) | undefined;\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * Value of editor based on controlled input\n */\n value?: Descendant[];\n /**\n * Whether to update the editor when the value prop changes\n */\n useExternalValue: boolean;\n /**\n * Custom height of editor\n */\n height?: string | undefined;\n};\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst emptyTextNode = { text: '' };\nconst defaultValue: Descendant[] = [\n {\n type: 'paragraph',\n children: [emptyTextNode],\n },\n];\n\nexport const RichTextEditor = ({\n enabledFormats = Object.values(rteFormatTypes),\n value = defaultValue,\n onChange,\n onBlur,\n placeholder = 'Enter some rich text...',\n disabled = false,\n ariaLabelledBy,\n useExternalValue,\n 'data-testid': dataTestId = 'vhs-rich-text-editor',\n height,\n ...otherProps\n}: RichTextEditorProps): JSX.Element => {\n const renderElement = useCallback(\n (props: RenderElementProps) => <ElementToRender {...props} />,\n [],\n );\n const renderLeaf = useCallback((props: RenderLeafProps) => <Leaf {...props} />, []);\n const editor: Editor = useMemo(\n () => withImages(withLinks(withHistory(withReact(createEditor())))),\n [],\n );\n\n /**\n * This is directly from the Slate.js docs on how to update slate outside of onChange:\n * If you want to update the editor's content in response to events from outside of Slate, you\n * need to change the children property directly. The simplest way is to replace the value of\n * editor.children editor.children = newValue and trigger a re-rendering (e.g. by calling\n * editor.onChange() in the example above).\n * More info here: https://docs.slatejs.org/walkthroughs/06-saving-to-a-database\n */\n\n const isTextValid = (rteValue: Descendant[]) => {\n if (isNil(rteValue) || isNil(rteValue[0]) || isNil(rteValue[0].children)) {\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { text } = rteValue[0].children[0]!;\n // because text is an external value, Slate's recommendation for narrowing the type does not work with Element.isElement(node)\n return isNonEmptyString(text);\n };\n\n useEffect(() => {\n const isDefaultValue = isEqual(value, defaultValue);\n const valueString = rteSerializeToHTML(value);\n const editorChildrenString = rteSerializeToHTML(editor.children);\n /** if we have an external value and the text editor is not empty (and therefore valid) and the value string and children string is not equal to one another, we can safely update the editor. */\n if (\n isDefaultValue ||\n (isTextValid(value) && useExternalValue && valueString !== editorChildrenString)\n ) {\n editor.children = value;\n editor.selection = null;\n editor.onChange();\n }\n }, [value, editor, useExternalValue]);\n\n const handleEditorBlur = (_event: FocusEvent<HTMLDivElement>) => {\n const updatedValue = editor.children;\n\n if (isNotNil(onBlur)) {\n onBlur(updatedValue);\n }\n };\n\n const handleRemoveImageIfSelected = useCallback(() => {\n const { selection } = editor;\n\n if (isNil(selection) || isNil(selection.anchor.path[0])) {\n return;\n }\n\n const selectedElement = editor.children[selection.anchor.path[0]];\n if (Element.isElement(selectedElement) && selectedElement.type === 'image') {\n toggleBlck(editor, 'image');\n Transforms.removeNodes(editor, { at: selection });\n Transforms.move(editor, { reverse: true });\n // eslint-disable-next-line @typescript-eslint/prefer-find\n const spanElement = editor.children.filter(\n (child: Node) => Element.isElement(child) && child.type === 'span',\n )[0];\n if (\n Element.isElement(spanElement) &&\n spanElement.type === 'span' &&\n isNotNil(spanElement.children) &&\n isNotNil(spanElement.children[0]) &&\n isNotNil(spanElement.children[0].text) &&\n spanElement.children[0].text.trim() !== ''\n ) {\n Transforms.setNodes(\n editor,\n { type: 'paragraph' },\n {\n match: (node: Node) =>\n Element.isElement(node) &&\n node.type === 'span' &&\n isNotNil(node.children) &&\n Text.isText(node.children[0]) &&\n isNotNil(node.children[0].text) &&\n node.children[0].text.trim() !== '',\n split: true,\n mode: 'highest',\n },\n );\n }\n }\n }, [editor]);\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <EditorWrapper\n data-testid={dataTestId}\n disabled={disabled}\n height={height}\n onClick={() => {\n ReactEditor.focus(editor);\n }}\n >\n <Slate\n editor={editor}\n initialValue={value}\n onChange={onChange}\n {...otherProps}\n >\n <EditorButtons\n disabled={disabled}\n enabledFormats={enabledFormats}\n />\n <EditableWrapper\n aria-labelledby={ariaLabelledBy}\n autoFocus={false}\n data-testid=\"editor-content\"\n onBlur={handleEditorBlur}\n onKeyDown={(event) => {\n Object.keys(HOTKEYS).forEach((hotKey: string) => {\n if (isHotkey(hotKey, event)) {\n event.preventDefault();\n toggleMark(editor, HOTKEYS[hotKey as keyof typeof HOTKEYS]);\n }\n });\n if (event.key === 'Enter' && !event.shiftKey) {\n handleListEscape(editor);\n }\n if (event.key === 'Backspace' || event.key === 'Clear' || event.key === 'Delete') {\n handleRemoveImageIfSelected();\n }\n }}\n placeholder={placeholder}\n readOnly={disabled}\n renderElement={renderElement}\n renderLeaf={renderLeaf}\n spellCheck={true}\n />\n </Slate>\n </EditorWrapper>\n );\n};\n\nRichTextEditor.displayName = 'RichTextEditor_VHS';\n","import type { Node, Descendant } from 'slate';\nimport { Element, Text } from 'slate';\nimport { jsx } from 'slate-hyperscript';\nimport { isNotNil, isNil, isString, isArray } from '@wistia/type-guards';\nimport { escapeHtml } from '../../private/helpers/escapeHtml';\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst emptyTextNode = { text: '' };\n\n// Image nodes need blank text by SlateJS design, so we make some exceptions for them\nconst rteIsNonImageNodeType = (node: Descendant): boolean => node.type !== 'image';\n\nconst rteIsInvalidImage = (node: Descendant): boolean =>\n node.type === 'image' && node.url === undefined;\n\nconst rteHasOnlyOneChild = (node: Descendant): boolean =>\n isNotNil(node.children) && node.children.length === 1;\nconst rteIsEmptyTextNode = (node: Descendant): boolean =>\n Text.isText(node) && node.text?.trim() === '';\nconst rteIsOnlyChildWithEmptyText = (node: Descendant): boolean =>\n // We know that node.children[0] exists bcause of rteHasOnlyOneChild\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n rteHasOnlyOneChild(node) && rteIsEmptyTextNode(node.children![0]!);\n\nconst isValueNull = (value: (string | null)[]): boolean => value.every((val) => isNil(val));\nconst sanitizedValue = (value: (string | null)[]): string | null =>\n isValueNull(value) ? null : value.join('');\n\n// Handles cases in foreign HTML (i.e., in case of import or paste)\n// when links may be wrapped by attr tags like <strong></strong>,\n// which breaks the rules of SlateJS.\n// The code here correctly adds those attrs to the children of the element.\n// Inspired by https://github.com/udecode/slate-plugins/pull/83/files.\nconst addAttrsToChildren = (child: Descendant, attrs: Record<string, unknown>) => {\n const childCopy = child;\n if (childCopy.children) {\n childCopy.children = childCopy.children.map((item) => {\n const itemWithAttrs = addAttrsToChildren(item, attrs);\n return { ...itemWithAttrs, ...attrs };\n });\n }\n return childCopy;\n};\n\n// serialize to HTML\nconst serializeText = (textNode: Text) => {\n const text = escapeHtml(textNode.text);\n const newStringArr = [text];\n if (isNotNil(textNode.bold) && textNode.bold) {\n newStringArr.push('</strong>');\n newStringArr.unshift('<strong>');\n }\n if (isNotNil(textNode.italic) && textNode.italic) {\n newStringArr.push('</em>');\n newStringArr.unshift('<em>');\n }\n if (isNotNil(textNode.underline) && textNode.underline) {\n newStringArr.push('</u>');\n newStringArr.unshift('<u>');\n }\n if (isNotNil(textNode.strikethrough) && textNode.strikethrough) {\n newStringArr.push('</s>');\n newStringArr.unshift('<s>');\n }\n if (isNotNil(textNode.code) && textNode.code) {\n newStringArr.push('</code>');\n newStringArr.unshift('<code>');\n }\n return newStringArr.join('');\n};\n\nconst serializeNode = (node: Descendant): string | null => {\n // if the only thing in the editor is\n // a non-image RTE node with empty text (since image nodes need empty text by SlateJS design)\n // OR if the node is an image but invalid, with an undefined src\n // do not serialize the HTML for it.\n if (\n (rteIsNonImageNodeType(node) && rteIsOnlyChildWithEmptyText(node)) ||\n rteIsInvalidImage(node)\n ) {\n return null;\n }\n\n if (Text.isText(node)) {\n return serializeText(node);\n }\n\n const children = isNotNil(node.children)\n ? node.children.map((node_) => serializeNode(node_)).join('')\n : '';\n\n switch (node.type) {\n case 'span':\n return `<span>${children}</span>`;\n case 'blockquote':\n return `<blockquote>${children}</blockquote>`;\n case 'paragraph':\n return `<p>${children}</p>`;\n case 'heading-one':\n return `<h1>${children}</h1>`;\n case 'heading-two':\n return `<h2>${children}</h2>`;\n // We preserve the original headers \"under the hood\" in the HTML\n // Even though we render h4-h6 as h3s in the editor UI per Design request.\n case 'heading-three':\n return `<h3>${children}</h3>`;\n case 'heading-four':\n return `<h4>${children}</h4>`;\n case 'heading-five':\n return `<h5>${children}</h5>`;\n case 'heading-six':\n return `<h6>${children}</h6>`;\n case 'link':\n return `<a rel=\"noopener noreferrer\" target=\"_blank\" href=\"${escapeHtml(\n node.url,\n )}\">${children}</a>`;\n case 'numbered-list':\n return `<ol>${children}</ol>`;\n case 'bulleted-list':\n return `<ul>${children}</ul>`;\n case 'list-item':\n return `<li>${children}</li>`;\n case 'image':\n return `<img src=\"${escapeHtml(node.url)}\" />`;\n case 'code':\n return `<code>${children}</code>`;\n case undefined:\n default:\n return children;\n }\n};\n\nexport const rteSerializeToHTML = (value: Descendant[]): string | null => {\n const mappedValue = value.map((node) => serializeNode(node));\n return sanitizedValue(mappedValue);\n};\n\n// deserialize from HTML\nconst ELEMENT_TAGS = {\n SPAN: () => ({ type: 'span' }),\n A: (el: HTMLElement) => ({ type: 'link', url: el.getAttribute('href') }), // eslint-disable-line id-length\n BLOCKQUOTE: () => ({ type: 'blockquote' }),\n H1: () => ({ type: 'heading-one' }),\n H2: () => ({ type: 'heading-two' }),\n H3: () => ({ type: 'heading-three' }),\n H4: () => ({ type: 'heading-four' }),\n H5: () => ({ type: 'heading-five' }),\n H6: () => ({ type: 'heading-six' }),\n LI: () => ({ type: 'list-item' }),\n OL: () => ({ type: 'numbered-list' }),\n P: () => ({ type: 'paragraph' }), // eslint-disable-line id-length\n UL: () => ({ type: 'bulleted-list' }),\n IMG: (el: HTMLElement) => ({ type: 'image', url: el.getAttribute('src') }),\n CODE: () => ({ type: 'code' }),\n};\n\n// `B` is omitted here since the HTML 5 specification discourages the use of that tag.\nconst TEXT_TAGS = {\n DEL: () => ({ strikethrough: true }),\n S: () => ({ strikethrough: true }), // eslint-disable-line id-length\n EM: () => ({ italic: true }),\n I: () => ({ italic: true }), // eslint-disable-line id-length\n STRONG: () => ({ bold: true }),\n U: () => ({ underline: true }), // eslint-disable-line id-length\n CODE: () => ({ code: true }),\n};\n\nconst isTextNode = (el: ChildNode | HTMLElement): boolean => el.nodeType === 3;\nconst isElement = (el: ChildNode | HTMLElement) => el.nodeType === 1;\n// NOTE: \"ock (\" (without the space) breaks ESBuild, so we remove the o from Block...\nconst isCodeBlck = (element: ChildNode | HTMLElement) => element.nodeName === 'CODE';\n// This function catches Code blocks that are \"inline\" as opposed to block.\n// Code blocks are formatted from the markdown with new lines before and after the children, i.e.,\n// <code>\n// I am block content\n// </code>\n// versus <code>I am inline</code\n// which should be treated as text rather than a block.\n// NOTE: \"ock (\" (without the space) breaks ESBuild, so we remove the o from Block...\nconst isInlineCodeBlck = (\n element: ChildNode | HTMLElement,\n elementChildren: (Node | string | null)[],\n): boolean =>\n // @ts-expect-error I don't want to narrow the type too far and miss something that should be matched here.\n isCodeBlck(element) && isNotNil(elementChildren[0]) && !elementChildren[0].match(/\\n/g); // eslint-disable-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/no-unsafe-call\n\n// NOTE: \"ock (\" (without the space) breaks ESBuild, so we remove the o from Block...\nconst shouldCreateBlck = (\n el: ChildNode | HTMLElement,\n children: (Descendant | Node | string | null)[],\n): boolean =>\n !isInlineCodeBlck(el, children) &&\n isNotNil(ELEMENT_TAGS[el.nodeName as keyof typeof ELEMENT_TAGS]);\nconst shouldCreateText = (\n el: ChildNode | HTMLElement,\n children: (Node | string | null)[],\n): boolean =>\n isInlineCodeBlck(el, children) || isNotNil(TEXT_TAGS[el.nodeName as keyof typeof TEXT_TAGS]);\n\nconst htmlChildIsEmptyText = (child: Descendant | string | null | undefined) =>\n isNotNil(child) && !isString(child) && (child as Text).text?.trim() === '';\n\nconst createEditorBlockElements = (\n children: (Descendant | string | null)[],\n el: ChildNode | HTMLElement,\n): Descendant => {\n const { nodeName } = el;\n if (\n nodeName !== 'IMG' &&\n children.length === 1 &&\n !isString(children[0]) &&\n // @ts-expect-error - text is a property on NodeLeafObject.\n isNotNil(children[0].text) &&\n // Casting to Text as I don't want to further narrow the type in case I miss another type where it's valid. RM 2021-03-31\n (children[0] as Text).text?.trim() === ''\n ) {\n return jsx('element', ELEMENT_TAGS.P(), emptyTextNode);\n }\n const attrs = ELEMENT_TAGS[nodeName as keyof typeof ELEMENT_TAGS](el as HTMLElement);\n return jsx('element', attrs, children);\n};\n\nconst createEditorTextElements = (children: (Descendant | string | null)[], el: HTMLElement) => {\n const { nodeName } = el;\n const attrs = TEXT_TAGS[nodeName as keyof typeof TEXT_TAGS]();\n return children.map((child) => {\n if (!isString(child) && isNotNil(child) && isNotNil(child.children)) {\n return addAttrsToChildren(child, attrs);\n }\n // if a child's text node has an empty string\n // return an empty text node in its place without any of the trimmings (italic, strong, etc.)\n if (htmlChildIsEmptyText(child)) {\n return jsx('text', {}, emptyTextNode);\n }\n return jsx('text', attrs, child);\n });\n};\n\nconst blockWithOnlyTextChildren = (el: HTMLElement) =>\n el.nodeName === 'BLOCKQUOTE' || el.nodeName === 'OL' || el.nodeName === 'UL';\n\nconst getNodeChildren = (\n el: ChildNode | HTMLElement,\n mapper: (\n el: ChildNode | HTMLElement,\n ) => (Descendant | string | null)[] | Descendant | string | null,\n): (Descendant | Node | string | null)[] => {\n let children = [];\n if (isCodeBlck(el)) {\n children = [...el.childNodes].map(\n (node) =>\n // This helps us distinguish between code block content that should be treated as HTML vs. as text content\n // @ts-expect-error - TODO: I can't get into this conditional click testing, and I can't see how outerHTML would be valid from reading the code here.\n isTextNode(node) ? node.textContent : node.outerHTML, // eslint-disable-line @typescript-eslint/no-unsafe-return\n );\n } else if (blockWithOnlyTextChildren(el as HTMLElement)) {\n // Blockquotes, as rendered from our markdown, contain paragraphs, as well as blank text leaf nodes as their first and last children.\n // Ordered lists and unordered lists also contain blank text leaf nodes as their first and last children.\n // To avoid stripping those out via \"safeChildren\", and to allow for more sophisticated rendering of internal text nodes -- i.e. of bold/italic.etc. text within a blockquote's internal paragraph --\n // We remove the blank string content here.\n children = [...el.childNodes].filter((node) => node.textContent?.trim() !== '').flatMap(mapper);\n } else {\n children = [...el.childNodes].flatMap(mapper);\n }\n\n // TODO revisit this casting by instead being more specific about return types above.\n return children as (Descendant | Node | string | null)[];\n};\n\nconst deserializeHTMLNode = (\n el: ChildNode | HTMLElement,\n): (Descendant | string | null)[] | Descendant | string | null => {\n if (isTextNode(el)) {\n if (el.nodeValue?.trim() === '') {\n return null;\n }\n return el.textContent;\n }\n if (el.nodeName === 'BR') {\n return '\\n';\n }\n if (!isElement(el)) {\n return null;\n }\n\n const children = getNodeChildren(el, deserializeHTMLNode);\n // Only keep valid Descendant objects (with 'text' or 'type' properties), strings, or null values\n const filteredChildren = children.filter(\n (child): child is Descendant | string | null =>\n child === null ||\n typeof child === 'string' ||\n (typeof child === 'object' && ('text' in child || 'type' in child)),\n );\n // This allows us to handle \"empty\" elements, i.e, for those that we've removed text content from.\n // SlateJS blows up if we don't provide at least an empty text node as a child.\n const safeChildren =\n filteredChildren.length > 0 && filteredChildren[0] != null ? filteredChildren : [emptyTextNode];\n\n if (el.nodeName === 'BODY') {\n return jsx('fragment', {}, safeChildren);\n }\n\n if (shouldCreateBlck(el, children)) {\n return createEditorBlockElements(safeChildren, el);\n }\n\n if (shouldCreateText(el, safeChildren)) {\n return createEditorTextElements(safeChildren, el as HTMLElement);\n }\n\n return children;\n};\n\nexport const rteDeserializeHTML = (\n htmlString: string,\n): (Descendant | string | null)[] | Descendant | string | null | undefined => {\n if (!htmlString) {\n return undefined;\n }\n const parsedEl = new DOMParser().parseFromString(htmlString, 'text/html').body;\n const fragment = deserializeHTMLNode(parsedEl);\n // We need this in order to handle values from a plain text input\n // i.e., values entered into the Description field on the \"Set up your Channel\" form in the Create Channel flow.\n // If we don't do this, we'll get <body>some text</body>, which breaks the editor\n // Since there's no top-level block element wrapping the text.\n if (\n isNotNil(fragment) &&\n isArray(fragment) &&\n isNotNil(fragment[0]) &&\n // @ts-expect-error - I don't want to risk narrowing too far during the TS conversion. RM.\n isNotNil(fragment[0].text)\n ) {\n // @ts-expect-error - I don't want to risk narrowing too far during the TS conversion. RM.\n return [{ type: 'paragraph', children: [{ text: fragment[0].text as string }] }];\n }\n // If the last element added to the editor is NOT a paragraph,\n // Insert a paragraph as the last element\n // So the cursor is always escaped below the last element.\n const lastNodeOfFragment = isArray(fragment) ? fragment[fragment.length - 1] : undefined;\n if (\n isArray(fragment) &&\n Element.isElement(lastNodeOfFragment) &&\n lastNodeOfFragment.type !== 'paragraph'\n ) {\n return [...fragment, { type: 'paragraph', children: [{ text: '' }] }];\n }\n return fragment;\n};\n","// note: adapted from https://github.com/component/escape-html/blob/master/index.js because that's what we\n// were already using, but we should consider using https://www.npmjs.com/package/@wordpress/escape-html in the future\nconst matchHtmlRegExp = /[\"'&<>]/;\nconst doubleQuoteChar = 34; // \"\nconst ampersandChar = 38; // &\nconst singleQuoteChar = 39; // '\nconst lessThanChar = 60; // <\nconst greaterThanChar = 62; // >\n\n/**\n * Handle special characters by escaping in the provided text string.\n *\n * @param {string} stringToEscape - the string to escape\n * @return {string} - the escaped string\n */\nexport const escapeHtml = (stringToEscape: number | string | null | undefined): string => {\n const str = `${stringToEscape}`;\n const match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n let escape = '';\n let html = '';\n let index = 0;\n let lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n const charCode = str.charCodeAt(index);\n if (charCode === doubleQuoteChar) {\n escape = '&quot;';\n } else if (charCode === ampersandChar) {\n escape = '&amp;';\n } else if (charCode === singleQuoteChar) {\n escape = '&#39;';\n } else if (charCode === lessThanChar) {\n escape = '&lt;';\n } else if (charCode === greaterThanChar) {\n escape = '&gt;';\n } else {\n escape = '';\n }\n\n if (escape !== '') {\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n }\n\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n};\n","import { isNotNil } from '@wistia/type-guards';\nimport type { RenderLeafProps } from 'slate-react';\n\nexport const Leaf = ({\n attributes = { 'data-slate-leaf': true },\n children,\n leaf = {},\n}: RenderLeafProps) => {\n // Slate-React allows for children to be any type.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n let kids = children;\n if (isNotNil(leaf.bold)) {\n kids = <strong>{kids}</strong>;\n }\n\n if (isNotNil(leaf.italic)) {\n kids = <em>{kids}</em>;\n }\n\n if (isNotNil(leaf.underline)) {\n kids = <u>{kids}</u>;\n }\n\n if (isNotNil(leaf.strikethrough)) {\n kids = <s>{kids}</s>;\n }\n\n if (isNotNil(leaf.code)) {\n kids = <code>{kids}</code>;\n }\n\n return <span {...attributes}>{kids}</span>;\n};\n","import type { RenderElementProps } from 'slate-react';\nimport { useSelected, useFocused } from 'slate-react';\nimport { styled, css } from 'styled-components';\nimport type { JSX } from 'react';\n\nconst Wrapper = styled.span`\n display: inline-block;\n user-select: none;\n`;\n\ntype ImageProps = {\n selected: boolean;\n focused: boolean;\n};\nconst Image = styled.img<ImageProps>`\n box-shadow: ${({ selected, focused, theme }) =>\n selected && focused ? `0 0 0 3px ${theme.color.brandBlue500}` : 'none'};\n max-height: 10em;\n max-width: 100%;\n user-select: none;\n`;\n\nconst listStyle = css`\n padding: 0 ${({ theme }) => theme.spacing.space05};\n\n li {\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n margin: ${({ theme }) => `${theme.spacing.space02} 0`};\n }\n`;\n\nconst EditorOrderedList = styled.ol`\n ${listStyle}\n`;\n\nconst EditorUnorderedList = styled.ul`\n ${listStyle}\n`;\n\nconst headerStyle = css`\n font-weight: 500;\n`;\n\nconst EditorHeading1 = styled.h1`\n ${headerStyle}\n font-size: 18px;\n`;\n\nconst EditorHeading2 = styled.h2`\n ${headerStyle}\n font-size: 16px;\n`;\n\nconst EditorHeading3 = styled.h3`\n ${headerStyle}\n font-size: 14px;\n`;\n\nconst EditorParagraph = styled.p`\n font-weight: 400;\n`;\n\nconst EditorLink = styled.a`\n color: ${({ theme }) => theme.color.brandBlue500};\n font-weight: 300;\n`;\n\nconst EditorSpan = styled.span`\n font-weight: 400;\n`;\n\nexport const Element = ({\n attributes = {\n 'data-slate-node': 'element',\n ref: undefined,\n },\n children = undefined,\n element = {},\n}: RenderElementProps): JSX.Element => {\n const selected = useSelected();\n const focused = useFocused();\n\n switch (element.type) {\n case 'span':\n return <EditorSpan {...attributes}>{children}</EditorSpan>;\n case 'blockquote':\n return <blockquote {...attributes}>{children}</blockquote>;\n case 'bulleted-list':\n return <EditorUnorderedList {...attributes}>{children}</EditorUnorderedList>;\n case 'heading-one':\n return <EditorHeading1 {...attributes}>{children}</EditorHeading1>;\n case 'heading-two':\n return <EditorHeading2 {...attributes}>{children}</EditorHeading2>;\n // We render h4-h6 as h3s in the editor UI per Design request\n // (Though we preserve the original headers \"under the hood\" in the HTML).\n case 'heading-three':\n case 'heading-four':\n case 'heading-five':\n case 'heading-six':\n return <EditorHeading3 {...attributes}>{children}</EditorHeading3>;\n case 'list-item':\n return <li {...attributes}>{children}</li>;\n case 'numbered-list':\n return <EditorOrderedList {...attributes}>{children}</EditorOrderedList>;\n case 'image':\n return (\n <Wrapper {...attributes}>\n <Wrapper contentEditable={false}>\n <Image\n alt=\"\"\n contentEditable={false}\n focused={focused}\n selected={selected}\n src={element.url}\n />\n </Wrapper>\n {children}\n </Wrapper>\n );\n case 'link':\n return (\n <EditorLink\n {...attributes}\n href={element.url}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n {children}\n </EditorLink>\n );\n case 'code':\n return <code {...attributes}>{children}</code>;\n case undefined:\n default:\n return <EditorParagraph {...attributes}>{children}</EditorParagraph>;\n }\n};\n","import type { MouseEvent, ReactNode, JSX } from 'react';\nimport type { Editor } from 'slate';\nimport { useSlate } from 'slate-react';\nimport { styled } from 'styled-components';\nimport { Node } from 'slate';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport {\n rteFormatTypes,\n insertImage,\n insertLink,\n isBlockActive,\n toggleBlck,\n isMarkActive,\n toggleMark,\n} from './utilities';\nimport { Icon } from '../../private/components/Icon';\nimport { IconButton } from '../IconButton/IconButton';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\nconst ButtonContainer = styled.div`\n background: white;\n border-bottom: 1px solid ${({ theme }) => theme.color.grey400};\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n padding: ${({ theme }) => theme.spacing.space02} 0;\n position: sticky;\n top: 0;\n\n /*\n * needs a stacking context to stay above RTE content\n * did not add to theme because it doesn't interact with any other components\n */\n z-index: 1;\n`;\n\ntype EditorButtonProps = {\n buttonType: 'block' | 'mark';\n disabled?: boolean;\n format?: string;\n icon?: ReactNode;\n onCustomClick?: (event: MouseEvent) => unknown;\n};\n\nconst EditorButton = ({\n format = '',\n icon,\n disabled = false,\n onCustomClick,\n buttonType = 'block',\n}: EditorButtonProps) => {\n const editor = useSlate();\n const activeButtonColor = useThemeColor('brandBlue500');\n const isActive =\n buttonType === 'block' ? isBlockActive(editor, format) : isMarkActive(editor, format);\n const handleClick = (event: MouseEvent) => {\n // this prevents the event from bubbling up and causing form submissions in Formik\n event.preventDefault();\n if (buttonType === 'block') {\n toggleBlck(editor, format);\n } else {\n toggleMark(editor, format);\n }\n if (onCustomClick) {\n onCustomClick(event);\n }\n };\n\n const buttonColor = isActive ? activeButtonColor : undefined;\n\n return (\n <IconButton\n aria-pressed={isActive}\n colorOverride={buttonColor}\n disabled={disabled}\n icon={icon}\n label={format}\n onClick={handleClick}\n preventTooltip={true}\n />\n );\n};\n\nconst getSelectedText = (editor: Editor): string => {\n if (!editor.selection) {\n return '';\n }\n const nodeFragment = Node.fragment(editor, editor.selection);\n if (!nodeFragment[0]) {\n return '';\n }\n return Node.string(nodeFragment[0]);\n};\n\nconst noTextSelected = (editor: Editor) => {\n const userSelection = getSelectedText(editor);\n return userSelection.trim() === '';\n};\n\nexport type EditorButtonsProps = {\n disabled?: boolean;\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n};\n\nexport const EditorButtons = ({\n enabledFormats = ['BOLD', 'ITALIC', 'HEADING_1', 'LINK', 'BULLETED_LIST', 'IMAGE'],\n disabled = false,\n}: EditorButtonsProps): JSX.Element => {\n const editor = useSlate();\n return (\n <ButtonContainer>\n {enabledFormats.includes(rteFormatTypes.BOLD) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"bold\"\n icon={<Icon type=\"bold\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.ITALIC) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"italic\"\n icon={<Icon type=\"italic\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.HEADING_1) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"heading-one\"\n icon={<Icon type=\"heading\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.HEADING_2) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"heading-two\"\n icon={<Icon type=\"heading-two\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.BULLETED_LIST) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"bulleted-list\"\n icon={<Icon type=\"bulleted-list\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.NUMBERED_LIST) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"numbered-list\"\n icon={<Icon type=\"numbered-list\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.BLOCKQUOTE) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"blockquote\"\n icon={<Icon type=\"block-quote\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.UNDERLINE) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"underline\"\n icon={<Icon type=\"underline\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.STRIKETHROUGH) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"strikethrough\"\n icon={<Icon type=\"strikethrough\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.LINK) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled || noTextSelected(editor)}\n format=\"link\"\n icon={<Icon type=\"link\" />}\n onCustomClick={(event) => {\n event.preventDefault();\n insertLink(editor);\n }}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.IMAGE) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"image\"\n icon={<Icon type=\"image\" />}\n onCustomClick={(event: MouseEvent) => {\n event.preventDefault();\n // eslint-disable-next-line no-alert\n const promptUserForImageUrl = prompt('Enter the URL of the image:');\n if (!isNonEmptyString(promptUserForImageUrl)) {\n return;\n }\n insertImage(editor, promptUserForImageUrl);\n }}\n />\n )}\n </ButtonContainer>\n );\n};\n","import type { Node, Editor } from 'slate';\nimport { Transforms, Element, Text } from 'slate';\nimport { isNotUndefined, isNotNil } from '@wistia/type-guards';\nimport { toggleBlck } from './toggle';\nimport { isUrl } from '../../../helpers/stringHelpers/isUrl';\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst emptyTextNode = { text: '' };\nconst imageExtensions = ['jpg', 'png', 'gif', 'tiff', 'bmp', 'dcm'];\n\nconst isImageUrl = (url: string) => {\n if (!isUrl(url)) {\n return false;\n }\n const hasImageExtension = imageExtensions.find((event) => url.includes(event));\n return isNotUndefined(hasImageExtension) && Boolean(hasImageExtension);\n};\n\nexport const insertImage = (editor: Editor, url: string) => {\n if (!url) {\n toggleBlck(editor, 'image');\n return;\n }\n if (!isImageUrl(url)) {\n toggleBlck(editor, 'image');\n return;\n }\n\n const image = { type: 'image', url, children: [emptyTextNode] };\n Transforms.insertNodes(editor, image);\n};\n\nexport const withImages = (editor: Editor): Editor => {\n const { normalizeNode, isVoid } = editor;\n // eslint-disable-next-line no-param-reassign\n editor.isVoid = (element: Element) => (element.type === 'image' ? true : isVoid(element));\n\n // eslint-disable-next-line no-param-reassign\n editor.normalizeNode = ([node, path]: [Node, number[]]) => {\n if (Element.isElement(node) && node.type === 'image' && node.url !== undefined) {\n const paragraph = {\n type: 'paragraph',\n children: [emptyTextNode],\n };\n\n const pathIndex = isNotUndefined(path[0]) ? path[0] + 1 : 1;\n Transforms.insertNodes(editor, paragraph, { at: [pathIndex] });\n Transforms.move(editor);\n }\n if (\n Element.isElement(node) &&\n node.type === 'image' &&\n node.url === undefined &&\n isNotUndefined(node.children) &&\n isNotUndefined(node.children[0]) &&\n isNotUndefined(node.children[0].text) &&\n node.children[0].text.trim() !== ''\n ) {\n Transforms.setNodes(\n editor,\n { type: 'span' },\n {\n match: (matchNode: Node) =>\n Element.isElement(matchNode) &&\n matchNode.type === 'image' &&\n matchNode.url === undefined &&\n isNotUndefined(matchNode.children) &&\n Text.isText(matchNode.children[0]) &&\n isNotNil(matchNode.children[0].text) &&\n matchNode.children[0].text.trim() !== '',\n split: true,\n at: path,\n mode: 'highest',\n },\n );\n }\n normalizeNode([node, path]);\n };\n\n return editor;\n};\n","import type { Node, Editor } from 'slate';\nimport { Element, Transforms, Editor as SlateEditor } from 'slate';\nimport { isNotNil, isNonEmptyString } from '@wistia/type-guards';\n\nexport const isBlockActive = (editor: Editor, format: string): boolean => {\n const [match] = SlateEditor.nodes(editor, {\n match: (node: Node) => Element.isElement(node) && node.type === format,\n });\n return Boolean(match);\n};\n\nconst LIST_TYPES = new Set(['numbered-list', 'bulleted-list']);\n\n// https://github.com/aelbore/esbuild-jest/issues/57#issuecomment-1005756206\n// Note that \"toggleBlck\" is intentionally missing an 'o' to avoid an issue with\n// esbuild-jest. Unfortunately it does work to have the characters \"ock (\" [minus the space]\n// within a file that also has TS annotations, and the failure can somtimes only be found\n// when tests are run in CI.\n// The preset-typescript babel solution suggested in that issue broke storybook props.\nexport const toggleBlck = (editor: Editor, format: string): void => {\n const isActive = isBlockActive(editor, format);\n\n const isList = LIST_TYPES.has(format);\n Transforms.unwrapNodes(editor, {\n match: (node: Node) =>\n Element.isElement(node) && isNotNil(node.type) && LIST_TYPES.has(node.type),\n split: true,\n });\n const formatting = isList ? 'list-item' : format;\n\n Transforms.setNodes(editor, {\n type: isActive ? 'paragraph' : formatting,\n });\n\n if (!isActive && isList) {\n const block = { type: format, children: [] };\n Transforms.wrapNodes(editor, block);\n }\n};\n\nexport const isMarkActive = (editor: Editor, format: string): boolean => {\n const valueMarks = SlateEditor.marks(editor);\n return isNonEmptyString(valueMarks && Object.keys(valueMarks).find((mark) => mark === format));\n};\n\nexport const toggleMark = (editor: Editor, format: string) => {\n const isActive = isMarkActive(editor, format);\n\n if (isActive) {\n SlateEditor.removeMark(editor, format);\n } else {\n SlateEditor.addMark(editor, format, true);\n }\n};\n","import { Transforms, Element, Node, Editor, Range, Path } from 'slate';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { toggleMark } from './toggle';\nimport { isUrl } from '../../../helpers/stringHelpers/isUrl';\nimport type { CustomEditor } from '../types';\n\nconst isHashUrl = (urlString: string) => {\n const urlPattern = /^#.+$/i;\n return Boolean(urlPattern.test(urlString));\n};\n\nconst isLinkActive = (editor: Editor) => {\n const [link] = Editor.nodes(editor, {\n match: (node: Node) => Element.isElement(node) && node.type === 'link',\n });\n return Boolean(link);\n};\n\nconst unwrapLink = (editor: Editor) => {\n Transforms.unwrapNodes(editor, {\n match: (node: Node) => Element.isElement(node) && node.type === 'link',\n });\n};\n\nconst wrapLink = (editor: Editor, url: string) => {\n if (isLinkActive(editor)) {\n unwrapLink(editor);\n }\n\n const { selection } = editor;\n const isCollapsed = selection && Range.isCollapsed(selection);\n const link = {\n type: 'link',\n url,\n children: isCollapsed === true ? [{ text: url }] : [],\n };\n\n if (isCollapsed === true) {\n Transforms.insertNodes(editor, link);\n } else {\n Transforms.wrapNodes(editor, link, { split: true });\n Transforms.collapse(editor, { edge: 'end' });\n }\n};\n\nexport const withLinks = (editor: CustomEditor) => {\n const { insertData, insertText, isInline, normalizeNode } = editor;\n\n // eslint-disable-next-line no-param-reassign\n editor.isInline = (element: Element) => (element.type === 'link' ? true : isInline(element));\n\n // eslint-disable-next-line no-param-reassign\n editor.insertText = (text: string) => {\n if (text && isUrl(text)) {\n wrapLink(editor, text);\n } else {\n insertText(text);\n }\n };\n\n // eslint-disable-next-line no-param-reassign\n editor.insertData = (data: DataTransfer) => {\n const text = data.getData('text/plain');\n\n if (text && isUrl(text)) {\n wrapLink(editor, text);\n } else {\n insertData(data);\n }\n };\n\n // eslint-disable-next-line no-param-reassign\n editor.normalizeNode = ([node, path]: [Node, Path]) => {\n if (Element.isElement(node) && node.type === 'link' && Node.string(node) === '') {\n Transforms.unwrapNodes(editor, { at: path });\n Transforms.select(editor, Path.next(path));\n }\n normalizeNode([node, path]);\n };\n\n return editor;\n};\n\nexport const insertLink = (editor: Editor) => {\n if (isLinkActive(editor)) {\n unwrapLink(editor);\n } else {\n // eslint-disable-next-line no-alert\n const url = prompt('Enter the URL of the link:');\n\n if (!isNonEmptyString(url)) {\n toggleMark(editor, 'link');\n return;\n }\n\n const urlHasSpaces = url.includes(' ');\n if (urlHasSpaces) {\n // eslint-disable-next-line no-alert\n alert('The URL provided had spaces. Try again without spaces.');\n toggleMark(editor, 'link');\n return;\n }\n\n if (!isUrl(url) && !isHashUrl(url)) {\n // eslint-disable-next-line no-alert\n alert(\n 'The URL provided looks invalid. Try again. Make sure to include the protocol (ex. https://) in the URL.',\n );\n toggleMark(editor, 'link');\n return;\n }\n\n if (editor.selection) {\n wrapLink(editor, url);\n }\n }\n};\n","import type { EditorInterface, Descendant, Node } from 'slate';\nimport { Transforms, Range, Editor, Element } from 'slate';\nimport type { NodeLeafObject } from '../types';\n\n// Allowing non-null assertions in this file for sake of TS conversion.\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\n/*\n * This \"Monkey Patch\" of sorts is needed to circumvent a dumb issue with\n * esbuild https://github.com/aelbore/esbuild-jest/issues/57#issuecomment-1005756206\n *\n * TL;DR \"ock (\" (without the space) breaks ESBuild, so we remove the o from isBlock...\n */\nconst OverriddenEditor: EditorInterface & { isBlck: typeof Editor.isBlock } = {\n ...Editor,\n isBlck: Editor.isBlock,\n};\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst newLine = {\n type: 'paragraph',\n children: [\n {\n text: '',\n marks: [],\n },\n ],\n};\n\nconst isLastChildBlankText = (listChildren: Descendant[] | NodeLeafObject[]): boolean => {\n if (listChildren.length === 1) {\n // @ts-expect-error - Text does exist on some sub-types of nodes.\n return (listChildren[listChildren.length - 1]?.text as string | null)?.trim() === '';\n }\n // Links need to be handled differently because they're surrounded by empty text by SlateJS design here.\n const link = listChildren.find((el) => el.type === 'link');\n return link?.children![0]?.text?.trim() === '';\n};\n\nexport const handleListEscape = (editor: Editor): void => {\n const { selection } = editor;\n const textIsNotSelected = selection && Range.isCollapsed(selection);\n const selectedElement = editor.children[selection!.anchor.path[0]!]!;\n const isList =\n selectedElement.type === 'bulleted-list' || selectedElement.type === 'numbered-list';\n const blockAbove = OverriddenEditor.above(editor, {\n match: (node: Node) => Element.isElement(node) && OverriddenEditor.isBlck(editor, node),\n })!;\n if ((textIsNotSelected ?? false) && isList && isLastChildBlankText(blockAbove[0].children!)) {\n Transforms.removeNodes(editor, { hanging: true });\n Transforms.insertNodes(editor, newLine);\n Transforms.unwrapNodes(editor, {\n // @ts-expect-error - type does exist on some sub-types of nodes.\n match: ({ type }: { type?: string }) => type === 'bulleted-list' || type === 'numbered-list',\n all: true,\n split: true,\n });\n }\n};\n","export const rteFormatTypes = Object.freeze({\n BOLD: 'BOLD',\n ITALIC: 'ITALIC',\n UNDERLINE: 'UNDERLINE',\n STRIKETHROUGH: 'STRIKETHROUGH',\n HEADING_1: 'HEADING_1',\n HEADING_2: 'HEADING_2',\n BLOCKQUOTE: 'BLOCKQUOTE',\n NUMBERED_LIST: 'NUMBERED_LIST',\n BULLETED_LIST: 'BULLETED_LIST',\n LINK: 'LINK',\n IMAGE: 'IMAGE',\n});\n","import { isNil } from '@wistia/type-guards';\nimport type { JSX } from 'react';\nimport { iconMap } from './iconMap';\nimport * as iconsManifest from './icons';\n\n// size in pixels\nexport const iconSizeMap = {\n sm: '12',\n md: '16',\n lg: '24',\n xl: '32',\n xxl: '48',\n};\n\nexport type IconProps = {\n /**\n * Color (as hex) of the Icon\n */\n color?: string;\n /**\n * The size of the icon to display\n */\n size?: keyof typeof iconSizeMap;\n /**\n * @ignore\n */\n style?: Record<string, unknown>;\n /**\n * Determines which icon to display\n */\n type: keyof typeof iconMap;\n};\n\nexport const Icon = ({\n color = 'currentColor',\n size = 'lg',\n style,\n type,\n ...otherProps\n}: IconProps): JSX.Element => {\n if (isNil(type)) {\n throw new Error('An Icon component requires a `type` prop to be provided');\n }\n\n if (isNil(iconMap[type])) {\n throw new Error(`Type \"${type}\" does not exist, please update type prop in Icon component.`);\n }\n\n if (isNil(iconSizeMap[size])) {\n throw new Error(`Size \"${size}\" does not exist, please update size prop in Icon component.`);\n }\n\n const IconElement = iconsManifest[iconMap[type] as keyof typeof iconsManifest];\n\n // so we do not have to add this to each individual Icon but still allow overrides\n const defaultStyle = { verticalAlign: 'middle', ...style };\n\n return (\n <IconElement\n aria-hidden=\"true\"\n color={color}\n height={`${iconSizeMap[size]}px`}\n role=\"presentation\"\n style={defaultStyle}\n viewBox=\"0 0 24 24\"\n width={`${iconSizeMap[size]}px`}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...otherProps}\n />\n );\n};\n\nIcon.displayName = 'Icon';\n","export const iconMap = {\n 'block-quote': 'BlockQuote',\n bold: 'Bold',\n 'bulleted-list': 'BulletedList',\n heading: 'Heading',\n 'heading-two': 'HeadingTwo',\n image: 'Image',\n italic: 'Italic',\n link: 'Link',\n 'numbered-list': 'NumberedList',\n strikethrough: 'Strikethrough',\n underline: 'Underline',\n};\n","export { BlockQuote } from './BlockQuote';\nexport { Bold } from './Bold';\nexport { BulletedList } from './BulletedList';\nexport { Heading } from './Heading';\nexport { HeadingTwo } from './HeadingTwo';\nexport { Image } from './Image';\nexport { Italic } from './Italic';\nexport { Link } from './Link';\nexport { NumberedList } from './NumberedList';\nexport { Strikethrough } from './Strikethrough';\nexport { Underline } from './Underline';\n","import type { SVGProps } from 'react';\n\nexport const BlockQuote = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M4.2125 11.0375C4.35417 11.1792 4.53333 11.25 4.75 11.25H19.25C19.4667 11.25 19.6458 11.1792 19.7875 11.0375C19.9292 10.8958 20 10.7167 20 10.5C20 10.2833 19.9292 10.1042 19.7875 9.9625C19.6458 9.82083 19.4667 9.75 19.25 9.75H4.75C4.53333 9.75 4.35417 9.82083 4.2125 9.9625C4.07083 10.1042 4 10.2833 4 10.5C4 10.7167 4.07083 10.8958 4.2125 11.0375ZM4.2125 14.0375C4.35417 14.1792 4.53333 14.25 4.75 14.25H12.975C13.1917 14.25 13.3708 14.1792 13.5125 14.0375C13.6542 13.8958 13.725 13.7167 13.725 13.5C13.725 13.2833 13.6542 13.1042 13.5125 12.9625C13.3708 12.8208 13.1917 12.75 12.975 12.75H4.75C4.53333 12.75 4.35417 12.8208 4.2125 12.9625C4.07083 13.1042 4 13.2833 4 13.5C4 13.7167 4.07083 13.8958 4.2125 14.0375ZM1.5 10C1.22386 10 1 10.2239 1 10.5V14C1 14.2761 1.22386 14.5 1.5 14.5C1.77614 14.5 2 14.2761 2 14V10.5C2 10.2239 1.77614 10 1.5 10Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Bold = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M16.9995 11.7C18.354 10.743 19.302 9.17101 19.302 7.71451C19.302 4.48501 16.86 1.99951 13.722 1.99951H4.998V22.0005H14.823C17.7375 22.0005 19.998 19.5705 19.998 16.5855C19.998 14.415 18.798 12.5565 16.998 11.7H16.9995ZM9.186 5.57101H13.371C14.5305 5.57101 15.465 6.52801 15.465 7.71451C15.465 8.89951 14.5305 9.85651 13.3725 9.85651H9.186V5.57101ZM14.07 18.429H9.186V14.1435H14.07C15.228 14.1435 16.1625 15.1005 16.1625 16.2855C16.1625 17.4705 15.228 18.429 14.07 18.429V18.429Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const BulletedList = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M4.0005 10.5C3.1695 10.5 2.5005 11.1705 2.5005 12C2.5005 12.8295 3.1695 13.5 4.0005 13.5C4.83 13.5 5.5005 12.8295 5.5005 12C5.5005 11.1705 4.83 10.5 4.0005 10.5ZM4.0005 4.5C3.1695 4.5 2.5005 5.1705 2.5005 6C2.5005 6.8295 3.1695 7.5 4.0005 7.5C4.83 7.5 5.5005 6.8295 5.5005 6C5.5005 5.1705 4.83 4.5 4.0005 4.5ZM4.0005 16.5C3.1695 16.5 2.5005 17.1795 2.5005 18C2.5005 18.8205 3.18 19.5 4.0005 19.5C4.8195 19.5 5.5005 18.8205 5.5005 18C5.5005 17.1795 4.83 16.5 4.0005 16.5ZM7.0005 19.0005H21V16.9995H7.0005V19.0005ZM7.0005 13.0005H21V10.9995H7.0005V13.0005ZM7.0005 4.9995V7.0005H21V4.9995H7.0005Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Heading = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M7.9995 3V6.7995H14.154V22.0005H17.8455V6.7995H24V3H7.9995ZM0 12.9H3.666V22.0005H7.335V12.9H11.001V9H0V12.9Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HeadingTwo = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M3 17V7H4.5V11.25H9V7H10.5V17H9V12.75H4.5V17H3ZM13.5 17V12.75C13.5 12.3333 13.6458 11.9792 13.9375 11.6875C14.2292 11.3958 14.5833 11.25 15 11.25H19.5V8.5H13.5V7H19.5C19.9167 7 20.2708 7.14583 20.5625 7.4375C20.8542 7.72917 21 8.08333 21 8.5V11.25C21 11.6667 20.8542 12.0208 20.5625 12.3125C20.2708 12.6042 19.9167 12.75 19.5 12.75H15V15.5H21V17H13.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Image = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M21 19.0005V4.9995C21 3.9 20.1 3 19.0005 3H4.9995C3.9 3 3 3.9 3 4.9995V19.0005C3 20.1 3.9 21 4.9995 21H19.0005C20.1 21 21 20.1 21 19.0005ZM8.5005 13.5L10.9995 16.5105L14.5005 12L19.0005 18H4.9995L8.5005 13.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Italic = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M8.8335 1.99951V6.28501H12.0555L7.0695 17.715H3V22.0005H14.667V17.715H11.4435L16.431 6.28501H20.5005V1.99951H8.8335Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Link = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M2.28 12C2.28 9.948 3.948 8.28 6 8.28H10.8V6H6C2.688 6 0 8.688 0 12C0 15.312 2.688 18 6 18H10.8V15.72H6C3.948 15.72 2.28 14.052 2.28 12ZM7.2 13.2H16.8V10.8H7.2V13.2ZM18 6H13.2V8.28H18C20.052 8.28 21.72 9.948 21.72 12C21.72 14.052 20.052 15.72 18 15.72H13.2V18H18C21.312 18 24 15.312 24 12C24 8.688 21.312 6 18 6Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const NumberedList = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M3.425 20C3.30833 20 3.20833 19.9583 3.125 19.875C3.04167 19.7917 3 19.6917 3 19.575C3 19.4583 3.04167 19.3583 3.125 19.275C3.20833 19.1917 3.30833 19.15 3.425 19.15H5.1V18.5H4.475C4.35833 18.5 4.25833 18.4583 4.175 18.375C4.09167 18.2917 4.05 18.1917 4.05 18.075C4.05 17.9583 4.09167 17.8583 4.175 17.775C4.25833 17.6917 4.35833 17.65 4.475 17.65H5.1V17H3.425C3.30833 17 3.20833 16.9583 3.125 16.875C3.04167 16.7917 3 16.6917 3 16.575C3 16.4583 3.04167 16.3583 3.125 16.275C3.20833 16.1917 3.30833 16.15 3.425 16.15H5.525C5.64167 16.15 5.74167 16.1917 5.825 16.275C5.90833 16.3583 5.95 16.4583 5.95 16.575V19.575C5.95 19.6917 5.90833 19.7917 5.825 19.875C5.74167 19.9583 5.64167 20 5.525 20H3.425ZM4.475 7.9C4.35833 7.9 4.25833 7.85833 4.175 7.775C4.09167 7.69167 4.05 7.59167 4.05 7.475V4.85H3.425C3.30833 4.85 3.20833 4.80833 3.125 4.725C3.04167 4.64167 3 4.54167 3 4.425C3 4.30833 3.04167 4.20833 3.125 4.125C3.20833 4.04167 3.30833 4 3.425 4H4.475C4.59167 4 4.69167 4.04167 4.775 4.125C4.85833 4.20833 4.9 4.30833 4.9 4.425V7.475C4.9 7.59167 4.85833 7.69167 4.775 7.775C4.69167 7.85833 4.59167 7.9 4.475 7.9V7.9ZM3.425 13.925C3.30833 13.925 3.20833 13.8833 3.125 13.8C3.04167 13.7167 3 13.6167 3 13.5V13.275C3 13.2583 3.03333 13.1667 3.1 13L4.875 10.925H3.425C3.30833 10.925 3.20833 10.8833 3.125 10.8C3.04167 10.7167 3 10.6167 3 10.5C3 10.3833 3.04167 10.2833 3.125 10.2C3.20833 10.1167 3.30833 10.075 3.425 10.075H5.525C5.64167 10.075 5.74167 10.1167 5.825 10.2C5.90833 10.2833 5.95 10.3833 5.95 10.5V10.725C5.95 10.7417 5.91667 10.8333 5.85 11L4.05 13.075H5.525C5.64167 13.075 5.74167 13.1167 5.825 13.2C5.90833 13.2833 5.95 13.3833 5.95 13.5C5.95 13.6167 5.90833 13.7167 5.825 13.8C5.74167 13.8833 5.64167 13.925 5.525 13.925H3.425ZM8.975 18.775C8.75833 18.775 8.57917 18.7042 8.4375 18.5625C8.29583 18.4208 8.225 18.2417 8.225 18.025C8.225 17.8083 8.29583 17.6292 8.4375 17.4875C8.57917 17.3458 8.75833 17.275 8.975 17.275H20.25C20.4667 17.275 20.6458 17.3458 20.7875 17.4875C20.9292 17.6292 21 17.8083 21 18.025C21 18.2417 20.9292 18.4208 20.7875 18.5625C20.6458 18.7042 20.4667 18.775 20.25 18.775H8.975ZM8.975 12.7C8.75833 12.7 8.57917 12.6292 8.4375 12.4875C8.29583 12.3458 8.225 12.1667 8.225 11.95C8.225 11.7333 8.29583 11.5542 8.4375 11.4125C8.57917 11.2708 8.75833 11.2 8.975 11.2H20.25C20.4667 11.2 20.6458 11.2708 20.7875 11.4125C20.9292 11.5542 21 11.7333 21 11.95C21 12.1667 20.9292 12.3458 20.7875 12.4875C20.6458 12.6292 20.4667 12.7 20.25 12.7H8.975ZM8.975 6.625C8.75833 6.625 8.57917 6.55417 8.4375 6.4125C8.29583 6.27083 8.225 6.09167 8.225 5.875C8.225 5.65833 8.29583 5.47917 8.4375 5.3375C8.57917 5.19583 8.75833 5.125 8.975 5.125H20.25C20.4667 5.125 20.6458 5.19583 20.7875 5.3375C20.9292 5.47917 21 5.65833 21 5.875C21 6.09167 20.9292 6.27083 20.7875 6.4125C20.6458 6.55417 20.4667 6.625 20.25 6.625H8.975Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Strikethrough = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M2 13.75V12.25H22V13.75H2ZM10.75 10.75V6.5H5V4H19V6.5H13.25V10.75H10.75ZM10.75 20V15.25H13.25V20H10.75Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Underline = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M5 21V19.5H19V21H5ZM12 17C10.3167 17 8.89583 16.425 7.7375 15.275C6.57917 14.125 6 12.7167 6 11.05V3H8V11.1C8 12.2 8.38333 13.125 9.15 13.875C9.91667 14.625 10.8667 15 12 15C13.1333 15 14.0833 14.625 14.85 13.875C15.6167 13.125 16 12.2 16 11.1V3H18V11.05C18 12.7167 17.4208 14.125 16.2625 15.275C15.1042 16.425 13.6833 17 12 17Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { RefObject, ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { Backdrop } from '../Backdrop';\nimport type { OnBeforeHideInterface } from '../ModalBase';\nimport { ModalBase } from '../ModalBase';\nimport { Button } from '../Button';\nimport { CloseIcon } from '../CloseButton/CloseIcon';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\n// TODO use a shared close button\nconst CloseButton = styled(Button)`\n color: ${({ theme }) => theme.color.grey700};\n height: 42px;\n position: fixed;\n right: ${({ theme }) => theme.spacing.space05};\n top: ${({ theme }) => theme.spacing.space05};\n width: 42px;\n\n &:hover {\n color: ${({ theme }) => theme.color.grey900};\n }\n`;\n\nexport type FullScreenModalProps = {\n /**\n * Color of the modal background\n */\n backgroundColor?: string;\n /**\n * Contents of the modal\n */\n content: (hide: () => unknown) => ReactNode;\n /**\n * Render the modal initially in shown state\n */\n initialShownState?: boolean;\n /**\n * Callback invoked before the modal is hidden\n */\n onBeforeHide?: (() => OnBeforeHideInterface) | undefined;\n /**\n * Callback invoked when the modal is shown\n */\n onHide?: () => unknown;\n /**\n * function(show, ref) that returns a node to open the modal\n */\n toggle?:\n | ((\n show: () => unknown,\n toggleButtonRef?: RefObject<HTMLElement | null | undefined>,\n ) => ReactNode)\n | undefined;\n};\n\nexport const FullScreenModal = ({\n content,\n toggle,\n backgroundColor,\n initialShownState = false,\n onBeforeHide,\n onHide,\n}: FullScreenModalProps) => {\n const defaultBackgroundColor = useThemeColor('grey100');\n\n return (\n <ModalBase\n initialShownState={initialShownState}\n onBeforeHide={onBeforeHide}\n onHide={onHide}\n render={(hide) => (\n <Backdrop\n backgroundColor={\n isNonEmptyString(backgroundColor) ? backgroundColor : defaultBackgroundColor\n }\n >\n <CloseButton\n noStyle={true}\n onClick={hide}\n title=\"Close\"\n >\n <CloseIcon />\n </CloseButton>\n {content(hide)}\n </Backdrop>\n )}\n toggle={toggle}\n />\n );\n};\n\nFullScreenModal.displayName = 'FullScreenModal_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\n\nconst getFillStyle = ($fillContainer: boolean | string): string | undefined => {\n if ($fillContainer === 'horizontal') {\n return 'width: 100%;';\n }\n if ($fillContainer === 'vertical') {\n return 'height: 100%;';\n }\n if ($fillContainer === true) {\n return `\n width: 100%;\n height: 100%;\n `;\n }\n return undefined;\n};\n\nexport type ImageComponentProps = {\n $fillContainer: boolean | 'horizontal' | 'vertical';\n $objFit?: string | undefined;\n $objPosition?: string | undefined;\n};\n\nconst ImageComponent = styled.img<ImageComponentProps>`\n ${({ $fillContainer }) => getFillStyle($fillContainer)};\n object-fit: ${({ $objFit }) => $objFit};\n object-position: ${({ $objPosition }) => $objPosition};\n`;\n\nexport type ImageProps = ComponentPropsWithoutRef<'img'> & {\n /**\n * Accessible text to apply to the image\n */\n alt: string;\n /**\n * Specifies whether the width and/or height should fill the container\n *\n * *Note: this will override height/width attributes*\n */\n fill?: boolean | 'horizontal' | 'vertical';\n /**\n * Specifies how the image's intrinsic size (ie. its natural size) should\n * be adjusted to fit within its container\n */\n fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';\n /**\n * Indicates how the browser should load the image; `eager`loads the image immediately,\n * `lazy` defers loading the image until it reaches a calculated distance from the viewport.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading\n */\n loading?: 'eager' | 'lazy';\n /**\n * Specifies how the image will align itself in its container\n */\n position?: string;\n /**\n * URL to image file\n */\n src: string;\n};\n\nexport const Image = ({\n src,\n alt,\n fill: fillContainer = false,\n fit: objFit,\n loading = 'lazy',\n position: objPosition,\n ...otherProps\n}: ImageProps): JSX.Element => (\n <ImageComponent\n $fillContainer={fillContainer}\n $objFit={objFit}\n $objPosition={objPosition}\n alt={alt}\n loading={loading}\n src={src}\n {...otherProps}\n />\n);\n\nImage.displayName = 'Image_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil, isArray } from '@wistia/type-guards';\nimport type { KeyboardKeys } from './KeyboardKeyTypes';\n\nexport type KeyboardShortcutProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * @description The visual style of the keyboard shortcut. Choose light if the background is dark and dark if the background is light.\n */\n componentStyle?: 'dark' | 'light';\n /**\n * @description If set to true, the keyboard shortcut will stretch the full width of its container.\n */\n fullWidth?: boolean;\n /**\n * @description The keys displayed.\n */\n keyboardKeys: KeyboardKeys | KeyboardKeys[];\n /**\n * @description A visual label for the keyboard shortcut.\n */\n label?: string;\n};\n\ntype LabelProps = {\n $componentStyle: 'dark' | 'light';\n};\n\ntype KeyboardShortcutComponentProps = {\n $componentStyle: 'dark' | 'light';\n $fullWidth: boolean;\n};\n\ntype StyledKeyProps = {\n $componentStyle: 'dark' | 'light';\n};\n\nconst KeyboardShortcutComponent = styled.div<KeyboardShortcutComponentProps>`\n align-items: center;\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n ${({ $fullWidth }) => $fullWidth && 'width: 100%; justify-content: space-between;'}\n`;\n\nconst StyledKey = styled.kbd<StyledKeyProps>`\n align-items: center;\n background: ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey200 : theme.color.grey600};\n border-bottom: 1px solid\n ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey400 : theme.color.grey800};\n border-radius: 4px;\n color: ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey700 : theme.color.grey100};\n display: flex;\n font-family: InterVariable, sans-serif;\n\n /* Adds serif to uppercase \"I\" to distinguish it from \"l\": https://rsms.me/inter/glyphs/?g=I.1 */\n font-feature-settings: 'cv08' on;\n font-size: 10px;\n\n /* Adds a slash to the zero to distinguish it from the letter \"O\": https://rsms.me/inter/glyphs/?g=zero.tf.slash */\n\n /* Adds tabular numbers to ensure the width of the key is consistent */\n font-variant-numeric: slashed-zero tabular-nums;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n height: 20px;\n justify-content: center;\n line-height: 20px;\n min-width: 20px;\n padding: 0 ${({ theme }) => theme.spacing.space01};\n`;\n\nconst Label = styled.span<LabelProps>`\n color: ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey700 : theme.color.grey100};\n font-size: 12px;\n`;\n\nconst KeysContainer = styled.div`\n display: flex;\n gap: ${({ theme }) => theme.spacing.space01};\n`;\n\nconst keyToString = (key: KeyboardKeys): string => {\n switch (\n key // eslint-disable-line @typescript-eslint/switch-exhaustiveness-check\n ) {\n // Arrow Keys\n case 'ArrowDown':\n return '↓';\n case 'ArrowLeft':\n return '←';\n case 'ArrowRight':\n return '→';\n case 'ArrowUp':\n return '↑';\n // Modifier Keys\n case 'Alt':\n return 'Alt';\n case 'Cmd':\n case 'Meta':\n if (/Mac|iPhone|iPad/.test(window.navigator.userAgent)) {\n return '⌘';\n }\n if (window.navigator.userAgent.includes('Win')) {\n return '⊞';\n }\n return '^';\n case 'Ctrl':\n return 'Ctrl';\n case 'Option':\n return '⌥';\n case 'Shift':\n return '⇧';\n // Whitespace Keys\n case 'Enter':\n return '↵';\n case 'Space':\n return 'Space';\n case 'Tab':\n return 'Tab';\n case 'Backspace':\n return 'Del';\n case 'Esc':\n return 'Esc';\n default:\n return key.toUpperCase();\n }\n};\n\nexport const KeyboardShortcut = ({\n label,\n keyboardKeys,\n fullWidth = false,\n componentStyle = 'dark',\n ...otherProps\n}: KeyboardShortcutProps): JSX.Element => {\n const kbKeys = isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys];\n\n return (\n <KeyboardShortcutComponent\n $componentStyle={componentStyle}\n $fullWidth={fullWidth}\n {...otherProps}\n >\n {isNotNil(label) && <Label $componentStyle={componentStyle}>{label}</Label>}\n <KeysContainer>\n {kbKeys.map((keyboardKey, index) => (\n <StyledKey\n // in this instance keyboardKey might not be unique, so index is our only option\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n $componentStyle={componentStyle}\n >\n {keyToString(keyboardKey)}\n </StyledKey>\n ))}\n </KeysContainer>\n </KeyboardShortcutComponent>\n );\n};\n\nKeyboardShortcut.displayName = 'KeyboardShortcut_VHS';\n","import type { ReactNode, MouseEvent, KeyboardEvent, ComponentPropsWithoutRef } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil, isNil } from '@wistia/type-guards';\nimport type { LinkStyleProps } from '../Link/linkStyle';\nimport { linkStyle, underlineOnHoverStyle } from '../Link/linkStyle';\n\nconst isEnterOrSpace = (event: KeyboardEvent): boolean =>\n event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar';\n\n/**\n * <LinkButton>\n *\n * This is a button that looks like a link. Useful for when you need an\n * interactive control (like an onClick handler), but want it to have the\n * identical box-model, hover, and focus appearance of a VHS `<Link>`.\n *\n * Why is this a `span` instead of a link or `button`? Well, that's a can of\n * worms there, stranger — explored before in #3 . There are many reasons NOT\n * to do this, (detailed in #0), but to summarize:\n *\n * > Always try to use the correct semantic element for the job. Except when\n * > you can't.\n *\n * This is more the case where the price of maintaining an identical visual\n * appearance with an HTML link for an interactive button type of component is\n * annoyingly high across browsers and platforms (#2) — a list which includes\n * style differences like inherited line-height, focus-inner Shadow DOM, and\n * more specifically `display` properties (#1). This last one is the\n * deal-breaker, in that despite your best efforts, you can't coerce a button\n * to flow inline with text like a link will. Having considered all these\n * issues, the approach here is to live with resolving the semantic differences\n * between a `span` and a `button` in order to provide an **identical** styling\n * experience without having to fight through all the user-agent defaults with\n * CSS resets.\n *\n * The rest of the social contract is ensuring that `LinkButton` identifies as\n * a button to Assistive Technologies and follows the rules for keyboard\n * interactivity without the unintended side-effects raised in\n * https://github.com/wistia/wistia/pull/11388 is . We use ARIA here, as a last\n * resort, to atone for using a `span` by setting `tabIndex` and `role`.\n *\n * #0 @link: https://dev.to/jakepartusch/how-to-create-a-button-with-a-div-in-react-and-why-you-shouldn-t-1743\n * #1 @link: https://html.spec.whatwg.org/multipage/rendering.html#button-layout\n * #2 @link: https://www.scottohara.me/blog/2018/10/03/unbutton-buttons.html#trickier-than-you-might-think\n * #3 @link: https://github.com/wistia/wistia/pull/10388/files#r405861522\n */\n\ntype LinkButtonStyledComponentProps = {\n $noStyle: boolean;\n $underlineOnHover: boolean;\n};\n\nconst LinkButtonStyledComponent = styled.span<LinkButtonStyledComponentProps & LinkStyleProps>`\n ${({ $noStyle }) => (!$noStyle ? linkStyle : undefined)};\n\n &[tabindex] {\n ${({ $underlineOnHover }) => ($underlineOnHover ? underlineOnHoverStyle : undefined)};\n }\n`;\n\nexport type LinkButtonProps = ComponentPropsWithoutRef<'button'> & {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Disables Button\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Button into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * Text that appears inside the button\n */\n label?: string;\n /**\n * Provides a button without any styling (useful for wrapping another element)\n */\n noStyle?: boolean;\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: (event: KeyboardEvent | MouseEvent) => void;\n /**\n * Will only display an underline when the Link is in a hover state\n */\n underlineOnHover?: boolean;\n /**\n * The visual type of Button to display\n */\n variant?: 'primary' | 'secondary';\n};\n\nexport const LinkButton = forwardRef<HTMLSpanElement, LinkButtonProps>(\n (\n {\n children,\n disabled = false,\n forceState,\n label,\n onClick,\n noStyle = false,\n underlineOnHover = false,\n variant = 'primary',\n ...otherProps\n }: LinkButtonProps,\n ref,\n ) => {\n const handleLinkClick = (event: MouseEvent) => {\n if (isNil(onClick)) {\n return;\n }\n if (disabled) {\n return;\n }\n\n onClick(event);\n };\n\n // This approach replaces the previous hooks implementation using techniques\n // found in #0\n const handleKeypress = (event: KeyboardEvent) => {\n if (isNil(onClick)) {\n return;\n }\n if (isEnterOrSpace(event)) {\n event.preventDefault();\n onClick(event);\n }\n };\n\n const computedTabIndex = disabled ? undefined : 0;\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const getContent = () => {\n if (isNotNil(children)) {\n return children;\n }\n if (isNotNil(label)) {\n return label;\n }\n return null;\n };\n\n return (\n <LinkButtonStyledComponent\n ref={ref}\n $disabledLink={disabled}\n $forceState={forceState}\n $noStyle={noStyle}\n $underlineOnHover={underlineOnHover}\n $variant={variant}\n aria-disabled={disabled}\n onClick={handleLinkClick}\n onKeyPress={handleKeypress} // eslint-disable-line @typescript-eslint/no-deprecated\n role=\"button\"\n tabIndex={computedTabIndex}\n {...otherProps}\n >\n {getContent()}\n </LinkButtonStyledComponent>\n );\n },\n);\n\nLinkButton.displayName = 'LinkButton_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\nimport { ListItem } from './ListItem';\n\nconst spacesStyle = css`\n overflow: hidden;\n padding-left: 0;\n vertical-align: bottom;\n\n li {\n display: block;\n float: left;\n\n &::after {\n content: ' ';\n padding-right: ${({ theme }) => theme.spacing.space03};\n }\n\n &:last-child {\n &::after {\n content: '' !important;\n padding-right: 0;\n }\n }\n }\n`;\n\nconst commasStyle = css`\n ${spacesStyle};\n\n li {\n &::after {\n content: ',' !important;\n padding-right: ${({ theme }) => theme.spacing.space01};\n }\n }\n`;\n\nconst slashesStyle = css`\n ${spacesStyle};\n\n li {\n &::after {\n content: '/' !important;\n padding-left: ${({ theme }) => theme.spacing.space01};\n padding-right: ${({ theme }) => theme.spacing.space01};\n }\n }\n`;\n\nconst breadcrumbsStyle = css`\n ${spacesStyle};\n\n li {\n &::after {\n content: '>' !important;\n padding-left: ${({ theme }) => theme.spacing.space01};\n padding-right: ${({ theme }) => theme.spacing.space01};\n }\n }\n`;\n\nconst unbulletedStyle = css`\n list-style: none;\n padding-left: 0;\n`;\nexport type ListComponentProps = {\n variant: string;\n};\n\nconst ListComponent = styled.ul<ListComponentProps>`\n list-style-position: outside;\n margin: ${({ theme }) => `0 0 ${theme.spacing.space01}`};\n padding: ${({ theme }) => `0 0 0 ${theme.spacing.space04}`};\n ${({ variant }) => variant === 'unbulleted' && unbulletedStyle};\n ${({ variant }) => variant === 'spaces' && spacesStyle};\n ${({ variant }) => variant === 'commas' && commasStyle};\n ${({ variant }) => variant === 'slashes' && slashesStyle};\n ${({ variant }) => variant === 'breadcrumbs' && breadcrumbsStyle};\n\n > li:last-child {\n margin-bottom: 0;\n }\n\n ul,\n ol {\n margin-top: ${({ theme }) => theme.spacing.space01};\n }\n\n /* nested lists should not have bottom margins because their container <li> will have one */\n li ul,\n li ol {\n margin-bottom: 0;\n }\n`;\n\nconst renderListComponent = (listItems: ReactNode, variant: VariantType, { ...otherProps }) => {\n // always use a `ul` unless we're rendering the \"ordered\" variant\n const elementType = variant === 'ordered' ? 'ol' : 'ul';\n\n return (\n <ListComponent\n as={elementType}\n variant={variant}\n {...otherProps}\n >\n {listItems}\n </ListComponent>\n );\n};\n\nconst renderListFromArray = (\n listItems: ItemType[],\n variant: VariantType,\n otherProps: Record<string, unknown>,\n) => {\n let itemCount = 0;\n const items = listItems.map((listItem, i) => {\n const item = listItem;\n const nextItem = listItems[i + 1];\n const key = `item-${(itemCount += 1)}`; // hacky way to autogenerate keys\n\n // if the *next* item in the array is a nested list then we need to include\n // the next <ul/ol> as a child of the current <li>\n if (Array.isArray(nextItem)) {\n return (\n <ListItem key={key}>\n {item}\n {renderListFromArray(nextItem, variant, otherProps)}\n </ListItem>\n );\n }\n\n // if the current item is an array, do nothing because we rendered\n // these items previously\n if (Array.isArray(item)) {\n return null;\n }\n\n return <ListItem key={key}>{item}</ListItem>;\n });\n\n return renderListComponent(items, variant, otherProps);\n};\n\nexport type VariantType =\n | 'breadcrumbs'\n | 'bullets'\n | 'commas'\n | 'ordered'\n | 'slashes'\n | 'spaces'\n | 'unbulleted';\n\ntype ItemType = ItemType[] | string[] | string;\n\nexport type ListProps = ComponentPropsWithoutRef<'ul'> & {\n /**\n * Children should be wrapped in `<ListItem>`\n */\n children?: ReactNode;\n /**\n * As an alternative to passing children you can supply an array of strings that\n * will be rendered as child `<ListItems>`s. Note that all items will be of the same variant.\n */\n items?: ItemType[];\n /**\n * The kind of list to render\n */\n variant?: VariantType;\n};\n\nexport const List = ({\n children,\n items,\n variant,\n ...otherProps\n}: ListProps): JSX.Element | null => {\n const listVariant = variant ?? 'bullets';\n if (isNotNil(children)) {\n // children exist, but it's an empty array so do nothing\n if (Array.isArray(children) && !children.length) {\n return null;\n }\n\n return renderListComponent(children, listVariant, otherProps);\n }\n\n if (isNotNil(items)) {\n // items is empty so do nothing\n if (!items.length) {\n return null;\n }\n\n return renderListFromArray(items, listVariant, otherProps);\n }\n\n // neither children nor items provided, so render nothing\n return null;\n};\n\nList.displayName = 'List_VHS';\n","import type { ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNil } from '@wistia/type-guards';\n\nconst ListItemComponent = styled.li`\n margin-bottom: ${({ theme }) => theme.spacing.space02};\n`;\n\nexport type ListItemProps = {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n};\n\nexport const ListItem = ({ children }: ListItemProps): JSX.Element | null => {\n if (isNil(children)) {\n return null;\n }\n\n return <ListItemComponent>{children}</ListItemComponent>;\n};\n\nListItem.displayName = 'ListItem_VHS';\n","export type { MenuProps } from './Menu';\nexport type { MenuItemProps, CheckboxMenuItemProps, RadioMenuItemProps } from './MenuItem';\nexport { DropdownMenuRadioGroup as MenuRadioGroup } from '@radix-ui/react-dropdown-menu';\nexport { Menu } from './Menu';\nexport { MenuItem, CheckboxMenuItem, RadioMenuItem } from './MenuItem';\nexport { MenuLabel } from './MenuLabel';\nexport { SubMenu } from './SubMenu';\n","import type { ReactNode, JSX } from 'react';\nimport { styled, css, keyframes } from 'styled-components';\nimport type { DropdownMenuProps, DropdownMenuContentProps } from '@radix-ui/react-dropdown-menu';\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuPortal,\n DropdownMenuContent,\n} from '@radix-ui/react-dropdown-menu';\nimport { isNotNil, isNotUndefined } from '@wistia/type-guards';\nimport { mq } from '../../helpers/mq';\nimport type { ButtonProps } from '../Button';\nimport { Button } from '../Button';\n\ntype ControlledMenuProps = {\n /** Is the menu open. Must be used with `onOpenChange`. */\n isOpen: boolean;\n /** When an attempt to toggle the menu is triggered,\n * must be used with `isOpen`.\n */\n onOpenChange: (isOpen: boolean) => void;\n};\n\ntype UncontrolledMenuProps = {\n isOpen?: never;\n onOpenChange?: never;\n};\n\ntype MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;\n\ntype DefaultMenuProps = DropdownMenuProps &\n MenuControlProps & {\n /** The position of the Menu */\n align?: 'center' | 'end' | 'start';\n children: ReactNode;\n /** Callback for when the user clicks or focuses outside of the menu */\n onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];\n /** Props to pass to the trigger component, the default trigger is Button */\n triggerProps?: ButtonProps;\n };\n\ntype MenuPropsWithLabel = DefaultMenuProps & {\n /** The label for the trigger element */\n label: string;\n trigger?: never;\n};\n\ntype MenuPropsWithCustomTrigger = DefaultMenuProps & {\n label?: never;\n /** Replace the default trigger */\n trigger: JSX.Element;\n};\n\nexport type MenuProps = MenuPropsWithCustomTrigger | MenuPropsWithLabel;\n\nconst gutterWidth = '8px';\n\nconst open = keyframes`\n from {\n opacity: 0;\n transform: scale(.97) translateY(-8px);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n`;\n\nconst close = keyframes`\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(.97) translateY(-8px);\n }\n`;\n\nexport const menuContentCss = css`\n animation: ${open} ${({ theme }) => theme.duration.productive.moderate}\n ${({ theme }) => theme.easing.entrance.productive};\n background: white;\n border-radius: 4px;\n box-shadow: ${({ theme }) => theme.shadow.elevation2};\n max-height: var(--radix-dropdown-menu-content-available-height);\n max-width: 100vw;\n overflow: auto;\n padding: ${gutterWidth} ${gutterWidth} ${({ theme }) => theme.spacing.space04} ${gutterWidth};\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n z-index: ${({ theme }) => theme.zIndex.MenuComponent};\n\n &[data-state='closed'] {\n animation: ${close} ${({ theme }) => theme.duration.productive.moderate}\n ${({ theme }) => theme.easing.exit.productive};\n }\n\n ${mq.smAndUp} {\n bottom: 0;\n padding: ${gutterWidth};\n right: 0;\n top: 0;\n transform: initial;\n }\n\n hr {\n margin: ${({ theme }) => theme.spacing.space02} 0;\n }\n`;\n\nconst MenuContent = styled(DropdownMenuContent)`\n ${menuContentCss}\n`;\n\nexport const Menu = ({\n align = 'start',\n children,\n trigger,\n label,\n isOpen,\n triggerProps = {},\n // TODO - come back to this. This error is bizarre\n // eslint-disable-next-line @typescript-eslint/unbound-method\n onOpenChange,\n onInteractOutside,\n ...props\n}: MenuProps): JSX.Element => {\n return (\n <DropdownMenu\n modal={false}\n {...(isNotNil(onOpenChange) && isNotNil(isOpen) ? { open: isOpen, onOpenChange } : {})}\n >\n <DropdownMenuTrigger asChild={true}>\n {isNotUndefined(trigger) ? (\n trigger\n ) : (\n <Button\n aria-expanded={isOpen}\n forceState={isOpen ? 'active' : undefined}\n iconName=\"caret-down\"\n iconPosition=\"end\"\n {...triggerProps}\n >\n {label}\n </Button>\n )}\n </DropdownMenuTrigger>\n <DropdownMenuPortal>\n <MenuContent\n {...props}\n align={align}\n onInteractOutside={onInteractOutside}\n sideOffset={6}\n >\n {children}\n </MenuContent>\n </DropdownMenuPortal>\n </DropdownMenu>\n );\n};\n\nMenu.displayName = 'Menu_VHS';\n","import {\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSubTrigger,\n} from '@radix-ui/react-dropdown-menu';\nimport { isNonEmptyString, isNotNil, isNotUndefined } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\nimport { darken } from 'polished';\nimport type {\n DropdownMenuCheckboxItemProps,\n DropdownMenuItemProps,\n DropdownMenuRadioItemProps,\n} from '@radix-ui/react-dropdown-menu';\nimport type { ElementType, ReactNode } from 'react';\nimport { buttonResetStyle } from '../Button/ButtonStyledComponent';\nimport { ellipsisStyle } from '../Ellipsis';\nimport { Text } from '../Text';\nimport { Icon } from '../Icon';\nimport { useMq } from '../..';\n\ntype MenuItemPropsWithLabelDescription = {\n href?: string;\n badge?: ReactNode;\n children?: never;\n label: ReactNode | string;\n description?: ReactNode | string;\n icon?: ReactNode;\n indicator?: ReactNode;\n renderAs?: ElementType;\n target?: HTMLAnchorElement['target'];\n variant?: 'dangerous' | 'pricing' | 'primary';\n};\n\ntype MenuItemPropsWithChildren = {\n href?: string;\n children: ReactNode | string;\n badge?: never;\n label?: never;\n description?: never;\n icon?: never;\n indicator?: ReactNode;\n renderAs?: ElementType;\n target?: HTMLAnchorElement['target'];\n variant?: 'dangerous' | 'pricing' | 'primary';\n};\n\nexport type MenuItemProps = DropdownMenuItemProps &\n (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);\n\nexport type CheckboxMenuItemProps = DropdownMenuCheckboxItemProps &\n (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);\n\nexport type RadioMenuItemProps = DropdownMenuRadioItemProps &\n (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);\n\nconst hoverDarken = '0.04';\nconst focusDarken = '0.08';\n\nconst dangerousMenuItemStyles = css`\n color: ${({ theme }) => theme.color.error700};\n\n &:focus,\n [data-state='highlighted'] {\n background-color: ${({ theme }) => darken(focusDarken, theme.color.error100)};\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => darken(hoverDarken, theme.color.error100)};\n }\n`;\n\nconst pricingMenuItemStyles = css`\n color: ${({ theme }) => theme.color.purple600};\n\n &:focus,\n [data-state='highlighted'] {\n background-color: ${({ theme }) => darken(focusDarken, theme.color.purple100)};\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => darken(hoverDarken, theme.color.purple100)};\n }\n`;\n\nconst getMenuItemStyles = (variant: 'dangerous' | 'pricing' | 'primary') => {\n switch (variant) {\n case 'dangerous':\n return dangerousMenuItemStyles;\n case 'pricing':\n return pricingMenuItemStyles;\n case 'primary':\n default:\n return null;\n }\n};\n\nconst StyledMenuItem = styled.div<{ $variant?: 'dangerous' | 'pricing' | 'primary' }>`\n ${buttonResetStyle};\n border-radius: 4px;\n ${ellipsisStyle};\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space02};\n text-decoration: none;\n\n &:hover,\n &:focus {\n border: none;\n color: ${({ theme }) => theme.color.grey900};\n outline: none;\n }\n\n &:focus,\n [data-state='highlighted'] {\n background-color: ${({ theme }) => darken(focusDarken, theme.color.grey200)};\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => theme.color.grey200};\n }\n\n /* Precedence boost: https://styled-components.com/docs/basics#pseudoelements-pseudoselectors-and-nesting */\n && {\n ${({ $variant }) => isNotNil($variant) && getMenuItemStyles($variant)};\n }\n`;\n\nconst StyledMenuItemContent = styled.div`\n align-items: center;\n display: grid;\n gap: ${({ theme }) => theme.spacing.space03};\n grid-template-columns: auto 1fr;\n grid-template-rows: auto auto;\n row-gap: 0;\n width: 100%;\n`;\n\nconst StyledMenuItemLabel = styled.div`\n display: flex;\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n justify-content: space-between;\n line-height: 1.5;\n min-width: 100%;\n`;\n\nconst IconContainer = styled.div`\n grid-row: span 2;\n text-align: center;\n width: 24px;\n`;\n\nconst NoIconContainer = styled.div`\n grid-row: span 2;\n text-align: center;\n width: 0;\n`;\n\nexport const MenuItem = ({\n children,\n label,\n description,\n badge,\n icon,\n renderAs,\n href,\n target,\n variant = 'primary',\n ...props\n}: MenuItemProps) => {\n const as = renderAs ?? (isNotUndefined(href) ? 'a' : 'div');\n\n const targetProp = as === 'a' && isNonEmptyString(target) ? { target } : {};\n\n return (\n <DropdownMenuItem\n style={{ outline: 'none' }}\n {...props}\n asChild={true}\n >\n <StyledMenuItem\n $variant={variant}\n as={as}\n href={href}\n {...targetProp}\n >\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) && <IconContainer>{icon}</IconContainer>}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n </StyledMenuItem>\n </DropdownMenuItem>\n );\n};\n\nexport const CheckboxMenuItem = ({\n children,\n label,\n description,\n badge,\n icon,\n indicator = (\n <Icon\n size=\"sm\"\n type=\"checkmark\"\n />\n ),\n ...props\n}: CheckboxMenuItemProps) => {\n return (\n <DropdownMenuCheckboxItem\n {...props}\n asChild={true}\n >\n <StyledMenuItem>\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) ? <IconContainer>{icon}</IconContainer> : <NoIconContainer />}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n <DropdownMenuItemIndicator>{indicator}</DropdownMenuItemIndicator>\n </StyledMenuItem>\n </DropdownMenuCheckboxItem>\n );\n};\n\nexport const RadioMenuItem = ({\n children,\n label,\n badge,\n description,\n icon,\n indicator = (\n <Icon\n size=\"sm\"\n type=\"checkmark\"\n />\n ),\n ...props\n}: RadioMenuItemProps) => {\n return (\n <DropdownMenuRadioItem\n {...props}\n asChild={true}\n >\n <StyledMenuItem>\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) ? <IconContainer>{icon}</IconContainer> : <NoIconContainer />}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>{' '}\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n <DropdownMenuItemIndicator>{indicator}</DropdownMenuItemIndicator>\n </StyledMenuItem>\n </DropdownMenuRadioItem>\n );\n};\nconst SubTrigger = styled(DropdownMenuSubTrigger)`\n outline: none;\n\n &[data-state='open'],\n &[data-highlighted] {\n background-color: ${({ theme }) => theme.color.grey200};\n }\n`;\n\nexport const SubMenuTrigger = ({\n children,\n label,\n badge,\n description,\n icon,\n onClick,\n}: MenuItemProps) => {\n const { isSmAndUp } = useMq();\n const Trigger = isSmAndUp ? SubTrigger : DropdownMenuItem;\n return (\n <Trigger\n onClick={(event) => {\n if (isNotUndefined(onClick)) {\n onClick(event);\n }\n }}\n >\n <StyledMenuItem>\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) ? <IconContainer>{icon}</IconContainer> : <NoIconContainer />}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n <Icon\n size=\"md\"\n type=\"caret-right\"\n />\n </StyledMenuItem>\n </Trigger>\n );\n};\n","import type { ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport { DropdownMenuLabel } from '@radix-ui/react-dropdown-menu';\nimport { Text } from '../Text';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\ntype MenuLabelProps = {\n children: ReactNode | string;\n};\n\nconst StyledMenuLabel = styled(DropdownMenuLabel)`\n /* TODO - this should be in theme */\n padding: 8px;\n`;\n\nexport const MenuLabel = ({ children, ...props }: MenuLabelProps) => {\n const grey700 = useThemeColor('grey700');\n return (\n <StyledMenuLabel asChild={true}>\n <Text\n colorOverride={grey700}\n variant=\"overline\"\n {...props}\n >\n {children}\n </Text>\n </StyledMenuLabel>\n );\n};\n","import { useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport {\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuGroup,\n DropdownMenuSubContent,\n} from '@radix-ui/react-dropdown-menu';\nimport { useMq } from '../../hooks/useMq';\nimport { mq } from '../../helpers/mq';\nimport { menuContentCss } from './Menu';\nimport { SubMenuTrigger } from './MenuItem';\n\ntype SubMenuProps = {\n label: string;\n children: ReactNode;\n icon?: ReactNode;\n description?: ReactNode;\n};\n\nconst SubMenuContent = styled(DropdownMenuSubContent)`\n ${menuContentCss}\n\n ${mq.smAndDown} {\n transform: translateX(-100%) !important;\n }\n`;\n\nconst StyledMobileSubMenuItems = styled.div`\n margin-left: ${({ theme }) => theme.spacing.space03};\n`;\n\nexport const SubMenu = ({ label, icon, description, children }: SubMenuProps) => {\n const { isSmAndUp } = useMq();\n const [isExpanded, setIsExpanded] = useState(false);\n\n return isSmAndUp ? (\n <DropdownMenuSub>\n <SubMenuTrigger\n description={description}\n icon={icon}\n label={label}\n />\n\n <DropdownMenuPortal>\n <SubMenuContent>{children}</SubMenuContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n ) : (\n <DropdownMenuGroup>\n <SubMenuTrigger\n description={description}\n icon={icon}\n label={label}\n onClick={(event) => {\n event.preventDefault();\n setIsExpanded((prev) => !prev);\n }}\n />\n <StyledMobileSubMenuItems>{isExpanded ? children : null}</StyledMobileSubMenuItems>\n </DropdownMenuGroup>\n );\n};\n","import type { MouseEvent, ReactElement, ReactNode, JSX } from 'react';\nimport { useCallback, cloneElement, useState, useLayoutEffect, useRef } from 'react';\nimport { isFunction, isNotNil } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\nimport type { ButtonProps } from '../Button';\nimport { Button } from '../Button';\nimport { Menu } from '../../private/components/Menu';\nimport { useBoolean } from '../../hooks/useBoolean';\nimport { Backdrop } from '../Backdrop';\nimport { MenuHeader } from './MenuHeader';\nimport { mq } from '../../helpers/mq';\nimport { useMq } from '../../hooks/useMq';\nimport { coerceToBoolean } from '../../helpers/stringHelpers/coerceToBoolean';\n\nconst MARGIN_BETWEEN_BUTTON_AND_MENU = 8;\n\nconst menuPositionAboveCss = css<MenuComponentProps>`\n bottom: 0;\n margin-bottom: ${({ $dropdownButtonHeight }) =>\n $dropdownButtonHeight + MARGIN_BETWEEN_BUTTON_AND_MENU}px;\n`;\n\nconst menuPositionBelowCss = css<MenuComponentProps>`\n margin-top: ${({ $dropdownButtonHeight }) =>\n $dropdownButtonHeight + MARGIN_BETWEEN_BUTTON_AND_MENU}px;\n top: 0;\n`;\n\nexport type MenuComponentProps = {\n $isMenuVisible: boolean;\n $menuAlignment: string;\n $menuPosition: string;\n $dropdownButtonHeight: number;\n};\n\n// instead of mounting & unmounting the menu we just \"hide\" it via display\n// this is done to support modal buttons in the menu\nconst MenuComponent = styled(Menu)<MenuComponentProps>`\n animation-duration: ${({ theme }) => theme.duration.productive.fast};\n animation-timing-function: ${({ theme }) => theme.easing.entrance.productive};\n bottom: 0;\n display: ${({ $isMenuVisible }) => ($isMenuVisible ? 'block' : 'none')};\n left: 0;\n position: fixed;\n width: 100%;\n\n ${mq.smAndUp} {\n animation: unset;\n bottom: initial;\n left: initial;\n position: absolute;\n width: initial;\n ${({ $menuAlignment }) => ($menuAlignment === 'left' ? 'left: 0;' : 'left: unset; right: 0')};\n ${({ $menuPosition }) =>\n $menuPosition === 'above' ? menuPositionAboveCss : menuPositionBelowCss};\n }\n`;\n\nconst MenuButtonContainer = styled.div`\n align-items: stretch;\n display: inline-flex;\n flex-direction: column;\n flex-shrink: 0;\n\n /* prevent dropdown button from wrapping underneath main button */\n position: relative;\n`;\n\nexport type MenuButtonProps = ButtonProps & {\n /**\n * Disables button\n */\n disabled?: boolean;\n /**\n * Use this prop to pass an IconButton as the \"trigger\" instead of a standard Button\n */\n iconButtonComponent?: JSX.Element | ReactElement;\n /**\n * Text that appears inside the button\n */\n label: string;\n /**\n * Which side of the button should the menu be aligned\n */\n menuAlignment?: 'left' | 'right';\n /**\n * An array of Button/Link components\n */\n menuItems?: JSX.Element[];\n /**\n * Where should the menu appear relative to the button\n */\n menuPosition?: 'above' | 'below';\n /**\n * Can be a CSS width value string, 'fullWidth' or 'maxItem' (sized to the largest item width)\n */\n menuWidth?: string;\n /**\n * Function that is called after the menu is closed\n */\n onMenuClosed?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;\n /**\n * Function that is called when the menu button is clicked\n */\n onMenuClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;\n /**\n * A custom node to be displayed in the menu on extra small screens.\n */\n overrideMenuHeader?: ReactNode;\n /**\n * The size of button to display\n */\n\n size?: 'lg' | 'md' | 'sm';\n};\n\n/**\n * @deprecated Please use Menu with a Button trigger, see [documentation](https://wistia.github.io/vhs/?path=/docs-components-menu--docs).\n *\n * #### Why MenuButton is being deprecated\n *\n * The [Menu](https://wistia.github.io/vhs/?path=/docs-components-menu--docs) component is preferred over MenuButton for several reasons:\n * 1. Menu has better alignment and collision detection.\n * 2. Menu supports submenus.\n * 3. Menu is properly portalled.\n */\nexport const MenuButton = ({\n label,\n menuAlignment = 'right',\n menuItems,\n menuPosition = 'below',\n menuWidth = 'maxItem',\n onMenuClick,\n onMenuClosed,\n disabled = false,\n iconButtonComponent,\n overrideMenuHeader,\n size = 'lg',\n ...otherProps\n}: MenuButtonProps): JSX.Element => {\n const [isMenuVisible, toggleMenu, , hideMenu] = useBoolean(false);\n const [shouldRenderItems, setShouldRenderItems] = useState(false);\n const [dropdownButtonHeight, setDropdownButtonHeight] = useState(0);\n const dropdownButton = useRef<HTMLButtonElement>(null);\n const { isXsAndDown } = useMq();\n\n useLayoutEffect(() => {\n if (!dropdownButton.current) {\n return;\n }\n\n setDropdownButtonHeight(dropdownButton.current.offsetHeight);\n }, [dropdownButton]);\n\n // clicking inside of the menu on an item should hide the menu\n // and throw focus back to the dropdown button\n // clicking outside of the menu should hide the menu\n // clicking esc key should hide the menu\n const dismissMenu = (event: Event | MouseEvent) => {\n // clicking the dropdown button \"counts\" as an outside click\n // but we want to let toggleMenu handle the state in that situation\n // else the menu will be immediately redisplayed\n if (\n !isMenuVisible ||\n (isNotNil(event) && coerceToBoolean(dropdownButton.current?.contains(event.target as Node)))\n ) {\n return;\n }\n hideMenu();\n if (isFunction(onMenuClosed)) {\n onMenuClosed();\n }\n dropdownButton.current?.focus();\n };\n\n // For performance, we defer rendering menu items until the MenuButton is\n // open. Once we do render the menu items, though, we should never remove\n // them since doing so could break interactivity with menu item child\n // components (e.g. triggering an ActionModal via menu item but then removing\n // it from the DOM before it can be displayed).\n const toggleMenuAndRenderItems = useCallback(() => {\n setShouldRenderItems(true);\n toggleMenu();\n }, [toggleMenu]);\n\n const onClickButton = useCallback(\n (event: MouseEvent) => {\n if (onMenuClick) {\n onMenuClick(event); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n toggleMenuAndRenderItems();\n },\n [onMenuClick, toggleMenuAndRenderItems],\n );\n\n // eslint-disable-next-line react/no-unstable-nested-components\n let MenuTriggerButton = () => (\n <Button\n ref={dropdownButton}\n aria-expanded={isMenuVisible}\n disabled={disabled}\n forceState={isMenuVisible ? 'active' : undefined}\n iconName=\"caret-down\"\n iconPosition=\"end\"\n label={label}\n onClick={onClickButton}\n size={size}\n {...otherProps}\n />\n );\n\n // TODO: How to handle button and iconButton having size props that could differ in the future\n if (isNotNil(iconButtonComponent)) {\n MenuTriggerButton = () =>\n cloneElement(iconButtonComponent, {\n label,\n onClick: onClickButton,\n ref: dropdownButton,\n disabled,\n 'aria-expanded': isMenuVisible,\n ...otherProps,\n });\n }\n\n return (\n <MenuButtonContainer>\n <MenuTriggerButton />\n <MenuComponent\n $dropdownButtonHeight={dropdownButtonHeight}\n $isMenuVisible={isMenuVisible}\n $menuAlignment={menuAlignment}\n $menuPosition={menuPosition}\n items={shouldRenderItems ? menuItems : []}\n menuHeader={\n isXsAndDown ? (\n <MenuHeader\n label={label}\n onCloseClick={dismissMenu}\n overrideMenuHeader={overrideMenuHeader}\n />\n ) : null\n }\n onClick={dismissMenu}\n onClickOutside={dismissMenu}\n onPressEsc={dismissMenu}\n width={menuWidth}\n />\n {isXsAndDown && isMenuVisible ? <Backdrop /> : null}\n </MenuButtonContainer>\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nMenuButton.displayName = 'MenuButton_VHS';\n","import type { MouseEventHandler, ReactNode, JSX } from 'react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { styled, css } from 'styled-components';\nimport { darken } from 'polished';\nimport { isNotNil, isNonEmptyString } from '@wistia/type-guards';\nimport { buttonResetStyle } from '../../../components/Button/ButtonStyledComponent';\nimport { ellipsisStyle } from '../../../components/Ellipsis';\nimport { useMergedRefs } from '../../../hooks/useMergedRefs';\nimport { useOnClickOutside } from '../../../hooks/useOnClickOutside';\nimport { Divider } from '../../../components/Divider';\nimport { mq } from '../../../helpers/mq';\n\nexport const MENU_WIDTH_OPTIONS = ['fullWidth', 'maxItem'];\nconst GUTTER_WIDTH = '8px';\nconst FOCUS_DARKEN = '0.08';\n\nconst getMenuWidth = (width: string) => {\n if (MENU_WIDTH_OPTIONS.includes(width)) {\n return null;\n }\n\n return width;\n};\n\ntype MenuComponentProps = {\n $menuWidth: string;\n};\n\nconst MenuComponent = styled.div<MenuComponentProps>`\n background: white;\n border-radius: 4px 4px 0 0;\n box-shadow: ${({ theme }) => theme.shadow.elevation2};\n display: ${({ $menuWidth }) => ($menuWidth === 'maxItem' ? 'inline-block' : 'block')};\n padding: ${GUTTER_WIDTH} ${GUTTER_WIDTH} ${({ theme }) => theme.spacing.space04} ${GUTTER_WIDTH};\n width: ${({ $menuWidth }) => getMenuWidth($menuWidth)};\n z-index: ${({ theme }) => theme.zIndex.MenuComponent};\n\n ${mq.smAndUp} {\n border-radius: 4px;\n padding: ${GUTTER_WIDTH};\n }\n`;\n\nconst dangerousMenuItemStyles = css`\n /* stylelint-disable no-descending-specificity */\n button,\n a {\n &:hover {\n background-color: ${({ theme }) => theme.color.red100};\n color: ${({ theme }) => theme.color.red600};\n }\n\n &:focus {\n background-color: ${({ theme }) => darken(FOCUS_DARKEN, theme.color.red100)};\n color: ${({ theme }) => theme.color.red600};\n }\n }\n`;\n\nconst disabledMenuItemStyles = css`\n button,\n a {\n background-color: transparent;\n color: ${({ theme }) => theme.color.grey500};\n cursor: not-allowed;\n opacity: 1;\n\n &:hover,\n &:focus {\n background-color: transparent;\n color: ${({ theme }) => theme.color.grey500};\n opacity: 1;\n }\n }\n`;\n\ntype MenuItemProps = {\n disabled?: boolean;\n variant?: string | undefined;\n};\n\nconst MenuItem = styled.div<MenuItemProps>`\n /* divider */\n hr {\n border-top: 1px solid ${({ theme }) => theme.color.grey300};\n margin: ${({ theme }) => theme.spacing.space01} ${GUTTER_WIDTH};\n }\n\n button {\n ${buttonResetStyle}\n }\n\n a {\n text-decoration: none;\n vertical-align: middle;\n }\n\n /* NOTE: some styles that may seem unnecessary or redundant are probably to override styles\n that come along with the Button, Link & FileSelect components that are allowed in the items array */\n button,\n a,\n label {\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-size: 18px;\n height: 44px;\n line-height: 40px;\n padding: 0 ${GUTTER_WIDTH};\n width: 100%;\n ${ellipsisStyle};\n\n ${mq.smAndUp} {\n font-size: 16px;\n height: 40px;\n }\n\n /* support FileSelect; this prevents an inner button or link from inheriting unwanted space */\n button,\n a {\n padding: 0;\n }\n\n &:hover,\n &:focus {\n border: none;\n color: ${({ theme }) => theme.color.grey900};\n outline: none;\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => theme.color.grey200};\n }\n\n &:focus {\n background-color: ${({ theme }) => darken(FOCUS_DARKEN, theme.color.grey200)};\n }\n }\n\n /* Precedence boost: https://styled-components.com/docs/basics#pseudoelements-pseudoselectors-and-nesting */\n && {\n ${({ variant }) => (variant === 'dangerous' ? dangerousMenuItemStyles : null)}\n ${({ disabled }) => (isNotNil(disabled) && disabled ? disabledMenuItemStyles : null)}\n }\n`;\n\nexport type MenuProps = {\n /**\n * An array of Button/Link components\n */\n items?: JSX.Element[] | undefined;\n /**\n * A header for the menu on extra small screens\n */\n menuHeader?: ReactNode;\n /**\n * Callback function invoked when user clicks inside the Menu component\n */\n onClick?: (event: Event) => void;\n /**\n * Callback function invoked when user clicks outside the Menu component\n */\n onClickOutside?: (event: Event) => void;\n /**\n * Callback function invoked when Menu component is unmounted\n */\n onClose?: (event?: Event) => unknown;\n /**\n * Callback function invoked when Menu component is mounted\n */\n onOpen?: (event?: Event) => unknown;\n /**\n * Callback function invoked when user presses escape key\n */\n onPressEsc?: (event: Event) => void;\n /**\n * Can be a CSS width value string, \"fullWidth\" or \"maxItem\" (sized to the largest item width)\n */\n width?: string;\n};\n\nexport const Menu = forwardRef(\n (\n {\n items,\n menuHeader,\n width = 'fullWidth',\n onClick,\n onClickOutside,\n onPressEsc,\n onOpen,\n onClose,\n ...otherProps\n }: MenuProps,\n ref,\n ) => {\n const menuRef = useRef(undefined);\n\n const onClickOutsideFn = isNotNil(onClickOutside) ? onClickOutside : () => {}; // eslint-disable-line @typescript-eslint/no-empty-function\n useOnClickOutside(menuRef, onClickOutsideFn);\n\n const menuRefs = useMergedRefs([menuRef, ref]);\n\n // invoke onOpen callback when Menu is mounted\n // invoke onClose callback when Menu is unmounted\n useEffect(() => {\n if (onOpen) {\n onOpen();\n }\n return () => {\n if (onClose) {\n onClose();\n }\n };\n }, [onOpen, onClose]);\n\n // invoke onPressEsc callback when escape key is pressed\n useEffect(() => {\n const onKeyup = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && onPressEsc) {\n onPressEsc(event);\n }\n };\n\n document.addEventListener('keyup', onKeyup);\n\n return () => {\n document.removeEventListener('keyup', onKeyup);\n };\n }, [onPressEsc]);\n\n // render nothing if no items are provided\n if (items?.length == null) {\n return null;\n }\n\n const itemsToRender = items.map((item) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { disabled, variant } = item.props;\n const disabledValue = isNotNil(disabled) ? (disabled as boolean) : false;\n const variantValue = isNonEmptyString(variant) ? variant : undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const key = `wrapper-${item.key!}`; // \"steal\" key from item needed for wrapper\n\n return (\n <MenuItem\n key={key}\n disabled={disabledValue}\n variant={variantValue}\n >\n {item}\n </MenuItem>\n );\n });\n\n const handleOnClick = onClick as unknown as MouseEventHandler<HTMLDivElement>;\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <MenuComponent\n ref={menuRefs}\n $menuWidth={width}\n onClick={handleOnClick}\n {...otherProps}\n >\n {isNotNil(menuHeader) ? (\n <>\n {menuHeader}\n <MenuItem>\n <Divider />\n </MenuItem>\n </>\n ) : null}\n {itemsToRender}\n </MenuComponent>\n );\n },\n);\n\nMenu.displayName = 'Menu';\n","import { styled } from 'styled-components';\nimport type { MouseEvent, ReactNode, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { ModalCloseButton } from '../../private/components/ModalCloseButton';\n\nconst HeaderAndButton = styled.div`\n align-items: center;\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space02};\n`;\n\nconst HeaderText = styled.span`\n color: ${({ theme }) => theme.color.grey900};\n font-size: 20px;\n font-weight: 700;\n line-height: 24px;\n`;\n\nexport type MenuHeaderProps = {\n /**\n * Text to be shown as the menu header\n */\n label: string;\n /**\n * The function to be executed when the close button is clicked\n */\n onCloseClick: (event: MouseEvent) => void;\n /**\n * A custom node to be displayed as the menu header\n */\n overrideMenuHeader?: ReactNode;\n};\n\nexport const MenuHeader = ({\n label,\n onCloseClick,\n overrideMenuHeader = undefined,\n}: MenuHeaderProps): JSX.Element => (\n <HeaderAndButton>\n {isNotNil(overrideMenuHeader) ? overrideMenuHeader : <HeaderText>{label || 'Menu'}</HeaderText>}\n <ModalCloseButton onClick={onCloseClick} />\n </HeaderAndButton>\n);\n","import type { ReactNode, ComponentPropsWithoutRef, RefObject, JSX, ForwardedRef } from 'react';\nimport { forwardRef, useEffect, useRef } from 'react';\nimport { styled, css } from 'styled-components';\nimport { hasKey, isNotNil, isNotUndefined } from '@wistia/type-guards';\nimport { createPortal } from 'react-dom';\nimport { useKeyPressOnce } from '../../hooks/useKeyPressOnce';\nimport { usePreventScroll } from '../../hooks/usePreventScroll';\nimport { useOnClickOutside } from '../../hooks/useOnClickOutside';\nimport { Backdrop } from '../Backdrop';\nimport { ModalAnimation } from '../../private/components/ModalAnimation';\nimport { useFocusTrap } from '../../hooks/useFocusTrap';\nimport { Dialog } from './Dialog';\nimport { ModalCloseProvider } from './ModalCloseContext';\nimport { mq } from '../../helpers/mq';\n\nexport type ModalProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Horizontally align modal to the left, center, or right of the container\n */\n alignHorizontal?: 'center' | 'left' | 'normal' | 'right';\n /**\n * Vertically align modal to the top, center, or bottom of the container\n */\n alignVertical?: 'bottom' | 'center' | 'normal' | 'top';\n\n /**\n * Whether or not the modal should be allowed to exceed the viewport bounds.\n * If it exceeds the bounds, the entire backdrop will be scrollable.\n */\n allowModalToExceedViewportBounds?: boolean;\n\n /**\n * Contents of the modal\n */\n children?: ReactNode;\n /**\n * Class to be applied to the base element of the modal\n */\n className?: string;\n\n /**\n * Whether or not the modal should take up the full height of the viewport\n */\n fullHeight?: boolean;\n\n /**\n * Ref to the element that should receive focus when the modal opens\n */\n initialFocusRef?: RefObject<HTMLElement | null>;\n\n /**\n * Whether or not the modal is open, and should be rendered\n */\n isOpen: boolean;\n\n /**\n * When the Modal is dismissed, this function will be called. You'll typically want to set the\n * state of `isOpen` to false here\n * @returns\n */\n onRequestClose?: () => void;\n\n /**\n * Whether or not the modal should be closed when the user clicks outside of it\n * @default true\n */\n shouldCloseOnClickOutside?: boolean;\n\n /**\n * Whether or not the modal should trap focus within itself\n *\n */\n shouldTrapFocus?: boolean;\n\n /** The base width to apply to the Modal */\n width?: string;\n\n /**\n * The overflow behavior to apply to the modal\n * @default 'auto'\n */\n overflow?: 'auto' | 'clip' | 'hidden' | 'scroll' | 'visible';\n};\n\ntype ModalContentProps = Omit<ModalProps, 'id'>;\n\n// Safari doesn't like display grid for some reason\nconst StyledBackdrop = styled(Backdrop)<{\n $allowModalToExceedViewportBounds: boolean;\n}>`\n display: flex;\n\n ${({ $allowModalToExceedViewportBounds }) =>\n $allowModalToExceedViewportBounds &&\n css`\n ${mq.smAndUp} {\n padding: ${({ theme }) => theme.spacing.space05};\n }\n `}\n`;\n\nconst StyledDialog = styled(Dialog)<{\n $allowModalToExceedViewportBounds: boolean;\n}>`\n ${({ $allowModalToExceedViewportBounds }) =>\n $allowModalToExceedViewportBounds &&\n css`\n ${mq.smAndUp} {\n max-height: min-content;\n margin: auto;\n }\n `}\n`;\n\nconst ModalInner = styled.div`\n align-items: stretch;\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst isMutableRef = (\n ref: React.ForwardedRef<HTMLDivElement>,\n): ref is RefObject<HTMLDivElement | null> => {\n return isNotNil(ref) && hasKey(ref, 'current') && isNotNil(ref.current);\n};\n\nconst useFocusRestore = (ref: ForwardedRef<HTMLDivElement>) => {\n useEffect(() => {\n const previousFocus = document.activeElement as HTMLElement | null;\n\n if (isMutableRef(ref)) {\n const el = ref.current;\n if (isNotNil(el)) {\n el.focus();\n }\n }\n\n return () => {\n if (previousFocus !== null) {\n setTimeout(() => {\n previousFocus.focus();\n }, 0);\n }\n };\n }, [ref]);\n};\n\nconst ModalContent = forwardRef<HTMLDivElement, ModalContentProps>(\n (\n {\n alignHorizontal = 'center',\n alignVertical = 'center',\n allowModalToExceedViewportBounds = false,\n children,\n className,\n fullHeight = false,\n initialFocusRef,\n isOpen = false,\n shouldTrapFocus = true,\n onRequestClose,\n shouldCloseOnClickOutside = true,\n width,\n overflow = 'auto',\n ...props\n }: ModalContentProps,\n ref,\n ): JSX.Element => {\n useFocusRestore(ref);\n\n const outerRef = useRef(null);\n\n const focusRef = useFocusTrap(shouldTrapFocus, {\n focusSelector: isNotUndefined(initialFocusRef) ? initialFocusRef : null,\n });\n\n useOnClickOutside(outerRef, () => {\n if (onRequestClose && shouldCloseOnClickOutside) {\n onRequestClose();\n }\n });\n usePreventScroll(isOpen);\n useKeyPressOnce('Escape', (event: KeyboardEvent) => {\n if (onRequestClose) {\n onRequestClose();\n }\n event.preventDefault();\n });\n\n return (\n <ModalCloseProvider value={onRequestClose}>\n <StyledBackdrop\n $allowModalToExceedViewportBounds={allowModalToExceedViewportBounds}\n alignHorizontal={alignHorizontal}\n alignVertical={alignVertical}\n >\n <StyledDialog\n ref={focusRef}\n $allowModalToExceedViewportBounds={allowModalToExceedViewportBounds}\n $fullHeight={fullHeight}\n $overflow={overflow}\n $width={width}\n aria-modal=\"true\"\n role=\"dialog\"\n tabIndex={-1}\n {...props}\n >\n <ModalInner ref={outerRef}>{children}</ModalInner>\n </StyledDialog>\n </StyledBackdrop>\n </ModalCloseProvider>\n );\n },\n);\n\nexport const Modal = (props: ModalProps): JSX.Element => {\n const { id, ...rest } = props;\n\n // TODO need to fix for SSR compat\n const modalEl = document.createElement('div');\n\n modalEl.classList.add('Modal');\n\n if (isNotUndefined(props.className)) {\n modalEl.classList.add(props.className);\n }\n\n if (isNotUndefined(id)) {\n modalEl.id = id;\n }\n\n const modalRoot = useRef<HTMLDivElement>(modalEl);\n // on mount, append this modal's portal target to the DOM. remove on unmount.\n // this allows us to render multiple modals on a page w/o them clobbering\n // each other.\n useEffect(() => {\n const modalRootEl = modalRoot.current;\n document.body.appendChild(modalRootEl);\n return () => modalRootEl.remove();\n }, []);\n\n return createPortal(\n <ModalAnimation>\n {props.isOpen ? (\n <ModalContent\n ref={modalRoot}\n {...rest}\n />\n ) : null}\n </ModalAnimation>,\n modalRoot.current,\n );\n};\n\n// For some reason, react-docgen-typescript will assume the \"primary\" export of this file is ModalContent\n// if its displayName is defined before Modal\nModal.displayName = 'Modal_VHS';\nModalContent.displayName = 'ModalContent_VHS';\n","import { styled } from 'styled-components';\nimport { mq } from '../../helpers/mq';\nimport type { ModalProps } from './Modal';\n\nexport type DialogProps = {\n $fullHeight?: boolean | undefined;\n $width?: string | undefined;\n $overflow?: ModalProps['overflow'] | undefined;\n};\n\nexport const Dialog = styled.div<DialogProps>`\n background-color: white;\n box-sizing: border-box;\n display: flex;\n\n /* latest versions of FF, Safari, and Chrome support dynamic viewport units; 100vh left as a fallback */\n height: 100vh;\n overflow: ${({ $overflow }) => $overflow ?? 'auto'};\n position: relative;\n width: 100vw;\n\n ${mq.smAndUp} {\n border-radius: 16px;\n height: ${({ $fullHeight }) => ($fullHeight ? 'min-content' : 'auto')};\n margin: ${({ theme }) => theme.spacing.space05};\n max-height: 90vh;\n ${({ $fullHeight }) => ($fullHeight ? 'min-height: calc(100vh - 48px);' : '')}\n max-width: 90vw;\n min-width: ${({ $width }) => $width ?? '480px'};\n width: min-content;\n }\n`;\n","import { isNotUndefined } from '@wistia/type-guards';\nimport { createContext, useContext } from 'react';\n\nconst ModalCloseContext = createContext<(() => void) | undefined>(undefined);\n\nexport const ModalCloseProvider = ModalCloseContext.Provider;\n\nexport const useModalClose = (): (() => void) => {\n const modalClose = useContext(ModalCloseContext);\n\n if (isNotUndefined(modalClose)) {\n return modalClose;\n }\n\n throw new Error('useModalClose must be used within a ModalCloseProvider');\n};\n","import { styled } from 'styled-components';\nimport type { MouseEvent, JSX } from 'react';\nimport { Icon } from '../Icon';\nimport { IconButton } from '../IconButton';\nimport { useModalClose } from './ModalCloseContext';\n\n// Use ModalHeader to provide a consistent padding and alignment for a static header\nexport const ModalHeader = styled.div`\n align-items: center;\n display: flex;\n padding: ${({ theme }) => theme.spacing.space04} ${({ theme }) => theme.spacing.space04};\n`;\n\n// Use ModalBody to provide a scrollable area for the modal content and a consistent padding.\nexport const ModalBody = styled.div`\n flex: auto;\n height: 100%;\n margin-top: ${({ theme }) => theme.spacing.space04};\n overflow: auto;\n padding: ${({ theme }) => theme.spacing.space04};\n`;\n\n// Use ModalFooter to provide a consistent padding and alignment for a static footer\nexport const ModalFooter = styled.div`\n padding: ${({ theme }) => theme.spacing.space04};\n`;\n\nexport type ModalCloseButtonProps = {\n /**\n * Callback invoked when the button is clicked\n */\n onClick?: (event: MouseEvent) => void;\n};\n\nconst StyledIconButton = styled(IconButton)`\n position: absolute;\n right: ${({ theme }) => theme.spacing.space04};\n top: ${({ theme }) => theme.spacing.space04};\n z-index: ${({ theme }) => theme.zIndex.ModalCloseButton};\n`;\n\nexport const ModalCloseButton = ({ onClick, ...props }: ModalCloseButtonProps): JSX.Element => {\n const onRequestClose = useModalClose();\n return (\n <StyledIconButton\n aria-label=\"Close\"\n icon={\n <Icon\n size=\"sm\"\n type=\"close\"\n />\n }\n onClick={onRequestClose}\n preventTooltip={true}\n {...props}\n />\n );\n};\n","import type { ReactNode, ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\n\ntype PaperComponentProps = {\n children: ReactNode;\n $elevationToken: 'elevation0' | 'elevation1' | 'elevation2';\n};\n\nexport type PaperProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The content within Paper component\n */\n children: ReactNode;\n /**\n * The \"elevation\" level of the Paper component\n */\n elevation?: 0 | 1 | 2 | undefined;\n};\n\nconst PaperComponent = styled.div<PaperComponentProps>`\n background-color: white;\n border-radius: 8px;\n box-shadow: ${({ theme, $elevationToken }) => theme.paper[$elevationToken]};\n`;\n\nexport const Paper = ({ children, elevation = 1, ...otherProps }: PaperProps): JSX.Element => {\n const elevationToken = `elevation${elevation}` as const;\n\n return (\n <PaperComponent\n {...otherProps}\n $elevationToken={elevationToken}\n >\n {children}\n </PaperComponent>\n );\n};\n\nPaper.displayName = 'Paper_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\n\nconst progressBarHeight = '8px';\n\nexport type ProgressBarContainerProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'aria-valuemax': any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'aria-valuemin': any;\n};\n\nconst ProgressBarContainer = styled.div<ProgressBarContainerProps>`\n display: flex;\n`;\n\nexport type ProgressBarMeterProps = {\n /**\n * Allows user to override default progress bar meter background colors\n */\n $meterBgColorOverride?: string | undefined;\n};\n\nconst ProgressBarMeter = styled.div<ProgressBarMeterProps>`\n align-self: center;\n background: ${({ theme, $meterBgColorOverride }) => $meterBgColorOverride ?? theme.color.grey300};\n border-radius: ${progressBarHeight};\n flex: 1;\n height: ${progressBarHeight};\n`;\n\nexport type ProgressBarLevelProps = {\n /**\n * Allows user to override default progress bar meter background colors\n */\n $meterBgColorOverride?: string | undefined;\n /**\n * Allows user to override default colors\n */\n $colorOverride?: string | undefined;\n /**\n * Current numeric level of the progress (0 -> 1), which controls width of the ProgressBarLevel\n */\n $progress: number;\n};\n\nconst ProgressBarLevel = styled.div<ProgressBarLevelProps>`\n background: ${({ theme, $colorOverride }) => $colorOverride ?? theme.color.brandBlue500};\n border-radius: ${progressBarHeight};\n height: 100%;\n transition: width 0.2s ease-out;\n width: ${({ $progress }) => $progress * 100}%;\n`;\n\nexport type ProgressBarLabelProps = {\n /**\n * Allows user to override default progress bar label colors\n */\n $labelColorOverride?: string | undefined;\n};\n\nconst ProgressBarLabel = styled.div<ProgressBarLabelProps>`\n color: ${({ theme, $labelColorOverride }) => $labelColorOverride ?? theme.color.grey900};\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n line-height: 6px;\n margin-right: ${({ theme }) => theme.spacing.space04};\n text-align: right;\n width: 5ch;\n`;\n\nexport type ProgressBarProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Whether the progress bar has a label\n */\n hasLabel?: boolean;\n /**\n * Current numeric level of the progress (0 -> 1)\n */\n progress?: number;\n /**\n * Allows user to override default progress bar label colors\n */\n labelColorOverride?: string;\n /**\n * Allows user to override default progress bar meter background colors\n */\n meterBgColorOverride?: string;\n /**\n * Allows user to override default colors\n */\n colorOverride?: string;\n};\n\nexport const ProgressBar = ({\n hasLabel = true,\n progress = 0,\n colorOverride = undefined,\n labelColorOverride = undefined,\n meterBgColorOverride = undefined,\n ...otherProps\n}: ProgressBarProps): JSX.Element => {\n // prevent progress from going below 0 or above 1\n // future consideration for UI: should we throw an error if out of range?\n // should we try to create a type that enforces this?\n const clampedProgress = Math.min(Math.max(progress, 0), 1);\n const currentProgress = Math.round(clampedProgress * 100);\n\n return (\n <ProgressBarContainer\n aria-label=\"Progress\"\n aria-valuemax=\"100\"\n aria-valuemin=\"0\"\n aria-valuenow={currentProgress}\n data-testid=\"progress-bar\"\n role=\"progressbar\"\n {...otherProps}\n >\n {hasLabel ? (\n <ProgressBarLabel\n $labelColorOverride={labelColorOverride}\n data-testid=\"progress-bar-label\"\n >\n {currentProgress}%\n </ProgressBarLabel>\n ) : null}\n <ProgressBarMeter $meterBgColorOverride={meterBgColorOverride}>\n <ProgressBarLevel\n $colorOverride={colorOverride}\n $progress={clampedProgress}\n />\n </ProgressBarMeter>\n </ProgressBarContainer>\n );\n};\n\nProgressBar.displayName = 'ProgressBar_VHS';\n","import type { MouseEvent, JSX, ComponentType } from 'react';\nimport { useEffect, useState } from 'react';\nimport { styled } from 'styled-components';\nimport { isSameDay } from 'date-fns';\nimport type { DateRangeType } from '../../private/components/RangeSelectorInput/utils';\nimport { RangeSelectorCalendar } from '../../private/components/RangeSelectorCalendar';\nimport { RangeSelectorInput } from '../../private/components/RangeSelectorInput';\nimport { useTheme } from '../../hooks/useTheme';\nimport { Button } from '../Button';\nimport { ButtonGroup } from '../ButtonGroup';\nimport { List } from '../List';\nimport { ListItem } from '../List/ListItem';\nimport { Icon } from '../Icon';\nimport { Tooltip } from '../Tooltip';\n\nconst TooltipWrapper = styled.div`\n text-align: left;\n width: 240px;\n`;\n\nconst PresetTooltip = ({ tooltipText }: { tooltipText: string }) => {\n return (\n <Tooltip\n direction=\"right\"\n label={<TooltipWrapper>{tooltipText}</TooltipWrapper>}\n shouldWrap={true}\n >\n <Icon\n size=\"md\"\n style={{ verticalAlign: 'text-bottom' }}\n type=\"question-mark\"\n />\n </Tooltip>\n );\n};\n\nconst formatDate = (date: Date): string =>\n date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n });\n\nconst formatFunc = ({ start, end }: DateRangeType) => `${formatDate(start)} - ${formatDate(end)}`;\n\nconst isSameRange = (r1: DateRangeType, r2: DateRangeType): boolean =>\n isSameDay(r1.start, r2.start) && isSameDay(r1.end, r2.end);\n\nconst CalendarPadding = styled.div`\n padding: ${({ theme }) => `0 ${theme.spacing.space03}`};\n`;\n\ntype RangeSelectorWrapperProps = {\n onClick: (event: MouseEvent) => void;\n $width?: number | string | undefined;\n};\n\nconst RangeSelectorWrapper = styled.div<RangeSelectorWrapperProps>`\n position: relative;\n width: ${({ $width }) => $width ?? 'auto'};\n`;\n\nconst StyledButton = styled(Button)<{ $inputButtonOverride: boolean }>`\n ${({ theme, $inputButtonOverride }) =>\n $inputButtonOverride &&\n `\n && {\n background-color: white;\n border: 1px solid ${theme.color.grey300};\n border-radius: 4px;\n color: ${theme.color.grey900};\n font-size: 14px;\n height: 36px;\n\n &:hover,\n &:focus,\n &:active {\n background-color: white;\n box-shadow: 0 0 0 1.5px ${theme.color.brandBlue500};\n }\n }\n `}\n`;\n\ntype ItemProps = {\n $isActive: boolean;\n};\n\nconst Item = styled.button<ItemProps>`\n background: white;\n border: none;\n color: ${({ theme }) => theme.color.grey800};\n cursor: pointer;\n display: flex;\n font-size: 15px;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space03};\n width: 100%;\n\n &:hover {\n background: ${({ theme }) => theme.color.grey100};\n }\n\n ${({ theme, $isActive }) =>\n $isActive &&\n `\n color: ${theme.color.blue600};\n font-weight: 600;\n `};\n`;\n\nconst Break = styled.div`\n flex-basis: 100%;\n height: 0;\n`;\n\ntype SelectorProps = {\n align: 'left' | 'right';\n $hasPresets: boolean;\n};\n\nconst Selector = styled.div<SelectorProps>`\n background: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n position: absolute;\n top: ${({ theme }) => theme.spacing.space07};\n ${({ align }) =>\n align === 'left' &&\n `\n left: 0;\n `};\n ${({ align }) =>\n align === 'right' &&\n `\n right: 0;\n `};\n z-index: ${({ theme }) => theme.zIndex.RangeSelector};\n`;\n\nconst SelectorInner = styled.div`\n display: flex;\n`;\n\nconst SelectorSection = styled.div`\n padding: ${({ theme }) => `${theme.spacing.space05} ${theme.spacing.space03}`};\n`;\n\nconst Footer = styled.div`\n border-top: 1px solid ${({ theme }) => theme.color.grey400};\n display: flex;\n flex-shrink: 0;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space05};\n width: 100%;\n`;\n\nconst Label = styled.span`\n text-align: left;\n white-space: nowrap;\n\n &&::before {\n content: attr(data-title);\n display: block;\n font-weight: bold;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n width: calc(100% + 40px);\n }\n`;\n\ntype Preset = {\n label?: string;\n value: {\n end: Date;\n start: Date;\n };\n tooltipText?: string;\n};\n\nexport type RangeSelectorProps = {\n /**\n * Align the popup to the left or the right of the tigger button\n */\n align?: 'left' | 'right';\n /**\n * The variant to be passed to the button component\n */\n buttonVariant?: 'input' | 'primary' | 'secondary' | 'tertiary';\n /**\n * The earliest selectable date\n */\n earliestDate?: Date;\n /**\n * The latest selectable date\n */\n latestDate?: Date;\n /**\n * Text to display in the footer\n */\n footerText?: JSX.Element | string;\n /**\n * A function that receives a date range object and returns a string to be rendered in the\n * trigger button\n */\n format?: (dataRange: DateRangeType) => JSX.Element | string;\n /**\n * Callback fired when the date range changes\n */\n onChange?: (dateRange: DateRangeType) => unknown;\n /*\n * A list of preset date ranges\n */\n presets?: Preset[];\n /**\n * The date range to be displayed in the picker\n */\n range?: DateRangeType;\n /**\n * Prevent dates in the future from being selected\n */\n shouldPreventFuture?: boolean;\n /**\n * If true, the button will take up the full width of its container\n */\n fullWidth?: boolean;\n /**\n * A custom width for the RangeSelector component (in px, %, or other CSS units)\n */\n width?: number | string;\n /**\n * A custom React component to use as the trigger button. The component should accept onClick,\n * children, and other standard button props.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customTriggerComponent?: ComponentType<Record<string, any>>;\n};\n\nexport const RangeSelector = ({\n align = 'left',\n buttonVariant = 'secondary',\n earliestDate,\n latestDate,\n format = formatFunc,\n fullWidth = false,\n footerText,\n onChange,\n presets = [],\n range = {\n end: new Date(),\n start: new Date(),\n },\n shouldPreventFuture = false,\n customTriggerComponent,\n width,\n ...props\n}: RangeSelectorProps): JSX.Element => {\n const [internalRange, setInternalRange] = useState<DateRangeType>(range);\n const [isOpen, setIsOpen] = useState(false);\n const [isCurrentCalendarValid, setIsCurrentCalendarValid] = useState(true);\n const [rangePartToShow, setRangePartToShow] = useState<'' | 'end' | 'start'>('end');\n const [errors, setErrors] = useState<string[]>([]);\n const theme = useTheme();\n\n useEffect(() => {\n setInternalRange(range);\n }, [range]);\n\n useEffect(() => {\n const onClick = () => {\n setIsOpen(false);\n setInternalRange(range);\n };\n\n if (isOpen) {\n window.addEventListener('click', onClick);\n }\n\n return () => {\n window.removeEventListener('click', onClick);\n };\n }, [isOpen, range, setInternalRange]);\n\n const handleClick = (event: MouseEvent): void => event.stopPropagation();\n\n const commonTriggerProps = {\n 'data-testid': 'trigger',\n fullWidth,\n onClick: () => setIsOpen(!isOpen),\n children: format(range),\n // spread all props except data-testid to avoid duplicate test IDs\n ...Object.fromEntries(Object.entries(props).filter(([key]) => key !== 'data-testid')),\n };\n\n const CustomTrigger = customTriggerComponent;\n\n return (\n // eslint-disable-next-line styled-components-a11y/no-static-element-interactions, styled-components-a11y/click-events-have-key-events\n <RangeSelectorWrapper\n $width={width}\n data-testid=\"rangeselector-test-identifier\"\n onClick={handleClick}\n >\n {CustomTrigger ? (\n <CustomTrigger {...commonTriggerProps} />\n ) : (\n <StyledButton\n {...commonTriggerProps}\n $inputButtonOverride={buttonVariant === 'input'}\n icon={\n <Icon\n size=\"sm\"\n type=\"caret-down\"\n />\n }\n iconPosition=\"end\"\n textAlign=\"left\"\n variant={buttonVariant === 'input' ? 'tertiary' : buttonVariant}\n />\n )}\n {isOpen ? (\n <Selector\n $hasPresets={Boolean(presets.length)}\n align={align}\n >\n <SelectorInner>\n {Boolean(presets.length) && (\n <List\n data-testid=\"presets\"\n style={{\n marginBottom: 0,\n borderRight: `1px solid ${theme.color.grey400}`,\n padding: '12px',\n }}\n variant=\"unbulleted\"\n >\n {presets.map(({ label, value, tooltipText }) => (\n <ListItem key={label}>\n <Item\n $isActive={isSameRange(internalRange, value)}\n data-testid={label?.replaceAll(' ', '_')}\n onClick={() => {\n setInternalRange(value);\n }}\n >\n {/* the title attr is this way is to ensure there is enough space for text and icon without layout shifting */}\n <Label data-title={`${label}___`}>\n {label}{' '}\n {tooltipText !== undefined ? (\n <PresetTooltip tooltipText={tooltipText} />\n ) : null}\n </Label>\n </Item>\n </ListItem>\n ))}\n </List>\n )}\n\n <SelectorSection>\n <CalendarPadding>\n <RangeSelectorInput\n earliestDate={earliestDate}\n latestDate={latestDate}\n onChange={(next: DateRangeType) => {\n setInternalRange(next);\n }}\n onErrorChange={setErrors}\n onSelectedRangePartChange={setRangePartToShow}\n range={internalRange}\n shouldPreventFuture={shouldPreventFuture}\n width=\"100%\"\n />\n <RangeSelectorCalendar\n earliestDate={earliestDate}\n latestDate={latestDate}\n onChange={(next) => {\n setInternalRange(next as DateRangeType);\n }}\n onIsValidChange={setIsCurrentCalendarValid}\n range={internalRange}\n rangePartToShow={rangePartToShow}\n shouldPreventFuture={shouldPreventFuture}\n />\n </CalendarPadding>\n </SelectorSection>\n </SelectorInner>\n <Break />\n <Footer>\n <div>{footerText}</div>\n <ButtonGroup align=\"right\">\n <Button\n onClick={() => {\n setInternalRange(range);\n setIsOpen(false);\n }}\n style={{ marginLeft: 0 }}\n variant=\"secondary\"\n >\n Cancel\n </Button>\n <Button\n data-testid=\"apply-button\"\n disabled={Boolean(errors.length) || !isCurrentCalendarValid}\n onMouseUp={() => {\n if (onChange) {\n onChange(internalRange);\n }\n setIsOpen(false);\n }}\n >\n Apply\n </Button>\n </ButtonGroup>\n </Footer>\n </Selector>\n ) : null}\n </RangeSelectorWrapper>\n );\n};\n\nRangeSelector.displayName = 'RangeSelector_VHS';\n","/* eslint-disable react-compiler/react-compiler */\n/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport type { ComponentPropsWithoutRef, Dispatch, SetStateAction, JSX } from 'react';\nimport { useEffect, useMemo, useState } from 'react';\nimport { isNotNil, isNil } from '@wistia/type-guards';\nimport { styled } from 'styled-components';\nimport { debounce } from 'throttle-debounce';\nimport {\n addDays,\n compareAsc,\n differenceInDays,\n endOfDay,\n isBefore,\n isEqual,\n isSameDay,\n isWithinInterval,\n startOfMonth,\n} from 'date-fns';\nimport type { DateRangeType } from '../RangeSelectorInput/utils';\nimport { usePreviousValue } from '../../../hooks/usePreviousValue';\nimport { Calendar, Day, DayNumber } from '../Calendar';\n\n// TODO: Use real Day types once it has been converted to TS\ntype EnhancedDayProps = ComponentPropsWithoutRef<'button'> & {\n $isBeginning: boolean;\n $isEnd: boolean;\n $isInRange: boolean;\n $isInTempRange: boolean;\n $isActive: boolean;\n $isHovered: boolean;\n disabled?: boolean;\n $val: string;\n};\n\nconst EnhancedDay = styled(Day)<EnhancedDayProps>`\n ${({ $isBeginning, $isInRange }) =>\n $isBeginning &&\n !$isInRange &&\n `\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n `};\n ${({ $isEnd, $isInRange }) =>\n $isEnd &&\n !$isInRange &&\n `\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n `};\n ${({ $isEnd, $isBeginning }) =>\n $isEnd &&\n $isBeginning &&\n `\n border-radius: 50%;\n `};\n ${({ theme, $isInRange }) =>\n $isInRange &&\n `\n background: ${theme.color.brandBlue200};\n border: 0px solid ${theme.color.grey300};\n border-radius: 0;\n `};\n ${({ theme, $isInTempRange }) =>\n $isInTempRange &&\n `\n border-width: 1px 0;\n border-style: solid;\n border-color: ${theme.color.brandBlue500};\n border-radius: 0;\n `};\n ${({ theme, $isActive }) =>\n $isActive &&\n `\n background: ${theme.color.blue500};\n background: ${theme.color.brandBlue500};\n border: none;\n color: white;\n `};\n ${({ theme, $isHovered }) =>\n $isHovered &&\n `\n &::after {\n border: 1px solid ${theme.color.brandBlue500};\n border-radius: 50%;\n content: '';\n display: block;\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 0;\n };\n\n &:disabled:after {\n display: none;\n };\n `};\n ${({ theme, $isBeginning, $isEnd, $isHovered }) =>\n $isBeginning &&\n !$isEnd &&\n $isHovered &&\n `\n color: white;\n\n &::after {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-left: 0px;\n background: ${theme.color.brandBlue500};\n color: white;\n }\n `};\n ${({ theme, disabled, $isEnd, $isBeginning, $isHovered }) =>\n isNotNil($isEnd) &&\n !$isBeginning &&\n !disabled &&\n $isHovered &&\n `\n color: white;\n\n &::after {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-right: 0px;\n background: ${theme.color.brandBlue500};\n }\n `}\n`;\n\nexport const isValidRange = (range?: DateRangeType) => {\n if (isNil(range)) {\n return false;\n }\n const { start, end } = range;\n return start instanceof Date && end instanceof Date && isBefore(start, end);\n};\n\nexport const isInRange = (range: DateRangeType | undefined, day: Date) => {\n if (isNil(range)) {\n return false;\n }\n const diff = differenceInDays(range.end, range.start);\n\n if (diff < 2) {\n return false;\n }\n\n return isWithinInterval(day, { start: addDays(range.start, 1), end: addDays(range.end, -1) });\n};\n\nconst makeRange = (firstDate?: Date | false, secondDate?: Date): DateRangeType | undefined => {\n if (firstDate instanceof Date && isNotNil(secondDate)) {\n const [start, end] = [firstDate, secondDate].sort(compareAsc);\n if (isNotNil(start) && isNotNil(end)) {\n return { start, end: endOfDay(end) };\n }\n }\n\n return undefined;\n};\n\nconst useRange = (firstDate?: Date | false, secondDate?: Date): DateRangeType | undefined => {\n const [range, setRange] = useState<DateRangeType | undefined>();\n\n useEffect(() => {\n setRange(makeRange(firstDate, secondDate));\n }, [firstDate, secondDate, setRange]);\n\n return range;\n};\n\nexport type RangeSelectorCalendarProps = {\n earliestDate?: Date | undefined;\n latestDate?: Date | undefined;\n onChange?: (...args: unknown[]) => unknown;\n onIsValidChange?: Dispatch<SetStateAction<boolean>>;\n range?: DateRangeType;\n rangePartToShow?: '' | 'end' | 'start';\n shouldPreventFuture?: boolean;\n};\n\n// TODO: this component should live within the RangeSelector folder since its not usable on its own\nexport const RangeSelectorCalendar = ({\n range = {\n end: new Date(),\n start: new Date(),\n },\n rangePartToShow = '',\n onChange,\n onIsValidChange = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function\n earliestDate,\n latestDate,\n shouldPreventFuture = false,\n}: RangeSelectorCalendarProps): JSX.Element => {\n const thisMonth = useMemo(() => startOfMonth(new Date()), []);\n const initialDisplayDate = isNotNil(range.end) ? range.end : thisMonth;\n const [displayDate, setDisplayDate] = useState(initialDisplayDate);\n const [{ firstDate, secondDate }, setDates] = useState<Record<string, Date | undefined>>({}); // eslint-disable-line react/hook-use-state\n const [hoveredDate, setHoveredDate] = useState<Date>();\n const internalRange = useRange(firstDate, secondDate);\n const priorInternalRange = usePreviousValue(internalRange);\n const tempRange = useRange(!isValidRange(internalRange) && firstDate, hoveredDate);\n const onIsValidChangeDebounced = useMemo(() => debounce(100, onIsValidChange), [onIsValidChange]);\n const setDisplayDateDebounced = useMemo(() => debounce(0, setDisplayDate), []);\n\n useEffect(() => {\n setDisplayDateDebounced(range.end);\n /* eslint-disable-next-line react-hooks/exhaustive-deps */\n }, []);\n\n useEffect(() => {\n if (!internalRange || !priorInternalRange) {\n return;\n }\n if (rangePartToShow) {\n const date = internalRange[rangePartToShow];\n setDisplayDateDebounced(date);\n }\n }, [rangePartToShow, internalRange, priorInternalRange, setDisplayDateDebounced]);\n\n useEffect(() => {\n onIsValidChangeDebounced(isValidRange(internalRange));\n }, [internalRange, onIsValidChangeDebounced]);\n\n useEffect(() => {\n if (isValidRange(range)) {\n let date; // eslint-disable-line @typescript-eslint/init-declarations\n if (priorInternalRange && !isEqual(range.start, priorInternalRange.start)) {\n date = range.start;\n }\n\n if (priorInternalRange && !isEqual(range.end, priorInternalRange.end)) {\n date = range.end;\n }\n\n if (date) {\n setDisplayDateDebounced(date);\n }\n\n setDates({ firstDate: range.start, secondDate: range.end });\n }\n }, [range, priorInternalRange, setDisplayDateDebounced]);\n\n const dayProps = (day: Date) => {\n // place these props in a function so we can log them out for debugging.\n // there's a lot going on here.\n // logging when isHovered is true is more useful\n const isActive =\n (isNotNil(firstDate) && isSameDay(firstDate, day)) ||\n (isNotNil(secondDate) && isSameDay(secondDate, day));\n const isInR = isInRange(internalRange, day);\n const isInTempRange = !internalRange && isInRange(tempRange, day);\n const val = day.toLocaleDateString('en-US');\n const isHovered = isNotNil(hoveredDate) ? isSameDay(day, hoveredDate) : false;\n const isBeginning = Boolean(\n (internalRange && isSameDay(internalRange.start, day)) ||\n (tempRange && isSameDay(tempRange.start, day)),\n );\n const isEnd = Boolean(\n (internalRange && isSameDay(internalRange.end, day)) ||\n (tempRange && isSameDay(tempRange.end, day)),\n );\n\n return {\n $isActive: isActive,\n $isBeginning: isBeginning,\n $isEnd: isEnd,\n $isInRange: isInR,\n $isInTempRange: isInTempRange,\n $isHovered: isHovered,\n $val: val,\n };\n };\n\n return (\n <Calendar\n displayDate={displayDate}\n earliestDate={earliestDate}\n latestDate={latestDate}\n onDisplayDateChange={setDisplayDateDebounced as (d?: Date) => unknown}\n onMouseLeave={() => {\n setHoveredDate(undefined);\n }}\n renderDay={({ day, isDisabled, formattedDay }): JSX.Element => {\n const propsForDay = dayProps(day);\n return (\n <EnhancedDay\n key={day as unknown as string}\n {...propsForDay}\n data-day={formattedDay}\n data-is-beginning={propsForDay.$isBeginning}\n data-is-end={propsForDay.$isEnd}\n data-is-in-temp-range={propsForDay.$isInTempRange}\n disabled={isDisabled}\n onClick={() => {\n let nextFirst: Date | undefined = day;\n let nextSecond: Date | undefined = day;\n if (firstDate && secondDate) {\n nextSecond = undefined;\n } else if (!firstDate) {\n nextSecond = secondDate;\n } else {\n nextFirst = firstDate;\n }\n\n setDates({ firstDate: nextFirst, secondDate: nextSecond });\n const nextRange = makeRange(nextFirst, nextSecond);\n\n if (isValidRange(nextRange) && onChange) {\n onChange(nextRange);\n }\n setHoveredDate(undefined);\n }}\n onMouseOver={() => {\n if (firstDate && !isDisabled) {\n setHoveredDate(day);\n }\n }}\n >\n <DayNumber>{formattedDay}</DayNumber>\n </EnhancedDay>\n );\n }}\n shouldPreventFuture={shouldPreventFuture}\n />\n );\n};\n\nRangeSelectorCalendar.displayName = 'RangeSelectorCalendar';\n","import { styled } from 'styled-components';\nimport {\n isBefore,\n isAfter,\n isFuture,\n addYears,\n eachDayOfInterval,\n eachMonthOfInterval,\n startOfDay,\n startOfMonth,\n endOfMonth,\n getDay,\n addMonths,\n} from 'date-fns';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { JSX } from 'react';\nimport type { OptionsType } from '../../../components/Select';\nimport { Select } from '../../../components/Select';\nimport { Icon } from '../../../components/Icon';\n\nconst dayDimension = 45;\n\nconst daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\nconst daysInAWeek = 7;\n\nconst hasDates = (week: (Date | [] | undefined)[]): boolean =>\n week[0] instanceof Date || week[6] instanceof Date;\n\nconst daysOfMonth = (dateInMonth: Date): Date[] => {\n const interval = {\n start: startOfMonth(startOfDay(dateInMonth)),\n end: endOfMonth(startOfDay(dateInMonth)),\n };\n return eachDayOfInterval(interval);\n};\n\nconst makeEmptyWeek = (): [][] => Array.from({ length: daysInAWeek }, () => []);\n\nconst monthLayout = (days: Date[]) => {\n const month = [];\n const dayOfStart = isNotNil(days[0]) ? getDay(days[0]) : 0;\n let currentWeek: (Date | [] | undefined)[] = makeEmptyWeek();\n\n for (let i = 0; i < days.length; i++) {\n const positionInWeek = (i + dayOfStart) % daysInAWeek;\n if (positionInWeek === 0 && hasDates(currentWeek)) {\n month.push(currentWeek);\n currentWeek = makeEmptyWeek();\n }\n currentWeek[positionInWeek] = days[i];\n }\n\n if (hasDates(currentWeek)) {\n month.push(currentWeek);\n }\n\n return month;\n};\n\nconst Month = styled.div`\n cursor: not-allowed;\n padding-top: ${({ theme }) => theme.spacing.space04};\n width: ${dayDimension * daysInAWeek}px;\n`;\n\nconst MonthHeader = styled.div`\n display: flex;\n justify-content: space-between;\n margin-bottom: ${({ theme }) => theme.spacing.space04};\n`;\n\nconst MonthLayout = styled.div`\n display: grid;\n grid-template-columns: repeat(7, 14.28% [col-start]);\n width: 100%;\n`;\n\nexport const Day = styled.button`\n background: none;\n border: 0 solid white;\n border-radius: 50%;\n color: ${({ theme }) => theme.color.grey800};\n cursor: pointer;\n font-size: 14px;\n height: ${dayDimension}px;\n margin-bottom: ${({ theme }) => theme.spacing.space01};\n position: relative;\n text-align: center;\n user-select: none;\n width: ${dayDimension}px;\n\n &:disabled {\n border: 0 solid white;\n color: ${({ theme }) => theme.color.grey300};\n cursor: not-allowed;\n }\n`;\n\nconst NullDay = styled.div`\n height: ${dayDimension}px;\n`;\n\nconst DayLabel = styled.span`\n font-size: 14px;\n font-weight: 500;\n margin-bottom: ${({ theme }) => theme.spacing.space02};\n text-align: center;\n user-select: none;\n`;\n\nexport const DayNumber = styled.span`\n position: relative;\n z-index: 1;\n`;\n\nconst MonthButton = styled.button`\n background: none;\n border: none;\n color: ${({ theme }) => theme.color.grey500};\n cursor: pointer;\n\n &:disabled {\n color: ${({ theme }) => theme.color.grey300};\n cursor: not-allowed;\n }\n`;\n\ntype RenderDayProps = {\n day: Date;\n isDisabled: boolean;\n formattedDay: string;\n};\n\nexport type CalendarProps = {\n displayDate: Date;\n earliestDate?: Date | undefined;\n latestDate?: Date | undefined;\n onDisplayDateChange?: (d?: Date) => unknown;\n onMouseLeave?: () => void;\n renderDay?: (args: RenderDayProps) => JSX.Element;\n shouldPreventFuture?: boolean;\n};\n\nexport const Calendar = ({\n displayDate,\n earliestDate,\n latestDate,\n onDisplayDateChange,\n onMouseLeave,\n shouldPreventFuture = false,\n renderDay,\n}: CalendarProps): JSX.Element => {\n const month = monthLayout(daysOfMonth(displayDate));\n const nextMonth = startOfMonth(addMonths(displayDate, 1));\n const prevMonth = endOfMonth(addMonths(displayDate, -1));\n\n const isAfterLatest = (date: Date) => {\n if (!latestDate) {\n return false;\n }\n\n return isAfter(date, latestDate);\n };\n\n const isInFuture = (date: Date) => {\n if (!shouldPreventFuture) {\n return false;\n }\n\n return isFuture(date);\n };\n\n const isBeforeEarliest = (date: Date) => {\n if (!earliestDate) {\n return false;\n }\n\n return isBefore(date, earliestDate);\n };\n\n const isDisabled = (date: Date) =>\n isAfterLatest(date) || isInFuture(date) || isBeforeEarliest(date);\n\n const formatDay = (date: Date) => date.toLocaleDateString('en-US', { day: 'numeric' });\n\n const renderDayFunc = (day: Date): JSX.Element =>\n renderDay ? (\n renderDay({\n day,\n isDisabled: isDisabled(day),\n formattedDay: formatDay(day),\n })\n ) : (\n <Day\n key={day as unknown as string}\n data-day={formatDay(day)}\n disabled={isDisabled(day)}\n >\n <DayNumber>{formatDay(day)}</DayNumber>\n </Day>\n );\n\n const possibleRange = {\n start: earliestDate ?? addYears(new Date(), -5), // eslint-disable-line @typescript-eslint/no-magic-numbers\n end: shouldPreventFuture ? new Date() : addYears(new Date(), 5),\n };\n\n const currentYear = displayDate.getFullYear();\n const getMonthOptions = () => {\n const formatter = new Intl.DateTimeFormat('en', { month: 'long' });\n\n return eachMonthOfInterval(possibleRange)\n .filter((date) => date.getFullYear() === displayDate.getFullYear())\n .map((date) => ({ value: date.getMonth(), label: formatter.format(date) }));\n };\n\n const getYearOptions = (): OptionsType =>\n Object.values(\n eachMonthOfInterval(possibleRange)\n .map((date) => ({ value: date.getFullYear(), label: date.getFullYear() }))\n .reduce((memo, entry) => {\n if (isNotNil(memo[entry.value as keyof typeof memo])) {\n return memo;\n }\n return { ...memo, [entry.value]: entry };\n }, {}),\n );\n\n const monthOptions = getMonthOptions();\n const yearOptions = getYearOptions();\n\n return (\n <Month data-testid=\"calendar-test-identifier\">\n <MonthHeader>\n <MonthButton\n aria-label=\"Previous month\"\n data-testid=\"month-prev\"\n disabled={isBeforeEarliest(prevMonth)}\n onClick={() => {\n if (onDisplayDateChange) {\n onDisplayDateChange(prevMonth);\n }\n }}\n style={{ transform: 'translateX(-5px)' }}\n type=\"button\"\n >\n <Icon\n size=\"md\"\n type=\"caret-left\"\n />\n </MonthButton>\n <Select\n aria-label=\"Select month\"\n data-testid=\"monthSelect\"\n fullWidth={false}\n onChange={(event) => {\n const selectedMonth = event.target.value;\n const nextDate = new Date(currentYear, Number(selectedMonth));\n if (onDisplayDateChange) {\n if (isInFuture(nextDate)) {\n onDisplayDateChange(new Date());\n } else if (isBeforeEarliest(nextDate)) {\n onDisplayDateChange(earliestDate);\n } else {\n onDisplayDateChange(nextDate);\n }\n }\n }}\n options={monthOptions}\n placeholder={null}\n value={displayDate.getMonth()}\n />\n <Select\n aria-label=\"Select year\"\n data-testid=\"yearSelect\"\n fullWidth={false}\n onChange={(event) => {\n const currentMonth = displayDate.getMonth();\n const selectedYear = event.target.value;\n const nextDate = new Date(Number(selectedYear), currentMonth);\n if (onDisplayDateChange) {\n if (isInFuture(nextDate)) {\n onDisplayDateChange(new Date());\n } else if (isBeforeEarliest(nextDate)) {\n onDisplayDateChange(earliestDate);\n } else {\n onDisplayDateChange(nextDate);\n }\n }\n }}\n options={yearOptions}\n placeholder={null}\n value={displayDate.getFullYear()}\n />\n <MonthButton\n aria-label=\"Next month\"\n data-testid=\"month-next\"\n disabled={isInFuture(nextMonth)}\n onClick={() => {\n if (onDisplayDateChange) {\n onDisplayDateChange(nextMonth);\n }\n }}\n style={{ transform: 'translateX(4px)' }}\n type=\"button\"\n >\n <Icon\n size=\"md\"\n type=\"caret-right\"\n />\n </MonthButton>\n </MonthHeader>\n\n {/* eslint-disable-next-line styled-components-a11y/interactive-supports-focus */}\n <MonthLayout\n aria-label=\"Day selection grid\"\n onMouseLeave={onMouseLeave}\n role=\"button\"\n >\n {daysOfWeek.map((day) => (\n <DayLabel key={day}>{day}</DayLabel>\n ))}\n {month.map((week: (Date | [] | undefined)[]): JSX.Element[] =>\n week.map((day) =>\n day instanceof Date ? renderDayFunc(day) : <NullDay key={Math.random()} />,\n ),\n )}\n </MonthLayout>\n </Month>\n );\n};\n\nCalendar.displayName = 'Calendar';\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { styled } from 'styled-components';\nimport { endOfDay } from 'date-fns';\nimport { isNotUndefined, isUndefined, isNotNil } from '@wistia/type-guards';\nimport { ErrorMessages } from './ErrorMessages';\nimport { INITIAL_VALUE, DATE_PART_POSITIONS } from './constants';\nimport { isPermissableKey, isValueChangeEvent, isMoveEvent } from './eventTypes';\nimport { getValueParts, rangeToString, stringToRange } from './conversions';\nimport { getNextValue, getNextSelection } from './iterators';\nimport type { DateRangeType } from './utils';\nimport { isValidRange, preventDoubleClick, getErrors, orderRange } from './utils';\nimport {\n getSelectionFromMove,\n getSelectionFromCursor,\n getFirstDefaultPosition,\n getRangePartFromSelection,\n setCursorPosition,\n} from './selection';\n\ntype InputStyledProps = {\n $width?: string;\n};\n\nconst Input = styled.input<InputStyledProps>`\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey800};\n outline: none;\n padding: ${({ theme }) => theme.spacing.space03};\n resize: none;\n text-align: center;\n width: ${({ $width }) => $width};\n\n &:focus {\n border: 1px solid ${({ theme }) => theme.color.brandBlue500};\n }\n`;\n\ntype GetMaxDateProps = {\n latestDate?: Date | undefined;\n shouldPreventFuture: boolean;\n};\n\nconst getMaxDate = ({ latestDate, shouldPreventFuture }: GetMaxDateProps): Date | undefined => {\n if (latestDate) {\n return latestDate;\n }\n\n return shouldPreventFuture ? endOfDay(new Date()) : undefined;\n};\n\nexport type RangeSelectorInputProps = {\n earliestDate?: Date | undefined;\n latestDate?: Date | undefined;\n onChange?: (next: DateRangeType) => void;\n onErrorChange?: (value: string[]) => void;\n onSelectedRangePartChange?: (next: '' | 'end' | 'start') => void;\n range: DateRangeType;\n shouldPreventFuture?: boolean;\n width?: string;\n};\n\n// TODO: this component should live within the RangeSelector folder since its not usable on its own\nexport const RangeSelectorInput = ({\n onChange,\n onSelectedRangePartChange,\n range,\n earliestDate,\n latestDate,\n shouldPreventFuture = false,\n width = '100%',\n onErrorChange,\n}: RangeSelectorInputProps) => {\n const [value, setValue] = useState<string>(INITIAL_VALUE);\n const [keyCount, setKeyCount] = useState(0);\n const [errorMessages, setErrorMessages] = useState<string[]>([]);\n const ref = useRef<HTMLInputElement>(null);\n const [currentSelection, setCurrentSelection] = useState<number[]>([0, -1]);\n const selectionLength =\n isUndefined(currentSelection) ||\n isUndefined(currentSelection[1]) ||\n isUndefined(currentSelection[0])\n ? 0\n : currentSelection[1] - currentSelection[0];\n const valueParts = getValueParts(value);\n\n const applyChange = useCallback(\n (nextRange: DateRangeType) => {\n const errors = getErrors({\n range: nextRange,\n maxDate: getMaxDate({ latestDate, shouldPreventFuture }),\n minDate: earliestDate,\n });\n\n if (isValidRange(nextRange)) {\n setValue(rangeToString(nextRange));\n if (!errors.length && isNotUndefined(onChange)) {\n onChange(orderRange(nextRange));\n }\n }\n\n setErrorMessages(errors);\n },\n [earliestDate, latestDate, shouldPreventFuture, onChange],\n );\n\n // update our internal state when the range prop changes\n useEffect(() => {\n setErrorMessages([]);\n setValue(rangeToString(range));\n }, [range]);\n\n useEffect(() => {\n if (isNotUndefined(onErrorChange)) {\n onErrorChange(errorMessages);\n }\n }, [errorMessages, onErrorChange]);\n\n // when the user has pressed the number of keys to fill a section, highlight the next one\n useEffect(() => {\n if (selectionLength === keyCount) {\n setKeyCount(0);\n const nextSelection = getSelectionFromMove(currentSelection, 1, DATE_PART_POSITIONS);\n setCurrentSelection(nextSelection);\n }\n }, [keyCount, currentSelection, selectionLength]);\n\n // apply the current selection to the dom\n useEffect(() => {\n setCursorPosition(ref, currentSelection[0], currentSelection[1]);\n if (isNotUndefined(onSelectedRangePartChange)) {\n onSelectedRangePartChange(getRangePartFromSelection(currentSelection));\n }\n }, [currentSelection, value, ref, onSelectedRangePartChange]);\n\n return (\n <div>\n {Boolean(errorMessages.length) && <ErrorMessages messages={errorMessages} />}\n <Input\n ref={ref}\n $width={width}\n data-testid=\"range-selector-input\"\n onBlur={() => {\n if (keyCount !== selectionLength && keyCount !== 0) {\n const stringToRangeValue = stringToRange(value);\n if (isNotNil(stringToRangeValue)) {\n applyChange(stringToRangeValue);\n }\n }\n setCurrentSelection([0, -1]);\n }}\n onFocus={() => {\n const index = getFirstDefaultPosition(value);\n if (index !== -1) {\n const firstPosition = DATE_PART_POSITIONS[0];\n\n if (isNotNil(firstPosition)) {\n const { start, end } = firstPosition;\n setCurrentSelection([start, end]);\n }\n }\n }}\n onKeyDown={(event) => {\n const args = {\n event,\n currentSelection,\n keyCount,\n valueParts,\n selectionLength,\n };\n\n if (!isPermissableKey(event)) {\n event.preventDefault();\n return;\n }\n\n if (isValueChangeEvent(event)) {\n const { nextValue, nextKeyCount, shouldApply } = getNextValue(args);\n const nextRange = stringToRange(nextValue);\n\n if (shouldApply && isNotUndefined(nextRange)) {\n applyChange(nextRange);\n } else {\n setValue(nextValue);\n }\n\n setKeyCount(nextKeyCount);\n }\n\n if (isMoveEvent(event)) {\n const { nextSelection, nextKeyCount } = getNextSelection(args);\n\n if (isNotUndefined(nextSelection)) {\n setCurrentSelection(nextSelection);\n }\n setKeyCount(nextKeyCount);\n const stringToRangeValue = stringToRange(value);\n\n if (isNotUndefined(stringToRangeValue)) {\n applyChange(stringToRangeValue);\n }\n }\n }}\n onMouseDown={preventDoubleClick}\n onMouseUp={() => {\n // determine the current segment to highlight when the user clicks on the input\n setKeyCount(0);\n setCurrentSelection(getSelectionFromCursor(ref, DATE_PART_POSITIONS));\n }}\n readOnly={true}\n type=\"text\"\n value={value}\n />\n </div>\n );\n};\n\nRangeSelectorInput.displayName = 'RangeSelectorInput';\n","import { styled } from 'styled-components';\nimport type { JSX } from 'react';\n\nconst ErrorMessagesList = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n`;\n\nconst ErrorMessage = styled.li`\n color: ${({ theme }) => theme.color.error600};\n font-size: 12px;\n`;\n\nexport type ErrorMessagesProps = {\n messages?: string[];\n};\n\nexport const ErrorMessages = ({ messages = [] }: ErrorMessagesProps): JSX.Element => (\n <ErrorMessagesList>\n {messages.map((message) => (\n <ErrorMessage key={message}>{message}</ErrorMessage>\n ))}\n </ErrorMessagesList>\n);\n","export const DIVIDER_STRING = ' - ';\nexport const INITIAL_VALUE = `mm/dd/yyyy${DIVIDER_STRING}mm/dd/yyyy`;\n\nconst positionElements = [\n { type: 'month', id: 'month1' },\n { type: 'day', id: 'day1' },\n { type: 'year', id: 'year1' },\n { type: 'skip' },\n { type: 'month', id: 'month2' },\n { type: 'day', id: 'day2' },\n { type: 'year', id: 'year2' },\n];\n\ntype positionElementType = {\n type: string;\n id?: string;\n};\nexport type PositionType = {\n start: number;\n end: number;\n type: string;\n id: string | undefined;\n};\n\nexport type DatePartsType = {\n month1: string;\n day1: string;\n year1: string;\n month2: string;\n day2: string;\n year2: string;\n};\n\nconst createPositionsFromElements = (elements: positionElementType[]): PositionType[] => {\n const spaces = {\n month: 2,\n day: 2,\n year: 4,\n skip: DIVIDER_STRING.length - 2,\n };\n\n let currentPosition = 0;\n\n return elements.map(({ type, id }, index) => {\n const start = currentPosition + (index === 0 ? 0 : 1);\n const end = start + spaces[type as keyof typeof spaces];\n currentPosition = end;\n\n return { start, end, type, id };\n });\n};\n\nexport const DATE_PART_POSITIONS = createPositionsFromElements(positionElements);\n","import type { KeyboardEvent } from 'react';\n\nconst keys = new Set([\n 'Enter',\n 'Backspace',\n 'Tab',\n 'ArrowRight',\n 'ArrowLeft',\n 'ArrowUp',\n 'ArrowDown',\n '/',\n]);\n\nexport const isANum = (event: KeyboardEvent): boolean => /^[0-9]$/i.test(event.key);\n\nexport const isAModifier = (event: KeyboardEvent): boolean => keys.has(event.key);\n\nexport const isPermissableKey = (event: KeyboardEvent): boolean =>\n isANum(event) || isAModifier(event);\n\nexport const isMoveRightChar = ({ key, shiftKey }: KeyboardEvent): boolean =>\n (key === 'Tab' && !shiftKey) || key === '/' || key === 'ArrowRight';\n\nexport const isMoveLeftChar = ({ key, shiftKey }: KeyboardEvent) =>\n key === 'ArrowLeft' || (key === 'Tab' && shiftKey);\n\nexport const isArrowUpDown = (event: KeyboardEvent): boolean =>\n event.key === 'ArrowUp' || event.key === 'ArrowDown';\n\nexport const isBackspace = (event: KeyboardEvent): boolean => event.key === 'Backspace';\n\nexport const isValueChangeEvent = (event: KeyboardEvent): boolean =>\n isANum(event) || isArrowUpDown(event) || isBackspace(event);\n\nexport const isMoveEvent = (event: KeyboardEvent): boolean =>\n isMoveLeftChar(event) || isMoveRightChar(event);\n","import { startOfDay, endOfDay, isValid } from 'date-fns';\nimport { isNotNil, isNonEmptyString } from '@wistia/type-guards';\nimport type { DatePartsType } from './constants';\nimport { DIVIDER_STRING } from './constants';\nimport type { DateRangeType } from './utils';\n\nexport const getValueParts = (value: string): DatePartsType => {\n const [start, end] = value.split(DIVIDER_STRING);\n let month1Val: string | undefined = '';\n let day1Val: string | undefined = '';\n let year1Val: string | undefined = '';\n let month2Val: string | undefined = '';\n let day2Val: string | undefined = '';\n let year2Val: string | undefined = '';\n\n if (isNotNil(start)) {\n [month1Val, day1Val, year1Val] = start.split('/');\n }\n if (isNotNil(end)) {\n [month2Val, day2Val, year2Val] = end.split('/');\n }\n\n const month1 = isNonEmptyString(month1Val) ? month1Val : '';\n const day1 = isNonEmptyString(day1Val) ? day1Val : '';\n const year1 = isNonEmptyString(year1Val) ? year1Val : '';\n const month2 = isNonEmptyString(month2Val) ? month2Val : '';\n const day2 = isNonEmptyString(day2Val) ? day2Val : '';\n const year2 = isNonEmptyString(year2Val) ? year2Val : '';\n\n return { month1, day1, year1, month2, day2, year2 };\n};\n\nexport const dateOnlyStringNumeric = (date: Date): string => {\n if (!isValid(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(['en-US'], {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n }).format(date);\n } catch {\n return ''; // handle bad input\n }\n};\n\nexport type DatePartsKeysType = keyof DatePartsType;\nexport const datePartsToString = (parts: DatePartsType): string => {\n const { month1, day1, year1, month2, day2, year2 } = parts;\n\n return `${month1}/${day1}/${year1}${DIVIDER_STRING}${month2}/${day2}/${year2}`;\n};\n\nexport const stringToRange = (value: string): DateRangeType | undefined => {\n const { month1, day1, year1, month2, day2, year2 } = getValueParts(value);\n\n try {\n const start = startOfDay(new Date(Number(year1), Number(month1) - 1, Number(day1)));\n const end = endOfDay(new Date(Number(year2), Number(month2) - 1, Number(day2)));\n\n return { start, end };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error: unknown) {\n return undefined;\n }\n};\n\nexport const rangeToString = ({ start, end }: DateRangeType) => {\n const opts: Intl.DateTimeFormatOptions = { month: '2-digit', day: '2-digit', year: 'numeric' };\n const startString = start.toLocaleDateString('en-US', opts);\n const endString = end.toLocaleDateString('en-US', opts);\n return `${startString}${DIVIDER_STRING}${endString}`;\n};\n","import isEqual from 'react-fast-compare';\nimport type { KeyboardEvent } from 'react';\nimport { getValueParts, datePartsToString } from './conversions';\nimport type { DatePartsType } from './constants';\nimport { INITIAL_VALUE, DATE_PART_POSITIONS } from './constants';\nimport { getFieldId, getMaxValue } from './utils';\nimport { isBackspace, isMoveLeftChar, isMoveRightChar, isArrowUpDown, isANum } from './eventTypes';\nimport { getSelectionFromMove } from './selection';\n\nconst validateDays = (parts: DatePartsType): DatePartsType => {\n const nextParts = { ...parts };\n const pad = (val: number | string) => `${val}`.padStart(2, '0');\n\n if (parts.day1 !== 'dd') {\n nextParts.day1 = pad(Math.min(Number(parts.day1), getMaxValue(parts, 'day1')));\n }\n\n if (parts.day2 !== 'dd') {\n nextParts.day2 = pad(Math.min(Number(parts.day2), getMaxValue(parts, 'day2')));\n }\n\n return nextParts;\n};\n\n// figure out what the next value should be\nexport const applyNumKey = (\n valueParts: DatePartsType,\n part: keyof DatePartsType,\n type: string,\n key: string,\n keyCount: number,\n): DatePartsType => {\n const defaultValue = getValueParts(INITIAL_VALUE)[part];\n const len = defaultValue.length;\n const pad = (val: number | string) => `${val}`.padStart(len, '0');\n const merge = (val: number | string) => ({ ...valueParts, [part]: pad(val) });\n const value = valueParts[part];\n const isDefault = value === defaultValue;\n\n if (keyCount === 0) {\n return merge(pad(key));\n }\n\n const maxValue = getMaxValue(valueParts, part);\n const priorValue = `${Number.parseInt(value, 10)}`;\n const nextValue = `${priorValue}${key}`;\n const exceedsLength = priorValue.length === len;\n\n if (isDefault && type !== 'year') {\n return merge(key);\n }\n if (exceedsLength) {\n return merge(key);\n }\n if (Number.parseInt(nextValue, 10) > maxValue) {\n return merge(maxValue);\n }\n\n return merge(nextValue);\n};\n\nconst inc = (value: string, max: number, diff: number): number => {\n let intValue = Number.parseInt(value, 10);\n if (Number.isNaN(intValue)) {\n intValue = 0;\n }\n\n const nextValue = intValue + diff;\n if (nextValue <= 0 || nextValue > max) {\n return intValue;\n }\n return nextValue;\n};\n\nexport const applyUpDownArrow = (\n valueParts: DatePartsType,\n part: keyof DatePartsType,\n diff: number,\n): DatePartsType => {\n const defaultValue = getValueParts(INITIAL_VALUE)[part];\n const len = defaultValue.length;\n const pad = (val: number | string) => `${val}`.padStart(len, '0');\n const merge = (val: number | string) => ({ ...valueParts, [part]: pad(val) });\n const value = valueParts[part];\n const maxValue = getMaxValue(valueParts, part);\n\n return merge(pad(inc(value, maxValue, diff)));\n};\n\ntype getNextValueProps = {\n event: KeyboardEvent;\n currentSelection: number[];\n keyCount: number;\n valueParts: DatePartsType;\n selectionLength: number;\n};\nexport const getNextValue = ({\n event,\n currentSelection,\n keyCount,\n valueParts,\n selectionLength,\n}: getNextValueProps): {\n nextValue: string;\n nextKeyCount: number;\n shouldApply: boolean;\n} => {\n let nextValue = '';\n let nextKeyCount = keyCount;\n let shouldApply = false;\n const id = getFieldId(currentSelection, DATE_PART_POSITIONS);\n const type = id.substring(0, id.length - 1);\n\n if (isANum(event)) {\n event.preventDefault();\n const nextPotentialParts = applyNumKey(\n valueParts,\n id as keyof DatePartsType,\n type,\n event.key,\n keyCount,\n );\n const validatedParts = validateDays(nextPotentialParts);\n nextValue = datePartsToString(validatedParts);\n nextKeyCount += 1;\n shouldApply = selectionLength === nextKeyCount;\n }\n\n if (isArrowUpDown(event)) {\n event.preventDefault();\n const diff = event.key === 'ArrowUp' ? 1 : -1;\n const nextPotentialParts = applyUpDownArrow(valueParts, id as keyof DatePartsType, diff);\n const validatedParts = validateDays(nextPotentialParts);\n nextValue = datePartsToString(validatedParts);\n nextKeyCount = 0;\n shouldApply = true;\n }\n\n if (isBackspace(event)) {\n event.preventDefault();\n const initialValueParts = getValueParts(INITIAL_VALUE);\n nextValue = datePartsToString({\n ...valueParts,\n [id as keyof DatePartsType]: initialValueParts[id as keyof DatePartsType],\n });\n nextKeyCount = 0;\n }\n\n return { nextValue, nextKeyCount, shouldApply };\n};\n\ntype getNextSelectionProps = {\n event: KeyboardEvent;\n currentSelection: number[];\n};\nexport const getNextSelection = ({ event, currentSelection }: getNextSelectionProps) => {\n // eslint-disable-next-line @typescript-eslint/init-declarations\n let nextSelection;\n\n if (isMoveRightChar(event)) {\n nextSelection = getSelectionFromMove(currentSelection, 1, DATE_PART_POSITIONS);\n if (!isEqual(nextSelection, currentSelection)) {\n event.preventDefault();\n }\n }\n\n if (isMoveLeftChar(event)) {\n nextSelection = getSelectionFromMove(currentSelection, -1, DATE_PART_POSITIONS);\n if (!isEqual(nextSelection, currentSelection)) {\n event.preventDefault();\n }\n }\n\n return { nextSelection, nextKeyCount: 0 };\n};\n","import { isValid, getDaysInMonth, getYear, isBefore, isSameDay, compareAsc } from 'date-fns';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { MouseEvent } from 'react';\nimport { dateOnlyStringNumeric } from './conversions';\nimport type { PositionType } from './constants';\n\nexport type DateRangeType = {\n start: Date;\n end: Date;\n};\n\n// eslint-disable-next-line @typescript-eslint/init-declarations\nlet timeout: ReturnType<typeof setTimeout> | undefined;\nexport const preventDoubleClick = (event: MouseEvent) => {\n const delay = 200;\n\n if (isNotNil(timeout)) {\n event.preventDefault();\n clearTimeout(timeout);\n timeout = undefined;\n }\n timeout = setTimeout(() => {\n clearTimeout(timeout);\n timeout = undefined;\n }, delay);\n};\n\nexport const isValidRange = ({ start, end }: DateRangeType) => isValid(start) && isValid(end);\n\nexport const getFieldId = ([start]: number[], positions: PositionType[]): string => {\n const currentPosition: PositionType | undefined = positions.find((pos) => pos.start === start);\n return isNotNil(currentPosition) && isNotNil(currentPosition.id) ? currentPosition.id : '';\n};\n\nexport const getMaxValue = (valueParts: Record<string, string>, part: string) => {\n const partType = part.substring(0, part.length - 1);\n const index = part.charAt(part.length - 1);\n const monthsInYear = 12;\n const maxDaysInMonth = 31;\n\n switch (partType) {\n case 'month':\n return monthsInYear;\n case 'year':\n return getYear(new Date());\n case 'day':\n if (valueParts[`month${index}`] !== 'mm') {\n const monthAsNumber = valueParts[`month${index}`] as unknown as number;\n const month = monthAsNumber - 1;\n if (valueParts[`year${index}`] !== 'yyyy') {\n const year = valueParts[`year${index}`] as unknown as number;\n return getDaysInMonth(new Date(year, month));\n }\n return getDaysInMonth(new Date(getYear(new Date()), month));\n }\n return maxDaysInMonth;\n default:\n return 0;\n }\n};\n\ntype getErrorsProps = {\n range: DateRangeType;\n maxDate?: Date | undefined;\n minDate?: Date | undefined;\n};\n\nexport const getErrors = ({ range, maxDate, minDate }: getErrorsProps) => {\n const startString = dateOnlyStringNumeric(range.start);\n const endString = dateOnlyStringNumeric(range.end);\n const errorMessages = [];\n\n if (isNotNil(maxDate)) {\n const maxString = dateOnlyStringNumeric(maxDate);\n if (isBefore(maxDate, range.start)) {\n errorMessages.push(`${startString} is after maximum of ${maxString}`);\n }\n if (isBefore(maxDate, range.end)) {\n errorMessages.push(`${endString} is after maximum of ${maxString}`);\n }\n }\n\n if (minDate) {\n const minString = dateOnlyStringNumeric(minDate);\n if (isBefore(range.start, minDate)) {\n errorMessages.push(`${startString} is before minimum of ${minString}`);\n }\n if (isBefore(range.end, minDate)) {\n errorMessages.push(`${endString} is before minimum of ${minString}`);\n }\n }\n\n if (isBefore(range.end, range.start) || isSameDay(range.end, range.start)) {\n errorMessages.push('start date must come before end date');\n }\n\n return errorMessages;\n};\n\nexport const orderRange = (range: DateRangeType): DateRangeType => {\n const [start, end] = [range.start, range.end].sort(compareAsc);\n\n // @ts-expect-error These will both be defined based on the sort method above.\n return { start, end };\n};\n","import type { RefObject } from 'react';\nimport { isNotUndefined, isUndefined, isNotNil } from '@wistia/type-guards';\nimport type { DatePartsKeysType } from './conversions';\nimport { getValueParts } from './conversions';\nimport type { PositionType } from './constants';\nimport { INITIAL_VALUE, DIVIDER_STRING } from './constants';\n\nconst getCursorPosition = (ref: RefObject<HTMLInputElement | null>) => {\n const startPos = ref.current?.selectionStart;\n const endPos = ref.current?.selectionEnd;\n return { startPos, endPos };\n};\n\nexport const setCursorPosition = (\n ref: RefObject<HTMLInputElement | null>,\n start: number | undefined,\n end: number | undefined,\n) => {\n const elem: HTMLInputElement | null = ref.current;\n if (!elem) {\n return;\n }\n\n // @ts-expect-error This seems to be a quirk of the tsc compiler - these params can be undefined (not null)\n elem.setSelectionRange(start, end);\n};\n\nexport const getSelectionFromMove = (\n selection: number[],\n move: number,\n positions: PositionType[],\n): number[] => {\n const currentIndex = positions.findIndex((pos) => pos.start === selection[0]);\n let nextPosition = positions[currentIndex + move];\n\n if (nextPosition?.type === 'skip') {\n nextPosition = positions[currentIndex + move * 2];\n }\n\n if (nextPosition) {\n return [nextPosition.start, nextPosition.end];\n }\n\n return selection;\n};\n\nexport const getSelectionFromCursor = (\n ref: RefObject<HTMLInputElement | null>,\n positions: PositionType[],\n) => {\n const pos = getCursorPosition(ref);\n\n for (let i = 0; i < positions.length; i++) {\n if (isUndefined(positions[i])) {\n return [];\n }\n const { start, end, type } = positions[i]!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n if (isNotNil(pos.startPos) && pos.startPos > start - 1 && pos.startPos <= end) {\n if (type === 'skip' && isNotUndefined(positions[i + 1])) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return [positions[i + 1]!.start, positions[i + 1]!.end];\n }\n return [start, end];\n }\n }\n\n return [];\n};\n\nexport const getFirstDefaultPosition = (value: string) => {\n const vp = getValueParts(value);\n const dvp = getValueParts(INITIAL_VALUE);\n const parts: DatePartsKeysType[] = ['month1', 'day1', 'year1', 'month2', 'day2', 'year2'];\n for (let i = 0; i < parts.length; i++) {\n if (isUndefined(parts[i])) {\n return -1;\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (vp[parts[i]!] === dvp[parts[i]!]) {\n return i;\n }\n }\n return -1;\n};\n\nexport const getRangePartFromSelection = ([, end]: number[]): '' | 'end' | 'start' => {\n const indexOfDivider = INITIAL_VALUE.indexOf(DIVIDER_STRING);\n if (end === -1) {\n return '';\n }\n\n if (isNotUndefined(end) && end <= indexOfDivider) {\n return 'start';\n }\n\n return 'end';\n};\n","import type { ComponentPropsWithoutRef, JSX, HTMLAttributes, RefCallback, Key } from 'react';\nimport { styled, css } from 'styled-components';\nimport ReactSlider from 'react-slider';\nimport {\n isFunction,\n isNonEmptyArray,\n isNonEmptyString,\n isNotNil,\n isNumber,\n isString,\n} from '@wistia/type-guards';\n\nconst TRACK_SIZE = '4px';\n\nconst DisabledSliderStyles = css`\n opacity: 0.5;\n\n & * {\n pointer-events: none;\n }\n`;\n\ntype SliderContainerProps = {\n disabled: boolean;\n};\n\nconst SliderContainer = styled.div<SliderContainerProps>`\n padding-bottom: ${TRACK_SIZE};\n width: 100%;\n ${({ disabled }) => (disabled ? DisabledSliderStyles : null)}\n`;\n\nconst StyledThumb = styled.div`\n background-color: ${({ theme }) => theme.color.brandBlue100};\n border-color: ${({ theme }) => theme.color.brandBlue500};\n border-radius: 50%;\n border-style: solid;\n border-width: 2px;\n box-shadow: ${({ theme }) => theme.shadow.elevation1};\n cursor: grab;\n height: 20px;\n transform: translateY(-8px);\n transition-duration: ${({ theme }) => theme.duration.productive.fast};\n transition-property: border-width, transform;\n transition-timing-function: ${({ theme }) => theme.easing.exit.productive};\n width: 20px;\n\n &:hover,\n &:active {\n transform: translateY(-8px) scale(1.2);\n transform-origin: center;\n transition-timing-function: ${({ theme }) => theme.easing.entrance.productive};\n }\n\n &:focus-visible {\n border-width: 3px;\n outline: none;\n }\n`;\n\nconst checkIfFilledTrack = (trackState: { index: number; value: number | readonly number[] }) => {\n // sefault assumption for single-thumb sliders\n let isFilledTrack = trackState.index === 0;\n\n // handling multi-thumb scenario\n if (Array.isArray(trackState.value)) {\n const valueArray = trackState.value as readonly number[];\n if (valueArray.length > 1) {\n // adjust logic as necessary based on criteria for a filled track\n isFilledTrack = trackState.index > 0 && trackState.index < valueArray.length;\n }\n }\n\n return isFilledTrack;\n};\n\ntype StyledTrackProps = {\n $isFilledTrack: boolean;\n};\n\nconst StyledTrack = styled.div<StyledTrackProps>`\n background: ${({ $isFilledTrack, theme }) =>\n $isFilledTrack ? theme.color.brandBlue500 : theme.color.grey400};\n border-radius: 999px;\n height: ${TRACK_SIZE};\n`;\n\n// this type removes `onChange`, which is a React built-in for some form elements &\n// it causes conflict with the props we use for the Slider component\ntype ComponentPropsWithoutRefWithoutOnChange = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'>;\n\nexport type SliderProps = ComponentPropsWithoutRefWithoutOnChange & {\n /**\n * aria-label for screen-readers to apply to the thumbs. Use an array for more than one thumb.\n * The length of the array must match the number of thumbs in the value array.\n */\n ariaLabel?: string[] | string | undefined;\n /**\n * aria-labelledby for screen-readers to apply to the thumbs. Used when slider rendered with separate label.\n * Use an array for more than one thumb. The length of the array must match the number of thumbs in the value array.\n */\n ariaLabelledby?: string[] | string | undefined;\n /**\n *\n */\n ariaValuetext?: string | ((state: Record<string, unknown>) => unknown);\n /**\n * @ignore\n */\n 'data-testid'?: string;\n /**\n * Determines the initial position(s) of the thumb(s) and the number of thumbs.\n *\n * If a number is passed a slider with one thumb will be rendered.\n * If an array is passed each value will determine the position of one thumb.\n * The values in the array must be sorted.\n *\n * Don't pass a default value if the slider is controlled (i.e. if you already\n * use the `value` prop).\n */\n initialValue?: number[] | number | undefined; // note: this is `defaultValue` in react-slider\n /**\n * If `true` the thumbs can't be moved.\n */\n disabled?: boolean;\n /**\n * The maximum value of the slider.\n */\n max?: number;\n /**\n * The minimum value of the slider.\n */\n min?: number;\n /**\n * Callback called on every value change. The function will be called with two arguments,\n * the first being the new value(s) the second being thumb index. **It does not return an event.**\n */\n onChange?: (value: number, index?: number) => unknown;\n /**\n * Value to be added or subtracted on each step the slider makes. Must be greater than zero.\n * max - min should be evenly divisible by the step value.\n */\n step?: number;\n /**\n * Like 'initialValue' but for controlled components.\n */\n value?: number[] | number;\n};\n\nexport const Slider = ({\n ariaLabel,\n ariaLabelledby,\n ariaValuetext,\n disabled = false,\n initialValue = 0,\n max = 100,\n min = 0,\n onChange,\n step = 1,\n value,\n 'data-testid': passedDataTestId,\n ...otherProps\n}: SliderProps): JSX.Element => {\n if (!(isNonEmptyString(ariaLabel) || isNonEmptyString(ariaLabelledby))) {\n // eslint-disable-next-line no-console\n console.warn(\n 'VHS Slider: Sliders are required to have an accessible name. Add a label using the ariaLabel or ariaLabelledby prop.',\n );\n }\n\n const dataTestId = isNotNil(passedDataTestId) ? passedDataTestId : 'vhs-slider';\n\n return (\n <SliderContainer\n {...otherProps}\n data-testid={dataTestId}\n disabled={disabled}\n >\n {/* @ts-expect-error no overload matches this call */}\n <ReactSlider\n ariaLabel={\n (isString(ariaLabel) || isNonEmptyArray(ariaLabel) ? ariaLabel : undefined) as\n | string\n | undefined\n }\n ariaLabelledby={\n (isString(ariaLabelledby) || isNonEmptyArray(ariaLabelledby)\n ? ariaLabelledby\n : undefined) as string | undefined\n }\n ariaValuetext={\n isFunction(ariaValuetext)\n ? (state: { index: number; value: number; valueNow: number }) => ariaValuetext(state)\n : ariaValuetext\n }\n defaultValue={\n isNumber(initialValue) || isNonEmptyArray(initialValue) ? initialValue : undefined\n }\n disabled={disabled}\n marks={step}\n max={max}\n min={min}\n onChange={onChange}\n renderMark={(\n markProps: HTMLAttributes<HTMLSpanElement> & {\n ref: RefCallback<HTMLSpanElement>;\n } & { key: Key },\n ) => {\n const { key, ...restProps } = markProps;\n return (\n <span\n key={key}\n {...restProps}\n data-testid={`${dataTestId}-mark-${(markProps.key as number) + min}`}\n />\n );\n }}\n renderThumb={(thumbProps, thumbState) => {\n const { key, as, ...restProps } = thumbProps;\n return (\n <StyledThumb\n key={key}\n {...restProps}\n data-testid={`${dataTestId}-thumb-${thumbState.index}`}\n />\n );\n }}\n renderTrack={(trackProps, trackState) => {\n const { key, as, ...restProps } = trackProps;\n return (\n <StyledTrack\n key={key}\n {...restProps}\n $isFilledTrack={checkIfFilledTrack(trackState)}\n data-testid={`${dataTestId}-track-${trackState.index}`}\n />\n );\n }}\n step={step}\n value={isNumber(value) || isNonEmptyArray(value) ? value : undefined}\n />\n </SliderContainer>\n );\n};\n\nSlider.displayName = 'Slider_VHS';\n","import type {\n JSX,\n ElementType,\n ComponentPropsWithoutRef,\n PropsWithChildren,\n ForwardedRef,\n} from 'react';\nimport { forwardRef } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled } from 'styled-components';\n\nexport type StackProps<T extends ElementType> = ComponentPropsWithoutRef<T> &\n PropsWithChildren & {\n /**\n * The gap between each item in the stack. Should be one of the spacing values from the theme\n */\n gap?: keyof DefaultTheme['spacing'];\n /**\n * Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.\n * The default behavior is `vertical`.\n */\n direction?: 'horizontal' | 'vertical';\n /**\n * The element (e.g. div, span, p) or component to render as the root element.\n */\n renderAs?: T | 'div';\n };\n\ntype StyledStackProps = {\n $gap: keyof DefaultTheme['spacing'];\n $direction: 'horizontal' | 'vertical';\n};\n\nconst StyledStack = styled.div<StyledStackProps>`\n display: flex;\n flex-direction: ${({ $direction }) => ($direction === 'horizontal' ? 'row' : 'column')};\n gap: ${({ $gap, theme }) => theme.spacing[$gap]};\n\n > * {\n flex: 1;\n }\n`;\n\nexport const Stack = forwardRef(\n <T extends ElementType = 'div'>(\n { renderAs = 'div', direction = 'vertical', gap = 'space02', ...props }: StackProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n ): JSX.Element => {\n return (\n <StyledStack\n {...props}\n ref={ref}\n $direction={direction}\n $gap={gap}\n as={renderAs}\n />\n );\n },\n);\n\nStack.displayName = 'Stack_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled, css } from 'styled-components';\n\ntype SwitchComponentProps = {\n $colorOverride?: string | undefined;\n $hideText?: boolean;\n};\n\nconst SwitchComponent = styled.button<SwitchComponentProps>`\n background-color: white;\n border-color: ${({ theme }) => theme.color.grey700};\n border-radius: 20px;\n border-style: solid;\n border-width: 1px;\n color: ${({ theme }) => theme.color.grey700};\n cursor: pointer;\n display: inline-block;\n height: 20px;\n margin: 0;\n overflow: hidden;\n padding: 0;\n transition: background 175ms ease-out;\n vertical-align: middle;\n width: ${({ $hideText }) => ($hideText ? '40px' : '48px')};\n\n &:hover {\n opacity: 0.8;\n }\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.color.brandBlue500};\n outline-offset: 1px;\n }\n\n &[aria-checked='true'] {\n background-color: ${({ $colorOverride, theme }) => $colorOverride ?? theme.color.success600};\n border-color: ${({ $colorOverride, theme }) => $colorOverride ?? theme.color.success600};\n color: white;\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n opacity: 0.5;\n }\n`;\n\nconst ShowTextStyles = css`\n &::before,\n &::after {\n display: inline-block;\n font-size: 10px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n line-height: 20px;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n\n &::before {\n content: 'ON';\n left: -24px;\n }\n\n &::after {\n color: ${({ theme }) => theme.color.grey700};\n content: 'OFF';\n font-weight: ${({ theme }) => theme.font.weight.bold};\n left: 16px;\n\n ${SwitchComponent}[aria-checked=\"true\"] & {\n left: 20px;\n }\n }\n`;\n\nconst SwitchKnob = styled.div<{ $hideText?: boolean }>`\n background-color: ${({ theme }) => theme.color.grey700};\n border-radius: 50%;\n height: 12px;\n position: relative;\n transform: translateY(0%) translateX(4px);\n transition:\n background 175ms ease-out,\n color 175ms ease-out,\n transform 175ms ease-out;\n width: 12px;\n\n --switch-knob-x-offset: ${({ $hideText }) => ($hideText ? '22px' : '31px')};\n\n ${SwitchComponent}[aria-checked=\"true\"] & {\n background-color: white;\n transform: translateY(0%) translateX(var(--switch-knob-x-offset));\n }\n\n ${({ $hideText }) => !$hideText && ShowTextStyles}\n`;\n\nexport type SwitchProps = Omit<ComponentPropsWithoutRef<'button'>, 'onChange'> & {\n /**\n * Allows user to override default \"on\" color\n */\n colorOverride?: string;\n /**\n * Controls the `aria-disabled` property of the Switch\n */\n disabled?: boolean;\n /**\n * Determines if switch is checked\n */\n isChecked?: boolean;\n /**\n * Callback function invoked when the switch checked state changes\n */\n onChange?: (isChecked: boolean) => unknown;\n /**\n * Controls wether or not the ON / OFF text is shown\n */\n hideText?: boolean;\n};\n\nexport const Switch = ({\n disabled = false,\n isChecked = false,\n onChange,\n colorOverride,\n hideText = false,\n ...otherProps\n}: SwitchProps): JSX.Element => {\n const ariaLabel = isChecked ? 'on' : 'off';\n const handleClick = () => {\n if (onChange) {\n onChange(!isChecked);\n }\n };\n\n return (\n <SwitchComponent\n $colorOverride={colorOverride}\n $hideText={hideText}\n aria-checked={isChecked}\n aria-disabled={disabled}\n aria-label={ariaLabel}\n onClick={!disabled ? handleClick : undefined}\n role=\"switch\"\n type=\"button\"\n {...otherProps}\n >\n <SwitchKnob $hideText={hideText} />\n </SwitchComponent>\n );\n};\n\nSwitch.displayName = 'Switch_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { GradientNameType } from '../../helpers/getBackgroundGradient/getBackgroundGradient';\nimport { getBackgroundGradient } from '../../helpers/getBackgroundGradient';\nimport { Icon } from '../Icon';\nimport type { IconNameType } from '../Icon/iconMap';\n\ntype ThumbnailComponentProps = {\n $backgroundUrl: string;\n $width: string;\n $gradientBackground?: GradientNameType;\n};\n\ntype IconThumbnailProps = {\n /**\n * The desired display of the thumbnail, either wide or square\n */\n thumbnailImageType?: never;\n /**\n * The URL of the thumbnail image to display\n */\n thumbnailUrl?: never;\n /**\n * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image\n */\n icon: IconNameType;\n /**\n * The color of the icon\n */\n iconColor?: string;\n};\n\ntype ImageThumbnailProps = {\n /**\n * The desired display of the thumbnail, either wide or square\n */\n thumbnailImageType?: 'square' | 'wide' | undefined;\n /**\n * The URL of the thumbnail image to display\n */\n thumbnailUrl: string[] | string | null;\n /**\n * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image\n */\n icon?: never;\n /**\n * The color of the icon\n */\n iconColor?: never;\n};\n\nexport type ThumbnailProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Text that displays in the bottom right hand corner of the thumbnail, usually the media duration\n */\n bottomRightText?: string;\n /**\n * Icon to display in bottom right corner of the thumbnail\n */\n bottomRightIcon?: IconNameType;\n /**\n * The type of gradient to show either behind the icon or when there is no thumbnail image\n */\n gradientBackground?: GradientNameType;\n /**\n * Width of the thumbnail. By default, the thumbnail will grow to fit its container.\n */\n width?: string;\n} & (IconThumbnailProps | ImageThumbnailProps);\n\nconst ThumbnailComponent = styled.div<ThumbnailComponentProps>`\n ${({ $gradientBackground }) => getBackgroundGradient($gradientBackground)};\n aspect-ratio: 16 / 9;\n background-image: ${({ $backgroundUrl }) => $backgroundUrl};\n background-position: center;\n background-size: cover;\n border-radius: 4px;\n display: flex;\n overflow: hidden;\n position: relative;\n width: ${({ $width }) => $width};\n`;\n\nconst WideThumbnailImage = styled.img`\n height: 100%;\n object-fit: cover;\n width: 100%;\n`;\n\nconst SquareThumbnailImage = styled.img`\n backdrop-filter: blur(8px);\n object-fit: contain;\n width: 100%;\n`;\n\nconst BottomRightText = styled.div`\n align-items: center;\n background-color: rgb(0 0 0 / 50%);\n border-radius: 2px;\n bottom: 0;\n color: white;\n display: flex;\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n gap: ${({ theme }) => theme.spacing.space01};\n margin-bottom: ${({ theme }) => theme.spacing.space01};\n margin-right: ${({ theme }) => theme.spacing.space01};\n padding: 0 ${({ theme }) => theme.spacing.space01};\n position: absolute;\n right: 0;\n z-index: 1;\n`;\n\nconst IconContainer = styled.div`\n align-self: center;\n aspect-ratio: 1;\n margin: 30%;\n width: 40%;\n\n > * {\n height: 100%;\n width: 100%;\n }\n`;\n\ntype ThumbnailImageProps = {\n $thumbnailImageType?: 'square' | 'wide' | undefined;\n $thumbnailUrl: string;\n};\n\nconst ThumbnailImage = ({ $thumbnailImageType, $thumbnailUrl }: ThumbnailImageProps) => {\n if ($thumbnailImageType === 'wide') {\n return (\n <WideThumbnailImage\n alt=\"\"\n src={$thumbnailUrl}\n />\n );\n }\n if ($thumbnailImageType === 'square') {\n return (\n <SquareThumbnailImage\n alt=\"\"\n src={$thumbnailUrl}\n />\n );\n }\n return null;\n};\n\nexport const Collage = styled.div`\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 50% 50%;\n width: 100%;\n`;\n\ntype CollageImageProps = {\n $thumbnailUrl: string;\n total: number;\n};\n\nconst CollageImage = styled.div<CollageImageProps>`\n background-image: ${({ $thumbnailUrl }) => `url(${$thumbnailUrl})`};\n background-position: center;\n background-size: cover;\n min-width: 100px;\n\n &:nth-child(1) {\n grid-column: 1;\n grid-row: 1 / 3;\n }\n\n &:nth-child(2) {\n grid-column: 2;\n ${({ total }) => total === 2 && 'grid-row: 1 / 3;'}\n }\n`;\n\nexport const Thumbnail = ({\n bottomRightText,\n thumbnailUrl,\n thumbnailImageType = 'square',\n icon,\n bottomRightIcon,\n width = 'auto',\n gradientBackground = 'defaultMidOne',\n iconColor = 'white',\n ...otherProps\n}: ThumbnailProps): JSX.Element => {\n const thumbnailUrlToUse = Array.isArray(thumbnailUrl) ? thumbnailUrl[0] : thumbnailUrl;\n\n return (\n <ThumbnailComponent\n $backgroundUrl={\n thumbnailImageType === 'square' && isNotNil(thumbnailUrlToUse)\n ? `url(${thumbnailUrlToUse})`\n : ''\n }\n $gradientBackground={gradientBackground}\n $width={width}\n {...otherProps}\n >\n {isNotNil(bottomRightText) ? (\n <BottomRightText>\n {bottomRightIcon ? (\n <Icon\n size=\"sm\"\n type={bottomRightIcon}\n />\n ) : null}\n <span>{bottomRightText}</span>\n </BottomRightText>\n ) : null}\n {isNotNil(icon) && (\n <IconContainer>\n <Icon\n color={iconColor}\n type={icon}\n />\n </IconContainer>\n )}\n {!Array.isArray(thumbnailUrl) && isNotNil(thumbnailImageType) && isNotNil(thumbnailUrl) && (\n <ThumbnailImage\n $thumbnailImageType={thumbnailImageType}\n $thumbnailUrl={thumbnailUrl}\n />\n )}\n {Array.isArray(thumbnailUrl) && isNotNil(thumbnailImageType) && isNotNil(thumbnailUrl) && (\n <Collage data-testid=\"thumbnail-collage\">\n {thumbnailUrl.map((url, index) => (\n <CollageImage\n key={`${url}${index}`} // eslint-disable-line react/no-array-index-key\n $thumbnailUrl={url}\n data-testid={`collage-image-${index}`}\n total={thumbnailUrl.length}\n />\n ))}\n </Collage>\n )}\n </ThumbnailComponent>\n );\n};\n\nThumbnail.displayName = 'Thumbnail_VHS';\n","import type { JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { GradientNameType } from '../../helpers/getBackgroundGradient/getBackgroundGradient';\nimport { getBackgroundGradient } from '../../helpers/getBackgroundGradient';\n\nconst ThumbnailCollageContainer = styled.div`\n display: grid;\n grid-template-columns: 3fr 2fr;\n grid-template-rows: 1fr 1fr;\n width: 100%;\n gap: ${({ theme }) => theme.spacing.space01};\n height: 100%;\n`;\n\ntype CollageImageProps = {\n $thumbnailUrl?: string;\n $backgroundGradient?: GradientNameType;\n};\n\nconst CollageImage = styled.div<CollageImageProps>`\n ${({ $thumbnailUrl }) => isNotNil($thumbnailUrl) && `background-image: url(${$thumbnailUrl})`};\n ${({ $backgroundGradient }) => $backgroundGradient && getBackgroundGradient($backgroundGradient)};\n background-position: center;\n background-size: cover;\n border-radius: 8px;\n\n &:nth-child(1) {\n grid-column: 1;\n grid-row: 1 / 3;\n }\n\n &:only-child {\n grid-column: 1 / 3;\n grid-row: 1 / 3;\n }\n\n &:nth-child(2) {\n grid-column: 2;\n\n &:last-child {\n grid-row: 1 / 3;\n }\n }\n`;\n\nexport type ThumbnailCollageProps = {\n /**\n * An array of image urls to show in the thumbnail. Supports up to 3 images\n */\n thumbnailUrls: string[];\n /**\n * The type of gradient to show when there are no thumbnail urls\n */\n gradientBackground?: GradientNameType;\n};\n\nconst ThumbnailCollage = ({\n thumbnailUrls,\n gradientBackground = 'defaultMidOne',\n ...props\n}: ThumbnailCollageProps): JSX.Element => {\n return (\n <ThumbnailCollageContainer\n role=\"presentation\"\n {...props}\n >\n {thumbnailUrls.length ? (\n thumbnailUrls.map((thumbnailUrl) => (\n <CollageImage\n key={thumbnailUrl}\n $thumbnailUrl={thumbnailUrl}\n />\n ))\n ) : (\n <CollageImage $backgroundGradient={gradientBackground} />\n )}\n </ThumbnailCollageContainer>\n );\n};\n\nexport { ThumbnailCollage };\n","import { styled } from 'styled-components';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\n\n// brandmark = the Wistia flags icon\n// logotype = the \"wistia\" text\n\n// because the flags are shorter than the logo text we need to have a 2nd path (and viewBox),\n// for when the brandmark is rendered without the logotype\nconst renderBrandmark = (brandmarkColor: string, iconOnly: boolean) => {\n if (iconOnly) {\n return (\n <g fill={brandmarkColor}>\n <path d=\"M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z\" />\n </g>\n );\n }\n\n return (\n <g fill={brandmarkColor}>\n <path d=\"M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z\" />\n </g>\n );\n};\n\nconst renderLogotype = (logotypeColor: string, iconOnly: boolean) => {\n if (iconOnly) {\n return null;\n }\n\n return (\n <g fill={logotypeColor}>\n <path d=\"M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z\" />\n </g>\n );\n};\n\n// viewBox sizes differ depending on which parts of the logo are visible\nconst computedViewBox = (iconOnly: boolean) => {\n if (iconOnly) {\n return '0 0 34.4 26.78';\n }\n\n return '0 0 144 31.47';\n};\n\nconst WistiaLogoComponent = styled.svg<{\n height: number;\n $hoverColor: string | undefined;\n}>`\n height: ${({ height }) => `${height}px`};\n\n /* ensure it will always fit on mobile */\n max-height: 22vw;\n max-width: 100%;\n\n &:hover {\n path {\n ${({ $hoverColor }) => ($hoverColor !== undefined ? `fill: ${$hoverColor}` : null)};\n }\n }\n`;\n\nexport type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {\n /**\n * An optional accessible description for the logo\n */\n description?: string;\n /**\n * Height, in pixels, of the logo\n */\n height?: number;\n /**\n * @ignore\n * Change the color when hovering over the logo\n */\n hoverColor?: string;\n /**\n * Display just the icon portion of the logo (ie. hide `Wistia` text)\n * note: there is no analogue to this because by brand guidelines, the\n * `Wistia` text must not be displayed without the \"flags\" iconography\n */\n iconOnly?: boolean;\n /**\n * If provided, will wrap the logo in a link\n */\n href?: string;\n /**\n * An accessible title for the logo (defaults to \"Wistia Logo\")\n */\n title?: string;\n /**\n * Style of the logo\n */\n variant?: 'dark' | 'light' | 'standard';\n};\n\nexport const WistiaLogo = ({\n description = undefined,\n height = 100,\n hoverColor = undefined,\n href = undefined,\n iconOnly = false,\n title = 'Wistia Logo',\n variant = 'standard',\n ...otherProps\n}: WistiaLogoProps) => {\n // can't use `useThemeColor` since these are not in our color palette yet\n const primaryColor = '#2949e5';\n const darkColor = '#000934';\n const lightColor = '#ffffff';\n\n const VARIANT_COLORS = {\n standard: {\n brandmark: primaryColor,\n logotype: darkColor,\n },\n dark: {\n brandmark: darkColor,\n logotype: darkColor,\n },\n light: {\n brandmark: lightColor,\n logotype: lightColor,\n },\n };\n const brandmarkColor = VARIANT_COLORS[variant].brandmark;\n const logotypeColor = VARIANT_COLORS[variant].logotype;\n\n const Logo = (\n <WistiaLogoComponent\n $hoverColor={hoverColor}\n height={height}\n role=\"img\"\n viewBox={computedViewBox(iconOnly)}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...otherProps}\n >\n <title>{title}</title>\n {isNotNil(description) ? <desc>{description}</desc> : null}\n {renderBrandmark(brandmarkColor, iconOnly)}\n {renderLogotype(logotypeColor, iconOnly)}\n </WistiaLogoComponent>\n );\n\n // wrap logo in a link if href prop is present\n return href !== undefined ? <a href={href}>{Logo}</a> : Logo;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;AAAA;AAAA;AAAA;AAAA;AAAA,QAQjC,CAAC,EAAE,YAAY,MAAO,gBAAgB,SAAY,SAAS,WAAW,KAAK,IAAK;AAAA;AAAA;AAAA;AAuCjF,IAAM,aAAa,CAAC;AAAA,EACzB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,aAAa;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,GAAG;AACL,MAAuB;AAErB,QAAM,eAAe;AACrB,QAAM,YAAY;AAClB,QAAM,aAAa;AAEnB,QAAM,iBAAiB;AAAA,IACrB,UAAU;AAAA,MACR,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,MACL,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AACA,QAAM,iBAAiB,eAAe,OAAO,EAAE;AAC/C,QAAM,gBAAgB,eAAe,OAAO,EAAE;AAE9C,QAAM,OACJ;AAAA,IAAC;AAAA;AAAA,MACC,aAAa;AAAA,MACb;AAAA,MACA,MAAK;AAAA,MACL,SAAS,gBAAgB,QAAQ;AAAA,MACjC,OAAM;AAAA,MACL,GAAG;AAAA,MAEJ;AAAA,uDAAC,WAAO,iBAAM;AAAA,YACb,+BAAS,WAAW,IAAI,+CAAC,UAAM,uBAAY,IAAU;AAAA,QACrD,gBAAgB,gBAAgB,QAAQ;AAAA,QACxC,eAAe,eAAe,QAAQ;AAAA;AAAA;AAAA,EACzC;AAIF,SAAO,SAAS,SAAY,+CAAC,OAAE,MAAa,gBAAK,IAAO;AAC1D;AAEA,WAAW,cAAc;","names":["Image","ModalCloseButton","differenceInDays","import_type_guards","hashCode","theme","keys","import_react_aria_live","import_react","import_styled_components","theme","import_react","import_react","import_react_aria_live","import_styled_components","import_type_guards","import_react","import_styled_components","useStyledComponentsTheme","import_react","theme","import_jsx_runtime","theme","import_react","import_type_guards","import_styled_components","import_type_guards","import_type_guards","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","theme","iconSizeMap","import_styled_components","import_polished","theme","import_type_guards","import_jsx_runtime","import_jsx_runtime","theme","timeout","import_react","import_jsx_runtime","timeout","import_react","import_type_guards","import_react","import_jsx_runtime","import_styled_components","import_styled_components","import_styled_components","theme","import_jsx_runtime","theme","Link","import_react","import_react","import_react","timeout","timeout","import_react","import_react","import_react","import_type_guards","focusElement","import_react","import_react","import_react","import_react","import_react","import_react","import_react","import_react","import_react","import_styled_components","import_type_guards","import_react","import_react_dom","import_styled_components","import_type_guards","import_react","import_type_guards","import_jsx_runtime","import_jsx_runtime","GlobalStyle","isEqual","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_react","import_styled_components","import_type_guards","import_styled_components","import_jsx_runtime","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","import_react","import_styled_components","import_polished","import_type_guards","import_styled_components","import_type_guards","import_jsx_runtime","import_react","import_styled_components","import_type_guards","import_styled_components","import_jsx_runtime","theme","shouldWrap","import_type_guards","import_jsx_runtime","import_jsx_runtime","shouldWrap","handleFocus","handleBlur","import_jsx_runtime","theme","Button","import_jsx_runtime","import_styled_components","import_jsx_runtime","theme","import_react","import_type_guards","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_jsx_runtime","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_styled_components","import_jsx_runtime","theme","Body","import_jsx_runtime","theme","Body","import_react","import_styled_components","import_type_guards","import_jsx_runtime","import_react","import_styled_components","import_type_guards","import_styled_components","import_react","import_styled_components","import_polished","primaryHoverStyle","theme","primaryStyle","secondaryHoverStyle","secondaryStyle","disabledStyle","import_jsx_runtime","keys","import_jsx_runtime","import_react","import_type_guards","import_styled_components","theme","disabledStyle","import_jsx_runtime","import_styled_components","import_type_guards","import_styled_components","import_styled_components","import_jsx_runtime","disabledStyle","theme","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","disabledStyle","theme","import_jsx_runtime","import_jsx_runtime","theme","import_react","import_styled_components","import_jsx_runtime","import_styled_components","import_jsx_runtime","CloseIcon","import_jsx_runtime","Button","theme","CloseIcon","import_react","import_styled_components","import_polished","import_type_guards","import_jsx_runtime","TRANSITION_TIME","theme","open","import_styled_components","import_jsx_runtime","import_react","import_styled_components","import_jsx_runtime","import_react","import_formik","import_type_guards","import_react","import_formik","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_react","import_react","import_react","timeout","timeout","import_jsx_runtime","isValid","FormikForm","import_formik","import_jsx_runtime","import_jsx_runtime","import_react","import_styled_components","import_formik","import_type_guards","import_jsx_runtime","import_type_guards","import_jsx_runtime","Element","import_type_guards","import_react","import_styled_components","import_type_guards","import_styled_components","theme","errorStyle","disabledStyle","import_react","import_styled_components","import_type_guards","import_polished","import_jsx_runtime","theme","InputStyledComponent","import_type_guards","import_jsx_runtime","theme","import_jsx_runtime","handleBlur","import_react","import_styled_components","import_type_guards","import_react","import_type_guards","import_jsx_runtime","import_jsx_runtime","StyledOptionContainer","theme","import_jsx_runtime","import_type_guards","import_react","import_styled_components","import_type_guards","import_styled_components","focusStyle","theme","disabledStyle","errorStyle","import_jsx_runtime","theme","renderIcon","import_jsx_runtime","import_react","import_type_guards","import_jsx_runtime","import_react","import_styled_components","import_type_guards","import_react","import_styled_components","import_slate_react","import_slate","import_type_guards","import_react_fast_compare","import_type_guards","import_type_guards","import_jsx_runtime","import_styled_components","import_jsx_runtime","theme","Element","import_slate_react","import_styled_components","import_slate","import_type_guards","import_slate","import_type_guards","import_slate","import_type_guards","SlateEditor","emptyTextNode","import_slate","import_type_guards","import_slate","import_type_guards","iconMap","icons_exports","Image","Link","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","Image","import_jsx_runtime","import_jsx_runtime","Link","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","iconSizeMap","Icon","iconMap","icons_exports","import_jsx_runtime","theme","Icon","import_jsx_runtime","theme","emptyTextNode","Element","isEqual","import_jsx_runtime","Wrapper","theme","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_jsx_runtime","CloseButton","theme","CloseIcon","import_styled_components","import_jsx_runtime","getFillStyle","Image","import_styled_components","import_type_guards","import_jsx_runtime","theme","Label","import_react","import_styled_components","import_type_guards","import_jsx_runtime","import_type_guards","import_styled_components","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_jsx_runtime","theme","import_react_dropdown_menu","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_react_dropdown_menu","import_type_guards","import_styled_components","import_polished","import_jsx_runtime","hoverDarken","theme","IconContainer","import_styled_components","import_react_dropdown_menu","import_jsx_runtime","import_react","import_styled_components","import_react_dropdown_menu","import_jsx_runtime","theme","import_react","import_type_guards","import_styled_components","import_react","import_styled_components","import_polished","import_type_guards","import_jsx_runtime","theme","dangerousMenuItemStyles","MenuItem","Menu","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_jsx_runtime","MenuComponent","Menu","theme","import_react","import_styled_components","import_type_guards","import_react_dom","import_styled_components","theme","import_type_guards","import_react","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","ModalCloseButton","import_styled_components","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","import_react","import_styled_components","import_date_fns","import_react","import_type_guards","import_styled_components","import_throttle_debounce","import_date_fns","import_styled_components","import_date_fns","import_type_guards","import_jsx_runtime","theme","memo","import_jsx_runtime","theme","import_react","import_styled_components","import_date_fns","import_type_guards","import_styled_components","import_jsx_runtime","theme","import_date_fns","import_type_guards","dateOnlyStringNumeric","import_react_fast_compare","import_date_fns","import_type_guards","isValidRange","dateOnlyStringNumeric","import_type_guards","defaultValue","merge","isEqual","import_jsx_runtime","Input","theme","isValidRange","import_jsx_runtime","TooltipWrapper","theme","Label","import_styled_components","import_type_guards","import_jsx_runtime","theme","ReactSlider","import_react","import_styled_components","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_jsx_runtime","theme","IconContainer","import_styled_components","import_type_guards","import_jsx_runtime","theme","CollageImage","import_styled_components","import_type_guards","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/helpers/copyToClipboard/copyToClipboard.ts","../src/helpers/datetimeHelpers/datetimeHelpers.ts","../src/helpers/datetimeHelpers/index.ts","../src/helpers/getBackgroundGradient/getBackgroundGradient.ts","../src/helpers/getBackgroundGradient/getSemiRandomBackgroundGradient.ts","../src/helpers/mq/mq.ts","../src/helpers/objectHelpers/isObject.ts","../src/helpers/objectHelpers/deepFreeze.ts","../src/helpers/objectHelpers/merge.ts","../src/helpers/objectHelpers/selectKeys.ts","../src/helpers/objectHelpers/index.ts","../src/helpers/stringHelpers/camelCase.ts","../src/helpers/stringHelpers/coerceToBoolean.ts","../src/helpers/stringHelpers/coerceToString.ts","../src/helpers/stringHelpers/isString.ts","../src/helpers/stringHelpers/isHttpUrl.ts","../src/helpers/stringHelpers/isUrl.ts","../src/helpers/stringHelpers/lowerFirst.ts","../src/helpers/stringHelpers/removeNewlines.ts","../src/helpers/stringHelpers/stripExtension.ts","../src/helpers/stringHelpers/truncate.ts","../src/helpers/stringHelpers/upperFirst.ts","../src/helpers/stringHelpers/index.ts","../src/providers/VHSProvider.tsx","../src/providers/VHSThemeProvider.tsx","../../vhs-design-tokens/dist/js/designTokens.js","../src/theme.ts","../src/providers/WrapperProvider.tsx","../src/components/Toast/ToastProvider.tsx","../src/components/Toast/Toast.tsx","../src/components/Toast/ToastAnimation.tsx","../src/hooks/useTheme/useTheme.ts","../src/hooks/useWindowSize/useWindowSize.ts","../src/private/helpers/isClient/isClient.ts","../src/hooks/useMq/useMq.ts","../src/hooks/useThemeColor/useThemeColor.ts","../src/components/Button/Button.tsx","../src/components/Button/ButtonContent.tsx","../src/components/Icon/Icon.tsx","../src/components/Icon/iconMap.ts","../src/components/Icon/icons/index.ts","../src/components/Icon/icons/AbTestIcon.tsx","../src/components/Icon/icons/AllContentIcon.tsx","../src/components/Icon/icons/ArchivedIcon.tsx","../src/components/Icon/icons/ArrowDownIcon.tsx","../src/components/Icon/icons/ArrowLeftIcon.tsx","../src/components/Icon/icons/ArrowRightIcon.tsx","../src/components/Icon/icons/ArrowUpIcon.tsx","../src/components/Icon/icons/AsteriskIcon.tsx","../src/components/Icon/icons/AudienceIcon.tsx","../src/components/Icon/icons/CalendarIcon.tsx","../src/components/Icon/icons/CameraIcon.tsx","../src/components/Icon/icons/CaretDownIcon.tsx","../src/components/Icon/icons/CaretLeftIcon.tsx","../src/components/Icon/icons/CaretRightIcon.tsx","../src/components/Icon/icons/CaretUpIcon.tsx","../src/components/Icon/icons/ChannelIcon.tsx","../src/components/Icon/icons/CheckmarkCircleIcon.tsx","../src/components/Icon/icons/CheckmarkCircleOutlineIcon.tsx","../src/components/Icon/icons/CheckmarkCircleThreeQuartersIcon.tsx","../src/components/Icon/icons/CheckmarkIcon.tsx","../src/components/Icon/icons/CheckmarkUnderlinedIcon.tsx","../src/components/Icon/icons/CloseCircleIcon.tsx","../src/components/Icon/icons/CloseIcon.tsx","../src/components/Icon/icons/CollectVideoIcon.tsx","../src/components/Icon/icons/CommentIcon.tsx","../src/components/Icon/icons/CommunityIcon.tsx","../src/components/Icon/icons/ContactUsIcon.tsx","../src/components/Icon/icons/CopyDisabledIcon.tsx","../src/components/Icon/icons/CopyIcon.tsx","../src/components/Icon/icons/CreateIcon.tsx","../src/components/Icon/icons/DeleteIcon.tsx","../src/components/Icon/icons/DeleteSmIcon.tsx","../src/components/Icon/icons/DottieClockIcon.tsx","../src/components/Icon/icons/DownloadIcon.tsx","../src/components/Icon/icons/DraggableIcon.tsx","../src/components/Icon/icons/EllipsisIcon.tsx","../src/components/Icon/icons/EllipsisVerticalIcon.tsx","../src/components/Icon/icons/EmbedIcon.tsx","../src/components/Icon/icons/EpisodesIcon.tsx","../src/components/Icon/icons/ExpandIcon.tsx","../src/components/Icon/icons/FavoriteIcon.tsx","../src/components/Icon/icons/FavoriteOutlineIcon.tsx","../src/components/Icon/icons/FilterIcon.tsx","../src/components/Icon/icons/GearIcon.tsx","../src/components/Icon/icons/GettingStartedIcon.tsx","../src/components/Icon/icons/GlobeIcon.tsx","../src/components/Icon/icons/GridViewIcon.tsx","../src/components/Icon/icons/HamburgerIcon.tsx","../src/components/Icon/icons/HazardIcon.tsx","../src/components/Icon/icons/HelpCenterIcon.tsx","../src/components/Icon/icons/HideIcon.tsx","../src/components/Icon/icons/HomeIcon.tsx","../src/components/Icon/icons/HourglassIcon.tsx","../src/components/Icon/icons/ImportIcon.tsx","../src/components/Icon/icons/InfoIcon.tsx","../src/components/Icon/icons/IntegrationsIcon.tsx","../src/components/Icon/icons/InviteIcon.tsx","../src/components/Icon/icons/LightningBoltIcon.tsx","../src/components/Icon/icons/LinkIcon.tsx","../src/components/Icon/icons/ListViewIcon.tsx","../src/components/Icon/icons/LiveIcon.tsx","../src/components/Icon/icons/LockIcon.tsx","../src/components/Icon/icons/LogoutIcon.tsx","../src/components/Icon/icons/MediaIcon.tsx","../src/components/Icon/icons/MegaphoneIcon.tsx","../src/components/Icon/icons/MoreOptionsIcon.tsx","../src/components/Icon/icons/OpenNewIcon.tsx","../src/components/Icon/icons/OverviewIcon.tsx","../src/components/Icon/icons/PaintIcon.tsx","../src/components/Icon/icons/PencilIcon.tsx","../src/components/Icon/icons/PlayIcon.tsx","../src/components/Icon/icons/PodcastIcon.tsx","../src/components/Icon/icons/PreviewIcon.tsx","../src/components/Icon/icons/PrivateUserSessionsIcon.tsx","../src/components/Icon/icons/ProjectIcon.tsx","../src/components/Icon/icons/QuestionMarkIcon.tsx","../src/components/Icon/icons/ReactIcon.tsx","../src/components/Icon/icons/RecordIcon.tsx","../src/components/Icon/icons/RedoIcon.tsx","../src/components/Icon/icons/RemoveFromChannelIcon.tsx","../src/components/Icon/icons/ReplaceIcon.tsx","../src/components/Icon/icons/ReplyIcon.tsx","../src/components/Icon/icons/ScissorsIcon.tsx","../src/components/Icon/icons/SearchIcon.tsx","../src/components/Icon/icons/SendIcon.tsx","../src/components/Icon/icons/SettingsIcon.tsx","../src/components/Icon/icons/ShareIcon.tsx","../src/components/Icon/icons/SoapboxIcon.tsx","../src/components/Icon/icons/SortIcon.tsx","../src/components/Icon/icons/SparkleIcon.tsx","../src/components/Icon/icons/SpinnerIcon.tsx","../src/components/Icon/icons/StatsIcon.tsx","../src/components/Icon/icons/SwitchAccountsIcon.tsx","../src/components/Icon/icons/TagIcon.tsx","../src/components/Icon/icons/TeamIcon.tsx","../src/components/Icon/icons/ThumbsDownIcon.tsx","../src/components/Icon/icons/ThumbsUpIcon.tsx","../src/components/Icon/icons/TriangleIcon.tsx","../src/components/Icon/icons/UndoIcon.tsx","../src/components/Icon/icons/UnlockIcon.tsx","../src/components/Icon/icons/UploadIcon.tsx","../src/components/Icon/icons/UsersPermissionsIcon.tsx","../src/components/Icon/icons/ViewStreamIcon.tsx","../src/components/Icon/icons/WandIcon.tsx","../src/components/Icon/icons/ZoomInIcon.tsx","../src/components/Icon/icons/ZoomOutIcon.tsx","../src/components/Icon/icons/GroupRecordIcon.tsx","../src/components/Icon/icons/InviteToRecordIcon.tsx","../src/components/Icon/icons/CollectionIcon.tsx","../src/components/Icon/icons/PlaylistIcon.tsx","../src/components/Button/ButtonStyledComponent.tsx","../src/components/Button/getButtonColor.ts","../src/private/helpers/isServer/isServer.ts","../src/components/Toast/ToastContext.tsx","../src/components/ModalBase/ModalProvider.tsx","../src/components/ModalBase/ModalProviderContext.tsx","../src/css/GlobalStyle.tsx","../src/css/normalize.tsx","../src/css/baseline.tsx","../src/hooks/useBoolean/useBoolean.ts","../src/hooks/useClipboard/useClipboard.ts","../src/private/hooks/useTimedToggle/useTimedToggle.ts","../src/hooks/useElementObserver/useElementObserver.ts","../src/hooks/useEvent/useEvent.ts","../src/hooks/useFocusTrap/useFocusTrap.ts","../src/hooks/useFocusTrap/helpers.ts","../src/hooks/useForceUpdate/useForceUpdate.ts","../src/hooks/useFormikContext/index.ts","../src/hooks/useIsHovered/useIsHovered.ts","../src/hooks/useKey/useKey.ts","../src/hooks/useKeyPress/useKeyPress.ts","../src/private/hooks/useUpdateEffect/useUpdateEffect.ts","../src/hooks/useKeyPressOnce/useKeyPressOnce.ts","../src/hooks/useLocalStorage/useLocalStorage.ts","../src/hooks/useMergedRefs/useMergedRefs.ts","../src/hooks/useOnClickOutside/useOnClickOutside.ts","../src/hooks/usePreventScroll/usePreventScroll.ts","../src/hooks/usePreviousValue/usePreviousValue.ts","../src/components/ActionModal/ActionModal.tsx","../src/components/ModalBase/ModalBase.tsx","../src/private/components/ModalAnimation/ModalAnimation.tsx","../src/components/ButtonGroup/ButtonGroup.tsx","../src/components/Text/Text.tsx","../src/components/Ellipsis/Ellipsis.tsx","../src/components/Backdrop/Backdrop.tsx","../src/components/IconButton/IconButton.tsx","../src/components/ScreenReaderOnly/ScreenReaderOnly.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/Tooltip/TooltipContent.tsx","../src/components/Truncate/Truncate.tsx","../src/private/components/ModalCloseButton/ModalCloseButton.tsx","../src/components/ActionModal/getModalBackgroundGradient.ts","../src/components/Avatar/Avatar.tsx","../src/components/Avatar/generateContactAvatarColors.tsx","../src/components/Avatar/formatInitialsForDisplay.tsx","../src/components/BackgroundImage/BackgroundImage.tsx","../src/components/Badge/Badge.tsx","../src/components/Badge/getBadgeColors.ts","../src/components/Banner/Banner.tsx","../src/components/Banner/BannerChildComponents.tsx","../src/components/Box/Box.tsx","../src/components/ButtonLink/ButtonLink.tsx","../src/components/Link/Link.tsx","../src/components/Link/linkStyle.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Checkbox/OptionStyledComponent.tsx","../src/components/CheckboxGroup/CheckboxGroup.tsx","../src/private/components/FormFieldWrapper/FormFieldWrapper.tsx","../src/components/Label/Label.tsx","../src/components/FormFieldError/FormFieldError.tsx","../src/components/LabelDescription/LabelDescription.tsx","../src/components/ClickArea/ClickArea.tsx","../src/components/CloseButton/CloseButton.tsx","../src/components/CloseButton/CloseIcon.tsx","../src/components/CollapsibleGroup/CollapsibleGroup.tsx","../src/components/Divider/Divider.tsx","../src/components/FileSelect/FileSelect.tsx","../src/components/Form/Form.tsx","../src/components/FormGlobalError/FormGlobalError.tsx","../src/components/Toast/useToast.ts","../src/private/hooks/useDebounce/useDebounce.ts","../src/private/hooks/useTimeoutFunc/useTimeoutFunc.ts","../src/components/FormButtons/FormButtons.tsx","../src/private/components/FormConnectorButton/FormConnectorButton.tsx","../src/components/FormField/FormField.tsx","../src/components/FormField/inputTypeMap.ts","../src/private/components/FormConnectorCheckboxGroup/FormConnectorCheckboxGroup.tsx","../src/private/components/FormConnectorCustomField/FormConnectorCustomField.tsx","../src/private/components/FormConnectorInput/FormConnectorInput.tsx","../src/components/Input/Input.tsx","../src/components/Input/InputStyledComponent.tsx","../src/components/Input/ClickToCopy.tsx","../src/components/Input/timePositionUtils.ts","../src/private/components/FormConnectorRadioGroup/FormConnectorRadioGroup.tsx","../src/components/RadioGroup/RadioGroup.tsx","../src/components/Radio/Radio.tsx","../src/private/components/FormConnectorSelect/FormConnectorSelect.tsx","../src/components/Select/Select.tsx","../src/components/Select/SelectStyledComponent.tsx","../src/private/components/FormConnectorHidden/FormConnectorHidden.tsx","../src/private/components/FormConnectorRichTextEditor/FormConnectorRichTextEditor.tsx","../src/components/RichTextEditor/RichTextEditor.tsx","../src/components/RichTextEditor/serializers.ts","../src/private/helpers/escapeHtml/escapeHtml.ts","../src/components/RichTextEditor/Leaf.tsx","../src/components/RichTextEditor/Element.tsx","../src/components/RichTextEditor/EditorButtons.tsx","../src/components/RichTextEditor/utilities/withImagesPlugin.ts","../src/components/RichTextEditor/utilities/toggle.ts","../src/components/RichTextEditor/utilities/withLinksPlugin.ts","../src/components/RichTextEditor/utilities/handleListEscape.ts","../src/components/RichTextEditor/utilities/rteFormatTypes.ts","../src/private/components/Icon/Icon.tsx","../src/private/components/Icon/iconMap.ts","../src/private/components/Icon/icons/index.ts","../src/private/components/Icon/icons/BlockQuote.tsx","../src/private/components/Icon/icons/Bold.tsx","../src/private/components/Icon/icons/BulletedList.tsx","../src/private/components/Icon/icons/Heading.tsx","../src/private/components/Icon/icons/HeadingTwo.tsx","../src/private/components/Icon/icons/Image.tsx","../src/private/components/Icon/icons/Italic.tsx","../src/private/components/Icon/icons/Link.tsx","../src/private/components/Icon/icons/NumberedList.tsx","../src/private/components/Icon/icons/Strikethrough.tsx","../src/private/components/Icon/icons/Underline.tsx","../src/components/FullScreenModal/FullScreenModal.tsx","../src/components/Image/Image.tsx","../src/components/KeyboardShortcut/KeyboardShortcut.tsx","../src/components/LinkButton/LinkButton.tsx","../src/components/List/List.tsx","../src/components/List/ListItem.tsx","../src/components/Menu/index.ts","../src/components/Menu/Menu.tsx","../src/components/Menu/MenuItem.tsx","../src/components/Menu/MenuLabel.tsx","../src/components/Menu/SubMenu.tsx","../src/components/MenuButton/MenuButton.tsx","../src/private/components/Menu/Menu.tsx","../src/components/MenuButton/MenuHeader.tsx","../src/components/Modal/Modal.tsx","../src/components/Modal/Dialog.tsx","../src/components/Modal/ModalCloseContext.tsx","../src/components/Modal/ModalParts.tsx","../src/components/Paper/Paper.tsx","../src/components/ProgressBar/ProgressBar.tsx","../src/components/RangeSelector/RangeSelector.tsx","../src/private/components/RangeSelectorCalendar/RangeSelectorCalendar.tsx","../src/private/components/Calendar/Calendar.tsx","../src/private/components/RangeSelectorInput/RangeSelectorInput.tsx","../src/private/components/RangeSelectorInput/ErrorMessages.tsx","../src/private/components/RangeSelectorInput/constants.ts","../src/private/components/RangeSelectorInput/eventTypes.ts","../src/private/components/RangeSelectorInput/conversions.ts","../src/private/components/RangeSelectorInput/iterators.ts","../src/private/components/RangeSelectorInput/utils.ts","../src/private/components/RangeSelectorInput/selection.ts","../src/components/Slider/Slider.tsx","../src/components/Stack/Stack.tsx","../src/components/Switch/Switch.tsx","../src/components/Thumbnail/Thumbnail.tsx","../src/components/ThumbnailCollage/ThumbnailCollage.tsx","../src/components/WistiaLogo/WistiaLogo.tsx"],"sourcesContent":["// types\nexport type { VHSTheme } from './@types/vhs-theme';\n\n// helpers\nexport * from './helpers/copyToClipboard';\nexport * from './helpers/datetimeHelpers';\nexport * from './helpers/getBackgroundGradient';\nexport * from './helpers/getBackgroundGradient/getSemiRandomBackgroundGradient';\nexport * from './helpers/mq';\nexport * from './helpers/objectHelpers';\nexport * from './helpers/stringHelpers';\n\n// providers\nexport * from './providers/VHSProvider';\n\n// hooks\nexport * from './hooks/useBoolean';\nexport * from './hooks/useClipboard';\nexport * from './hooks/useElementObserver';\nexport * from './hooks/useEvent';\nexport * from './hooks/useFocusTrap';\nexport * from './hooks/useForceUpdate';\nexport * from './hooks/useFormikContext';\nexport * from './hooks/useIsHovered';\nexport * from './hooks/useKey';\nexport * from './hooks/useKeyPress';\nexport * from './hooks/useKeyPressOnce';\nexport * from './hooks/useLocalStorage';\nexport * from './hooks/useMergedRefs';\nexport * from './hooks/useMq';\nexport * from './hooks/useOnClickOutside';\nexport * from './hooks/usePreventScroll';\nexport * from './hooks/usePreviousValue';\nexport * from './hooks/useTheme';\nexport * from './hooks/useThemeColor';\nexport * from './hooks/useWindowSize';\n\n// components\nexport * from './components/ActionModal';\nexport * from './components/Avatar';\nexport * from './components/Backdrop';\nexport * from './components/BackgroundImage';\nexport * from './components/Badge';\nexport * from './components/Banner';\nexport * from './components/Box';\nexport * from './components/Button';\nexport * from './components/ButtonGroup';\nexport * from './components/ButtonLink';\nexport * from './components/Checkbox';\nexport * from './components/CheckboxGroup';\nexport * from './components/ClickArea';\nexport * from './components/CloseButton';\nexport * from './components/CollapsibleGroup';\nexport * from './components/Divider';\nexport * from './components/Ellipsis';\nexport * from './components/FileSelect';\nexport * from './components/Form';\nexport * from './components/FormButtons';\nexport * from './components/FormField';\nexport * from './components/FormFieldError';\nexport * from './components/FormGlobalError';\nexport * from './components/FullScreenModal';\nexport * from './components/Icon';\nexport * from './components/IconButton';\nexport * from './components/Image';\nexport * from './components/Input';\nexport * from './components/KeyboardShortcut';\nexport * from './components/Label';\nexport * from './components/LabelDescription';\nexport * from './components/Link';\nexport * from './components/LinkButton';\nexport * from './components/List';\nexport * from './components/Menu';\nexport * from './components/MenuButton';\nexport * from './components/Modal';\nexport * from './components/ModalBase';\nexport * from './components/Paper';\nexport * from './components/ProgressBar';\nexport * from './components/Radio';\nexport * from './components/RadioGroup';\nexport * from './components/RangeSelector';\nexport * from './components/RichTextEditor';\nexport * from './components/ScreenReaderOnly';\nexport * from './components/Select';\nexport * from './components/Slider';\nexport * from './components/Stack';\nexport * from './components/Switch';\nexport * from './components/Text';\nexport * from './components/Thumbnail';\nexport * from './components/ThumbnailCollage';\nexport * from './components/Toast';\nexport * from './components/Tooltip';\nexport * from './components/Truncate';\nexport * from './components/WistiaLogo';\n","/**\n * Copies a string to user's clipboard for easy pasting in another location\n *\n * @param {string} textToCopy - the string that will be copied to users clipboard\n * @returns {Promise} - Promise object that represents the copied string\n */\nexport const copyToClipboard = async (textToCopy: string): Promise<void> => {\n // use Clipboard API if available (https required)\n // https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API\n if (navigator.clipboard as Clipboard | undefined) {\n return navigator.clipboard.writeText(textToCopy).catch((error: unknown) => {\n if (error instanceof Error) {\n throw error;\n }\n throw new DOMException('The clipboard is not accessible', 'NotAllowedError');\n });\n }\n\n // document.execCommand() fallback\n\n // add the text to copy to a <span />\n const span = document.createElement('span');\n span.textContent = textToCopy;\n\n // preserve consecutive spaces and newlines\n span.style.whiteSpace = 'pre';\n\n // add the <span /> to the document\n document.body.appendChild(span);\n\n // make a selection object representing the range of text selected by the user\n const selection = window.getSelection();\n const range = window.document.createRange();\n selection?.removeAllRanges();\n range.selectNode(span);\n selection?.addRange(range);\n\n // copy text to the clipboard\n let success = false;\n try {\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- execCommand is deprecated but this is the fallback codepath\n success = window.document.execCommand('copy');\n } catch (error: unknown) {\n console.error('error', error); // eslint-disable-line no-console\n }\n\n // cleanup\n selection?.removeAllRanges();\n window.document.body.removeChild(span);\n\n if (success) {\n return Promise.resolve();\n }\n return Promise.reject(new DOMException('The request is not allowed', 'NotAllowedError'));\n};\n","import { isNil } from '@wistia/type-guards';\nimport { differenceInCalendarDays } from 'date-fns';\nimport { daysInWeek } from 'date-fns/constants';\n\ntype DateOnlyStringOptions = {\n timeZone?: string;\n omitYear?: boolean;\n};\n\ntype TimeAgoOptions = {\n nowAnchor?: Date;\n includeTime?: boolean;\n};\n\ntype Duration = {\n seconds: number;\n minutes: number;\n hours: number;\n};\n\ntype WistiaDateTimeObject = {\n minutes: number;\n hours: number;\n dayOfMonth: number;\n year: number;\n month: number;\n};\n\nconst milisecondsInSecond = 1000;\nconst secondsInMinute = 60;\nconst minutesInHour = 60;\nconst halfAnHourInMinutes = 30;\nconst defaultLocales = ['en-US'];\nconst defaultTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC';\n\n/**\n * @param {number} num - pads integer with leading zero\n * @returns {string} - integer with padding as string\n */\nconst padTimeInteger = (num: number): string => num.toString().padStart(2, '0');\n\n/**\n * @param {*} date - possible date value - unknown type\n * @returns {boolean} - whether it is a date object\n */\nexport const isDate = (date: unknown): date is Date => date instanceof Date;\n\n/**\n * @param {*} date - a Date object - could be unknown though\n * @returns {boolean} - whether it's a valid date\n */\nconst isInvalidDate = (date: unknown): boolean => !isDate(date) || date.getTime() === 0;\n\n/**\n * Converts a Date object into a date only string.\n *\n * e.g. Jun 3, 2021\n * @param {*} date a Date object you want to convert into a string - gracefully handles any input\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyString = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n dateStyle: 'medium',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date only string formatted numerically.\n *\n * e.g. 06/03/2021\n * @param {*} date a Date object you want to convert into a string - gracefully handles any input\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyStringNumeric = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date only string formatted to ISO8601.\n *\n * e.g. 2021-06-03\n * @param {*} date a Date object you want to convert into a string - gracefully handles any input\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyISOString = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n const formatter = new Intl.DateTimeFormat(defaultLocales, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n timeZone,\n });\n const parts = formatter.formatToParts(date);\n const partsAsObject = parts.reduce(\n (map: Partial<Record<Intl.DateTimeFormatPartTypes, string>>, obj) => {\n // eslint-disable-next-line no-param-reassign\n map[obj.type] = obj.value;\n return map;\n },\n {},\n ) as Record<Intl.DateTimeFormatPartTypes, string>;\n return `${partsAsObject.year}-${partsAsObject.month}-${partsAsObject.day}`;\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a month and day string formatted numerically.\n *\n * e.g. 06/03/2021\n * @param {*} date a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const monthDayStringNumeric = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n month: '2-digit',\n day: '2-digit',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a month and day string formatted numerically.\n *\n * e.g. Thursday\n * @param {Date} date a Date object you want to convert into a string\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dayOfWeekString = (\n date: Date | null,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (date === null) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n weekday: 'long',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a time only string.\n *\n * e.g. 7:30 AM\n * @param {*} date a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const timeOnlyString = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n timeStyle: 'short',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date and time string.\n *\n * e.g. Jun 3, 2021, 11:52 AM\n *\n * NOTE: you should probably use timeAgoString when trying to display\n * an updated/created timestamp.\n *\n * @param {*} date - a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateTimeString = (\n date: Date | number | string | null | undefined,\n { timeZone = defaultTimeZone, omitYear = false }: DateOnlyStringOptions = {},\n): string => {\n if (isNil(date)) {\n return '';\n }\n\n const formattedDate = new Date(date);\n\n if (isInvalidDate(formattedDate)) {\n return '';\n }\n\n try {\n const baseOptions: Intl.DateTimeFormatOptions = {\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n };\n\n const options = omitYear ? baseOptions : { ...baseOptions, year: 'numeric' };\n\n return formattedDate.toLocaleDateString(defaultLocales, options as Intl.DateTimeFormatOptions);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date and time string\n * for use in a sentence.\n *\n * e.g. June 3, 2021, 11:52 AM\n *\n * NOTE: you should probably use timeAgoString when trying to display\n * an updated/created timestamp.\n *\n * @param {*} date - a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateTimeStringForSentence = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n const { year, month, day, hour, minute, dayPeriod } = new Intl.DateTimeFormat(defaultLocales, {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZone,\n })\n .formatToParts(date)\n .reduce<Partial<Record<Intl.DateTimeFormatPartTypes, string>>>((acc, part) => {\n if (part.type !== 'literal') {\n acc[part.type] = part.value;\n }\n return acc;\n }, {}) as Record<Intl.DateTimeFormatPartTypes, string>;\n return `${month} ${day}, ${year}, ${hour}:${minute} ${dayPeriod}`;\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Converts a Date object into a date only string\n * for use in a sentence.\n *\n * e.g. June 3, 2021\n *\n * @param {*} date - a Date object you want to convert into a string - gracefully handles any value\n * @param {object} options -\n * @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone\n * @returns {string} a formatted date string\n */\nexport const dateOnlyStringForSentence = (\n date: unknown,\n { timeZone = defaultTimeZone }: DateOnlyStringOptions = {},\n): string => {\n if (!isDate(date) || isInvalidDate(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(defaultLocales, {\n dateStyle: 'long',\n timeZone,\n }).format(date);\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n return ''; // handle bad input\n }\n};\n\n/**\n * Shows time ago relative to current time.\n *\n * examples:\n *\n * < 1 minute ago\n *\n * 33 minutes ago\n *\n * Today, 3:30 PM\n *\n * Yesterday, 6:22 AM\n *\n * Nov 11, 11:32 AM\n *\n * Feb 23, 2020, 1:55 PM\n *\n * or when `includeTime` is false:\n *\n * Today\n *\n * Yesterday\n *\n * on Thursday\n *\n * Nov 11\n *\n * Feb 23, 2020\n *\n * NOTE: timeAgoString doesn't support multiple time zones since doing so would\n * complicate calculations for whether to use \"Today\" or \"Yesterday\".\n * @param {Date} date - the date relative to now\n * @param {object} options -\n * @param {Date} options.nowAnchor - The date used to calculate relative to now. Defaults to current date but can be overwritten for tests.\n * @param {boolean} options.includeTime - Whether to include the time in the output. Defaults to true.\n * @returns {string} - a string representation of the date.\n */\nexport const timeAgoString = (\n date: Date,\n { nowAnchor = new Date(), includeTime = true }: TimeAgoOptions = {},\n): string => {\n if (isInvalidDate(date)) {\n return '';\n }\n\n const minutesAgo =\n (nowAnchor.valueOf() - date.valueOf()) / (secondsInMinute * milisecondsInSecond);\n const minutesAgoRounded = Math.round(minutesAgo);\n const differenceInDays = differenceInCalendarDays(nowAnchor, date);\n const isSameYear = date.getFullYear() === nowAnchor.getFullYear();\n\n // handle edge case where date is in future\n if (minutesAgo < 0) {\n return dateTimeString(date);\n }\n\n if (minutesAgo < 1) {\n return '< 1 minute ago';\n }\n\n if (minutesAgoRounded < 2) {\n return '1 minute ago';\n }\n\n if (minutesAgoRounded <= minutesInHour) {\n return `${minutesAgoRounded} minutes ago`;\n }\n if (differenceInDays === 0) {\n return includeTime\n ? `Today, ${Intl.DateTimeFormat(defaultLocales, { hour: 'numeric', minute: '2-digit' }).format(date)}`\n : 'Today';\n }\n\n if (differenceInDays === 1) {\n return includeTime\n ? `Yesterday, ${Intl.DateTimeFormat(defaultLocales, { hour: 'numeric', minute: '2-digit' }).format(date)}`\n : 'Yesterday';\n }\n\n if (differenceInDays < daysInWeek && !includeTime) {\n return `on ${dayOfWeekString(date)}`;\n }\n\n return includeTime\n ? dateTimeString(date, { omitYear: isSameYear })\n : dateOnlyString(date, { omitYear: isSameYear });\n};\n\n/**\n * Given a date, shows the UTC offset.\n * @param {Date} date a Date object for calculating offset.\n * @returns {string} - string representing the UTC offset\n */\nexport const dateUTCOffset = (date: Date): string => {\n const offsetInHours = (date.getTimezoneOffset() / minutesInHour) * -1;\n const hours = Math.round(offsetInHours);\n const minutes = (offsetInHours - hours) * minutesInHour;\n const prefix = hours >= 0 ? '+' : '';\n const hoursString = `${hours}`.padStart(2, '0');\n const minutesString = `${minutes}`.padStart(2, '0');\n\n return `${prefix}${hoursString}:${minutesString}`;\n};\n\n/**\n * @typedef {Object} Duration\n * @property {number} seconds - number of seconds\n * @property {number} minutes - number of minutes\n * @property {number} hours - number of hours\n */\n/**\n * Returns an object representing the duration in seconds, minutes and hours.\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {Duration} -\n */\nexport const buildTimeDuration = (numberOfMilliseconds: number): Duration => {\n const numberOfSeconds = Math.floor(numberOfMilliseconds / milisecondsInSecond);\n const numberOfMinutes = Math.floor(numberOfSeconds / secondsInMinute);\n const numberOfHours = Math.floor(numberOfMinutes / minutesInHour);\n const seconds = numberOfSeconds - numberOfMinutes * secondsInMinute;\n const minutes = numberOfMinutes - numberOfHours * minutesInHour;\n\n return { seconds, minutes, hours: numberOfHours };\n};\n\n/**\n * A string representation of a duration for a media. Assumes most medias\n * are under an hour so only shows hours if media is over hour.\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {string} - a string representation for duration\n */\nexport const mediaDurationString = (numberOfMilliseconds: number): string => {\n const { hours, minutes, seconds } = buildTimeDuration(numberOfMilliseconds);\n\n if (hours < 1) {\n return `${minutes}:${padTimeInteger(seconds)}`;\n }\n\n return `${hours}:${padTimeInteger(minutes)}:${padTimeInteger(seconds)}`;\n};\n\n/**\n * A string representation of a duration for a user session. Assumes that\n * sessions may or may not be more than an hour. To prevent confusion all\n * times show hours, even those that are less than an hour.\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {string} - a string representation of duration\n */\nexport const sessionDurationString = (numberOfMilliseconds: number): string => {\n const { hours, minutes, seconds } = buildTimeDuration(numberOfMilliseconds);\n\n return `${hours}:${padTimeInteger(minutes)}:${padTimeInteger(seconds)}`;\n};\n\n/**\n * @typedef {Object} WistiaDateTimeObject\n * @property {number} minutes - number of minutes\n * @property {number} hours - number of hours\n * @property {number} dayOfMonth - day of the month\n * @property {number} year - year\n * @property {number} month - month\n */\n/**\n * @param {Date | null | undefined} date - a Date object\n * @returns {WistiaDateTimeObject | null} - replaceMe\n */\nexport const dateToDateTime = (date: Date | null | undefined): WistiaDateTimeObject | null => {\n if (!isDate(date)) {\n return null;\n }\n\n return {\n year: date.getFullYear(),\n month: date.getMonth(),\n dayOfMonth: date.getDate(),\n hours: date.getHours(),\n minutes: date.getMinutes(),\n };\n};\n\n/**\n * @param {Partial<WistiaDateTimeObject> | null} dateTime - a dateTime object\n * @returns {Date | null} - the converted date or null if anything is missing\n */\nexport const dateTimeToDate = (\n dateTime: Partial<WistiaDateTimeObject> | null | undefined,\n): Date | null => {\n const { year, month, dayOfMonth, hours, minutes } = dateTime ?? {};\n\n if (year !== undefined && month !== undefined && dayOfMonth !== undefined) {\n return new Date(year, month, dayOfMonth, hours ?? 0, minutes ?? 0);\n }\n return null;\n};\n\n/**\n * @param {Partial<WistiaDateTimeObject>} dateTime - a dateTime object\n * @returns {string | null} - string with the ISO-8601 string or null\n */\nexport const dateTimeToISO = (dateTime: Partial<WistiaDateTimeObject>): string | null =>\n dateTimeToDate(dateTime)?.toISOString() ?? null;\n\ntype DateTimeRoundedOverload = {\n (dateTime: Date, toISOString?: true): string | null;\n (dateTime: Date, toISOString: false): Date | null;\n};\n\n/**\n * @param {Date} dateTime - a dateTime object\n * @param {boolean} toISOString - whether the return value should be an ISO string\n * @returns {string | Date | null} - string or date depending on if toIsoString is true or false. Could be null if there's an error.\n */\n// @ts-expect-error TS Compiler is having issues with the overload syntax here, but this should provide a good DX.\n\nexport const dateTimeRounded: DateTimeRoundedOverload = (dateTime: Date, toISOString = true) => {\n const first30Min = dateTime.getMinutes() <= halfAnHourInMinutes;\n const hours = first30Min ? dateTime.getHours() : dateTime.getHours() + 1;\n const minutes = first30Min ? halfAnHourInMinutes : 0;\n\n const dateWithTime = {\n ...dateToDateTime(dateTime),\n hours,\n minutes,\n };\n\n if (toISOString) {\n return dateTimeToISO(dateWithTime);\n }\n\n return dateTimeToDate(dateWithTime);\n};\n\n/**\n * Given number of miliseconds, returns the iso8601 string rounded down from\n * number of seconds. Mainly copied from https://github.com/wistia/player-modern/blob/master/src/utilities/iso8601Helper.js#L54\n * but modified to support milliseconds\n *\n * @param {number} numberOfMilliseconds - number of milliseconds\n * @returns {string} an iso8601 string format of duration\n */\nexport const millisecondsToDurationISOString = (numberOfMilliseconds: number): string => {\n const { seconds, minutes, hours } = buildTimeDuration(numberOfMilliseconds);\n\n let string = 'PT';\n\n if (hours) {\n string += `${hours}H`;\n }\n\n if (minutes) {\n string += `${minutes}M`;\n }\n\n if (seconds) {\n string += `${seconds}S`;\n }\n\n if (!(seconds || minutes || hours)) {\n string += '0S';\n }\n\n return string;\n};\n","import {\n isDate,\n dateOnlyString,\n dateOnlyStringNumeric,\n dateOnlyISOString,\n monthDayStringNumeric,\n dayOfWeekString,\n timeOnlyString,\n dateTimeString,\n dateTimeStringForSentence,\n dateOnlyStringForSentence,\n timeAgoString,\n dateUTCOffset,\n buildTimeDuration,\n mediaDurationString,\n sessionDurationString,\n dateToDateTime,\n dateTimeToDate,\n dateTimeToISO,\n dateTimeRounded,\n millisecondsToDurationISOString,\n} from './datetimeHelpers';\n\nexport const datetimeHelpers = {\n isDate,\n dateOnlyString,\n dateOnlyStringNumeric,\n dateOnlyISOString,\n monthDayStringNumeric,\n dayOfWeekString,\n timeOnlyString,\n dateTimeString,\n dateTimeStringForSentence,\n dateOnlyStringForSentence,\n timeAgoString,\n dateUTCOffset,\n buildTimeDuration,\n mediaDurationString,\n sessionDurationString,\n dateToDateTime,\n dateTimeToDate,\n dateTimeToISO,\n dateTimeRounded,\n millisecondsToDurationISOString,\n};\n","import { isNotNil } from '@wistia/type-guards';\nimport { css } from 'styled-components';\n\nconst gradients = {\n defaultDarkOne: css`\n background-color: #222d66;\n background-image:\n radial-gradient(farthest-corner at top right, #222d66, transparent 70%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),\n radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);\n `,\n defaultDarkTwo: css`\n background-color: #222d66;\n background-image:\n radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),\n radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);\n `,\n defaultLightOne: css`\n background-color: #ccd5ff;\n background-image:\n radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),\n radial-gradient(farthest-corner at top left, #ccd5ff, transparent 65%),\n radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);\n `,\n defaultLightTwo: css`\n background-color: #ccd5ff;\n background-image:\n radial-gradient(ellipse at top, #ccd5ff, transparent),\n radial-gradient(ellipse at bottom, #6b84ff, transparent);\n `,\n defaultMidOne: css`\n background-color: #6b84ff;\n background-image:\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),\n radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);\n `,\n defaultMidTwo: css`\n background-color: #6b84ff;\n background-image:\n radial-gradient(ellipse at top, #2949e5, transparent),\n radial-gradient(ellipse at bottom, #ccd5ff, transparent);\n `,\n green: css`\n background-color: #fafffa;\n background-image:\n radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),\n radial-gradient(farthest-corner at top right, #268713, transparent 50%),\n radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);\n `,\n greenWithPop: css`\n background-color: #fafffa;\n background-image:\n radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);\n `,\n pink: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),\n radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),\n radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);\n `,\n pinkWithPop: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),\n radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),\n radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);\n `,\n playfulGradientOne: css`\n background-color: #f7f8ff;\n background-image:\n radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),\n radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);\n `,\n playfulGradientTwo: css`\n background-color: #f7f8ff;\n background-image:\n radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),\n radial-gradient(farthest-corner at bottom right, #eff18d, transparent 50%),\n radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);\n `,\n purple: css`\n background-color: #f2caff;\n background-image:\n radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),\n radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);\n `,\n purpleWithPop: css`\n background-color: #f2caff;\n background-image:\n radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),\n radial-gradient(farthest-corner at top left, #d65cff, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),\n radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);\n `,\n yellow: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),\n radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),\n radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);\n `,\n yellowWithPop: css`\n background-color: #fffff0;\n background-image:\n radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),\n radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),\n radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),\n radial-gradient(farthest-corner at bottom right, #2949e5, transparent 55%);\n `,\n};\n\nexport type GradientNameType = keyof typeof gradients;\n\nexport const gradientMap: GradientNameType[] = Object.keys(gradients) as GradientNameType[];\n\nexport type GetBackgroundGradientType = GradientNameType | undefined;\n\n/**\n * Retrieves the CSS background gradient corresponding to the given gradient name.\n * If the specified gradient name is not found, the default gradient ('defaultDarkOne') is returned.\n * @param {GradientName} gradientName - The name of the gradient to retrieve.\n * @returns {FlattenSimpleInterpolation} The CSS string representing the specified gradient.\n */\nexport const getBackgroundGradient = (\n gradientName: GetBackgroundGradientType = undefined,\n): ReturnType<typeof css> => {\n return isNotNil(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;\n};\n","import { gradientMap } from './getBackgroundGradient';\nimport type { GradientNameType } from './getBackgroundGradient';\n\nconst MULTIPLIER = 31;\n\n/**\n * Retrieves a semi-random background gradient based on the given id.\n *\n * @param {string} id - The id to use to generate the semi-random background gradient.\n * @returns {GradientName} gradientName\n */\nexport const getSemiRandomBackgroundGradient = (id: string): GradientNameType | undefined => {\n let hashCode = null;\n\n if (typeof id === 'string' && id) {\n // Get a sufficiently unique number for this id\n // Adapted from https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0\n hashCode = Array.from(id).reduce(\n (num, char) => Math.imul(MULTIPLIER, num) + char.charCodeAt(0) || 0,\n 0,\n );\n } else {\n // If id is null or not a string, choose a default background\n // For example, use the first background as the default\n return gradientMap[0];\n }\n\n const index = Math.abs(hashCode) % gradientMap.length;\n return gradientMap[index];\n};\n","/* eslint-disable @typescript-eslint/no-unnecessary-type-parameters */\n// TODO: fix `T extends DefaultTheme = DefaultTheme`\n// not adding jsdocs atm because this is semi-private\n// mq stands for \"media query\"\n// https://github.com/wistia/vhs-design-tokens/blob/main/tokens/breakpoint.yaml\n\nimport { getValueAndUnit } from 'polished';\nimport type { DefaultTheme } from 'styled-components';\n\nconst getMaxWidth = (breakpoint: string) => {\n const breakpointBuffer = 0.0025;\n const [value, unit] = getValueAndUnit(breakpoint) as [number, string];\n return `@media (max-width: ${Math.max(value - breakpointBuffer, 0)}${unit})`;\n};\n\nconst xsAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.xs})`;\nconst smAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.sm})`;\nconst mdAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.md})`;\nconst lgAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.lg})`;\nconst xlAndUp = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n `@media (min-width: ${theme.breakpoint.xl})`;\n\nconst xsAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.xs);\nconst smAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.sm);\nconst mdAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.md);\nconst lgAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.lg);\nconst xlAndDown = <T extends DefaultTheme = DefaultTheme>({ theme }: { theme: T }) =>\n getMaxWidth(theme.breakpoint.xl);\n\nexport const mq = {\n xsAndUp,\n smAndUp,\n mdAndUp,\n lgAndUp,\n xlAndUp,\n xsAndDown,\n smAndDown,\n mdAndDown,\n lgAndDown,\n xlAndDown,\n};\n","/**\n * Determines if a given value is an object\n *\n * @param {*} value - value of any type\n * @returns {boolean} - whether value is an object\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n value !== null &&\n value !== undefined &&\n (Object.getPrototypeOf(value) === null || value.constructor === Object);\n","/**\n * Recursively Object.freeze() objects\n *\n * @param {Object} obj - any object to freeze\n * @returns {Object} - new object\n */\nexport const deepFreeze = (obj: Record<string, unknown>): Record<string, unknown> => {\n Object.freeze(obj);\n\n // recurse through object properties for objects to freeze\n Object.getOwnPropertyNames(obj).forEach((prop) => {\n if (\n // eslint-disable-next-line prefer-object-has-own\n Object.prototype.hasOwnProperty.call(obj, prop) &&\n // avoids error in strict mode\n (typeof obj === 'function'\n ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'\n : true) &&\n obj[prop] !== null &&\n (typeof obj[prop] === 'object' || typeof obj[prop] === 'function') &&\n !Object.isFrozen(obj[prop])\n ) {\n deepFreeze(obj[prop] as Record<string, unknown>);\n }\n });\n\n return obj;\n};\n","// Note: if we ever need something better (ie. deep merging arrays) we should switch to deepmerge lib\n// https://www.npmjs.com/package/ts-deepmerge\nimport { isObject } from './isObject';\n\n/**\n * Merges two or more objects\n *\n * @param {Object} target - object that subsequent objects will be merged into\n * @param {...Object} sources - one or more objects\n * @returns {Object} - new object\n */\nexport const merge = (\n target: Record<string, unknown>,\n ...sources: Record<string, unknown>[]\n): Record<string, unknown> => {\n if (!sources.length) {\n return target;\n }\n\n const output = { ...target };\n sources.forEach((source) => {\n if (isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (output[key] === null || output[key] === undefined) {\n output[key] = { ...source[key] };\n } else {\n output[key] = merge(output[key] as Record<string, unknown>, source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n }\n });\n return output;\n};\n","/**\n * Creates an object composed of the selected keys\n *\n * @param {Object} obj - object we want a sub-selection of\n * @param {string[]} keys - array of keys to be selected from object\n * @returns {Object} - new object with only the selected keys (and their values) present\n */\nexport const selectKeys = (obj: Record<string, unknown>, keys: string[]): Record<string, unknown> =>\n keys.reduce<Record<string, unknown>>((obj2, key) => {\n // eslint-disable-next-line prefer-object-has-own\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n obj2[key] = obj[key]; // eslint-disable-line no-param-reassign\n }\n return obj2;\n }, {});\n","import { isObject } from './isObject';\nimport { deepFreeze } from './deepFreeze';\nimport { merge } from './merge';\nimport { selectKeys } from './selectKeys';\n\nexport const objectHelpers = { isObject, deepFreeze, merge, selectKeys };\n","/**\n * Converts a string to camel case\n *\n * @param {string} str - the string to convert\n * @returns {string} - the camelcased string\n */\nexport const camelCase = (str = ''): string =>\n // https://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case\n str.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, (match, index) => {\n if (+match === 0) {\n return '';\n }\n return index === 0 ? match.toLowerCase() : match.toUpperCase();\n });\n","/**\n * Converts a boolean string value `value` into a boolean. If passed\n * something other than 'true' or 'false' will coerce value to boolean.\n *\n * @param {*} value - a value of any type\n * @returns {boolean} - that value as a boolean\n */\nexport const coerceToBoolean = (value: unknown): boolean => {\n if (value === 'true' || value === 'false') {\n return value === 'true';\n }\n return Boolean(value);\n};\n","/**\n * Coerces a value `value` into a string. If passed a null or undefined\n * value, returns an empty string.\n *\n * @param {*} value - a value of any type\n * @returns {string} - that value as a string\n */\nexport const coerceToString = (value: unknown): string =>\n value === null || value === undefined ? '' : String(value); // eslint-disable-line @typescript-eslint/no-base-to-string\n","/**\n * Determines if a given value is a string\n *\n * @param {*} value - a value of any type\n * @returns {boolean} - whether value is a string\n */\nexport const isString = (value: unknown): value is string =>\n typeof value === 'string' || value instanceof String;\n","import { isString } from './isString';\n\n/**\n * Validates an http URL string\n *\n * @param {*} str - the url string to validate - could be an unknown type\n * @return {boolean} - whether string is a valid http url\n */\nexport const isHttpUrl = (str: unknown): boolean => {\n if (!isString(str)) {\n return false;\n }\n\n try {\n const url = new URL(str);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch (_: unknown) {\n return false;\n }\n};\n","import { isString } from './isString';\n\n/**\n * Loosely validates a URL string\n *\n * @param {*} str - a string to validate - could be an unknown type\n * @return {boolean} - whether string appears to be a url\n */\nexport const isUrl = (str: unknown): boolean => {\n // A URL must match #1 and then at least one of #2/#3\n // Use two levels of REs to avoid ReDoS\n // https://levelup.gitconnected.com/the-regular-expression-denial-of-service-redos-cheat-sheet-a78d0ed7d865\n const protocolAndDomain = /^(?:\\w+:)?\\/\\/(\\S+)$/;\n const localhostDomain = /^localhost[:?\\d]*(?:[^:?\\d]\\S*)?$/;\n const nonLocalhostDomain = /^[^\\s.]+\\.\\S{2,}$/;\n\n if (!isString(str)) {\n return false;\n }\n\n const match = protocolAndDomain.exec(str);\n\n if (!match) {\n return false;\n }\n\n // part of the string that is not the protocol\n const remaining = match[1];\n\n if (remaining === undefined || !remaining) {\n return false;\n }\n\n return localhostDomain.test(remaining) || nonLocalhostDomain.test(remaining);\n};\n","/**\n * Converts the first character of string to lower case\n *\n * @param {string} str - the string to convert\n * @returns {string} - the lowercased string\n */\nexport const lowerFirst = (str = ''): string => (str[0]?.toLowerCase() ?? '') + str.slice(1);\n","/**\n * Removes newlines (\\n) from string\n *\n * @param {string} str - string to have new lines removed from\n * @returns {string} - string with newlines removed\n */\nexport const removeNewlines = (str: string): string => str.replace(/\\n/g, '');\n","/**\n * Removes file extension from string\n *\n * @param {string} str - string to have file extension removed from\n * @returns {string} - string with file extension removed\n */\nexport const stripExtension = (str: string): string => (str || '').replace(/\\.[^/.]{1,4}$/, '');\n","/**\n * Truncates a string to desired char count and appends an ellipsis on the end\n *\n * @param {string} str - string to be truncated\n * @param {number} maxChars - maximum numbers of characters the string should have\n * @returns {string} - truncated string\n */\nexport const truncate = (str: string, maxChars: number): string => {\n if (str.length <= maxChars) {\n return str;\n }\n return `${str.slice(0, maxChars - 3)}...`;\n};\n","/**\n * Converts the first character of string to upper case\n * @param {string} str - the string to convert\n * @returns {string} - the uppercased string\n */\nexport const upperFirst = (str = ''): string => (str[0]?.toUpperCase() ?? '') + str.slice(1);\n","import { camelCase } from './camelCase';\nimport { coerceToBoolean } from './coerceToBoolean';\nimport { coerceToString } from './coerceToString';\nimport { isHttpUrl } from './isHttpUrl';\nimport { isString } from './isString';\nimport { isUrl } from './isUrl';\nimport { lowerFirst } from './lowerFirst';\nimport { removeNewlines } from './removeNewlines';\nimport { stripExtension } from './stripExtension';\nimport { truncate } from './truncate';\nimport { upperFirst } from './upperFirst';\n\nexport const stringHelpers = {\n camelCase,\n coerceToBoolean,\n coerceToString,\n isHttpUrl,\n isString,\n isUrl,\n lowerFirst,\n removeNewlines,\n stripExtension,\n truncate,\n upperFirst,\n};\n","import type { ReactNode } from 'react';\nimport { LiveAnnouncer } from 'react-aria-live';\nimport { MotionConfig } from 'motion/react';\nimport { VHSThemeProvider } from './VHSThemeProvider';\nimport type { WrapperProviderLinkType } from './WrapperProvider';\nimport { WrapperProvider } from './WrapperProvider';\nimport { ToastProvider } from '../components/Toast/ToastProvider';\nimport { ModalProvider } from '../components/ModalBase/ModalProvider';\nimport { GlobalStyle } from '../css/GlobalStyle';\n\nexport type { WrapperProviderLinkType } from './WrapperProvider';\n\nexport type VHSProviderProps = {\n children: ReactNode;\n globalStylesIncluded?: boolean;\n Link?: WrapperProviderLinkType;\n skipAnimations?: boolean;\n theme?: Record<string, unknown>;\n};\n\nexport const VHSProvider = ({\n children,\n theme = {},\n globalStylesIncluded = true,\n skipAnimations = false,\n Link,\n}: VHSProviderProps) => {\n const motionPreference = skipAnimations ? 'never' : 'user';\n\n return (\n <VHSThemeProvider theme={theme}>\n {globalStylesIncluded ? <GlobalStyle /> : null}\n <LiveAnnouncer>\n <MotionConfig reducedMotion={motionPreference}>\n <WrapperProvider value={{ Link }}>\n <ModalProvider>\n <ToastProvider>{children}</ToastProvider>\n </ModalProvider>\n </WrapperProvider>\n </MotionConfig>\n </LiveAnnouncer>\n </VHSThemeProvider>\n );\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { ThemeProvider } from 'styled-components';\nimport type { ReactNode } from 'react';\nimport type { PartialDeep } from 'type-fest';\nimport { theme as vhsTheme } from '../theme';\nimport { merge } from '../helpers/objectHelpers/merge';\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const VHSThemeProvider = <T extends PartialDeep<DefaultTheme>>({\n children,\n theme: overrideTheme,\n}: {\n children: ReactNode;\n theme: T;\n}) => {\n const theme = merge(vhsTheme, overrideTheme);\n\n return <ThemeProvider theme={theme as unknown as DefaultTheme}>{children}</ThemeProvider>;\n};\n","/**\n * Do not edit directly\n * Generated on Wed, 03 Dec 2025 14:41:55 GMT\n */\n\nexport const designTokens = {\n breakpoint: {\n xs: '0em',\n sm: '37.5em',\n md: '56.5625em',\n lg: '77.5em',\n xl: '90em',\n },\n color: {\n brandBlue100: '#E5E9FF',\n brandBlue200: '#CCD5FF',\n brandBlue300: '#99ABFF',\n brandBlue400: '#6B84FF',\n brandBlue500: '#2949E5',\n brandBlue600: '#1F3399',\n brandBlue700: '#222D66',\n brandBlue800: '#000934',\n purple100: '#FDF7FF',\n purple200: '#F9E5FF',\n purple300: '#F2CAFF',\n purple400: '#E093FA',\n purple500: '#D65CFF',\n purple600: '#AC12E0',\n purple700: '#752E8C',\n purple800: '#39004D',\n green100: '#F4FFF2',\n green200: '#DFFFD9',\n green300: '#B0E5A5',\n green400: '#76D962',\n green500: '#44B62D',\n green600: '#268713',\n green700: '#38662E',\n green800: '#093300',\n blue100: '#E9F5FF',\n blue200: '#C7E7FF',\n blue300: '#91CEFF',\n blue400: '#58B7FE',\n blue500: '#229FFF',\n blue600: '#1B7FDE',\n blue700: '#165FAC',\n blue800: '#0D407A',\n pink100: '#FFF8FC',\n pink200: '#FFE5F4',\n pink300: '#FFC7E8',\n pink400: '#FF8CD0',\n pink500: '#FF40B3',\n pink600: '#E0128E',\n pink700: '#661F4A',\n pink800: '#4D002E',\n red100: '#FFF7F9',\n red200: '#FFCCD5',\n red300: '#FF99AB',\n red400: '#FF6682',\n red500: '#FF2B51',\n red600: '#D60027',\n red700: '#99001C',\n red800: '#660013',\n yellow100: '#FFFFF0',\n yellow200: '#EFF18D',\n yellow300: '#E8EC1E',\n yellow400: '#D9DC25',\n yellow500: '#BCBF19',\n yellow600: '#9EA00F',\n yellow700: '#7C7E07',\n yellow800: '#4A4D00',\n orange100: '#FFF9F8',\n orange200: '#FFCABA',\n orange300: '#FF9D80',\n orange400: '#FF6C40',\n orange500: '#D1451A',\n orange600: '#B23009',\n orange700: '#80280D',\n orange800: '#4D1200',\n grey100: '#F8F8F9',\n grey200: '#EBEBED',\n grey300: '#DEDEE1',\n grey400: '#C4C4C8',\n grey500: '#A3A3AA',\n grey600: '#7B7B87',\n grey700: '#62626C',\n grey800: '#4A4A51',\n grey900: '#37373C',\n grey1000: '#1F1F22',\n grey1100: '#0B0D0E',\n error100: '#FFECEC',\n error200: '#FFCACA',\n error300: '#FF9A9A',\n error400: '#FF6962',\n error500: '#FA4040',\n error600: '#D63727',\n error700: '#AA0D15',\n error800: '#860011',\n success100: '#E6F9F3',\n success200: '#BFEFE0',\n success300: '#81E0C1',\n success400: '#41D0A3',\n success500: '#00C185',\n success600: '#00966E',\n success700: '#047063',\n success800: '#025050',\n warning100: '#FFF8E6',\n warning200: '#FFEFC8',\n warning300: '#FFDF96',\n warning400: '#FFCE5A',\n warning500: '#FABE1F',\n warning600: '#DC9601',\n warning700: '#BE7200',\n warning800: '#B45101',\n },\n duration: {\n productive: {\n fast: '70ms',\n moderate: '110ms',\n slow: '150ms',\n },\n expressive: {\n fast: '240ms',\n moderate: '400ms',\n slow: '700ms',\n },\n },\n easing: {\n standard: {\n productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',\n expressive: 'cubic-bezier(0.4, 0.14, 0.3, 1)',\n },\n entrance: {\n productive: 'cubic-bezier(0, 0, 0.38, 0.9)',\n expressive: 'cubic-bezier(0, 0, 0.3, 1)',\n },\n exit: {\n productive: 'cubic-bezier(0.2, 0, 1, 0.9)',\n expressive: 'cubic-bezier(0.4, 0.14, 1, 1)',\n },\n },\n font: {\n family: {\n default: 'InterVariable, Helvetica, Arial, sans-serif',\n monospace: '\"IBM Plex Mono\", Consolas, Monaco, monospace',\n },\n weight: {\n thin: 100,\n extraLight: 200,\n light: 300,\n regular: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n extraBold: 800,\n },\n size: {\n default: '16px',\n small: '14px',\n },\n },\n shadow: {\n elevation0: 'none',\n elevation1: '0 2px 4px rgba(0, 0, 0, 0.1)',\n elevation2: '0 0 64px 0 rgba(0, 0, 0, 0.08)',\n },\n spacing: {\n space01: '4px',\n space02: '8px',\n space03: '12px',\n space04: '16px',\n space05: '24px',\n space06: '32px',\n space07: '48px',\n space08: '64px',\n space09: '80px',\n space10: '96px',\n space11: '120px',\n },\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { designTokens } from '@wistia/vhs-design-tokens';\n\n// Z-Index Scale\n//\n// Define the zIndex of all our components in one place so we can easily\n// see their relationship and prevents bugs arising from arbitrary z-index values.\n//\n// Do not edit the z-index scale! Only add component-scoped z-index values.\n\n// const zIndex0 = 0;\nconst zIndex1 = 100;\nconst zIndex2 = 200;\nconst zIndex3 = 300;\n// const zIndex4 = 400;\nconst zIndex5 = 500;\n\nconst theme: DefaultTheme & Record<string, unknown> = {\n breakpoint: {\n ...designTokens.breakpoint,\n },\n\n color: {\n ...designTokens.color,\n },\n\n duration: {\n ...designTokens.duration,\n },\n\n easing: {\n ...designTokens.easing,\n },\n\n font: {\n family: {\n default: 'InterVariable, Helvetica, Arial, sans-serif',\n monospace: designTokens.font.family.monospace,\n },\n size: designTokens.font.size,\n weight: Object.fromEntries(\n Object.entries(designTokens.font.weight).map(([key, value]) => [key, Number(value)]),\n ) as DefaultTheme['font']['weight'],\n },\n\n shadow: {\n ...designTokens.shadow,\n },\n\n spacing: {\n ...designTokens.spacing,\n },\n\n zIndex: {\n ModalCloseButton: zIndex1,\n Backdrop: zIndex2,\n ActionModal: zIndex3,\n FullScreenModal: zIndex3,\n RangeSelector: zIndex5,\n MenuComponent: zIndex5,\n Toast: zIndex5,\n Tooltip: zIndex5,\n BackdropElevated: zIndex5,\n },\n\n button: {\n borderRadius: '4px',\n },\n\n buttonGroup: {\n gap: '16px',\n },\n\n headline: {\n family: designTokens.font.family,\n headline1: {\n weight: designTokens.font.weight.bold as DefaultTheme['font']['weight']['bold'],\n },\n headline2: {\n weight: designTokens.font.weight.medium as DefaultTheme['font']['weight']['medium'],\n },\n headline3: {\n weight: designTokens.font.weight.bold as DefaultTheme['font']['weight']['bold'],\n },\n },\n\n paper: {\n elevation0: designTokens.shadow.elevation0,\n elevation1: designTokens.shadow.elevation1,\n elevation2: designTokens.shadow.elevation2,\n },\n};\n\nexport { theme };\n","import { createContext, useContext } from 'react';\nimport type { JSX } from 'react';\nimport type { DefaultLinkWrapperProps } from '../components/Link/Link';\n\nexport type WrapperProviderLinkType = ((props: DefaultLinkWrapperProps) => JSX.Element) | undefined;\n\nconst WrapperContext = createContext<{ Link?: WrapperProviderLinkType }>({});\n\nexport const useWrappers = () => useContext(WrapperContext);\n\nexport const WrapperProvider = WrapperContext.Provider;\n","import type { ReactNode } from 'react';\nimport { useState, useCallback } from 'react';\nimport type { ToastVariants } from './Toast';\nimport { Toast, defaultTimeout, defaultVariant, defaultActionLabel } from './Toast';\nimport type { UseToastProps } from './ToastContext';\nimport { ToastContext } from './ToastContext';\n\nexport const ToastProvider = ({ children }: { children: ReactNode }) => {\n const [toastActionInterceptor, setToastActionInterceptor] = useState<(() => void) | undefined>(\n undefined,\n );\n const [toastActionLabel, setToastActionLabel] = useState('');\n const [toastColorOverride, setToastColorOverride] = useState<string | undefined>(undefined);\n const [toastMessage, setToastMessage] = useState('');\n const [toastShown, setToastShown] = useState(false);\n const [toastTimeout, setToastTimeout] = useState<number | undefined>(undefined);\n const [toastVariant, setToastVariant] = useState<ToastVariants | undefined>(undefined);\n\n const showToast = useCallback(\n ({\n message,\n variant = defaultVariant,\n actionLabel = defaultActionLabel,\n actionInterceptor,\n timeout = defaultTimeout,\n colorOverride,\n }: UseToastProps) => {\n setToastActionInterceptor(actionInterceptor ? () => actionInterceptor : undefined);\n setToastActionLabel(actionLabel);\n setToastColorOverride(colorOverride);\n setToastMessage(message);\n setToastShown(true);\n setToastTimeout(timeout);\n setToastVariant(variant);\n },\n [],\n );\n\n return (\n <>\n <ToastContext.Provider value={showToast}>{children}</ToastContext.Provider>\n <Toast\n actionInterceptor={toastActionInterceptor}\n actionLabel={toastActionLabel}\n colorOverride={toastColorOverride}\n isOpen={toastShown}\n message={toastMessage}\n onClose={() => setToastShown(false)}\n timeout={toastTimeout}\n variant={toastVariant}\n />\n <div id=\"toast-portal\" />\n </>\n );\n};\n","import type { ReactNode, ComponentPropsWithoutRef } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { memo, useState, useEffect, useCallback, Fragment } from 'react';\nimport { createPortal } from 'react-dom';\nimport { LiveMessage } from 'react-aria-live';\nimport { styled } from 'styled-components';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { coerceToBoolean } from '../../helpers/stringHelpers/coerceToBoolean';\nimport { ToastAnimation } from './ToastAnimation';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { Button } from '../Button/Button';\nimport { isServer } from '../../private/helpers/isServer';\n\n// TODO consolidate variant values\nexport type ToastVariants = 'dangerous' | 'error' | 'success' | 'warning';\nexport const toastVariants: ToastVariants[] = ['success', 'warning', 'error', 'dangerous'];\nexport const defaultVariant = 'success';\nexport const defaultActionLabel = 'Dismiss';\nexport const defaultTimeout = 3000;\n\nconst getAccentColor = (\n colorOverride: string | undefined,\n variant: ToastVariants,\n allThemeColors: DefaultTheme['color'],\n) => {\n if (isNonEmptyString(colorOverride)) {\n return colorOverride;\n }\n\n if (!toastVariants.includes(variant)) {\n throw new Error(\n `Variant \"${variant}\" not supported, please update variant prop in Toast component.`,\n );\n }\n\n if (variant === 'dangerous') {\n return allThemeColors.error600;\n }\n if (variant === 'error') {\n return allThemeColors.error600;\n }\n if (variant === 'warning') {\n return allThemeColors.warning500;\n }\n\n // success/default\n return allThemeColors.brandBlue500;\n};\n\nconst ToastComponent = styled.div<{\n $accentColor: string;\n}>`\n align-items: center;\n background: white;\n border-left-color: ${({ $accentColor }) => $accentColor};\n border-left-style: solid;\n border-left-width: 8px; /* accent border */\n box-shadow: ${({ theme }) => theme.shadow.elevation2};\n display: flex;\n gap: ${({ theme }) => theme.spacing.space04};\n padding: ${({ theme }) =>\n `${theme.spacing.space04} ${theme.spacing.space04} ${theme.spacing.space04} ${theme.spacing.space04}`};\n`;\n\nconst ToastContent = styled.div`\n align-self: center;\n color: ${({ theme }) => theme.color.grey900};\n flex-grow: 1;\n font-size: 16px;\n\n /* in case a <p> tag is passed as Toast message this will\n remove any margins that may arrive with children */\n > * {\n margin: 0;\n }\n`;\n\nconst ToastPortal = ({ children }: { children: ReactNode }) => {\n if (isServer()) {\n return null;\n }\n\n const container = document.getElementById('toast-portal');\n\n // in the case that ToastProvider is not an ancestor, we should just render the\n // Toast in place instead of a Portal\n if (!container) {\n return null;\n }\n return createPortal(children, container);\n};\n\nlet displayTimer: ReturnType<typeof setTimeout> | null = null;\n\nexport type ToastProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * A function that will be invoked when the action button is clicked instead of the internal handler\n */\n actionInterceptor?: (() => void) | undefined;\n /**\n * The text of the \"action\" button on the right\n */\n actionLabel?: string | undefined;\n /**\n * A hex value that will override the color values defined by `variant`\n */\n colorOverride?: string | undefined;\n /**\n * @ignore\n * Avoids animation and positions Toast in normal flow for documentation/testing purposes\n */\n renderInPlace?: boolean;\n /**\n * Determines whether Toast is displayed\n */\n isOpen?: boolean;\n /**\n * The message displayed in the toast\n */\n message: string;\n /**\n * Callback that is invoked when toasts closes (via timeout or close button)\n */\n onClose: () => void;\n /**\n * The time in ms before the Toast calls the onClose function\n */\n timeout?: number | undefined;\n /**\n * The kind of Toast to display\n */\n variant?: ToastVariants | undefined;\n};\n\nexport const Toast = memo(\n ({\n actionInterceptor = undefined,\n actionLabel = defaultActionLabel,\n colorOverride = undefined,\n renderInPlace = false,\n isOpen = false,\n message,\n onClose,\n timeout = defaultTimeout,\n variant = defaultVariant,\n ...otherProps\n }: ToastProps) => {\n const [showToast, setShowToast] = useState<boolean>(isOpen);\n const isErrorOrWarning = variant === 'error' || variant === 'warning';\n const ariaLive = isErrorOrWarning ? 'assertive' : 'polite';\n\n const stopTimer = useCallback(() => {\n clearTimeout(displayTimer ?? undefined);\n displayTimer = null;\n }, []);\n\n const closeToast = () => {\n stopTimer();\n onClose();\n };\n\n const startTimer = () => {\n displayTimer = setTimeout(() => {\n closeToast();\n }, timeout);\n };\n\n // start timer as soon as Toast appears\n useEffect(() => {\n if (showToast && !renderInPlace) {\n startTimer();\n }\n return () => {\n if (coerceToBoolean(displayTimer)) {\n stopTimer();\n }\n };\n });\n\n useEffect(() => {\n setShowToast(isOpen);\n\n // if there's an active timer, stop it\n return () => {\n if (coerceToBoolean(displayTimer)) {\n stopTimer();\n }\n };\n }, [isOpen, stopTimer, setShowToast]);\n\n const accentColor = getAccentColor(colorOverride, variant, useThemeColor());\n\n // for documentation, we sometimes want to render the Toast in it's normal flow layout,\n // instead of it's absolute position at the bottom of the page; additionally for testing\n // purposes we sometimes do not want it rendered in a Portal\n const ToastWrapper = renderInPlace ? Fragment : ToastPortal;\n\n return (\n <ToastWrapper>\n <ToastAnimation\n in={showToast}\n renderInPlace={renderInPlace}\n >\n {/* eslint-disable-next-line styled-components-a11y/no-static-element-interactions */}\n <ToastComponent\n key={message}\n $accentColor={accentColor}\n aria-hidden={!showToast}\n onMouseEnter={stopTimer}\n onMouseLeave={startTimer} // if user hovers Toast do not allow it to self-dismiss\n {...otherProps}\n >\n <ToastContent data-testid=\"toast-message\">\n <LiveMessage\n aria-live={ariaLive}\n message={message}\n />\n {message}\n </ToastContent>\n <Button\n colorOverride={accentColor}\n data-testid=\"toast-action\"\n label={actionLabel}\n onClick={actionInterceptor ?? closeToast}\n variant=\"tertiary\"\n />\n </ToastComponent>\n </ToastAnimation>\n </ToastWrapper>\n );\n },\n);\n\nToast.displayName = 'Toast_VHS';\n","import { motion, AnimatePresence } from 'motion/react';\nimport type { ReactNode } from 'react';\nimport { useTheme } from '../../hooks/useTheme';\nimport { useMq } from '../../hooks/useMq';\n\ntype ToastAnimationProps = {\n children: ReactNode;\n in: boolean;\n renderInPlace: boolean;\n};\n\nconst toastPositionOffset = 24; // in pixels\n\nconst toastPositionStyles = {\n bottom: toastPositionOffset,\n left: toastPositionOffset,\n position: 'fixed',\n};\n\nconst toastWidth = {\n minWidth: '352px',\n width: '400px',\n};\n\nconst toastMobileWidth = {\n width: `calc(100% - ${toastPositionOffset * 2}px)`,\n};\n\nexport const ToastAnimation = ({ children, in: inProp, renderInPlace }: ToastAnimationProps) => {\n const { isSmAndUp } = useMq();\n const { duration, zIndex } = useTheme();\n const durationInSeconds = Number.parseInt(duration.expressive.fast, 10) / 1000;\n const toastStyle = {\n ...toastPositionStyles,\n ...(isSmAndUp ? toastWidth : toastMobileWidth), // adjust Toast width based on viewport size\n willChange: 'auto',\n zIndex: zIndex.Toast,\n };\n\n // skip the animation & positioning and just render a Toast in place\n if (renderInPlace) {\n return <>{children}</>; // eslint-disable-line react/jsx-no-useless-fragment\n }\n\n return (\n <AnimatePresence>\n {inProp ? (\n <motion.div\n animate={{ opacity: 1, y: '0%' }}\n exit={{ opacity: 0, y: '100%' }}\n initial={{ opacity: 0, y: '100%' }}\n // @ts-expect-error - framer-motion doesn't like `position: fixed` here but it seems to work fine?\n style={toastStyle}\n transition={{ duration: durationInSeconds }}\n >\n {children}\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { useTheme as useStyledComponentsTheme } from 'styled-components';\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const useTheme = <T extends DefaultTheme = DefaultTheme>() =>\n useStyledComponentsTheme() as T;\n","import { useState, useLayoutEffect } from 'react';\nimport { debounce } from 'throttle-debounce';\nimport { isClient } from '../../private/helpers/isClient';\n\nexport const useWindowSize = (interval = 0): { width: number; height: number } => {\n const [dimensions, setDimensions] = useState({\n width: isClient() ? window.innerWidth : 0,\n height: isClient() ? window.innerHeight : 0,\n });\n\n useLayoutEffect(() => {\n const handleResize = debounce(interval, () =>\n setDimensions({\n width: window.innerWidth,\n height: window.innerHeight,\n }),\n ) as EventListener;\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, [interval]);\n\n return dimensions;\n};\n","/* eslint-disable no-typeof-window-undefined/no-typeof-window-undefined */\n/**\n * @returns {boolean} - whether running in a browser environment\n */\nexport const isClient = (): boolean =>\n typeof window !== 'undefined' && typeof document !== 'undefined';\n","import { useWindowSize } from '../useWindowSize';\nimport { useTheme } from '../useTheme';\n\ntype MediaQueryBooleans = {\n isXsAndUp: boolean;\n isSmAndUp: boolean;\n isMdAndUp: boolean;\n isLgAndUp: boolean;\n isXlAndUp: boolean;\n isXsAndDown: boolean;\n isSmAndDown: boolean;\n isMdAndDown: boolean;\n isLgAndDown: boolean;\n isXlAndDown: boolean;\n};\n\nconst REM_SIZE = 16;\n\nexport const useMq = (): MediaQueryBooleans => {\n const viewportWidth = useWindowSize().width / REM_SIZE;\n const theme = useTheme();\n\n const isXsAndUp = true;\n const isSmAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.sm);\n const isMdAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.md);\n const isLgAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.lg);\n const isXlAndUp = viewportWidth >= Number.parseFloat(theme.breakpoint.xl);\n\n const isXsAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.sm);\n const isSmAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.md);\n const isMdAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.lg);\n const isLgAndDown = viewportWidth < Number.parseFloat(theme.breakpoint.xl);\n const isXlAndDown = true;\n\n return {\n isXsAndUp,\n isSmAndUp,\n isMdAndUp,\n isLgAndUp,\n isXlAndUp,\n isXsAndDown,\n isSmAndDown,\n isMdAndDown,\n isLgAndDown,\n isXlAndDown,\n };\n};\n","import type { DefaultTheme } from 'styled-components';\nimport { useTheme } from '../useTheme/useTheme';\n\ntype ColorKeysFromTheme<Theme extends DefaultTheme = DefaultTheme> = keyof Theme['color'];\n\nconst getColor = <T extends DefaultTheme = DefaultTheme>(\n colors: T['color'],\n colorName: ColorKeysFromTheme<T>,\n) => {\n // eslint-disable-next-line no-prototype-builtins\n if (!colors.hasOwnProperty(colorName)) {\n throw new Error(\n `\\`${String(\n colorName,\n )}\\` is not a defined theme color, check argument passed to \\`useThemeColor\\``,\n );\n }\n\n return colors[colorName];\n};\n\ntype UseThemeColor = {\n (): DefaultTheme['color'];\n <T extends DefaultTheme, K extends ColorKeysFromTheme<T>>(param: K): T['color'][K];\n <T extends DefaultTheme, K extends ColorKeysFromTheme<T>[]>(\n param: [...K],\n ): { [I in keyof K]: T['color'][K[I] & keyof T['color']] };\n};\n\nexport const useThemeColor: UseThemeColor = <T extends DefaultTheme = DefaultTheme>(\n colorName: ColorKeysFromTheme<T> | ColorKeysFromTheme<T>[] | null = null,\n) => {\n const theme = useTheme<T>();\n const colors = theme.color;\n const noColorsFound = !Object.keys({ ...colors }).length;\n\n if (noColorsFound) {\n throw new Error(\n 'The `useThemeColor` hook could not find any defined colors. A possible cause of this error is that your component is not wrapped in a theme provider such as `<VHSProvider />`',\n );\n }\n\n // if no color name is specified, just return them all\n if (colorName === null) {\n return colors;\n }\n\n // if an array of color names is provided return an array with their css color values\n if (Array.isArray(colorName)) {\n return colorName.map((color) => getColor<T>(colors, color)) as {\n [K in keyof typeof colorName]: T['color'][(typeof colorName)[K] & keyof T['color']];\n };\n }\n\n // return a single css color value\n return getColor(colors, colorName);\n};\n","import type { ReactNode, MouseEvent, ComponentPropsWithRef, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { ButtonContent } from './ButtonContent';\nimport { ButtonStyledComponent } from './ButtonStyledComponent';\nimport { getButtonColor } from './getButtonColor';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport type { iconMap } from '../Icon/iconMap';\n\nexport type TextAlignValues = 'center' | 'left' | 'right';\n\nexport type ButtonProps = ComponentPropsWithRef<'button'> & {\n /**\n * Text that appears inside of the button *THIS WILL OVERRIDE THE LABEL PROP*\n */\n children?: ReactNode;\n /**\n * Allows user to override default button colors\n */\n colorOverride?: string;\n /**\n * Disables button\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a button into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover' | undefined;\n /**\n * Is the button full-width?\n */\n fullWidth?: boolean;\n /**\n * An SVG component\n */\n icon?: ReactNode;\n /**\n * The \"type\" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*\n */\n iconName?: keyof typeof iconMap;\n /**\n * Should the icon appear at the start of the button or the end?\n */\n iconPosition?: 'end' | 'start';\n /**\n * Show a spinner when the button is in a loading state\n */\n isLoading?: boolean;\n /**\n * Text that appears inside the button\n */\n label?: string;\n /**\n * Should the label wrap if the button container is too narrow to fit the label text on one line\n * @deprecated Apply white-space styling as needed\n */\n labelWrap?: boolean;\n /**\n * Provides a button without any styling (useful for wrapping another element)\n */\n noStyle?: boolean;\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;\n /**\n * The size of button to display\n */\n size?: 'lg' | 'md' | 'sm';\n /**\n * If true then rounded corners will be squared\n */\n square?: boolean;\n /**\n * Alignment of the button label\n */\n textAlign?: TextAlignValues;\n /**\n * The type of button element that should be rendered\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * The visual type of button to display\n */\n variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n children,\n disabled = false,\n forceState,\n colorOverride,\n fullWidth = false,\n icon,\n iconName,\n iconPosition = 'start',\n label,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n labelWrap = false,\n isLoading = false,\n noStyle = false,\n onClick,\n size = 'lg',\n square = false,\n textAlign = 'center',\n type = 'button',\n variant = 'primary',\n ...otherProps\n }: ButtonProps,\n ref,\n ): JSX.Element => {\n const isAriaDisabled = () => isLoading || disabled;\n\n const handleClick = (event: MouseEvent) => {\n if (isAriaDisabled()) {\n event.preventDefault();\n return;\n }\n\n if (isNotNil(onClick)) {\n onClick(event); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n };\n\n const buttonColor = getButtonColor(colorOverride, variant, useThemeColor());\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const getContent = () => {\n if (isNotNil(children)) {\n return children;\n }\n if (isNotNil(label)) {\n return label;\n }\n return null;\n };\n\n return (\n <ButtonStyledComponent\n ref={ref as any} // eslint-disable-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any\n $buttonColor={buttonColor}\n $forceState={forceState}\n $fullWidth={fullWidth}\n $iconPosition={iconPosition}\n $isLoading={isLoading}\n $labelWrap={labelWrap}\n $noStyle={noStyle}\n $size={size}\n $square={square}\n $textAlign={textAlign}\n $variant={variant}\n aria-disabled={isAriaDisabled() || undefined}\n disabled={false}\n onClick={handleClick}\n type={type}\n {...otherProps}\n >\n <ButtonContent\n icon={icon}\n iconName={iconName}\n iconPosition={iconPosition}\n isLoading={isLoading}\n size={size}\n textAlign={textAlign}\n >\n {getContent()}\n </ButtonContent>\n </ButtonStyledComponent>\n );\n },\n);\n\nButton.displayName = 'Button_VHS';\n","import type { ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { LiveMessage } from 'react-aria-live';\nimport { Icon } from '../Icon';\nimport type { iconMap } from '../Icon/iconMap';\nimport type { TextAlignValues } from './Button';\n\ntype ButtonLoadingContainerProps = {\n $textAlign: TextAlignValues;\n};\n\nconst ButtonLoadingContainer = styled.span<ButtonLoadingContainerProps>`\n display: flex;\n justify-content: ${({ $textAlign }) => {\n if ($textAlign === 'left') {\n return 'start';\n }\n if ($textAlign === 'right') {\n return 'end';\n }\n return 'center';\n }};\n position: absolute;\n`;\n\ntype ButtonLabelContainerProps = {\n $iconPosition?: 'end' | 'start';\n $size: 'lg' | 'md' | 'sm';\n $isLoading: boolean;\n};\n\nconst ButtonLabelContainer = styled.div<ButtonLabelContainerProps>`\n align-items: center;\n display: inline-flex;\n flex-direction: ${({ $iconPosition }) => ($iconPosition === 'end' ? 'row-reverse' : 'row')};\n flex-grow: 1;\n gap: ${({ $size, theme }) => {\n if ($size === 'lg') {\n return theme.spacing.space03;\n }\n return theme.spacing.space02; // md & sm\n }};\n justify-content: center;\n opacity: ${({ $isLoading }) => ($isLoading ? 0 : 1)};\n position: relative;\n`;\n\ntype ButtonContentLabelProps = {\n $textAlign: TextAlignValues;\n};\n\nconst ButtonContentLabel = styled.div<ButtonContentLabelProps>`\n align-items: center;\n display: inline-flex;\n flex-grow: 1;\n justify-content: ${({ $textAlign }) => {\n if ($textAlign === 'left') {\n return 'start';\n }\n if ($textAlign === 'right') {\n return 'end';\n }\n return 'center';\n }};\n`;\n\nconst IconContainer = styled.div<{ $size: iconContainerSizeType }>`\n display: flex;\n\n & > svg {\n max-height: ${({ $size }) => $size};\n max-width: ${({ $size }) => $size};\n }\n`;\n\nconst iconSizeMap = Object.freeze({\n lg: 'md',\n md: 'md',\n sm: 'sm',\n});\n\ntype iconSizeType = keyof typeof iconSizeMap;\n\nconst iconContainerSizeMap = {\n lg: '16px',\n md: '16px',\n sm: '12px',\n};\n\ntype iconContainerSizeType = (typeof iconContainerSizeMap)[keyof typeof iconContainerSizeMap];\n\ntype ButtonContentProps = {\n children: ReactNode;\n icon?: ReactNode;\n iconName?: keyof typeof iconMap | undefined;\n iconPosition: 'end' | 'start';\n isLoading: boolean;\n size: iconSizeType;\n textAlign: TextAlignValues;\n};\n\nexport const ButtonContent = ({\n children,\n icon,\n iconName,\n iconPosition,\n isLoading,\n size,\n textAlign,\n}: ButtonContentProps): JSX.Element => {\n const renderButtonIcon = () => {\n if (isNotNil(icon) && isNotNil(iconName)) {\n throw new Error(\n `Do not use both icon and iconName props. If you are using a VHS icon, pass its type as a string to iconName. If you are using a custom icon, pass it as a component to the icon prop. `,\n );\n }\n if (isNotNil(icon)) {\n return (\n <IconContainer\n $size={iconContainerSizeMap[size]}\n data-testid=\"icon-container\"\n >\n {icon}\n </IconContainer>\n );\n }\n if (isNotNil(iconName)) {\n return (\n <Icon\n data-testid=\"iconName-icon\"\n size={iconSizeMap[size]}\n type={iconName}\n />\n );\n }\n return null;\n };\n\n return (\n <>\n {isLoading ? (\n <ButtonLoadingContainer\n $textAlign={textAlign}\n data-testid=\"button-content-loading\"\n >\n <LiveMessage\n aria-live=\"assertive\"\n message=\"Button has been disabled while action is in progress\"\n />\n <Icon\n size={iconSizeMap[size]}\n type=\"spinner\"\n />\n </ButtonLoadingContainer>\n ) : null}\n <ButtonLabelContainer\n $iconPosition={iconPosition}\n $isLoading={isLoading}\n $size={size}\n >\n <>{renderButtonIcon()}</>\n {isNotNil(children) ? (\n <ButtonContentLabel\n $textAlign={textAlign}\n data-testid=\"button-content-label\"\n >\n {children}\n </ButtonContentLabel>\n ) : null}\n </ButtonLabelContainer>\n </>\n );\n};\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { isNil } from '@wistia/type-guards';\nimport type { IconNameType } from './iconMap';\nimport { iconMap } from './iconMap';\nimport * as iconsManifest from './icons';\n\n// size in pixels\nexport const iconSizeMap = {\n sm: '12',\n md: '16',\n lg: '24',\n xl: '32',\n xxl: '48',\n};\n\nexport type IconProps = ComponentPropsWithoutRef<'svg'> & {\n /**\n * Color (as hex) of the Icon\n */\n color?: string;\n /**\n * The size of the icon to display\n */\n size?: keyof typeof iconSizeMap;\n /**\n * @ignore\n */\n style?: Record<string, unknown>;\n /**\n * Determines which icon to display\n */\n type: IconNameType;\n};\n\nexport const Icon = ({\n color = 'currentColor',\n size = 'lg',\n style,\n type,\n ...otherProps\n}: IconProps): JSX.Element => {\n if (isNil(type)) {\n throw new Error('An Icon component requires a `type` prop to be provided');\n }\n\n if (isNil(iconMap[type])) {\n throw new Error(`Type \"${type}\" does not exist, please update type prop in Icon component.`);\n }\n\n if (isNil(iconSizeMap[size])) {\n throw new Error(`Size \"${size}\" does not exist, please update size prop in Icon component.`);\n }\n\n const IconElement = iconsManifest[iconMap[type] as keyof typeof iconsManifest];\n\n // so we do not have to add this to each individual Icon but still allow overrides\n const defaultStyle = { verticalAlign: 'middle', ...style };\n\n return (\n <IconElement\n aria-hidden=\"true\"\n color={color}\n height={`${iconSizeMap[size]}px`}\n role=\"presentation\"\n style={defaultStyle}\n viewBox=\"0 0 24 24\"\n width={`${iconSizeMap[size]}px`}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...otherProps}\n />\n );\n};\n\nIcon.displayName = 'Icon_VHS';\n","export const iconMap = {\n 'ab-test': 'AbTestIcon',\n 'all-content': 'AllContentIcon',\n archived: 'ArchivedIcon',\n 'arrow-down': 'ArrowDownIcon',\n 'arrow-left': 'ArrowLeftIcon',\n 'arrow-right': 'ArrowRightIcon',\n 'arrow-up': 'ArrowUpIcon',\n asterisk: 'AsteriskIcon',\n audience: 'AudienceIcon',\n calendar: 'CalendarIcon',\n camera: 'CameraIcon',\n 'caret-down': 'CaretDownIcon',\n 'caret-left': 'CaretLeftIcon',\n 'caret-right': 'CaretRightIcon',\n 'caret-up': 'CaretUpIcon',\n channel: 'ChannelIcon',\n checkmark: 'CheckmarkIcon',\n 'checkmark-circle': 'CheckmarkCircleIcon',\n 'checkmark-circle-outline': 'CheckmarkCircleOutlineIcon',\n 'checkmark-circle-three-quarters': 'CheckmarkCircleThreeQuartersIcon',\n 'checkmark-underlined': 'CheckmarkUnderlinedIcon',\n close: 'CloseIcon',\n 'close-circle': 'CloseCircleIcon',\n 'collect-video': 'CollectVideoIcon',\n collection: 'CollectionIcon',\n comment: 'CommentIcon',\n community: 'CommunityIcon',\n 'contact-us': 'ContactUsIcon',\n copy: 'CopyIcon',\n 'copy-disabled': 'CopyDisabledIcon',\n create: 'CreateIcon',\n delete: 'DeleteIcon',\n 'delete-sm': 'DeleteSmIcon',\n 'dottie-clock': 'DottieClockIcon',\n download: 'DownloadIcon',\n draggable: 'DraggableIcon',\n edit: 'PencilIcon',\n ellipsis: 'EllipsisIcon',\n 'ellipsis-vertical': 'EllipsisVerticalIcon',\n embed: 'EmbedIcon',\n episodes: 'EpisodesIcon',\n error: 'TriangleIcon',\n expand: 'ExpandIcon',\n export: 'DownloadIcon',\n favorite: 'FavoriteIcon',\n 'favorite-outline': 'FavoriteOutlineIcon',\n filter: 'FilterIcon',\n gear: 'GearIcon',\n 'getting-started': 'GettingStartedIcon',\n globe: 'GlobeIcon',\n 'grid-view': 'GridViewIcon',\n 'group-record': 'GroupRecordIcon',\n hamburger: 'HamburgerIcon',\n hazard: 'HazardIcon',\n 'help-center': 'HelpCenterIcon',\n hide: 'HideIcon',\n home: 'HomeIcon',\n hourglass: 'HourglassIcon',\n import: 'ImportIcon',\n info: 'InfoIcon',\n integrations: 'IntegrationsIcon',\n invite: 'InviteIcon',\n 'invite-to-record': 'InviteToRecordIcon',\n 'lightning-bolt': 'LightningBoltIcon',\n link: 'LinkIcon',\n 'list-view': 'ListViewIcon',\n live: 'LiveIcon',\n lock: 'LockIcon',\n logout: 'LogoutIcon',\n media: 'MediaIcon',\n megaphone: 'MegaphoneIcon',\n 'more-options': 'MoreOptionsIcon',\n 'open-new': 'OpenNewIcon',\n overview: 'OverviewIcon',\n paint: 'PaintIcon',\n pencil: 'PencilIcon',\n play: 'PlayIcon',\n playlist: 'PlaylistIcon',\n podcast: 'PodcastIcon',\n preview: 'PreviewIcon',\n 'private-user-sessions': 'PrivateUserSessionsIcon',\n project: 'ProjectIcon',\n 'question-mark': 'QuestionMarkIcon',\n react: 'ReactIcon',\n record: 'RecordIcon',\n redo: 'RedoIcon',\n 'remove-from-channel': 'RemoveFromChannelIcon',\n replace: 'ReplaceIcon',\n reply: 'ReplyIcon',\n 'save-copy': 'CopyIcon',\n scissors: 'ScissorsIcon',\n search: 'SearchIcon',\n send: 'SendIcon',\n settings: 'SettingsIcon',\n share: 'ShareIcon',\n soapbox: 'SoapboxIcon',\n sort: 'SortIcon',\n sparkle: 'SparkleIcon',\n spinner: 'SpinnerIcon',\n stats: 'StatsIcon',\n 'switch-accounts': 'SwitchAccountsIcon',\n tag: 'TagIcon',\n team: 'TeamIcon',\n 'thumbs-down': 'ThumbsDownIcon',\n 'thumbs-up': 'ThumbsUpIcon',\n triangle: 'TriangleIcon',\n undo: 'UndoIcon',\n unlock: 'UnlockIcon',\n upload: 'UploadIcon',\n 'users-permissions': 'UsersPermissionsIcon',\n 'view-stream': 'ViewStreamIcon',\n wand: 'WandIcon',\n 'zoom-in': 'ZoomInIcon',\n 'zoom-out': 'ZoomOutIcon',\n};\n\nexport type IconNameType = keyof typeof iconMap;\n","export { AbTestIcon } from './AbTestIcon';\nexport { AllContentIcon } from './AllContentIcon';\nexport { ArchivedIcon } from './ArchivedIcon';\nexport { ArrowDownIcon } from './ArrowDownIcon';\nexport { ArrowLeftIcon } from './ArrowLeftIcon';\nexport { ArrowRightIcon } from './ArrowRightIcon';\nexport { ArrowUpIcon } from './ArrowUpIcon';\nexport { AsteriskIcon } from './AsteriskIcon';\nexport { AudienceIcon } from './AudienceIcon';\nexport { CalendarIcon } from './CalendarIcon';\nexport { CameraIcon } from './CameraIcon';\nexport { CaretDownIcon } from './CaretDownIcon';\nexport { CaretLeftIcon } from './CaretLeftIcon';\nexport { CaretRightIcon } from './CaretRightIcon';\nexport { CaretUpIcon } from './CaretUpIcon';\nexport { ChannelIcon } from './ChannelIcon';\nexport { CheckmarkCircleIcon } from './CheckmarkCircleIcon';\nexport { CheckmarkCircleOutlineIcon } from './CheckmarkCircleOutlineIcon';\nexport { CheckmarkCircleThreeQuartersIcon } from './CheckmarkCircleThreeQuartersIcon';\nexport { CheckmarkIcon } from './CheckmarkIcon';\nexport { CheckmarkUnderlinedIcon } from './CheckmarkUnderlinedIcon';\nexport { CloseCircleIcon } from './CloseCircleIcon';\nexport { CloseIcon } from './CloseIcon';\nexport { CollectVideoIcon } from './CollectVideoIcon';\nexport { CommentIcon } from './CommentIcon';\nexport { CommunityIcon } from './CommunityIcon';\nexport { ContactUsIcon } from './ContactUsIcon';\nexport { CopyDisabledIcon } from './CopyDisabledIcon';\nexport { CopyIcon } from './CopyIcon';\nexport { CreateIcon } from './CreateIcon';\nexport { DeleteIcon } from './DeleteIcon';\nexport { DeleteSmIcon } from './DeleteSmIcon';\nexport { DottieClockIcon } from './DottieClockIcon';\nexport { DownloadIcon } from './DownloadIcon';\nexport { DraggableIcon } from './DraggableIcon';\nexport { EllipsisIcon } from './EllipsisIcon';\nexport { EllipsisVerticalIcon } from './EllipsisVerticalIcon';\nexport { EmbedIcon } from './EmbedIcon';\nexport { EpisodesIcon } from './EpisodesIcon';\nexport { ExpandIcon } from './ExpandIcon';\nexport { FavoriteIcon } from './FavoriteIcon';\nexport { FavoriteOutlineIcon } from './FavoriteOutlineIcon';\nexport { FilterIcon } from './FilterIcon';\nexport { GearIcon } from './GearIcon';\nexport { GettingStartedIcon } from './GettingStartedIcon';\nexport { GlobeIcon } from './GlobeIcon';\nexport { GridViewIcon } from './GridViewIcon';\nexport { HamburgerIcon } from './HamburgerIcon';\nexport { HazardIcon } from './HazardIcon';\nexport { HelpCenterIcon } from './HelpCenterIcon';\nexport { HideIcon } from './HideIcon';\nexport { HomeIcon } from './HomeIcon';\nexport { HourglassIcon } from './HourglassIcon';\nexport { ImportIcon } from './ImportIcon';\nexport { InfoIcon } from './InfoIcon';\nexport { IntegrationsIcon } from './IntegrationsIcon';\nexport { InviteIcon } from './InviteIcon';\nexport { LightningBoltIcon } from './LightningBoltIcon';\nexport { LinkIcon } from './LinkIcon';\nexport { ListViewIcon } from './ListViewIcon';\nexport { LiveIcon } from './LiveIcon';\nexport { LockIcon } from './LockIcon';\nexport { LogoutIcon } from './LogoutIcon';\nexport { MediaIcon } from './MediaIcon';\nexport { MegaphoneIcon } from './MegaphoneIcon';\nexport { MoreOptionsIcon } from './MoreOptionsIcon';\nexport { OpenNewIcon } from './OpenNewIcon';\nexport { OverviewIcon } from './OverviewIcon';\nexport { PaintIcon } from './PaintIcon';\nexport { PencilIcon } from './PencilIcon';\nexport { PlayIcon } from './PlayIcon';\nexport { PodcastIcon } from './PodcastIcon';\nexport { PreviewIcon } from './PreviewIcon';\nexport { PrivateUserSessionsIcon } from './PrivateUserSessionsIcon';\nexport { ProjectIcon } from './ProjectIcon';\nexport { QuestionMarkIcon } from './QuestionMarkIcon';\nexport { ReactIcon } from './ReactIcon';\nexport { RecordIcon } from './RecordIcon';\nexport { RedoIcon } from './RedoIcon';\nexport { RemoveFromChannelIcon } from './RemoveFromChannelIcon';\nexport { ReplaceIcon } from './ReplaceIcon';\nexport { ReplyIcon } from './ReplyIcon';\nexport { ScissorsIcon } from './ScissorsIcon';\nexport { SearchIcon } from './SearchIcon';\nexport { SendIcon } from './SendIcon';\nexport { SettingsIcon } from './SettingsIcon';\nexport { ShareIcon } from './ShareIcon';\nexport { SoapboxIcon } from './SoapboxIcon';\nexport { SortIcon } from './SortIcon';\nexport { SparkleIcon } from './SparkleIcon';\nexport { SpinnerIcon } from './SpinnerIcon';\nexport { StatsIcon } from './StatsIcon';\nexport { SwitchAccountsIcon } from './SwitchAccountsIcon';\nexport { TagIcon } from './TagIcon';\nexport { TeamIcon } from './TeamIcon';\nexport { ThumbsDownIcon } from './ThumbsDownIcon';\nexport { ThumbsUpIcon } from './ThumbsUpIcon';\nexport { TriangleIcon } from './TriangleIcon';\nexport { UndoIcon } from './UndoIcon';\nexport { UnlockIcon } from './UnlockIcon';\nexport { UploadIcon } from './UploadIcon';\nexport { UsersPermissionsIcon } from './UsersPermissionsIcon';\nexport { ViewStreamIcon } from './ViewStreamIcon';\nexport { WandIcon } from './WandIcon';\nexport { ZoomInIcon } from './ZoomInIcon';\nexport { ZoomOutIcon } from './ZoomOutIcon';\nexport { GroupRecordIcon } from './GroupRecordIcon';\nexport { InviteToRecordIcon } from './InviteToRecordIcon';\nexport { CollectionIcon } from './CollectionIcon';\nexport { PlaylistIcon } from './PlaylistIcon';\n","import type { SVGProps } from 'react';\n\nexport const AbTestIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M8.78042 2.11118C6.86612 2.34876 6.94137 3.15354 6.99208 3.69591V3.69599C6.99476 3.72465 6.99738 3.75258 6.99962 3.77965C7.04436 4.31904 7.55048 5.39025 8.78042 5.39025H8.79735L8.79731 5.40433C8.79731 5.40433 9.05197 8.22842 8.79731 9.662C8.63183 10.5935 8.18982 11.2329 7.69474 11.865C8.39927 11.9016 9.14688 11.9764 9.93037 12.0994C10.4699 12.1842 10.8383 12.6879 10.753 13.2246C10.6678 13.7612 10.1613 14.1276 9.62166 14.0428C8.33927 13.8413 7.1731 13.7835 6.16316 13.812C5.48376 14.6589 4.44391 15.9821 3.58432 17.1925C5.12252 17.2343 7.05517 17.2692 9.48309 17.1438C10.0287 17.1157 10.4939 17.5327 10.5222 18.0753C10.5504 18.6178 10.1312 19.0805 9.58566 19.1086C6.78798 19.253 4.53527 19.189 2.90579 19.1426C2.71222 19.1371 2.52744 19.1319 2.35159 19.1273C1.49048 20.8558 2.24968 21.573 4.20714 21.7855C6.33564 22.0165 18.0133 22.1217 19.9478 21.7855C21.8825 21.4493 22.5323 19.9214 21.5397 18.6499C20.547 17.3783 17.7768 13.4113 16.9172 11.9984C16.7004 11.642 16.4948 11.3282 16.3083 11.0435C15.7556 10.1997 15.3708 9.61242 15.36 8.93404L15.3601 5.40433L15.36 5.39025H15.3746C16.8928 5.34284 17.0231 4.6562 17.0231 3.75071C17.0231 2.84523 16.285 2.11118 15.3746 2.11118C15.3746 2.11118 10.7959 1.86103 8.78042 2.11118Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const AllContentIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m3.09059 3.5023c.5523 0 1 .4477 1 1l-.00092.70188c-.01018 3.93536-.10142 7.15092-.08848 9.77572.0068 1.3587.0426 2.4727.1299 3.3301.071.6968.16857 1.1263.25679 1.3643l.00412.0107.04589.0175c.01953.007.04171.0145.06676.0224l.08404.025c.2655.0742.6435.1409 1.1387.1952.9865.1081 2.3084.1539 3.8524.1644 3.14371.0213 6.85261-.0993 10.44111-.0993l.1166.0067c.4974.0578.8834.4805.8834.9933 0 .5522-.4477 1-1 1l-.738.0017c-3.232.0147-6.8753.1168-9.71671.0976-1.558-.0106-2.9641-.0566-4.0568-.1763-.5444-.0597-1.0437-.141-1.4591-.2571-.3702-.1035-.8555-.2808-1.185-.649l-.05731-.0703-.05079-.0751-.10286-.186c-.29118-.5812-.4296-1.3656-.51294-2.183-.0974-.9568-.1333-2.1494-.1402-3.5229-.0133-2.6853.0894-6.4106.0894-10.4876l.00673-.11652c.05776-.49735.48042-.88338.99327-.88338zm6.5557-1.37637.53051.02595c1.8616.09188 3.7138.19142 3.7138.19142s1.0423-.01829 2.2175-.02072l.4451-.0001c.8957.00155 1.802.01442 2.3355.05302 2.564.2222 2.6272 1.1409 2.7026 2.237.0118.172.024.3485.0461.5273.2722 2.1214.4627 4.9141.4627 6.5213 0 1.6393-.0545 5.1864-.245 5.4757-.2721.4178-.7348.9964-2.6398.8357-1.5154-.1278-7.0949-.2353-9.79337-.2416l-.43309-.0001c-.46931.0011-.80752.0065-.95905.0167-.9525.0643-2.0683-.0643-2.2588-1.125-.17942-.9182-.22215-3.2602-.2137-5.7009l.00427-.7725c.01347-1.80295.04985-3.58372.07493-4.8122.0148-.7225.0256-1.254.0256-1.4866 0-.0124-.0004-.0308-.001-.0543-.0081-.3442-.0425-1.796.8683-1.796.39926 0 1.70989.05778 3.1169.12593zm1.68581 5.01357c-.0356.94577-.0413 3.5445-.0421 5.0123l-.0002.688c0 .1695.1692.2755.3172.1907.9725-.551 3.89-2.2463 4.7145-3.327.0846-.106.0423-.2543-.0634-.3179l-4.6089-2.4156c-.148-.0848-.3171.0212-.3171.1695z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArchivedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m1.73061 4.12674c-.00015-.04078-.00031-.08299-.0006-.12674.00196-.01564.00388-.03112.00579-.04645.14457-1.16135.18151-1.45809 3.76421-1.95355 4.033-.558 11.67499-.278 15.49699.892.433.133 1.003.608 1.003 1.108 0 .63366.0008.64812.0016.66226.0007.01356.0014.02683.0014.58474-.1073.53269-.783.38874-1.8549.16039-.8357-.17804-1.9122-.40739-3.1481-.40739-.9352 0-2.0855-.03207-3.3103-.06622-2.7041-.07539-5.7715-.16091-7.68969.06622-.93175.05647-1.70731.17102-2.3234.26202-.91133.1346-1.47374.21767-1.6766-.01502-.26635-.30625-.26743-.59442-.2694-1.12026zm.38218 9.34776.0002.0065c.027.913.053 1.802.033 2.573l-.01.316-.00009.0031c-.05397 1.901-.10965 3.8622.37509 4.4189.34.39 1.277.743 3.591.743 2.315 0 11.63801.264 12.80501.403 1.168.14 2.548.112 2.739-.836.303-1.4255.306-4.3452.308-6.2904v-.0386c0-.625 0-1.147.01-1.48.031-1.25-.024-1.967-.081-2.702-.021-.266-.042-.534-.059-.83-.005-.146-.008-.281-.01-.406l-.0001-.00311c-.0169-.82786-.0249-1.21719-.8169-1.45989-3.822-1.171-11.46401-1.45-15.49701-.892-3.195.442-3.233.992-3.297 1.935-.00056.00797-.00112.01597-.00168.024-.00848.12097-.01744.24897-.03432.384-.14378 1.1792-.09814 2.6835-.0542 4.1315zm5.0572-1.8505c-.316-.349-.254-1.079-.149-1.376.114-.297 3.05201-.268 5.00901-.214 1.5006.0502 2.997.1864 4.482.408.298.052.613.705.465 1.175l-.023.075c-.037.13-.075.263-.17.274-.36.012-6.747-.068-6.747-.068s-2.55201.074-2.86701-.274z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowDownIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m19.7685 14.8636c.615-.555.6637-1.5035.1087-2.1185-.555-.6151-1.5035-.6637-2.1185-.1088l-4.2587 3.8429v-12.27446c0-.82845-.6716-1.5-1.5-1.5s-1.5.67155-1.5 1.5v12.27446l-4.25874-3.8429c-.615-.555-1.56345-.5063-2.11845.1088-.555.615-.5064 1.5635.10875 2.1185l6.76354 6.1031c.5709.5152 1.4389.5152 2.0098 0z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowLeftIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M9.1653 19.7974C9.72028 20.4124 10.6688 20.4611 11.2838 19.9061C11.8989 19.3512 11.9476 18.4027 11.3926 17.7876L7.54974 13.5289L19.8242 13.5289C20.6526 13.5289 21.3242 12.8573 21.3242 12.0289C21.3242 11.2005 20.6526 10.5289 19.8242 10.5289L7.54975 10.5289L11.3926 6.27019C11.9476 5.65519 11.8989 4.70674 11.2838 4.15174C10.6688 3.59674 9.72028 3.64534 9.16529 4.26049L3.06217 11.024C2.54703 11.5949 2.54703 12.4629 3.06217 13.0338L9.1653 19.7974Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowRightIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M14.8347 4.26044C14.2797 3.6454 13.3312 3.59671 12.7162 4.15169C12.1011 4.70668 12.0524 5.65517 12.6074 6.27022L16.4502 10.5289L4.17581 10.5289C3.34736 10.5289 2.67581 11.2005 2.67581 12.0289C2.67581 12.8573 3.34736 13.5289 4.17581 13.5289L16.4502 13.5289L12.6074 17.7877C12.0524 18.4027 12.1011 19.3511 12.7161 19.9061C13.3312 20.4611 14.2797 20.4125 14.8347 19.7974L20.9378 13.0338C21.453 12.4629 21.453 11.5949 20.9378 11.024L14.8347 4.26044Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ArrowUpIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M4.23151 9.19422C3.61647 9.7492 3.56778 10.6977 4.12276 11.3127C4.67775 11.9278 5.62624 11.9765 6.24129 11.4215L10.5 7.57866L10.5 19.8531C10.5 20.6815 11.1716 21.3531 12 21.3531C12.8284 21.3531 13.5 20.6815 13.5 19.8531L13.5 7.57867L17.7587 11.4215C18.3737 11.9765 19.3222 11.9278 19.8772 11.3128C20.4322 10.6977 20.3836 9.7492 19.7684 9.19422L13.0049 3.09109C12.434 2.57595 11.566 2.57595 10.9951 3.09109L4.23151 9.19422\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const AsteriskIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M14.4425 22L13.9358 15.3633L19.5575 19.0908L22 14.9542L15.3642 11.9542L22 9L19.5575 4.86333L13.9358 8.63667L14.4425 2H9.5575L10.0183 8.68167L4.39667 4.90917L2 9.04583L8.4975 12L2 14.9092L4.39667 19L10.0183 15.2725L9.5575 22H14.4425Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const AudienceIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m11.1744 3.04659c2.6835 2.33688 2.1425 8.06531-2.85234 7.99341-4.99483-.0719-5.03082-5.26362-3.69418-7.27726 1.33665-2.01364 4.64706-2.37021 6.54652-.71615zm8.511 8.47051c1.505 1.3105 1.2016 4.523-1.5995 4.4827-2.8011-.0404-2.8213-2.9519-2.0717-4.0811s2.6061-1.3292 3.6712-.4016zm-16.99799 10.3336c-.32545.0141-.61759-.3577-.6444-.8086-.15145-2.3574.04693-5.2652 1.4129-7.0804 2.86859-3.7922 9.46089-1.5366 10.60059 2.1134.236.7357.4008 1.5352.4961 2.3645.1371-.16.2718-.3099.3984-.4466 1.7601-1.8904 5.8048-.766 6.5041 1.0535.2965.751.4096 1.6354.3492 2.5077-.0098.2438-.2089.4477-.4506.4458h-7.4492-.0132-.0022-.4484c-.0235.0008-.0471-.0016-.0706-.0069z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CalendarIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m7.5 2.9895c.82843 0 1.5.67157 1.5 1.5v1.51041l6 .00003c0-.00001 0 .00001 0 0v-1.51044c0-.82843.6716-1.5 1.5-1.5s1.5.67157 1.5 1.5v1.51041c0-.00001 0 .00001 0 0l1.5.00003c.8284 0 1.5.67157 1.5 1.5v1.5c0 .82843-.6716 1.49996-1.5 1.49996h-15c-.82843 0-1.5-.67153-1.5-1.49996v-1.5c0-.82843.67157-1.5 1.5-1.5h1.5v-1.51044c0-.82843.67157-1.5 1.5-1.5zm-3 9.0104c-.82843 0-1.5.6716-1.5 1.5v6c0 .8285.67157 1.5 1.5 1.5h15c.8284 0 1.5-.6715 1.5-1.5v-6c0-.8284-.6716-1.5-1.5-1.5z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CameraIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M11.3162 20.979C11.6222 20.9857 11.9282 20.9924 12.2342 21V20.992C12.276 20.992 12.3178 20.9924 12.3595 20.9928C12.443 20.9935 12.5264 20.9942 12.6096 20.992C12.9666 20.9825 13.3235 20.9735 13.6805 20.9645C14.6678 20.9395 15.6552 20.9144 16.6423 20.8803C17.3374 20.8559 18.032 20.8127 18.7251 20.7569C19.3748 20.7048 20.0238 20.6415 20.6727 20.5783C20.9177 20.5544 21.1626 20.5305 21.4076 20.5072C21.8887 20.4612 22.2848 20.0971 22.3749 19.624C22.5973 18.4536 22.7728 17.2761 22.8625 16.0887C22.9258 15.2478 22.9671 14.403 22.9784 13.5597C22.9883 12.8257 22.9578 12.0898 22.9174 11.3563C22.8803 10.6899 22.8278 10.023 22.7433 9.36129C22.6605 8.71089 22.5531 8.06362 22.4457 7.41667C22.4215 7.27097 22.3974 7.12528 22.3735 6.97958C22.2928 6.48916 21.8624 6.12123 21.3663 6.08228C21.0761 6.05955 20.7863 6.03115 20.4965 6.00274C20.2656 5.98012 20.0347 5.9575 19.8036 5.93773C19.2277 5.88845 18.6514 5.84434 18.0747 5.80586C17.9794 5.79929 17.9418 5.76737 17.9151 5.67868L17.8955 5.61308C17.7345 5.07457 17.5734 4.53581 17.3998 4.00139C17.2445 3.5227 16.7784 3.15664 16.3077 3.1313C16.1265 3.12155 15.9453 3.11126 15.7641 3.10098C15.1608 3.06675 14.5575 3.03253 13.9537 3.01773C12.2178 2.97502 10.4823 3.00787 8.75008 3.13365C8.62103 3.14303 8.48634 3.17917 8.36901 3.23455C8.02173 3.39833 7.773 3.66208 7.65567 4.03236C7.56181 4.32848 7.47105 4.62568 7.38028 4.92287C7.3013 5.18146 7.22232 5.44004 7.14131 5.69792C7.12817 5.73922 7.07937 5.79131 7.04041 5.79741C6.95316 5.81131 6.86434 5.81585 6.77551 5.82041C6.73533 5.82246 6.69516 5.82452 6.65512 5.82744C6.53247 5.83652 6.40978 5.84531 6.28709 5.8541C5.96567 5.87712 5.64421 5.90015 5.32324 5.92834C5.07994 5.94972 4.83701 5.97418 4.59413 5.99864C4.29308 6.02896 3.99209 6.05927 3.69053 6.08368C3.21982 6.1217 2.78478 6.49432 2.70453 6.96316C2.66943 7.16876 2.63372 7.37429 2.59802 7.57982C2.47619 8.28117 2.35434 8.98263 2.25634 9.68746C2.15263 10.4327 2.06674 11.1841 2.03202 11.9354C1.99259 12.782 1.9879 13.6329 2.02732 14.479C2.06674 15.3322 2.1545 16.1854 2.26714 17.032C2.35101 17.6614 2.46316 18.287 2.5753 18.9124C2.61877 19.1549 2.66224 19.3973 2.70406 19.64C2.77868 20.0708 3.19542 20.4636 3.61263 20.5044C3.69683 20.5127 3.78099 20.5213 3.86514 20.5298C4.03332 20.5469 4.20149 20.564 4.37008 20.579C4.58912 20.5986 4.80813 20.6188 5.02715 20.639C5.58193 20.6903 6.13681 20.7416 6.69266 20.7813C7.51863 20.8404 8.34601 20.8897 9.17386 20.9207C9.88781 20.9476 10.602 20.9633 11.3162 20.979ZM6.3909 12.7131C6.41718 9.38992 9.19264 6.63089 12.5083 6.64872C15.8811 6.66703 18.5796 9.38664 18.5707 12.7375C18.5618 16.0676 15.807 18.8534 12.4721 18.8328C9.15556 18.8121 6.36462 16.0512 6.3909 12.7131ZM16.2261 12.7248C16.2383 10.658 14.5539 8.99148 12.4754 8.99524L12.4749 8.99571C10.4006 8.99899 8.72848 10.6655 8.73318 12.7243C8.73834 14.7935 10.4217 16.4942 12.4806 16.4867C14.5619 16.4792 16.2139 14.8104 16.2261 12.7248Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretDownIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.68581 7.2381c.52393-.57331 1.39057-.64667 2.00074-.19312l.11843.09775 7.19402 6.57527 7.196-6.57527c.5733-.52393 1.443-.51915 2.01-.01262l.1092.10799c.5239.57331.5191 1.44304.0126 2.01l-.108.10918-8.2069 7.50002c-.5348.4887-1.3351.5213-1.9053.0977l-.1185-.0977-8.20691-7.50002c-.61154-.55886-.65424-1.50764-.09538-2.11918z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretLeftIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.7619 2.68582c.5733.52393.6467 1.39057.1931 2.00074l-.0977.11844-6.5753 7.194 6.5753 7.196c.5239.5733.5191 1.443.0126 2.01l-.108.1092c-.5733.5239-1.443.5191-2.01.0126l-.1092-.108-7.49998-8.2069c-.48873-.5348-.52131-1.3351-.09775-1.9053l.09775-.1185 7.49998-8.2069c.5589-.61153 1.5077-.65423 2.1192-.09538z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretRightIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m7.23808 21.3142c-.57331-.524-.64667-1.3906-.19312-2.0008l.09774-.1184 6.5753-7.194-6.57529-7.196c-.52393-.57331-.51915-1.44303-.01262-2.01l.10799-.10917c.57331-.52393 1.44303-.51915 2.01-.01262l.10917.10799 7.50005 8.2069c.4887.5348.5213 1.3351.0977 1.9053l-.0977.1185-7.50004 8.2069c-.55886.6115-1.50765.6542-2.11918.0954z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CaretUpIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m21.3141 16.7619c-.5239.5733-1.3905.6467-2.0007.1931l-.1184-.0977-7.194-6.5753-7.19602 6.5753c-.57331.5239-1.44304.5191-2.01.0126l-.10918-.108c-.52393-.5733-.51915-1.443-.01261-2.01l.10798-.1092 8.20683-7.49998c.5348-.48873 1.3352-.52131 1.9054-.09775l.1184.09775 8.207 7.49998c.6115.5589.6542 1.5077.0953 2.1192z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ChannelIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m5.64571 1.19092c-.44678-.324663-1.07216-.225666-1.39682.22112-.32466.44678-.22567 1.07215.22111 1.39682 1.28625.93467 2.48092 2.19849 3.54704 3.39817-1.62947-.00332-2.92814.02027-3.46778.08086-1.98082.22241-2.2359 1.3046-2.45624 2.97122-.22035 1.66659.01731 8.61489.2821 10.20679s1.03019 2.2578 3.23903 2.2185c1.36389-.0243 5.14395.102 8.22435.2049 1.9081.0637 3.5484.1185 4.1789.123l.0126.0001c1.6426.0116 2.973.0211 3.5839-1.2509.6125-1.2752.3643-9.5706.2662-11.15071-.0982-1.58008-.6322-2.71681-1.8871-2.99303-.4032-.08875-1.9372-.17748-3.8995-.24967.9793-1.0846 2.1361-2.34437 3.5284-3.63478.405-.37542.4291-1.00813.0536-1.41319-.3754-.405062-1.0081-.429086-1.4132-.05366-1.61 1.49224-2.9274 2.95491-3.9684 4.11064-.1937.21508-.3778.41955-.5525.61158-.0947.10407-.1859.20373-.2738.29896-.9155-.02314-1.8546-.0422-2.7663-.056-.1596-.18054-.3281-.37314-.5061-.57663l-.1089-.12441c-1.18229-1.35084-2.71275-3.08411-4.44059-4.33968zm9.86039 12.42148c-1.0777 1.4126-4.8912 3.6285-6.16234 4.3486-.19344.1108-.41451-.0277-.41451-.2493 0-1.468 0-5.9827.05527-7.4507 0-.1939.22107-.3324.4145-.2216l6.02418 3.1576c.1382.0831.1934.2769.0829.4154z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkCircleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m21.8158 14.5648c3.0982-10.94829-8.8224-15.41821-15.39746-10.85188-4.65388 3.23212-6.673329 10.24658-3.15895 14.34028 3.51439 4.0936 15.45811 7.4598 18.55641-3.4884zm-4.1007-5.8658c.3861-.39496.3788-1.02808-.0161-1.41413-.395-.38604-1.0281-.37882-1.4141.01613l-6.127 6.2684-2.44277-2.4992c-.38605-.3949-1.01917-.4021-1.41413-.0161-.39495.3861-.40217 1.0192-.01612 1.4141l3.15789 3.2308c.18815.1925.44596.301.71513.301.2692 0 .527-.1085.7151-.301z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { JSX } from 'react';\n\nexport const CheckmarkCircleOutlineIcon = ({ ...props }): JSX.Element => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M11.25 2.5C6.41751 2.5 2.5 6.41751 2.5 11.25C2.5 16.0825 6.41751 20 11.25 20C16.0825 20 20 16.0825 20 11.25C20 6.41751 16.0825 2.5 11.25 2.5ZM0 11.25C0 5.0368 5.0368 0 11.25 0C17.4632 0 22.5 5.0368 22.5 11.25C22.5 17.4632 17.4632 22.5 11.25 22.5C5.0368 22.5 0 17.4632 0 11.25Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M17.1237 7.35609C17.6174 7.83865 17.6265 8.63005 17.1439 9.12374L10.3018 16.1237C10.0666 16.3644 9.74436 16.5 9.4079 16.5C9.07143 16.5 8.74918 16.3644 8.51399 16.1237L5.35609 12.893C4.87354 12.3993 4.88256 11.6079 5.37626 11.1253C5.86995 10.6428 6.66135 10.6518 7.14391 11.1455L9.4079 13.4617L15.3561 7.37626C15.8386 6.88256 16.6301 6.87354 17.1237 7.35609Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkCircleThreeQuartersIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m5.06066 10.1406c1.02693-3.83255 4.96634-6.10695 8.79884-5.08003.8844.23699 1.7935-.28787 2.0305-1.1723.237-.88444-.2879-1.79352-1.1723-2.0305-5.60142-1.500892-11.35896 1.82322-12.85985 7.42462-1.500884 5.60141 1.82323 11.35891 7.42463 12.85981 5.60142 1.5009 11.35892-1.8232 12.85982-7.4246.237-.8844-.2879-1.7935-1.1723-2.0305s-1.7935.2879-2.0305 1.1723c-1.0269 3.8325-4.9663 6.1069-8.7988 5.08-3.83257-1.0269-6.10696-4.9663-5.08004-8.7988zm16.57534-2.98696c.6582-.63651.6758-1.68609.0392-2.34429-.6365-.65821-1.686-.67579-2.3442-.03928l-7.5698 7.32023-2.17928-2.46975c-.60581-.68657-1.65349-.75203-2.34005-.14621-.68656.60576-.75202 1.65346-.14621 2.34006l2.94474 3.3372c.8339.9451 2.2881 1.0027 3.1942.1265z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.79289 18.7054-6.50001-6.5374c-.39051-.3927-.39051-1.0295 0-1.4223l1.41418-1.42238c.39051-.39279 1.02371-.39279 1.41422 0l4.37872 4.40388 9.3787-9.43263c.3905-.39276 1.0237-.39276 1.4142 0l1.4142 1.42235c.3905.39275.3905 1.02956 0 1.42235l-11.5 11.56613c-.39054.3928-1.0237.3928-1.41421 0z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CheckmarkUnderlinedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M9.54401 12.95L17.994 4.49995C18.194 4.29995 18.4315 4.19995 18.7065 4.19995C18.9815 4.19995 19.219 4.29995 19.419 4.49995C19.619 4.69995 19.719 4.93745 19.719 5.21245C19.719 5.48745 19.619 5.72495 19.419 5.92495L10.244 15.1C10.044 15.3 9.81067 15.4 9.54401 15.4C9.27734 15.4 9.04401 15.3 8.84401 15.1L4.56901 10.825C4.36901 10.625 4.27317 10.3875 4.28151 10.1125C4.28984 9.83745 4.39401 9.59995 4.59401 9.39995C4.79401 9.19995 5.03151 9.09995 5.30651 9.09995C5.58151 9.09995 5.81901 9.19995 6.01901 9.39995L9.54401 12.95ZM5.99401 19.8C5.71067 19.8 5.47317 19.7041 5.28151 19.5125C5.08984 19.3208 4.99401 19.0833 4.99401 18.8C4.99401 18.5166 5.08984 18.2791 5.28151 18.0875C5.47317 17.8958 5.71067 17.8 5.99401 17.8H17.994C18.2773 17.8 18.5148 17.8958 18.7065 18.0875C18.8982 18.2791 18.994 18.5166 18.994 18.8C18.994 19.0833 18.8982 19.3208 18.7065 19.5125C18.5148 19.7041 18.2773 19.8 17.994 19.8H5.99401Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CloseCircleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M13.8186 20.4731C4.60239 22.893 -2.98829 15.5818 3.31523 6.74072C9.6261 -2.10038 19.5705 4.8504 21.402 9.84467C23.2334 14.8389 19.0556 19.105 13.8186 20.4731Z \n M15.0413 8.87414C15.4318 8.48355 15.4318 7.85028 15.0413 7.45969C14.6508 7.0691 14.0178 7.0691 13.6273 7.45969L11.0001 10.0878L8.37284 7.4597C7.98238 7.06911 7.34932 7.06911 6.95886 7.4597C6.5684 7.85029 6.5684 8.48356 6.95886 8.87415L9.5861 11.5023L6.95886 14.1304C6.5684 14.5209 6.5684 15.1542 6.95886 15.5448C7.34932 15.9354 7.98238 15.9354 8.37284 15.5448L11.0001 12.9167L13.6273 15.5448C14.0178 15.9354 14.6508 15.9354 15.0413 15.5448C15.4318 15.1542 15.4318 14.521 15.0413 14.1304L12.4141 11.5023L15.0413 8.87414Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CloseIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m17.7742 19.618c.5091.5093 1.3347.5093 1.8439 0 .5091-.5091.5091-1.3347 0-1.8438l-5.7742-5.7742 5.7742-5.77422c.5091-.50918.5091-1.3347 0-1.84387-.5092-.50917-1.3348-.50917-1.8439 0l-5.7742 5.77419-5.77426-5.77422c-.50917-.50917-1.33469-.50917-1.84387 0-.50916.50917-.50916 1.3347 0 1.84386l5.77423 5.77426-5.77421 5.7742c-.50918.5092-.50918 1.3347 0 1.8439.50916.5092 1.33469.5092 1.84385 0l5.77426-5.7742z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CollectVideoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M12 6.85714H3V4.92857C3 3.864 3.864 3 4.92857 3H8.74072C9.17014 3 9.57257 3.21471 9.81043 3.57214L12 6.85714ZM3 6.85718H19.0714C20.136 6.85718 21 7.72118 21 8.78575V13.1438C20.9149 13.1202 20.8253 13.1077 20.7328 13.1077H13.3066L14.7071 11.7071C15.0976 11.3166 15.0976 10.6834 14.7071 10.2929C14.3166 9.90237 13.6834 9.90237 13.2929 10.2929L10.2929 13.2929C10.1054 13.4804 10 13.7348 10 14C10 14.2652 10.1054 14.5196 10.2929 14.7071L13.2929 17.7071C13.6834 18.0976 14.3166 18.0976 14.7071 17.7071C15.0976 17.3166 15.0976 16.6834 14.7071 16.2929L13.5219 15.1077H20.7328C20.8253 15.1077 20.9149 15.0951 21 15.0716V17.1429C21 19.272 19.272 21 17.1429 21H6.85714C4.728 21 3 19.272 3 17.1429V6.85718Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CommentIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2.0994 10.6931C2.04002 8.22692 1.96942 5.29509 2.11584 4.25593C2.13365 4.13216 2.14292 4.01528 2.1517 3.90469C2.21613 3.09248 2.25369 2.61894 5.44865 2.23843C9.48199 1.75807 17.1241 1.99825 20.9452 3.007C21.7385 3.21574 21.7461 3.55147 21.7624 4.26645C21.7648 4.37414 21.7675 4.49044 21.773 4.6162C21.8367 5.57691 22.0066 10.2604 21.9641 11.7255C21.9538 12.0123 21.9535 12.4616 21.9532 13.001V13.001C21.9522 14.6749 21.9507 17.2153 21.6457 18.4505C21.4546 19.2671 20.0748 19.2911 18.9073 19.171C18.4972 19.1289 17.0813 19.0734 15.3164 19.0193C14.4586 19.7428 13.2551 20.8268 12.6703 21.669C12.4667 21.9623 12.1951 22 11.9708 22C11.7566 22 11.6986 21.9343 11.3756 21.5684L11.3281 21.5147C10.6506 20.7484 9.58149 19.5267 9.00085 18.8624C7.74516 18.8383 6.69432 18.8234 6.10233 18.8234C3.78846 18.8234 2.85054 18.5199 2.51089 18.1837C2.02619 17.7038 2.08219 16.014 2.13647 14.3759L2.14543 14.1031C2.16606 13.462 2.13471 12.1599 2.0994 10.6931ZM4.33635 7.16713C4.33635 7.16713 3.83065 8.24157 4.01326 8.52809C4.14949 8.74182 8.25659 8.84926 10.9526 8.91979L10.9527 8.91979C11.8709 8.94381 12.6253 8.96354 13.0036 8.98174C14.1695 9.05337 17.7376 8.83848 19.2126 8.74298C19.24 8.74161 19.2672 8.74047 19.2943 8.73935C19.7381 8.72089 20.1152 8.7052 19.943 7.69241C19.9149 7.5014 19.8166 7.38202 19.634 7.38202C19.044 7.38202 9.89913 7.38202 7.90439 7.191L7.64546 7.16615C5.81529 6.99024 4.8063 6.89326 4.33635 7.16713ZM19.8977 11.4732C20.0908 11.7527 19.6254 12.8452 19.6254 12.8452C19.166 13.1363 18.1541 13.0769 16.3186 12.9692C16.2338 12.9642 16.1473 12.9591 16.059 12.9539C14.0586 12.8372 4.92114 13.177 4.33049 13.199L4.33037 13.199C4.14788 13.2058 4.04518 13.0901 4.01001 12.9003C3.80035 11.8946 4.17656 11.8649 4.61942 11.83C4.64638 11.8278 4.67359 11.8257 4.70093 11.8233C6.17134 11.673 9.72893 11.3257 10.8967 11.3539C11.2754 11.3581 12.0301 11.3498 12.9486 11.3396C15.6454 11.3099 19.7536 11.2646 19.8977 11.4732Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CommunityIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m14.8307 3.14077c.3645.16757.686.31534.9541.40981l.0186.00652c1.2355.43528 5.3747 1.89346 6.0303 4.36204.5612 2.11356-.3999 4.17296-1.3677 6.24656-.1682.3606-.3367.7217-.4975 1.0835-.0379.0854-.0756.1704-.1132.255-1.4657 3.3022-2.6018 5.8617-4.6582 6.3731-2.1092.5247-5.1606-.7312-7.71054-1.9147-.05102-.0244-.10251-.0491-.15441-.0738-1.99154-.951-4.60465-2.1987-5.20489-4.1987-.61588-2.0523 1.14517-6.02627 2.25161-7.92519.20562-.35289.40011-.72469.59807-1.10314.86724-1.65795 1.80113-3.44328 4.02973-4.32392 2.19233-.86633 4.35703.12865 5.82403.80292zm-2.2269 2.13686c-.5027-.24679-1.1143-.04716-1.366.44591l-.6538 1.281-1.30983-.64294c-.50277-.24679-1.11436-.04714-1.36603.44591-.25167.49306-.04812 1.09282.45465 1.33961l1.3098.64293-1.50554 2.94955-1.44199-.7078c-.50276-.2468-1.11435-.0471-1.36602.4459-.25167.4931-.04812 1.0928.45465 1.3396l1.44198.7078-.77998 1.5281c-.25167.4931-.04812 1.0929.45464 1.3396.50277.2468 1.11436.0472 1.36603-.4459l.77999-1.5281 2.98935 1.4674-.7622 1.4931c-.2517.4931-.0481 1.0929.4547 1.3397.5027.2467 1.1143.0471 1.366-.446l.7622-1.4931 1.4413.7075c.5028.2468 1.1144.0471 1.366-.446.2517-.4929.0482-1.0928-.4546-1.3396l-1.4414-.7074 1.5055-2.9496 1.5735.7724c.5028.2468 1.1144.0472 1.3661-.4459.2516-.4931.0481-1.0928-.4546-1.3396l-1.5736-.7724.6717-1.31597c.2518-.49306.0482-1.09282-.4546-1.33961-.5027-.24679-1.1143-.04715-1.366.4459l-.6718 1.31598-2.9892-1.46736.6538-1.281c.2517-.49306.0481-1.09283-.4547-1.33961zm1.8788 5.87347-1.5055 2.9496-2.98937-1.4674 1.50557-2.94954z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ContactUsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2 7.13053c1.02794.75462 2.30848 1.82137 3.61006 2.90567 0 0 5.06424 3.9629 5.81564 3.9629 1.8549 0 3.7992-1.8146 5.1678-2.8746 1.3176-1.0205 2.7467-2.21282 4.0625-3.31055.1651-.13774.3285-.27408.4895-.40831-.0011.22999.0035.44719.0315.64131.3947 2.63975.4326 8.17435 0 11.09695-.3145.4144-.8493.9882-3.0513.8288s-11.82778-.2869-12.92877-.2231c-1.101.0637-2.39073-.0638-2.61093-1.1158-.40264-1.7682-.5511-8.74247-.586-11.50327zm16.4311-2.99936c1.2812.09529 1.9619.48357 2.322 1.00077-.4574.37757-.9338.77506-1.4207 1.18138-1.2989 1.0838-2.6732 2.23056-3.9636 3.22999-.9655.74789-1.8517 1.38729-2.5896 1.83539-.3691.2242-.6815.3884-.9342.4939-.2367.0989-.3632.1358-.5917.0084-.2306-.1286-.5322-.3283-.8998-.5958-.73248-.5331-1.63926-1.2708-2.61739-2.08202-.26991-.22385-.54604-.45404-.8253-.68686-.21657-.18055-.43504-.36268-.65398-.54466l-.65679-.54374c-1.20143-.98965-2.37365-1.92213-3.27827-2.50838.22838-.42619.59195-.78832 1.14091-.78831 1.57531.00002 3.21902-.03191 4.885-.06428 3.39902-.06604 6.89072-.13388 10.08342.06422z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CopyDisabledIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m23.7071 1.70711c.3905-.39053.3905-1.023692 0-1.414217-.3905-.3905241-1.0237-.3905241-1.4142 0l-22.000007 22.000007c-.3905238.3905-.3905242 1.0237 0 1.4142.390524.3905 1.023687.3905 1.414217 0zm-5.0845.29289c.1737 0 .3443.01298.5109.03803l-3.3066 3.30661h-8.21351c-.93263 0-1.68869-.74873-1.68869-1.67232 0-.92361.75606-1.67232 1.68869-1.67232zm-14.9339 4.94911h10.5338l-12.2225 12.22249v-10.55017c0-.92359.75605-1.67232 1.6887-1.67232zm13.5095 2.68113-12.36977 12.36976h10.68107c.9327 0 1.6887-.7487 1.6887-1.6723zm4.7671-4.76707-3.3427 3.34265v8.10658c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-.1635-.0118-.32425-.0347-.48147z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CopyIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m18.6226 16.3124c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-1.8472-1.5122-3.34464-3.3774-3.34464h-11.00921c-.93263 0-1.68869.74871-1.68869 1.67232 0 .92359.75606 1.67232 1.68869 1.67232h11.00921zm-3.1131 5.6876c.9327 0 1.6887-.7487 1.6887-1.6723v-11.70627c0-.92359-.756-1.67232-1.6887-1.67232h-11.8208c-.93265 0-1.6887.74873-1.6887 1.67232v11.70627c0 .9236.75605 1.6723 1.6887 1.6723z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CreateIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.3966 3.60341c0-.88553.7179-1.60341 1.6034-1.60341s1.6034.71788 1.6034 1.60341v6.79319h6.7932c.8856 0 1.6034.7179 1.6034 1.6034 0 .8856-.7178 1.6034-1.6034 1.6034h-6.7932v6.7932c0 .8856-.7179 1.6034-1.6034 1.6034s-1.6034-.7178-1.6034-1.6034v-6.7932h-6.7932c-.88554 0-1.6034-.7178-1.6034-1.6034 0-.8855.71786-1.6034 1.6034-1.6034h6.7932z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DeleteIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m14.904 2.36857c.6808.18014 1.0637 1.89327 1.3326 3.11843 1.0626.02303 2.1802.06975 3.3652.15126.5509.0379.9669.51528.929 1.06626-.0379.55099-.5153.96692-1.0663.92902-3.2573-.22405-5.9961-.17824-8.5308-.1036-.3474.01023-.6918.02104-1.03385.03178-2.1416.06726-4.18778.13153-6.28166.02989-.55163-.02678-.97711-.49568-.95034-1.04731.02678-.55164.49568-.97712 1.04731-.95034 1.04212.05058 2.0709.0584 3.11959.04482.08961-.94493.83902-2.66045 1.49748-3.27021.72917-.67525 5.56337-.2668 6.57177 0zm-8.53971 18.93913c-.38411-1.7907-1.43613-8.7724-1.60784-10.1112-.01239-.0967-.02523-.1887-.03746-.2764-.1573-1.12763-.21516-1.5424 2.05023-1.84784 2.71293-.36579 9.32588-.45722 11.89608.31093.5336.15895.5387.4146.5496.95901.0017.082.0035.1706.0072.2664 0 2.8358-.6932 5.8331-1.3554 8.6963-.1564.6763-.3112 1.3453-.4546 2.0028-.1285.6219-1.0566.6401-1.842.5487-.7853-.0915-5.4362-.2926-6.99265-.2926-1.55635 0-1.98471 0-2.21316-.2561zm8.97891-9.2246c-.0298-.5515-.501-.9744-1.0525-.9446s-.9744.501-.9446 1.0525c.0309.5711-.027 1.5863-.123 2.7715-.0544.6721-.1166 1.3496-.1763 2.0013-.0459.5008-.0905.9868-.1291 1.4427-.0465.5504.3619 1.0342.9122 1.0807.5503.0466 1.0342-.3618 1.0807-.9122.0351-.4152.0789-.8939.1249-1.3962l.0002-.0017.0001-.0015c.0616-.6734.1271-1.3892.1808-2.0516.094-1.1611.166-2.312.1266-3.0409zm-5.56465 7.4093c.55025.0479 1.03505-.3594 1.08295-.9096.0632-.7272.0291-1.8798-.0269-3.0434-.0319-.6643-.0739-1.3823-.1135-2.0578-.0295-.504-.0576-.985-.0791-1.4014-.0285-.5516-.4987-.9756-1.05025-.9472-.55156.0285-.97562.4987-.94716 1.0502.02358.4571.05217.944.08167 1.4462.03835.653.07827 1.3328.11063 2.006.0571 1.1878.08163 2.2042.03206 2.7741-.04786.5502.3594 1.035.9096 1.0829z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DeleteSmIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <g fill=\"currentColor\">\n <path d=\"m9.05042 2c-.64391 0-1.23256.35667-1.52052.92132l-1.23015 2.41201h-1.59974c-.9389 0-1.70001.74619-1.70001 1.66667 0 .92047.76111 1.66667 1.70001 1.66667h14.59999c.9389 0 1.7-.7462 1.7-1.66667 0-.92048-.7611-1.66667-1.7-1.66667h-1.8003l-1.2301-2.41201c-.288-.56465-.8765-.92132-1.5205-.92132z\" />\n <path d=\"m6.63212 10c-.9389 0-1.63212.7462-1.63212 1.6667v8.8333c0 .9205.36086 1.5 1.29975 1.5h11.19995c.9389 0 1.5003-.5795 1.5003-1.5l-.1-8.8333c0-.9205-.4611-1.6667-1.4-1.6667z\" />\n </g>\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DottieClockIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M10 18.8889C9.54004 18.8889 9.16671 18.5155 9.16671 18.0555C9.16671 17.5955 9.54004 17.2222 10 17.2222C13.9823 17.2222 17.2223 13.9822 17.2223 9.99997C17.2223 6.01775 13.9823 2.77775 10 2.77775C9.54004 2.77775 9.16671 2.40442 9.16671 1.94442C9.16671 1.48442 9.54004 1.11108 10 1.11108C14.9012 1.11108 18.8889 5.09886 18.8889 9.99997C18.8889 14.9011 14.9012 18.8889 10 18.8889ZM13.61 13.3333C13.4478 13.3333 13.2812 13.2855 13.1367 13.1855L9.5256 10.6855C9.30115 10.53 9.16671 10.2733 9.16671 9.99997V5.27775C9.16671 4.81775 9.54004 4.44442 10 4.44442C10.46 4.44442 10.8334 4.81775 10.8334 5.27775V9.56331L14.0856 11.8144C14.4645 12.0766 14.5589 12.5955 14.2956 12.9733C14.1334 13.2066 13.8745 13.3322 13.61 13.3322V13.3333ZM5.13676 15.6966C5.13676 16.1568 4.76366 16.5299 4.30343 16.5299C3.84319 16.5299 3.47009 16.1568 3.47009 15.6966C3.47009 15.2363 3.84319 14.8632 4.30343 14.8632C4.76366 14.8632 5.13676 15.2363 5.13676 15.6966ZM1.94442 10.8333C2.40465 10.8333 2.77775 10.4602 2.77775 9.99994C2.77775 9.5397 2.40465 9.16661 1.94442 9.16661C1.48418 9.16661 1.11108 9.5397 1.11108 9.99994C1.11108 10.4602 1.48418 10.8333 1.94442 10.8333ZM5.13676 4.30332C5.13676 4.76356 4.76366 5.13666 4.30343 5.13666C3.84319 5.13666 3.47009 4.76356 3.47009 4.30332C3.47009 3.84309 3.84319 3.46999 4.30343 3.46999C4.76366 3.46999 5.13676 3.84309 5.13676 4.30332ZM6.91777 18.2755C7.378 18.2755 7.7511 17.9024 7.7511 17.4422C7.7511 16.9819 7.378 16.6088 6.91777 16.6088C6.45753 16.6088 6.08443 16.9819 6.08443 17.4422C6.08443 17.9024 6.45753 18.2755 6.91777 18.2755ZM3.39115 13.0822C3.39115 13.5425 3.01806 13.9155 2.55782 13.9155C2.09758 13.9155 1.72449 13.5425 1.72449 13.0822C1.72449 12.622 2.09758 12.2489 2.55782 12.2489C3.01806 12.2489 3.39115 12.622 3.39115 13.0822ZM2.55782 7.751C3.01806 7.751 3.39115 7.3779 3.39115 6.91766C3.39115 6.45743 3.01806 6.08433 2.55782 6.08433C2.09758 6.08433 1.72449 6.45743 1.72449 6.91766C1.72449 7.3779 2.09758 7.751 2.55782 7.751ZM7.7511 2.55772C7.7511 3.01796 7.378 3.39105 6.91777 3.39105C6.45753 3.39105 6.08443 3.01796 6.08443 2.55772C6.08443 2.09748 6.45753 1.72439 6.91777 1.72439C7.378 1.72439 7.7511 2.09748 7.7511 2.55772Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DownloadIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.60831 3.62342c0-.89747.72755-1.625 1.62499-1.625h3.25c.8974 0 1.6249.72753 1.6249 1.625l-.0733 5.37819h2.169c1.5012 0 2.1996 1.86149 1.0688 2.84899l-5.4188 4.7324c-.6123.5347-1.5256.5347-2.1378 0l-5.41894-4.7324c-1.13072-.9875-.43233-2.84899 1.06891-2.84899h2.16889zm-4.94834 15.12818c-.89747 0-1.625.7275-1.625 1.625s.72753 1.625 1.625 1.625h16.68003c.8975 0 1.625-.7275 1.625-1.625s-.7275-1.625-1.625-1.625z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const DraggableIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.4 22c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437zm7.2 0c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EllipsisIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m6.8654 12.0577c0 1.2745-1.03319 2.3077-2.3077 2.3077s-2.3077-1.0332-2.3077-2.3077 1.03319-2.3077 2.3077-2.3077 2.3077 1.0332 2.3077 2.3077zm7.6923 0c0 1.2745-1.0331 2.3077-2.3077 2.3077-1.2745 0-2.30766-1.0332-2.30766-2.3077s1.03316-2.3077 2.30766-2.3077c1.2746 0 2.3077 1.0332 2.3077 2.3077zm5.3846 2.3077c1.2746 0 2.3077-1.0332 2.3077-2.3077s-1.0331-2.3077-2.3077-2.3077c-1.2745 0-2.3077 1.0332-2.3077 2.3077s1.0332 2.3077 2.3077 2.3077z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EllipsisVerticalIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12.25 6.67311c-1.2745 0-2.30769-1.03319-2.30769-2.30771 0-1.27451 1.03319-2.3077 2.30769-2.3077s2.3077 1.03319 2.3077 2.3077c0 1.27452-1.0332 2.30771-2.3077 2.30771zm0 7.69229c-1.2745 0-2.30769-1.0331-2.30769-2.3077 0-1.2745 1.03319-2.30766 2.30769-2.30766s2.3077 1.03316 2.3077 2.30766c0 1.2746-1.0332 2.3077-2.3077 2.3077zm-2.30769 5.3846c0 1.2746 1.03319 2.3077 2.30769 2.3077s2.3077-1.0331 2.3077-2.3077c0-1.2745-1.0332-2.3077-2.3077-2.3077s-2.30769 1.0332-2.30769 2.3077z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EmbedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m13.7617 2c.0584 0 .12.00417.18.01417.6751.1 1.1442.745 1.0451 1.43166l-2.5243 17.47497c-.09.6259-.6225 1.0792-1.2251 1.0792-.0591 0-.1191-.005-.18-.0142-.6733-.1-1.14336-.745-1.0442-1.4316l2.5226-17.4767c.09-.625.6242-1.0775 1.2251-1.0775zm-7.00456 5c.31886 0 .63772.12667.87943.38167.48343.50833.48343 1.33916 0 1.8475l-2.63657 2.77083 2.63743 2.7708c.48343.5084.48343 1.3409 0 1.8492-.24172.2533-.56057.38-.87943.38-.318 0-.63771-.1267-.87857-.38l-3.51686-3.6967c-.48343-.5083-.48343-1.3391 0-1.8466l3.51686-3.69503c.24086-.255.56057-.38167.87771-.38167zm10.48556 0c.3179 0 .6376.12667.8784.38167l3.5164 3.69503c.4833.5083.4833 1.3391 0 1.8466l-3.5164 3.6967c-.2408.2533-.5605.38-.8784.38-.3188 0-.6376-.1267-.8793-.38-.4834-.5083-.4834-1.3408 0-1.8475l2.6362-2.7725-2.6371-2.77083c-.4833-.50834-.4833-1.33917 0-1.8475.2417-.255.5605-.38167.8793-.38167z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const EpisodesIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M1.412 6.647c.78 0 1.412.633 1.412 1.412v12.706H16.94c.78 0 1.412.632 1.412 1.411 0 .78-.633 1.412-1.412 1.412H1.411C.633 23.588 0 22.956 0 22.176V8.06c0-.78.632-1.412 1.412-1.412zM22.588 1C23.368 1 24 1.632 24 2.412v14.117c0 .78-.632 1.412-1.412 1.412H7.058c-.778 0-1.41-.632-1.41-1.412V2.412c0-.78.632-1.412 1.41-1.412h15.53zm-1.412 2.824H8.471v11.294h12.705V3.824zm-8.755 2.531c.252-.142.77-.138 1.019.01l4.02 2.416c.24.145.383.406.383.69 0 .282-.162.544-.403.689l-4.052 2.415c-.127.077-.324.115-.466.115-.137 0-.378-.034-.501-.105-.253-.142-.617-.409-.617-.7v-4.83c0-.289.364-.557.617-.7z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ExpandIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m13.0984 3.43938c-.5858-.58578-1.5356-.58578-2.1214 0l-3.76881 3.76885c-.58579.58579-.58579 1.53554 0 2.12132.58578.58579 1.53553.58579 2.12132 0l2.70819-2.70819 2.7082 2.70819c.5858.58579 1.5355.58579 2.1213 0 .5858-.58578.5858-1.53553 0-2.12132zm-5.9543 13.41652 3.8329 3.8329c.5858.5858 1.5356.5858 2.1214 0l3.8329-3.8329c.5858-.5858.5858-1.5356 0-2.1214s-1.5355-.5858-2.1213 0l-2.7723 2.7723-2.77228-2.7723c-.58579-.5858-1.53553-.5858-2.12132 0s-.58579 1.5356 0 2.1214z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const FavoriteIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.5016 2.97092c.6129-1.29459 2.3837-1.29459 2.9966.00001l1.7958 3.79325c.2434.51408.7138.8704 1.258.95284l4.0155.60828c1.3705.2076 1.9177 1.9633.926 2.971l-2.9056 2.9526c-.3938.4002-.5735.9767-.4805 1.5418l.6859 4.1691c.2341 1.4229-1.1985 2.508-2.4243 1.8362l-3.5916-1.9684c-.4867-.2668-1.0682-.2668-1.555 0l-3.59154 1.9684c-1.22576.6718-2.65839-.4132-2.42429-1.8361l.68593-4.1692c.09296-.5651-.08673-1.1416-.48052-1.5418l-2.90564-2.9526c-.99167-1.0077-.44446-2.7634.92599-2.971l4.0155-.60828c.5442-.08244 1.01465-.43876 1.25803-.95284z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const FavoriteOutlineIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m11.985 5.812-1.0288 2.17325c-.586 1.23773-1.74668 2.14615-3.14789 2.35845l-2.51017.3802 1.88529 1.9158c.96838.984 1.38702 2.3703 1.16718 3.7065l-.42276 2.5696 2.07515-1.1373c1.2371-.678 2.727-.678 3.9641 0l2.0751 1.1373-.4227-2.5696c-.2199-1.3362.1988-2.7225 1.1672-3.7065l1.8853-1.9158-2.5102-.3802c-1.4012-.2123-2.5619-1.12072-3.1479-2.35845zm1.4983-2.69239c-.6128-1.2946-2.3837-1.2946-2.9965 0l-1.79583 3.79325c-.24338.51408-.71383.87041-1.25803.95284l-4.0155.60828c-1.37045.2076-1.91766 1.96332-.926 2.97102l2.90565 2.9526c.39379.4002.57348.9767.48052 1.5417l-.68593 4.1692c-.2341 1.4229 1.19852 2.508 2.42429 1.8362l3.59153-1.9684c.4868-.2668 1.0683-.2668 1.5551 0l3.5915 1.9684c1.2258.6718 2.6584-.4133 2.4243-1.8362l-.6859-4.1692c-.093-.565.0867-1.1415.4805-1.5417l2.9057-2.9526c.9916-1.0077.4444-2.76342-.926-2.97102l-4.0155-.60828c-.5442-.08243-1.0147-.43875-1.2581-.95284z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const FilterIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2 6.28571C2 5.49673 2.63959 4.85714 3.42857 4.85714H20.5714C21.3604 4.85714 22 5.49673 22 6.28571C22 7.07469 21.3604 7.71428 20.5714 7.71428H3.42857C2.63959 7.71428 2 7.07469 2 6.28571ZM4.85714 12C4.85714 11.211 5.49674 10.5714 6.28571 10.5714H17.7143C18.5033 10.5714 19.1429 11.211 19.1429 12C19.1429 12.789 18.5033 13.4286 17.7143 13.4286H6.28571C5.49674 13.4286 4.85714 12.789 4.85714 12ZM9.85714 16.2857C9.06816 16.2857 8.42857 16.9253 8.42857 17.7143C8.42857 18.5033 9.06817 19.1429 9.85714 19.1429H14.1429C14.9318 19.1429 15.5714 18.5033 15.5714 17.7143C15.5714 16.9253 14.9318 16.2857 14.1429 16.2857H9.85714Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const GearIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.67556 21.6465 1.89584.3535.3926-1.9249c1.1027.034 2.1897-.0828 3.2074-.367l1.0729 1.7617 1.6555-.9092c.6409-.3283 1.255-.7575 1.7891-1.2373l1.3885-1.2374-1.4908-1.4954c.5245-.7911.9285-1.7273 1.1783-2.8192l2.0748.1226.1335-1.7929c.0268-.3282.0268-.6817.0268-1.01v-.2273-.0001c0-.2525 0-.4545-.0268-.6818l-.1335-1.81815-2.1093.12467c-.3096-1.10015-.8292-1.97313-1.4952-2.64471l1.0411-1.92441-1.7089-.83334c-.6676-.30303-1.3885-.55556-2.1629-.70708l-1.8692-.37878-.4549 2.02227c-1.0724.02298-2.1706.21979-3.21617.5585l-.97506-1.72218-1.68224.85858c-.61415.30303-1.2016.68182-1.76234 1.08586l-1.52203 1.16163 1.46422 1.72321c-.47141.78434-.85454 1.74705-1.11019 2.78393l-2.06298-.1637-.1602 1.8182c-.02671.4041-.05341.808-.05341 1.1869 0 .2524 0 .505.0267.7575l.10681 1.8182 2.10099-.1241c.27942 1.014.75807 1.9261 1.47723 2.6267l-.8813 2.0681 1.76235.6566c.0465.0165.09173.033.13625.0493.16001.0583.31079.1132.4779.1528.48065.1262.98799.2524 1.46863.3282zm.61417-12.55053c2.29637-1.71717 6.72897-1.81818 6.78237 2.34843.0534 4.1668-3.3378 5.2526-6.22162 4.4192-2.88385-.8333-2.13619-5.606-.56075-6.76763z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const GettingStartedIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.217 3.06901c.04358-.54546-.36709-1.02266-.91726-1.06587-.55017-.0432-1.03149.36395-1.07507.9094-.40883 5.11717-.16781 10.44226.00568 14.27546.07054 1.5585.12991 2.8704.12992 3.8213 0 .5472.44739.9907.99929.9907.55188 0 .99928-.4435.99928-.9907 0-1.0818-.06403-2.4873-.13829-4.1175-.1733-3.8042-.40231-8.83162-.00355-13.82279zm9.9563 12.74949c-2.2507.1558-5.3327.2449-6.97506-.1558-.97326-.2449-1.05436-.7346-1.1963-5.3426l-.00276-.09c-.13968-4.53423-.17773-5.76919.12443-6.47688.34469-.8459 1.56125-1.06851 2.98058-1.29111 1.27741-.20035 11.58171-.88811 12.66971 0 .5698.46517-.7384 1.42159-2.4235 2.65368-1.5322 1.12022-3.376 2.46834-4.4034 3.88231 1.3949 1.3481 3.0566 2.4259 4.4165 3.308 1.8792 1.2189 3.1824 2.0642 2.4104 2.7326-.6999.6059-2.7027.6408-4.8097.6775-.9455.0165-1.9119.0333-2.7909.1023z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","export const GlobeIcon = ({ ...props }) => {\n return (\n <svg {...props}>\n <g id=\"path\">\n <path\n d=\"M7.65627 1.71562C6.06613 2.32378 4.62011 3.29415 3.51622 4.59949C1.96831 6.4299 1.05108 8.79219 0.845234 11.1393C1.09887 11.1103 1.40015 11.0776 1.74531 11.0428C2.57641 10.9591 3.66238 10.8638 4.95062 10.7817C5.01134 9.27806 5.28616 7.82783 5.67836 6.4794C6.19762 4.69416 6.92703 3.0717 7.65627 1.71562Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M6.45598 10.6976C6.52204 9.38849 6.76617 8.11027 7.11867 6.89833C7.77653 4.63656 8.80374 2.63467 9.71201 1.14475C10.3391 1.03232 10.9748 0.972202 11.6088 0.96582C11.6319 1.0021 11.6561 1.04012 11.6811 1.07984C11.9491 1.50469 12.3203 2.12264 12.7281 2.88811C13.5459 4.42302 14.5009 6.53176 15.0748 8.85394C15.2228 9.45317 15.3448 10.0635 15.4326 10.6794C12.1484 10.5285 9.13304 10.5738 6.653 10.6883C6.58695 10.6913 6.52127 10.6944 6.45598 10.6976Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M4.9638 12.284C3.73179 12.3635 2.69271 12.455 1.89556 12.5353C1.45914 12.5792 1.09536 12.6198 0.812256 12.6531C0.93317 15.3097 2.01391 17.7905 4.17645 19.2687C5.27269 20.018 6.85073 20.5926 8.60938 20.8635C6.93244 18.9808 5.91554 16.9895 5.38983 14.9839C5.15227 14.0776 5.01657 13.1745 4.9638 12.284Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M10.8824 21.0346C8.63427 18.9674 7.40822 16.7683 6.84082 14.6036C6.63042 13.8009 6.50902 12.9969 6.46149 12.1991C6.54769 12.1949 6.63459 12.1907 6.72216 12.1867C9.22193 12.0713 12.2664 12.0277 15.575 12.1878C15.6313 13.4726 15.5143 14.7616 15.1537 16.0051C14.6398 17.7773 13.6207 19.4948 11.8349 21.0003C11.5168 21.0226 11.1988 21.0338 10.8824 21.0346Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M16.5944 16.4229C16.1733 17.875 15.4618 19.2766 14.3822 20.5674C17.6751 19.644 20.5203 17.2629 21.094 12.6429C19.7333 12.4812 18.3897 12.3608 17.0794 12.2739C17.1265 13.6484 16.9926 15.0498 16.5944 16.4229Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M16.531 8.4941C16.7122 9.22762 16.8596 9.98738 16.9572 10.7629C18.3381 10.8507 19.7575 10.9751 21.1969 11.1446L21.1977 11.0964C21.2835 4.96044 17.6372 1.77532 13.4486 1.10179C13.6348 1.42031 13.8387 1.78254 14.0519 2.18276C14.905 3.78384 15.9176 6.01212 16.531 8.4941Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n );\n};\n","import type { SVGProps } from 'react';\n\nexport const GridViewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m14.6005 10.65c-.6903 0-1.25-.5597-1.25-1.25002v-6.14997c0-.69036.5597-1.25001 1.25-1.25001h6.1497c.6903 0 1.25.55965 1.25 1.25001v6.14997c0 .69032-.5597 1.25002-1.25 1.25002zm-12.6005 10.1c0 .6904.55965 1.25 1.25001 1.25h6.14961c.69038 0 1.25008-.5596 1.25008-1.25v-6.1499c0-.6903-.5597-1.25-1.25008-1.25h-6.14961c-.69036 0-1.25001.5597-1.25001 1.25zm11.3505 0c0 .6904.5597 1.25 1.25 1.25h6.1497c.6903 0 1.25-.5596 1.25-1.25v-6.1499c0-.6903-.5597-1.25-1.25-1.25h-6.1497c-.6903 0-1.25.5597-1.25 1.25zm-11.3505-11.35002c0 .69032.55965 1.25002 1.25001 1.25002h6.14961c.69038 0 1.25008-.5597 1.25008-1.25002v-6.14997c0-.69036-.5597-1.25001-1.25008-1.25001h-6.14961c-.69036 0-1.25001.55965-1.25001 1.25001z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HamburgerIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m22.0882 7.28569c-.0338.55114-.5079.9675-1.0591.92995-3.7464-.25521-6.8936-.23457-9.7993-.18333-.3986.00703-.7934.01466-1.1851.02223-2.4532.04744-4.78505.09252-7.17257-.02796-.55162-.02783-.97929-.49765-.95522-1.04937s.49076-.97641 1.04239-.94857c2.31236.11668 4.56689.07325 7.02439.0259.39351-.00758.79231-.01527 1.19731-.02241 2.9241-.05155 6.1384-.0734 9.9705.18765.5511.03754.9705.51477.9367 1.06591zm0 5.78541c-.0338.5512-.5079.9675-1.0591.93-3.7464-.2552-6.8936-.2346-9.7993-.1834-.3988.0071-.7938.0147-1.1857.0223-2.45322.0474-4.78446.0925-7.17197-.028-.55162-.0278-.97929-.4976-.95522-1.0493.02407-.5518.49076-.9765 1.04239-.9486 2.31235.1167 4.56688.0732 7.02436.0259.39354-.0076.79234-.0153 1.19734-.0224 2.9241-.0516 6.1384-.0734 9.9705.1876.5511.0376.9705.5148.9367 1.0659zm-.9753 6.5159c.552-.008.99-.4623.9782-1.0147-.0118-.5523-.4689-.9936-1.0209-.9856-6.2773.0914-10.4894-.01-14.77115-.1131-1.10589-.0266-2.21649-.0533-3.36847-.0769-.5521-.0113-1.00577.4273-1.01329.9796-.00753.5523.43393 1.0092.98603 1.0205 1.14246.0234 2.2471.05 3.3496.0765 4.28668.1032 8.54098.2057 14.85998.1137z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HazardIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12.7865 2.94054c.7413.21443 1.3767.75049 1.8003 1.39377l6.9896 12.43669c.2118.4288.4236.9649.4236 1.5009 0 1.6082-1.2708 2.8948-2.8594 2.8948h-14.19093c-.52951 0-1.05902-.1072-1.48264-.4289-1.37673-.8577-1.90624-2.6803-1.05902-4.0741l7.09548-12.32939c.2118-.42885.63541-.8577 1.05901-1.07213.6354-.42885 1.4826-.53606 2.224-.32164zm-.5295 2.03704h-.2119c-.2118 0-.3177 0-.4236.10721l-.1588.16082-.1589.16082-7.09545 12.43667c-.2118.3216-.1059.8577.31771 1.0721.08825.0893.25005.1042.36282.1067l14.25172.0005c.4236 0 .8472-.3216.8472-.8577 0-.1072 0-.3216-.1059-.4288l-7.2013-12.32947c-.1059-.21442-.2118-.32164-.4236-.42885zm.6354 11.47172c.4236.4289.4236 1.1794 0 1.6082-.3177.2144-.6354.3216-.8473.3216-.1059 0-.3177 0-.4236-.1072s-.2118-.1072-.3177-.2144c-.3953-.4003-.4217-1.0807-.079-1.5183l.079-.0899c.4236-.4288 1.165-.4288 1.5886 0zm.4236-7.93371v.21443l-.4236 5.03898c0 .7505-.2118 1.3938-.8473 1.3938-.7413 0-.9531-.6433-.9531-1.2866l-.4236-5.03897c0-.75049.5295-1.39376 1.2708-1.50097.7414-.10722 1.3768.42885 1.3768 1.17933z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HelpCenterIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m3.81493 6.36059c3.08876-4.51878 10.40947-5.95666 14.79867-2.2448 6.2012 5.24418 4.951 18.09941-6.5912 17.93811-11.542153-.1614-11.296231-11.1745-8.20747-15.69331zm.3161 4.74441c-.21438 1.3577-.18185 2.8247.21769 4.1649.39061 1.3102 1.11527 2.4485 2.26201 3.2804.47657.3457 1.05138.6568 1.74342.9052l.22047-2.8886c-1.45328-.9896-2.00163-2.605-1.99252-4.1767zm15.52497-2.11314-2.0825 1.92114c.4477 2.0742-.1406 4.3636-1.9318 5.6316l.1812 2.9024c.678-.2623 1.2582-.5962 1.7512-.9755 1.2454-.9582 2.0658-2.3068 2.4595-3.8531.4672-1.8346.3121-3.8498-.3776-5.62654zm-5.2445.22952c-.6711-.57069-1.6504-.81143-2.7043-.63891-1.0636.17412-1.97562.73537-2.47215 1.45763-.52483.7633-.86487 2.2708-.50246 3.4986.16442.557.45675 1.0039.90194 1.3287.44947.328 1.20237.6385 2.46407.6595 1.1982.02 1.9722-.2946 2.4683-.6741.5044-.3858.8546-.9408 1.0289-1.6177.3699-1.4361-.1222-3.1105-1.1843-4.01372zm-3.3565-5.09683c-.9833.16372-1.92577.48149-2.77592.92687l2.16822 1.78626c.6128-.20104 1.2593-.30765 1.903-.30943l1.694-2.39577c-.96-.17519-1.9746-.17686-2.9893-.00793z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HideIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n {...props}\n viewBox=\"0 0 24 24\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"m4.99451 4.11717c-.26525.00112-.51919.10753-.70601.29583-.18671.18841-.29096.44324-.28983.70849.00112.26525.10753.51919.29583.70601l.009.009.0045-.0045 13.932 13.8195-.0045.0045c.1909.1788.4442.2758.7056.2701.2615-.0056.5104-.1134.6934-.3003.1829-.1869.2855-.438.2856-.6995.0001-.2616-.1023-.5128-.2851-.6998l-1.4775-1.4655c2.0625-1.6245 3.9225-3.5325 3.84-4.6875.0675-.957-1.209-2.49-3.024-4.179-2.8755-2.6775-7.899-3.9105-11.553-1.7835l-1.7175-1.704c-.18841-.18671-.44325-.29096-.70849-.28983zm5.95399 5.49333-1.464-1.4505c1.5315-.7665 3.6135-.636 4.9635.519 1.533 1.311 1.983 3.738 1.113 5.508l-1.455-1.4445c.2235-.9285-.081-2.01-.825-2.64-.6315-.534-1.5405-.684-2.3325-.492zm-8.946 2.3145c-.06-.8415.915-2.088 2.25-3.33l3.1155 3.09c-.138 2.1285.897 4.5885 4.3065 4.6365.121.0017.2421-.0003.363-.006l2.4315 2.412c-3.3015.792-7.0905-.432-9.4425-2.622-1.8135-1.689-3.0915-3.2205-3.024-4.1805z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HomeIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m20.2951 12.8675c.39.3916 1.0223.3916 1.4123 0 .3901-.3915.3901-1.0264 0-1.418-.5441-.5463-1.0963-1.185-1.7355-1.92403-1.5548-1.798-3.6235-4.19026-7.3397-7.29367-.3677-.30698-.9005-.30929-1.2707-.00552-2.80856 2.30436-4.3166 3.73206-9.11644 9.27432-.3619.4179-.31787 1.0512.09835 1.4145.41623.3634 1.04703.3192 1.40893-.0987.22242-.2568.43756-.5046.64588-.7437-.12635 2.67-.31165 6.9451-.23082 7.493.03562.2352.06232.4794.08762.7106.05894.539.11018 1.0073.24856 1.1258.2571.2118.73171.2329 2.49178.2541.43145.0052 1.20203.0212 2.13063.0436-.04005-.8221-.09121-2.9385-.11733-4.0194l-.00919-.3784c-.01478-.1881-.01071-.5289-.00583-.9389.00278-.2332.00583-.4887.00583-.7514.02316-1.5293.99606-2.8171 2.31633-3.0049 1.4361-.2147 2.71.9122 2.9649 2.5488.0232.1342.0463.2683.0694.3756.1622.8049.278 4.9904.139 6.0636-.013.0978-.0151.1825-.0169.2563v.0011c1.1948.0404 2.1271.0788 2.4112.1058.8899.0847 1.9183.0847 2.0567-.4233.2768-1.0162.4548-5.9783.4548-6.6981.0122-.5599.0019-1.8728-.017-2.9434.3011.335.6026.6584.9172.9743z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HourglassIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m15.7232 10.2988c-.6792.8959-.3199 2.4081.2552 2.9902.575.5821.2595.2692 2.8516 3.3035 2.5921 3.0344-.2717 3.8307-2.8485 3.8203l-7.07912-.0286c-2.54232-.0103-5.19674-1.1217-2.25149-4.8988.67569-.7818 1.33873-1.5406 1.9048-2.1733.77137-.8621.78975-2.2582.04095-3.1399-.89303-1.05163-1.88693-2.29888-2.76384-3.4247-1.43635-2.02599-.07259-3.1681 1.57519-3.16031l9.31711.04403c1.6246.00768 2.5595 1.84424 1.601 3.15606-.8543 1.16929-1.8098 2.46542-2.6029 3.51152zm.8976 8.1748c-1.0924.2669-6.5677.2362-8.11503-.0174-1.54734-.2535-.98222-1.1902-.42583-1.8964.55639-.7061 1.20002-1.166 1.79963-1.8301.45553-.5046.92993-.9558 1.41473-1.4203.0189-.0182.0205-.0197.0076-.0097.3977-.3063 1.1425-.4605 1.6217-.2591.6321.2657 1.1417.8642 1.6292 1.3291.7252.6914 1.6262 1.596 2.4986 2.5248.5045.537.6617 1.3122-.4306 1.5791z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ImportIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M20.9995 14.0626C20.9631 16.5163 18.9626 18.4942 16.5002 18.4942H13.263V12.8027L14.6115 14.1068C15.0581 14.5387 15.7702 14.5268 16.2022 14.0802C16.6342 13.6336 16.6222 12.9213 16.1757 12.4894L13.0084 9.42632C12.9532 9.359 12.8904 9.2982 12.8212 9.24525C12.3745 8.81431 11.6631 8.82653 11.2314 9.27282L7.98828 12.6262C7.55634 13.0729 7.56825 13.7851 8.01486 14.217C8.46148 14.649 9.17371 14.6371 9.60565 14.1904L11.013 12.7352V18.4942H7.50003C5.03754 18.4942 3.03702 16.5163 3.00051 14.0626L3 14.0284V13.9943C3.03192 11.8494 4.56491 10.0682 6.59484 9.65361C6.72933 6.7847 9.09789 4.5 12.0001 4.5C14.9886 4.5 17.4114 6.92271 17.4114 9.91127C17.4114 9.98315 17.4099 10.0546 17.4072 10.1256C19.3761 10.1616 20.9661 11.8738 20.9995 13.9943L21 14.0281L20.9995 14.0626Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const InfoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m21.9985 12.0962c.156-11.337814-12.26789-12.565873-17.33611-6.47453-3.58731 4.31149-3.71983 11.58443.64734 14.61853 4.36716 3.034 16.53287 3.1937 16.68877-8.144zm-8.5688-1.5609v7.29h-2.4297v-7.29zm-.3492-2.77932c-.2329.23288-.5214.34931-.8656.34931s-.6328-.11643-.8656-.34931c-.2329-.23287-.3493-.52144-.3493-.86569s.1164-.63281.3493-.86568c.2328-.23288.5214-.34932.8656-.34932s.6327.11644.8656.34932c.2328.23287.3492.52143.3492.86568s-.1164.63282-.3492.86569z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const IntegrationsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m17.556 2c-.5523 0-1 .44771-1 1v2.43713h-2.4371c-.5523 0-1 .44772-1 1 0 .55229.4477 1 1 1h2.4371v2.43706c0 .55231.4477 1.00001 1 1.00001s1-.4477 1-1.00001v-2.43706h2.4371c.5523 0 1-.44771 1-1 0-.55228-.4477-1-1-1h-2.4371v-2.43713c0-.55229-.4477-1-1-1zm-11.16851 1.26404c1.23017-.04521 2.91132-.02893 3.79511.2616.5235.17684.5544.48675.507 3.38818l-.001.05678c-.0467 2.85493-.0594 3.6326-.2431 4.0706-.2107.5239-.87939.6353-1.65859.742-.70121.096-5.08453.1317-5.9701-.1168-.54681-.1498-.67672-.7304-.73486-3.74861-.06216-3.43916.04971-3.98138.6889-4.17828.6165-.18385 2.06436-.40204 3.61664-.47547zm.12642 18.83116c-1.22709.0981-2.90743.1543-3.80287-.098-.53064-.1541-.57486-.4625-.65224-3.3633l-.00151-.0567c-.07615-2.8543-.0969-3.6317.06784-4.0772.18793-.5325.85123-.6727 1.62507-.8128.69645-.1261 5.07421-.3503 5.96961-.1401.55279.1261.70749.7007.89549 3.7136.21 3.4333.1212 4.1716-.5089 4.3958-.54029.1923-1.46289.2656-2.56636.3533h-.00003-.00022c-.32776.026-.67148.0534-1.02588.0854zm5.85269-7.7969c-.2522.8955-.3521 2.4643-.254 3.6914.1402 1.5478.3059 2.9399.5161 3.5479.2242.6301 1.1312.7485 4.5645.5384 3.0129-.1879 3.5875-.3426 3.7136-.8953.2102-.8955-.014-5.2733-.1401-5.9698-.1402-.7737-.2803-1.4371-.8128-1.625-.4455-.1647-1.2229-.144-4.0773-.0678l-.0567.0015c-2.9008.0774-3.2991.2481-3.4533.7787z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const InviteIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M15.125 3.12081C18.0843 5.62343 17.4877 11.7582 11.9795 11.6812C6.47136 11.6042 6.43167 6.04421 7.90568 3.88776C9.37969 1.73131 13.0303 1.34944 15.125 3.12081ZM3.0867 22.0565C2.57221 22.0699 2.11037 21.7159 2.06799 21.2867C1.82858 19.0425 2.14219 16.2745 4.3016 14.5465C7.60285 11.9186 14.0238 12.3416 17.9678 14.1067C15.7016 14.5823 14 16.5924 14 19C14 20.1954 14.4195 21.2928 15.1193 22.153L3.0867 22.0565Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M18.3015 16.7C18.3015 16.3134 18.6149 16 19.0015 16C19.3881 16 19.7015 16.3134 19.7015 16.7V18.3012H21.3025C21.6891 18.3012 22.0025 18.6146 22.0025 19.0012C22.0025 19.3878 21.6891 19.7012 21.3025 19.7012H19.7015V21.3025C19.7015 21.6891 19.3881 22.0025 19.0015 22.0025C18.6149 22.0025 18.3015 21.6891 18.3015 21.3025V19.7012H16.7C16.3134 19.7012 16 19.3878 16 19.0012C16 18.6146 16.3134 18.3012 16.7 18.3012H18.3015V16.7Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { JSX } from 'react';\n\nexport const LightningBoltIcon = ({ ...props }): JSX.Element => {\n return (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M10.9912 2.11398C13.1572 1.94882 16.3205 1.97579 18.5935 2.11398C19.3811 2.16116 20.1345 2.60607 19.4239 3.66777C18.2339 5.44738 16.9412 6.85287 15.3189 8.67629C16.6715 8.64259 18.1183 8.58866 19.5865 8.62911C20.8579 8.66618 21.5256 9.28972 20.494 10.3649C16.9027 14.1028 12.2839 17.9788 7.77226 21.0493C5.69192 22.4649 4.57469 22.384 5.34947 20.2337C6.00011 18.4305 7.42982 15.4139 8.80387 12.9399C7.47262 13.0074 5.53782 13.0208 4.18945 12.9939C3.1878 12.9737 2.81539 12.4276 3.08507 11.6962C4.02679 9.1212 6.26123 5.60579 8.21743 3.39476C9.04786 2.45777 9.48448 2.22857 10.9912 2.11398Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import type { SVGProps } from 'react';\n\nexport const LinkIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m19.1411 3.22522c-1.6336-1.63363-4.2823-1.63363-5.9159 0l-4.42241 4.42244c-1.63362 1.63364-1.63362 4.28224 0 5.91594l1.12908 1.1291c.54453.5445 1.42743.5445 1.97203 0 .5445-.5446.5445-1.4275 0-1.972l-1.1291-1.1291c-.5446-.5445-.5446-1.4274 0-1.97196l4.4224-4.42245c.5445-.54454 1.4275-.54454 1.972 0l1.6336 1.63364c.5446.54455.5446 1.42744 0 1.97198l-1.514 1.51399c-.5445.5445-.5445 1.4274 0 1.972.5445.5445 1.4274.5445 1.972 0l1.514-1.514c1.6337-1.63365 1.6337-4.28229 0-5.91593zm-14.28222 17.54948c1.63363 1.6337 4.28228 1.6337 5.91592 0l4.4224-4.4224c1.6337-1.6336 1.6337-4.2822 0-5.9159l-.891-.89097c-.5445-.54454-1.4274-.54454-1.9719 0-.5446.54457-.5446 1.42747 0 1.97197l.891.891c.5445.5445.5445 1.4274 0 1.972l-4.42248 4.4224c-.54455.5445-1.42742.5445-1.97198 0l-1.63365-1.6337c-.54454-.5445-.54454-1.4274 0-1.9719l1.51404-1.5141c.54454-.5445.54454-1.4274 0-1.9719-.54455-.5446-1.42744-.5446-1.97197 0l-1.51405 1.514c-1.63362 1.6337-1.63361 4.2823.00002 5.9159z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ListViewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m9.59493 13.25c.70527 0 1.19227.4311 1.25817 1.0932l.0077.1568v6.25c0 .6964-.4366 1.1773-1.10708 1.2424l-.15879.0076h-6.3291c-.70525 0-1.19221-.4311-1.25817-1.0932l-.00766-.1568v-6.25c0-.6964.43658-1.1773 1.10704-1.2424l.15879-.0076zm11.13927 5c.7595 0 1.2658.5 1.2658 1.25 0 .6964-.4366 1.1773-1.107 1.2424l-.1588.0076h-6.3291c-.7595 0-1.2659-.5-1.2659-1.25 0-.6964.4366-1.1773 1.1071-1.2424l.1588-.0076zm0-3.75c.7595 0 1.2658.5 1.2658 1.25 0 .6964-.4366 1.1773-1.107 1.2424l-.1588.0076h-6.3291c-.7595 0-1.2659-.5-1.2659-1.25 0-.6964.4366-1.1773 1.1071-1.2424l.1588-.0076zm-11.13927-12.5c.70527 0 1.19227.43112 1.25817 1.0932l.0077.1568v6.25c0 .6964-.4366 1.1773-1.10708 1.2424l-.15879.0076h-6.3291c-.70525 0-1.19221-.4311-1.25817-1.0932l-.00766-.1568v-6.25c0-.69643.43658-1.1773 1.10704-1.24244l.15879-.00756zm11.13927 5c.7595 0 1.2658.5 1.2658 1.25 0 .69642-.4366 1.17729-1.107 1.24243l-.1588.00757h-6.3291c-.7595 0-1.2659-.5-1.2659-1.25 0-.69642.4366-1.17729 1.1071-1.24243l.1588-.00757zm0-3.75c.7595 0 1.2658.5 1.2658 1.25 0 .69642-.4366 1.1773-1.107 1.24244l-.1588.00756h-6.3291c-.6329 0-1.2659-.5-1.2659-1.25 0-.69643.4366-1.1773 1.1071-1.24244l.1588-.00756z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const LiveIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m22.9958 11.8791c-.0478 1.702-.5318 3.3895-1.4008 4.8848-.0956.168-.2708.2707-.4681.2768-.19.0048-.3505-.0762-.4498-.2225-.0464-.0856-.1002-.1603-.1479-.2267l-.0004-.0005c-.0171-.023-.0331-.0459-.0539-.0762-.1373-.1849-.1557-.4073-.0527-.5959.7145-1.2596 1.0981-2.6291 1.1398-4.0809v-.2671c0-2.35354-.929-4.59584-2.6166-6.31354-1.7648-1.79263-4.1375-2.81406-6.6878-2.87571h-.2574c-2.49402 0-4.85688.92593-6.65354 2.60857-1.80157 1.68626-2.83103 3.94308-2.89721 6.35578-.04167 1.6585.36644 3.2819 1.17653 4.6865.1103.2067.09804.4461-.04167.6516-.00792.0135-.0171.0274-.02656.0417-.00665.01-.01343.0203-.02001.0308-.01961.029-.03922.0592-.05393.0822-.11642.1813-.31374.2889-.53434.2841-.21815-.0037-.40566-.1112-.51596-.2938-.99269-1.6838-1.486591-3.5913-1.42899-5.5169.07966-2.82857 1.29786-5.4589 3.4291-7.40627 2.05893-1.87967 4.73186-2.90593 7.55798-2.90593.103 0 .2059 0 .3088.00484 2.9438.07615 5.6731 1.25109 7.6867 3.30604 2.0197 2.05253 3.0884 4.74088 3.0087 7.56822zm-3.391.5476c-.0307 1.1242-.277 2.1855-.7341 3.1598-.0834.1837-.2304.3203-.413.3844-.1778.0604-.3689.0459-.5405-.0399l-.0662-.0339h-.0172c-.3394-.2018-.4644-.6467-.2843-1.0419.3481-.764.5442-1.621.5662-2.4768.0441-1.6742-.5466-3.26741-1.6643-4.48829-1.1263-1.21725-2.6484-1.91352-4.2931-1.95945h-.1581c-1.5969 0-3.10922.63461-4.25878 1.78538-1.14712 1.14956-1.80402 2.68836-1.84569 4.33106-.02206.8462.1152 1.6718.40934 2.4539.14094.3663.0147.7712-.29291.9719l-.07966.035c-.17525.0907-.38482.1016-.57233.0327-.19242-.0726-.34071-.2164-.41547-.4086-.39462-.9949-.57968-2.0525-.54904-3.1465.05515-2.15044.9449-4.1377 2.5038-5.5955 1.46576-1.37077 3.35434-2.09484 5.31404-2.04165 1.9351.04956 3.7428.84374 5.1203 2.2411l-.0086.00846.1937.20912c1.4057 1.52187 2.1471 3.51757 2.0859 5.61967zm-5.3532-2.91072c2.1287 1.76482 1.7071 6.09952-2.2624 6.04882-3.95856-.0508-3.9892-3.989-2.93032-5.5085 1.05892-1.51944 3.68152-1.79505 5.19272-.54032zm-8.66839 13.38252c-.37011.0109-.69979-.2345-.73043-.5403v-.0012c-.17525-1.5811.05148-3.5394 1.60425-4.7639 3.25997-2.5602 10.76767-1.0407 12.06317 1.4179.5453 1.0106.761 2.2145.6483 3.3871-.0111.3263-.3812.6019-.8334.6019z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const LockIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12 3c3.3137 0 5.9999 2.68629 5.9999 6 .8285 0 1.5.67158 1.5 1.5v9c0 .8284-.6715 1.5-1.5 1.5h-11.9999c-.82844 0-1.5-.6716-1.5-1.5v-9c0-.82842.67156-1.5 1.5-1.5 0-3.31371 2.68629-6 6-6zm0 3c-1.6569 0-3 1.34314-3 3h5.9999c0-1.65686-1.343-3-2.9999-3zm0 12c1.6569 0 2.9999-1.3431 2.9999-3s-1.343-3-2.9999-3-3 1.3431-3 3 1.3431 3 3 3z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const LogoutIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.70507 7.67368c1.74622-5.02899 8.66503-6.766142 13.67123-4.38094 7.0728 3.36988 9.1132 15.77696-1.6595 18.53426-10.77276 2.7573-13.757949-9.1243-12.01173-14.15332zm7.80893-.83709c-.3854-.38176-1.00379-.37523-1.38114.0146l-2.96599 3.06372c-.02406.02443-.04687.05013-.06831.07698-.0482.06031-.08835.12501-.12044.19261-.05827.1225-.09227.259-.09573.4033-.00048.0193-.00031.0386.00025.0579.00388.1177.02812.2303.06928.3341.04648.1175.11615.2278.20904.3237l2.9719 3.0699c.37735.3898.99574.3963 1.38114.0145.3853-.3818.3918-1.0072.0143-1.3971l-1.34627-1.3907h1.58317c2.6969 0 4.8831 2.2116 4.8831 4.9397v.4083c0 .5457.4372.988.9766.988s.9766-.4423.9766-.988v-.4083c0-3.8194-3.0607-6.91554-6.8363-6.91554h-1.58306l1.34616-1.39058c.3775-.38982.371-1.01532-.0143-1.39709z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const MediaIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m12.0946 20.4146c-2.54091-.0423-5.06588-.0847-6.15454-.0847-3.43484 0-3.51232-.6046-3.74674-2.4432-.024-.1906-.0495-.381-.07648-.5712-.19072-1.292-.10927-9.0787-.02682-10.80108.00993-.23536.01092-.45497.0139-.66079.01689-1.62391.02384-2.35363 3.34445-2.35363 2.48524 0 7.86103.07189 11.47163.12113 1.8247.02462 3.1985.04333 3.5193.04333.9555.03348 1.4194 1.09311 1.474 2.08774.0547.99463.0269 5.566 0 7.0569-.0079.3349.011.8312.0338 1.4103.0586 1.5461.1391 3.6801-.1976 4.8845-.3 1.1935-1.7204 1.3925-2.9213 1.3925-.7103.0177-3.7329-.0325-6.7336-.0818zm-7.78952-14.74217.03775.9769c.00376.10022.04593.19523.11791.26568s.16836.11103.26947.11347l1.28136.03052c.05395.00123.10758-.00845.15762-.02844.05005-.01999.09547-.04988.13348-.08785.03801-.03796.06783-.0832.08763-.13296.0198-.04977.02917-.10301.02753-.15648l-.02781-.92766c-.00278-.09829-.04254-.19199-.11147-.2627-.06892-.0707-.16203-.11329-.26102-.1194l-1.29129-.07878c-.05542-.00335-.11094.00486-.16297.0241-.05203.01923-.09941.04907-.13909.08757-.03969.03851-.07079.08484-.0913.136-.02051.05115-.02998.10502-.0278.16003zm3.23121.9769-.03774-.97591c-.00219-.05501.00728-.10987.0278-.16102.02051-.05116.05161-.09749.09129-.136.03969-.0385.08707-.06834.1391-.08757.05203-.01924.10754-.02745.16297-.0241l1.29129.07878c.09899.00611.19209.0487.26102.1194.06892.07071.10869.16441.11147.2627l.02781.92766c.00164.05356-.00776.10688-.02762.15671s-.04976.09512-.08789.1331c-.03812.03798-.08365.06785-.13382.08778-.05016.01993-.1039.02951-.15792.02814l-1.28037-.03052c-.10112-.00244-.19749-.04302-.26947-.11347s-.11415-.16546-.11792-.26568zm11.65041 11.52887-.0397-.9769c-.004-.1001-.0463-.1948-.1182-.2651-.072-.0702-.1682-.1107-.2692-.1131l-1.2794-.0315c-.054-.0014-.1077.0082-.1579.0282-.0502.0199-.0957.0498-.1338.0877-.0381.038-.068.0833-.0879.1331-.0199.0499-.0293.1032-.0276.1567l.0278.9287c.0028.0983.0425.192.1115.2627.0689.0707.162.1133.261.1194l1.2913.0788c.0555.0035.1111-.0046.1633-.0238.0521-.0192.0996-.049.1394-.0875s.071-.0849.0916-.1362c.0205-.0512.03-.1061.0278-.1612zm-8.4579-11.52887-.0388-.97591c-.0022-.0551.0073-.11004.0279-.16127s.0518-.09761.0916-.13613c.0397-.03852.0873-.06834.1394-.08751s.1078-.02727.1633-.02378l1.2913.07878c.099.00611.1921.0487.261.1194.0689.07071.1087.16441.1115.2627l.0278.92766c.0016.05356-.0078.10688-.0276.15671-.0199.04983-.0498.09512-.0879.1331-.0382.03798-.0837.06785-.1339.08778-.0501.01993-.1039.02951-.1579.02814l-1.2803-.03052c-.1012-.00244-.1975-.04302-.2695-.11347s-.1142-.16546-.1179-.26568zm3.1547 10.56767.0397.9769c.0038.1003.046.1953.1179.2657.072.0705.1684.111.2695.1135l1.2794.0305c.054.0014.1077-.0082.1579-.0281.0502-.02.0957-.0498.1338-.0878.0382-.038.0681-.0833.0879-.1331.0199-.0498.0293-.1032.0276-.1567l-.0278-.9277c-.0028-.0983-.0425-.192-.1114-.2627-.069-.0707-.1621-.1133-.2611-.1194l-1.2913-.0788c-.0554-.0034-.1109.0046-.163.0237-.0521.0192-.0995.0489-.1393.0873s-.071.0847-.0916.1358c-.0207.0511-.0303.1059-.0282.1609zm2.07-11.56033.0388.97691c.0022.0551-.0073.11004-.0279.16126-.0206.05123-.0518.09761-.0916.13613-.0397.03853-.0873.06834-.1394.08751s-.1078.02727-.1633.02378l-1.2913-.07878c-.099-.00611-.1921-.0487-.261-.1194s-.1087-.16441-.1115-.2627l-.0268-.92865c-.0015-.05347.008-.10668.0279-.1564.02-.04971.0499-.09488.088-.13275.0381-.03788.0836-.06766.1337-.08753s.1037-.02942.1577-.02806l1.2793.03053c.101.00242.1972.04286.2692.11311.0719.07024.1142.16501.1182.26504zm-3.1547 12.52153-.0397-.9769c-.004-.1001-.0463-.1948-.1183-.2651-.0719-.0702-.1682-.1107-.2691-.1131l-1.2794-.0315c-.054-.0014-.1077.0082-.1579.0282-.0502.0199-.0957.0498-.1338.0877-.0382.038-.0681.0833-.0879.1331-.0199.0499-.0293.1032-.0276.1567l.0278.9287c.0028.0983.0425.192.1114.2627.069.0707.1621.1133.2611.1194l1.2913.0788c.0555.0035.1111-.0046.1632-.0238.0522-.0192.0997-.049.1395-.0875s.071-.0849.0915-.1362c.0206-.0512.0301-.1061.0279-.1612zm4.3169-11.52887-.0387-.97591c-.0022-.0551.0073-.11004.0278-.16127.0206-.05123.0518-.09761.0916-.13613s.0873-.06834.1394-.08751c.0522-.01917.1078-.02727.1633-.02378l1.2913.07878c.099.00611.1921.0487.261.1194.0689.07071.1087.16441.1115.2627l.0268.92766c.0017.05356-.0077.10688-.0276.15671s-.0498.09512-.0879.1331-.0836.06785-.1338.08778-.1039.02951-.1579.02814l-1.2794-.03052c-.1011-.00244-.1975-.04302-.2695-.11347s-.1141-.16546-.1179-.26568zm-9.61715 10.56767.03774.9769c.00377.1003.04594.1953.11792.2657.07198.0705.16835.111.26947.1135l1.28037.0305c.05402.0014.10776-.0082.15792-.0281.05017-.02.0957-.0498.13382-.0878.03813-.038.06803-.0833.08789-.1331s.02926-.1032.02762-.1567l-.02781-.9277c-.00278-.0983-.04255-.192-.11147-.2627-.06893-.0707-.16203-.1133-.26102-.1194l-1.29129-.0788c-.05534-.0033-.11077.0049-.16273.0241-.05196.0191-.09929.0489-.13896.0873-.03966.0384-.07079.0846-.09136.1356-.02058.0511-.03016.1058-.02811.1607zm-1.12442-.0157.03874.9769c.0022.0551-.0073.11-.02787.1612-.02057.0513-.05177.0977-.09156.1362s-.0873.0683-.13945.0875c-.05214.0192-.10777.0273-.16328.0238l-1.29129-.0788c-.09899-.0061-.19209-.0487-.26102-.1194-.06892-.0707-.10868-.1644-.11147-.2627l-.02682-.9287c-.00163-.0535.00776-.1068.02762-.1567.01987-.0498.04977-.0951.08789-.1331.03812-.0379.08366-.0678.13382-.0877.05017-.02.1039-.0296.15793-.0282l1.27937.0315c.10095.0024.19719.0429.26914.1131.07196.0703.11424.165.11825.2651zm3.80237-2.9248c.7986-.4491 3.1935-1.8288 3.8699-2.7082.0695-.0866.0348-.2068-.0517-.259l-3.7834-1.9656c-.1212-.06893-.26029.01773-.26029.13787-.03477.91383-.03476 3.72543-.03476 4.63833 0 .1379.13905.2245.26025.1556z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const MegaphoneIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m17.5195 3.01289c-4.627 1.42268-11.69556 3.59505-15.22532 6.18514-.42573.28958-.38276 3.56277.08595 3.85137l3.70565.9222c0 1.5508.65158 6.8268 4.88692 7.9398 2.7752.5721 4.9538-1.682 6.3529-5.1187 1.3822.3522 2.4765.6347 3.0381.787.9834.4561 1.0593.1413 1.1653-.2986l.028-.113c.7675-5.272.3407-12.86975.1699-14.64054-.042-.41268-.6806-.65887-1.2353-.45404-.7635.26032-1.7888.57512-2.9721.93937zm-1.9957 13.32381c-2.4993-.6302-4.9994-1.2571-7.50025-1.8808.13291 2.0079.52966 4.711 3.14105 5.2478 2.3435.7133 3.1889-.9989 4.1973-3.0391z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const MoreOptionsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m20.5717 17.2858c.79 0 1.4283.6384 1.4283 1.4284s-.6383 1.4283-1.4283 1.4283h-11.43003c-.78834 0-1.42834-.6383-1.42834-1.4283s.64-1.4284 1.42834-1.4284zm-17.14337 0c.79 0 1.42917.6384 1.42917 1.4284s-.63917 1.4283-1.42917 1.4283c-.78833 0-1.42833-.6383-1.42833-1.4283s.64-1.4284 1.42833-1.4284zm17.14337-7.1433c.79 0 1.4283.6392 1.4283 1.4292s-.6383 1.4283-1.4283 1.4283h-11.43003c-.78834 0-1.42834-.6383-1.42834-1.4283s.64-1.4292 1.42834-1.4292zm-17.14337 0c.79 0 1.42917.6392 1.42917 1.4292s-.63917 1.4283-1.42917 1.4283c-.78833 0-1.42833-.6383-1.42833-1.4283s.64-1.4292 1.42833-1.4292zm17.14337-7.1425c.79 0 1.4283.63833 1.4283 1.42833s-.6383 1.42917-1.4283 1.42917h-11.43003c-.78834 0-1.42834-.63917-1.42834-1.42917.00084-.79.64084-1.42833 1.42917-1.42833zm-17.14337 0c.79 0 1.42917.63833 1.42917 1.42833s-.63917 1.43-1.42917 1.43c-.78833-.00083-1.42833-.64-1.42833-1.43s.64-1.42833 1.42833-1.42833z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const OpenNewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12.3369 3.55763c.0451-.89627.7944-1.58554 1.6736-1.53953l6.1462.32164c.8161.04271 1.4683.7076 1.5101 1.53953l.3155 6.26593c.0452.8963-.6309 1.6602-1.5101 1.7062-.8791.046-1.6284-.6433-1.6735-1.5396l-.1317-2.61568-7.4804 7.62608c-.6225.6346-1.6317.6346-2.25417 0s-.62247-1.6635 0-2.2981l7.48037-7.62606-2.5658-.13428c-.8791-.046-1.5552-.80987-1.5101-1.70613zm8.9774 15.19197c0 1.7778-1.4412 3.219-3.2191 3.219h-12.87616c-1.77784 0-3.21905-1.4412-3.21905-3.219v-13.18963c0-1.77783 1.44122-3.21905 3.21905-3.21905h3.21904c.88892 0 1.60952.72061 1.60952 1.60953s-.7206 1.60952-1.60952 1.60952h-3.21904v13.18963h12.87616v-3.3131c0-.8889.7206-1.6095 1.6095-1.6095.889 0 1.6096.7206 1.6096 1.6095z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const OverviewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m18.6532 18.6542c-.325.325-.8316.4883-1.5066.4883-.7042 0-1.5059-.1883-2.3484-.505.6984-.5475 1.3859-1.1392 2.0417-1.7958.6533-.6517 1.2375-1.3359 1.785-2.0317.0442.1158.11.2375.1483.3517.5284 1.5833.4834 2.89-.12 3.4925zm-11.79996.4883c-.675 0-1.18166-.1642-1.50583-.4883-.60417-.6025-.64833-1.9084-.12-3.4925.0375-.1142.10417-.2359.1475-.3517.54667.6958 1.1325 1.38 1.78333 2.0317.6575.6566 1.34417 1.2483 2.0425 1.7958-.84166.3167-1.64333.505-2.3475.505zm-1.625-10.305c-.52916-1.58333-.485-2.88917.11917-3.49167.325-.325.83-.48833 1.50583-.48833.70417 0 1.505.18833 2.3475.505-.69833.5475-1.385 1.13917-2.04166 1.795-.65167.6525-1.2375 1.33667-1.78417 2.0325-.04333-.11583-.11-.23833-.1475-.3525zm11.92166 3.1625c-.6558.9717-1.4392 1.9333-2.3283 2.8217-.9.9008-1.8592 1.6808-2.82 2.3333-.9634-.6525-1.9225-1.4325-2.82252-2.3333-.88917-.8892-1.67167-1.85-2.32917-2.8217.6575-.9717 1.44-1.9333 2.32833-2.8225.89996-.9 1.85916-1.68167 2.82246-2.33167.9609.65 1.9209 1.43167 2.82 2.33167.8892.8892 1.6725 1.8508 2.3292 2.8225zm-.0025-7.1425c.675 0 1.1825.16417 1.5067.48833.6025.6025.6483 1.90834.12 3.49167-.0384.11417-.1042.23667-.1484.3525-.5475-.69583-1.1316-1.38-1.7841-2.03333-.6567-.655-1.3442-1.24667-2.0417-1.79417.8417-.31667 1.6433-.505 2.3475-.505zm3.3242 7.1425c.405-.7575.7641-1.5142 1.0108-2.25833.9042-2.71167.6167-4.99-.81-6.41667-.8642-.86667-2.085-1.325-3.5258-1.325-1.5559 0-3.3417.54833-5.1467 1.51583-1.805-.96666-3.59166-1.51583-5.14666-1.51583-1.44 0-2.65916.45833-3.525 1.325-1.42666 1.4275-1.715 3.70583-.81166 6.41667.2475.74413.60583 1.50083 1.01333 2.25833-.4075.7575-.76667 1.5142-1.01333 2.2575-.90334 2.7125-.615 4.9917.81166 6.4167.86584.8675 2.085 1.3258 3.525 1.3258 1.555 0 3.34166-.5483 5.14746-1.5158 1.8034.9666 3.59 1.5158 5.1459 1.5158 1.4408 0 2.6608-.4583 3.5258-1.325 1.4267-1.4267 1.7142-3.705.81-6.4175-.2467-.7433-.6058-1.5-1.0108-2.2575z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PaintIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m22.0003 11.4141c-.1004-11.304369-11.1037-11.060891-16.78934-6.40002-3.84615 3.16522-5.317726 14.50432 1.80602 16.73042 2.31016.7268 2.59201-.1753 3.02362-1.5568.312-.9985.7022-2.2475 1.9931-3.3128.8231-.6896 2.2559-.6232 3.7827-.5525 2.9397.1361 6.2279.2884 6.1839-4.9083zm-16.32113 5.6348c.23411.3826.63545.5913 1.03679.5913.23411 0 .43478-.0348.602-.1739.56856-.3827.73579-1.1479.40134-1.7392l-.03344-.0348c-.33445-.5913-1.07024-.7652-1.6388-.3826s-.70234 1.1479-.36789 1.7392zm12.14043-5.0087c.0669.6608.5686 1.1478 1.204 1.1478h.0669c.6689-.0696 1.1706-.6609 1.1037-1.3565v-.0696-.0348c-.0669-.6608-.6689-1.1478-1.3378-1.0782-.6354.0695-1.1037.6956-1.0368 1.3913zm-12.17388-.4522c.13378.0348.26756.0696.40134.0696.50167 0 1.00334-.3479 1.13712-.8348.23412-.6609-.10033-1.35655-.73578-1.60002-.63545-.24348-1.30435.10434-1.53846.76521v.03481c-.23412.6261.10033 1.3217.73578 1.5652zm9.63208-3.72175c.2007.13913.4348.2087.6689.2087.4014 0 .7693-.2087 1.0034-.5913.3344-.59131.2006-1.35653-.3679-1.73913l-.0335-.03479c-.5685-.34782-1.2709-.17391-1.6388.41739-.3679.59131-.2006 1.35653.3679 1.73913zm-6.22071-1.32173c.16723.52173.63545.83478 1.13711.83478.1108 0 .2217-.02387.3515-.05184.0269-.00579.0546-.01176.0833-.01773.6355-.24348.9699-.93913.7358-1.6s-.903-1.00869-1.53848-.76521h-.03344c-.63545.24347-.9699.93913-.73579 1.6z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PencilIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m13.4144 6 4.5856 4.5857-9.95735 9.9576-4.0884.4514c-.54731.0605-1.00974-.4023-.94885-.9496l.45491-4.0914zm7.1077-.47944-2.0427-2.04268c-.6371-.63717-1.6705-.63717-2.3077 0l-1.9217 1.9217 4.3504 4.35042 1.9217-1.9217c.6372-.63751.6372-1.67057 0-2.30774z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PlayIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M19.5427 9.71299C21.3396 10.7505 21.3396 13.3441 19.5427 14.3816L6.89773 21.6822C5.10078 22.7196 2.8546 21.4228 2.8546 19.3479L2.8546 4.74675C2.8546 2.67181 5.10078 1.37497 6.89774 2.41244L19.5427 9.71299Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PodcastIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m5.03666 10.8522c.51251.0183.92109.4193.96101.9183l.00255.1168.00044.1828c.01531.6885.18571 1.6057.62783 2.4885.78316 1.5638 2.20547 2.5134 4.58571 2.5969 2.7301.0958 4.4504-.6666 5.4599-1.9712.3259-.4211.5542-.8737.7008-1.3244.0282-.0868.0512-.1658.0695-.2354l.0421-.1798.0185-.1156c.0553-.5495.5457-.9501 1.0952-.8947.5495.0553.9501.5456.8947 1.0951-.0767.7623-.4212 1.8219-1.2391 2.8788-1.1367 1.469-2.8727 2.4274-5.2555 2.6851l-.0013.924 1.001.0008c.5522 0 1 .4477 1 1 0 .5129-.3861.9355-.8834.9933l-.1166.0067h-4.00004c-.55229 0-1-.4477-1-1 0-.5128.38604-.9355.88338-.9932l.11662-.0068.99904-.0008v-.871l-.1745-.008c-2.94807-.1902-4.91745-1.554-5.98428-3.6842-.37658-.7519-.61294-1.5476-.73949-2.3471-.06944-.4386-.09766-.8183-.10067-1.1147l.00144-.1767c.01977-.5519.48323-.9833 1.03516-.9635zm5.14174-8.74976c.3849-.068 1.1957-.02029 2.0375.03843l.5056.03571c.3354.02358.6631.04556.9579.05926 1.319.079 2.426 1.7858 2.3807 4.4442-.0308 1.80785-.0421 2.74853-.0441 3.80146v.6471c.0004.1822.0012.3292.0023.4367.023 1.5111-.5191 3.3964-1.467 3.7293-.4376.1976-1.7443.3194-2.7857.2553-.7982-.047-2.15774-.2241-2.94204-.6081s-1.1882-1.903-1.1703-2.7445c.0117-.942.1799-4.32316.2155-6.00616.0797-2.6608 1.1813-3.878 2.30964-4.0887z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PreviewIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.7498 2.00041c4.8325 0 8.75 3.9175 8.75 8.74999 0 1.9642-.655 3.7733-1.7492 5.2333l3.8834 3.885c.4883.4859.4883 1.2809 0 1.7667-.2417.2433-.5617.3642-.8834.3642-.32 0-.64-.1209-.8833-.3634l-3.8833-3.8833c-1.4617 1.0917-3.2692 1.7467-5.2342 1.7467-4.83335.0008-8.75001-3.9159-8.75001-8.7492 0-4.83165 3.91666-8.74999 8.75001-8.74999zm0 2.5c-3.44668 0-6.25001 2.8025-6.25001 6.24999 0 3.4475 2.80333 6.25 6.25001 6.25 3.4458 0 6.25-2.8033 6.25-6.25 0-3.44665-2.8042-6.24999-6.25-6.24999zm-1.75001 3.49167c.22333-.12667.68166-.1225.90333.00833l3.55748 2.13919c.215.1275.34.36.34.61 0 .2508-.1425.4833-.3566.6108l-3.58755 2.14c-.1125.0667-.28583.1008-.41333.1008-.12 0-.33333-.03-.44417-.0916-.2225-.1267-.545-.3642-.545-.6209v-4.27662c0-.25834.3225-.4925.545-.62z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PrivateUserSessionsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.3564 2c1.5175.00328 2.7654.05959 3.3551.19802 1.2681.28936 1.6232 1.60755 2.0544 8.51998.4819 7.877.2781 9.5709-1.1676 10.0853-1.2394.441-3.3562.6093-5.8879.8106l-.5708.0456c-.5773.0463-1.1734.0953-1.7834.1505-2.81531.2251-6.67048.3537-8.72489-.225-1.21742-.3537-1.31887-1.061-1.49641-7.7162l-.00348-.1303c-.07337-2.7504-.12433-4.66021-.13075-6.02614l.00004-.55296c.00836-1.50623.08983-2.24363.28637-2.77512.43117-1.22173 1.95295-1.54324 3.72836-1.86475 1.11233-.20143 6.31756-.51193 10.07126-.51953zm3.1428 5.19947-15.49271 1.15568c.01637 1.28708.06245 3.01455.12591 5.39325l.00179.067c.09105 3.4133.16207 5.0486.32392 5.9018l.00263.0138c.76761.1673 1.90292.2576 3.26301.268 1.49142.0114 3.09275-.0725 4.46275-.1818.87-.0787 1.6602-.1412 2.401-.1999.8576-.0679 1.6491-.1306 2.4216-.207 1.3162-.1301 2.2225-.2729 2.7833-.4464.0351-.1138.0851-.3222.126-.6736.1469-1.2621.0949-3.4668-.1487-7.4489-.0929-1.4893-.1808-2.68305-.2705-3.64193zm-11.14647 2.93623c2.58087-1.8752 6.39687-1.02448 8.52877.9606 1.2696 1.1821 2.1643 2.255 2.1166 2.9255l-.0003.1105c-.0672.9454-1.7348 2.4982-3.3505 3.6722-2.5808 1.8753-6.39694 1.0245-8.52883-.9606-1.26956-1.1821-2.16431-2.255-2.11656-2.9254l.00028-.1104c.06722-.9455 1.73482-2.4983 3.35054-3.6724zm.90454 1.9887c-.90992 1.3477-.88542 4.8225 2.51483 4.8706 3.4002.0482 3.7685-3.7858 1.9417-5.3499-1.293-1.107-3.5466-.8684-4.45653.4793zm3.63903.5174c1.0567.8936.8436 3.0841-1.1232 3.0566-1.96671-.0275-1.98091-2.0128-1.4546-2.7827.5263-.77 1.8299-.9064 2.5778-.2739z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ProjectIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.25954 20.5314c.23026 1.1309 1.57918 1.268 2.7308 1.1994 1.15151-.0685 11.21906.0686 13.52216.2399 2.303.1713 2.8623-.4456 3.1913-.891.2304-.3084.2962-4.0903.2962-5.8381 0-1.7135-.2304-4.691-.5594-6.95284-.1974-1.40511.2632-2.67311-3.3229-2.94722-1.6121-.10278-3.0812-.10278-6.0423-.03433-.296-.78822-1.2946-2.8142-1.9526-3.15687-.98704-.41132-6.54729.13701-7.23818.27412-.75669.17133-.75669.58265-.75669 1.50788v2.98165c0 1.30222-.36187 11.38971.13161 13.61741z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const QuestionMarkIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m21.9985 12.0962c.156-11.337813-12.26789-12.565874-17.33611-6.47453-3.58731 4.31149-3.71983 11.58443.64734 14.61853 4.36716 3.034 16.53287 3.1937 16.68877-8.144zm-8.8773 1.238h-2.3237v-.1495c0-.9268.1764-1.4649 1.0589-2.0629l.6912-.4634c.5736-.3886.8236-.77726.8236-1.40508 0-.7175-.4706-1.16594-1.1472-1.16594-.8236 0-1.4265.46339-1.4265 1.55459h-2.35319c0-1.8984 1.22069-3.37826 3.85329-3.37826 2.0295 0 3.4561 1.01647 3.4561 2.88497 0 1.30052-.6912 2.03292-1.456 2.61592l-.603.4484c-.4412.3439-.5735.5531-.5735.9418zm.3676 2.2571c0 .8371-.6765 1.5397-1.5295 1.5397-.8677 0-1.5295-.7026-1.5295-1.5397s.6618-1.5247 1.5295-1.5247c.853 0 1.5295.6876 1.5295 1.5247z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ReactIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m12 22c5.5228 0 10-4.4772 10-10 0-5.52285-4.4772-10-10-10-5.52285 0-10 4.47715-10 10 0 5.5228 4.47715 10 10 10zm-3.33333-11.6667c.92047 0 1.66663-.74616 1.66663-1.66663 0-.92048-.74616-1.66667-1.66663-1.66667s-1.66667.74619-1.66667 1.66667c0 .92047.7462 1.66663 1.66667 1.66663zm8.33333 3.3334c0 2.7614-2.2386 5-5 5-2.76142 0-5-2.2386-5-5zm0-5.00003c0 .92047-.7462 1.66663-1.6667 1.66663-.9204 0-1.6666-.74616-1.6666-1.66663 0-.92048.7462-1.66667 1.6666-1.66667.9205 0 1.6667.74619 1.6667 1.66667z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const RecordIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M5.72808 6.57665L5.72808 6.57666C4.21821 8.39134 3.44905 10.8031 3.50262 13.081C3.5562 15.3591 4.44354 17.634 6.41174 19.0014C8.31623 20.3245 11.728 20.952 14.6917 20.132C16.2039 19.7135 17.6545 18.9039 18.734 17.5601C19.8183 16.2104 20.467 14.3977 20.4988 12.0859C20.5306 9.7716 19.9186 7.89371 18.8485 6.48004C17.7808 5.06955 16.3051 4.18499 14.7177 3.77414C11.5832 2.96286 7.89555 3.97164 5.72808 6.57665Z\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <path\n d=\"M7.66621 8.21881C9.16184 6.42126 11.7691 5.68812 13.9883 6.26249C15.0878 6.54707 16.077 7.14918 16.787 8.08709C17.4957 9.0234 17.9503 10.3264 17.9266 12.0543C17.9028 13.7834 17.4234 15.0307 16.7129 15.9152C16 16.8027 15.0236 17.3629 13.9441 17.6616C11.7547 18.2675 9.2536 17.7685 7.98327 16.886C6.7448 16.0256 6.1109 14.5403 6.07219 12.894C6.03347 11.2477 6.59545 9.50574 7.66621 8.21881Z\"\n fill=\"currentColor\"\n stroke=\"transparent\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const RedoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m6.87391 20.4397c-1.80165-.6674-3.34245-1.8936-4.39695-3.4997-1.0545-1.6059-1.567498-3.5072-1.46385-5.4256.10365-1.91847.81855-3.7534 2.04-5.23636s2.8854-2.53613 4.74855-3.00542c1.863-.46929 3.82734-.33007 5.60554.39728 1.7783.72735 3.2771 2.00467 4.2772 3.64507.7418 1.21674 1.1804 2.58587 1.2889 3.99293l.642-.536c.6359-.531 1.5818-.4459 2.1128.1899.5309.6359.4459 1.5819-.19 2.1128l-2.996 2.5018c-.5567.4648-1.3662.4648-1.9228 0l-2.996-2.5018c-.6359-.5309-.721-1.4769-.19-2.1128.531-.6358 1.4769-.7209 2.1128-.1899l.385.3215c-.1193-.7805-.3922-1.53458-.8082-2.21675-.6667-1.0936-1.6659-1.94515-2.8514-2.43006-1.1855-.4849-2.49506-.57771-3.73709-.26485-1.242.31287-2.3514 1.01497-3.16575 2.00362-.8142.98864-1.2909 2.21194-1.3599 3.49094-.06915 1.2789.27285 2.5464.9759 3.617.70305 1.0707 1.73025 1.8882 2.9313 2.3331 1.20109.4449 2.51304.4938 3.74384.1394.7961-.2291 1.6273.2304 1.8565 1.0266.2291.796-.2304 1.6272-1.0265 1.8564-1.8463.5314-3.81421.4582-5.61589-.2091z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const RemoveFromChannelIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M5.64571 1.19092C5.19893 0.866257 4.57355 0.965254 4.24889 1.41204C3.92423 1.85882 4.02322 2.48419 4.47 2.80886C5.75625 3.74353 6.95092 5.00735 8.01704 6.20703C6.38757 6.20371 5.0889 6.2273 4.54926 6.28789C2.56844 6.5103 2.31336 7.59249 2.09302 9.25911C1.87267 10.9257 2.11033 17.874 2.37512 19.4659C2.63991 21.0578 3.40531 21.7237 5.61415 21.6844C6.9775 21.6601 10.7551 21.7863 13.8349 21.8892L13.8531 21.8898C15.7549 21.9533 17.3885 22.0078 18.0174 22.0123L18.03 22.0124C19.6724 22.024 21.003 22.0334 21.6139 20.7615C22.2264 19.4863 21.9782 11.1909 21.8801 9.61079C21.7819 8.03071 21.2479 6.89398 19.993 6.61776C19.5898 6.52901 18.0558 6.44028 16.0935 6.36809C17.0728 5.28349 18.2296 4.02372 19.6219 2.73331C20.0269 2.35789 20.051 1.72518 19.6755 1.32012C19.3001 0.915058 18.6674 0.891034 18.2623 1.26646C16.6527 2.7583 15.3356 4.22058 14.2947 5.37616L14.2798 5.39271C14.0913 5.60208 13.9119 5.8013 13.7414 5.98868C13.6467 6.09275 13.5555 6.19241 13.4676 6.28764C12.5521 6.2645 11.613 6.24544 10.7013 6.23164C10.5417 6.0511 10.3732 5.8585 10.1952 5.65501L10.0863 5.5306C8.90401 4.17976 7.37355 2.44649 5.64571 1.19092ZM6.2929 14.9216C5.95119 14.5799 5.90848 14.0524 6.16476 13.6642C6.20137 13.6088 6.24408 13.5562 6.2929 13.5074L9.82843 9.97183C10.219 9.5813 10.8521 9.5813 11.2426 9.97183C11.6332 10.3623 11.6332 10.9955 11.2426 11.386L9.46447 13.1642H16.5858C17.1381 13.1642 17.5858 13.6119 17.5858 14.1642C17.5858 14.7165 17.1381 15.1642 16.5858 15.1642H9.36396L11.2426 17.0429C11.6332 17.4334 11.6332 18.0666 11.2426 18.4571C10.8521 18.8476 10.219 18.8476 9.82843 18.4571L6.2929 14.9216Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ReplaceIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m11.6953 2c-2.36214 0-4.62753.93836-6.29781 2.60864-.58578.58578-.58578 1.53553 0 2.12131.58579.58579 1.53553.58579 2.12133 0 1.10766-1.10768 2.60998-1.72995 4.17648-1.72995s3.0688.62227 4.1765 1.72995c.7623.76237 1.2948 1.7117 1.5527 2.7402l-.5756-.48053c-.6358-.53098-1.5817-.44591-2.1127.18997-.531.63589-.446 1.58181.1899 2.11281l2.9961 2.5017c.5566.4648 1.3662.4648 1.9228 0l2.996-2.5017c.6358-.531.7209-1.47692.19-2.11281-.531-.63588-1.477-.72095-2.1129-.18997l-.4506.37628c-.3144-1.79011-1.1718-3.45466-2.4744-4.75726-1.6702-1.67028-3.9357-2.60864-6.2978-2.60864zm7.4377 16.8867c-1.5536 1.7794-3.7502 2.869-6.1069 3.0288-2.3567.1599-4.68042-.623-6.45992-2.1765-1.32667-1.1582-2.26984-2.6738-2.73018-4.3469l-.17388.2132c-.52381.6417-1.46874.7374-2.11053.2136-.641801-.5238-.737441-1.4687-.21363-2.1105l2.57465-3.1546c.26245-.3216.64644-.52 1.06057-.5481.41414-.02809.82139.1167 1.12487.3999l2.97703 2.778c.60569.5652.63851 1.5143.07332 2.12-.5652.6057-1.51437.6386-2.12005.0734l-.04151-.0389c.34575.8142.87327 1.5482 1.55225 2.141 1.18009 1.03 2.72111 1.5493 4.28401 1.4433 1.5628-.1061 3.0196-.8285 4.0498-2.0087.5448-.624 1.4924-.6883 2.1165-.1435.624.5448.6884 1.4923.1436 2.1165z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ReplyIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m3.43934 7.93934c-.58579.58579-.58579 1.53553 0 2.12136l4.5 4.5c.58579.5857 1.53553.5857 2.12136 0 .5857-.5858.5857-1.5356 0-2.1214l-1.93938-1.9393h.87868c4.9706 0 9 4.0294 9 9 0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5c0-6.6274-5.3726-12-12-12h-.87868l1.93938-1.93934c.5857-.58579.5857-1.53553 0-2.12132-.58583-.58579-1.53557-.58579-2.12136 0z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ScissorsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m8.03043 13.6607c-.29507.3401-.77967.4312-1.22762.3856-.26063-.0266-.53261-.0225-.83308-.0225-2.20558 0-3.95014 2.0802-3.992 3.992-.04187 1.9117 1.25486 4.1879 3.992 3.992 2.73715-.1959 3.99201-1.7864 3.99201-3.992 0-.3414-.04361-.6694-.125-.982-.10544-.4049-.03782-.8512.25806-1.1471l1.1558-1.1558c.3906-.3905 1.0237-.3905 1.4142 0l1.1558 1.1558c.296.2959.3636.7422.2581 1.1471-.0813.3126-.125.6406-.125.982 0 2.2056 1.2079 4.1121 3.992 3.992 2.1682 0 3.9313-1.7263 3.9905-3.8801.0021-.0742.0111-.1481.0221-.2214.249-1.6525-2.0736-4.0873-4.0126-3.8825-.3396 0-.6661.0432-.9773.1238-.4074.1055-.8563.036-1.152-.2635l-.2823-.286c-.3353-.3396-.3855-.8665-.1187-1.2621 1.2897-1.9126 4.8975-7.29122 5.5061-8.5084.5957-1.19133-.0999-1.55313-.4001-1.64993-.0817-.02633-.1675-.02743-.2521-.01311-.3067.0519-1.1141.23047-1.8398.75302-.8699.6263-7.2522 7.11612-10.39907 10.74312zm-.0647 4.3551c0 1.0978-.33819 2.1849-2.02833 2.2762-1.69015.0913-1.93466-.9724-1.96367-2.2762s.81534-1.7091 1.92989-1.7429 2.06211.6451 2.06211 1.7429zm11.62977-.1c0 1.0978-.6104 1.7735-1.7181 1.7735-1.1078 0-1.6627-.5095-1.6627-1.6073s.4995-1.7181 1.6072-1.7181c1.1078 0 1.7736.4541 1.7736 1.5519zm-16.00097-13.65035c.36312.61452 4.38321 5.68498 5.13739 6.04815.75418.3631 3.01228-2.35364 2.62128-3.13575-.3911-.78212-6.57133-4.945-7.37947-5.13008-.51609-.11819-.77828.15828-.90039.37355-.07895.13919-.07354.30477-.02904.45848.09686.33451.29621.95576.55023 1.38565z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SearchIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m18.1805 10.0368c.1262-9.02516-9.92582-10.002742-14.02641-5.15382-2.90243 3.43213-3.00965 9.22162.52374 11.63682 2.18864 1.496 6.79817 2.1141 10.01977.223.1591.1745.3297.3626.5089.5601l.0011.0012.028.0308c.3639.4012.7527.8439 1.1456 1.2911 1.4196 1.6159 2.8916 3.2914 3.4268 3.2876.9201-.0065 1.8533-.8438 1.8058-1.6624-.0358-.617-3.0505-4.1585-4.5332-5.8655.6663-1.1243 1.0748-2.556 1.0999-4.3489zm-3.0735-.0148c.078-5.63543-6.13398-6.24583-8.66808-3.21812-1.79365 2.14306-1.85991 5.75812.32367 7.26612 1.35254.9342 4.20111 1.3201 6.19201.1393.3521-.2089 1.2447-.8717 1.4727-1.4718.0304-.08.062-.1614.0941-.2443h.0001c.2656-.6842.5717-1.4727.5855-2.4712z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SendIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m2.08399 13.9107c.0602 3.3015.20898 6.331.4105 7.6243.0499.3202.29259.5164.60534.4312 3.13827-.855 18.95577-8.2148 18.95577-9.9463 0-1.2384-16.56256-9.66456-19.1655-10.02992-.19461-.02731-.34033.09248-.39323.28174-.29629 1.05988-.42832 4.29228-.44124 7.85348l14.16417 1.8946z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SettingsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m6.24843 6.77277c.74955 2.13722 3.90597 2.17402 4.61477.46032.0683-.1408.125-.2811.1707-.42046.6058-.00536 1.1978-.0136 1.7785-.0229.4047-.00648.8032-.01346 1.1969-.02035 2.4581-.04305 4.7202-.08264 7.0401.0237.5014.02298.9266-.36485.9495-.86627.023-.50141-.3648-.92652-.8662-.94951-2.382-.10919-4.7076-.06836-7.1622-.02525-.3921.00689-.7877.01383-1.1872.02023-.57.00912-1.1495.01719-1.7411.02251-.1944-.59562-.5734-1.11691-1.05139-1.50894-.92757-.76087-3.35974-.86696-3.825 1.46603-1.01999-.03054-2.08381-.07744-3.2008-.14657-.50098-.031-.93224.34999-.96324.85097-.03101.50098.34999.93224.85097.96325 1.18803.07352 2.31663.12231 3.39569.15324zm-4.2483 5.54683c0-.5019.4069-.9088.90884-.9088 1.40629 0 2.64238-.0161 3.88561-.0323 1.96291-.0254 3.94372-.0511 6.64042-.0143.5017-2.38934 3.3463-2.2812 4.2812-1.51432.5667.46472.9111 1.01612 1.0122 1.64502.7524.0257 1.5502.0552 2.3993.0894.5015.0202.8917.443.8716.9445-.0202.5016-.4431.8919-.9447.8717-.9361-.0376-1.8091-.0697-2.6268-.097-.0222.0498-.0455.0999-.0699.1503-.7019 1.6972-3.9734 1.7795-4.8058-.2702-2.7348-.0393-4.72571-.0135-6.71331.0124-1.24973.0162-2.49855.0325-3.92982.0325-.50194 0-.90884-.4069-.90884-.9089zm0 6.1328c-.00116-.5019.40481-.9097.90675-.9109 1.07677-.0025 2.10118-.0058 3.08174-.0089.11298-.0004.2258-.0008.33762-.0011.05692-.1747.12895-.3528.21677-.5339.73063-1.7666 3.87449-1.7897 4.45259.5249 3.676.0025 6.8235.0408 10.1372.1927.5014.0229.8892.4481.8662.9495-.0229.5014-.4481.8892-.9495.8663-3.2903-.1508-6.4125-.1885-10.0872-.1907-.5634 2.1212-2.87808 1.9991-3.77763 1.2612-.42273-.3467-.72861-.77-.89095-1.2522-.09774.0003-.19592.0006-.29455.001-.98121.003-2.00765.0064-3.0881.0089-.50195.0011-.90979-.4048-.91094-.9068z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ShareIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m10.6913 7.39911c.578 0 1.0471.46807 1.0471 1.04714 0 .57802-.4691 1.04714-1.0471 1.04714h-6.59702v9.31951h15.39302v-5.7592c0-.5791.468-1.0472 1.0471-1.0472s1.0471.4681 1.0471 1.0472v6.8064c0 .5791-.468 1.0471-1.0471 1.0471h-17.48726c-.57907 0-1.04714-.468-1.04714-1.0471v-11.41385c0-.57907.46807-1.04714 1.04714-1.04714zm5.8803-4.34459 4.7121 1.57071c.288.09529.5194.31205.6367.59268.1162.27959.1047.59687-.0314.86913l-2.4074 4.81686c-.1833.3675-.5539.5791-.9382.5791-.1571 0-.3173-.0356-.4671-.11-.5173-.2597-.7277-.888-.4691-1.40526l1.1889-2.37891c-4.0996 1.68797-6.3249 4.53987-6.3249 8.18697 0 .5791-.4681 1.0472-1.0471 1.0472-.5791 0-1.0472-.4681-1.0472-1.0472 0-4.4699 2.7028-8.04278 7.5143-10.07421l-1.9824-.66064c-.5477-.18221-.844-.77594-.6608-1.32464.1822-.54765.7717-.84609 1.3236-.66179z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SoapboxIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m15.7829 19.9195c1.7831-.0396 2.688-.079 3.4524-.079 2.4101 0 2.4643-.5698 2.6291-2.2998.0161-.1681.0331-.3472.0535-.5377.1341-1.2162.0766-8.54397.0191-10.16543-.0064-.2209-.008-.42798-.0095-.62158-.0121-1.52821-.0174-2.21601-2.3473-2.21601-1.7437 0-4.6496.06881-7.1831.115-1.2804.02334-2.2443.04093-2.46946.04093-.67064.03118-.99638 1.029-1.0347 1.96448-.02098.51212-.02473 2.03357-.02069 3.53602-2.0997-1.99934-5.23506-4.27551-5.94338-4.62817-.23692-.17101-.5951.06006-.65895.36744-.51522 2.4804-.24785 10.79872.42166 14.00882.10701.5131.5848.5653.89181.352 1.82324-1.2674 3.87556-3.4426 5.27447-5.2548-.03781 1.4028-.06521 3.1549.15005 4.1851.21076 1.1226 1.20719 1.3097 2.05019 1.3097.4981.0169 2.6193-.0302 4.7248-.077z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SortIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2 6.28572C2 5.49674 2.63959 4.85715 3.42857 4.85715H20.5714C21.3604 4.85715 22 5.49674 22 6.28572C22 7.0747 21.3604 7.71429 20.5714 7.71429H3.42857C2.63959 7.71429 2 7.0747 2 6.28572ZM2 12C2 11.211 2.63959 10.5714 3.42857 10.5714H14.8571C15.6461 10.5714 16.2857 11.211 16.2857 12C16.2857 12.789 15.6461 13.4286 14.8571 13.4286H3.42857C2.63959 13.4286 2 12.789 2 12ZM3.42857 16.2857C2.63959 16.2857 2 16.9253 2 17.7143C2 18.5033 2.63959 19.1429 3.42857 19.1429H7.71429C8.50326 19.1429 9.14286 18.5033 9.14286 17.7143C9.14286 16.9253 8.50326 16.2857 7.71428 16.2857H3.42857Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SparkleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m18.4814 8.67568-.6644 2.03912c-.1208.3764-.7329.3834-.8658.0139l-.8174-2.24473c-.1531-.4148-.4953-.75988-.9463-.9481l-1.9289-.80868c-.3584-.14988-.3342-.59953.0403-.72153l1.9449-.62742c.5316-.1708.9423-.54725 1.1074-1.01433l.741-2.08443c.1328-.38343.7651-.366.8738.0244l.5798 2.10534c.1289.46359.4954.85399.9947 1.05964l2.2027.90279c.3785.15337.3342.63091-.0685.73199l-1.9409.48103c-.6081.14988-1.0792.56467-1.2524 1.09101zm-11.00752 2.19872 1.03356-3.39854c.18792-.62742 1.14004-.63904 1.34675-.02324l1.27161 3.74128c.238.6913.7705 1.2665 1.472 1.5802l3.0005 1.3478c.5575.2498.5199.9992-.0627 1.2025l-3.0255 1.0457c-.8268.2847-1.4658.9121-1.7226 1.6906l-1.15255 3.474c-.20671.6391-1.19015.61-1.35928-.0406l-.90201-3.5089c-.20045-.7727-.77047-1.4234-1.54721-1.7661l-3.4264-1.5047c-.58881-.2556-.51991-1.0515.10649-1.2199l3.01924-.8018c.94586-.2498 1.67875-.9411 1.9481-1.8183z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SpinnerIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m12 5.33333c-3.6819 0-6.66667 2.98475-6.66667 6.66667 0 3.6819 2.98477 6.6667 6.66667 6.6667s6.6667-2.9848 6.6667-6.6667c0-.9205.7461-1.6667 1.6666-1.6667s1.6667.7462 1.6667 1.6667c0 5.5228-4.4772 10-10 10-5.52285 0-10-4.4772-10-10 0-5.52283 4.47715-10 10-10 .9205 0 1.6667.74617 1.6667 1.66667s-.7462 1.66666-1.6667 1.66666z\"\n fill=\"currentColor\"\n >\n <animateTransform\n attributeName=\"transform\"\n dur=\"1.5s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n type=\"rotate\"\n values=\"0 12 12;360 12 12\"\n />\n </path>\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const StatsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.5566 10.0643c-.0138-1.76364-.0349-4.48222.0778-6.10188.0712-1.21794.7119-1.9487 2.3848-1.9487 1.4949-.09744 1.8509.34102 2.0644.77948 1.1747 2.63075.9255 14.9563.8187 16.9537-.0103.1819-.0095.3498-.0088.5049.0044.9247.0067 1.3953-2.3404 1.6874-2.3136.2923-2.5627-.4872-2.634-1.9487-.0711-1.1692-.3203-7.0153-.3558-8.7692 0-.2944-.0032-.6926-.0067-1.157zm-14.48339-1.50187c-.14486 1.45517-.03621 4.88197 0 5.86777.03621 1.2674.32593 5.3514.39835 6.1963.07243 1.0797.18107 1.5491 2.57119 1.3144 2.38974-.2414 2.38569-.931 2.38125-1.6846-.00073-.1258-.00149-.2533.00887-.3809.10864-1.4552-.21728-8.872-.39835-9.9986-.06291-.39135-.10395-.76005-.13985-1.08248-.06745-.60575-.11671-1.04819-.25851-1.17073-.28971-.28165-.76049-.70413-2.49876-.61025-1.77448.14083-1.95554.70413-2.06419 1.54909zm12.34129 3.27277c.1806.8473.2413 2.5838.2777 3.6225.0093.2658.0171.4859.0247.6338.0379.9189-.0378 3.9177-.0755 4.5464-.0379.7739-.1513 1.3059-2.6088 1.3543-2.49154.0828-2.51834-.5076-2.54541-1.104-.00455-.1004-.00912-.201-.02546-.2986-.18904-1.0157-.37808-7.8354.18903-8.9479.18904-.3385.64274-.7255 2.45744-.8706s2.155.4837 2.3063 1.0641z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const SwitchAccountsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m19.9646 3.56989c1.8831 1.70948 2.0107 4.32673 2.0173 6.99611l-.0001.9022c0 .5142.0048 1.0139.0095 1.4974.0315 3.247.0561 5.7743-1.4399 7.1725-1.292 1.2075-3.7521 1.737-6.1439 1.8298-.7898.0306-2.3731.0535-3.3766 0-2.50856-.1338-5.72463-.3411-7.52574-1.8764-1.58915-1.3545-1.45707-4.3243-1.46202-6.8769-.00066-.3406-.0013-.6675-.00565-.9747-.00365-.2567-.0094-.5236-.01531-.7981-.05418-2.51434-.12193-5.65891 1.29137-7.39433 1.56755-1.92485 6.85845-2.02051 8.54555-2.02051.1646 0 .3708-.00475.6101-.01026 1.8411-.04241 5.6413-.12995 7.4954 1.55319zm-13.46158 6.43131c-.27704.0188-.53391.1518-.70948.3673l-1.99272 2.4455c-.35041.43-.28643 1.0632.14291 1.4142s1.06144.2869 1.41186-.1431l.33308-.4088c.31302 1.3863 1.05786 2.648 2.14023 3.5944 1.3458 1.1767 3.1031 1.7698 4.8856 1.6487 1.7824-.1211 3.4436-.9464 4.6185-2.2944.3644-.4182.3215-1.0531-.0961-1.4182-.4174-.365-1.0513-.322-1.4157.0962-.8248.9464-1.9912 1.5258-3.2425 1.6109-1.2514.085-2.4852-.3314-3.43001-1.1576-.70847-.6194-1.21095-1.4312-1.45381-2.327l.49561.4632c.40517.3787 1.04013.3567 1.41822-.0492.3781-.4058.35612-1.0418-.04906-1.4205l-2.30414-2.1536c-.20301-.1898-.47546-.28678-.75249-.268zm5.45468-5.37285c-1.7866 0-3.49982.71082-4.76304 1.97611-.39187.39251-.39187 1.02889 0 1.42141.39187.3925 1.02721.3925 1.41908 0 .8869-.88831 2.08976-1.38736 3.34396-1.38736s2.457.49905 3.3438 1.38736c.6097.61063 1.0357 1.3708 1.2424 2.19443l-.3233-.30964c-.4006-.3836-1.0358-.36931-1.4187.03186-.383.40118-.3688 1.03748.0318 1.42108l2.0251 1.9394c.388.3715.9991.3715 1.387 0l2.0251-1.9394c.4006-.3836.4149-1.0199.0319-1.42108-.383-.40117-1.0181-.41546-1.4187-.03186l-.2948.28234c-.2399-1.35029-.8873-2.60548-1.8687-3.58853-1.2633-1.2653-2.9765-1.97612-4.7629-1.97612z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const TagIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.11263 5.04041c-.18667 1.92432.04424 9.01979.00001 11.01579-.04423 1.9961.12249 4.3531.29625 5.0481.15491.6196 1.84727 1.5368 3.03625.3225 1.18899-1.2142 2.57456-2.7822 4.57456-4.1325 2.0186 1.5231 3.2093 2.9179 4.4324 4.1325 1.2231 1.2147 3.0966.6257 3.2493-.3225.3224-1.8964.2206-6.4423.2546-7.8088.0339-1.7012-.1019-7.13954-.1528-8.25509-.0339-1.11555.0771-1.94224-.6526-2.22113-3.0546-1.17133-9.17301-1.09763-12.39732-.53985-2.90187.502-2.52186 1.56177-2.64065 2.76098z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const TeamIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"M2 4a2 2 0 012-2h8a2 2 0 012 2v18H2V4zm5.5 3a1.5 1.5 0 100 3h1a1.5 1.5 0 100-3h-1zm0 7a1.5 1.5 0 000 3h1a1.5 1.5 0 000-3h-1zm8.5-4h5a1 1 0 011 1v11h-6V10z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ThumbsDownIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m17.2519 13.3364-3.0265-11.67337c-.0339-.00525-.0679-.01016-.102-.01475-2.9405-.39243-6.71014-.39244-8.53416-.21004-2.95711.29848-2.5315 2.75261-2.5315 2.75261-1.58081 1.62503-.6467 3.6425-.6467 3.6425-2.023 2.24965-.4643 3.95755-.4643 3.95755-1.835066 1.6858-.45876 3.5817 1.111 3.7144 1.19943.105 4.08468.0663 5.3836.0442.33164-.0055.58591.2985.5251.6246-.87331 4.9193 1.00597 8.1196 3.03446 7.8045 1.0853-.1713 1.0845-1.7357 1.0838-3.0809-.0003-.6075-.0006-1.1702.0991-1.5399.3316-1.2326 1.614-2.9405 2.9295-4.444.4315-.4931.8118-1.0216 1.1386-1.5774zm-1.9146-11.36956c.0096.00386.0193.00776.0289.01168-.015-.10585-.0277-.20524-.0379-.29704-.0884-.818045.0608-.912012 1.4979-1.298924 1.4371-.38691271 1.8185-.4864 2.1004-.270833.1495.114118.2991.595245.4945 1.223977.079.25439.1656.53295.2627.82114.3372 1.00044 2.0341 7.87086 2.2054 9.24716.0154.1205.0372.2305.0575.3323.1255.6317.1892.952-1.7433 1.547-1.043.3216-1.5483.4667-1.8348.3757z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ThumbsUpIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m5.81817 10.6635 3.02644 11.6734c.0339.0053.06791.0102.10202.0148 2.94057.3924 6.71017.3924 8.53417.21 2.9571-.2985 2.5315-2.7526 2.5315-2.7526 1.5808-1.625.6467-3.6425.6467-3.6425 2.023-2.2496.4643-3.9576.4643-3.9576 1.8351-1.6858.4588-3.58165-1.111-3.71431-1.1994-.10502-4.0847-.06633-5.3836-.04422-.3316.00553-.5859-.29848-.5251-.62459.8733-4.91931-1.006-8.119626-3.0345-7.8045688-1.08524.1713558-1.08442 1.7357188-1.08372 3.0809688.00032.60744.00061 1.1702-.09912 1.53987-.33164 1.23259-1.61397 2.94053-2.92947 4.44396-.43149.49313-.81189 1.02159-1.13862 1.57739zm1.91462 11.3696c-.00967-.0038-.01932-.0077-.02895-.0117.01497.1059.02772.2053.03792.2971.08843.818-.06082.912-1.49792 1.2989s-1.81848.4864-2.10037.2708c-.14954-.1141-.29907-.5952-.49448-1.2239-.07906-.2544-.16564-.533-.26276-.8212-.33717-1.0004-2.03406-7.8709-2.20541-9.2472-.01535-.1205-.0372-.2304-.05744-.3323-.12554-.6316-.189207-.952 1.74328-1.547 1.04301-.3216 1.54824-.4667 1.83482-.3757z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const TriangleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m20.2254 20.7499h-16.26331c-.7475 0-1.30834-.37-1.6825-.9258-.37334-.5559-.37334-1.2967 0-1.8517l8.03831-13.88917c.7484-1.11083 2.8042-1.11083 3.365 0l8.0375 13.88917c.3734.555.3734 1.2958 0 1.8517-.3741.5558-.935.9258-1.4958.9258zm-12.89831-3.7033h9.71921l-5.0459-8.33337-4.67248 8.33337z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UndoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m16.2028 20.4397c1.8016-.6674 3.3424-1.8936 4.3969-3.4997 1.0545-1.6059 1.5675-3.5072 1.4639-5.4256-.1037-1.91847-.8185-3.7534-2.04-5.23636s-2.8854-2.53613-4.7486-3.00542c-1.863-.46929-3.8273-.33007-5.60553.39728-1.77825.72735-3.27706 2.00467-4.27719 3.64507-.74181 1.21674-1.18038 2.58587-1.28892 3.99293l-.64191-.536c-.63589-.531-1.58182-.4459-2.11279.1899-.530981.6359-.44593 1.5819.18996 2.1128l2.99601 2.5018c.55666.4648 1.36615.4648 1.92282 0l2.99601-2.5018c.63594-.5309.72094-1.4769.18997-2.1128-.53098-.6358-1.47691-.7209-2.11281-.1899l-.385.3215c.11931-.7805.39223-1.53458.80815-2.21675.66674-1.0936 1.66595-1.94515 2.85143-2.43006 1.1855-.4849 2.4951-.57771 3.7371-.26485 1.242.31287 2.3514 1.01497 3.1657 2.00362.8142.98864 1.2909 2.21194 1.3599 3.49094.0692 1.2789-.2728 2.5464-.9759 3.617-.703 1.0707-1.7302 1.8882-2.9313 2.3331-1.201.4449-2.513.4938-3.7438.1394-.7961-.2291-1.62728.2304-1.85645 1.0266-.22918.796.2304 1.6272 1.02645 1.8564 1.8463.5314 3.8142.4582 5.6159-.2091z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UnlockIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n clipRule=\"evenodd\"\n d=\"m18.4 8.86859h-.3298c.1092-2.46877-1.1518-4.89701-3.4269-6.11864-2.6473-1.42146-5.82043-.75428-7.72874 1.42683-.59024.67464-.27474 1.6864.50816 2.10678.78292.42037 1.74028.0553 2.47566-.44737.94172-.64368 2.18772-.75397 3.26102-.1777 1.1838.63567 1.8185 1.92477 1.7035 3.2101h-9.26289c-.88367 0-1.60001.73488-1.60001 1.64141v9.8486c0 .9065.71634 1.6414 1.60001 1.6414h12.79999c.8837 0 1.6-.7349 1.6-1.6414v-9.8486c0-.90653-.7163-1.64141-1.6-1.64141zm-6.4 9.84861c1.7674 0 3.2-1.4698 3.2-3.2829s-1.4326-3.2828-3.2-3.2828c-1.7673 0-3.19998 1.4697-3.19998 3.2828s1.43268 3.2829 3.19998 3.2829z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UploadIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m15.4036 20.3766c0 .8975-.7301 1.625-1.6307 1.625h-3.2614c-.9006 0-1.63067-.7275-1.63067-1.625l.07361-5.3782h-2.17666c-1.50644 0-2.20732-1.8615-1.07251-2.849l5.43783-4.73245c.6145-.53462 1.5309-.53462 2.1453 0l5.438 4.73245c1.1347.9875.4338 2.849-1.0727 2.849h-2.1765zm4.9657-15.12818c.9006 0 1.6307-.72751 1.6307-1.625s-.7301-1.625-1.6307-1.625h-16.73859c-.90064 0-1.63071.72751-1.63071 1.625s.73007 1.625 1.63071 1.625z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const UsersPermissionsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m11.9795 11.586c5.5082.0762 6.1048-5.99821 3.1455-8.47622-2.0947-1.75393-5.74531-1.37583-7.21932.75941s-1.43432 7.64051 4.07382 7.71681zm-9.91151 9.511c.04238.425.50422.7755 1.01871.7622l17.7118.1408c.6229.0035 1.1358-.382 1.161-.843.1556-1.6495-.1357-3.3218-.8998-4.7419-1.8017-3.4404-12.22326-5.5665-16.7581-1.992-2.15941 1.711-2.47302 4.4518-2.23361 6.6739z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ViewStreamIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m18.9737 7.86457c1.8137 1.68881 3.0919 3.22143 3.0237 4.17933.0942 1.3301-2.3864 3.6597-4.787 5.4039-3.6869 2.679-9.13851 1.4637-12.1841-1.3722-1.81366-1.6888-3.0919-3.2215-3.0237-4.1793-.09423-1.3301 2.38644-3.65971 4.78695-5.40395 3.68695-2.67898 9.13855-1.46365 12.18415 1.37222zm-4.5254.78409c-1.8472-1.58151-5.06662-1.24058-6.36652.68474-1.29991 1.9253-1.26491 6.8893 3.59262 6.9581 4.8576.0688 5.3837-5.4084 2.7739-7.64284zm-2.7724 5.79044c2.8097.0393 3.1141-3.09 1.6045-4.3666-1.0685-.90364-2.9307-.70885-3.68257.3912-.7519 1.1-.73165 3.9362 2.07807 3.9754z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const WandIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m14.48 4.5c-.6775 0-1.23-.55333-1.23-1.23v-.04c0-.67583.5525-1.23 1.23-1.23s1.23.55333 1.23 1.23v.04c0 .67667-.5525 1.23-1.23 1.23zm5 1.25c-.6775 0-1.23-.55333-1.23-1.23v-.04c0-.67667.5525-1.23 1.23-1.23s1.23.55333 1.23 1.23v.04c0 .67667-.5525 1.23-1.23 1.23zm.0583 3.73083v-.03916c0-.6775.5542-1.23084 1.23-1.23084.6775 0 1.2317.55334 1.2317 1.23084v.03916c0 .67587-.5542 1.22997-1.2317 1.22997-.6758 0-1.23-.5541-1.23-1.22997zm-.0583 3.76917c.6775 0 1.23.5542 1.23 1.23v.04c0 .6767-.5525 1.23-1.23 1.23s-1.23-.5542-1.23-1.23v-.04c0-.6767.5525-1.23 1.23-1.23zm-9.96083-7.5c-.6775 0-1.23-.55333-1.23-1.23v-.04c0-.67667.5525-1.23 1.23-1.23.67753 0 1.23003.55333 1.23003 1.23v.04c0 .67667-.5525 1.23-1.23003 1.23zm-.01917 3.73083v.03834c0 .67663-.55417 1.23163-1.23 1.23163-.6775 0-1.23167-.555-1.23167-1.23163v-.03834c0-.6775.55417-1.23 1.23167-1.23.67583-.00083 1.23.5525 1.23 1.23zm4.98 5.01917c.6775 0 1.23.5542 1.23 1.23v.04c0 .6758-.5525 1.23-1.23 1.23s-1.23-.5542-1.23-1.23v-.04c0-.6758.5525-1.23 1.23-1.23zm-1.23-5c0 .6883.5608 1.25 1.25 1.25.6883 0 1.25-.5617 1.25-1.25 0-.69-.5617-1.25-1.25-1.25-.6892 0-1.25.56-1.25 1.25zm-10.885 12.135c-.48667-.4867-.48667-1.2817 0-1.7675l8.76-8.76c-.2333-.4892-.375-1.03-.375-1.6075 0-2.07167 1.6783-3.75 3.75-3.75 2.0708 0 3.75 1.67833 3.75 3.75 0 2.0717-1.6792 3.75-3.75 3.75-.5775 0-1.1192-.1417-1.6083-.375l-8.75837 8.76c-.2425.2425-.56416.365-.88333.365-.32083 0-.64167-.1225-.88417-.365z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ZoomInIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.34613 4.96934c4.1006-4.848919 14.15257-3.87134 14.02637 5.15386-.0251 1.7929-.4336 3.2246-1.0999 4.3489 1.4827 1.707 4.4974 5.2485 4.5332 5.8655.0475.8186-.696 1.5695-1.6161 1.576-.6833.0048-3.0833-2.6413-4.7621-4.4923-.1897-.2092-.3703-.4082-.538-.5921-3.2216 1.8911-7.83109 1.273-10.01973-.2231-3.53338-2.4152-3.42617-8.20463-.52374-11.63676zm4.93672 1.64027c0-.55228.44772-1 1.00005-1 .5522 0 1 .44772 1 1v2.43714h2.437c.5523 0 1 .44771 1 .99995 0 .5523-.4477 1-1 1h-2.437v2.4371c0 .5523-.4478 1-1 1-.55233 0-1.00005-.4477-1.00005-1v-2.4371h-2.4371c-.55229 0-1-.4477-1-1 0-.55224.44771-.99995 1-.99995h2.4371z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const ZoomOutIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"m4.34613 4.96934c4.10059-4.848919 14.15257-3.87134 14.02637 5.15386-.0251 1.7929-.4336 3.2246-1.0999 4.3489 1.4827 1.707 4.4974 5.2485 4.5332 5.8655.0475.8186-.696 1.5695-1.6161 1.576-.6833.0048-3.0833-2.6413-4.7621-4.4923-.1898-.2092-.3703-.4082-.538-.5921-3.2216 1.8911-7.83109 1.273-10.01973-.2231-3.53339-2.4152-3.42617-8.20463-.52374-11.63676zm1.49962 5.07736c0 .5523.44771 1 1 1h6.87415c.5523 0 1-.4477 1-1 0-.55224-.4477-.99995-1-.99995h-6.87415c-.55229 0-1 .44771-1 .99995z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const GroupRecordIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M 7.6660156 13.333984 C 4.6033687 13.333984 1.8196082 15.261562 0.73828125 18.130859 C 0.52228147 18.702859 0.54974052 19.324766 0.81640625 19.884766 C 1.091068 20.460765 1.5970887 20.908628 2.2050781 21.111328 C 3.9717464 21.700628 5.8100275 22 7.6660156 22 C 9.4455743 22 11.208675 21.721851 12.908203 21.179688 C 12.33347 20.258643 12 19.170101 12 18 C 12 17.017544 12.235211 16.092267 12.650391 15.275391 C 11.311039 14.056643 9.5409138 13.333984 7.6660156 13.333984 z \"\n fill=\"currentColor\"\n id=\"path1080\"\n />\n <path\n d=\"M 16 10 C 14.110702 10 12.33098 10.736657 10.988281 11.972656 C 12.030725 12.37129 12.995063 12.950091 13.835938 13.675781 C 14.913535 12.638129 16.378956 12 18 12 C 19.911892 12 21.607843 12.886783 22.705078 14.271484 C 21.496969 11.695436 18.871278 10 16 10 z \"\n fill=\"currentColor\"\n id=\"path1078\"\n />\n <path\n d=\"M 11.3332,8.3333 C 11.3332,10.3583 9.69162,12 7.66659,12 5.64155,12 3.99993,10.3583 3.99993,8.3333 c 0,-2.02504 1.64162,-3.66666 3.66666,-3.66666 2.02503,0 3.66661,1.64162 3.66661,3.66666 z\"\n fill=\"currentColor\"\n id=\"path1076\"\n />\n <path\n d=\"m 19.6666,4.99997 c 0,2.02504 -1.6417,3.66666 -3.6667,3.66666 -2.025,0 -3.6667,-1.64162 -3.6667,-3.66666 0,-2.02504 1.6417,-3.66666 3.6667,-3.66666 2.025,0 3.6667,1.64162 3.6667,3.66666 z\"\n fill=\"currentColor\"\n id=\"path90\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M13.2 18C13.2 15.3534 15.3534 13.2 18 13.2C20.6466 13.2 22.8 15.3534 22.8 18C22.8 20.6466 20.6466 22.8 18 22.8C15.3534 22.8 13.2 20.6466 13.2 18ZM14.1 18C14.1 20.1504 15.8496 21.9 18 21.9C20.1504 21.9 21.9 20.1504 21.9 18C21.9 15.8496 20.1504 14.1 18 14.1C15.8496 14.1 14.1 15.8496 14.1 18ZM21 18C21 19.6569 19.6568 21 18 21C16.3431 21 15 19.6569 15 18C15 16.3432 16.3431 15 18 15C19.6568 15 21 16.3432 21 18Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n id=\"path94\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const InviteToRecordIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <g\n clipPath=\"url(#clip0_23610_312)\"\n id=\"g8\"\n >\n <path\n d=\"M 3.8007812 2 C 2.8071822 2 2 2.8071822 2 3.8007812 L 2 5.5996094 L 2 15.199219 C 2 17.186417 3.6124214 18.800781 5.5996094 18.800781 L 12.054688 18.800781 C 12.019999 18.538708 12 18.271851 12 18 C 12 14.676003 14.676003 12 18 12 C 18.271851 12 18.538708 12.019999 18.800781 12.054688 L 18.800781 7.4003906 C 18.800781 6.4067916 17.993599 5.5996094 17 5.5996094 L 10.400391 5.5996094 L 8.3554688 2.5332031 C 8.133479 2.1996035 7.7582215 2 7.3574219 2 L 3.8007812 2 z \"\n fill=\"currentColor\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M13.2 18C13.2 15.3534 15.3534 13.2 18 13.2C20.6466 13.2 22.8 15.3534 22.8 18C22.8 20.6466 20.6466 22.8 18 22.8C15.3534 22.8 13.2 20.6466 13.2 18ZM14.1 18C14.1 20.1504 15.8496 21.9 18 21.9C20.1504 21.9 21.9 20.1504 21.9 18C21.9 15.8496 20.1504 14.1 18 14.1C15.8496 14.1 14.1 15.8496 14.1 18ZM21 18C21 19.6569 19.6568 21 18 21C16.3431 21 15 19.6569 15 18C15 16.3432 16.3431 15 18 15C19.6568 15 21 16.3432 21 18Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n id=\"path6\"\n />\n </g>\n <defs id=\"defs13\">\n <clipPath id=\"clip0_23610_312\">\n <rect\n fill=\"white\"\n height=\"23.9999\"\n id=\"rect10\"\n width=\"23.9999\"\n />\n </clipPath>\n </defs>\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const CollectionIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n {...props}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.00037 13.111C8.61387 13.1112 9.11072 13.6088 9.11072 14.2224C9.11066 14.8358 8.61383 15.3335 8.00037 15.3337C7.38675 15.3337 6.88909 14.836 6.88904 14.2224C6.88904 13.6087 7.38672 13.111 8.00037 13.111ZM4.4447 13.3337C4.93552 13.3338 5.33337 13.7315 5.33337 14.2224C5.33332 14.7132 4.93549 15.1109 4.4447 15.111C3.95382 15.111 3.55608 14.7132 3.55603 14.2224C3.55603 13.7314 3.95378 13.3337 4.4447 13.3337ZM11.556 13.3337C12.0468 13.3339 12.4447 13.7316 12.4447 14.2224C12.4446 14.7131 12.0467 15.1108 11.556 15.111C11.0651 15.111 10.6664 14.7132 10.6664 14.2224C10.6664 13.7314 11.0651 13.3337 11.556 13.3337ZM12.6664 1.77802C14.0164 1.77802 15.1107 2.87232 15.1107 4.22235V9.55536C15.1107 10.9054 14.0164 11.9997 12.6664 11.9997H3.33337C1.98335 11.9997 0.889038 10.9054 0.889038 9.55536V4.22235C0.889038 2.87232 1.98335 1.77802 3.33337 1.77802H12.6664Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const PlaylistIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n {...props}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.4127 11.582C13.8595 11.5821 14.2223 11.9801 14.2223 12.4707C14.2222 12.9612 13.8595 13.3593 13.4127 13.3594H5.23401C4.78722 13.3594 4.42455 12.9613 4.42444 12.4707C4.42444 11.98 4.78715 11.582 5.23401 11.582H13.4127ZM2.15588 5.62109C2.38676 5.51013 2.6605 5.54203 2.86096 5.70215L5.08362 7.47949C5.24149 7.60572 5.33362 7.79739 5.33362 8C5.3336 8.20261 5.24152 8.39421 5.08362 8.52051L2.86096 10.2979C2.6605 10.4579 2.38677 10.4899 2.15588 10.3789C1.92451 10.2682 1.77795 10.0334 1.77795 9.77734V6.22266C1.77795 5.96657 1.92451 5.73176 2.15588 5.62109ZM13.4127 7.33301C13.8596 7.33301 14.2223 7.73199 14.2223 8.22266C14.2221 8.71312 13.8594 9.11133 13.4127 9.11133H7.4762C7.02948 9.11132 6.66684 8.71312 6.66663 8.22266C6.66663 7.732 7.02935 7.33302 7.4762 7.33301H13.4127ZM13.4127 2.66699C13.8595 2.66704 14.2223 3.06503 14.2223 3.55566C14.2222 4.04625 13.8595 4.44428 13.4127 4.44434H5.23401C4.78718 4.44434 4.42449 4.04628 4.42444 3.55566C4.42444 3.065 4.78715 2.66699 5.23401 2.66699H13.4127Z\"\n fill=\"currentColor\"\n id=\"Vector\"\n />\n </svg>\n);\n","import type { ReactNode, MouseEvent, AriaAttributes, ComponentPropsWithRef } from 'react';\nimport { styled, css } from 'styled-components';\nimport { darken, transparentize } from 'polished';\nimport type { iconMap } from '../Icon/iconMap';\nimport type { TextAlignValues } from './Button';\n\nconst hoverDarken = '0.04';\nconst activeDarken = '0.08';\nconst hoverTransparency = 0.9;\nconst activeTransparency = 0.8;\n\n// this style removes default styles applied by various browsers\nexport const buttonResetStyle = css`\n align-items: center;\n background-color: transparent;\n background-image: none;\n border: none;\n box-shadow: none;\n color: inherit;\n cursor: pointer;\n display: inline-flex;\n font: inherit;\n justify-content: center;\n line-height: 1;\n padding: 0;\n text-align: left;\n vertical-align: middle;\n\n /*\n * Fixes input types in iOS. Higher specificity for Safari to deal with\n * Normalize defaults\n */\n &,\n &[type='button'],\n &[type='reset'],\n &[type='submit'] {\n appearance: none;\n }\n\n /* Normalize focus behavior of Firefox */\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n\n /* add some default affordance for a focused button */\n &:focus {\n outline: thin dotted #999999;\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n }\n`;\n\nconst primaryHoverStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => darken(hoverDarken, $buttonColor)};\n border-color: ${({ $buttonColor }) => darken(hoverDarken, $buttonColor)};\n`;\n\nconst primaryActiveStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => darken(activeDarken, $buttonColor)};\n border-color: ${({ $buttonColor }) => darken(activeDarken, $buttonColor)};\n`;\n\nconst primaryFocusStyle = css`\n box-shadow: inset 0 0 0 1px white;\n`;\n\nconst primaryStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => $buttonColor};\n border-color: ${({ $buttonColor }) => $buttonColor};\n color: white;\n\n &:focus-visible {\n ${primaryFocusStyle}\n }\n\n &:hover:not([aria-disabled='true']) {\n ${primaryHoverStyle}\n }\n\n &:active:not([aria-disabled='true']) {\n ${primaryActiveStyle}\n }\n`;\n\nconst secondaryHoverStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(hoverTransparency, $buttonColor)};\n`;\n\nconst secondaryActiveStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(activeTransparency, $buttonColor)};\n`;\n\nconst secondaryFocusStyle = css<{ $buttonColor: string }>`\n box-shadow:\n inset 0 0 0 1px white,\n inset 0 0 0 2px ${({ $buttonColor }) => $buttonColor};\n`;\n\nconst secondaryStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(1, $buttonColor)};\n border-color: ${({ $buttonColor }) => $buttonColor};\n color: ${({ $buttonColor }) => $buttonColor};\n\n &:focus-visible {\n ${secondaryFocusStyle}\n }\n\n &:hover:not([aria-disabled='true']) {\n ${secondaryHoverStyle}\n }\n\n &:active:not([aria-disabled='true']) {\n ${secondaryActiveStyle}\n }\n`;\n\nconst tertiaryHoverStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(hoverTransparency, $buttonColor)};\n`;\n\nconst tertiaryActiveStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(activeTransparency, $buttonColor)};\n`;\n\nconst tertiaryFocusStyle = css<{ $buttonColor: string }>`\n border-color: ${({ $buttonColor }) => $buttonColor};\n box-shadow:\n inset 0 0 0 1px white,\n inset 0 0 0 2px ${({ $buttonColor }) => $buttonColor};\n`;\n\nconst tertiaryStyle = css<{ $buttonColor: string }>`\n background-color: ${({ $buttonColor }) => transparentize(1, $buttonColor)};\n border-color: ${({ $buttonColor }) => transparentize(1, $buttonColor)};\n color: ${({ $buttonColor }) => $buttonColor};\n\n &:focus-visible {\n ${tertiaryFocusStyle}\n }\n\n &:hover:not([aria-disabled='true']) {\n ${tertiaryHoverStyle}\n }\n\n &:active:not([aria-disabled='true']) {\n ${tertiaryActiveStyle}\n }\n`;\n\nconst squareStyle = css`\n border-radius: 0;\n`;\n\nexport const disabledButtonStyle = css`\n opacity: 0.4;\n`;\n\nexport const largeButtonStyle = css`\n font-size: 16px;\n line-height: 24px;\n padding: ${({ theme }) => `${theme.spacing.space02} ${theme.spacing.space04}`};\n`;\n\nexport const mediumButtonStyle = css`\n font-size: 14px;\n line-height: 20px;\n padding: ${({ theme }) => `${theme.spacing.space02} ${theme.spacing.space03}`};\n`;\n\nexport const smallButtonStyle = css`\n font-size: 12px;\n line-height: 18px;\n padding: ${({ theme }) => `2px ${theme.spacing.space02}`};\n`;\n\nexport const fullWidthButtonStyle = css`\n width: 100%;\n`;\n\nexport type ButtonStyleProps = AriaAttributes &\n ComponentPropsWithRef<'button'> & {\n $buttonColor: string;\n $colorOverride?: string;\n $forceState?: 'active' | 'focus' | 'hover' | undefined;\n $fullWidth?: boolean;\n $icon?: ReactNode;\n $iconName?: keyof typeof iconMap;\n $iconPosition?: 'end' | 'start';\n $isLoading?: boolean;\n $label?: string;\n $labelWrap?: boolean;\n $noStyle?: boolean;\n $size?: 'lg' | 'md' | 'sm';\n $square?: boolean;\n $textAlign: TextAlignValues;\n $variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';\n children?: ReactNode;\n disabled?: boolean;\n onClick?: (event: MouseEvent) => void;\n type?: 'button' | 'reset' | 'submit';\n };\n\nexport type ButtonStyledComponentProps = ButtonStyleProps & {\n $noStyle: boolean;\n};\n\n// we also use this style in ButtonLink\n/* eslint-disable sonarjs/cognitive-complexity */\nexport const buttonStyle = css<ButtonStyleProps>`\n ${buttonResetStyle}\n border-radius: ${({ theme }) => theme.button.borderRadius};\n border-style: solid;\n border-width: 1px;\n cursor: pointer;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n text-decoration: none;\n transition: all ${({ theme }) => theme.duration.productive.moderate};\n\n &:focus {\n outline: none;\n }\n\n &[aria-disabled='true'] {\n ${disabledButtonStyle}\n }\n\n /* border-radius */\n ${({ $square }) => $square === true && squareStyle}\n\n /* label wrapping */\n white-space: ${({ $labelWrap }) => ($labelWrap === true ? 'wrap' : 'nowrap')};\n\n /* apply various button variant styles */\n ${({ $variant }) => {\n if ($variant === 'primary' || $variant === 'dangerous') {\n return primaryStyle;\n }\n if ($variant === 'secondary') {\n return secondaryStyle;\n }\n if ($variant === 'tertiary') {\n return tertiaryStyle;\n }\n return undefined;\n }}\n\n /* primarily used for documentation/debugging */\n ${({ $variant, $forceState }) => {\n if ($variant === 'primary' || $variant === 'dangerous') {\n if ($forceState === 'hover') {\n return primaryHoverStyle;\n }\n if ($forceState === 'active') {\n return primaryActiveStyle;\n }\n if ($forceState === 'focus') {\n return primaryFocusStyle;\n }\n }\n if ($variant === 'secondary') {\n if ($forceState === 'hover') {\n return secondaryHoverStyle;\n }\n if ($forceState === 'active') {\n return secondaryActiveStyle;\n }\n if ($forceState === 'focus') {\n return secondaryFocusStyle;\n }\n }\n if ($variant === 'tertiary') {\n if ($forceState === 'hover') {\n return tertiaryHoverStyle;\n }\n if ($forceState === 'active') {\n return tertiaryActiveStyle;\n }\n if ($forceState === 'focus') {\n return tertiaryFocusStyle;\n }\n }\n return undefined;\n }}\n\n ${({ $size }) => {\n if ($size === 'lg') {\n return largeButtonStyle;\n }\n if ($size === 'md') {\n return mediumButtonStyle;\n }\n if ($size === 'sm') {\n return smallButtonStyle;\n }\n return undefined;\n }}\n\n ${({ $fullWidth }) => {\n if ($fullWidth) {\n return fullWidthButtonStyle;\n }\n return undefined;\n }}\n`;\n/* eslint-enable sonarjs/cognitive-complexity */\n\nexport const ButtonStyledComponent = styled.button<ButtonStyledComponentProps>`\n ${({ $noStyle }) => ($noStyle ? buttonResetStyle : buttonStyle)}\n`;\n","import { isNonEmptyString } from '@wistia/type-guards';\nimport type { DefaultTheme } from 'styled-components';\n\nexport const getButtonColor = (\n colorOverride: string | null | undefined,\n variant: string,\n allThemeColors: DefaultTheme['color'],\n): string => {\n if (isNonEmptyString(colorOverride)) {\n return colorOverride;\n }\n if (variant === 'primary') {\n return allThemeColors.brandBlue500;\n }\n if (variant === 'secondary') {\n return allThemeColors.grey900;\n }\n if (variant === 'tertiary') {\n return allThemeColors.grey900;\n }\n if (variant === 'dangerous') {\n return allThemeColors.red600;\n }\n return allThemeColors.brandBlue500; // default\n};\n","/* eslint-disable no-typeof-window-undefined/no-typeof-window-undefined */\n/**\n * @returns {boolean} - whether running in a server environment\n */\nexport const isServer = () => typeof window === 'undefined' || typeof document === 'undefined';\n","import { createContext } from 'react';\nimport type { ToastVariants } from './Toast';\n\nexport type UseToastProps = {\n message: string;\n variant?: ToastVariants;\n actionLabel?: string;\n actionInterceptor?: () => void;\n timeout?: number;\n colorOverride?: string | undefined;\n};\n\nexport type UseToastFn = (props: UseToastProps) => void;\n\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nexport const ToastContext = createContext<UseToastFn>(null!);\n","import type { ReactNode, JSX } from 'react';\nimport { useRef, useCallback, useMemo } from 'react';\nimport { isFunction } from '@wistia/type-guards';\nimport { ModalProviderContext } from './ModalProviderContext';\n\nexport type ModalProviderProps = {\n /**\n * Pass an arbitrary child node\n */\n children: ReactNode;\n};\ntype SetIsShownFunction = (b: boolean) => void;\n\nexport const ModalProvider = ({ children }: ModalProviderProps): JSX.Element => {\n const modalQueueRef = useRef(new Set<SetIsShownFunction>());\n\n const modalQueue = modalQueueRef.current;\n\n const isFirstCallback = useCallback(\n (setIsShown: SetIsShownFunction) => modalQueue.values().next().value === setIsShown,\n [modalQueue],\n );\n\n const showFirstModal = useCallback(() => {\n const setIsShown = modalQueue.values().next().value;\n\n if (isFunction(setIsShown)) {\n setIsShown(true);\n }\n }, [modalQueue]);\n\n const hideFirstModal = useCallback(() => {\n const setIsShown = modalQueue.values().next().value;\n\n if (isFunction(setIsShown)) {\n setIsShown(false);\n }\n }, [modalQueue]);\n\n const attemptShowModal = useCallback(\n (setIsShown: SetIsShownFunction) => {\n modalQueue.add(setIsShown);\n\n if (isFirstCallback(setIsShown)) {\n showFirstModal();\n }\n },\n [modalQueue, isFirstCallback, showFirstModal],\n );\n\n const attemptHideModal = useCallback(\n (setIsShown: SetIsShownFunction) => {\n modalQueue.add(setIsShown);\n\n if (isFirstCallback(setIsShown)) {\n hideFirstModal();\n modalQueue.delete(setIsShown);\n showFirstModal();\n } else {\n modalQueue.delete(setIsShown);\n }\n },\n [modalQueue, isFirstCallback, hideFirstModal, showFirstModal],\n );\n\n const removeModalFromQueue = useCallback(\n (setIsShown: SetIsShownFunction) => {\n modalQueue.delete(setIsShown);\n },\n [modalQueue],\n );\n\n const modalProviderCoordinator = useMemo(\n () => ({\n attemptShowModal,\n attemptHideModal,\n removeModalFromQueue,\n }),\n [attemptShowModal, attemptHideModal, removeModalFromQueue],\n );\n\n return (\n <ModalProviderContext.Provider value={modalProviderCoordinator}>\n {children}\n </ModalProviderContext.Provider>\n );\n};\n","import type { Dispatch, SetStateAction } from 'react';\nimport { createContext, useContext } from 'react';\n\ntype ModalProviderContextType = {\n attemptShowModal?: (setIsShown: Dispatch<SetStateAction<boolean>>) => void;\n attemptHideModal?: (setIsShown: Dispatch<SetStateAction<boolean>>) => void;\n removeModalFromQueue?: (setIsShown: Dispatch<SetStateAction<boolean>>) => void;\n};\n\nexport const ModalProviderContext = createContext<ModalProviderContextType>({});\n\nexport const useModalProviderContext = () => useContext(ModalProviderContext);\n","import { createGlobalStyle } from 'styled-components';\nimport { normalize } from './normalize';\nimport { baseline } from './baseline';\n\nexport const GlobalStyle = createGlobalStyle`\n ${normalize}\n ${baseline}\n`;\n","import { css } from 'styled-components';\n\nexport const normalize = css`\n /* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n /* Document\n ========================================================================== */\n\n /**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\n html {\n line-height: 1.15; /* 1 */\n /* stylelint-disable-next-line plugin/use-baseline */\n text-size-adjust: 100%; /* 2 */\n }\n\n /* Sections\n ========================================================================== */\n\n /**\n * Remove the margin in all browsers.\n */\n\n body {\n margin: 0;\n }\n\n /**\n * Render the 'main' element consistently in IE.\n */\n\n main {\n display: block;\n }\n\n /**\n * Correct the font size and margin on 'h1' elements within 'section' and\n * 'article' contexts in Chrome, Firefox, and Safari.\n */\n\n h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n\n /* Grouping content\n ========================================================================== */\n\n /**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\n hr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n }\n\n /**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd 'em' font sizing in all browsers.\n */\n /* stylelint-disable */\n pre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n }\n /* stylelint-enable */\n\n /* Text-level semantics\n ========================================================================== */\n\n /**\n * Remove the gray background on active links in IE 10.\n */\n\n a {\n background-color: transparent;\n }\n\n /**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\n abbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n }\n\n /**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\n b,\n strong {\n font-weight: bolder;\n }\n\n /**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd 'em' font sizing in all browsers.\n */\n\n /* stylelint-disable */\n code,\n kbd,\n samp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n }\n /* stylelint-enable */\n\n /**\n * Add the correct font size in all browsers.\n */\n\n small {\n font-size: 80%;\n }\n\n /**\n * Prevent 'sub' and 'sup' elements from affecting the line height in\n * all browsers.\n */\n\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n /* Embedded content\n ========================================================================== */\n\n /**\n * Remove the border on images inside links in IE 10.\n */\n\n img {\n border-style: none;\n }\n\n /* Forms\n ========================================================================== */\n\n /**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n }\n\n /**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\n button,\n input {\n /* 1 */\n overflow: visible;\n }\n\n /**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\n button,\n select {\n /* 1 */\n text-transform: none;\n }\n\n /**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n appearance: auto;\n }\n\n /**\n * Remove the inner border and padding in Firefox.\n */\n\n button::-moz-focus-inner,\n [type='button']::-moz-focus-inner,\n [type='reset']::-moz-focus-inner,\n [type='submit']::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n\n /**\n * Restore the focus styles unset by the previous rule.\n */\n\n button:-moz-focusring,\n [type='button']:-moz-focusring,\n [type='reset']:-moz-focusring,\n [type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n }\n\n /**\n * Correct the padding in Firefox.\n */\n\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n /**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from 'fieldset' elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * 'fieldset' elements in all browsers.\n */\n\n legend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n }\n\n /**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\n progress {\n vertical-align: baseline;\n }\n\n /**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\n textarea {\n overflow: auto;\n }\n\n /**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n [type='checkbox'],\n [type='radio'] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n }\n\n /**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n [type='number']::-webkit-inner-spin-button,\n [type='number']::-webkit-outer-spin-button {\n height: auto;\n }\n\n /**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n [type='search'] {\n appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n }\n\n /**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n [type='search']::-webkit-search-decoration {\n appearance: none;\n }\n\n /**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to 'inherit' in Safari.\n */\n\n ::-webkit-file-upload-button {\n appearance: auto; /* 1 */\n font: inherit; /* 2 */\n }\n\n /* Interactive\n ========================================================================== */\n\n /*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\n details {\n display: block;\n }\n\n /*\n * Add the correct display in all browsers.\n */\n\n summary {\n display: list-item;\n }\n\n /* Misc\n ========================================================================== */\n\n /**\n * Add the correct display in IE 10+.\n */\n\n template {\n display: none;\n }\n\n /**\n * Add the correct display in IE 10.\n */\n\n [hidden] {\n display: none;\n }\n`;\n","import { css } from 'styled-components';\n\nexport const baseline = css`\n /**\n * 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'\n * 2. Ensure the iOS tap highlight is transparent\n */\n html {\n box-sizing: border-box; /* 1 */\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%); /* 2 */\n }\n\n /**\n * 1. See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/\n */\n *,\n *::before,\n *::after {\n box-sizing: inherit; /* 1 */\n }\n\n /**\n * 1. Without this fonts are too heavy weight in OS X Firefox\n * 2. Design decision\n * 3. Preferable for the body to fill viewport, even when empty\n */\n body {\n -moz-osx-font-smoothing: grayscale; /* 1 */\n -webkit-font-smoothing: antialiased; /* 2 */\n color: ${({ theme }) => theme.color.grey900};\n font-family: ${({ theme }) => theme.font.family.default};\n font-size: ${({ theme }) => theme.font.size.default};\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n min-height: 100vh; /* 3 */\n }\n`;\n","import type { Dispatch, SetStateAction } from 'react';\nimport { useState, useCallback } from 'react';\n\nexport type UseBooleanReturn = [\n boolean,\n () => void,\n () => void,\n () => void,\n Dispatch<SetStateAction<boolean>>,\n];\n\nexport const useBoolean = (initialValue = false): UseBooleanReturn => {\n const [value, setValue] = useState(initialValue);\n\n const toggle = useCallback(() => setValue((val) => !val), []);\n const setTrue = useCallback(() => setValue(true), []);\n const setFalse = useCallback(() => setValue(false), []);\n\n return [value, toggle, setTrue, setFalse, setValue];\n};\n","import { useCallback } from 'react';\nimport { copyToClipboard } from '../../helpers/copyToClipboard';\nimport { useTimedToggle } from '../../private/hooks/useTimedToggle';\n\nexport const useClipboard = (\n textToCopy: string,\n timeout = 1500,\n): [() => Promise<void>, boolean, boolean] => {\n const [hasCopied, toggleHasCopied] = useTimedToggle(false);\n const [failedToCopy, toggleFailedToCopy] = useTimedToggle(false);\n\n const onCopy = useCallback(async () => {\n try {\n await copyToClipboard(textToCopy);\n\n // if there's no timeout value there's no need to set toggleHasCopied\n if (timeout && timeout > 0) {\n toggleHasCopied(timeout);\n }\n } catch (error: unknown) {\n if (error instanceof Error) {\n toggleFailedToCopy(timeout);\n }\n }\n }, [textToCopy, timeout, toggleHasCopied, toggleFailedToCopy]);\n\n return [onCopy, hasCopied, failedToCopy];\n};\n","import { useEffect, useRef, useState } from 'react';\n\nexport const useTimedToggle = (initialValue: boolean): [boolean, (timeout: number) => void] => {\n const [value, setValue] = useState<boolean>(false);\n const timeoutRef = useRef<number | undefined>(undefined);\n const initialValueRef = useRef(initialValue);\n\n const toggleValue = (timeout: number) => {\n clearTimeout(timeoutRef.current);\n setValue(!initialValueRef.current);\n timeoutRef.current = window.setTimeout(() => setValue(initialValueRef.current), timeout);\n };\n\n useEffect(() => () => clearTimeout(timeoutRef.current), []);\n\n return [value, toggleValue];\n};\n","import type { RefObject } from 'react';\nimport { useMemo, useState, useRef, useLayoutEffect } from 'react';\n\ntype Rect = {\n width: number;\n height: number;\n top: number;\n left: number;\n bottom: number;\n right: number;\n x: number;\n y: number;\n};\n\nconst initialRect: Rect = {\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n x: 0,\n y: 0,\n};\n\nexport const useElementObserver = <T extends HTMLElement>(): [RefObject<T | null>, Rect] => {\n const ref = useRef<T | null>(null);\n const [rect, setRect] = useState<Rect>(initialRect);\n const observer = useMemo(\n () =>\n new window.ResizeObserver((entries) => {\n if (entries[0]) {\n const { width, height, top, left, bottom, right, x, y } = entries[0].contentRect;\n setRect({ width, height, top, left, bottom, right, x, y });\n }\n }),\n [],\n );\n\n useLayoutEffect(() => {\n if (!ref.current) {\n return;\n }\n\n observer.observe(ref.current);\n\n // eslint-disable-next-line consistent-return\n return () => {\n observer.disconnect();\n };\n }, [observer]);\n\n return [ref, rect];\n};\n","import { useEffect, useRef } from 'react';\n\ntype AddEventListenerType = (\n type: string,\n listener: (evt: Event) => void,\n options?: AddEventListenerOptions | boolean,\n) => void;\n\ntype RemoveEventListenerType = (\n type: string,\n listener: (evt: Event) => void,\n options?: AddEventListenerOptions | boolean,\n) => void;\n\ntype Listenable = {\n addEventListener: AddEventListenerType;\n removeEventListener: RemoveEventListenerType;\n};\n\n// ensure element supports addEventListener\nconst isEventTargetSupported = (eventTarget: unknown): eventTarget is Listenable =>\n // @ts-expect-error the compiler thinks that addEventListener may not exist on eventTarget, but we still need to check it.\n\n Boolean(typeof eventTarget === 'object' && eventTarget?.addEventListener);\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const useEvent = <T extends Event>(\n eventName: Parameters<AddEventListenerType>[0],\n eventHandler: (event: T) => unknown,\n eventTarget: unknown = window,\n eventOptions: Parameters<RemoveEventListenerType>[2] = {},\n) => {\n // refs to store eventHandler & eventOptions\n const savedEventHandler = useRef<typeof eventHandler | undefined>(undefined);\n const savedEventOptions = useRef<typeof eventOptions | undefined>(undefined);\n\n // update ref when handler changes;\n // avoids effect dependencies array which could cause effect to re-run every render\n useEffect(() => {\n savedEventHandler.current = eventHandler;\n }, [eventHandler]);\n\n // update ref when options changes\n useEffect(() => {\n savedEventOptions.current = eventOptions;\n }, [eventOptions]);\n\n useEffect(() => {\n // early return if we can't do anything useful with this hook\n if (!eventName || !isEventTargetSupported(eventTarget)) {\n return;\n }\n\n const eventListener = (event: Event) => {\n if (savedEventHandler.current !== undefined) {\n return savedEventHandler.current(event as T);\n }\n return (): void => {}; // eslint-disable-line @typescript-eslint/no-empty-function\n };\n\n eventTarget.addEventListener(eventName, eventListener, savedEventOptions.current);\n\n // remove event listener on unmount\n // eslint-disable-next-line consistent-return\n return () => {\n eventTarget.removeEventListener(eventName, eventListener, savedEventOptions.current);\n };\n }, [eventName, eventTarget, savedEventOptions]);\n};\n","import type { RefObject } from 'react';\nimport { useRef, useCallback, useEffect } from 'react';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport {\n FOCUSABLE_ELEMENT_SELECTORS,\n createAriaHider,\n isFocusableElement,\n isTabbableElement,\n markForFocusLater,\n returnFocus,\n scopeTab,\n setupScopedFocus,\n teardownScopedFocus,\n} from './helpers';\n\ntype UseFocusTrapOptions = {\n disableAriaHider?: boolean;\n focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;\n};\n\nconst isRef = <T extends HTMLElement>(val: unknown): val is RefObject<T | null> => {\n return val !== null && typeof val === 'object' && 'current' in val;\n};\n\nexport const useFocusTrap = (active = true, options: UseFocusTrapOptions = {}) => {\n const ref = useRef<HTMLElement | null>(null);\n const restoreAriaRef = useRef<(() => void) | null>(null);\n\n const setRef = useCallback(\n (node: HTMLElement | null | undefined) => {\n if (restoreAriaRef.current !== null) {\n restoreAriaRef.current();\n }\n\n if (ref.current) {\n returnFocus();\n teardownScopedFocus();\n }\n\n if (active && node !== null && node !== undefined) {\n setupScopedFocus(node);\n markForFocusLater();\n\n const processNode = (node2: HTMLElement) => {\n // check if we should disable aria\n restoreAriaRef.current = !(options.disableAriaHider ?? false)\n ? createAriaHider(node2)\n : null; // Find the initial focus element\n\n let focusElement: HTMLElement | null = null;\n if (isNotUndefined(options.focusSelector)) {\n if (isRef(options.focusSelector)) {\n focusElement = options.focusSelector.current;\n } else {\n focusElement =\n typeof options.focusSelector === 'string'\n ? node2.querySelector(options.focusSelector)\n : options.focusSelector;\n }\n }\n\n if (!focusElement) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const children = Array.from(\n node2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS),\n ) as HTMLElement[];\n focusElement = // Prefer tabbable elements, But fallback to any focusable element\n children.find(isTabbableElement) ?? // But fallback to any focusable element\n children.find(isFocusableElement) ?? // Nothing found\n null; // If everything else fails, see if the node itself can handle focus\n\n if (!focusElement && isFocusableElement(node2)) {\n focusElement = node2;\n }\n }\n\n if (focusElement) {\n // Set the initial focus inside the traps\n focusElement.focus();\n }\n\n if (!focusElement && process.env['NODE_ENV'] === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '[useFocusTrap]: Failed to find a focusable element after activating the focus trap. Make sure to include at an element that can recieve focus. As a fallback, you can also set \"tabIndex={-1}\" on the focus trap node.',\n node2,\n );\n }\n }; // Delay processing the HTML node by a frame. This ensures focus is assigned correctly.\n\n setTimeout(() => {\n // node.ownerDocument should always be a truthy value\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions\n if (node.ownerDocument) {\n processNode(node);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions\n if (!node.ownerDocument && process.env['NODE_ENV'] === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '[useFocusTrap]: The focus trap is not part of the DOM yet, so it is unable to correctly set focus. Make sure to render the ref node.',\n node,\n );\n }\n });\n\n ref.current = node;\n } else {\n ref.current = null;\n }\n },\n [active, options.focusSelector, options.disableAriaHider],\n );\n\n useEffect(() => {\n if (!active) {\n return undefined;\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Tab' && ref.current) {\n scopeTab(ref.current, event);\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [active]);\n\n return setRef;\n};\n","import { coerceToString } from '../../helpers/stringHelpers/coerceToString';\n\nexport const focusSelector = 'a, input, select, textarea, button, object, [tabindex]';\n\nexport const FOCUSABLE_ELEMENT_SELECTORS =\n 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, [tabindex=\"0\"], [contenteditable]';\n\nconst isHiddenElement = (element: HTMLElement) => {\n const { display, visibility } = window.getComputedStyle(element);\n const isHidden =\n display === 'none' ||\n element.style.display === 'none' ||\n visibility === 'none' ||\n element.style.visibility === 'hidden';\n return (element.offsetWidth <= 0 && element.offsetHeight <= 0) || isHidden;\n};\n\nconst isVisibleElement = (element: HTMLElement) => {\n let parentElement: HTMLElement | null = element;\n\n while (parentElement) {\n if (parentElement === document.body) {\n break;\n }\n if (isHiddenElement(parentElement)) {\n return false;\n }\n parentElement = parentElement.parentNode as HTMLElement | null;\n }\n\n return true;\n};\n\nconst getElementTabIndex = (element: HTMLElement) => {\n const tabIndex = element.getAttribute('tabindex');\n\n // @ts-expect-error - The logic was written this way pre-TS conversion, and there are checks for NaN below which is the case if the index is undefined\n return Number.parseInt(tabIndex ?? undefined, 10);\n};\n\nconst isTabIndexNaN = (element: HTMLElement) => {\n const tabIndex = getElementTabIndex(element);\n return Number.isNaN(tabIndex);\n};\n\nexport const isFocusableElement = (element: HTMLElement) => {\n const tabbableNodeRegEx = /input|select|textarea|button|object/;\n const nodeName = element.nodeName.toLowerCase();\n const isTabIndexNotNaN = !isTabIndexNaN(element);\n const isFocusable =\n // @ts-expect-error - Disabled is specific to buttons and inputs, but we could be dealing with any number of types here. Disabled would be undefined for those, so ignoring.\n (tabbableNodeRegEx.test(nodeName) && !(element.disabled as boolean)) ||\n (element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n\n return Boolean(isFocusable) && isVisibleElement(element);\n};\n\n// elements a user can tab between, excluding elements with tabIndex=-1\nexport const isTabbableElement = (element: HTMLElement) => {\n const tabIndex = getElementTabIndex(element);\n return (isTabIndexNaN(element) || tabIndex >= 0) && isFocusableElement(element);\n};\n\nconst findTabbableDescendants = (element: HTMLElement) =>\n Array.from<HTMLElement>(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter(\n isTabbableElement,\n );\n\nconst focusLaterElements: HTMLElement[] = [];\n\nlet focusElement: HTMLElement | null = null;\nlet needToFocus = false;\n\nconst handleBlur = () => {\n needToFocus = true;\n};\n\nconst handleFocus = () => {\n if (needToFocus) {\n needToFocus = false;\n\n if (!focusElement) {\n return;\n }\n\n if (focusElement.contains(document.activeElement)) {\n return;\n }\n\n const element = findTabbableDescendants(focusElement)[0] ?? focusElement;\n element.focus();\n }\n};\n\nexport const markForFocusLater = () => {\n const element = document.activeElement as HTMLElement | null;\n\n if (element !== null) {\n focusLaterElements.push(element);\n }\n};\n\nexport const returnFocus = () => {\n let toFocus = null;\n\n try {\n toFocus = focusLaterElements.pop();\n if (toFocus) {\n toFocus.focus();\n }\n } catch {\n // eslint-disable-next-line no-console\n console.warn(\n `You tried to return focus to ${coerceToString(toFocus)} but it is not in the DOM anymore`,\n );\n }\n};\n\nexport const setupScopedFocus = (element: HTMLElement) => {\n focusElement = element;\n document.addEventListener('focusout', handleBlur, false);\n document.addEventListener('focusin', handleFocus, true);\n};\n\nexport const teardownScopedFocus = () => {\n focusElement = null;\n document.removeEventListener('focusout', handleBlur);\n document.removeEventListener('focusin', handleFocus);\n};\n\n// Controls tabbing, so it stays inside the node element\nexport const scopeTab = (node: HTMLElement, event: KeyboardEvent) => {\n const tabbable = findTabbableDescendants(node);\n\n if (!tabbable.length) {\n event.preventDefault();\n return;\n }\n\n const finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1];\n\n // handle immediate shift+tab after opening with mouse\n const leavingFinalTabbable =\n finalTabbable === document.activeElement || node === document.activeElement;\n\n if (!leavingFinalTabbable) {\n return;\n }\n\n event.preventDefault();\n\n const target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];\n\n if (target) {\n target.focus();\n }\n};\n\n// Sets `aria-hidden` on all elements on the body, except for the active node\nexport const createAriaHider = (containerNode: HTMLElement, selector?: string) => {\n selector ??= 'body > :not(script)'; // eslint-disable-line no-param-reassign\n\n const rootNodes = Array.from(document.querySelectorAll(selector)).map((node) => {\n if (node.contains(containerNode)) {\n return undefined;\n }\n\n const ariaHidden = node.getAttribute('aria-hidden');\n\n if (ariaHidden === null || ariaHidden === 'false') {\n node.setAttribute('aria-hidden', 'true');\n }\n\n return {\n node,\n ariaHidden,\n };\n });\n\n return () => {\n rootNodes.forEach((item) => {\n if (!item) {\n return;\n }\n\n if (item.ariaHidden === null) {\n item.node.removeAttribute('aria-hidden');\n } else {\n item.node.setAttribute('aria-hidden', item.ariaHidden);\n }\n });\n };\n};\n","import { useCallback, useState } from 'react';\n\n// returning a new object reference guarantees that a before-and-after\n// equivalence check will always be false, resulting in a re-render,\n// even when multiple calls to forceUpdate are batched\nexport const useForceUpdate = (): (() => void) => {\n // eslint-disable-next-line react/hook-use-state\n const [, dispatch] = useState(Object.create(null));\n\n // turn dispatch(required_parameter) into dispatch()\n return useCallback(() => {\n dispatch(Object.create(null));\n }, [dispatch]);\n};\n","export { useFormikContext } from 'formik';\n","import { useState } from 'react';\n\ntype HoverProps = {\n onFocus: () => void;\n onMouseEnter: () => void;\n onBlur: () => void;\n onMouseLeave: () => void;\n onMouseMove?: () => void;\n};\n\nexport const useIsHovered = (): [boolean, HoverProps, (hovered: boolean) => void] => {\n const [isHovered, setIsHovered] = useState(false);\n\n const onFocus = () => setIsHovered(true);\n const onMouseEnter = () => setIsHovered(true);\n const onMouseMove = () => setIsHovered(true);\n const onBlur = () => setIsHovered(false);\n const onMouseLeave = () => setIsHovered(false);\n\n const hoverProps: HoverProps = {\n onFocus,\n onMouseEnter,\n onBlur,\n onMouseLeave,\n };\n\n if (!isHovered) {\n hoverProps.onMouseMove = onMouseMove;\n }\n\n return [isHovered, hoverProps, setIsHovered];\n};\n","import { useMemo } from 'react';\nimport { useEvent } from '../useEvent';\n\ntype KeyFilterPredicate = (evt: KeyboardEvent) => boolean;\ntype KeyFilter = KeyFilterPredicate | boolean | string | null | undefined;\n\nconst createKeyPredicate = (keyFilter: KeyFilter): KeyFilterPredicate => {\n // key arg is a function so just return the function\n if (typeof keyFilter === 'function') {\n return keyFilter;\n }\n // key arg is probably a KeyboardEvent key\n if (typeof keyFilter === 'string') {\n return (event: KeyboardEvent) => event.key === keyFilter;\n }\n // key arg is truthy\n if (keyFilter !== null && keyFilter !== undefined && Boolean(keyFilter)) {\n return () => true;\n }\n // key arg is falsey\n return () => false;\n};\n\ntype EventHandler = (event: KeyboardEvent) => unknown;\n\ntype UseKeyOptions = {\n eventName?: string;\n eventTarget?: Parameters<typeof useEvent>[2];\n eventOptions?: Parameters<typeof useEvent>[3];\n};\n\nexport const useKey = (\n key: KeyFilter,\n eventHandler: EventHandler,\n options: UseKeyOptions = {},\n dependencies: unknown[] = [key],\n) => {\n const { eventName = 'keydown', eventTarget, eventOptions } = options;\n\n const memoizedEventHandler = useMemo(() => {\n const predicate = createKeyPredicate(key);\n\n // @ts-expect-error Not all code paths return a value.\n return (handlerEvent: KeyboardEvent) => {\n // key events that happen *inside* an input should be ignored; this is to avoid issues\n // where typing into an input is inadvertently triggering actions the user does not want\n if (\n ['INPUT', 'TEXTAREA', 'SELECT'].includes(document.activeElement?.nodeName ?? '') ||\n (document.activeElement as HTMLElement | null)?.isContentEditable\n ) {\n return;\n }\n if (predicate(handlerEvent)) {\n return eventHandler(handlerEvent); // eslint-disable-line consistent-return\n }\n };\n // eslint-disable-next-line react-hooks/use-memo\n }, dependencies); // eslint-disable-line react-hooks/exhaustive-deps\n\n useEvent(eventName, memoizedEventHandler, eventTarget, eventOptions);\n};\n","import { useState } from 'react';\nimport { useKey } from '../useKey';\n\ntype KeyPressState = [boolean, KeyboardEvent | null];\n\nexport const useKeyPress = (keyFilter: Parameters<typeof useKey>[0]): KeyPressState => {\n const [state, setState] = useState<KeyPressState>([false, null]);\n\n useKey(keyFilter, (event: KeyboardEvent) => setState([true, event]), { eventName: 'keydown' }, [\n state,\n ]);\n useKey(keyFilter, (event: KeyboardEvent) => setState([false, event]), { eventName: 'keyup' }, [\n state,\n ]);\n\n return state;\n};\n","import { useEffect, useRef } from 'react';\n\nexport const useUpdateEffect = (effect: () => () => void, dependencies: unknown[]): void => {\n const isInitialMount = useRef(true);\n\n useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n return effect();\n }, dependencies); // eslint-disable-line react-hooks/exhaustive-deps\n};\n","import { useKeyPress } from '../useKeyPress';\nimport { useUpdateEffect } from '../../private/hooks/useUpdateEffect';\n\ntype KeyEventHandler = (keyboardEvent: KeyboardEvent) => unknown;\n\nexport const useKeyPressOnce = (\n key: Parameters<typeof useKeyPress>[0],\n keydownHandler: KeyEventHandler | null | undefined = undefined,\n keyupHandler: KeyEventHandler | null | undefined = undefined,\n) => {\n const [pressed, event] = useKeyPress(key);\n\n useUpdateEffect(() => {\n if (!pressed && keyupHandler && event !== null) {\n keyupHandler(event);\n } else if (pressed && keydownHandler && event !== null) {\n keydownHandler(event);\n } else {\n // do nothing\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }, [pressed]);\n};\n","import { useState } from 'react';\n\ntype SetItemType = Storage['setItem'];\n\n// https://usehooks.com/useLocalStorage/\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- TODO this is load-bearing, the build fails without it\nexport const useLocalStorage = <T, _>(\n key: Parameters<SetItemType>[0],\n initialValue: T,\n storage: Storage = window.localStorage,\n): [T | undefined, (newValue: T) => void, () => void] => {\n // State to store our value\n // Pass initial state function to useState so logic is only executed once\n const [storedValue, setStoredValue] = useState<T | undefined>(() => {\n try {\n // Get from local storage by key\n const item = storage.getItem(key);\n // Parse stored json or if none return initialValue\n return item !== null && Boolean(item) ? (JSON.parse(item) as T | undefined) : initialValue;\n } catch (error: unknown) {\n // If error also return initialValue\n console.log(error); // eslint-disable-line no-console\n return initialValue;\n }\n });\n\n // Return a wrapped version of useState's setter function that ...\n // ... persists the new value to localStorage.\n const setValue = (value: T | ((currentValue: T | undefined) => T | undefined)) => {\n try {\n // Allow value to be a function so we have same API as useState\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n // Save state\n setStoredValue(valueToStore);\n // Save to local storage\n storage.setItem(key, JSON.stringify(valueToStore));\n } catch (error: unknown) {\n // A more advanced implementation would handle the error case\n console.error(error); // eslint-disable-line no-console\n }\n };\n\n const removeValue = () => {\n storage.removeItem(key);\n setStoredValue(undefined);\n };\n\n return [storedValue, setValue, removeValue];\n};\n","import type { MutableRefObject, ReactNode, JSX } from 'react';\n\ntype AcceptedElementTypes = HTMLElement | JSX.Element | ReactNode;\ntype AcceptedRefs =\n | MutableRefObject<unknown> // eslint-disable-line @typescript-eslint/no-deprecated\n | ((element: AcceptedElementTypes) => unknown)\n | null\n | undefined;\n\nexport const useMergedRefs = (refs: AcceptedRefs[]) => (element: AcceptedElementTypes) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(element);\n } else if (ref != null) {\n ref.current = element; // eslint-disable-line no-param-reassign\n } else {\n // do nothing\n }\n });\n};\n","import type { RefObject } from 'react';\nimport { useEffect } from 'react';\n\nexport const useOnClickOutside = (\n ref: RefObject<HTMLElement | null | undefined>,\n handler: (event: Event) => unknown,\n) => {\n useEffect(() => {\n const listener = (event: Event): void => {\n // don't do anything if the click event is on the ref element or descendent elements\n if (!ref.current || ref.current.contains(event.target as Node)) {\n return;\n }\n\n handler(event);\n };\n\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, [ref, handler]);\n};\n","import { useLayoutEffect } from 'react';\n\nexport const usePreventScroll = (locked: boolean): void => {\n useLayoutEffect(() => {\n if (locked) {\n // stash original body overflow\n const originalStyle = window.getComputedStyle(document.body).overflow;\n // prevent scrolling on mount\n document.body.style.overflow = 'hidden';\n\n return () => {\n // restore scrolling on unmount\n document.body.style.overflow = originalStyle;\n };\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }, [locked]);\n};\n","import { useEffect, useRef } from 'react';\n\n// eslint-disable-next-line prettier/prettier\nexport const usePreviousValue = <T,>(value: T): T | undefined => {\n const ref = useRef<T>(undefined);\n\n useEffect(() => {\n ref.current = value;\n });\n\n return ref.current;\n};\n","import { styled } from 'styled-components';\nimport type { MouseEvent, RefObject, ReactNode, ComponentPropsWithoutRef } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { ModalBase } from '../ModalBase';\nimport { ButtonGroup } from '../ButtonGroup';\nimport { Text } from '../Text';\nimport { Backdrop } from '../Backdrop';\nimport { ModalCloseButton } from '../../private/components/ModalCloseButton';\nimport { mq } from '../../helpers/mq';\nimport type { OnBeforeHideInterface } from '../ModalBase/ModalBase';\nimport { getModalBackgroundGradient } from './getModalBackgroundGradient';\n\nconst defaultWidth = '532px';\nconst illustrationDiameter = 160;\n\ntype DialogueProps = {\n $fullHeight: boolean;\n};\n\nconst Dialogue = styled.div<DialogueProps>`\n background-color: white;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n height: 100vh;\n overflow: auto;\n position: relative;\n width: 100vw;\n\n ${mq.smAndUp} {\n border-radius: 16px;\n height: ${({ $fullHeight }) => ($fullHeight ? 'min-content' : 'auto')};\n margin: ${({ theme }) => theme.spacing.space05};\n ${({ $fullHeight }) => ($fullHeight ? 'min-height: calc(100vh - 48px);' : '')}\n overflow: visible;\n width: min-content;\n }\n\n ${mq.mdAndUp} {\n flex-direction: row;\n }\n`;\n\ntype BodyProps = {\n width: string;\n};\n\nconst Body = styled.div<BodyProps>`\n display: flex;\n flex-direction: column;\n padding: ${({ theme }) => theme.spacing.space06};\n\n ${mq.smAndUp} {\n width: ${({ width }) => width};\n }\n\n p {\n margin-top: 0;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n`;\n\nconst Message = styled.div`\n flex-grow: 1;\n`;\n\ntype IllustrationWrapperProps = {\n illustrationBackgroundColor: string;\n};\nconst IllustrationWrapper = styled.div<IllustrationWrapperProps>`\n ${({ illustrationBackgroundColor }) => getModalBackgroundGradient(illustrationBackgroundColor)};\n align-items: center;\n background-position: center;\n background-size: cover;\n border-radius: 0;\n box-sizing: content-box;\n display: flex;\n justify-content: center;\n min-height: 192px;\n min-width: 192px;\n padding: ${({ theme }) => `${theme.spacing.space04} ${theme.spacing.space06}`};\n\n ${mq.smAndUp} {\n border-radius: 16px 16px 0 0;\n }\n\n ${mq.mdAndUp} {\n border-radius: 16px 0 0 16px;\n padding: ${({ theme }) => theme.spacing.space06};\n }\n\n img {\n height: ${illustrationDiameter}px;\n width: ${illustrationDiameter}px;\n }\n`;\n\nexport type ActionModalProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Horizontally align modal to the left, center, or right of the container\n */\n alignHorizontal?: 'center' | 'left' | 'normal' | 'right';\n /**\n * Vertically align modal to the top, center, or bottom of the container\n */\n alignVertical?: 'bottom' | 'center' | 'normal' | 'top';\n /**\n * Buttons to be shown at the bottom of the modal\n */\n buttons?: ReactNode | ((hide: () => void) => ReactNode);\n /**\n * Contents of the modal\n */\n children?: ReactNode;\n /**\n * Class to be applied to the base element of the modal\n */\n className?: string;\n /**\n * A prop that determines whether the modal will span the entirety of the screen vertically\n */\n fullHeight?: boolean;\n /**\n * Allows user to override default icon color\n */\n closeIconColorOverride?: string;\n /**\n * Increase the zIndex of the Modal, this should be used when calling ActionModal from a Menu\n * this will prevent the Menu from staying above the ActionModal\n */\n elevated?: boolean;\n /**\n * Optional illustration to display alongside the modal\n */\n illustration?: ReactNode;\n /**\n * Background color that appears behind the optional illustration\n * Can be any css background color or \"blue\", \"brandBlue\", \"green\",\n * \"pink\", \"purple\", or \"yellow\" for theme colors\n */\n\n illustrationBackgroundColor?: string;\n\n /**\n * Render the modal initially in shown state\n */\n initialShownState?: boolean;\n /**\n * Allow the user to close the modal via x button or backdrop click\n */\n isDismissible?: boolean;\n /**\n * Callback invoked before the modal is hidden\n */\n onBeforeHide?: () => OnBeforeHideInterface;\n /**\n * Callback invoked when the modal is dismissed\n */\n onHide?: () => void;\n /**\n * Callback invoked when the modal is shown\n */\n onShow?: () => void;\n /**\n * Optional function that exposes the `hide` function at the call site allowing\n * the option to call the `hide` function from outside of this component\n */\n render?: (hide: (event?: MouseEvent) => void) => ReactNode;\n /**\n * Title to display in the modal\n */\n title: string;\n /**\n * function(show, ref) that returns a node to open the modal\n */\n toggle?: (\n show: () => unknown,\n toggleButtonRef?: RefObject<HTMLElement | null | undefined>,\n ) => ReactNode;\n /**\n * The css width property of the modal. Ex - 'max-content', '532px', '100%', etc\n */\n width?: string;\n};\n\n/**\n * @deprecated Please use Modal component, see [documentation](?path=/docs/components-modal--docs).\n *\n * #### Why ActionModal is being deprecated\n * ActionModal's API tightly couples the modal itself with the button or element that toggles it. This makes it difficult to\n * implement in several scenarios (such as within a Menu) or if it needs to be programatically opened by an external action.\n *\n * [Modal](?path=/docs/components-modal--docs) allows for a separate state control to toggle its visibility and is also more composable\n * allowing for more variation.\n */\nexport const ActionModal = ({\n alignHorizontal = 'center',\n alignVertical = 'center',\n buttons,\n children,\n className,\n elevated = true,\n fullHeight = false,\n closeIconColorOverride = undefined,\n illustration = null,\n illustrationBackgroundColor = 'brandBlue',\n initialShownState = false,\n isDismissible = true,\n onBeforeHide,\n onHide,\n onShow,\n render,\n title,\n toggle,\n width = defaultWidth,\n ...otherProps\n}: ActionModalProps) => {\n return (\n <ModalBase\n className={className}\n initialShownState={initialShownState}\n isDismissible={isDismissible}\n onBeforeHide={onBeforeHide}\n onHide={onHide}\n onShow={onShow}\n render={(hide: () => void) => (\n <Backdrop\n alignHorizontal={alignHorizontal}\n alignVertical={alignVertical}\n elevated={elevated}\n onClick={(event) => {\n // clicking on the background of the modal causes a redirect to a different\n // page when the parent is a Link component\n if (!isDismissible) {\n return;\n }\n event.stopPropagation();\n hide();\n }}\n >\n {\n // don't let clicks from within the dialogue bubble up to the root. this\n // would result in the modal closing anytime the dialogue is clicked!\n }\n {/* eslint-disable-next-line styled-components-a11y/no-noninteractive-element-interactions, styled-components-a11y/click-events-have-key-events */}\n <Dialogue\n $fullHeight={fullHeight}\n aria-labelledby=\"dialogTitle\"\n data-testid=\"action-modal-dialogue\"\n onClick={(event) => event.stopPropagation()}\n role=\"dialog\"\n {...otherProps}\n >\n {isDismissible ? (\n <ModalCloseButton\n closeIconColorOverride={closeIconColorOverride}\n onClick={hide}\n />\n ) : null}\n\n {isNotNil(illustration) ? (\n <IllustrationWrapper illustrationBackgroundColor={illustrationBackgroundColor}>\n {typeof illustration === 'string' ? (\n <img\n alt=\"\"\n src={illustration}\n />\n ) : (\n illustration\n )}\n </IllustrationWrapper>\n ) : null}\n\n <Body width={width}>\n <Message>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>\n {title ? (\n <Text\n id=\"dialogTitle\"\n renderAs=\"h2\"\n style={{ marginBottom: '16px' }}\n variant=\"headline1\"\n >\n {title}\n </Text>\n ) : null}\n </>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{render === undefined ? children : render(hide)}</>\n </Message>\n <ButtonGroup\n align=\"right\"\n style={{ flexGrow: '0', marginTop: '24px' }}\n >\n {typeof buttons === 'function' ? buttons(hide) : buttons}\n </ButtonGroup>\n </Body>\n </Dialogue>\n </Backdrop>\n )}\n toggle={toggle}\n />\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nActionModal.displayName = 'ActionModal_VHS';\n","import type { RefObject, ReactNode } from 'react';\nimport { useEffect, useRef, useState, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { createGlobalStyle } from 'styled-components';\nimport isEqual from 'react-fast-compare';\nimport { isNotUndefined, isUndefined, isNotNil } from '@wistia/type-guards';\nimport { ModalAnimation } from '../../private/components/ModalAnimation';\nimport { useModalProviderContext } from './ModalProviderContext';\nimport { usePreviousValue } from '../../hooks/usePreviousValue';\nimport { ModalProvider } from './ModalProvider';\n\nconst LOCKED_SCROLL_CLASSNAME = 'is-scroll-locked';\n\n// we need to prevent scrolling on the document when the modal is open. since\n// the `body` node lives outside the react-root, we manually toggle a class\n// on body styled by a global css rule.\nconst GlobalStyle = createGlobalStyle`\n .${LOCKED_SCROLL_CLASSNAME} {\n overflow: hidden;\n }\n`;\n\nconst getFocusableElements = (root: HTMLElement | typeof document | null = document) => {\n const potentialElements = isNotNil(root)\n ? root.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n )\n : [];\n\n // if a normally focusable element isn't displayed, don't include it in the list\n return Array.from(potentialElements).filter(\n (element) => window.getComputedStyle(element).getPropertyValue('display') !== 'none',\n );\n};\n\nconst keepFocusWithinModal = (modalRoot: RefObject<HTMLElement | null>, event: KeyboardEvent) => {\n const focusable = getFocusableElements(modalRoot.current);\n\n if (focusable.length === 0) {\n event.preventDefault();\n return;\n }\n\n const firstFocusable = focusable[0] as HTMLElement;\n const lastFocusable = focusable[focusable.length - 1] as HTMLElement;\n\n if (focusable.length === 1) {\n event.preventDefault();\n firstFocusable.focus();\n return;\n }\n\n // if we're tabbing backwards and on the first focusable element, manually focus the last\n // focusable element to keep focus within the modal.\n if (event.shiftKey) {\n if (document.activeElement === firstFocusable) {\n event.preventDefault();\n lastFocusable.focus();\n }\n return;\n }\n\n // if we're tabbing forward and hit the last focusable element, focus the first focusable\n if (document.activeElement === lastFocusable) {\n event.preventDefault();\n firstFocusable.focus();\n }\n};\n\nexport type OnBeforeHideInterface = {\n shouldShowMessage: boolean;\n message: string;\n};\n\nexport type ModalBaseContentProps = {\n /**\n * Class name applied to the modal root\n */\n className?: string | undefined;\n /**\n * Render the modal initially in shown state\n */\n initialShownState?: boolean;\n /**\n * The modal can be dismissed via esc button\n */\n isDismissible?: boolean;\n /**\n * Callback invoked before the modal is hidden\n */\n onBeforeHide?: (() => OnBeforeHideInterface) | undefined;\n /**\n * Callback invoked when the modal is dismissed\n */\n onHide?: ((...args: unknown[]) => unknown) | undefined;\n /**\n * Callback invoked when the modal is shown\n */\n onShow?: ((...args: unknown[]) => unknown) | undefined;\n /**\n * Optional function that exposes the `hide` function at the call site allowing\n * the option to call the `hide` function from outside of this component\n */\n render?: (attemptHide: () => unknown) => ReactNode;\n /**\n * function(show, ref) that returns a node to open the modal\n */\n toggle?:\n | ((\n show: () => unknown,\n toggleButtonRef?: RefObject<HTMLElement | null | undefined>,\n ) => ReactNode)\n | undefined;\n};\n\nconst ModalBaseContent = ({\n className,\n initialShownState = false,\n isDismissible = true,\n onBeforeHide,\n onHide,\n onShow,\n render,\n toggle,\n}: ModalBaseContentProps) => {\n const { attemptShowModal, attemptHideModal, removeModalFromQueue } = useModalProviderContext();\n const [isShown, setIsShown] = useState<boolean>(false);\n const [isShownAttempted, setIsShownAttempted] = useState(initialShownState);\n const wasJustShown = usePreviousValue(isShown);\n const hide = () => setIsShownAttempted(false);\n const show = useCallback(() => setIsShownAttempted(true), []);\n const toggleButtonRef = useRef<HTMLElement | undefined>(undefined);\n\n // TODO need to fix for SSR compat\n // eslint-disable-next-line ssr-friendly/no-dom-globals-in-react-fc\n const modalEl = document.createElement('div');\n\n modalEl.classList.add('Modal');\n\n if (isNotUndefined(className)) {\n modalEl.classList.add(className);\n }\n\n const modalRoot = useRef<HTMLElement>(modalEl);\n\n const attemptHide = useCallback(() => {\n if (isNotUndefined(onBeforeHide)) {\n const { shouldShowMessage, message } = Object(onBeforeHide()) as OnBeforeHideInterface;\n if (shouldShowMessage) {\n // eslint-disable-next-line no-alert\n const shouldProceed = window.confirm(message);\n if (!shouldProceed) {\n return;\n }\n }\n }\n\n hide();\n if (onHide) {\n onHide();\n }\n }, [onBeforeHide, onHide]);\n\n // - bind to global keyup and close the modal when escape is pressed.\n // - toggle a classname on the document body to prevent scrolling when modal is open.\n useEffect(() => {\n const onKeyup = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isDismissible) {\n attemptHide();\n }\n };\n\n if (isShown) {\n document.addEventListener('keyup', onKeyup);\n document.querySelector('body')?.classList.add(LOCKED_SCROLL_CLASSNAME);\n }\n\n return () => {\n document.removeEventListener('keyup', onKeyup);\n document.querySelector('body')?.classList.remove(LOCKED_SCROLL_CLASSNAME);\n };\n }, [isShown, attemptHide, isDismissible]);\n\n // respond to initialShownState prop changes\n useEffect(() => {\n setIsShownAttempted(initialShownState);\n }, [setIsShownAttempted, initialShownState]);\n\n // focus the first focusable element when the modal opens.\n // make sure focus doesn't leave the modal\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n keepFocusWithinModal(modalRoot, event);\n }\n };\n\n if (isShown) {\n const focusable = getFocusableElements(modalRoot.current);\n\n // if the current activeElement is in our focusable list we don't need to\n // affect focus at all\n if (!focusable.find((element) => element === document.activeElement)) {\n const firstFocusable = focusable[0];\n\n if (firstFocusable) {\n (firstFocusable as HTMLElement).focus();\n }\n }\n\n document.addEventListener('keydown', onKeyDown);\n\n if (onShow) {\n onShow();\n }\n }\n\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [isShown, onShow]);\n\n // if a ref was assigned via the `toggle` render prop, return focus to it\n // when the modal closes. this allows the user to resume where they left off\n // before opening the modal.\n useEffect(() => {\n if (!isShown && isNotNil(wasJustShown) && wasJustShown && toggleButtonRef.current) {\n toggleButtonRef.current.focus();\n }\n }, [isShown, wasJustShown]);\n\n // on mount, append this modal's portal target to the DOM. remove on unmount.\n // this allows us to render multiple modals on a page w/o them clobbering\n // each other.\n useEffect(() => {\n const modalRootEl = modalRoot.current;\n document.body.appendChild(modalRootEl);\n return () => modalRootEl.remove();\n }, []);\n\n // when component disappears, remove from\n // queue so next modal can be shown\n useEffect(\n () => () => {\n if (isUndefined(removeModalFromQueue)) {\n return;\n }\n removeModalFromQueue(setIsShown);\n },\n [removeModalFromQueue],\n );\n\n // when isShownAttempted changes, notify provider.\n useEffect(() => {\n if (isShownAttempted && isNotUndefined(attemptShowModal)) {\n attemptShowModal(setIsShown);\n } else {\n if (isUndefined(attemptHideModal)) {\n return;\n }\n attemptHideModal(setIsShown);\n }\n }, [attemptShowModal, attemptHideModal, isShownAttempted]);\n\n if (!attemptShowModal || !attemptHideModal || !removeModalFromQueue) {\n return null;\n }\n\n return (\n <>\n <GlobalStyle />\n {isNotUndefined(toggle) && toggle(show, toggleButtonRef)}\n {createPortal(\n <ModalAnimation>\n {isShown && isNotUndefined(render) ? render(attemptHide) : undefined}\n </ModalAnimation>,\n modalRoot.current,\n )}\n </>\n );\n};\n\nexport const ModalBase = (props: ModalBaseContentProps) => {\n const modalProviderContext = useModalProviderContext();\n if (!isEqual(modalProviderContext, {})) {\n return <ModalBaseContent {...props} />;\n }\n\n return (\n <ModalProvider>\n <ModalBaseContent {...props} />\n </ModalProvider>\n );\n};\n\nModalBase.displayName = 'ModalBase_VHS';\n","import type { ReactNode, ReactElement, JSX } from 'react';\nimport { Children } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport { isNotNil } from '@wistia/type-guards';\n\nconst TRANSITION_TIME = 100;\n\nexport type ModalAnimationProps = {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode | undefined;\n};\n\nexport const ModalAnimation = ({ children }: ModalAnimationProps): JSX.Element => {\n const kids = Children.map(children, (child) => child)?.filter(Boolean) as ReactElement[]; // eslint-disable-line @typescript-eslint/promise-function-async\n\n return (\n <AnimatePresence>\n {isNotNil(kids)\n ? kids.map((child) => (\n <motion.div\n key={child.key}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n initial={{ opacity: 0 }}\n style={{ willChange: 'auto' }}\n transition={{ duration: TRANSITION_TIME / 1000 }}\n >\n {child}\n </motion.div>\n ))\n : null}\n </AnimatePresence>\n );\n};\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNil } from '@wistia/type-guards';\nimport { mq } from '../../helpers/mq';\n\nexport type ButtonGroupComponentProps = {\n $align: 'center' | 'left' | 'right';\n $fullWidth: boolean;\n};\n\nexport type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Align buttons to the left or right of their container\n */\n align?: 'center' | 'left' | 'right';\n /**\n * Buttons that will be rendered in grouping\n */\n children?: ReactNode;\n /**\n * Force ButtonGroup to fill the width of it's container\n */\n fullWidth?: boolean;\n};\n\nconst getAlignment = (align: string) => {\n if (align === 'center') {\n return 'center';\n }\n if (align === 'left') {\n return 'flex-start';\n }\n if (align === 'right') {\n return 'flex-end';\n }\n return undefined;\n};\n\nconst ButtonGroupComponent = styled.div<ButtonGroupComponentProps>`\n display: flex;\n\n /* this helps ensure that primary buttons appear at the top of the column */\n flex-direction: ${({ $align }) => ($align === 'right' ? 'column-reverse' : 'column')};\n gap: ${({ theme }) => theme.buttonGroup.gap};\n justify-content: ${({ $align }) => getAlignment($align)};\n width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};\n\n ${mq.smAndUp} {\n flex-direction: row;\n }\n\n button,\n input,\n a,\n .MenuButton {\n width: 100%;\n\n ${mq.smAndUp} {\n width: auto;\n }\n }\n`;\n\nexport const ButtonGroup = ({\n children,\n align = 'left',\n fullWidth = false,\n ...otherProps\n}: ButtonGroupProps): JSX.Element | null => {\n if (isNil(children)) {\n return null;\n }\n\n return (\n <ButtonGroupComponent\n $align={align}\n $fullWidth={fullWidth}\n {...otherProps}\n >\n {children}\n </ButtonGroupComponent>\n );\n};\n\nButtonGroup.displayName = 'ButtonGroup_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX, ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport { styled, css } from 'styled-components';\nimport { ellipsisStyle } from '../Ellipsis';\n\nconst alignMap = {\n left: 'left',\n right: 'right',\n center: 'center',\n justify: 'justify',\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst renderMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n div: 'div',\n label: 'label',\n p: 'p', // eslint-disable-line id-length\n pre: 'pre',\n span: 'span',\n};\n\nconst headline1TextStyle = css`\n font-family: ${({ theme }) => theme.headline.family};\n font-size: 24px;\n font-weight: ${({ theme }) => theme.headline.headline1.weight};\n line-height: 1.25;\n`;\n\nconst headline2TextStyle = css`\n font-family: ${({ theme }) => theme.headline.family};\n font-size: 20px;\n font-weight: ${({ theme }) => theme.headline.headline2.weight};\n line-height: 1.25;\n`;\n\nconst headline3TextStyle = css`\n font-family: ${({ theme }) => theme.headline.family};\n font-size: 16px;\n font-weight: ${({ theme }) => theme.headline.headline3.weight};\n line-height: 1.25;\n`;\n\nconst overlineTextStyle = css`\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n line-height: 1.25;\n text-transform: uppercase;\n`;\n\nconst body1TextStyle = css`\n font-size: 16px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nconst body2TextStyle = css`\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nconst captionTextStyle = css`\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nconst subtitle1TextStyle = css`\n font-size: 16px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n line-height: 1.5;\n`;\n\nconst subtitle2TextStyle = css`\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n line-height: 1.5;\n`;\n\nconst monospaceTextStyle = css`\n font-family: ${({ theme }) => theme.font.family.monospace};\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 1.5;\n`;\n\nexport const variantStyleMap = {\n headline1: headline1TextStyle,\n headline2: headline2TextStyle,\n headline3: headline3TextStyle,\n overline: overlineTextStyle,\n body1: body1TextStyle,\n body2: body2TextStyle,\n caption: captionTextStyle,\n subtitle1: subtitle1TextStyle,\n subtitle2: subtitle2TextStyle,\n monospace: monospaceTextStyle,\n};\n\nexport type TextComponentProps = {\n $align: keyof typeof alignMap;\n $bold: boolean;\n $colorOverride?: string | undefined;\n $disabled: boolean;\n $ellipsis: boolean;\n $inline: boolean;\n $italic: boolean;\n $preventUserSelect: boolean;\n as: keyof typeof renderMap;\n $variant: keyof typeof variantStyleMap;\n};\n\nexport type TextProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The horizontal alignment\n * <br />\n * _Note: this only affects block elements_\n */\n align?: keyof typeof alignMap;\n /**\n * Displays text as bold type\n */\n bold?: boolean;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode | undefined;\n /**\n * Allows user to override default button colors\n */\n colorOverride?: string;\n /**\n * Used to indicate text is part of a \"disabled\" UI\n */\n disabled?: boolean;\n /**\n * Attempt to keep the text to a single line by truncating with an ellipsis\n * <br />\n * _Note: this only affects block elements_\n */\n ellipsis?: boolean;\n /**\n * Display the text as inline content\n */\n inline?: boolean;\n /**\n * Displays text as italic type\n */\n italic?: boolean;\n /**\n * Prevents text from being highlighted and copied\n */\n preventUserSelect?: boolean;\n /**\n * The type of html element to render as\n */\n renderAs?: keyof typeof renderMap;\n /**\n * The text style to display\n */\n variant?: keyof typeof variantStyleMap;\n};\n\nconst TextComponent = styled.div<TextComponentProps>`\n color: ${({ theme, $colorOverride }) => $colorOverride ?? theme.color.grey900};\n font-style: normal;\n margin: 0;\n ${({ $variant }) => variantStyleMap[$variant]}\n ${({ $ellipsis }) => $ellipsis && ellipsisStyle};\n ${({ $bold }) =>\n $bold &&\n css`\n font-weight: ${({ theme }) => theme.font.weight.bold} !important;\n `}\n ${({ $italic }) =>\n $italic &&\n css`\n font-style: italic;\n `}\n ${({ $inline }) =>\n $inline &&\n css`\n display: inline-block;\n `}\n ${({ $disabled }) =>\n $disabled &&\n css`\n opacity: 0.5;\n `}\n ${({ $preventUserSelect }) =>\n $preventUserSelect &&\n css`\n user-select: none;\n `}\n ${({ $align }) => css`\n text-align: ${alignMap[$align]};\n `}\n ${({ as, theme }) =>\n as === 'p' &&\n css`\n display: block;\n margin-bottom: ${theme.spacing.space05};\n `}\n`;\n\nexport const Text = forwardRef(\n (\n {\n align = 'left',\n bold = false,\n children,\n colorOverride,\n disabled = false,\n ellipsis = false,\n inline = false,\n italic = false,\n preventUserSelect = false,\n renderAs = 'div',\n variant = 'body1',\n ...otherProps\n }: TextProps,\n ref: ForwardedRef<HTMLElement>,\n ): JSX.Element => (\n <TextComponent\n ref={ref}\n $align={align}\n $bold={bold}\n $colorOverride={colorOverride}\n $disabled={disabled}\n $ellipsis={ellipsis}\n $inline={inline}\n $italic={italic}\n $preventUserSelect={preventUserSelect}\n $variant={variant}\n as={renderAs}\n {...otherProps}\n >\n {children}\n </TextComponent>\n ),\n);\n\nText.displayName = 'Text_VHS';\n","import type { ReactNode, ComponentPropsWithoutRef, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\n\nexport const ellipsisStyle = css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n /*\n Using feature detection (i.e., -webkit-named-image) we only target Safari browsers\n with this additional styling to prevent a bug that's exclusive to Safari.\n\n Note that Safari does not properly hide the truncated text for non-inline/inline-block\n elements so we need to apply display: inline to all the paragraphs in the description.\n see https://stackoverflow.com/a/70683084\n */\n @supports (background: - webkit-named-image(i)) {\n & > div > div:has(p) {\n margin-top: 16px;\n }\n\n & > div > div > p {\n display: inline;\n }\n }\n`;\n\n// so that flex children will truncate too\nexport const ellipsisFlexParentStyle = css`\n min-width: 0;\n`;\n\nexport type EllipsisComponentProps = {\n lines: number | undefined;\n};\n\nconst EllipsisComponent = styled.div<EllipsisComponentProps>`\n ${ellipsisStyle};\n ${({ lines }) => {\n if (isNotNil(lines)) {\n return css`\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ${lines};\n display: -webkit-box;\n white-space: initial;\n `;\n }\n return undefined;\n }}\n`;\n\nexport type EllipsisProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The text that will be truncated with an ellipsis\n */\n children?: ReactNode;\n /**\n * The number that will be truncated with an ellipsis\n */\n lines?: number;\n};\n\nexport const Ellipsis = ({ children, lines, ...otherProps }: EllipsisProps): JSX.Element => (\n <EllipsisComponent\n lines={lines}\n {...otherProps}\n >\n {children}\n </EllipsisComponent>\n);\n\nEllipsis.displayName = 'Ellipsis_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\n\nconst alignVerticalMap = {\n normal: 'normal',\n top: 'start',\n center: 'center',\n bottom: 'end',\n};\n\nconst alignHorizontalMap = {\n normal: 'normal',\n left: 'start',\n center: 'center',\n right: 'end',\n};\n\nexport type BackdropComponentProps = {\n $alignHorizontal: keyof typeof alignHorizontalMap;\n $alignVertical: keyof typeof alignVerticalMap;\n $backgroundColor: string;\n $elevated: boolean;\n};\n\nexport type BackdropProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Optional prop to align the child content along the horizontal axis\n */\n alignHorizontal?: keyof typeof alignHorizontalMap;\n /**\n * Optional prop to align the child content along the vertical axis\n */\n alignVertical?: keyof typeof alignVerticalMap;\n /**\n * Color of the backdrop\n */\n backgroundColor?: string;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * increase the z-index (workaround for ActionModals called within Menu)\n */\n elevated?: boolean;\n};\n\nconst BackdropComponent = styled.div<BackdropComponentProps>`\n align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};\n background: ${({ $backgroundColor }) => $backgroundColor};\n bottom: 0;\n display: grid;\n justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};\n left: 0;\n overflow-y: auto;\n position: fixed;\n right: 0;\n top: 0;\n z-index: ${({ theme, $elevated }) =>\n $elevated ? theme.zIndex.BackdropElevated : theme.zIndex.Backdrop};\n`;\n\nexport const Backdrop = ({\n alignHorizontal = 'normal',\n alignVertical = 'normal',\n backgroundColor = 'rgba(0, 0, 0, 0.4)',\n children,\n elevated = false,\n ...otherProps\n}: BackdropProps): JSX.Element => (\n <BackdropComponent\n $alignHorizontal={alignHorizontal}\n $alignVertical={alignVertical}\n $backgroundColor={backgroundColor}\n $elevated={elevated}\n {...otherProps}\n >\n {children}\n </BackdropComponent>\n);\n\nBackdrop.displayName = 'Backdrop_VHS';\n","import type { ComponentPropsWithRef, ReactNode, MouseEvent, JSX } from 'react';\nimport { forwardRef, useMemo } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled, css } from 'styled-components';\nimport { transparentize } from 'polished';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { buttonResetStyle } from '../Button/ButtonStyledComponent';\nimport { ScreenReaderOnly } from '../ScreenReaderOnly';\nimport { Tooltip } from '../Tooltip';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\n// size in pixels\nexport const sizeMap = {\n sm: '12',\n md: '16',\n lg: '24',\n};\n\n// styles\nexport const componentStyleMap = {\n light: 'light',\n dark: 'dark',\n};\n\ntype sizeType = keyof typeof sizeMap;\ntype componentStyleType = keyof typeof componentStyleMap;\n\nconst smSizeStyle = css`\n max-height: 16px;\n max-width: 16px;\n min-height: 16px;\n min-width: 16px;\n\n svg {\n max-height: 12px;\n max-width: 12px;\n min-height: 12px;\n min-width: 12px;\n }\n`;\n\nconst mdSizeStyle = css`\n max-height: 24px;\n max-width: 24px;\n min-height: 24px;\n min-width: 24px;\n\n svg {\n max-height: 16px;\n max-width: 16px;\n min-height: 16px;\n min-width: 16px;\n }\n`;\n\nconst lgSizeStyle = css`\n max-height: 32px;\n max-width: 32px;\n min-height: 32px;\n min-width: 32px;\n\n svg {\n max-height: 24px;\n max-width: 24px;\n min-height: 24px;\n min-width: 24px;\n }\n`;\n\n/* eslint-disable @typescript-eslint/no-magic-numbers */\nconst disabledStyle = css<{ $iconButtonColor: string }>`\n cursor: not-allowed;\n\n svg {\n color: ${({ $iconButtonColor }) => transparentize(0.5, $iconButtonColor)};\n }\n\n &:hover,\n &:focus {\n background-color: transparent;\n\n svg {\n color: ${({ $iconButtonColor }) => transparentize(0.5, $iconButtonColor)};\n }\n }\n`;\n\nconst iconButtonStyle = css<{ $iconButtonColor: string }>`\n background-color: ${({ $iconButtonColor }) => transparentize(1, $iconButtonColor)};\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n svg {\n color: ${({ $iconButtonColor }) => $iconButtonColor};\n }\n\n &:hover,\n &:focus-visible {\n background-color: ${({ $iconButtonColor }) => transparentize(0.8, $iconButtonColor)};\n\n svg {\n color: ${({ $iconButtonColor }) => $iconButtonColor};\n }\n }\n\n &:active {\n background-color: ${({ $iconButtonColor }) => transparentize(0.6, $iconButtonColor)};\n\n svg {\n color: ${({ $iconButtonColor }) => $iconButtonColor};\n }\n }\n`;\n/* eslint-enable @typescript-eslint/no-magic-numbers */\n\nconst getIconButtonColor = (\n colorOverride: string | undefined,\n componentStyle: componentStyleType,\n allThemeColors: DefaultTheme['color'],\n): string => {\n if (isNonEmptyString(colorOverride)) {\n return colorOverride;\n }\n if (componentStyle === 'dark') {\n return allThemeColors.grey700;\n }\n return '#fff';\n};\n\ntype IconButtonComponentProps = {\n $componentStyle: componentStyleType;\n disabled?: boolean;\n $iconButtonColor: string;\n size: sizeType;\n};\n\nconst IconButtonComponent = styled.button<IconButtonComponentProps>`\n ${buttonResetStyle}\n ${iconButtonStyle}\n transition: all ${({ theme }) => theme.duration.productive.moderate};\n ${({ disabled }) => (disabled ? disabledStyle : undefined)}\n ${({ size }) => {\n if (size === 'sm') {\n return smSizeStyle;\n }\n if (size === 'md') {\n return mdSizeStyle;\n }\n return lgSizeStyle;\n }};\n`;\n\nexport type IconButtonProps = ComponentPropsWithRef<'button'> & {\n /**\n * Allows user to override default button colors\n */\n colorOverride?: string | undefined;\n /**\n * Choose light styles if this component appears on a dark background\n */\n componentStyle?: componentStyleType;\n /**\n * Disables button\n */\n disabled?: boolean;\n /**\n * An SVG component\n */\n icon?: ReactNode;\n /**\n * Text that appears as a tooltip when the user hovers over the button\n */\n label?: string;\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: ((event: MouseEvent) => void) | undefined;\n /**\n * Prevent a Tooltip from appearing on hover\n */\n preventTooltip?: boolean;\n /**\n * The size of the button\n */\n size?: sizeType;\n /**\n * The direction of the tooltip\n */\n tooltipDirection?: 'bottom' | 'left' | 'right' | 'top';\n};\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n colorOverride,\n componentStyle = 'dark',\n disabled = false,\n icon,\n label,\n onClick,\n preventTooltip = false,\n size = 'md',\n tooltipDirection = 'top',\n ...otherProps\n }: IconButtonProps,\n ref,\n ): JSX.Element => {\n const iconButtonColor = getIconButtonColor(colorOverride, componentStyle, useThemeColor());\n\n const Button = useMemo(\n () => (\n <IconButtonComponent\n ref={ref}\n $componentStyle={componentStyle}\n $iconButtonColor={iconButtonColor}\n disabled={disabled}\n onClick={onClick}\n size={size}\n {...otherProps}\n >\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{icon}</>\n <ScreenReaderOnly>{label}</ScreenReaderOnly>\n </IconButtonComponent>\n ),\n [componentStyle, disabled, icon, iconButtonColor, label, onClick, otherProps, ref, size],\n );\n\n if (preventTooltip) {\n return Button;\n }\n\n return (\n <Tooltip\n direction={tooltipDirection}\n label={label}\n >\n {Button}\n </Tooltip>\n );\n },\n);\n\nIconButton.displayName = 'IconButton_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { styled, css } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\n\n// https://hugogiraudel.com/2016/10/13/css-hide-and-seek/\nexport const screenReaderOnlyStyle = css`\n border: 0;\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n\nconst VisuallyHidden = styled.div`\n ${screenReaderOnlyStyle}\n`;\n\nconst VisuallyHiddenButFocusable = styled.div`\n &:not(:focus-within) {\n ${screenReaderOnlyStyle}\n }\n`;\n\nexport type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Display content _only_ when it's focused.\n */\n focusable?: boolean;\n /**\n * The text that will appear to screenreaders but not be displayed on screen\n * (alternatively you can pass children)\n */\n text?: ReactNode;\n};\n\nexport const ScreenReaderOnly = ({\n text,\n children,\n focusable = false,\n ...otherProps\n}: ScreenReaderOnlyProps) => {\n const accessibleText = isNotNil(text) ? text : children;\n\n if (focusable) {\n return (\n <VisuallyHiddenButFocusable {...otherProps}>{accessibleText}</VisuallyHiddenButFocusable>\n );\n }\n\n return <VisuallyHidden {...otherProps}>{accessibleText}</VisuallyHidden>;\n};\n\nScreenReaderOnly.displayName = 'ScreenReaderOnly_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { useEffect, useState, useRef, useMemo, useId } from 'react';\nimport { styled } from 'styled-components';\nimport { isString } from '@wistia/type-guards';\nimport { TooltipContent } from './TooltipContent';\nimport { Truncate } from '../Truncate';\n\nconst TooltipWrapper = styled.div`\n display: inline-block;\n position: relative;\n width: inherit;\n`;\n\nexport type TooltipProps = Omit<ComponentPropsWithoutRef<'div'>, 'id'> & {\n /**\n * The node that will be wrapped by the Tooltip\n */\n children: ReactNode;\n /**\n * Where the tooltip should appear in relation to wrapped component\n */\n direction?: 'bottom' | 'left' | 'right' | 'top';\n /**\n * Length of time to wait before dismissing Tooltip for click eventType\n */\n duration?: boolean | number | string;\n /**\n * The type of event that triggers display of Tooltip\n */\n eventType?: 'click' | 'hover';\n /**\n * @ignore\n * Force a Tooltip to display it's content without user interaction (for debugging)\n */\n forceState?: 'open' | undefined;\n /**\n * ID for tooltip (automatically created if omitted)\n */\n id?: string | null | undefined;\n /**\n * The content that will appear in the Tooltip popup\n */\n label: ReactNode;\n /**\n * The maximum number of characters to display inside the Tooltip\n */\n maxChars?: number | null;\n /**\n * Whether content within the label should wrap\n */\n shouldWrap?: boolean;\n /**\n * Color to override background of the tooltip.\n */\n backgroundColorOverride?: string;\n /**\n * Color to override font color of the tooltip.\n */\n fontColorOverride?: string;\n};\n\nexport const Tooltip = ({\n label,\n direction = 'top',\n duration = 2000,\n eventType = 'hover',\n forceState = undefined,\n maxChars = null,\n children,\n id = null,\n shouldWrap = false,\n backgroundColorOverride,\n fontColorOverride,\n ...otherProps\n}: TooltipProps): JSX.Element => {\n const [active, setActive] = useState(false);\n // a11y id generation to associate tooltip labels\n const generatedId = `vhs-tooltip-${useId()}`;\n const tooltipID = useMemo(() => id ?? generatedId, [id, generatedId]);\n const tooltipEl = useRef<HTMLDivElement | null>(null);\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const startTimer = () => {\n if (timer.current) {\n clearTimeout(timer.current);\n }\n timer.current = setTimeout(() => {\n setActive(false);\n }, duration as number);\n };\n\n const handleClick = () => {\n setActive(true);\n // we should revisit this logic and the lint disable at some point in the future, but I don't want to change the logic during TS conversion\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (duration) {\n clearTimeout(timer.current ?? undefined);\n startTimer();\n }\n };\n\n const handleMouseOver = () => setActive(true);\n const handleMouseLeave = () => setActive(false);\n const handleFocus = () => handleClick();\n const handleBlur = () => setActive(false);\n\n useEffect(() => {\n const handleWindowClick = (event: Event) => {\n if (active) {\n if (tooltipEl.current === null || tooltipEl.current.contains(event.target as Node)) {\n return;\n }\n setActive(false);\n }\n };\n\n // if no duration is set then we need to listen for a click \"outside\" of\n // the tooltip in order to dismiss it\n // TODO should `esc` also dismiss? what happens with a tooltip inside a modal?\n // we should revisit this logic and the lint disable at some point in the future, but I don't want to change the logic during TS conversion\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (!duration) {\n document.addEventListener('mousedown', handleWindowClick, false);\n }\n\n return () => {\n if (timer.current) {\n clearTimeout(timer.current);\n }\n document.removeEventListener('mousedown', handleWindowClick, false);\n };\n }, [active, timer, duration]);\n\n // edge case: prop-type warnings should catch most of these but you could\n // potentially have a situation where an empty string was provided, and we\n // don't want to display an empty tooltip bubble\n\n if (isString(label) && !label.length) {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n }\n\n let tooltipLabel = label;\n\n if (maxChars !== null) {\n tooltipLabel = (\n <Truncate\n breakOnWords={true}\n maxChars={maxChars}\n >\n {label as string}\n </Truncate>\n );\n }\n\n // hover vs click tooltips have some shared props & some unique props\n const getProps = () => {\n const hoverProps = {\n onFocus: handleFocus,\n onMouseLeave: handleMouseLeave,\n onMouseOver: handleMouseOver,\n onBlur: handleBlur,\n };\n\n const clickProps = {\n onClick: handleClick,\n ref: tooltipEl,\n };\n\n if (eventType === 'hover') {\n return hoverProps;\n }\n return clickProps;\n };\n\n return (\n <TooltipWrapper\n aria-labelledby={tooltipID}\n role=\"tooltip\"\n {...getProps()}\n {...otherProps}\n >\n <TooltipContent\n active={active}\n backgroundColorOverride={backgroundColorOverride}\n direction={direction}\n fontColorOverride={fontColorOverride}\n forceState={forceState}\n id={tooltipID}\n shouldWrap={shouldWrap}\n >\n {tooltipLabel}\n </TooltipContent>\n {children}\n </TooltipWrapper>\n );\n};\n\nTooltip.displayName = 'Tooltip_VHS';\n","import type { ReactNode } from 'react';\nimport { styled, css } from 'styled-components';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\ntype TooltipContentProps = {\n active: boolean;\n children: ReactNode;\n direction: 'bottom' | 'left' | 'right' | 'top';\n forceState?: string | undefined;\n id?: string | undefined;\n shouldWrap: boolean;\n backgroundColorOverride: string | undefined;\n fontColorOverride: string | undefined;\n};\n\nconst ARROW_SIZE = 8;\n\nconst StyledTooltipLabel = styled.div<{ $fontColorOverride: string | undefined }>`\n color: ${({ $fontColorOverride }) => $fontColorOverride ?? 'white'};\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 18px;\n padding: ${({ theme }) => theme.spacing.space03};\n position: relative;\n\n a {\n color: white;\n }\n\n &::after {\n border: solid transparent;\n border-width: ${ARROW_SIZE}px;\n content: ' ';\n height: 0;\n margin-left: -${ARROW_SIZE}px;\n pointer-events: none;\n position: absolute;\n width: 0;\n }\n`;\n\nconst tooltipTopStyle = css<{ $backgroundColor: string }>`\n left: 50%;\n top: -10px;\n transform: translate(-50%, -100%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-top-color: ${({ $backgroundColor }) => $backgroundColor};\n left: 50%;\n top: 100%;\n }\n }\n`;\n\nconst tooltipBottomStyle = css<{ $backgroundColor: string }>`\n bottom: -10px;\n left: 50%;\n transform: translate(-50%, 100%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-bottom-color: ${({ $backgroundColor }) => $backgroundColor};\n left: 50%;\n top: -${ARROW_SIZE * 2}px;\n }\n }\n`;\n\nconst tooltipLeftStyle = css<{ $backgroundColor: string }>`\n left: calc(-${ARROW_SIZE}px - 5px);\n top: 50%;\n transform: translate(-100%, -50%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-left-color: ${({ $backgroundColor }) => $backgroundColor};\n left: 100%;\n margin-left: 0;\n margin-top: -${ARROW_SIZE}px;\n top: 50%;\n }\n }\n`;\n\nconst tooltipRightStyle = css<{ $backgroundColor: string }>`\n right: calc(-${ARROW_SIZE}px - 5px);\n top: 50%;\n transform: translate(100%, -50%);\n\n ${StyledTooltipLabel} {\n &::after {\n border-right-color: ${({ $backgroundColor }) => $backgroundColor};\n margin-left: 0;\n margin-top: -${ARROW_SIZE}px;\n right: 100%;\n top: 50%;\n }\n }\n`;\n\ntype StyledTooltipContentProps = {\n $active: boolean;\n $direction: 'bottom' | 'left' | 'right' | 'top';\n $fontColorOverride: string | undefined;\n $forceState?: string | undefined;\n id?: string | undefined;\n $shouldWrap: boolean;\n $backgroundColor: string;\n};\n\nconst StyledTooltipContent = styled.div<StyledTooltipContentProps>`\n background: ${({ $backgroundColor }) => $backgroundColor};\n border: solid 1px ${({ $backgroundColor }) => $backgroundColor};\n border-radius: 4px;\n color: ${({ $fontColorOverride }) => $fontColorOverride ?? 'white'};\n display: ${({ $active, $forceState }) => ($active || $forceState === 'open' ? 'block' : 'none')};\n position: absolute;\n transition: all ${({ theme }) => theme.duration.productive.moderate};\n z-index: ${({ theme }) => theme.zIndex.Tooltip};\n\n * {\n margin: 0;\n white-space: ${({ $shouldWrap }) => ($shouldWrap ? 'normal' : 'nowrap')};\n }\n\n ${({ $direction }) => {\n switch ($direction) {\n case 'top':\n return tooltipTopStyle;\n case 'bottom':\n return tooltipBottomStyle;\n case 'left':\n return tooltipLeftStyle;\n case 'right':\n return tooltipRightStyle;\n default:\n return undefined;\n }\n }}\n`;\n\nexport const TooltipContent = ({\n id,\n active,\n direction,\n children,\n forceState,\n shouldWrap,\n backgroundColorOverride,\n fontColorOverride,\n}: TooltipContentProps) => {\n const backgroundColor = useThemeColor('grey900');\n\n return (\n <StyledTooltipContent\n $active={active}\n $backgroundColor={backgroundColorOverride ?? backgroundColor}\n $direction={direction}\n $fontColorOverride={fontColorOverride}\n $forceState={forceState}\n $shouldWrap={shouldWrap}\n aria-hidden={!active}\n data-testid=\"tooltip-content\"\n id={id}\n >\n <StyledTooltipLabel $fontColorOverride={fontColorOverride}>{children}</StyledTooltipLabel>\n </StyledTooltipContent>\n );\n};\n","import { isString, isNil } from '@wistia/type-guards';\nimport type { JSX } from 'react';\n\nexport type TruncateProps = {\n /**\n * Prevent ellipsis from truncating mid-word\n */\n breakOnWords?: boolean;\n /**\n * The string to be truncated\n */\n children: string | null | undefined;\n /**\n * The maximum number of characters to display inside the Tooltip\n */\n maxChars: number;\n /**\n * A string to append to the truncated string\n */\n terminator?: string;\n};\n\nexport const Truncate = ({\n children,\n maxChars,\n terminator = '...',\n breakOnWords = false,\n}: TruncateProps): JSX.Element | null => {\n // don't render anything if there's no children\n if (isNil(children)) {\n return null;\n }\n\n const canBeTruncated = children.length + terminator.length >= maxChars;\n\n // types will warn about these but we can avoid blowing up\n // the page in case console warnings are ignored\n\n if (!isString(children) || maxChars <= 0 || !canBeTruncated) {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n }\n\n let truncatedChild = children.slice(0, maxChars - terminator.length);\n\n if (breakOnWords) {\n const index = Math.max(truncatedChild.lastIndexOf(' '), truncatedChild.lastIndexOf('\\n'));\n truncatedChild = truncatedChild.slice(0, index);\n }\n\n // don't allow truncated string to end in a space before ellipsis\n truncatedChild = `${truncatedChild.trim()}${terminator}`;\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{truncatedChild}</>;\n};\n\nTruncate.displayName = 'Truncate_VHS';\n","import type { MouseEvent, JSX } from 'react';\nimport { Icon } from '../../../components/Icon';\nimport { IconButton } from '../../../components/IconButton';\n\nexport type ModalCloseButtonProps = {\n /**\n * Callback invoked when the button is clicked\n */\n onClick?: (event: MouseEvent) => void;\n /**\n * Allows user to override default icon color\n */\n closeIconColorOverride?: string | undefined;\n};\n\nexport const ModalCloseButton = ({\n onClick,\n closeIconColorOverride,\n}: ModalCloseButtonProps): JSX.Element => (\n <IconButton\n aria-label=\"Close\"\n colorOverride={closeIconColorOverride}\n icon={\n <Icon\n size=\"sm\"\n type=\"close\"\n />\n }\n onClick={onClick}\n preventTooltip={true}\n style={{ position: 'absolute', right: '16px', top: '16px', zIndex: 1 }}\n />\n);\n\nModalCloseButton.displayName = 'ModalCloseButton';\n","import { css } from 'styled-components';\nimport { getBackgroundGradient } from '../../helpers/getBackgroundGradient';\n\nexport const getModalBackgroundGradient = (illustrationBackgroundColor: string) => {\n switch (illustrationBackgroundColor) {\n case 'green':\n return getBackgroundGradient('green');\n case 'pink':\n return getBackgroundGradient('pink');\n case 'purple':\n return getBackgroundGradient('purple');\n case 'yellow':\n return getBackgroundGradient('yellow');\n case 'brandBlue':\n return getBackgroundGradient('defaultLightOne');\n case 'blue':\n return getBackgroundGradient('defaultLightOne');\n default:\n return css`\n background-color: ${illustrationBackgroundColor};\n `;\n }\n};\n","import type { JSX, ComponentPropsWithoutRef } from 'react';\nimport { useMemo, useState, useEffect } from 'react';\nimport { isNil } from '@wistia/type-guards';\nimport { styled } from 'styled-components';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { generateContactAvatarColors } from './generateContactAvatarColors';\nimport { formatInitialsForDisplay } from './formatInitialsForDisplay';\n\nexport type AvatarInstanceType = 'image' | 'initials';\n\ntype AvatarImageLoadState = 'error' | 'loaded' | 'loading';\n\ntype AvatarWrapperProps = {\n $maxHeight: number;\n};\n\ntype InitialsContainerProps = {\n $backgroundColor: string;\n $heightAndWidth: number;\n};\n\nexport type AvatarProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The height and width of the avatar\n */\n heightAndWidth?: number;\n /**\n * The URL of the image to display\n */\n imageUrl?: string | null;\n /**\n * Initials to display if no image is provided\n *\n * _note: only first initial shown regardless of characters provided_\n */\n initials?: string | null;\n /**\n * A string that will deterministicly set the background color of the avatar\n */\n name?: string | null;\n /**\n * A callback that is invoked after the image has loaded or failed to load\n */\n onImageLoad?: (avatarType: AvatarInstanceType) => void;\n};\n\nconst AvatarImage = styled.img<{\n $heightAndWidth: number;\n}>`\n align-items: center;\n background-color: white;\n border-radius: 50%;\n color: white;\n display: flex;\n height: ${({ $heightAndWidth }) => $heightAndWidth}px;\n justify-content: center;\n object-fit: cover;\n overflow: hidden;\n pointer-events: none;\n user-select: none;\n width: ${({ $heightAndWidth }) => $heightAndWidth}px;\n border: ${({ theme }) => `2px solid ${theme.color.grey200}`};\n\n a:hover & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 25%);\n }\n\n a:active & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 50%);\n }\n`;\n\nconst fontSizeScaleMultiplier = 0.55;\n\nconst InitialsContainer = styled.div<InitialsContainerProps>`\n align-items: center;\n background-color: ${({ $backgroundColor }) => $backgroundColor};\n border-radius: 50%;\n color: white;\n display: flex;\n font-size: ${({ $heightAndWidth }) => $heightAndWidth * fontSizeScaleMultiplier}px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n height: ${({ $heightAndWidth }) => $heightAndWidth}px;\n justify-content: center;\n overflow: hidden;\n width: ${({ $heightAndWidth }) => $heightAndWidth}px;\n\n a:hover & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 25%);\n }\n\n a:active & {\n box-shadow: inset 0 0 0 2px rgb(0 0 0 / 50%);\n }\n`;\n\nconst AvatarWrapper = styled.div<AvatarWrapperProps>`\n max-height: ${({ $maxHeight }) => $maxHeight}px;\n`;\n\nexport const Avatar = ({\n imageUrl,\n heightAndWidth = 24,\n initials,\n name,\n onImageLoad,\n ...otherProps\n}: AvatarProps): JSX.Element => {\n const [imageLoadState, setImageLoadState] = useState<AvatarImageLoadState | null>(null);\n const themeColors = useThemeColor();\n\n const avatarColor = useMemo(() => {\n if (isNil(name) || name === 'Anonymous') {\n return themeColors.grey600;\n }\n\n return generateContactAvatarColors({\n seed: name,\n themeColors,\n })[0];\n }, [name, themeColors]);\n\n useEffect(() => {\n setImageLoadState(null);\n }, [imageUrl]);\n\n const handleImageLoad = () => {\n setImageLoadState('loaded');\n onImageLoad?.('image');\n };\n\n const handleImageLoadError = () => {\n setImageLoadState('error');\n onImageLoad?.('initials');\n };\n\n const showInitials = isNil(imageUrl) || imageLoadState === 'error';\n\n return (\n <AvatarWrapper\n {...otherProps}\n $maxHeight={heightAndWidth}\n >\n {showInitials ? (\n <InitialsContainer\n $backgroundColor={avatarColor ?? ''}\n $heightAndWidth={heightAndWidth}\n >\n {formatInitialsForDisplay(initials)}\n </InitialsContainer>\n ) : (\n <AvatarImage\n $heightAndWidth={heightAndWidth}\n alt={name ?? 'Unavailable'}\n onError={handleImageLoadError}\n onLoad={handleImageLoad}\n src={imageUrl}\n />\n )}\n </AvatarWrapper>\n );\n};\n\nAvatar.displayName = 'Avatar_VHS';\n","/**\n * Given an ID this function will return a semi-random color from AVATAR_COLORS\n * that will persist across page loads if given the same ID value\n *\n * Logic for generating a random number from the ID value adapted from:\n * https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0\n */\n\ntype UseContactAvatarColorProps = {\n seed: string;\n themeColors: Record<string, string>;\n};\n\nconst colorVariants = {\n blue: ['blue600', 'blue700', 'blue800'],\n brandBlue: ['brandBlue600', 'brandBlue700', 'brandBlue800'],\n green: ['green600', 'green700', 'green800'],\n pink: ['pink600', 'pink700', 'pink800'],\n purple: ['purple600', 'purple700', 'purple800'],\n red: ['red600', 'red700', 'red800'],\n yellow: ['yellow700', 'yellow800', 'yellow900'],\n};\nconst colorVariantKeys = Object.keys(colorVariants);\nconst multiplier = 31;\n\nconst hashCode = (str: string) =>\n Array.from(str).reduce((sum, char) => (Math.imul(multiplier, sum) + char.charCodeAt(0)) | 0, 0); // eslint-disable-line no-bitwise\n\nexport const generateContactAvatarColors = ({\n seed,\n themeColors,\n}: UseContactAvatarColorProps): string[] => {\n const index = Math.abs(hashCode(seed)) % colorVariantKeys.length;\n const colorVariantsKeyFromIndex = colorVariantKeys[index] as keyof typeof colorVariants;\n\n return colorVariants[colorVariantsKeyFromIndex]\n .map((themeColorToken) => themeColors[themeColorToken])\n .filter((color): color is string => color !== undefined);\n};\n","import { isNil, isString, isEmptyString } from '@wistia/type-guards';\n\nconst containsEmojiCharacter = (char: string): boolean => {\n // this combines Unicode character class escape - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape\n // with the `Extended_Pictograph` property - https://unicode.org/reports/tr51/\n const emojiRegex = /<a?:.+?:\\d{18}>|\\p{Extended_Pictographic}/gu;\n\n return emojiRegex.test(char);\n};\n\nexport const formatInitialsForDisplay = (initials: string | null | undefined): string => {\n // fallback initials are `U` for User\n if (\n isNil(initials) ||\n isEmptyString(initials) ||\n (isString(initials) && containsEmojiCharacter(initials))\n ) {\n return 'U';\n }\n\n if (typeof initials !== 'string') {\n return 'U';\n }\n\n // only display the first character as initial\n const firstChar = initials.substring(0, 1);\n // always return an uppercase initial\n return firstChar.toUpperCase();\n};\n","import { styled } from 'styled-components';\nimport type { ReactNode, ComponentPropsWithoutRef } from 'react';\nimport { isString } from '@wistia/type-guards';\nimport { isObject } from '../../helpers/objectHelpers/isObject';\n\n// note: the point of this function is to make BackgroundImage behave similarly to the Image\n// component where you can just provide an image url or path via `src` prop; but we also\n// need to support the various background-image functions, including \"url\"\nconst shouldWrap = (src: string): boolean => {\n // see: https://developer.mozilla.org/en-US/docs/Web/CSS/background-image#see_also\n const imageFunctionList = [\n 'cross-fade',\n 'element',\n 'image',\n 'image-set',\n 'linear-gradient',\n 'radial-gradient',\n 'conic-gradient',\n 'repeating-linear-gradient',\n 'repeating-radial-gradient',\n 'repeating-conic-gradient',\n 'paint',\n 'url',\n ];\n return !imageFunctionList.some((imageFunction) => src.startsWith(imageFunction));\n};\n\nexport const getBackgroundImageValue = (src: string[] | string | undefined): string | undefined => {\n if (src !== undefined && Array.isArray(src)) {\n return src\n .map((imageSrc) => (shouldWrap(imageSrc) ? `url('${imageSrc}')` : imageSrc))\n .join(', ');\n }\n\n if (src !== undefined && src !== '' && isString(src)) {\n return shouldWrap(src) ? `url('${src}')` : src;\n }\n\n return undefined;\n};\n\ntype OverflowObject = {\n horizontal: string;\n vertical: string;\n};\n\nconst getOverflowStyle = (overflow: OverflowObject | string): string | undefined => {\n if (overflow !== '') {\n if (isObject(overflow)) {\n Object.keys(overflow).forEach((key) => {\n if (!['horizontal', 'vertical'].includes(key)) {\n throw new ReferenceError(\n `\"${key}\" is not a valid key for BackgroundImage component overflow prop; only \"horizontal\" or \"vertical\" allowed`,\n );\n }\n });\n return Object.entries(overflow)\n .map(([key, value]) => {\n if (key === 'horizontal') {\n return `overflow-x: ${value};`;\n }\n if (key === 'vertical') {\n return `overflow-y: ${value};`;\n }\n return undefined;\n })\n .join('');\n }\n return `overflow: ${overflow};`;\n }\n return undefined;\n};\n\ntype BackgroundImageComponentProps = {\n $bgAttachment: string;\n $bgClip: string;\n $bgColor?: string | undefined;\n $bgImage?: string[] | string | undefined;\n $bgOrigin?: string | undefined;\n $bgPosition: string;\n $bgRepeat: string;\n $bgSize: string;\n $elHeight: string;\n $elOverflow: OverflowObject | string;\n $elWidth: string;\n};\n\nconst BackgroundImageComponent = styled.div<BackgroundImageComponentProps>`\n background-attachment: ${({ $bgAttachment }) => $bgAttachment};\n background-clip: ${({ $bgClip }) => $bgClip};\n background-color: ${({ $bgColor }) => $bgColor};\n background-image: ${({ $bgImage }) => getBackgroundImageValue($bgImage)};\n background-origin: ${({ $bgOrigin }) => $bgOrigin};\n background-position: ${({ $bgPosition }) => $bgPosition};\n background-repeat: ${({ $bgRepeat }) => $bgRepeat};\n background-size: ${({ $bgSize }) => $bgSize};\n display: flex;\n height: ${({ $elHeight }) => $elHeight};\n justify-content: center;\n ${({ $elOverflow }) => getOverflowStyle($elOverflow)};\n position: relative;\n width: ${({ $elWidth }) => $elWidth};\n`;\n\nexport type BackgroundImageProps = Omit<ComponentPropsWithoutRef<'img'>, 'src'> & {\n /**\n * The content that will be rendered inside\n */\n children?: ReactNode;\n /**\n * Sets whether a background image's position is fixed within the viewport,\n * or scrolls with its containing block. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment).\n */\n attachment?: string;\n /**\n * Sets whether an element's background extends underneath its border box,\n * padding box, or content box. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip).\n */\n clip?: string;\n /**\n * Color (as hex) of the component\n */\n color?: string | undefined;\n /**\n * Height of the component\n */\n height?: string;\n /**\n * Sets the background's origin: from the border start, inside the border, or inside the padding.\n * _Note: origin is ignored when attachment is `fixed`._\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin).\n */\n origin?: string;\n /**\n * Sets the desired behavior for an element's overflow (i.e. when an element's content is\n * too big to fit in its block formatting context).\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow).\n */\n overflow?: OverflowObject | string;\n /**\n * Sets the initial position for each image; relative to the position layer\n * set by origin. [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position).\n */\n position?: string;\n /**\n * Sets how background images are repeated.\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat).\n */\n repeat?: string;\n /**\n * Sets the size of the element's background image.\n * [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size).\n */\n size?: string;\n /**\n * URL(s) to image file\n */\n src?: string[] | string;\n /**\n * Width of the component\n */\n width?: string;\n};\n\nexport const BackgroundImage = ({\n children = undefined,\n attachment: bgAttachment = 'scroll',\n clip: bgClip = 'border-box',\n color: bgColor = undefined,\n height: elHeight = 'auto',\n origin: bgOrigin = undefined,\n overflow: elOverflow = 'hidden',\n position: bgPosition = 'center',\n repeat: bgRepeat = 'no-repeat',\n size: bgSize = 'cover',\n src: bgImage = undefined,\n width: elWidth = '100%',\n ...otherProps\n}: BackgroundImageProps) => (\n <BackgroundImageComponent\n $bgAttachment={bgAttachment}\n $bgClip={bgClip}\n $bgColor={bgColor}\n $bgImage={bgImage}\n $bgOrigin={bgOrigin}\n $bgPosition={bgPosition}\n $bgRepeat={bgRepeat}\n $bgSize={bgSize}\n $elHeight={elHeight}\n $elOverflow={elOverflow}\n $elWidth={elWidth}\n {...otherProps}\n >\n {children}\n </BackgroundImageComponent>\n);\n\nBackgroundImage.displayName = 'BackgroundImage_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { getBadgeColors } from './getBadgeColors';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { Icon } from '../Icon';\nimport type { IconNameType } from '../Icon/iconMap';\n\ntype BadgeComponentProps = {\n $textColor: string;\n $backgroundColor: string;\n $hasIcon: boolean;\n};\n\nexport type BadgeColorScheme =\n | 'brandBlue'\n | 'error'\n | 'green'\n | 'grey'\n | 'orange'\n | 'pink'\n | 'purple'\n | 'red'\n | 'success'\n | 'warning'\n | 'yellow';\n\nexport type BadgeProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The color scheme to use for the badge\n */\n colorScheme?: BadgeColorScheme;\n /**\n * The icon to display in the badge\n */\n icon?: IconNameType;\n /**\n * The text to display in the badge\n */\n label: string;\n};\n\nconst BadgeComponent = styled.div<BadgeComponentProps>`\n align-items: center;\n background: ${({ $backgroundColor }) => $backgroundColor};\n border-radius: 999px;\n color: ${({ $textColor }) => $textColor};\n display: inline-flex;\n font-size: 12px;\n font-weight: 600;\n gap: ${({ theme }) => theme.spacing.space01}; /* space between icon and label */\n padding-left: ${({ $hasIcon }) => ($hasIcon ? '4px' : '6px')};\n padding-right: 6px;\n width: fit-content;\n`;\n\nexport const Badge = ({\n colorScheme = 'brandBlue',\n label,\n icon,\n ...otherProps\n}: BadgeProps): JSX.Element => {\n const { backgroundColor, textColor } = getBadgeColors(colorScheme, useThemeColor());\n return (\n <BadgeComponent\n {...otherProps}\n $backgroundColor={backgroundColor}\n $hasIcon={isNotNil(icon)}\n $textColor={textColor}\n >\n {isNotNil(icon) && (\n <Icon\n data-testid=\"badge-icon\"\n size=\"sm\"\n type={icon}\n />\n )}\n\n <span>{label}</span>\n </BadgeComponent>\n );\n};\n\nBadge.displayName = 'Badge_VHS';\n","import type { DefaultTheme } from 'styled-components';\nimport type { BadgeColorScheme } from './Badge';\n\nexport const getBadgeColors = (\n badgeColor: BadgeColorScheme,\n allThemeColors: DefaultTheme['color'],\n): { backgroundColor: string; textColor: string } => {\n switch (badgeColor) {\n case 'error':\n return {\n backgroundColor: allThemeColors.error300,\n textColor: allThemeColors.error800,\n };\n case 'green':\n return {\n backgroundColor: allThemeColors.green300,\n textColor: allThemeColors.green800,\n };\n case 'grey':\n return {\n backgroundColor: allThemeColors.grey300,\n textColor: allThemeColors.grey1000,\n };\n case 'orange':\n return {\n backgroundColor: allThemeColors.orange200,\n textColor: allThemeColors.orange800,\n };\n case 'pink':\n return {\n backgroundColor: allThemeColors.pink300,\n textColor: allThemeColors.pink800,\n };\n case 'purple':\n return {\n backgroundColor: allThemeColors.purple300,\n textColor: allThemeColors.purple800,\n };\n case 'red':\n return {\n backgroundColor: allThemeColors.red300,\n textColor: allThemeColors.red800,\n };\n case 'success':\n return {\n backgroundColor: allThemeColors.success200,\n textColor: allThemeColors.success800,\n };\n case 'warning':\n return {\n backgroundColor: allThemeColors.warning300,\n textColor: allThemeColors.warning800,\n };\n case 'yellow':\n return {\n backgroundColor: allThemeColors.yellow200,\n textColor: allThemeColors.yellow800,\n };\n case 'brandBlue':\n default:\n return {\n backgroundColor: allThemeColors.brandBlue200,\n textColor: allThemeColors.brandBlue700,\n };\n }\n};\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { Body, RightGutter, Title } from './BannerChildComponents';\nimport { mq } from '../../helpers/mq';\n\ntype BannerComponentProps = {\n backgroundColor?: string | undefined;\n};\n\nconst BannerComponent = styled.div<BannerComponentProps>`\n background: ${({ theme, backgroundColor }) => backgroundColor ?? theme.color.grey200};\n border-radius: 8px;\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n padding: ${({ theme }) => `${theme.spacing.space04} ${theme.spacing.space05}`};\n`;\n\nconst IconWrapper = styled.div`\n align-items: center;\n display: flex;\n margin-right: ${({ theme }) => theme.spacing.space05};\n margin-top: ${({ theme }) => theme.spacing.space01};\n`;\n\nconst ChildrenWrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ${mq.smAndUp} {\n flex-direction: row;\n }\n`;\n\nexport type BannerProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * color string\n */\n backgroundColor?: string;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * icon name from the icon library to be displayed on left side of banner\n */\n icon?: ReactNode;\n};\n\nexport const Banner = ({ backgroundColor, icon, children, ...otherProps }: BannerProps) => (\n <BannerComponent\n backgroundColor={backgroundColor}\n {...otherProps}\n >\n {isNotNil(icon) ? <IconWrapper data-testid=\"banner-icon\">{icon}</IconWrapper> : null}\n <ChildrenWrapper>{children}</ChildrenWrapper>\n </BannerComponent>\n);\n\nBanner.Body = Body;\nBanner.RightGutter = RightGutter;\nBanner.Title = Title;\n\nBanner.displayName = 'Banner_VHS';\n","import type { ReactNode } from 'react';\nimport { styled, css } from 'styled-components';\nimport { mq } from '../../helpers/mq';\n\nconst BodyComponent = styled.div`\n color: ${({ theme }) => theme.color.grey900};\n flex: 1;\n font-size: 14px;\n line-height: 20px;\n`;\ntype BodyProps = {\n children?: ReactNode;\n};\n\nconst Body = ({ children }: BodyProps) => <BodyComponent>{children}</BodyComponent>;\n\nconst TitleComponent = styled.h2`\n font-size: 16px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n line-height: 24px;\n margin: ${({ theme }) => `0 0 ${theme.spacing.space01}`};\n\n a {\n font-weight: ${({ theme }) => theme.font.weight.medium};\n }\n`;\n\ntype TitleProps = {\n children?: ReactNode;\n};\n\nconst Title = ({ children }: TitleProps) => <TitleComponent>{children}</TitleComponent>;\n\nconst RightGutterActions = css`\n button,\n a {\n margin-top: ${({ theme }) => theme.spacing.space02};\n\n &:not([role='switch']) {\n width: 100%;\n }\n\n ${mq.smAndUp} {\n margin-left: ${({ theme }) => theme.spacing.space02};\n margin-top: 0;\n }\n }\n`;\n\nconst getVerticalAlign = (align: string | undefined): string => {\n switch (align) {\n case 'center':\n return 'center';\n case 'top':\n case undefined:\n default:\n return 'flex-start';\n }\n};\n\ntype RightGutterComponentProps = {\n $verticalAlign?: string | undefined;\n};\n\nconst RightGutterComponent = styled.div<RightGutterComponentProps>`\n align-items: ${({ $verticalAlign }) => getVerticalAlign($verticalAlign)};\n display: flex;\n ${RightGutterActions}\n\n ${mq.smAndUp} {\n margin-left: ${({ theme }) => theme.spacing.space05};\n }\n`;\n\ntype RightGutterProps = {\n children?: ReactNode;\n verticalAlign?: string;\n};\n\nconst RightGutter = ({ verticalAlign, children }: RightGutterProps) => (\n <RightGutterComponent $verticalAlign={verticalAlign}>{children}</RightGutterComponent>\n);\n\nexport { Body, RightGutter, Title };\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { isObject } from '../../helpers/objectHelpers/isObject';\n\nconst ALIGN_CONTENT_MAP = {\n around: 'space-around',\n between: 'space-between',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n};\n\nconst ALIGN_ITEMS_MAP = {\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n};\n\nconst JUSTIFY_CONTENT_MAP = {\n around: 'space-around',\n between: 'space-between',\n center: 'center',\n end: 'flex-end',\n evenly: 'space-evenly',\n start: 'flex-start',\n};\n\nconst ALIGN_SELF_MAP = {\n auto: 'auto',\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n};\n\nconst getFillStyle = (fill: boolean | 'horizontal' | 'vertical'): string | undefined => {\n if (fill === 'horizontal') {\n return 'width: 100%;';\n }\n if (fill === 'vertical') {\n return 'height: 100%;';\n }\n if (fill) {\n return `\n width: 100%;\n height: 100%;\n `;\n }\n return undefined;\n};\n\nconst getFillViewportStyle = (\n fillViewport: boolean | 'horizontal' | 'vertical',\n): string | undefined => {\n if (fillViewport === 'horizontal') {\n return 'width: 100vw;';\n }\n if (fillViewport === 'vertical') {\n return 'height: 100vh;';\n }\n if (fillViewport) {\n return `\n width: 100vw;\n height: 100vh;\n `;\n }\n return undefined;\n};\n\nconst getGapStyle = (gap?: Gap | number | string) => {\n if (isNotNil(gap)) {\n if (isObject(gap)) {\n return Object.entries(gap)\n .map(([key, value]) => `${key}-gap: ${value as string};`)\n .join('');\n }\n return `gap: ${gap as string};`;\n }\n return undefined;\n};\n\ntype BoxComponentProps = {\n $alignContent: 'around' | 'between' | 'center' | 'end' | 'start' | 'stretch';\n $alignItems: 'baseline' | 'center' | 'end' | 'start' | 'stretch';\n $alignSelf?: 'auto' | 'baseline' | 'center' | 'end' | 'start' | 'stretch' | undefined;\n $basis?: number | string | undefined;\n $flexDirection: 'column-reverse' | 'column' | 'row-reverse' | 'row';\n $fillBox: boolean | 'horizontal' | 'vertical';\n $fillViewport: boolean | 'horizontal' | 'vertical';\n $gap?: Gap | number | string | undefined;\n $grow?: number | undefined;\n $inline?: boolean;\n $justifyContent: 'around' | 'between' | 'center' | 'end' | 'evenly' | 'start';\n $order?: number | 'inherit' | 'initial' | 'unset' | undefined;\n $shrink?: number | undefined;\n $wrapItems: boolean;\n children?: ReactNode;\n as?: string;\n};\n\nconst BoxComponent = styled.div<BoxComponentProps>`\n align-content: ${({ $alignContent }) => ALIGN_CONTENT_MAP[$alignContent]};\n align-items: ${({ $alignItems }) => ALIGN_ITEMS_MAP[$alignItems]};\n align-self: ${({ $alignSelf }) => ($alignSelf ? ALIGN_SELF_MAP[$alignSelf] : null)};\n display: ${({ $inline }) => (isNotNil($inline) && $inline ? 'inline-flex' : 'flex')};\n flex-basis: ${({ $basis }) => (isNotNil($basis) ? $basis : null)};\n flex-direction: ${({ $flexDirection }) => $flexDirection};\n ${({ $fillBox }) => getFillStyle($fillBox)};\n ${({ $fillViewport }) => getFillViewportStyle($fillViewport)};\n\n /* Box children styles */\n flex-grow: ${({ $grow }) => (isNotNil($grow) ? $grow : null)};\n flex-shrink: ${({ $shrink }) => (isNotNil($shrink) ? $shrink : null)};\n flex-wrap: ${({ $wrapItems }) => ($wrapItems ? 'wrap' : 'nowrap')};\n ${({ $gap }) => getGapStyle($gap)};\n justify-content: ${({ $justifyContent }) => JUSTIFY_CONTENT_MAP[$justifyContent]};\n order: ${({ $order }) => (isNotNil($order) ? $order : null)};\n`;\n\ntype Gap = {\n column: number | string;\n row: number | string;\n};\n\nexport type BoxProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Specifies how the browser distributes space between and around\n * items along the cross-axis of their container; has no effect on\n * single line flexible boxes\n */\n alignContent?: 'around' | 'between' | 'center' | 'end' | 'start' | 'stretch';\n /**\n * Specifies how the browser distributes space between and around\n * items along the cross-axis of their container; the difference\n * to the alignContent prop is that alignItems specifies the\n * alignment of the items within the current container's line,\n * whereas alignContent specifies the alignment of the lines themselves\n */\n alignItems?: 'baseline' | 'center' | 'end' | 'start' | 'stretch';\n /**\n * Specifies how the browser aligns items of the current line, overriding the\n * alignItems value of parent; if any of the item's cross-axis margin is set to auto,\n * then alignSelf is ignored\n *\n * *Note: only works for nested `<Box />`*\n */\n alignSelf?: 'auto' | 'baseline' | 'center' | 'end' | 'start' | 'stretch';\n /**\n * Specifies the initial main size of an item\n *\n * *Note: only works for nested `<Box />`*\n */\n basis?: number | string;\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Specifies the main axis of the container\n */\n direction?: 'column-reverse' | 'column' | 'row-reverse' | 'row';\n /**\n * Specifies whether the width and/or height should fill the container\n */\n fill?: boolean | 'horizontal' | 'vertical';\n /**\n * Specifies whether the width and/or height should fill the viewport\n */\n fillViewport?: boolean | 'horizontal' | 'vertical';\n /**\n * Specifies the gaps (gutters) between rows and columns\n */\n gap?: Gap | number | string;\n /**\n * Specifies what amount of space inside the flex container the item should take up\n *\n * *Note: only works for nested `<Box />`*\n */\n grow?: number;\n /**\n * Make Layout behave like an inline element but still lay out its content according to flexbox model\n */\n inline?: boolean;\n /**\n * Specifies how the browser distributes space between and around\n * items along the main axis of their container\n */\n justifyContent?: 'around' | 'between' | 'center' | 'end' | 'evenly' | 'start';\n /**\n * Specifies the order used to lay out an item in its container. Items within the same\n * container are rendered in ascending order according to their order values.\n * Elements with the _same_ order value are rendered in the order in which they appear in code\n *\n * *Note: only works for nested `<Box />`*\n */\n order?: number | 'inherit' | 'initial' | 'unset';\n /**\n * The DOM tag to use for the element\n */\n renderAs?: keyof JSX.IntrinsicElements;\n /**\n * Specifies how items will shrink inside the container when the default size of\n * items is larger than their container\n *\n * *Note: only works for nested `<Box />`*\n */\n shrink?: number;\n /**\n * Specifies whether items are forced into a single line or can be wrapped onto multiple lines\n */\n wrapItems?: boolean;\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n alignContent = 'stretch',\n alignItems = 'start',\n alignSelf,\n basis,\n children,\n direction = 'row',\n fill = false,\n fillViewport = false,\n gap,\n grow,\n inline = false,\n justifyContent = 'start',\n order,\n renderAs = 'div',\n shrink,\n wrapItems = false,\n ...otherProps\n }: BoxProps,\n ref,\n ): JSX.Element => {\n return (\n <BoxComponent\n ref={ref}\n $alignContent={alignContent}\n $alignItems={alignItems}\n $alignSelf={alignSelf}\n $basis={basis}\n $fillBox={fill}\n $fillViewport={fillViewport}\n $flexDirection={direction}\n $gap={gap}\n $grow={grow}\n $inline={inline}\n $justifyContent={justifyContent}\n $order={order}\n $shrink={shrink}\n $wrapItems={wrapItems}\n as={renderAs}\n {...otherProps}\n >\n {children}\n </BoxComponent>\n );\n },\n);\n\nBox.displayName = 'Box_VHS';\n","import { forwardRef } from 'react';\nimport type { ComponentPropsWithRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { ButtonStyleProps } from '../Button/ButtonStyledComponent';\nimport type { LinkProps } from '../Link/Link';\nimport type { iconMap } from '../Icon/iconMap';\nimport type { TextAlignValues } from '../Button/Button';\nimport { buttonStyle, disabledButtonStyle } from '../Button/ButtonStyledComponent';\nimport { Link } from '../Link/Link';\nimport { getButtonColor } from '../Button/getButtonColor';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { ButtonContent } from '../Button/ButtonContent';\n\n// combined type for button styling on links - excludes button-specific type attribute\ntype ButtonLinkStyleProps = Omit<ButtonStyleProps, 'type'> & Pick<LinkProps, 'type'>;\n\n// we pass `unstyled` here to remove the default styles of Link\nconst StyledButtonLink = styled(Link)<ButtonLinkStyleProps>`\n ${buttonStyle as never};\n\n /* Links are disabled by removing their href */\n &:not([href]) {\n ${disabledButtonStyle};\n }\n`;\n\nexport type ButtonLinkProps = ComponentPropsWithRef<'a'> & {\n /**\n * A Promise to invoke before navigating to location.\n * _Caution: if used with `external` type prop a new window will **not** be opened_\n */\n beforeAction?: (() => Promise<void>) | (() => void);\n /**\n * The content that will be rendered inside the button\n */\n children?: ReactNode;\n /**\n * Option CSS color string\n */\n colorOverride?: string;\n /**\n * Disables Link\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Link into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * Is the button full-width?\n */\n fullWidth?: boolean;\n /**\n * The entity to link to (url, email address, telephone number)\n */\n href: string;\n /**\n * An SVG component\n */\n icon?: ReactNode;\n /**\n * The \"type\" name of a VHS icon. *THIS WILL OVERRIDE ANY ICON PROP PASSED*\n */\n iconName?: keyof typeof iconMap;\n /**\n * Should the icon appear at the start of the button or the end?\n */\n iconPosition?: 'end' | 'start';\n /**\n * Text that appears inside the button\n */\n label?: string;\n /**\n * Should the label wrap if the button container is too narrow to fit the label text on one line\n */\n labelWrap?: boolean;\n /**\n * An object that will be converted into a search parameter string and appended to\n * the `to` prop value\n */\n\n params?: Record<string, string>;\n /**\n * The size of button to display\n */\n size?: 'lg' | 'md' | 'sm';\n /**\n * If true, rounded corners are disabled\n */\n square?: boolean;\n /**\n * Alignment of the button label\n */\n textAlign?: TextAlignValues;\n /**\n * Type of link to display\n *\n * * `email` creates a mailto\n * * `phone` creates a telephone number\n * * `external` will open links in a new window\n */\n type?: 'default' | 'email' | 'external' | 'phone';\n /**\n * The visual type of button to display\n */\n variant?: 'dangerous' | 'primary' | 'secondary' | 'tertiary';\n // TODO share types with Button when it's converted to typescript\n};\n\n/**\n * The `ButtonLink` component is useful for getting the functionality of a\n * `Link` with the styling of a `Button`.\n *\n * A useful heuristic for using this component: Do you have an `href`? Some of the advantages are having a right-click\n * context menu available opening a new tab, and copying the URL.\n *\n * **Note:** the props table below is incomplete; please\n * refer to [Link](?path=/docs/link--link-stories) for additional props.\n */\nexport const ButtonLink = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonLinkProps>(\n (\n {\n beforeAction,\n children,\n colorOverride,\n disabled = false,\n forceState,\n fullWidth = false,\n href,\n icon,\n iconName,\n iconPosition = 'start',\n label,\n labelWrap = false,\n params,\n size = 'lg',\n square = false,\n textAlign = 'center',\n type = 'default',\n variant = 'primary',\n ...otherProps\n }: ButtonLinkProps,\n ref,\n ): JSX.Element => {\n const buttonColor = getButtonColor(colorOverride, variant, useThemeColor());\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const getContent = () => {\n if (isNotNil(children)) {\n return children;\n }\n if (isNotNil(label)) {\n return label;\n }\n return null;\n };\n\n const styledProps = {\n ref,\n $buttonColor: buttonColor,\n $forceState: forceState,\n $fullWidth: fullWidth,\n $icon: icon,\n $iconPosition: iconPosition,\n $isLoading: false,\n $labelWrap: labelWrap,\n $size: size,\n $square: square,\n $textAlign: textAlign,\n $variant: variant,\n beforeAction,\n disabled,\n href,\n params,\n type,\n unstyled: true,\n ...otherProps,\n } as Parameters<typeof StyledButtonLink>[0];\n\n return (\n <StyledButtonLink {...styledProps}>\n <ButtonContent\n icon={icon}\n iconName={iconName}\n iconPosition={iconPosition}\n isLoading={false}\n size={size}\n textAlign={textAlign}\n >\n {getContent()}\n </ButtonContent>\n </StyledButtonLink>\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { forwardRef } from 'react';\nimport type { LinkStyleProps } from './linkStyle';\nimport { linkStyle, unstyledLinkStyle } from './linkStyle';\nimport { useWrappers } from '../../providers/WrapperProvider';\n\nconst LinkComponent = styled.a<LinkStyleProps>`\n ${linkStyle}\n`;\n\nconst UnstyledLinkComponent = styled.a<LinkStyleProps>`\n ${unstyledLinkStyle}\n`;\n\ntype LinkURLParameters = Record<string, string>;\ntype LinkTypes = 'default' | 'email' | 'external' | 'phone';\n\nconst appendParams = (href: string, params: LinkURLParameters): string => {\n const keys = Object.keys(params);\n\n if (!keys.length) {\n return href;\n }\n\n const url = new URL(href);\n\n keys.forEach((key) => {\n // disabling no-non-null-assertion because we know the keys are not null/undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n url.searchParams.set(key, params[key]!);\n });\n\n return url.toString();\n};\n\nconst generateHref = (\n href: string,\n type: LinkTypes | undefined,\n params: LinkURLParameters | undefined,\n disabled: boolean,\n): string | null => {\n // when a link is disabled, we don't want an href value because\n // the browser displays a tooltip \"hint\" of the href to the user\n if (disabled) {\n return null;\n }\n\n let to = href;\n\n if (type === 'phone') {\n to = `tel:${href}`;\n }\n\n if (type === 'email') {\n to = `mailto:${href}`;\n }\n\n if (params !== undefined) {\n to = appendParams(to, params);\n }\n\n return to;\n};\n\nexport type DefaultLinkWrapperProps = {\n [anchorProps: string]: unknown;\n RenderedLink: ({ ...args }) => JSX.Element;\n children: ReactNode;\n};\n\nconst DefaultLinkWrapper = ({\n RenderedLink,\n children,\n ...anchorProps\n}: DefaultLinkWrapperProps) => <RenderedLink {...anchorProps}>{children}</RenderedLink>;\n\nexport type LinkProps = ComponentPropsWithoutRef<'a'> & {\n /**\n * A Promise to invoke before navigating to location.\n * _Caution: if used with `external` type prop a new window will **not** be opened_\n */\n beforeAction?: (() => Promise<void>) | (() => void);\n /**\n * The content that will be rendered inside the link\n */\n children: ReactNode;\n /**\n * Disables Link\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Link into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * The entity to link to (url, email address, telephone number)\n */\n href: string;\n /**\n * Use this if your link is \"nested\" inside another link\n */\n nested?: boolean;\n /**\n * An object that will be converted into a search parameter string and appended to\n * the `to` prop value\n */\n params?: LinkURLParameters;\n /**\n * Type of link to display\n *\n * * `email` creates a mailto\n * * `phone` creates a telephone number\n * * `external` will open links in a new window\n */\n type?: LinkTypes;\n /**\n * Will only display an underline when the Link is in a hover state\n */\n underlineOnHover?: boolean;\n /**\n * Renders a link without any of the default styling applied\n */\n unstyled?: boolean;\n /**\n * The visual type of Link to display\n */\n variant?: 'dangerous' | 'primary' | 'secondary';\n};\n\nexport const Link = forwardRef<HTMLAnchorElement | HTMLButtonElement, LinkProps>(\n (\n {\n href,\n beforeAction,\n children,\n disabled = false,\n forceState,\n nested = false,\n params,\n type = 'default',\n unstyled = false,\n variant = 'primary',\n underlineOnHover = false,\n ...otherProps\n }: LinkProps,\n ref,\n ) => {\n const to = generateHref(href, type, params, disabled);\n\n // opens in new window/tab and prevents security vulnerability:\n // see: https://mathiasbynens.github.io/rel-noopener/\n const externalLinkProps =\n type === 'external' ? { target: '_blank', rel: 'noopener noreferrer' } : null;\n\n // note: an external type link would require `window.open(this.href,'_blank')` here\n // but that will be swallowed by the browser popup blocker\n // better to just treat an external link with a beforeAction as a default link\n // see: https://www.w3.org/TR/DOM-Level-3-Events/#trusted-events\n const handleClick = async (event: MouseEvent, routingCallback: (() => void) | null = null) => {\n if (disabled) {\n event.preventDefault();\n } else if (beforeAction) {\n event.preventDefault();\n try {\n await beforeAction();\n } catch (error: unknown) {\n console.error(error); // eslint-disable-line no-console\n } finally {\n if (routingCallback !== null) {\n routingCallback();\n } else {\n // We know that to is not null in this case\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n window.location.assign(to!);\n }\n }\n } else {\n // do nothing\n }\n };\n\n // Note: the unstyled prop is deliberately hidden from the props table because it is an escape hatch\n const RenderedLink = unstyled ? UnstyledLinkComponent : LinkComponent;\n // We need to investigate this type further. Lint complains, but useWrappers could be empty in the case of rendering a link outside the context\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/no-unnecessary-condition\n const { Link: LinkWrapper = DefaultLinkWrapper } = useWrappers() || {};\n\n const component = (\n <LinkWrapper\n ref={ref}\n $disabledLink={disabled}\n $forceState={forceState}\n $underlineOnHover={underlineOnHover}\n $unstyled={unstyled}\n $variant={variant}\n href={to}\n onClick={handleClick}\n RenderedLink={RenderedLink}\n {...externalLinkProps}\n {...otherProps}\n >\n {children}\n </LinkWrapper>\n );\n\n if (nested) {\n // this is a hack that allows us to nest a Link *inside* another Link\n // see: https://www.kizu.ru/nested-links/\n return (\n <object\n data-testid=\"link-object\"\n type=\"hacky/hack\"\n >\n {component}\n </object>\n );\n }\n\n return component;\n },\n);\n\nLink.displayName = 'Link_VHS';\n","import { css } from 'styled-components';\nimport { darken } from 'polished';\n\nconst HOVER_DARKEN = 0.08;\n\nconst primaryHoverStyle = css`\n color: ${({ theme }) => darken(HOVER_DARKEN, theme.color.brandBlue500)};\n`;\n\nconst primaryStyle = css`\n color: ${({ theme }) => theme.color.brandBlue500};\n\n &:hover,\n &:focus {\n ${primaryHoverStyle}\n }\n`;\n\nconst secondaryHoverStyle = css`\n color: rgb(255 255 255 / 80%);\n`;\n\nconst secondaryStyle = css`\n color: white;\n\n &:hover,\n &:focus {\n ${secondaryHoverStyle}\n }\n`;\n\nconst dangerousHoverStyle = css`\n color: ${({ theme }) => darken(HOVER_DARKEN, theme.color.red600)};\n`;\n\nconst dangerousStyle = css`\n color: ${({ theme }) => theme.color.red600};\n\n &:hover,\n &:focus {\n ${dangerousHoverStyle}\n }\n`;\n\nexport const disabledStyle = css`\n color: ${({ theme }) => theme.color.grey700};\n cursor: not-allowed;\n\n &:hover,\n &:focus {\n color: ${({ theme }) => theme.color.grey700};\n }\n`;\n\nexport const underlineOnHoverStyle = css`\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n`;\n\nexport type LinkStyleProps = {\n $underlineOnHover: boolean;\n $disabledLink: boolean;\n $variant?: 'dangerous' | 'primary' | 'secondary';\n $forceState?: 'active' | 'focus' | 'hover' | undefined;\n};\n\nexport const linkStyle = css<LinkStyleProps>`\n cursor: pointer;\n font-weight: 400;\n text-decoration: underline;\n ${({ $underlineOnHover }) => $underlineOnHover && underlineOnHoverStyle}\n ${({ $disabledLink }) => $disabledLink && disabledStyle}\n ${({ $variant }) => {\n if ($variant === 'primary') {\n return primaryStyle;\n }\n if ($variant === 'secondary') {\n return secondaryStyle;\n }\n if ($variant === 'dangerous') {\n return dangerousStyle;\n }\n return primaryStyle;\n }}\n ${({ $variant, $forceState }) => {\n switch ($forceState) {\n case 'hover':\n case 'focus':\n if ($variant === 'primary') {\n return primaryHoverStyle;\n }\n if ($variant === 'secondary') {\n return secondaryHoverStyle;\n }\n if ($variant === 'dangerous') {\n return dangerousHoverStyle;\n }\n break;\n /* no active styles yet */\n case 'active':\n case undefined:\n default:\n return undefined;\n }\n return undefined;\n }}\n`;\n\nexport const unstyledLinkStyle = css<LinkStyleProps>`\n color: inherit;\n cursor: pointer;\n text-decoration: underline;\n ${({ $underlineOnHover }) => $underlineOnHover && underlineOnHoverStyle}\n`;\n","import type { ChangeEvent, ComponentPropsWithRef, JSX } from 'react';\nimport { forwardRef, useState, isValidElement } from 'react';\nimport { isNonEmptyString, isNotUndefined } from '@wistia/type-guards';\nimport { Container, OptionWrapper, OptionLabel, OptionSubLabel } from './OptionStyledComponent';\n\nexport type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {\n /**\n * Indicates the state of the checkbox\n */\n checked?: boolean;\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables checkbox\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Checkbox into a particular css state (for debugging)\n */\n forceState?: 'focus' | 'hover';\n /**\n * Indicates that there is an error with the input\n */\n hasError?: boolean;\n /**\n * Provides an ID for the checkbox\n */\n id?: string;\n /**\n * The label for the checkbox\n */\n label?: JSX.Element | string | undefined;\n /**\n * The description for the checkbox\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Should match the ID attribute of the checkbox.\n * Can be used to group together multiple checkboxes\n */\n name?: string;\n /**\n * Callback function invoked when the checkbox value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Make Input a required element\n */\n required?: boolean;\n /**\n * The value attribute of the checkbox\n */\n value?: string;\n};\n\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(\n (\n {\n checked,\n direction = 'column',\n disabled = false,\n forceState,\n hasError = false,\n id = 'default',\n label = 'default',\n labelDescription,\n name,\n onChange,\n required = false,\n value = 'false',\n ...otherProps\n }: CheckboxProps,\n ref,\n ) => {\n const [focused, setFocused] = useState(false);\n return (\n <Container\n ref={ref}\n $direction={direction}\n $disabled={disabled}\n $forceState={forceState}\n $hasError={hasError}\n $isFocused={focused}\n aria-invalid={isNotUndefined(hasError) && hasError ? 'true' : 'false'}\n {...otherProps}\n >\n <OptionWrapper\n aria-checked={checked}\n checked={checked}\n data-testid=\"checkbox-option-wrapper\"\n disabled={disabled}\n id={id}\n name={name}\n onBlur={() => setFocused(false)}\n onChange={onChange}\n onFocus={() => setFocused(true)}\n required={required}\n type=\"checkbox\"\n value={value}\n />\n <OptionLabel>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{label}</>\n {isNonEmptyString(labelDescription) || isValidElement(labelDescription) ? (\n <OptionSubLabel data-testid=\"checkbox-option-sub-label\">\n {labelDescription}\n </OptionSubLabel>\n ) : null}\n </OptionLabel>\n </Container>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox_VHS';\n","import type { ComponentPropsWithRef } from 'react';\nimport { styled, css } from 'styled-components';\n\nexport const OptionWrapper = styled.input`\n align-self: flex-start;\n border-radius: 3px;\n box-shadow: ${({ type }) =>\n type === 'checkbox' ? 'inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)' : 'none'};\n margin-top: ${({ theme }) => theme.spacing.space01};\n\n /*\n * There are some high-level styles for VMA modals that broadly target input[type=\"radio\"]\n * and input[type=\"checkbox\"], so this extra specificity is needed to override those styles.\n */\n &&& {\n margin: ${({ theme }) => theme.spacing.space01} 0 0;\n }\n`;\n\nexport const OptionLabel = styled.div`\n color: ${({ theme }) => theme.color.grey900};\n font-size: 14px;\n line-height: 20px;\n`;\n\nexport const OptionSubLabel = styled.div`\n color: ${({ theme }) => theme.color.grey900};\n font-size: 12px;\n line-height: 16px;\n`;\n\nexport const disabledStyle = css`\n cursor: not-allowed;\n opacity: 0.5;\n`;\n\nexport const errorHoverStyle = css`\n border-color: transparent;\n`;\n\nexport const errorFocusedStyle = css`\n outline: none;\n`;\n\nexport const errorStyle = css`\n background-color: ${({ theme }) => theme.color.error100};\n border: 1px solid ${({ theme }) => theme.color.error500};\n\n &:hover,\n &:focus,\n &:active {\n border-color: transparent !important;\n }\n`;\n\nexport const defaultHoverStyle = css`\n background-color: ${({ theme }) => theme.color.grey300};\n cursor: pointer;\n`;\n\nexport const defaultFocusedStyle = css`\n ${defaultHoverStyle}\n`;\n\ntype ContainerProps = ComponentPropsWithRef<'label'> & {\n $direction: 'column' | 'row';\n $disabled: boolean;\n $forceState?: 'focus' | 'hover' | undefined;\n $hasError: boolean;\n $isFocused: boolean;\n};\nexport const Container = styled.label<ContainerProps>`\n align-items: center;\n border: 1px solid transparent;\n border-radius: 4px;\n display: flex;\n gap: ${({ theme }) => theme.spacing.space04};\n padding: ${({ theme }) => theme.spacing.space02};\n width: ${({ $direction }) => ($direction === 'column' ? '100%' : 'auto')};\n\n &:hover {\n ${defaultHoverStyle}\n }\n\n ${({ $hasError }) => $hasError && errorStyle};\n ${({ $disabled }) => $disabled && disabledStyle};\n ${({ $isFocused }) => $isFocused && defaultFocusedStyle};\n ${({ $isFocused, $hasError }) => $isFocused && $hasError && errorFocusedStyle};\n ${({ $forceState }) => $forceState === 'focus' && defaultFocusedStyle};\n ${({ $forceState }) => $forceState === 'hover' && defaultHoverStyle};\n ${({ $forceState, $hasError }) => $forceState === 'focus' && $hasError && errorFocusedStyle};\n ${({ $forceState, $hasError }) => $forceState === 'hover' && $hasError && errorHoverStyle};\n`;\n","import { styled } from 'styled-components';\nimport type { ChangeEvent, ComponentPropsWithoutRef, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { Checkbox } from '../Checkbox';\nimport type { CheckboxProps } from '../Checkbox/Checkbox';\nimport { FormFieldWrapper } from '../../private/components/FormFieldWrapper';\n\ntype StyledOptionContainerProps = {\n direction: 'column' | 'row';\n};\n\nconst StyledOptionContainer = styled.div<StyledOptionContainerProps>`\n display: flex;\n flex-direction: ${({ direction }) => (direction === 'row' ? 'row' : 'column')};\n gap: ${({ direction, theme }) =>\n direction === 'row' ? theme.spacing.space04 : theme.spacing.space01};\n`;\n\ntype CheckboxPropsWithName = Omit<CheckboxProps, 'name'> & { name: string };\n\nexport type CheckboxGroupProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Whether CheckboxGroup is disabled\n */\n disabled?: boolean;\n /**\n * Error message to be displayed\n */\n error?: string | undefined;\n /**\n * The label for the form field\n */\n label?: JSX.Element | string | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Name of the form element\n */\n name: string;\n /**\n * Callback function invoked when the value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>, name: string) => unknown;\n /**\n * Array of checkbox attributes\n */\n options: CheckboxPropsWithName[];\n /**\n * Currently selected checkbox value\n */\n value?: string[] | boolean | undefined;\n};\n\nexport const CheckboxGroup = ({\n direction = 'column',\n disabled = false,\n error,\n label,\n labelDescription,\n labelProps = {},\n name,\n onChange,\n options,\n value = false,\n ...otherProps\n}: CheckboxGroupProps): JSX.Element => (\n <FormFieldWrapper\n disabled={disabled}\n error={error}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n labelType=\"legend\"\n name={name}\n role=\"group\"\n {...otherProps}\n >\n <StyledOptionContainer direction={direction}>\n {options.map((option) => {\n const isChecked = Array.isArray(value) ? value.includes(option.name) : value;\n return (\n <Checkbox\n key={option.name}\n checked={isChecked}\n direction={direction}\n disabled={disabled}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n isNotNil(onChange) ? onChange(event, option.name) : undefined\n }\n {...option}\n />\n );\n })}\n </StyledOptionContainer>\n </FormFieldWrapper>\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup_VHS';\n","import { styled } from 'styled-components';\nimport type { ReactNode, ComponentPropsWithoutRef, JSX } from 'react';\nimport { Label } from '../../../components/Label';\nimport { FormFieldError } from '../../../components/FormFieldError';\nimport { LabelDescription } from '../../../components/LabelDescription';\n\nconst StyledFormFieldWrapper = styled.div`\n width: 100%;\n`;\n\nexport const FormFieldWrapper = ({\n disabled = false,\n error = null,\n label = null,\n labelDescription = null,\n labelProps = {},\n labelType = 'label',\n name,\n children,\n labelId = null,\n ...otherProps\n}: FormFieldWrapperProps) => {\n const computedId = labelId ?? `group-id-${name}`;\n const computedAriaLabelledby = labelType === 'legend' ? computedId : null;\n const combinedLabelProps = {\n id: computedId,\n htmlFor: `field-${name}`,\n renderAs: labelType,\n disabled: labelProps.disabled ?? disabled,\n screenReaderOnly: labelProps.screenReaderOnly ?? false,\n };\n return (\n <StyledFormFieldWrapper\n {...otherProps}\n aria-labelledby={computedAriaLabelledby ?? undefined}\n >\n {label !== null ? <Label {...combinedLabelProps}>{label}</Label> : null}\n {labelDescription !== null ? (\n <LabelDescription disabled={disabled}>{labelDescription}</LabelDescription>\n ) : null}\n {error !== null ? (\n <FormFieldError data-testid={`form-field-error-${name}`}>{error}</FormFieldError>\n ) : null}\n {children}\n </StyledFormFieldWrapper>\n );\n};\n\ntype FormFieldWrapperProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Pass an arbitrary child node\n */\n children: ReactNode;\n /**\n * Disables the field\n */\n disabled?: boolean | undefined;\n /**\n * Visual label above the input\n */\n error?: ReactNode | null;\n /**\n * The label for the form field\n */\n label?: JSX.Element | string | null | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode | null | undefined;\n /**\n * option label id for aria-labelledby\n */\n labelId?: string | null | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?:\n | {\n disabled?: boolean | undefined;\n screenReaderOnly?: boolean | undefined;\n }\n | undefined;\n /**\n * Choose between legend and label\n */\n labelType?: 'label' | 'legend' | undefined;\n /**\n * Field name\n */\n name: string;\n};\n\nFormFieldWrapper.displayName = 'FormFieldWrapper';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled, css } from 'styled-components';\nimport { screenReaderOnlyStyle } from '../ScreenReaderOnly';\n\nconst requiredStyle = css`\n &::after {\n color: red;\n content: ' *';\n }\n`;\n\nconst disabledStyle = css`\n color: ${({ theme }) => theme.color.grey500};\n`;\n\nconst SPACE_BETWEEN_LABEL_AND_INPUT = '8px';\n\nexport type LabelComponentProps = Pick<ComponentPropsWithoutRef<'label'>, 'htmlFor'> & {\n $disabled: boolean;\n $renderAs: string;\n $required: boolean;\n $screenReaderOnly: boolean;\n};\n\nexport type LabelProps = ComponentPropsWithoutRef<'label'> & {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * To indicate that the label is for a disabled form component\n */\n disabled?: boolean;\n /**\n * ID of the form component that the label should be associated with\n */\n htmlFor?: string | undefined;\n /**\n * To use 'legend', 'p', 'span', or other instead of 'label'\n */\n renderAs?: 'div' | 'label' | 'legend' | 'p' | 'span' | undefined;\n /**\n * Use if label describes a required form component\n */\n required?: boolean;\n /**\n * For label text that needs to be available to assistive technology (e.g. screen readers)\n * but otherwise hidden on screen.\n */\n screenReaderOnly?: boolean;\n};\n\nconst LabelComponent = styled.label<LabelComponentProps>`\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.semiBold};\n margin-bottom: ${SPACE_BETWEEN_LABEL_AND_INPUT};\n width: 100%;\n\n /* if label is wrapping an input this ensures it appears beneath the label with a nice margin */\n > input,\n > textarea,\n > select {\n display: block;\n margin-top: ${SPACE_BETWEEN_LABEL_AND_INPUT};\n }\n\n > label {\n font-weight: normal;\n }\n\n ${({ $screenReaderOnly }) => $screenReaderOnly && screenReaderOnlyStyle}\n ${({ $disabled }) => $disabled && disabledStyle}\n ${({ $required }) => $required && requiredStyle}\n`;\n\nexport const Label = ({\n renderAs = 'label',\n children,\n disabled = false,\n htmlFor,\n required = false,\n screenReaderOnly = false,\n ...otherProps\n}: LabelProps): JSX.Element => (\n <LabelComponent\n $disabled={disabled}\n $renderAs={renderAs}\n $required={required}\n $screenReaderOnly={screenReaderOnly}\n as={renderAs}\n htmlFor={renderAs === 'label' ? htmlFor : ''}\n {...otherProps}\n >\n {children}\n </LabelComponent>\n);\n\nLabel.displayName = 'Label_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNil } from '@wistia/type-guards';\n\nconst FieldError = styled.div`\n align-items: center;\n border-left: 4px solid ${({ theme }) => theme.color.error500};\n color: ${({ theme }) => theme.color.error600};\n font-size: 12px;\n line-height: 16px;\n margin-top: ${({ theme }) => theme.spacing.space02};\n padding-left: ${({ theme }) => theme.spacing.space02};\n`;\n\nexport type FormFieldErrorProps = ComponentPropsWithoutRef<'div'> & {\n children?: ReactNode | undefined;\n};\n\nexport const FormFieldError = ({\n children,\n ...otherProps\n}: FormFieldErrorProps): JSX.Element | null => {\n if (isNil(children)) {\n return null;\n }\n\n return <FieldError {...otherProps}>{children}</FieldError>;\n};\n\nFormFieldError.displayName = 'FormFieldError_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { styled, css } from 'styled-components';\n\nexport type LabelDescriptionComponentProps = {\n disabled: boolean;\n};\n\nexport type LabelDescriptionProps = ComponentPropsWithoutRef<'div'> & {\n children: ReactNode;\n disabled?: boolean;\n};\n\nconst disabledStyle = css`\n color: ${({ theme }) => theme.color.grey500};\n`;\n\nconst LabelDescriptionComponent = styled.div<LabelDescriptionComponentProps>`\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-size: 14px;\n margin-bottom: ${({ theme }) => theme.spacing.space03};\n ${({ disabled }) => disabled && disabledStyle};\n`;\n\nexport const LabelDescription = ({\n children,\n disabled = false,\n ...otherProps\n}: LabelDescriptionProps): JSX.Element => (\n <LabelDescriptionComponent\n disabled={disabled}\n {...otherProps}\n >\n {children}\n </LabelDescriptionComponent>\n);\n\nLabelDescription.displayName = 'LabelDescription_VHS';\n","import type { ReactNode, ComponentPropsWithRef, Ref, ElementType, RefObject } from 'react';\nimport { forwardRef, useCallback } from 'react';\nimport { styled } from 'styled-components';\n\nexport type ClickAreaProps = ComponentPropsWithRef<'div'> & {\n /**\n * Supply an element or Component to render as the root compoennt (default is div)\n */\n renderAs?: ElementType;\n /**\n * The content within the clickarea\n */\n children: ReactNode;\n /**\n * If provided, this click event happens instead of the target ref's click event\n */\n onClick?: (event: Event) => void;\n /**\n * A ref to the element within chldren that will be used as the target of the click event\n * Should typically be a button or link\n */\n targetRef: RefObject<HTMLElement | null>;\n};\n\nconst ClickAreaComponent = styled.div`\n cursor: pointer;\n`;\n\n/**\n * ClickArea is useful when you want an entire element to be clickable, such as a card or an item in a list. Making the\n * entire element clickable provides a better click target for users, especially on mobile devices. The problem with this is\n * clickable divs are not accessible or tabbable. Using a `button` or `a` tag causes both styling and screenreader problems.\n *\n * To solve these issues, `ClickArea` maps a click event on the container element to a click event on a button or link within\n * it, via a ref. Assistive devices can utilize the target element and ignore the container element's click property.\n *\n * ClickArea also makes having interactive elements within the clickable container easier. For example, if you have a card element\n * that is clickable but with a \"close\" button in the top right, include `event.preventDefault()` in the close button's click handler\n * to prevent the container's click handler from firing.\n *\n */\nexport const ClickArea = forwardRef(\n (\n { renderAs = 'div', className, onClick, targetRef, ...props }: ClickAreaProps,\n ref: Ref<HTMLElement>,\n ) => {\n const handleClick = useCallback(\n (event: Event) => {\n const node = targetRef.current;\n if (node === null) {\n return;\n }\n\n if (event.defaultPrevented) {\n return;\n }\n\n // If we clicked `targetRef` or its descendants, call `onClick` and bubble.\n if (node.contains(event.target as Node)) {\n if (onClick) {\n onClick(event);\n }\n } else {\n // Otherwise, prevent bubbling, prevent default, and click the target.\n event.stopPropagation();\n event.preventDefault();\n node.focus();\n node.click();\n }\n },\n [onClick, targetRef],\n );\n return (\n <ClickAreaComponent\n ref={ref}\n as={renderAs}\n role=\"presentation\"\n {...props}\n onClick={handleClick}\n />\n );\n },\n);\n\nClickArea.displayName = 'ClickArea_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { CloseIcon } from './CloseIcon';\n\nconst Button = styled.button`\n align-items: center;\n background: none;\n border: none;\n color: ${({ theme }) => theme.color.grey700};\n cursor: pointer;\n display: flex;\n height: 42px;\n justify-content: center;\n pointer-events: auto;\n width: 42px;\n\n /* Normalize focus behavior of Firefox */\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n\n &:focus {\n outline: thin dotted ${({ theme }) => theme.color.grey500};\n }\n\n &:hover {\n color: ${({ theme }) => theme.color.grey900};\n }\n`;\n\nexport type CloseButtonProps = ComponentPropsWithoutRef<'button'> & {\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: () => void;\n};\n\nexport const CloseButton = ({ onClick, ...otherProps }: CloseButtonProps): JSX.Element => (\n <Button\n onClick={onClick}\n title=\"Close\"\n {...otherProps}\n >\n <CloseIcon />\n </Button>\n);\n\nCloseButton.displayName = 'CloseButton_VHS';\n","export const CloseIcon = () => (\n <svg\n height=\"22\"\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ display: 'block' }}\n viewBox=\"0 0 20 20\"\n width=\"22\"\n >\n <path\n d=\"M17 15.85289l-5.8533769-5.85435067L17 4.14710997 15.85289 3l-5.8514293 5.85240314L4.14710997 3 3 4.14710997l5.85240314 5.85240314L3 15.85289 4.14710997 17l5.85435073-5.8524031L15.8519163 17z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n);\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { useEffect, useLayoutEffect, useState, useId } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled, css } from 'styled-components';\nimport { darken } from 'polished';\nimport { isNil, isNonEmptyString, isNotUndefined } from '@wistia/type-guards';\nimport { useElementObserver } from '../../hooks/useElementObserver';\nimport { Icon } from '../Icon';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\n\nconst DARKENING_AMOUNT = 0.08;\nconst BAR_HEIGHT = 48;\nconst BUTTON_OFFSET = 16;\nconst CARET_SIZE = 16;\nconst PADDING_X = 16;\nconst TRANSITION_TIME = '0.2s';\nconst VARIANT_BRAND_BLUE = 'brandblue';\nconst CARET_DIRECTION_UP = 'up';\nconst CARET_DIRECTION_DOWN = 'down';\nconst CARET_DIRECTION_LEFT = 'left';\nconst CARET_DIRECTION_RIGHT = 'right';\n\nconst StyledCollapsibleGroup = styled.div`\n & + & {\n margin-top: ${({ theme }) => theme.spacing.space01};\n }\n`;\n\ntype ComputeBackgroundColorProps = {\n backgroundColor?: string | undefined;\n open: boolean;\n theme: DefaultTheme;\n variant?: typeof VARIANT_BRAND_BLUE | undefined;\n};\n\nconst computeBackgroundColor = ({\n backgroundColor,\n open,\n theme,\n variant,\n}: ComputeBackgroundColorProps): string => {\n const closedBgColor = backgroundColor ?? theme.color.grey100;\n const openBgColor = variant === VARIANT_BRAND_BLUE ? theme.color.brandBlue100 : closedBgColor;\n return open ? openBgColor : closedBgColor;\n};\n\ntype StyledControlWrapperProps = {\n $backgroundColor?: string | undefined;\n $open: boolean;\n theme: DefaultTheme;\n $variant?: typeof VARIANT_BRAND_BLUE | undefined;\n};\n\nconst StyledControlWrapper = styled.div<StyledControlWrapperProps>`\n align-items: center;\n background-color: ${({ theme, $backgroundColor, $open, $variant }) =>\n computeBackgroundColor({\n backgroundColor: $backgroundColor,\n open: $open,\n theme,\n variant: $variant,\n })};\n color: ${({ $open, theme }) => ($open ? theme.color.brandBlue600 : theme.color.grey900)};\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n min-height: ${BAR_HEIGHT}px;\n padding-right: ${PADDING_X}px;\n\n &:hover {\n background-color: ${({ theme, $backgroundColor, $open, $variant }) =>\n darken(\n DARKENING_AMOUNT,\n computeBackgroundColor({\n backgroundColor: $backgroundColor,\n open: $open,\n theme,\n variant: $variant,\n }),\n )};\n }\n`;\n\ntype CaretProps = {\n $isOpen: boolean;\n $variant?: string | undefined;\n $direction:\n | typeof CARET_DIRECTION_DOWN\n | typeof CARET_DIRECTION_LEFT\n | typeof CARET_DIRECTION_RIGHT\n | typeof CARET_DIRECTION_UP;\n $layout: 'leading' | 'trailing';\n};\n\nconst Caret = styled.span<CaretProps>`\n color: ${({ $isOpen, theme, $variant }) =>\n $isOpen && $variant === VARIANT_BRAND_BLUE ? theme.color.brandBlue600 : theme.color.grey500};\n display: inline-flex;\n height: ${CARET_SIZE}px;\n transform: rotate(\n ${({ $direction }) => {\n switch ($direction) {\n case CARET_DIRECTION_UP:\n return '-180deg';\n case CARET_DIRECTION_DOWN:\n return '0deg';\n case CARET_DIRECTION_LEFT:\n return '90deg';\n case CARET_DIRECTION_RIGHT:\n return '-90deg';\n default:\n return '0deg';\n }\n }}\n );\n transition: transform ${TRANSITION_TIME} ease-out;\n width: ${CARET_SIZE}px;\n\n > svg {\n height: 100%;\n width: 100%;\n }\n`;\n\ntype CssStyleType = ReturnType<typeof css>;\n\nconst showOnHoverStyles = (): CssStyleType => css`\n opacity: 0;\n transition: opacity ${TRANSITION_TIME} ease-out;\n\n ${StyledControlWrapper}:hover &,\n ${StyledControlWrapper}:focus &,\n ${StyledControlWrapper}:focus-within & {\n opacity: 1;\n }\n`;\n\ntype StyledLabelProps = ComponentPropsWithoutRef<'label'> & {\n $open: boolean;\n $styleVariant: string | undefined;\n};\n\nconst StyledLabel = styled(Text)<StyledLabelProps>`\n /*\n * This should be able to support an input field when used to rename itself\n */\n\n color: ${({ $open, theme, $styleVariant }) =>\n $open && $styleVariant === VARIANT_BRAND_BLUE ? theme.color.brandBlue600 : null};\n line-height: ${BAR_HEIGHT}px;\n margin: 0 auto 0 ${BUTTON_OFFSET}px;\n user-select: none;\n width: 100%;\n`;\n\ntype StyledContentProps = {\n $backgroundColor: string | undefined;\n $isOpen: boolean;\n $contentPadding: string | null | undefined;\n $showTransition: boolean;\n $height: number | undefined;\n $maxHeight: number | undefined;\n $variant?: typeof VARIANT_BRAND_BLUE | undefined;\n};\n\nconst StyledContent = styled.div<StyledContentProps>`\n background-color: ${({ $backgroundColor }) => $backgroundColor};\n overflow: ${({ $isOpen }) => ($isOpen ? 'visible' : 'hidden')};\n padding: ${({ $contentPadding }) => $contentPadding ?? 0};\n transition: ${({ $showTransition }) =>\n $showTransition ? `height ${TRANSITION_TIME} ease-out` : undefined};\n visibility: ${({ $isOpen }) => ($isOpen ? 'visible' : 'hidden')};\n ${({ $height, $isOpen }) =>\n isNotUndefined($height) &&\n Number.isFinite($height) &&\n `\n height: ${$isOpen ? $height : 0}px;\n `};\n ${({ $maxHeight }) =>\n isNotUndefined($maxHeight) &&\n Number.isFinite($maxHeight) &&\n `\n max-height: ${$maxHeight}px;\n `};\n`;\n\ntype CaretButtonProps = ComponentPropsWithoutRef<'button'> & {\n $layout: 'leading' | 'trailing';\n};\n\nconst CaretButton = styled(Button)<CaretButtonProps>`\n height: 24px;\n margin-left: ${BUTTON_OFFSET}px;\n order: ${({ $layout }) => ($layout === 'leading' ? -1 : 1)};\n width: 24px;\n\n &:focus {\n outline: 1px dashed ${({ theme }) => theme.color.grey500};\n }\n`;\n\ntype StyledActionControlProps = {\n $showActionsOnHover: boolean;\n};\n\nconst StyledActionControl = styled.span<StyledActionControlProps>`\n ${({ $showActionsOnHover }) => $showActionsOnHover && showOnHoverStyles()};\n align-items: center;\n display: inline-flex;\n flex-shrink: 0;\n justify-content: center;\n margin-right: -${PADDING_X}px;\n min-height: ${BAR_HEIGHT}px;\n width: ${BAR_HEIGHT}px;\n\n > * {\n flex-shrink: 0;\n min-width: 0;\n }\n`;\n\ntype ActionControlProps = {\n children: ReactNode;\n showActionsOnHover: boolean;\n};\nconst ActionControl = ({ children, showActionsOnHover }: ActionControlProps) => {\n if (isNil(children)) {\n return null;\n }\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <StyledActionControl\n $showActionsOnHover={showActionsOnHover}\n onClick={(event) => {\n event.stopPropagation();\n }}\n >\n {children}\n </StyledActionControl>\n );\n};\n\nexport type CollapsibleGroupProps = {\n /**\n * Slot for adjacent options\n */\n actions?: ReactNode;\n /**\n * Custom background color\n */\n backgroundColor?: string;\n /**\n * Custom direction of the caret when open or closed\n */\n caretDirection?: {\n closed:\n | typeof CARET_DIRECTION_DOWN\n | typeof CARET_DIRECTION_LEFT\n | typeof CARET_DIRECTION_RIGHT\n | typeof CARET_DIRECTION_UP;\n open:\n | typeof CARET_DIRECTION_DOWN\n | typeof CARET_DIRECTION_LEFT\n | typeof CARET_DIRECTION_RIGHT\n | typeof CARET_DIRECTION_UP;\n };\n /**\n * Toggleable contents\n */\n children?: ReactNode;\n /**\n * Optional CSS padding to be applied to the content container\n */\n contentPadding?: string | null;\n /**\n * The control has a caret by default. Set this to true to suppress the caret\n */\n hideCaret?: boolean;\n /**\n * Optional ID attribute\n */\n id?: string;\n /**\n * Control the initial open state. If not provided, the default is to start closed.\n */\n isOpen?: boolean;\n /**\n * Clickable text label for the control, or perhaps an inline editable\n * control? Whatever suits you */\n label?: ReactNode | (({ open, caret }: { open: boolean; caret: JSX.Element }) => ReactNode);\n /**\n * Choose on which side the caret shows\n */\n layout?: 'leading' | 'trailing';\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: () => unknown;\n /**\n * Callback function invoked when the open state changes\n */\n onOpenChange?: (newOpen: boolean) => unknown;\n /**\n * Extra actions are hidden by default and shown on hover. Set this to false\n * to make always visible\n */\n showActionsOnHover?: boolean;\n /**\n * Display the open / close transition animation\n */\n showTransition?: boolean;\n /**\n * Changes the styling of the collapsible group banner when active\n */\n variant?: typeof VARIANT_BRAND_BLUE;\n};\n\ntype DimensionType = {\n height: number | undefined;\n width: number | undefined;\n};\n\nexport const CollapsibleGroup = ({\n actions,\n backgroundColor,\n caretDirection = { open: CARET_DIRECTION_DOWN, closed: CARET_DIRECTION_RIGHT },\n children = null,\n contentPadding = null,\n hideCaret = false,\n id,\n isOpen,\n label,\n layout = 'leading',\n onOpenChange,\n showActionsOnHover = true,\n showTransition = false,\n variant,\n ...otherProps\n}: CollapsibleGroupProps) => {\n const [open, setOpen] = useState(isOpen ?? false);\n const [dimensions, setDimensions] = useState<DimensionType>({\n width: undefined,\n height: undefined,\n });\n const [wasEditingOnMouseDown, setWasEditingOnMouseDown] = useState(false);\n const [targetRef, targetBox] = useElementObserver<HTMLDivElement>();\n const caretDirectionOpen = caretDirection.open;\n const caretDirectionClosed = caretDirection.closed;\n const generatedId = useId();\n const computedId = isNonEmptyString(id) ? id : `vhs-collapsible-group-${generatedId}`;\n\n useEffect(() => {\n setDimensions({\n height: targetBox.height,\n width: targetBox.width,\n });\n }, [targetBox]);\n\n useEffect(() => {\n if (isOpen !== undefined) {\n setOpen(isOpen);\n }\n }, [isOpen]);\n\n useLayoutEffect(() => {\n if (!targetRef.current) {\n return;\n }\n\n setDimensions({\n height: targetRef.current.offsetHeight,\n width: targetRef.current.offsetWidth,\n });\n }, [targetRef]);\n\n const onClick = () => {\n if (wasEditingOnMouseDown) {\n setWasEditingOnMouseDown(false);\n return;\n }\n\n const newOpen = !open;\n\n setOpen(newOpen);\n\n if (onOpenChange) {\n onOpenChange(newOpen);\n }\n };\n\n const caret = (\n <CaretButton\n $layout={layout}\n aria-expanded={open}\n aria-labelledby={computedId}\n noStyle={true}\n onClick={onClick}\n >\n <Caret\n $direction={open ? caretDirectionOpen : caretDirectionClosed}\n $isOpen={open}\n $layout={layout}\n $variant={variant}\n >\n <Icon type=\"caret-down\" />\n </Caret>\n </CaretButton>\n );\n\n return (\n <StyledCollapsibleGroup {...otherProps}>\n {/* eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions */}\n <StyledControlWrapper\n $backgroundColor={backgroundColor}\n $open={open}\n $variant={variant}\n onClick={onClick}\n >\n <StyledLabel\n $open={open}\n $styleVariant={variant}\n id={computedId}\n renderAs=\"div\"\n variant=\"subtitle1\"\n >\n {typeof label === 'function' ? label({ open, caret }) : label}\n </StyledLabel>\n {!hideCaret && caret}\n <ActionControl showActionsOnHover={showActionsOnHover}>{actions}</ActionControl>\n </StyledControlWrapper>\n <StyledContent\n $backgroundColor={backgroundColor}\n $contentPadding={contentPadding}\n $height={dimensions.height}\n $isOpen={open}\n $maxHeight={dimensions.height}\n $showTransition={showTransition}\n $variant={variant}\n data-testid=\"collapsible-group-content\"\n >\n <div\n ref={targetRef}\n style={{ width: '100%', display: 'inline-block' }}\n >\n {children}\n </div>\n </StyledContent>\n </StyledCollapsibleGroup>\n );\n};\n\nCollapsibleGroup.displayName = 'CollapsibleGroup_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\nexport type DividerComponentProps = {\n $borderHeight: number;\n $fillColor: string;\n $variant: string;\n};\n\nexport type DividerProps = ComponentPropsWithoutRef<'hr'> & {\n /**\n * Allows user to override default divider color\n */\n colorOverride?: string;\n /**\n * Height (in pixels) of divider\n */\n height?: number;\n /**\n * The visual type of divider to display\n */\n variant?: 'dashed' | 'solid';\n};\n\nconst DividerComponent = styled.hr<DividerComponentProps>`\n background: none;\n border-bottom: none;\n border-left: none;\n border-right: none;\n border-top-color: ${({ $fillColor }) => $fillColor};\n border-top-style: ${({ $variant }) => $variant};\n border-top-width: ${({ $borderHeight }) => `${$borderHeight}px`};\n clear: both;\n height: 0;\n line-height: 0;\n margin: 0;\n`;\n\nexport const Divider = ({\n colorOverride = undefined,\n height = 1,\n variant = 'dashed',\n ...otherProps\n}: DividerProps): JSX.Element => {\n const defaultFillColor: string = useThemeColor('grey300');\n const fillColor: string = colorOverride ?? defaultFillColor;\n\n return (\n <DividerComponent\n $borderHeight={height}\n $fillColor={fillColor}\n $variant={variant}\n {...otherProps}\n />\n );\n};\n\nDivider.displayName = 'Divider_VHS';\n","import type { ChangeEvent, ComponentPropsWithoutRef, ReactNode, Ref, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\n\n// default maximum file size is 26gb (one gig more than Vimeo's limit)\nconst maxFileSizeInGigs = 26;\n// 26gb, see https://wistia.slack.com/archives/CSQPJV9PE/p1618499722090100 for discussion\nconst defaultMaximumFileSize = maxFileSizeInGigs * 1024;\n\n// in order to customize a file-upload input we use this wrapper\n// around an arbitrary child element (button, icon, link, etc.)\n\ntype FileSelectComponentProps = ComponentPropsWithoutRef<'label'> & {\n $disabled: boolean;\n 'aria-controls': string;\n};\nconst FileSelectComponent = styled.label<FileSelectComponentProps>`\n display: inline-block;\n overflow: hidden;\n position: relative;\n\n /* capture clicks with a large positioned file input with 0 opacity */\n input[type='file'] {\n &::-webkit-file-upload-button {\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n }\n\n bottom: 0;\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n font-size: 10rem;\n left: 0;\n opacity: 0;\n position: absolute;\n right: 0;\n top: 0;\n }\n`;\n\nexport type FileSelectProps = {\n /**\n * Allowlist of file types that the server will accept\n * (see: <a href=\"https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-accept\">file input docs</a>)\n */\n accept: string;\n /**\n * Pass an arbitrary child node\n */\n children: ReactNode;\n /**\n * Disable the input. <em>Note: Does not \"disable\" the child component, only the hidden input</em>\n */\n disabled?: boolean;\n /**\n * ID of the input\n */\n id: string;\n /**\n * File size limit specified in MB\n */\n maxSize?: number;\n /**\n * Allow multiple files to be selected\n */\n multiple?: boolean;\n /**\n * Name of the input\n */\n name?: string;\n /**\n * Callback invoked when file has been selected\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Callback invoked when the file input is clicked (before the file has been selected)\n */\n onClick?: (...args: unknown[]) => unknown;\n /**\n * Callback invoked when there is an error selecting file(s)\n */\n onError?: (error: Error) => void;\n};\n\nexport const FileSelect = forwardRef(\n (\n {\n accept,\n children,\n disabled = false,\n id,\n maxSize = defaultMaximumFileSize,\n multiple = false,\n name = 'file-upload',\n onClick,\n onChange,\n onError,\n ...otherProps\n }: FileSelectProps,\n ref: Ref<HTMLInputElement> | undefined,\n ): JSX.Element => {\n const handleOnChange = (event: ChangeEvent<HTMLInputElement>) => {\n const { files } = event.target as HTMLInputElement;\n\n if (maxSize && files) {\n const maxSizeInBytes = maxSize * 1024 * 1024;\n const inputFiles = Array.from(files);\n\n if (inputFiles.some((file) => file.size > maxSizeInBytes)) {\n if (onError) {\n onError(new Error(`File not accepted. Please choose a file under ${maxSize}MB.`));\n }\n return false;\n }\n }\n if (onChange) {\n onChange(event);\n }\n return true;\n };\n\n return (\n <FileSelectComponent\n $disabled={disabled}\n aria-controls=\"filename\"\n htmlFor={id}\n {...otherProps}\n >\n {children}\n <input\n ref={ref}\n accept={accept}\n data-testid=\"file-select-input\"\n disabled={disabled}\n id={id}\n multiple={multiple}\n name={name}\n onChange={handleOnChange}\n onClick={onClick}\n tabIndex={-1}\n type=\"file\"\n />\n </FileSelectComponent>\n );\n },\n);\n\nFileSelect.displayName = 'FileSelect_VHS';\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport type { ForwardedRef, ReactNode, RefObject, JSX, Ref } from 'react';\nimport type { FormikProps, FormikHelpers, FormikErrors } from 'formik';\nimport { useState, useEffect } from 'react';\nimport { Formik, Form as FormikForm } from 'formik';\nimport { isNotNil, isNotUndefined, isUndefined } from '@wistia/type-guards';\nimport { FormGlobalError } from '../FormGlobalError';\nimport { useToast } from '../Toast';\nimport { useDebounce } from '../../private/hooks/useDebounce';\n\ntype ValuesType = Record<string, unknown>;\n\nconst didValuesChange = (newValues: ValuesType, oldValues: ValuesType) =>\n JSON.stringify(newValues) !== JSON.stringify(oldValues);\n\nconst handleInitialValues = (\n initialValues: ValuesType,\n validationSchema: ValidationSchemaType | undefined,\n) => {\n const filteredInitialValues: Record<string, unknown> = {};\n\n Object.keys(initialValues).forEach((key) => {\n if (initialValues[key] === null) {\n if (\n isNotUndefined(validationSchema) &&\n isNotUndefined(validationSchema.fields) &&\n isNotUndefined(validationSchema.fields[key]) &&\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (validationSchema.fields[key] as any)._type === 'boolean' // eslint-disable-line no-underscore-dangle\n ) {\n // set booleans to false (null is falsy)\n filteredInitialValues[key] = false;\n } else {\n // change null (from DB) to undefined (for form fields)\n filteredInitialValues[key] = undefined;\n }\n } else {\n // otherwise keep the existing value\n filteredInitialValues[key] = initialValues[key];\n }\n });\n\n return filteredInitialValues;\n};\n\nexport type Values = Record<string, unknown>;\n\nexport type FormState = FormikProps<Values>;\n\nexport type FormProps = {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Class(es) to be applied to formik container\n */\n className?: string;\n /**\n * Unique ID for Form, used for React Testing Library\n */\n formId: string;\n /**\n * Ref required to be ref of FormGlobalError. Simply assign `const globalErrorRef = useRef(null)`. Either a function or the instance of a DOM native element.\n */\n globalErrorRef: RefObject<HTMLElement | null | undefined>;\n /**\n * Form input values on initial load, often populated from server\n */\n initialValues: ValuesType;\n /**\n * Ref to access the form's state and API\n */\n innerRef?: Ref<FormState>;\n /**\n * On-submit callback\n */\n onSubmit: (values: Record<string, unknown>, ref: FormikHelpers<Values>) => unknown;\n /**\n * On form submission with errors (isValid=false), scroll to GlobalError section\n */\n scrollToFormErrorsOnSubmit?: boolean;\n /**\n * On-validate callback, params include values, and the rest of the form state params available in [Formik](https://jaredpalmer.com/formik/docs/api/formik#props-1)\n */\n shareFormContext?: (props: FormikProps<Values>) => unknown;\n /**\n * Show a top-level rundown of all the errors in the form\n */\n showGlobalError?: boolean;\n /**\n * Style object applied to Form component\n */\n style?: Record<string, string>;\n /**\n * Should form submit when an input's onChange is invoked?\n */\n submitOnChange?: boolean;\n /**\n * Validate function passed to formik\n */\n // eslint-disable-next-line @typescript-eslint/no-invalid-void-type -- match Formik's validate type\n validate?: (values: Values) => Promise<FormikErrors<Values>> | object | void;\n /**\n * Should form run validate function on form blur?\n */\n validateOnBlur?: boolean;\n /**\n * Should form run validate function on form change?\n */\n validateOnChange?: boolean;\n /**\n * __[`yup` schema](https://github.com/jquense/yup#yup)__\n */\n validationSchema?: ValidationSchemaType;\n};\n\ntype ValidationSchemaType = {\n fields: Record<string, unknown>;\n};\n\nexport const Form = ({\n children,\n className,\n formId,\n initialValues,\n onSubmit,\n scrollToFormErrorsOnSubmit = true,\n shareFormContext,\n style,\n submitOnChange = false,\n validate,\n validateOnBlur = false,\n validateOnChange = false,\n validationSchema,\n globalErrorRef,\n showGlobalError = true,\n innerRef,\n}: FormProps) => {\n // On invalid form submission, scroll to global errors section\n const [isSubmitting, setIsSubmitting] = useState<boolean | undefined>();\n const [isValid, setIsValid] = useState<boolean | undefined>();\n const [errorCount, setErrorCount] = useState<number>(0);\n const showToast = useToast();\n\n // (values: Values, formikHelpers: FormikHelpers<Values>) => void | Promise<any>\n\n const handleSubmit = (values: ValuesType, ref: FormikHelpers<Values>) => {\n const filteredValues: Record<string, unknown> = {};\n\n // filter/coerce the values to be submitted uniformly\n Object.keys(values).forEach((key) => {\n const keyValue = values[key];\n const isStringType =\n isNotUndefined(validationSchema) &&\n isNotUndefined(validationSchema.fields[key]) &&\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (validationSchema.fields[key] as any)._type === 'string'; // eslint-disable-line no-underscore-dangle\n\n if (keyValue === null || keyValue === undefined) {\n filteredValues[key] = null;\n return;\n }\n\n if (typeof keyValue === 'number') {\n // Catch numbers before !keyValue catches the 0 case\n filteredValues[key] = keyValue;\n return;\n }\n\n if (keyValue === false) {\n // Can't say !keyValue because that'd include empty strings.\n // `false` must remain as `false`, not fall into undefined group.\n filteredValues[key] = false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions -- TS is narrowing any to be only an empty {} here\n if (isStringType && !keyValue) {\n // Handle empty strings\n filteredValues[key] = null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/strict-boolean-expressions -- TS is narrowing any to be only an empty {} here\n if (keyValue) {\n // @ts-expect-error -- TS is narrowing any to be only an empty {} here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n filteredValues[key] = isStringType ? keyValue.trim() : keyValue;\n }\n });\n\n onSubmit(filteredValues, ref);\n };\n\n // current?.scrollIntoView conditional check required for unit test\n const shouldScrollToFormErrorsOnSubmit =\n scrollToFormErrorsOnSubmit &&\n (isUndefined(isSubmitting) || !isSubmitting) &&\n (isUndefined(isValid) || !isValid) &&\n // eslint-disable-next-line @typescript-eslint/unbound-method\n isNotUndefined(globalErrorRef.current?.scrollIntoView);\n\n useEffect(() => {\n const formElement = document.querySelector(`form[data-testid=\"${formId}\"]`);\n if (\n (isUndefined(isSubmitting) || !isSubmitting) &&\n isNotUndefined(isValid) &&\n isValid &&\n formElement?.contains(document.activeElement)\n ) {\n /*\n * blur on valid submission\n *\n * Don't leave focus on any elements. A submitted form is dirty=false, but\n * if the focus is still on an input whose value will be coerced (ie.\n * <input type=\"number\" />), and then clicking away from the page via navigation\n * or refresh causes the form to then go \"dirty\".\n *\n * A future alternative if scrolling to the top of the page is ok:\n * document.activeElement = \"#top\"\n *\n */\n (document.activeElement as HTMLElement).blur();\n }\n\n if (shouldScrollToFormErrorsOnSubmit) {\n const errorMessage = errorCount > 1 ? `there are ${errorCount} errors` : \"there's an error!\";\n showToast({\n variant: 'error',\n message: `Uh oh, ${errorMessage}`,\n });\n\n if (globalErrorRef.current) {\n globalErrorRef.current.scrollIntoView({ behavior: 'smooth' });\n }\n }\n }, [\n errorCount,\n globalErrorRef,\n isSubmitting,\n isValid,\n shouldScrollToFormErrorsOnSubmit,\n showToast,\n formId,\n ]);\n\n const configuredInitialValues = handleInitialValues(initialValues, validationSchema);\n const debounceDelay = 750;\n\n return (\n <Formik\n enableReinitialize={true}\n initialValues={configuredInitialValues}\n innerRef={isNotNil(innerRef) ? innerRef : () => {}} // eslint-disable-line @typescript-eslint/no-empty-function\n onSubmit={handleSubmit}\n validate={isNotNil(validate) ? validate : () => {}} // eslint-disable-line @typescript-eslint/no-empty-function\n validateOnBlur={validateOnBlur}\n validateOnChange={validateOnChange}\n validationSchema={validationSchema}\n >\n {(props: FormikProps<Values>): JSX.Element => {\n const [values, setValues] = useState(props.values);\n\n useEffect(() => {\n if (isNotUndefined(shareFormContext)) {\n shareFormContext(props);\n }\n setIsSubmitting(props.isSubmitting);\n setIsValid(props.isValid);\n setErrorCount(Object.keys(props.errors).length);\n\n if (submitOnChange && didValuesChange(props.values, values)) {\n setValues(props.values);\n }\n }, [props, values]);\n\n if (submitOnChange) {\n const [,] = useDebounce(\n () => {\n if (didValuesChange(initialValues, values)) {\n void props.submitForm();\n }\n },\n\n debounceDelay,\n [values],\n );\n }\n\n return (\n <FormikForm\n className={className}\n data-testid={formId}\n noValidate={true}\n style={style}\n >\n {showGlobalError ? (\n <FormGlobalError ref={globalErrorRef as ForwardedRef<HTMLDivElement>} />\n ) : null}\n {children}\n </FormikForm>\n );\n }}\n </Formik>\n );\n};\n\nForm.displayName = 'Form_VHS';\n","import type { ForwardedRef } from 'react';\nimport { forwardRef } from 'react';\nimport type { FormikErrors } from 'formik';\nimport { useFormikContext } from 'formik';\nimport { styled } from 'styled-components';\nimport { isNonEmptyString, isNotNil } from '@wistia/type-guards';\nimport { coerceToBoolean } from '../../helpers/stringHelpers/coerceToBoolean';\n\nconst GlobalErrorsContainer = styled.div`\n border-left: 4px solid;\n border-left-color: ${({ theme }) => theme.color.error500};\n margin-bottom: ${({ theme }) => theme.spacing.space07};\n padding-left: ${({ theme }) => theme.spacing.space02};\n`;\n\nconst ErrorsText = styled.p`\n font-size: 16px;\n font-weight: 500;\n line-height: 1.5;\n margin-bottom: ${({ theme }) => theme.spacing.space02};\n`;\n\nconst ErrorOrderedList = styled.ol`\n list-style: none;\n margin: 0;\n padding-left: 0;\n`;\n\nconst ErrorText = styled.span`\n color: ${({ theme }) => theme.color.error600};\n line-height: 1.5;\n`;\n\nconst ErrorLink = styled(ErrorText)`\n cursor: pointer;\n text-decoration: underline;\n`;\n\nconst errorsTitle = (count: number) => {\n let errorText = 'error';\n if (count > 1) {\n errorText += 's';\n }\n\n return `${count} ${errorText} found on page`;\n};\n\nconst scrollToField = (fieldName: string) => {\n const globalErrorElement = document.getElementById(`fieldset-${fieldName}`);\n globalErrorElement?.scrollIntoView({ behavior: 'smooth' });\n};\n\ntype FieldErrorsListProps = {\n errors?: Record<string, string>;\n statusError?: string | undefined;\n};\n\nconst FieldErrorsList = ({ errors = {}, statusError }: FieldErrorsListProps) => (\n <ErrorOrderedList>\n {isNonEmptyString(statusError) ? <ErrorText>{statusError}</ErrorText> : null}\n {Object.keys(errors).map((field) => (\n <li key={field}>\n {/* eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions */}\n <ErrorLink\n data-testid={`form-global-error-${field}`}\n onClick={(event) => {\n event.preventDefault();\n scrollToField(field);\n }}\n >\n {errors[field]}\n </ErrorLink>\n </li>\n ))}\n </ErrorOrderedList>\n);\n\ntype FormGlobalErrorValues = {\n status?: Record<string, unknown>;\n errors: FormikErrors<FormGlobalErrorValues>;\n};\n\nexport const FormGlobalError = forwardRef((_, ref: ForwardedRef<HTMLDivElement>) => {\n const formikContext = useFormikContext<FormGlobalErrorValues>();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Any is set by Formik\n const { status, errors }: FormGlobalErrorValues = formikContext;\n\n let errorsCount = Object.keys(errors).length;\n if (isNotNil(status) && (status['length'] as number) > 0) {\n errorsCount += 1;\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n const showErrorContainer = (isNotNil(status) && !status['success']) || errorsCount;\n\n if (coerceToBoolean(showErrorContainer)) {\n return (\n <GlobalErrorsContainer ref={ref}>\n <ErrorsText>{errorsTitle(errorsCount)}</ErrorsText>\n <FieldErrorsList\n errors={errors as Record<string, string>} // From Formik regarding errors type: Should always be an object of strings, but any is allowed to support i18n libraries.\n statusError={status as unknown as string} // TODO: Revisit this after the TS conversion. RM.\n />\n </GlobalErrorsContainer>\n );\n }\n\n return null;\n});\n\nFormGlobalError.displayName = 'FormGlobalError_VHS';\n","import { useContext } from 'react';\nimport { ToastContext } from './ToastContext';\n\nexport const useToast = () => useContext(ToastContext);\n","import type { DependencyList } from 'react';\nimport { useEffect } from 'react';\nimport { useTimeoutFunc } from '../useTimeoutFunc';\n\nexport type UseDebounceReturn = [() => boolean | null, () => void];\n\nexport const useDebounce = (\n func: () => void,\n timeout = 0,\n dependencies: DependencyList = [],\n): UseDebounceReturn => {\n const [isReady, cancel, reset] = useTimeoutFunc(func, timeout);\n\n useEffect(reset, dependencies); // eslint-disable-line react-hooks/exhaustive-deps\n\n return [isReady, cancel];\n};\n","import { useCallback, useEffect, useRef } from 'react';\n\nexport type UseTimeoutFnReturn = [() => boolean | null, () => void, () => void];\n\nexport const useTimeoutFunc = (func: () => void, timeout = 0): UseTimeoutFnReturn => {\n const readyRef = useRef<boolean | null>(false);\n const timeoutRef = useRef<ReturnType<typeof setTimeout>>(undefined);\n const callbackRef = useRef(func);\n const isReady = useCallback(() => readyRef.current, []);\n\n const set = useCallback(() => {\n readyRef.current = false;\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n timeoutRef.current = setTimeout(() => {\n readyRef.current = true;\n callbackRef.current();\n }, timeout);\n }, [timeout]);\n\n const clear = useCallback(() => {\n readyRef.current = null;\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n }, []);\n\n // update ref when func changes\n useEffect(() => {\n callbackRef.current = func;\n }, [func]);\n\n // set on mount & clear on unmount\n useEffect(() => {\n set();\n\n return clear;\n }, [timeout]); // eslint-disable-line react-hooks/exhaustive-deps\n\n return [isReady, clear, set];\n};\n","import type { MouseEvent, JSX } from 'react';\nimport { useFormikContext } from 'formik';\nimport { ButtonGroup } from '../ButtonGroup';\nimport { FormConnectorButton } from '../../private/components/FormConnectorButton';\n\n// This fixes a bug that prevented single clicks from registering\n// https://github.com/formium/formik/issues/1796#issuecomment-606643671\nconst handleMouseDown = (event: MouseEvent) => event.preventDefault();\n\ntype ButtonsType = {\n [key: string]: unknown;\n name: string;\n type?: 'button' | 'reset' | 'submit' | undefined;\n};\n\nexport type FormButtonsProps = {\n /**\n * Align button left (typically on a page) or right (typically on a modal).\n */\n align?: 'left' | 'right';\n /**\n * Each button object must have a name, but can also be passed any props that apply to a Button component.\n */\n buttons: ButtonsType[];\n};\n\nexport const FormButtons = ({\n buttons,\n align = 'left',\n ...props\n}: FormButtonsProps): JSX.Element => {\n const { isSubmitting } = useFormikContext();\n\n return (\n <ButtonGroup\n align={align}\n {...props}\n >\n {buttons.map(({ name, type, ...buttonProps }) => (\n <FormConnectorButton\n key={name}\n isSubmitting={isSubmitting}\n type={type}\n {...buttonProps}\n onMouseDown={handleMouseDown}\n >\n {name}\n </FormConnectorButton>\n ))}\n </ButtonGroup>\n );\n};\n\nFormButtons.displayName = 'FormButtons_VHS';\n","import type { ComponentPropsWithRef, MouseEvent, ReactNode } from 'react';\nimport { Button } from '../../../components/Button';\n\n// type FormConnectorButtonProps = Omit<ComponentPropsWithoutRef<'button'>, 'onClick'> & {\ntype FormConnectorButtonProps = ComponentPropsWithRef<'button'> & {\n children: ReactNode;\n disabled?: boolean;\n onClick?: ((event: MouseEvent) => void) | undefined;\n isSubmitting?: boolean;\n type?: 'button' | 'reset' | 'submit' | undefined;\n};\n\nexport const FormConnectorButton = ({\n type = 'submit',\n isSubmitting = false,\n children,\n disabled = false,\n ...props\n}: FormConnectorButtonProps) => {\n const isDisabled = isSubmitting || disabled;\n\n return (\n <Button\n disabled={isDisabled}\n type={type}\n {...props}\n >\n {children}\n </Button>\n );\n};\n\nFormConnectorButton.displayName = 'FormConnectorButton';\n","import type { ComponentPropsWithRef, ReactNode, JSX, ComponentClass, ComponentProps } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\nimport { Field } from 'formik';\nimport { inputTypeMap } from './inputTypeMap';\nimport { FormConnectorCheckboxGroup } from '../../private/components/FormConnectorCheckboxGroup';\nimport type { CustomComponentClass } from '../../private/components/FormConnectorCustomField';\nimport { FormConnectorCustomField } from '../../private/components/FormConnectorCustomField';\nimport { FormConnectorInput } from '../../private/components/FormConnectorInput';\nimport { FormConnectorRadioGroup } from '../../private/components/FormConnectorRadioGroup';\nimport { FormConnectorSelect } from '../../private/components/FormConnectorSelect';\nimport { FormConnectorHidden } from '../../private/components/FormConnectorHidden';\nimport { FormConnectorRichTextEditor } from '../../private/components/FormConnectorRichTextEditor';\nimport type { rteFormatTypes } from '../RichTextEditor/utilities';\n\nconst FormFieldSet = styled.fieldset`\n border: 0;\n flex-grow: 1;\n margin: ${({ theme }) => `0 0 ${theme.spacing.space05}`};\n min-width: 0;\n padding: 0;\n\n &[disabled] {\n label {\n pointer-events: none;\n }\n }\n`;\n\ntype FieldWrapperProps = {\n $resize: 'horizontal' | 'none' | 'vertical';\n};\nconst FieldWrapper = styled(Field)<FieldWrapperProps>`\n resize: ${({ $resize }) => $resize as string};\n`;\n\nexport type FormFieldProps = Omit<ComponentPropsWithRef<'input'>, 'placeholder'> & {\n /**\n * A custom component that acts as a field and that needs access to Formik fields\n */\n customComponent?:\n | ComponentClass<CustomComponentClass>\n | ((arg?: ComponentProps<typeof Field>) => ReactNode)\n | ((arg?: Record<string, unknown>) => ReactNode)\n | undefined;\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables form field\n */\n disabled?: boolean;\n /**\n * Only takes effect if type is richTextEditor. An array of formats that should be enabled in the toolbar.\n */\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n /**\n * Visual label above the input\n */\n label?: JSX.Element | string | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * HTML \"name\" attribute. Also needs to be unique in the form\n */\n name?: string;\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (value: string) => unknown;\n /**\n * Options passed down to the `<Field>` component\n */\n options?: Record<string, unknown>[];\n /**\n * Input's visual placeholder text\n */\n placeholder?: string | null | undefined;\n /**\n * Allows user to vertically or horizontally resize the form field, or to disable resizing altogether\n */\n resize?: 'horizontal' | 'none' | 'vertical';\n /**\n * The type of the field sets the type of input or select, texarea, radio, checkbox, etc.\n */\n type:\n | 'checkbox'\n | 'custom'\n | 'email'\n | 'hidden'\n | 'multiline'\n | 'number'\n | 'password'\n | 'radio'\n | 'richTextEditor'\n | 'select'\n | 'text'\n | 'url';\n};\n\nconst fieldsMap = {\n FormConnectorCheckboxGroup,\n FormConnectorCustomField,\n FormConnectorInput,\n FormConnectorRadioGroup,\n FormConnectorSelect,\n FormConnectorHidden,\n FormConnectorRichTextEditor,\n};\n\nexport const FormField = forwardRef(\n (\n {\n resize = 'vertical',\n customComponent,\n direction = 'column',\n disabled = false,\n label,\n labelDescription,\n labelProps = {},\n name = '',\n onChangeCustom,\n options,\n placeholder = null,\n type = 'text',\n ...otherProps\n }: FormFieldProps,\n ref,\n ) => (\n <FormFieldSet\n disabled={disabled}\n id={`fieldset-${name}`}\n >\n <FieldWrapper\n $resize={resize}\n component={\n fieldsMap[\n inputTypeMap[type as keyof typeof inputTypeMap].component as keyof typeof fieldsMap\n ]\n }\n customComponent={customComponent}\n direction={direction}\n disabled={disabled}\n id={`field-${name}`}\n innerRef={ref}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n onChangeCustom={onChangeCustom}\n options={options}\n placeholder={placeholder}\n type={type}\n {...otherProps}\n />\n </FormFieldSet>\n ),\n);\n\nFormField.displayName = 'FormField_VHS';\n","// @component - Component used to render this <FormInput/> component's type\n// @inputType - \"<input />\" type attribute inserted into <Input/> component\n\nexport const inputTypeMap = {\n checkbox: {\n component: 'FormConnectorCheckboxGroup',\n inputType: null,\n },\n custom: {\n component: 'FormConnectorCustomField',\n inputType: null,\n },\n email: {\n component: 'FormConnectorInput',\n inputType: 'email',\n },\n hidden: {\n component: 'FormConnectorHidden',\n inputType: 'hidden',\n },\n multiline: {\n component: 'FormConnectorInput',\n inputType: null, // we render as `textarea` so no type needed\n },\n number: {\n component: 'FormConnectorInput',\n inputType: 'number',\n },\n password: {\n component: 'FormConnectorInput',\n inputType: 'password',\n },\n phone: {\n component: 'FormConnectorInput',\n inputType: 'tel',\n },\n radio: {\n component: 'FormConnectorRadioGroup',\n inputType: null,\n },\n search: {\n component: 'FormConnectorInput',\n inputType: 'search',\n },\n select: {\n component: 'FormConnectorSelect',\n inputType: null,\n },\n text: {\n component: 'FormConnectorInput',\n inputType: 'text',\n },\n time: {\n component: 'FormConnectorInput',\n inputType: 'time',\n },\n timePosition: {\n component: 'FormConnectorInput',\n inputType: 'text',\n },\n url: {\n component: 'FormConnectorInput',\n inputType: 'url',\n },\n richTextEditor: {\n component: 'FormConnectorRichTextEditor',\n inputType: null,\n },\n};\n","import type { ChangeEvent } from 'react';\nimport { isArray, isNotNil } from '@wistia/type-guards';\nimport { CheckboxGroup } from '../../../components/CheckboxGroup';\nimport type { CheckboxGroupProps } from '../../../components/CheckboxGroup/CheckboxGroup';\n\nexport type FormConnectorCheckboxGroupProps = {\n /**\n * Should the checkboxes be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables form control\n */\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n value?: string[] | boolean;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors?: Record<string, string> | undefined;\n setFieldValue: (name: string, optionValue: unknown) => unknown;\n values?: Record<string, string> | undefined;\n };\n /**\n * The label for the form field\n */\n label?: CheckboxGroupProps['label'];\n /**\n * The hint/helper text under the label\n */\n labelDescription?: CheckboxGroupProps['labelDescription'];\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (value: boolean) => unknown;\n /**\n * Checkbox options\n */\n options?: { name: string; label?: string; labelDescription?: string }[];\n};\n\nexport const FormConnectorCheckboxGroup = ({\n direction = 'column',\n disabled = false,\n field: { name, value },\n form: { errors, setFieldValue },\n label,\n labelDescription,\n labelProps = {},\n onChangeCustom,\n options = [],\n}: FormConnectorCheckboxGroupProps) => {\n const onChangeSingle = (event: ChangeEvent<HTMLInputElement>, optionValue: string) => {\n setFieldValue(optionValue, event.target.checked);\n };\n\n const onChangeMultiple = (event: ChangeEvent<HTMLInputElement>, optionValue: string) => {\n const fieldValues = value;\n // narrow the type here since we're changing multiple so must be working with arrays.\n if (isArray(fieldValues)) {\n if (event.target.checked) {\n fieldValues.push(optionValue);\n } else {\n const index = fieldValues.indexOf(optionValue);\n if (index > -1) {\n fieldValues.splice(index, 1);\n }\n }\n }\n\n setFieldValue(optionValue, fieldValues);\n };\n\n const onChange = Array.isArray(value) && options.length > 1 ? onChangeMultiple : onChangeSingle;\n const safeOptions = Array.isArray(options) ? options : [options];\n\n return (\n <CheckboxGroup\n direction={direction}\n disabled={disabled}\n error={isNotNil(errors) ? errors[name] : undefined}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n onChange={(event: ChangeEvent<HTMLInputElement>, optionValue) => {\n onChange(event, optionValue);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(event.target.checked);\n }\n }}\n options={safeOptions}\n value={value}\n />\n );\n};\n\nFormConnectorCheckboxGroup.displayName = 'FormConnectorCheckboxGroup';\n","import type { ReactNode, JSX, ComponentClass } from 'react';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\n\nexport type CustomComponentClass = {\n field: {\n name: string;\n value?: unknown;\n };\n form: {\n errors?: Record<string, string> | undefined;\n setFieldValue?: ((name: string, optionValue: string) => unknown) | undefined;\n values?: Record<string, string> | undefined;\n };\n};\n\nexport type FormConnectorCustomFieldProps = {\n /**\n * A custom component that acts as a field and that needs access to Formik fields\n */\n customComponent: ComponentClass<CustomComponentClass> | (() => JSX.Element);\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n value?: unknown;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors?: Record<string, string> | undefined;\n setFieldValue?: ((name: string, optionValue: string) => unknown) | undefined;\n values?: Record<string, string> | undefined;\n };\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n};\n\nexport const FormConnectorCustomField = ({\n customComponent: Element,\n field,\n form,\n label = '',\n labelDescription,\n labelProps = {},\n ...otherProps\n}: FormConnectorCustomFieldProps) => {\n const { name } = field;\n const { errors } = form;\n\n return (\n <FormFieldWrapper\n error={isNotUndefined(errors) ? errors[name] : undefined}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n >\n <Element\n field={field}\n form={form}\n {...otherProps}\n />\n </FormFieldWrapper>\n );\n};\n\nFormConnectorCustomField.displayName = 'FormConnectorCustomField';\n","import type { ChangeEvent, ReactNode } from 'react';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\nimport { Input } from '../../../components/Input';\n\n// check inputTypeMap.jsx for all types\nconst TRIMMABLE_INPUTS = new Set(['text', 'multiline', 'url', 'email']);\n\ntype FormInterface = {\n errors: Record<string, string> | undefined;\n setFieldValue: (name: string, optionValue: string) => unknown;\n values?: Record<string, string> | undefined;\n};\n\nexport type FormConnectorInputProps = {\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onBlur: (event: ChangeEvent) => unknown;\n onChange: (event: ChangeEvent) => unknown;\n value?: number | string;\n };\n /**\n * Form passed from Formik lib\n */\n form: FormInterface;\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n onChangeCustom?: (value: string) => unknown;\n /**\n * Triggers onFocusToSelect if is equal to input's value\n */\n onFocusToSelectValue?: string;\n placeholder?: string;\n type: string;\n};\n\nexport const FormConnectorInput = ({\n disabled,\n field: { name, value, onChange, onBlur },\n form: { errors, setFieldValue },\n label,\n labelDescription,\n labelProps,\n onChangeCustom,\n placeholder,\n type,\n onFocusToSelectValue,\n ...otherProps\n}: FormConnectorInputProps) => {\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange(event);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(event.target.value);\n }\n };\n\n const handleBlur = (event: ChangeEvent<HTMLInputElement>) => {\n onBlur(event);\n\n // trim whitespace for some inputs types\n if (TRIMMABLE_INPUTS.has(type)) {\n const trimmedValue = (event.target.value || '').trim();\n setFieldValue(name, trimmedValue);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n const handleFocusToSelect = value === onFocusToSelectValue ? () => {} : undefined;\n\n return (\n <FormFieldWrapper\n disabled={disabled}\n error={isNotUndefined(errors) ? errors[name] : undefined}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n >\n <Input\n data-testid={`input-${name}`}\n disabled={disabled}\n name={name}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocusToSelect={handleFocusToSelect}\n placeholder={placeholder}\n type={type}\n value={value}\n {...otherProps}\n />\n </FormFieldWrapper>\n );\n};\n\nFormConnectorInput.displayName = 'FormConnectorInput';\n","import type {\n ReactNode,\n ComponentPropsWithRef,\n ChangeEvent,\n FocusEvent,\n HTMLInputTypeAttribute,\n RefObject,\n} from 'react';\nimport { forwardRef, useEffect, useRef } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { coerceToString } from '../../helpers/stringHelpers/coerceToString';\nimport { InputStyledComponent } from './InputStyledComponent';\nimport { ClickToCopy } from './ClickToCopy';\nimport { Icon } from '../Icon';\nimport { timePositionFormat } from './timePositionUtils';\nimport { useMergedRefs } from '../../hooks/useMergedRefs';\n\nexport type IconPositionStrings = 'end' | 'start';\nexport type ForcedStateStrings = 'active' | 'focus' | 'hover';\n\n// we need to track which types of inputs have an icon because we need to\n// add some right-side padding when there's an icon in the input so that\n// long strings don't fall behind the icon\nconst INPUT_TYPES_WITH_ICONS = new Set(['search']);\n\ntype InputWrapperTypes = {\n $disabled: boolean;\n $fullWidth: boolean;\n $iconPosition: IconPositionStrings;\n};\n\n// this wrapper exists to allow svg icons to be positioned *inside* an input\nconst InputWrapper = styled.div<InputWrapperTypes>`\n position: relative;\n\n svg {\n color: ${({ theme, $disabled }) => ($disabled ? theme.color.grey300 : theme.color.grey500)};\n cursor: text;\n pointer-events: none;\n position: absolute;\n top: 11px;\n ${({ $iconPosition, theme }) => {\n if ($iconPosition === 'start') {\n return `left: ${theme.spacing.space03};`;\n }\n return `right: ${theme.spacing.space03};`;\n }}\n }\n\n width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};\n`;\n\n// eslint-disable-next-line @typescript-eslint/promise-function-async\nconst renderIcon = (icon: ReactNode, type: string) => {\n if (isNotNil(icon)) {\n return icon;\n }\n if (type === 'search') {\n return (\n <Icon\n size=\"md\"\n type=\"search\"\n />\n );\n }\n return null;\n};\n\nexport type InputProps = ComponentPropsWithRef<'input'> & {\n /**\n * Copy-to-clipboard-on-click of input's value with copy icon\n */\n clickToCopy?: boolean;\n /**\n * Disables Input\n */\n disabled?: boolean | undefined;\n /**\n * @ignore\n * Force an Input into a particular css state (for debugging)\n */\n forceState?: ForcedStateStrings;\n /**\n * Should Input occupy 100% of available space\n */\n fullWidth?: boolean;\n /**\n * Indicates that there is an error with the input\n */\n hasError?: boolean;\n /**\n * An SVG component that will appear on the right-hand side of the input\n * _Note:_ some input types will apply a icon by default\n */\n icon?: ReactNode;\n /**\n * Indicates on which side of the input the icon should render. Will default to `end` unless the `type` prop is `search`.\n */\n iconPosition?: IconPositionStrings;\n /**\n * @ignore\n * This is a prop that is here for use by FormField. Otherwise,\n * the ref prop should just be used\n */\n innerRef?: RefObject<HTMLInputElement | null>;\n // TODO\n // PropTypes.oneOfType([\n // PropTypes.func,\n // PropTypes.shape({ current: PropTypes.instanceOf(Element) }),\n // ]),\n /**\n * Displays text in monospace font\n */\n monospace?: boolean;\n /**\n * Callback function invoked when the input focus blurs\n */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Callback function invoked when the input value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Callback function invoked when the input value is copied\n */\n onClickToCopy?: () => void;\n /**\n * Callback function invoked when the input is focused\n */\n onFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Callback function that will select input text when input is focused;\n * receives event object but if that is not needed just pass a no-op function\n */\n onFocusToSelect?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;\n /**\n * A short hint for the user about what value the Input expects\n */\n placeholder?: string | undefined;\n /**\n * Prevent the Input from being writable (different styling from disabled)\n */\n readOnly?: boolean;\n /**\n * Make Input a required element\n */\n required?: boolean;\n /**\n * The type of Input to render\n */\n type?: HTMLInputTypeAttribute;\n /**\n * The content of Input\n */\n value?: number | string | undefined;\n};\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n clickToCopy = false,\n disabled = false,\n forceState,\n fullWidth = true,\n hasError = false,\n icon,\n iconPosition = 'end',\n innerRef,\n monospace = false,\n onBlur,\n onChange,\n onClickToCopy,\n onFocus,\n onFocusToSelect,\n placeholder,\n readOnly = false,\n required = false,\n type = 'text',\n value,\n ...otherProps\n }: InputProps,\n ref,\n ) => {\n const defaultRef = useRef<HTMLInputElement | null>(null);\n const mergedRefs = useMergedRefs([\n innerRef,\n ref as RefObject<HTMLInputElement | null>,\n defaultRef,\n ]);\n const elementType = type === 'multiline' ? ('textarea' as const) : ('input' as const);\n const isReadOnly = readOnly || clickToCopy;\n const hasIcon = isNotNil(icon) || clickToCopy || INPUT_TYPES_WITH_ICONS.has(type);\n\n useEffect(() => {\n if (type === 'timePosition' && isNotNil(defaultRef.current)) {\n // time position's value needs to be formatted on load\n defaultRef.current.value = timePositionFormat(value ?? 0);\n }\n }, [type, value]);\n\n const handleOnFocus = (event: FocusEvent<HTMLInputElement>) => {\n if (onFocusToSelect) {\n event.target.select();\n onFocusToSelect(event);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleOnBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (type === 'timePosition' && isNotNil(defaultRef.current)) {\n defaultRef.current.value = timePositionFormat(event.target.value);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n // TODO attempt to infer an autocomplete value?\n const baseProps = {\n 'aria-invalid': hasError ? ('true' as const) : ('false' as const),\n as: elementType,\n $clickToCopy: clickToCopy,\n disabled,\n $forceState: forceState,\n $hasError: hasError,\n $hasIcon: hasIcon,\n $iconPosition: type === 'search' ? 'start' : iconPosition,\n $monospace: monospace,\n onBlur: handleOnBlur,\n onChange,\n onFocus: handleOnFocus,\n placeholder,\n readOnly: isReadOnly,\n ref: mergedRefs,\n required,\n type,\n };\n\n const clickToCopyProps = {\n value: coerceToString(value),\n ...baseProps,\n ...otherProps,\n };\n\n const inputProps = {\n value,\n ...baseProps,\n ...otherProps,\n };\n\n if (clickToCopy) {\n return (\n <ClickToCopy\n inputComponent={InputStyledComponent}\n inputProps={clickToCopyProps}\n onClick={onClickToCopy}\n />\n );\n }\n\n return (\n <InputWrapper\n $disabled={disabled}\n $fullWidth={fullWidth}\n $iconPosition={inputProps.$iconPosition}\n >\n <InputStyledComponent {...inputProps} />\n {renderIcon(icon, type)}\n </InputWrapper>\n );\n },\n);\n\nInput.displayName = 'Input_VHS';\n","import { styled, css } from 'styled-components';\nimport type { IconPositionStrings, ForcedStateStrings } from './Input';\nimport { ellipsisStyle } from '../Ellipsis';\n\nconst focusStyle = css`\n border-color: ${({ theme }) => theme.color.brandBlue500};\n outline: none;\n`;\n\nconst errorStyle = css`\n border-color: ${({ theme }) => theme.color.error500};\n\n &:focus {\n border-color: ${({ theme }) => theme.color.error600};\n }\n`;\n\nconst disabledStyle = css`\n -webkit-opacity: 0.5;\n -webkit-text-fill-color: ${({ theme }) => theme.color.grey700};\n color: ${({ theme }) => theme.color.grey900}; /* iOS */\n cursor: not-allowed;\n opacity: 0.5 !important;\n\n &:focus {\n border-color: ${({ theme }) => theme.color.grey300};\n }\n`;\n\nconst readOnlyStyle = css`\n border: dashed 1px ${({ theme }) => theme.color.grey400};\n color: ${({ theme }) => theme.color.grey700};\n outline: none;\n\n &:focus {\n border-color: ${({ theme }) => theme.color.grey300} !important;\n }\n`;\n\nconst clickToCopyStyle = css`\n ${readOnlyStyle}\n flex: 1;\n`;\n\nconst textareaStyle = css`\n line-height: 20px;\n min-height: 80px;\n`;\n\nconst inputStyle = css<{\n $hasIcon: boolean;\n $iconPosition: IconPositionStrings;\n $monospace: boolean;\n}>`\n background-color: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-family: ${({ theme, $monospace }) => $monospace && theme.font.family.monospace};\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.regular};\n line-height: 20px;\n padding: ${({ theme }) => theme.spacing.space02};\n width: 100%;\n\n /* prevent text from appearing underneath icon */\n ${({ $hasIcon, $iconPosition }) => {\n if ($hasIcon) {\n if ($iconPosition === 'start') {\n return `padding-left: 36px;`;\n }\n return `padding-right: 36px;`;\n }\n return undefined;\n }}\n\n &::placeholder {\n color: ${({ theme }) => theme.color.grey500};\n opacity: 1; /* Firefox */\n }\n\n /* Microsoft Edge */\n /* stylelint-disable-next-line selector-no-vendor-prefix */\n &::-ms-input-placeholder {\n color: ${({ theme }) => theme.color.grey500};\n }\n\n &:focus {\n ${focusStyle}\n }\n\n /* Handle unwanted zoom into inputs on iOS devices\n * https://uxcellence.com/2014/fix-ios-input-zoom\n */\n @media (max-width: 450px) {\n input[type='email'],\n input[type='number'],\n input[type='password'],\n input[type='search'],\n input[type='tel'],\n input[type='text'],\n input[type='url'],\n textarea,\n select {\n font-size: 16px;\n }\n }\n`;\n\ntype InputStyledComponentProps = {\n as: 'input' | 'textarea';\n $clickToCopy: boolean;\n disabled: boolean;\n $forceState?: ForcedStateStrings | undefined;\n $hasError: boolean;\n $hasIcon: boolean;\n $iconPosition: IconPositionStrings;\n $monospace: boolean;\n readOnly: boolean;\n};\n\nexport const InputStyledComponent = styled.input<InputStyledComponentProps>`\n ${inputStyle}\n ${({ as }) => as === 'textarea' && textareaStyle};\n ${({ as }) => as !== 'textarea' && ellipsisStyle};\n ${({ $clickToCopy }) => $clickToCopy && clickToCopyStyle};\n ${({ disabled }) => disabled && disabledStyle};\n ${({ $forceState }) => $forceState === 'focus' && focusStyle};\n ${({ $hasError }) => $hasError && errorStyle};\n ${({ readOnly }) => readOnly && readOnlyStyle};\n`;\n","import type { MouseEvent, JSX } from 'react';\nimport { useState, useEffect } from 'react';\nimport { styled, css } from 'styled-components';\nimport { isFunction } from '@wistia/type-guards';\nimport { darken } from 'polished';\nimport { Button } from '../Button';\nimport { Icon } from '../Icon';\nimport { useToast } from '../Toast';\nimport { useThemeColor } from '../../hooks/useThemeColor';\nimport { copyToClipboard } from '../../helpers/copyToClipboard';\n\nconst clickToCopyWrapperEnabledStyles = css`\n input {\n cursor: pointer;\n }\n\n textarea {\n cursor: pointer;\n }\n`;\n\nconst ClickToCopyWrapper = styled.div<{\n $disabled: boolean;\n}>`\n align-items: center;\n display: flex;\n position: relative;\n ${({ $disabled }) => !$disabled && clickToCopyWrapperEnabledStyles}\n`;\n\nconst disabledClickToCopyButtonStyles = css`\n cursor: not-allowed;\n`;\n\nconst enabledClickToCopyButtonStyles = css`\n &:hover {\n color: ${({ theme }) => darken('4%', theme.color.grey700)};\n }\n\n &:active {\n color: ${({ theme }) => darken('8%', theme.color.grey700)};\n }\n\n &:focus {\n outline: none;\n }\n`;\n\nconst ClickToCopyButtonComponent = styled(Button)<{\n disabled: boolean;\n}>`\n color: ${({ theme }) => theme.color.grey700};\n position: absolute;\n right: ${({ theme }) => `calc(${theme.spacing.space02} + 1px)`}; /* space + border width */\n transition: color 0.1s ease;\n ${({ disabled }) => (disabled ? disabledClickToCopyButtonStyles : enabledClickToCopyButtonStyles)}\n`;\n\nconst ClickToCopyIcon = styled(Icon)<{ disabled: boolean }>`\n ${({ disabled }) => (disabled ? `cursor: not-allowed;` : 'cursor: pointer;')}\n`;\n\ntype ClickToCopyButtonProps = {\n disabled?: boolean;\n onClick: (event: MouseEvent) => void;\n};\n\nexport const ClickToCopyButton = ({ onClick, disabled = false }: ClickToCopyButtonProps) => {\n const disabledColor: string = useThemeColor('grey500');\n\n return (\n <ClickToCopyButtonComponent\n aria-disabled={disabled}\n aria-label=\"Click to Copy\"\n disabled={disabled}\n noStyle={true}\n onClick={onClick}\n >\n <ClickToCopyIcon\n color={disabled ? disabledColor : 'currentColor'}\n disabled={disabled}\n size=\"md\"\n type={disabled ? 'copy-disabled' : 'copy'}\n />\n </ClickToCopyButtonComponent>\n );\n};\n\ntype ClickToCopyInputProps = {\n disabled?: boolean | undefined;\n value: string;\n};\n\ntype ClickToCopyProps = {\n inputComponent: (props: ClickToCopyInputProps) => JSX.Element;\n inputProps: ClickToCopyInputProps;\n onClick?: (() => void) | undefined;\n};\n\nexport const ClickToCopy = ({\n inputComponent: InputStyledComponent,\n inputProps,\n onClick,\n}: ClickToCopyProps) => {\n const showToast = useToast();\n const [focusTime, setFocusTime] = useState(0);\n const { value, disabled } = inputProps;\n const disabledValue = disabled ?? false;\n\n useEffect(() => {\n if (focusTime > 0) {\n const timer = setTimeout(() => setFocusTime(focusTime - 1), 1000);\n return () => clearTimeout(timer);\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }, [focusTime]);\n\n const handleOnClick = () => {\n void (async () => {\n if (disabledValue) {\n return;\n }\n\n await copyToClipboard(value);\n\n if (isFunction(onClick)) {\n onClick();\n }\n\n showToast({ message: 'Copied to clipboard' });\n\n // Focus input for 5 seconds\n setFocusTime(5);\n })();\n };\n\n const forceState =\n focusTime > 0\n ? {\n $forceState: 'focus',\n }\n : undefined;\n\n const inputComponentProps = {\n ...inputProps,\n ...forceState,\n };\n\n const buttonProps = {\n onClick: handleOnClick,\n disabled: disabledValue,\n 'aria-disabled': disabledValue,\n };\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <ClickToCopyWrapper\n $disabled={disabledValue}\n onClick={handleOnClick}\n >\n <InputStyledComponent {...inputComponentProps} />\n <ClickToCopyButton {...buttonProps} />\n </ClickToCopyWrapper>\n );\n};\n","import { isNil, isNotNil, isNotUndefined, isString } from '@wistia/type-guards';\n\nconst SEC_AND_MIN_MAX = 60;\n\n// Valid characters are \"0-9\" and \":\". Removes invalid characters and spaces\nexport const stripInvalidCharacters = (string: string) => string.replace(/[^0-9:]/g, '');\n\nconst parseNumber = (string: string) => (string ? Number.parseFloat(string) : 0);\n\nexport const timeUnitsToString = (\n seconds: number | string,\n minutes: number | string,\n hours?: number | string,\n) => {\n let formattedString = isNotNil(hours) && Number(hours) > 0 ? `${hours}:` : '';\n formattedString += `${minutes}:${seconds}`;\n return formattedString;\n};\n\nexport const formatString = (string: string) => {\n const stringArray = string.split(':');\n const [initialSeconds, initialMinutes, initialHours] = stringArray\n .reverse()\n .map((stringNumber) => parseNumber(stringNumber));\n\n let seconds: number | string = 0;\n let minutes: number | string = 0;\n let hours: number | string = 0;\n\n // Reduce seconds to correct number\n if (isNotNil(initialSeconds)) {\n minutes = Math.floor(initialSeconds / SEC_AND_MIN_MAX);\n\n if (isNotNil(initialMinutes)) {\n minutes += initialMinutes;\n }\n }\n\n if (isNotNil(initialSeconds)) {\n seconds = initialSeconds % SEC_AND_MIN_MAX;\n }\n\n // Pad seconds with leading zero\n const secondsString = seconds.toString();\n if (secondsString.length === 1) {\n seconds = secondsString.padStart(2, '0');\n }\n\n // Reduce minutes and hours to correct number\n const initialHoursOr0 = isNotUndefined(initialHours) ? initialHours : 0;\n hours = Math.floor(minutes / SEC_AND_MIN_MAX) + initialHoursOr0;\n minutes %= SEC_AND_MIN_MAX;\n\n // Pad minutes with leading zero\n const minutesString = minutes.toString();\n if (hours && minutesString.length === 1) {\n minutes = minutesString.padStart(2, '0');\n }\n\n return timeUnitsToString(seconds, minutes, hours);\n};\n\nexport const timePositionFormat = (value?: number | string) => {\n if (isNil(value) || !isString(value)) {\n return '0:00';\n }\n\n const cleanString = stripInvalidCharacters(value);\n\n return formatString(cleanString);\n};\n","import { useCallback } from 'react';\nimport { RadioGroup } from '../../../components/RadioGroup';\nimport type { RadioGroupProps } from '../../../components/RadioGroup/RadioGroup';\nimport type { RadioProps } from '../../../components/Radio/Radio';\n\nexport type FormConnectorRadioGroupProps = {\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables form control\n */\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n };\n /**\n * Form passed from Formik lib\n */\n // asdf: fieldValu;\n form: {\n errors: Record<string, string>;\n setFieldValue: (name: string, optionValue: RadioProps['value']) => unknown;\n values: Record<string, string>;\n };\n /**\n * The label for the form field\n */\n label?: RadioGroupProps['label'];\n /**\n * The hint/helper text under the label\n */\n labelDescription?: RadioGroupProps['labelDescription'];\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (optionValue: RadioProps['value']) => unknown;\n /**\n * Checkbox options\n */\n options: { label: string; labelDescription?: string; value: string; disabled?: boolean }[];\n};\n\nexport const FormConnectorRadioGroup = ({\n direction = 'column',\n disabled = false,\n field: { name },\n form: { errors, values, setFieldValue },\n label = '',\n labelDescription,\n labelProps = {},\n onChangeCustom,\n options,\n}: FormConnectorRadioGroupProps) => {\n const handleOnChange = useCallback<NonNullable<RadioGroupProps['onChange']>>(\n (_event, optionValue) => {\n setFieldValue(name, optionValue);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(optionValue);\n }\n },\n [setFieldValue, name, onChangeCustom],\n );\n\n return (\n <RadioGroup\n direction={direction}\n disabled={disabled}\n error={errors[name]}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n onChange={handleOnChange}\n options={options}\n value={values[name]}\n />\n );\n};\n\nFormConnectorRadioGroup.displayName = 'FormConnectorRadioGroup';\n","import type { ComponentPropsWithoutRef, ChangeEvent, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport { Radio } from '../Radio';\nimport { FormFieldWrapper } from '../../private/components/FormFieldWrapper';\nimport type { RadioProps } from '../Radio/Radio';\n\ntype StyledOptionContainerProps = {\n direction: 'column' | 'row';\n};\n\nconst StyledOptionContainer = styled.div<StyledOptionContainerProps>`\n display: flex;\n flex-direction: ${({ direction }) => (direction === 'row' ? 'row' : 'column')};\n gap: ${({ direction, theme }) =>\n direction === 'row' ? theme.spacing.space04 : theme.spacing.space01};\n`;\n\nexport type RadioGroupProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Whether RadioGroup is disabled\n */\n disabled?: boolean;\n /**\n * Error message to be displayed\n */\n error?: string | undefined;\n /**\n * The label for the form field\n */\n label?: JSX.Element | string | null | undefined;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Should match the ID attribute of the radio. Can be used to group together multiple radios\n */\n name: string;\n /**\n * Fires on checking or unchecking radios in group\n */\n onChange?: (event: ChangeEvent, value: RadioProps['value']) => unknown;\n /**\n * Array of radios attributes\n */\n options: Pick<RadioProps, 'disabled' | 'label' | 'labelDescription' | 'value'>[];\n /**\n * Currently selected radio value\n */\n value?: string | undefined;\n};\n\nexport const RadioGroup = ({\n direction = 'column',\n disabled = false,\n error,\n label,\n labelDescription,\n labelProps = {},\n name,\n onChange,\n options,\n value,\n ...otherProps\n}: RadioGroupProps): JSX.Element => (\n <FormFieldWrapper\n disabled={disabled}\n error={error}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n labelType=\"legend\"\n name={name}\n role=\"radiogroup\"\n {...otherProps}\n >\n <StyledOptionContainer direction={direction}>\n {options.map((option) => (\n <Radio\n key={option.value}\n checked={value === option.value}\n direction={direction}\n disabled={disabled}\n labelDescription={option.labelDescription}\n name={name}\n onChange={(event: ChangeEvent) =>\n isNotNil(onChange) ? onChange(event, option.value) : undefined\n }\n {...option}\n />\n ))}\n </StyledOptionContainer>\n </FormFieldWrapper>\n);\n\nRadioGroup.displayName = 'RadioGroup_VHS';\n","import type { ChangeEvent, ComponentPropsWithoutRef, JSX } from 'react';\nimport { forwardRef, useState, isValidElement } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport {\n Container,\n OptionWrapper,\n OptionLabel,\n OptionSubLabel,\n} from '../Checkbox/OptionStyledComponent';\n\nexport type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'value'> & {\n /**\n * Indicates the state of the radio\n */\n checked?: boolean;\n /**\n * Should the radio buttons be displayed vertically as a column or horizontally as a row\n */\n direction?: 'column' | 'row';\n /**\n * Disables input\n */\n disabled?: boolean;\n /**\n * @ignore // I don't know what to do with this\n * Force a Radio into a particular css state (for debugging)\n */\n forceState?: 'focus' | 'hover';\n /**\n * Indicates that there is an error with the input\n */\n hasError?: boolean;\n /**\n * Provides an ID for the input\n */\n id?: string;\n /**\n * The label for the input\n */\n label: JSX.Element | string;\n /**\n * The description for the input\n */\n labelDescription?: JSX.Element | string | undefined;\n /**\n * Should match the ID attribute of the radio.\n * Can be used to group together multiple radios\n */\n name?: string;\n /**\n * Callback function invoked when the value changes\n */\n onChange?: (event: ChangeEvent) => unknown;\n /**\n * The value attribute of the input\n */\n value?: string;\n};\n\nexport const Radio = forwardRef<HTMLLabelElement, RadioProps>(\n (\n {\n checked,\n direction = 'column',\n disabled = false,\n forceState,\n hasError = false,\n id,\n label,\n labelDescription,\n name,\n onChange,\n value = 'false',\n ...otherProps\n }: RadioProps,\n ref,\n ): JSX.Element => {\n const [focused, setFocused] = useState(false);\n return (\n <Container\n ref={ref}\n $direction={direction}\n $disabled={disabled}\n $forceState={forceState}\n $hasError={hasError}\n $isFocused={focused}\n >\n <OptionWrapper\n aria-checked={checked}\n checked={checked}\n data-testid=\"radio-option-wrapper\"\n disabled={disabled}\n id={id}\n name={name}\n onBlur={() => setFocused(false)}\n onChange={onChange}\n onFocus={() => setFocused(true)}\n role=\"radio\"\n type=\"radio\"\n value={value}\n {...otherProps}\n />\n <OptionLabel>\n {/* eslint-disable-next-line react/jsx-no-useless-fragment */}\n <>{label}</>\n {isNotNil(labelDescription) || isValidElement(labelDescription) ? (\n <OptionSubLabel data-testid=\"radio-option-sub-label\">{labelDescription}</OptionSubLabel>\n ) : null}\n </OptionLabel>\n </Container>\n );\n },\n);\n\nRadio.displayName = 'Radio_VHS';\n","import type { ChangeEvent, ReactNode } from 'react';\nimport { isNil, isBoolean } from '@wistia/type-guards';\nimport { Select } from '../../../components/Select';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\nimport { coerceToString } from '../../../helpers/stringHelpers/coerceToString';\n\nexport type FormConnectorSelectProps = {\n /**\n * Disables form control\n */\n disabled?: boolean;\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onBlur: () => unknown;\n onChange: (event: ChangeEvent) => unknown;\n value?: boolean | number | string;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors: Record<string, string>;\n setFieldValue?: (name: string, optionValue: string) => unknown;\n values?: Record<string, string>;\n };\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom?: (value: string) => unknown;\n /**\n * Select options\n */\n options: { label?: string; value?: number | string }[];\n /**\n * Value of text to appear by default as first option in Select; use `null` for none\n */\n placeholder?: string;\n};\n\nexport const FormConnectorSelect = ({\n disabled = false,\n field: { name, value, onChange, onBlur },\n form: { errors },\n label,\n labelDescription,\n labelProps = {},\n options,\n placeholder,\n onChangeCustom,\n ...otherProps\n}: FormConnectorSelectProps) => {\n const getValue = (val: boolean | number | string | undefined): number | string => {\n if (isNil(val)) {\n return '';\n }\n if (isBoolean(val)) {\n return coerceToString(value);\n }\n return val;\n };\n return (\n <FormFieldWrapper\n disabled={disabled}\n error={errors[name]}\n label={label}\n labelDescription={labelDescription}\n labelProps={labelProps}\n name={name}\n >\n <Select\n data-testid={`select-${name}`}\n disabled={disabled}\n name={name}\n onBlur={onBlur}\n onChange={(event) => {\n onChange(event);\n // Custom onChange handler that provides new selected value\n if (onChangeCustom) {\n onChangeCustom(event.target.value);\n }\n }}\n options={options}\n placeholder={placeholder}\n value={getValue(value)}\n {...otherProps}\n />\n </FormFieldWrapper>\n );\n};\n\nFormConnectorSelect.displayName = 'FormConnectorSelect';\n","import type { ComponentPropsWithRef, JSX } from 'react';\nimport { forwardRef } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled, css } from 'styled-components';\nimport { isBoolean, isNonEmptyString, isNotNil } from '@wistia/type-guards';\nimport { SelectStyledComponent } from './SelectStyledComponent';\nimport { Icon } from '../Icon';\nimport { coerceToString } from '../../helpers/stringHelpers/coerceToString';\n\nconst getSvgColor = (theme: DefaultTheme, disabled: boolean, focused: boolean): string => {\n if (disabled) {\n return theme.color.grey300;\n }\n if (focused) {\n return theme.color.brandBlue500;\n }\n return theme.color.grey700;\n};\n\ntype SelectWrapperProps = {\n $disabled: boolean;\n $forceState: 'active' | 'focus' | 'hover' | undefined;\n $fullWidth: boolean;\n};\n\n// this wrapper exists to allow an svg icon to be positioned *on top of* a select\nconst SelectWrapper = styled.div<SelectWrapperProps>`\n position: relative;\n\n /* svg here is referring to the caret that appears on the left */\n svg {\n color: ${({ theme, $disabled }) => getSvgColor(theme, $disabled, false)};\n cursor: pointer;\n pointer-events: none;\n position: absolute;\n right: ${({ theme }) => theme.spacing.space02};\n top: ${({ theme }) => theme.spacing.space03};\n\n /* fakes the focus state of the svg for documentation purposes */\n ${({ theme, $forceState }) =>\n $forceState === 'focus' &&\n css`\n color: ${getSvgColor(theme, false, true)};\n `}\n }\n\n /* match border focus color */\n ${SelectStyledComponent}:focus + svg {\n color: ${({ theme }) => getSvgColor(theme, false, true)};\n }\n\n width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};\n`;\n\nconst renderOptions = (options: OptionsType | [], labelName?: string, valueName?: string) => {\n const renderOptionGroup = ({\n groupLabel,\n groupOptions,\n disabled = false,\n }: GroupOptionType): JSX.Element => (\n <optgroup\n key={groupLabel}\n data-testid={groupLabel}\n disabled={disabled}\n label={groupLabel}\n >\n {renderOptions(groupOptions)}\n </optgroup>\n );\n\n return options.map((option) => {\n // if option has a `groupLabel` key we assume we've received a group object\n // eslint-disable-next-line prefer-object-has-own\n if (Object.prototype.hasOwnProperty.call(option, 'groupLabel')) {\n return renderOptionGroup(option as GroupOptionType);\n }\n\n const { label, value, disabled = false } = option as OptionType;\n let optionValue = isNonEmptyString(valueName)\n ? option[valueName as keyof typeof option]\n : value;\n\n const optionLabel = isNonEmptyString(labelName)\n ? option[labelName as keyof typeof option]\n : label;\n\n if (isBoolean(optionValue)) {\n optionValue = coerceToString(optionValue);\n }\n\n return (\n <option\n key={`${coerceToString(optionLabel)}--${coerceToString(optionValue)}`}\n disabled={disabled}\n value={optionValue}\n >\n {optionLabel}\n </option>\n );\n });\n};\n\nconst renderPlaceholder = (\n placeholder: string | null,\n preventPlaceholderSelection: boolean,\n multiple: boolean,\n) => {\n // do not show a placeholder for multiple select even if one is provided\n if (isNotNil(placeholder) && !multiple) {\n return renderOptions([\n { label: placeholder, value: '', disabled: preventPlaceholderSelection },\n ]);\n }\n return null;\n};\n\nconst renderIcon = (multiple: boolean) => {\n // we don't want to show a dropdown icon when\n if (multiple) {\n return null;\n }\n return (\n <Icon\n size=\"md\"\n type=\"caret-down\"\n />\n );\n};\n\ntype GroupOptionType = {\n disabled?: boolean;\n groupLabel?: string;\n groupOptions: OptionType[];\n};\n\ntype OptionType = {\n disabled?: boolean;\n label?: string;\n value?: boolean | number | string;\n};\nexport type OptionsType = GroupOptionType[] | OptionType[];\n\n// Omit placholder from <select> passthrough props because we want to also allow for 'null'\nexport type SelectProps = Omit<ComponentPropsWithRef<'select'>, 'placeholder'> & {\n /**\n * Optional accessible label for when there is no accompanying <label> element\n */\n ariaLabel?: string;\n /**\n * Disables Select\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Select into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * Should Select occupy 100% of available space\n */\n fullWidth?: boolean;\n /**\n * Indicates that there is an error with the Select\n */\n hasError?: boolean;\n /**\n * Change option's label name from \"label\"\n */\n labelName?: string;\n /**\n * Allow multiple options in the list to be selected at the same time\n */\n multiple?: boolean;\n /**\n * Data structure to populate option labels & values. (`{ label, value, disabled }`)\n * Additionally this can be used to render option groupings. (`{ groupLabel, groupOptions, disabled }`)\n */\n options: OptionsType;\n /**\n * Value of text to appear by default as first option in Select, use `null` for none\n */\n placeholder?: string | null | undefined;\n /**\n * Prevent the placeholder value from being selected\n */\n preventPlaceholderSelection?: boolean;\n /**\n * Make Select a required element\n */\n required?: boolean;\n /**\n * Change option's value name from \"value\"\n */\n valueName?: string;\n};\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n ariaLabel,\n disabled = false,\n forceState,\n fullWidth = true,\n hasError = false,\n labelName = 'label',\n multiple = false,\n options,\n placeholder = 'Please select...',\n preventPlaceholderSelection = false,\n required = false,\n valueName = 'value',\n ...otherProps\n }: SelectProps,\n ref,\n ) => (\n <SelectWrapper\n $disabled={disabled}\n $forceState={forceState}\n $fullWidth={fullWidth}\n >\n <SelectStyledComponent\n ref={ref}\n $forceState={forceState}\n $hasError={hasError}\n aria-invalid={hasError ? 'true' : 'false'}\n aria-label={ariaLabel}\n disabled={disabled}\n multiple={multiple}\n required={required}\n {...otherProps}\n >\n {renderPlaceholder(placeholder, preventPlaceholderSelection, multiple)}\n {renderOptions(options, labelName, valueName)}\n </SelectStyledComponent>\n {renderIcon(multiple)}\n </SelectWrapper>\n ),\n);\n\nSelect.displayName = 'Select_VHS';\n","import { styled, css } from 'styled-components';\nimport { ellipsisStyle } from '../Ellipsis';\n\nconst focusStyle = css`\n border: 1px solid ${({ theme }) => theme.color.brandBlue500};\n`;\n\nconst disabledStyle = css`\n color: ${({ theme }) => theme.color.grey900};\n cursor: not-allowed;\n opacity: 0.5;\n\n &:focus {\n border-color: ${({ theme }) => theme.color.grey300};\n }\n`;\n\nconst errorStyle = css`\n border: 1px solid ${({ theme }) => theme.color.error500};\n`;\n\ntype SelectStyledComponentProps = {\n $forceState: 'active' | 'focus' | 'hover' | undefined;\n $hasError: boolean;\n disabled: boolean;\n multiple: boolean;\n};\n\nexport const SelectStyledComponent = styled.select<SelectStyledComponentProps>`\n ${ellipsisStyle}\n appearance: none;\n background-color: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey900};\n cursor: pointer;\n display: block;\n font-size: 14px;\n height: ${({ multiple }) => (multiple ? '66px' : 'auto')};\n line-height: 20px;\n margin: 0;\n outline: none;\n\n /* selects w/ multiple need to be able to scroll */\n overflow-y: ${({ multiple }) => (multiple ? 'scroll' : 'hidden')};\n\n /* right padding is to prevent text collision with caret icon */\n padding: ${({ theme }) => `7px ${theme.spacing.space06} 7px ${theme.spacing.space02}`};\n width: 100%;\n\n &:focus {\n ${focusStyle}\n }\n\n /* this removes a dotted border around select text when focusing in Firefox */\n &:-moz-focusring {\n color: transparent;\n text-shadow: 0 0 0 #000000;\n }\n\n /* remove drop-down arrow in IE */\n &::-ms-expand {\n display: none;\n }\n\n ${({ disabled }) => disabled && disabledStyle}\n ${({ $hasError }) => $hasError && errorStyle}\n ${({ $forceState }) => $forceState === 'focus' && focusStyle};\n`;\n","import type { ChangeEvent } from 'react';\nimport { useEffect } from 'react';\nimport { isNil, isNotUndefined } from '@wistia/type-guards';\nimport { Input } from '../../../components/Input';\n\nexport type FormConnectorHiddenProps = {\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onChange: (event: ChangeEvent) => unknown;\n value?: number | string | undefined;\n };\n /**\n * Form passed from Formik lib\n */\n form?: {\n errors?: Record<string, string> | undefined;\n setFieldValue?: ((name: string, optionValue: string) => unknown) | undefined;\n values?: Record<string, string> | undefined;\n };\n /**\n * Custom onChange callback add-on. args: \"value\"\n */\n onChangeCustom: (value: string) => unknown;\n /**\n * Hidden fields may be changed on the client, so updating this prop will update Formik with the new value for this field\n */\n valueState?: string;\n};\n\nexport const FormConnectorHidden = ({\n field: { name, value, onChange },\n form: { setFieldValue } = {},\n onChangeCustom,\n valueState = '',\n ...otherProps\n}: FormConnectorHiddenProps) => {\n useEffect(() => {\n // Don't continue if valueState (new value) is still null, undefined, or ''\n if (!valueState && isNil(value)) {\n return;\n }\n\n // If the parent component passes down an updated \"valueState\" that's different\n // from the current value, update Formik with that value.\n if (valueState !== value && isNotUndefined(setFieldValue)) {\n setFieldValue(name, valueState);\n }\n }, [setFieldValue, name, valueState, value]);\n\n return (\n <Input\n data-testid={`input-${name}`}\n name={name}\n onChange={(event: ChangeEvent<HTMLInputElement>) => {\n onChange(event);\n // Custom onChange handler that provides new selected value\n if (isNotUndefined(onChangeCustom)) {\n onChangeCustom(event.target.value);\n }\n }}\n type=\"hidden\"\n value={isNil(value) ? '' : value}\n {...otherProps}\n />\n );\n};\n\nFormConnectorHidden.displayName = 'FormConnectorHidden';\n","import type { ChangeEvent, ReactNode } from 'react';\nimport { useState, useEffect } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotUndefined } from '@wistia/type-guards';\nimport type { Descendant } from 'slate';\nimport { coerceToString } from '../../../helpers/stringHelpers/coerceToString';\nimport {\n RichTextEditor,\n rteFormatTypes,\n rteDeserializeHTML,\n rteSerializeToHTML,\n} from '../../../components/RichTextEditor';\nimport { FormFieldWrapper } from '../FormFieldWrapper';\n\nconst Wrapper = styled.div`\n margin-top: ${({ theme }) => theme.spacing.space02};\n`;\n\nexport type FormConnectorRichTextEditorProps = {\n disabled?: boolean;\n /**\n * Formats to enable in editor, restricted to rteFormatTypes\n */\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n /**\n * Field passed from Formik lib\n */\n field: {\n name: string;\n onBlur?: (name: string) => (event: ChangeEvent) => unknown;\n onChange: (name: string) => (serializedValue: unknown) => unknown;\n value?: number | string;\n };\n /**\n * Form passed from Formik lib\n */\n form: {\n errors: Record<string, string>;\n setFieldValue?: (name: string, optionValue: string) => unknown;\n values?: Record<string, string>;\n };\n /**\n * The label for the form field\n */\n label?: string;\n /**\n * The hint/helper text under the label\n */\n labelDescription?: ReactNode;\n /**\n * Props that are passed through to the underlying `<Label>` component\n */\n labelProps?: {\n disabled?: boolean;\n screenReaderOnly?: boolean;\n };\n // Note: the Formik Field placeholder behaves differently from the RTE placeholder.\n // If you want a placeholder, you'll need to pass it in explicitly at the Field level. The default RTE placeholder won't take effect.\n placeholder?: string;\n /**\n * Whether to update the editor when the value prop changes\n */\n useExternalValue?: boolean;\n /**\n * Custom height of editor\n */\n height?: string | undefined;\n};\n\nexport const FormConnectorRichTextEditor = ({\n field: { name, value, onChange },\n form: { errors },\n label,\n labelDescription,\n labelProps = {},\n placeholder = '',\n disabled = false,\n enabledFormats = Object.values(rteFormatTypes),\n useExternalValue = false,\n height = undefined,\n ...otherProps\n}: FormConnectorRichTextEditorProps) => {\n // serializers haven't been converted to TS yet\n const [rteValue, setRTEValue] = useState<\n (Descendant | string | null)[] | Descendant | string | null | undefined\n >(rteDeserializeHTML(coerceToString(value)));\n const labelId = isNotUndefined(label) ? `${name}-label-id` : undefined;\n\n useEffect(() => {\n if (useExternalValue) {\n // serializers haven't been converted to TS yet\n setRTEValue(rteDeserializeHTML(coerceToString(value)));\n }\n }, [useExternalValue, value]);\n\n return (\n <FormFieldWrapper\n disabled={disabled}\n error={errors[name]}\n label={label}\n labelDescription={labelDescription}\n labelId={labelId}\n labelProps={labelProps}\n name={name}\n >\n <Wrapper data-testid={`richTextEditor-${name}`}>\n <RichTextEditor\n ariaLabelledBy={labelId}\n disabled={disabled}\n enabledFormats={enabledFormats}\n height={height}\n onChange={(event) => {\n setRTEValue(event);\n // Formik expects values to be at least a string\n // TODO: Revisit this when serializers are converted to TS\n const serializedValue = rteSerializeToHTML(event) ?? '';\n onChange(name)(serializedValue);\n }}\n placeholder={placeholder}\n useExternalValue={useExternalValue}\n value={rteValue as Descendant[]}\n {...otherProps}\n />\n </Wrapper>\n </FormFieldWrapper>\n );\n};\n\nFormConnectorRichTextEditor.displayName = 'FormConnectorRichTextEditor';\n","import type { JSX, FocusEvent } from 'react';\nimport type { RenderLeafProps, RenderElementProps } from 'slate-react';\nimport type { Descendant, Editor, Node } from 'slate';\nimport { useCallback, useMemo, useEffect } from 'react';\nimport { styled } from 'styled-components';\nimport { Editable, withReact, Slate, ReactEditor } from 'slate-react';\nimport { createEditor, Transforms, Element, Text } from 'slate';\nimport { withHistory } from 'slate-history';\nimport { isHotkey } from 'is-hotkey';\nimport { isNil, isNotNil, isNonEmptyString } from '@wistia/type-guards';\nimport isEqual from 'react-fast-compare';\nimport { rteSerializeToHTML } from './serializers';\nimport { Leaf } from './Leaf';\nimport { Element as ElementToRender } from './Element';\nimport { EditorButtons } from './EditorButtons';\nimport {\n rteFormatTypes,\n handleListEscape,\n withLinks,\n withImages,\n toggleMark,\n toggleBlck,\n} from './utilities';\nimport type { NodeElementObject } from './types';\n\nconst EditableWrapper = styled(Editable)`\n color: ${({ theme }) => theme.color.grey900};\n outline: none; /* prevent blue accessibility outline from appearing on focus */\n`;\n\ntype EditorWrapperProps = {\n disabled: boolean;\n dataTestId?: string;\n height?: string | undefined;\n};\n\nconst defaultHeight = '300px';\nconst EditorWrapper = styled.div<EditorWrapperProps>`\n background: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'auto')};\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n height: ${({ height }) => height ?? defaultHeight};\n overflow: auto;\n padding: 0 ${({ theme }) => theme.spacing.space04};\n\n strong {\n font-weight: ${({ theme }) => theme.font.weight.bold};\n }\n`;\n\nconst HOTKEYS = {\n 'mod+b': 'bold',\n 'mod+i': 'italic',\n 'mod+u': 'underline',\n};\n\nexport type RichTextEditorProps = {\n /**\n * Optional id to set aria-labelledby\n */\n ariaLabelledBy?: string | undefined;\n /**\n * @ignore\n */\n 'data-testid'?: string;\n /**\n * Determines whether editor is clickable/read-only\n */\n disabled?: boolean;\n /**\n * Formats to enable in editor, restricted to rteFormatTypes\n */\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n /**\n * Function to be called after editor state update\n */\n onChange?: ((value: NodeElementObject[]) => void) | undefined;\n /**\n * Function to be called when editor loses focus\n */\n onBlur?: ((value: NodeElementObject[]) => void) | undefined;\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * Value of editor based on controlled input\n */\n value?: Descendant[];\n /**\n * Whether to update the editor when the value prop changes\n */\n useExternalValue: boolean;\n /**\n * Custom height of editor\n */\n height?: string | undefined;\n};\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst emptyTextNode = { text: '' };\nconst defaultValue: Descendant[] = [\n {\n type: 'paragraph',\n children: [emptyTextNode],\n },\n];\n\nexport const RichTextEditor = ({\n enabledFormats = Object.values(rteFormatTypes),\n value = defaultValue,\n onChange,\n onBlur,\n placeholder = 'Enter some rich text...',\n disabled = false,\n ariaLabelledBy,\n useExternalValue,\n 'data-testid': dataTestId = 'vhs-rich-text-editor',\n height,\n ...otherProps\n}: RichTextEditorProps): JSX.Element => {\n const renderElement = useCallback(\n (props: RenderElementProps) => <ElementToRender {...props} />,\n [],\n );\n const renderLeaf = useCallback((props: RenderLeafProps) => <Leaf {...props} />, []);\n const editor: Editor = useMemo(\n () => withImages(withLinks(withHistory(withReact(createEditor())))),\n [],\n );\n\n /**\n * This is directly from the Slate.js docs on how to update slate outside of onChange:\n * If you want to update the editor's content in response to events from outside of Slate, you\n * need to change the children property directly. The simplest way is to replace the value of\n * editor.children editor.children = newValue and trigger a re-rendering (e.g. by calling\n * editor.onChange() in the example above).\n * More info here: https://docs.slatejs.org/walkthroughs/06-saving-to-a-database\n */\n\n const isTextValid = (rteValue: Descendant[]) => {\n if (isNil(rteValue) || isNil(rteValue[0]) || isNil(rteValue[0].children)) {\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { text } = rteValue[0].children[0]!;\n // because text is an external value, Slate's recommendation for narrowing the type does not work with Element.isElement(node)\n return isNonEmptyString(text);\n };\n\n useEffect(() => {\n const isDefaultValue = isEqual(value, defaultValue);\n const valueString = rteSerializeToHTML(value);\n const editorChildrenString = rteSerializeToHTML(editor.children);\n /** if we have an external value and the text editor is not empty (and therefore valid) and the value string and children string is not equal to one another, we can safely update the editor. */\n if (\n isDefaultValue ||\n (isTextValid(value) && useExternalValue && valueString !== editorChildrenString)\n ) {\n // eslint-disable-next-line react-hooks/immutability\n editor.children = value;\n\n editor.selection = null;\n editor.onChange();\n }\n }, [value, editor, useExternalValue]);\n\n const handleEditorBlur = (_event: FocusEvent<HTMLDivElement>) => {\n const updatedValue = editor.children;\n\n if (isNotNil(onBlur)) {\n onBlur(updatedValue);\n }\n };\n\n const handleRemoveImageIfSelected = useCallback(() => {\n const { selection } = editor;\n\n if (isNil(selection) || isNil(selection.anchor.path[0])) {\n return;\n }\n\n const selectedElement = editor.children[selection.anchor.path[0]];\n if (Element.isElement(selectedElement) && selectedElement.type === 'image') {\n toggleBlck(editor, 'image');\n Transforms.removeNodes(editor, { at: selection });\n Transforms.move(editor, { reverse: true });\n // eslint-disable-next-line @typescript-eslint/prefer-find\n const spanElement = editor.children.filter(\n (child: Node) => Element.isElement(child) && child.type === 'span',\n )[0];\n if (\n Element.isElement(spanElement) &&\n spanElement.type === 'span' &&\n isNotNil(spanElement.children) &&\n isNotNil(spanElement.children[0]) &&\n isNotNil(spanElement.children[0].text) &&\n spanElement.children[0].text.trim() !== ''\n ) {\n Transforms.setNodes(\n editor,\n { type: 'paragraph' },\n {\n match: (node: Node) =>\n Element.isElement(node) &&\n node.type === 'span' &&\n isNotNil(node.children) &&\n Text.isText(node.children[0]) &&\n isNotNil(node.children[0].text) &&\n node.children[0].text.trim() !== '',\n split: true,\n mode: 'highest',\n },\n );\n }\n }\n }, [editor]);\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <EditorWrapper\n data-testid={dataTestId}\n disabled={disabled}\n height={height}\n onClick={() => {\n ReactEditor.focus(editor);\n }}\n >\n <Slate\n editor={editor}\n initialValue={value}\n onChange={onChange}\n {...otherProps}\n >\n <EditorButtons\n disabled={disabled}\n enabledFormats={enabledFormats}\n />\n <EditableWrapper\n aria-labelledby={ariaLabelledBy}\n autoFocus={false}\n data-testid=\"editor-content\"\n onBlur={handleEditorBlur}\n onKeyDown={(event) => {\n Object.keys(HOTKEYS).forEach((hotKey: string) => {\n if (isHotkey(hotKey, event)) {\n event.preventDefault();\n toggleMark(editor, HOTKEYS[hotKey as keyof typeof HOTKEYS]);\n }\n });\n if (event.key === 'Enter' && !event.shiftKey) {\n handleListEscape(editor);\n }\n if (event.key === 'Backspace' || event.key === 'Clear' || event.key === 'Delete') {\n handleRemoveImageIfSelected();\n }\n }}\n placeholder={placeholder}\n readOnly={disabled}\n renderElement={renderElement}\n renderLeaf={renderLeaf}\n spellCheck={true}\n />\n </Slate>\n </EditorWrapper>\n );\n};\n\nRichTextEditor.displayName = 'RichTextEditor_VHS';\n","import type { Node, Descendant } from 'slate';\nimport { Element, Text } from 'slate';\nimport { jsx } from 'slate-hyperscript';\nimport { isNotNil, isNil, isString, isArray } from '@wistia/type-guards';\nimport { escapeHtml } from '../../private/helpers/escapeHtml';\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst emptyTextNode = { text: '' };\n\n// Image nodes need blank text by SlateJS design, so we make some exceptions for them\nconst rteIsNonImageNodeType = (node: Descendant): boolean => node.type !== 'image';\n\nconst rteIsInvalidImage = (node: Descendant): boolean =>\n node.type === 'image' && node.url === undefined;\n\nconst rteHasOnlyOneChild = (node: Descendant): boolean =>\n isNotNil(node.children) && node.children.length === 1;\nconst rteIsEmptyTextNode = (node: Descendant): boolean =>\n Text.isText(node) && node.text?.trim() === '';\nconst rteIsOnlyChildWithEmptyText = (node: Descendant): boolean =>\n // We know that node.children[0] exists bcause of rteHasOnlyOneChild\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n rteHasOnlyOneChild(node) && rteIsEmptyTextNode(node.children![0]!);\n\nconst isValueNull = (value: (string | null)[]): boolean => value.every((val) => isNil(val));\nconst sanitizedValue = (value: (string | null)[]): string | null =>\n isValueNull(value) ? null : value.join('');\n\n// Handles cases in foreign HTML (i.e., in case of import or paste)\n// when links may be wrapped by attr tags like <strong></strong>,\n// which breaks the rules of SlateJS.\n// The code here correctly adds those attrs to the children of the element.\n// Inspired by https://github.com/udecode/slate-plugins/pull/83/files.\nconst addAttrsToChildren = (child: Descendant, attrs: Record<string, unknown>) => {\n const childCopy = child;\n if (childCopy.children) {\n childCopy.children = childCopy.children.map((item) => {\n const itemWithAttrs = addAttrsToChildren(item, attrs);\n return { ...itemWithAttrs, ...attrs };\n });\n }\n return childCopy;\n};\n\n// serialize to HTML\nconst serializeText = (textNode: Text) => {\n const text = escapeHtml(textNode.text);\n const newStringArr = [text];\n if (isNotNil(textNode.bold) && textNode.bold) {\n newStringArr.push('</strong>');\n newStringArr.unshift('<strong>');\n }\n if (isNotNil(textNode.italic) && textNode.italic) {\n newStringArr.push('</em>');\n newStringArr.unshift('<em>');\n }\n if (isNotNil(textNode.underline) && textNode.underline) {\n newStringArr.push('</u>');\n newStringArr.unshift('<u>');\n }\n if (isNotNil(textNode.strikethrough) && textNode.strikethrough) {\n newStringArr.push('</s>');\n newStringArr.unshift('<s>');\n }\n if (isNotNil(textNode.code) && textNode.code) {\n newStringArr.push('</code>');\n newStringArr.unshift('<code>');\n }\n return newStringArr.join('');\n};\n\nconst serializeNode = (node: Descendant): string | null => {\n // if the only thing in the editor is\n // a non-image RTE node with empty text (since image nodes need empty text by SlateJS design)\n // OR if the node is an image but invalid, with an undefined src\n // do not serialize the HTML for it.\n if (\n (rteIsNonImageNodeType(node) && rteIsOnlyChildWithEmptyText(node)) ||\n rteIsInvalidImage(node)\n ) {\n return null;\n }\n\n if (Text.isText(node)) {\n return serializeText(node);\n }\n\n const children = isNotNil(node.children)\n ? node.children.map((node_) => serializeNode(node_)).join('')\n : '';\n\n switch (node.type) {\n case 'span':\n return `<span>${children}</span>`;\n case 'blockquote':\n return `<blockquote>${children}</blockquote>`;\n case 'paragraph':\n return `<p>${children}</p>`;\n case 'heading-one':\n return `<h1>${children}</h1>`;\n case 'heading-two':\n return `<h2>${children}</h2>`;\n // We preserve the original headers \"under the hood\" in the HTML\n // Even though we render h4-h6 as h3s in the editor UI per Design request.\n case 'heading-three':\n return `<h3>${children}</h3>`;\n case 'heading-four':\n return `<h4>${children}</h4>`;\n case 'heading-five':\n return `<h5>${children}</h5>`;\n case 'heading-six':\n return `<h6>${children}</h6>`;\n case 'link':\n return `<a rel=\"noopener noreferrer\" target=\"_blank\" href=\"${escapeHtml(\n node.url,\n )}\">${children}</a>`;\n case 'numbered-list':\n return `<ol>${children}</ol>`;\n case 'bulleted-list':\n return `<ul>${children}</ul>`;\n case 'list-item':\n return `<li>${children}</li>`;\n case 'image':\n return `<img src=\"${escapeHtml(node.url)}\" />`;\n case 'code':\n return `<code>${children}</code>`;\n case undefined:\n default:\n return children;\n }\n};\n\nexport const rteSerializeToHTML = (value: Descendant[]): string | null => {\n const mappedValue = value.map((node) => serializeNode(node));\n return sanitizedValue(mappedValue);\n};\n\n// deserialize from HTML\nconst ELEMENT_TAGS = {\n SPAN: () => ({ type: 'span' }),\n A: (el: HTMLElement) => ({ type: 'link', url: el.getAttribute('href') }), // eslint-disable-line id-length\n BLOCKQUOTE: () => ({ type: 'blockquote' }),\n H1: () => ({ type: 'heading-one' }),\n H2: () => ({ type: 'heading-two' }),\n H3: () => ({ type: 'heading-three' }),\n H4: () => ({ type: 'heading-four' }),\n H5: () => ({ type: 'heading-five' }),\n H6: () => ({ type: 'heading-six' }),\n LI: () => ({ type: 'list-item' }),\n OL: () => ({ type: 'numbered-list' }),\n P: () => ({ type: 'paragraph' }), // eslint-disable-line id-length\n UL: () => ({ type: 'bulleted-list' }),\n IMG: (el: HTMLElement) => ({ type: 'image', url: el.getAttribute('src') }),\n CODE: () => ({ type: 'code' }),\n};\n\n// `B` is omitted here since the HTML 5 specification discourages the use of that tag.\nconst TEXT_TAGS = {\n DEL: () => ({ strikethrough: true }),\n S: () => ({ strikethrough: true }), // eslint-disable-line id-length\n EM: () => ({ italic: true }),\n I: () => ({ italic: true }), // eslint-disable-line id-length\n STRONG: () => ({ bold: true }),\n U: () => ({ underline: true }), // eslint-disable-line id-length\n CODE: () => ({ code: true }),\n};\n\nconst isTextNode = (el: ChildNode | HTMLElement): boolean => el.nodeType === 3;\nconst isElement = (el: ChildNode | HTMLElement) => el.nodeType === 1;\n// NOTE: \"ock (\" (without the space) breaks ESBuild, so we remove the o from Block...\nconst isCodeBlck = (element: ChildNode | HTMLElement) => element.nodeName === 'CODE';\n// This function catches Code blocks that are \"inline\" as opposed to block.\n// Code blocks are formatted from the markdown with new lines before and after the children, i.e.,\n// <code>\n// I am block content\n// </code>\n// versus <code>I am inline</code\n// which should be treated as text rather than a block.\n// NOTE: \"ock (\" (without the space) breaks ESBuild, so we remove the o from Block...\nconst isInlineCodeBlck = (\n element: ChildNode | HTMLElement,\n elementChildren: (Node | string | null)[],\n): boolean =>\n // @ts-expect-error I don't want to narrow the type too far and miss something that should be matched here.\n isCodeBlck(element) && isNotNil(elementChildren[0]) && !elementChildren[0].match(/\\n/g); // eslint-disable-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/no-unsafe-call\n\n// NOTE: \"ock (\" (without the space) breaks ESBuild, so we remove the o from Block...\nconst shouldCreateBlck = (\n el: ChildNode | HTMLElement,\n children: (Descendant | Node | string | null)[],\n): boolean =>\n !isInlineCodeBlck(el, children) &&\n isNotNil(ELEMENT_TAGS[el.nodeName as keyof typeof ELEMENT_TAGS]);\nconst shouldCreateText = (\n el: ChildNode | HTMLElement,\n children: (Node | string | null)[],\n): boolean =>\n isInlineCodeBlck(el, children) || isNotNil(TEXT_TAGS[el.nodeName as keyof typeof TEXT_TAGS]);\n\nconst htmlChildIsEmptyText = (child: Descendant | string | null | undefined) =>\n isNotNil(child) && !isString(child) && (child as Text).text?.trim() === '';\n\nconst createEditorBlockElements = (\n children: (Descendant | string | null)[],\n el: ChildNode | HTMLElement,\n): Descendant => {\n const { nodeName } = el;\n if (\n nodeName !== 'IMG' &&\n children.length === 1 &&\n !isString(children[0]) &&\n // @ts-expect-error - text is a property on NodeLeafObject.\n isNotNil(children[0].text) &&\n // Casting to Text as I don't want to further narrow the type in case I miss another type where it's valid. RM 2021-03-31\n (children[0] as Text).text?.trim() === ''\n ) {\n return jsx('element', ELEMENT_TAGS.P(), emptyTextNode);\n }\n const attrs = ELEMENT_TAGS[nodeName as keyof typeof ELEMENT_TAGS](el as HTMLElement);\n return jsx('element', attrs, children);\n};\n\nconst createEditorTextElements = (children: (Descendant | string | null)[], el: HTMLElement) => {\n const { nodeName } = el;\n const attrs = TEXT_TAGS[nodeName as keyof typeof TEXT_TAGS]();\n return children.map((child) => {\n if (!isString(child) && isNotNil(child) && isNotNil(child.children)) {\n return addAttrsToChildren(child, attrs);\n }\n // if a child's text node has an empty string\n // return an empty text node in its place without any of the trimmings (italic, strong, etc.)\n if (htmlChildIsEmptyText(child)) {\n return jsx('text', {}, emptyTextNode);\n }\n return jsx('text', attrs, child);\n });\n};\n\nconst blockWithOnlyTextChildren = (el: HTMLElement) =>\n el.nodeName === 'BLOCKQUOTE' || el.nodeName === 'OL' || el.nodeName === 'UL';\n\nconst getNodeChildren = (\n el: ChildNode | HTMLElement,\n mapper: (\n el: ChildNode | HTMLElement,\n ) => (Descendant | string | null)[] | Descendant | string | null,\n): (Descendant | Node | string | null)[] => {\n let children = [];\n if (isCodeBlck(el)) {\n children = [...el.childNodes].map(\n (node) =>\n // This helps us distinguish between code block content that should be treated as HTML vs. as text content\n // @ts-expect-error - TODO: I can't get into this conditional click testing, and I can't see how outerHTML would be valid from reading the code here.\n isTextNode(node) ? node.textContent : node.outerHTML, // eslint-disable-line @typescript-eslint/no-unsafe-return\n );\n } else if (blockWithOnlyTextChildren(el as HTMLElement)) {\n // Blockquotes, as rendered from our markdown, contain paragraphs, as well as blank text leaf nodes as their first and last children.\n // Ordered lists and unordered lists also contain blank text leaf nodes as their first and last children.\n // To avoid stripping those out via \"safeChildren\", and to allow for more sophisticated rendering of internal text nodes -- i.e. of bold/italic.etc. text within a blockquote's internal paragraph --\n // We remove the blank string content here.\n children = [...el.childNodes].filter((node) => node.textContent?.trim() !== '').flatMap(mapper);\n } else {\n children = [...el.childNodes].flatMap(mapper);\n }\n\n // TODO revisit this casting by instead being more specific about return types above.\n return children as (Descendant | Node | string | null)[];\n};\n\nconst deserializeHTMLNode = (\n el: ChildNode | HTMLElement,\n): (Descendant | string | null)[] | Descendant | string | null => {\n if (isTextNode(el)) {\n if (el.nodeValue?.trim() === '') {\n return null;\n }\n return el.textContent;\n }\n if (el.nodeName === 'BR') {\n return '\\n';\n }\n if (!isElement(el)) {\n return null;\n }\n\n const children = getNodeChildren(el, deserializeHTMLNode);\n // Only keep valid Descendant objects (with 'text' or 'type' properties), strings, or null values\n const filteredChildren = children.filter(\n (child): child is Descendant | string | null =>\n child === null ||\n typeof child === 'string' ||\n (typeof child === 'object' && ('text' in child || 'type' in child)),\n );\n // This allows us to handle \"empty\" elements, i.e, for those that we've removed text content from.\n // SlateJS blows up if we don't provide at least an empty text node as a child.\n const safeChildren =\n filteredChildren.length > 0 && filteredChildren[0] != null ? filteredChildren : [emptyTextNode];\n\n if (el.nodeName === 'BODY') {\n return jsx('fragment', {}, safeChildren);\n }\n\n if (shouldCreateBlck(el, children)) {\n return createEditorBlockElements(safeChildren, el);\n }\n\n if (shouldCreateText(el, safeChildren)) {\n return createEditorTextElements(safeChildren, el as HTMLElement);\n }\n\n return children;\n};\n\nexport const rteDeserializeHTML = (\n htmlString: string,\n): (Descendant | string | null)[] | Descendant | string | null | undefined => {\n if (!htmlString) {\n return undefined;\n }\n const parsedEl = new DOMParser().parseFromString(htmlString, 'text/html').body;\n const fragment = deserializeHTMLNode(parsedEl);\n // We need this in order to handle values from a plain text input\n // i.e., values entered into the Description field on the \"Set up your Channel\" form in the Create Channel flow.\n // If we don't do this, we'll get <body>some text</body>, which breaks the editor\n // Since there's no top-level block element wrapping the text.\n if (\n isNotNil(fragment) &&\n isArray(fragment) &&\n isNotNil(fragment[0]) &&\n // @ts-expect-error - I don't want to risk narrowing too far during the TS conversion. RM.\n isNotNil(fragment[0].text)\n ) {\n // @ts-expect-error - I don't want to risk narrowing too far during the TS conversion. RM.\n return [{ type: 'paragraph', children: [{ text: fragment[0].text as string }] }];\n }\n // If the last element added to the editor is NOT a paragraph,\n // Insert a paragraph as the last element\n // So the cursor is always escaped below the last element.\n const lastNodeOfFragment = isArray(fragment) ? fragment[fragment.length - 1] : undefined;\n if (\n isArray(fragment) &&\n Element.isElement(lastNodeOfFragment) &&\n lastNodeOfFragment.type !== 'paragraph'\n ) {\n return [...fragment, { type: 'paragraph', children: [{ text: '' }] }];\n }\n return fragment;\n};\n","// note: adapted from https://github.com/component/escape-html/blob/master/index.js because that's what we\n// were already using, but we should consider using https://www.npmjs.com/package/@wordpress/escape-html in the future\nconst matchHtmlRegExp = /[\"'&<>]/;\nconst doubleQuoteChar = 34; // \"\nconst ampersandChar = 38; // &\nconst singleQuoteChar = 39; // '\nconst lessThanChar = 60; // <\nconst greaterThanChar = 62; // >\n\n/**\n * Handle special characters by escaping in the provided text string.\n *\n * @param {string} stringToEscape - the string to escape\n * @return {string} - the escaped string\n */\nexport const escapeHtml = (stringToEscape: number | string | null | undefined): string => {\n const str = `${stringToEscape}`;\n const match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n let escape = '';\n let html = '';\n let index = 0;\n let lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n const charCode = str.charCodeAt(index);\n if (charCode === doubleQuoteChar) {\n escape = '&quot;';\n } else if (charCode === ampersandChar) {\n escape = '&amp;';\n } else if (charCode === singleQuoteChar) {\n escape = '&#39;';\n } else if (charCode === lessThanChar) {\n escape = '&lt;';\n } else if (charCode === greaterThanChar) {\n escape = '&gt;';\n } else {\n escape = '';\n }\n\n if (escape !== '') {\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n }\n\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n};\n","import { isNotNil } from '@wistia/type-guards';\nimport type { RenderLeafProps } from 'slate-react';\n\nexport const Leaf = ({\n attributes = { 'data-slate-leaf': true },\n children,\n leaf = {},\n}: RenderLeafProps) => {\n // Slate-React allows for children to be any type.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n let kids = children;\n if (isNotNil(leaf.bold)) {\n kids = <strong>{kids}</strong>;\n }\n\n if (isNotNil(leaf.italic)) {\n kids = <em>{kids}</em>;\n }\n\n if (isNotNil(leaf.underline)) {\n kids = <u>{kids}</u>;\n }\n\n if (isNotNil(leaf.strikethrough)) {\n kids = <s>{kids}</s>;\n }\n\n if (isNotNil(leaf.code)) {\n kids = <code>{kids}</code>;\n }\n\n return <span {...attributes}>{kids}</span>;\n};\n","import type { RenderElementProps } from 'slate-react';\nimport { useSelected, useFocused } from 'slate-react';\nimport { styled, css } from 'styled-components';\nimport type { JSX } from 'react';\n\nconst Wrapper = styled.span`\n display: inline-block;\n user-select: none;\n`;\n\ntype ImageProps = {\n selected: boolean;\n focused: boolean;\n};\nconst Image = styled.img<ImageProps>`\n box-shadow: ${({ selected, focused, theme }) =>\n selected && focused ? `0 0 0 3px ${theme.color.brandBlue500}` : 'none'};\n max-height: 10em;\n max-width: 100%;\n user-select: none;\n`;\n\nconst listStyle = css`\n padding: 0 ${({ theme }) => theme.spacing.space05};\n\n li {\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n margin: ${({ theme }) => `${theme.spacing.space02} 0`};\n }\n`;\n\nconst EditorOrderedList = styled.ol`\n ${listStyle}\n`;\n\nconst EditorUnorderedList = styled.ul`\n ${listStyle}\n`;\n\nconst headerStyle = css`\n font-weight: 500;\n`;\n\nconst EditorHeading1 = styled.h1`\n ${headerStyle}\n font-size: 18px;\n`;\n\nconst EditorHeading2 = styled.h2`\n ${headerStyle}\n font-size: 16px;\n`;\n\nconst EditorHeading3 = styled.h3`\n ${headerStyle}\n font-size: 14px;\n`;\n\nconst EditorParagraph = styled.p`\n font-weight: 400;\n`;\n\nconst EditorLink = styled.a`\n color: ${({ theme }) => theme.color.brandBlue500};\n font-weight: 300;\n`;\n\nconst EditorSpan = styled.span`\n font-weight: 400;\n`;\n\nexport const Element = ({\n attributes = {\n 'data-slate-node': 'element',\n ref: undefined,\n },\n children = undefined,\n element = {},\n}: RenderElementProps): JSX.Element => {\n const selected = useSelected();\n const focused = useFocused();\n\n switch (element.type) {\n case 'span':\n return <EditorSpan {...attributes}>{children}</EditorSpan>;\n case 'blockquote':\n return <blockquote {...attributes}>{children}</blockquote>;\n case 'bulleted-list':\n return <EditorUnorderedList {...attributes}>{children}</EditorUnorderedList>;\n case 'heading-one':\n return <EditorHeading1 {...attributes}>{children}</EditorHeading1>;\n case 'heading-two':\n return <EditorHeading2 {...attributes}>{children}</EditorHeading2>;\n // We render h4-h6 as h3s in the editor UI per Design request\n // (Though we preserve the original headers \"under the hood\" in the HTML).\n case 'heading-three':\n case 'heading-four':\n case 'heading-five':\n case 'heading-six':\n return <EditorHeading3 {...attributes}>{children}</EditorHeading3>;\n case 'list-item':\n return <li {...attributes}>{children}</li>;\n case 'numbered-list':\n return <EditorOrderedList {...attributes}>{children}</EditorOrderedList>;\n case 'image':\n return (\n <Wrapper {...attributes}>\n <Wrapper contentEditable={false}>\n <Image\n alt=\"\"\n contentEditable={false}\n focused={focused}\n selected={selected}\n src={element.url}\n />\n </Wrapper>\n {children}\n </Wrapper>\n );\n case 'link':\n return (\n <EditorLink\n {...attributes}\n href={element.url}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n {children}\n </EditorLink>\n );\n case 'code':\n return <code {...attributes}>{children}</code>;\n case undefined:\n default:\n return <EditorParagraph {...attributes}>{children}</EditorParagraph>;\n }\n};\n","import type { MouseEvent, ReactNode, JSX } from 'react';\nimport type { Editor } from 'slate';\nimport { useSlate } from 'slate-react';\nimport { styled } from 'styled-components';\nimport { Node } from 'slate';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport {\n rteFormatTypes,\n insertImage,\n insertLink,\n isBlockActive,\n toggleBlck,\n isMarkActive,\n toggleMark,\n} from './utilities';\nimport { Icon } from '../../private/components/Icon';\nimport { IconButton } from '../IconButton/IconButton';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\nconst ButtonContainer = styled.div`\n background: white;\n border-bottom: 1px solid ${({ theme }) => theme.color.grey400};\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n padding: ${({ theme }) => theme.spacing.space02} 0;\n position: sticky;\n top: 0;\n\n /*\n * needs a stacking context to stay above RTE content\n * did not add to theme because it doesn't interact with any other components\n */\n z-index: 1;\n`;\n\ntype EditorButtonProps = {\n buttonType: 'block' | 'mark';\n disabled?: boolean;\n format?: string;\n icon?: ReactNode;\n onCustomClick?: (event: MouseEvent) => unknown;\n};\n\nconst EditorButton = ({\n format = '',\n icon,\n disabled = false,\n onCustomClick,\n buttonType = 'block',\n}: EditorButtonProps) => {\n const editor = useSlate();\n const activeButtonColor = useThemeColor('brandBlue500');\n const isActive =\n buttonType === 'block' ? isBlockActive(editor, format) : isMarkActive(editor, format);\n const handleClick = (event: MouseEvent) => {\n // this prevents the event from bubbling up and causing form submissions in Formik\n event.preventDefault();\n if (buttonType === 'block') {\n toggleBlck(editor, format);\n } else {\n toggleMark(editor, format);\n }\n if (onCustomClick) {\n onCustomClick(event);\n }\n };\n\n const buttonColor = isActive ? activeButtonColor : undefined;\n\n return (\n <IconButton\n aria-pressed={isActive}\n colorOverride={buttonColor}\n disabled={disabled}\n icon={icon}\n label={format}\n onClick={handleClick}\n preventTooltip={true}\n />\n );\n};\n\nconst getSelectedText = (editor: Editor): string => {\n if (!editor.selection) {\n return '';\n }\n const nodeFragment = Node.fragment(editor, editor.selection);\n if (!nodeFragment[0]) {\n return '';\n }\n return Node.string(nodeFragment[0]);\n};\n\nconst noTextSelected = (editor: Editor) => {\n const userSelection = getSelectedText(editor);\n return userSelection.trim() === '';\n};\n\nexport type EditorButtonsProps = {\n disabled?: boolean;\n enabledFormats?: (keyof typeof rteFormatTypes)[];\n};\n\nexport const EditorButtons = ({\n enabledFormats = ['BOLD', 'ITALIC', 'HEADING_1', 'LINK', 'BULLETED_LIST', 'IMAGE'],\n disabled = false,\n}: EditorButtonsProps): JSX.Element => {\n const editor = useSlate();\n return (\n <ButtonContainer>\n {enabledFormats.includes(rteFormatTypes.BOLD) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"bold\"\n icon={<Icon type=\"bold\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.ITALIC) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"italic\"\n icon={<Icon type=\"italic\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.HEADING_1) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"heading-one\"\n icon={<Icon type=\"heading\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.HEADING_2) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"heading-two\"\n icon={<Icon type=\"heading-two\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.BULLETED_LIST) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"bulleted-list\"\n icon={<Icon type=\"bulleted-list\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.NUMBERED_LIST) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"numbered-list\"\n icon={<Icon type=\"numbered-list\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.BLOCKQUOTE) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"blockquote\"\n icon={<Icon type=\"block-quote\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.UNDERLINE) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"underline\"\n icon={<Icon type=\"underline\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.STRIKETHROUGH) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled}\n format=\"strikethrough\"\n icon={<Icon type=\"strikethrough\" />}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.LINK) && (\n <EditorButton\n buttonType=\"mark\"\n disabled={disabled || noTextSelected(editor)}\n format=\"link\"\n icon={<Icon type=\"link\" />}\n onCustomClick={(event) => {\n event.preventDefault();\n insertLink(editor);\n }}\n />\n )}\n {enabledFormats.includes(rteFormatTypes.IMAGE) && (\n <EditorButton\n buttonType=\"block\"\n disabled={disabled}\n format=\"image\"\n icon={<Icon type=\"image\" />}\n onCustomClick={(event: MouseEvent) => {\n event.preventDefault();\n // eslint-disable-next-line no-alert\n const promptUserForImageUrl = prompt('Enter the URL of the image:');\n if (!isNonEmptyString(promptUserForImageUrl)) {\n return;\n }\n insertImage(editor, promptUserForImageUrl);\n }}\n />\n )}\n </ButtonContainer>\n );\n};\n","import type { Node, Editor } from 'slate';\nimport { Transforms, Element, Text } from 'slate';\nimport { isNotUndefined, isNotNil } from '@wistia/type-guards';\nimport { toggleBlck } from './toggle';\nimport { isUrl } from '../../../helpers/stringHelpers/isUrl';\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst emptyTextNode = { text: '' };\nconst imageExtensions = ['jpg', 'png', 'gif', 'tiff', 'bmp', 'dcm'];\n\nconst isImageUrl = (url: string) => {\n if (!isUrl(url)) {\n return false;\n }\n const hasImageExtension = imageExtensions.find((event) => url.includes(event));\n return isNotUndefined(hasImageExtension) && Boolean(hasImageExtension);\n};\n\nexport const insertImage = (editor: Editor, url: string) => {\n if (!url) {\n toggleBlck(editor, 'image');\n return;\n }\n if (!isImageUrl(url)) {\n toggleBlck(editor, 'image');\n return;\n }\n\n const image = { type: 'image', url, children: [emptyTextNode] };\n Transforms.insertNodes(editor, image);\n};\n\nexport const withImages = (editor: Editor): Editor => {\n const { normalizeNode, isVoid } = editor;\n // eslint-disable-next-line no-param-reassign\n editor.isVoid = (element: Element) => (element.type === 'image' ? true : isVoid(element));\n\n // eslint-disable-next-line no-param-reassign\n editor.normalizeNode = ([node, path]: [Node, number[]]) => {\n if (Element.isElement(node) && node.type === 'image' && node.url !== undefined) {\n const paragraph = {\n type: 'paragraph',\n children: [emptyTextNode],\n };\n\n const pathIndex = isNotUndefined(path[0]) ? path[0] + 1 : 1;\n Transforms.insertNodes(editor, paragraph, { at: [pathIndex] });\n Transforms.move(editor);\n }\n if (\n Element.isElement(node) &&\n node.type === 'image' &&\n node.url === undefined &&\n isNotUndefined(node.children) &&\n isNotUndefined(node.children[0]) &&\n isNotUndefined(node.children[0].text) &&\n node.children[0].text.trim() !== ''\n ) {\n Transforms.setNodes(\n editor,\n { type: 'span' },\n {\n match: (matchNode: Node) =>\n Element.isElement(matchNode) &&\n matchNode.type === 'image' &&\n matchNode.url === undefined &&\n isNotUndefined(matchNode.children) &&\n Text.isText(matchNode.children[0]) &&\n isNotNil(matchNode.children[0].text) &&\n matchNode.children[0].text.trim() !== '',\n split: true,\n at: path,\n mode: 'highest',\n },\n );\n }\n normalizeNode([node, path]);\n };\n\n return editor;\n};\n","import type { Node, Editor } from 'slate';\nimport { Element, Transforms, Editor as SlateEditor } from 'slate';\nimport { isNotNil, isNonEmptyString } from '@wistia/type-guards';\n\nexport const isBlockActive = (editor: Editor, format: string): boolean => {\n const [match] = SlateEditor.nodes(editor, {\n match: (node: Node) => Element.isElement(node) && node.type === format,\n });\n return Boolean(match);\n};\n\nconst LIST_TYPES = new Set(['numbered-list', 'bulleted-list']);\n\n// https://github.com/aelbore/esbuild-jest/issues/57#issuecomment-1005756206\n// Note that \"toggleBlck\" is intentionally missing an 'o' to avoid an issue with\n// esbuild-jest. Unfortunately it does work to have the characters \"ock (\" [minus the space]\n// within a file that also has TS annotations, and the failure can somtimes only be found\n// when tests are run in CI.\n// The preset-typescript babel solution suggested in that issue broke storybook props.\nexport const toggleBlck = (editor: Editor, format: string): void => {\n const isActive = isBlockActive(editor, format);\n\n const isList = LIST_TYPES.has(format);\n Transforms.unwrapNodes(editor, {\n match: (node: Node) =>\n Element.isElement(node) && isNotNil(node.type) && LIST_TYPES.has(node.type),\n split: true,\n });\n const formatting = isList ? 'list-item' : format;\n\n Transforms.setNodes(editor, {\n type: isActive ? 'paragraph' : formatting,\n });\n\n if (!isActive && isList) {\n const block = { type: format, children: [] };\n Transforms.wrapNodes(editor, block);\n }\n};\n\nexport const isMarkActive = (editor: Editor, format: string): boolean => {\n const valueMarks = SlateEditor.marks(editor);\n return isNonEmptyString(valueMarks && Object.keys(valueMarks).find((mark) => mark === format));\n};\n\nexport const toggleMark = (editor: Editor, format: string) => {\n const isActive = isMarkActive(editor, format);\n\n if (isActive) {\n SlateEditor.removeMark(editor, format);\n } else {\n SlateEditor.addMark(editor, format, true);\n }\n};\n","import { Transforms, Element, Node, Editor, Range, Path } from 'slate';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { toggleMark } from './toggle';\nimport { isUrl } from '../../../helpers/stringHelpers/isUrl';\nimport type { CustomEditor } from '../types';\n\nconst isHashUrl = (urlString: string) => {\n const urlPattern = /^#.+$/i;\n return Boolean(urlPattern.test(urlString));\n};\n\nconst isLinkActive = (editor: Editor) => {\n const [link] = Editor.nodes(editor, {\n match: (node: Node) => Element.isElement(node) && node.type === 'link',\n });\n return Boolean(link);\n};\n\nconst unwrapLink = (editor: Editor) => {\n Transforms.unwrapNodes(editor, {\n match: (node: Node) => Element.isElement(node) && node.type === 'link',\n });\n};\n\nconst wrapLink = (editor: Editor, url: string) => {\n if (isLinkActive(editor)) {\n unwrapLink(editor);\n }\n\n const { selection } = editor;\n const isCollapsed = selection && Range.isCollapsed(selection);\n const link = {\n type: 'link',\n url,\n children: isCollapsed === true ? [{ text: url }] : [],\n };\n\n if (isCollapsed === true) {\n Transforms.insertNodes(editor, link);\n } else {\n Transforms.wrapNodes(editor, link, { split: true });\n Transforms.collapse(editor, { edge: 'end' });\n }\n};\n\nexport const withLinks = (editor: CustomEditor) => {\n const { insertData, insertText, isInline, normalizeNode } = editor;\n\n // eslint-disable-next-line no-param-reassign\n editor.isInline = (element: Element) => (element.type === 'link' ? true : isInline(element));\n\n // eslint-disable-next-line no-param-reassign\n editor.insertText = (text: string) => {\n if (text && isUrl(text)) {\n wrapLink(editor, text);\n } else {\n insertText(text);\n }\n };\n\n // eslint-disable-next-line no-param-reassign\n editor.insertData = (data: DataTransfer) => {\n const text = data.getData('text/plain');\n\n if (text && isUrl(text)) {\n wrapLink(editor, text);\n } else {\n insertData(data);\n }\n };\n\n // eslint-disable-next-line no-param-reassign\n editor.normalizeNode = ([node, path]: [Node, Path]) => {\n if (Element.isElement(node) && node.type === 'link' && Node.string(node) === '') {\n Transforms.unwrapNodes(editor, { at: path });\n Transforms.select(editor, Path.next(path));\n }\n normalizeNode([node, path]);\n };\n\n return editor;\n};\n\nexport const insertLink = (editor: Editor) => {\n if (isLinkActive(editor)) {\n unwrapLink(editor);\n } else {\n // eslint-disable-next-line no-alert\n const url = prompt('Enter the URL of the link:');\n\n if (!isNonEmptyString(url)) {\n toggleMark(editor, 'link');\n return;\n }\n\n const urlHasSpaces = url.includes(' ');\n if (urlHasSpaces) {\n // eslint-disable-next-line no-alert\n alert('The URL provided had spaces. Try again without spaces.');\n toggleMark(editor, 'link');\n return;\n }\n\n if (!isUrl(url) && !isHashUrl(url)) {\n // eslint-disable-next-line no-alert\n alert(\n 'The URL provided looks invalid. Try again. Make sure to include the protocol (ex. https://) in the URL.',\n );\n toggleMark(editor, 'link');\n return;\n }\n\n if (editor.selection) {\n wrapLink(editor, url);\n }\n }\n};\n","import type { EditorInterface, Descendant, Node } from 'slate';\nimport { Transforms, Range, Editor, Element } from 'slate';\nimport type { NodeLeafObject } from '../types';\n\n// Allowing non-null assertions in this file for sake of TS conversion.\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\n/*\n * This \"Monkey Patch\" of sorts is needed to circumvent a dumb issue with\n * esbuild https://github.com/aelbore/esbuild-jest/issues/57#issuecomment-1005756206\n *\n * TL;DR \"ock (\" (without the space) breaks ESBuild, so we remove the o from isBlock...\n */\nconst OverriddenEditor: EditorInterface & { isBlck: typeof Editor.isBlock } = {\n ...Editor,\n isBlck: Editor.isBlock,\n};\n\n// All Element nodes must contain at least one Text descendant.\n// If an element node does not contain any children,\n// an empty text node will be added as its only child.\n// Read more at https://docs.slatejs.org/concepts/10-normalizing\nconst newLine = {\n type: 'paragraph',\n children: [\n {\n text: '',\n marks: [],\n },\n ],\n};\n\nconst isLastChildBlankText = (listChildren: Descendant[] | NodeLeafObject[]): boolean => {\n if (listChildren.length === 1) {\n // @ts-expect-error - Text does exist on some sub-types of nodes.\n return (listChildren[listChildren.length - 1]?.text as string | null)?.trim() === '';\n }\n // Links need to be handled differently because they're surrounded by empty text by SlateJS design here.\n const link = listChildren.find((el) => el.type === 'link');\n return link?.children![0]?.text?.trim() === '';\n};\n\nexport const handleListEscape = (editor: Editor): void => {\n const { selection } = editor;\n const textIsNotSelected = selection && Range.isCollapsed(selection);\n const selectedElement = editor.children[selection!.anchor.path[0]!]!;\n const isList =\n selectedElement.type === 'bulleted-list' || selectedElement.type === 'numbered-list';\n const blockAbove = OverriddenEditor.above(editor, {\n match: (node: Node) => Element.isElement(node) && OverriddenEditor.isBlck(editor, node),\n })!;\n if ((textIsNotSelected ?? false) && isList && isLastChildBlankText(blockAbove[0].children!)) {\n Transforms.removeNodes(editor, { hanging: true });\n Transforms.insertNodes(editor, newLine);\n Transforms.unwrapNodes(editor, {\n // @ts-expect-error - type does exist on some sub-types of nodes.\n match: ({ type }: { type?: string }) => type === 'bulleted-list' || type === 'numbered-list',\n all: true,\n split: true,\n });\n }\n};\n","export const rteFormatTypes = Object.freeze({\n BOLD: 'BOLD',\n ITALIC: 'ITALIC',\n UNDERLINE: 'UNDERLINE',\n STRIKETHROUGH: 'STRIKETHROUGH',\n HEADING_1: 'HEADING_1',\n HEADING_2: 'HEADING_2',\n BLOCKQUOTE: 'BLOCKQUOTE',\n NUMBERED_LIST: 'NUMBERED_LIST',\n BULLETED_LIST: 'BULLETED_LIST',\n LINK: 'LINK',\n IMAGE: 'IMAGE',\n});\n","import { isNil } from '@wistia/type-guards';\nimport type { JSX } from 'react';\nimport { iconMap } from './iconMap';\nimport * as iconsManifest from './icons';\n\n// size in pixels\nexport const iconSizeMap = {\n sm: '12',\n md: '16',\n lg: '24',\n xl: '32',\n xxl: '48',\n};\n\nexport type IconProps = {\n /**\n * Color (as hex) of the Icon\n */\n color?: string;\n /**\n * The size of the icon to display\n */\n size?: keyof typeof iconSizeMap;\n /**\n * @ignore\n */\n style?: Record<string, unknown>;\n /**\n * Determines which icon to display\n */\n type: keyof typeof iconMap;\n};\n\nexport const Icon = ({\n color = 'currentColor',\n size = 'lg',\n style,\n type,\n ...otherProps\n}: IconProps): JSX.Element => {\n if (isNil(type)) {\n throw new Error('An Icon component requires a `type` prop to be provided');\n }\n\n if (isNil(iconMap[type])) {\n throw new Error(`Type \"${type}\" does not exist, please update type prop in Icon component.`);\n }\n\n if (isNil(iconSizeMap[size])) {\n throw new Error(`Size \"${size}\" does not exist, please update size prop in Icon component.`);\n }\n\n const IconElement = iconsManifest[iconMap[type] as keyof typeof iconsManifest];\n\n // so we do not have to add this to each individual Icon but still allow overrides\n const defaultStyle = { verticalAlign: 'middle', ...style };\n\n return (\n <IconElement\n aria-hidden=\"true\"\n color={color}\n height={`${iconSizeMap[size]}px`}\n role=\"presentation\"\n style={defaultStyle}\n viewBox=\"0 0 24 24\"\n width={`${iconSizeMap[size]}px`}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...otherProps}\n />\n );\n};\n\nIcon.displayName = 'Icon';\n","export const iconMap = {\n 'block-quote': 'BlockQuote',\n bold: 'Bold',\n 'bulleted-list': 'BulletedList',\n heading: 'Heading',\n 'heading-two': 'HeadingTwo',\n image: 'Image',\n italic: 'Italic',\n link: 'Link',\n 'numbered-list': 'NumberedList',\n strikethrough: 'Strikethrough',\n underline: 'Underline',\n};\n","export { BlockQuote } from './BlockQuote';\nexport { Bold } from './Bold';\nexport { BulletedList } from './BulletedList';\nexport { Heading } from './Heading';\nexport { HeadingTwo } from './HeadingTwo';\nexport { Image } from './Image';\nexport { Italic } from './Italic';\nexport { Link } from './Link';\nexport { NumberedList } from './NumberedList';\nexport { Strikethrough } from './Strikethrough';\nexport { Underline } from './Underline';\n","import type { SVGProps } from 'react';\n\nexport const BlockQuote = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M4.2125 11.0375C4.35417 11.1792 4.53333 11.25 4.75 11.25H19.25C19.4667 11.25 19.6458 11.1792 19.7875 11.0375C19.9292 10.8958 20 10.7167 20 10.5C20 10.2833 19.9292 10.1042 19.7875 9.9625C19.6458 9.82083 19.4667 9.75 19.25 9.75H4.75C4.53333 9.75 4.35417 9.82083 4.2125 9.9625C4.07083 10.1042 4 10.2833 4 10.5C4 10.7167 4.07083 10.8958 4.2125 11.0375ZM4.2125 14.0375C4.35417 14.1792 4.53333 14.25 4.75 14.25H12.975C13.1917 14.25 13.3708 14.1792 13.5125 14.0375C13.6542 13.8958 13.725 13.7167 13.725 13.5C13.725 13.2833 13.6542 13.1042 13.5125 12.9625C13.3708 12.8208 13.1917 12.75 12.975 12.75H4.75C4.53333 12.75 4.35417 12.8208 4.2125 12.9625C4.07083 13.1042 4 13.2833 4 13.5C4 13.7167 4.07083 13.8958 4.2125 14.0375ZM1.5 10C1.22386 10 1 10.2239 1 10.5V14C1 14.2761 1.22386 14.5 1.5 14.5C1.77614 14.5 2 14.2761 2 14V10.5C2 10.2239 1.77614 10 1.5 10Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Bold = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M16.9995 11.7C18.354 10.743 19.302 9.17101 19.302 7.71451C19.302 4.48501 16.86 1.99951 13.722 1.99951H4.998V22.0005H14.823C17.7375 22.0005 19.998 19.5705 19.998 16.5855C19.998 14.415 18.798 12.5565 16.998 11.7H16.9995ZM9.186 5.57101H13.371C14.5305 5.57101 15.465 6.52801 15.465 7.71451C15.465 8.89951 14.5305 9.85651 13.3725 9.85651H9.186V5.57101ZM14.07 18.429H9.186V14.1435H14.07C15.228 14.1435 16.1625 15.1005 16.1625 16.2855C16.1625 17.4705 15.228 18.429 14.07 18.429V18.429Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const BulletedList = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M4.0005 10.5C3.1695 10.5 2.5005 11.1705 2.5005 12C2.5005 12.8295 3.1695 13.5 4.0005 13.5C4.83 13.5 5.5005 12.8295 5.5005 12C5.5005 11.1705 4.83 10.5 4.0005 10.5ZM4.0005 4.5C3.1695 4.5 2.5005 5.1705 2.5005 6C2.5005 6.8295 3.1695 7.5 4.0005 7.5C4.83 7.5 5.5005 6.8295 5.5005 6C5.5005 5.1705 4.83 4.5 4.0005 4.5ZM4.0005 16.5C3.1695 16.5 2.5005 17.1795 2.5005 18C2.5005 18.8205 3.18 19.5 4.0005 19.5C4.8195 19.5 5.5005 18.8205 5.5005 18C5.5005 17.1795 4.83 16.5 4.0005 16.5ZM7.0005 19.0005H21V16.9995H7.0005V19.0005ZM7.0005 13.0005H21V10.9995H7.0005V13.0005ZM7.0005 4.9995V7.0005H21V4.9995H7.0005Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Heading = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M7.9995 3V6.7995H14.154V22.0005H17.8455V6.7995H24V3H7.9995ZM0 12.9H3.666V22.0005H7.335V12.9H11.001V9H0V12.9Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const HeadingTwo = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M3 17V7H4.5V11.25H9V7H10.5V17H9V12.75H4.5V17H3ZM13.5 17V12.75C13.5 12.3333 13.6458 11.9792 13.9375 11.6875C14.2292 11.3958 14.5833 11.25 15 11.25H19.5V8.5H13.5V7H19.5C19.9167 7 20.2708 7.14583 20.5625 7.4375C20.8542 7.72917 21 8.08333 21 8.5V11.25C21 11.6667 20.8542 12.0208 20.5625 12.3125C20.2708 12.6042 19.9167 12.75 19.5 12.75H15V15.5H21V17H13.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Image = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M21 19.0005V4.9995C21 3.9 20.1 3 19.0005 3H4.9995C3.9 3 3 3.9 3 4.9995V19.0005C3 20.1 3.9 21 4.9995 21H19.0005C20.1 21 21 20.1 21 19.0005ZM8.5005 13.5L10.9995 16.5105L14.5005 12L19.0005 18H4.9995L8.5005 13.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Italic = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M8.8335 1.99951V6.28501H12.0555L7.0695 17.715H3V22.0005H14.667V17.715H11.4435L16.431 6.28501H20.5005V1.99951H8.8335Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Link = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M2.28 12C2.28 9.948 3.948 8.28 6 8.28H10.8V6H6C2.688 6 0 8.688 0 12C0 15.312 2.688 18 6 18H10.8V15.72H6C3.948 15.72 2.28 14.052 2.28 12ZM7.2 13.2H16.8V10.8H7.2V13.2ZM18 6H13.2V8.28H18C20.052 8.28 21.72 9.948 21.72 12C21.72 14.052 20.052 15.72 18 15.72H13.2V18H18C21.312 18 24 15.312 24 12C24 8.688 21.312 6 18 6Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const NumberedList = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M3.425 20C3.30833 20 3.20833 19.9583 3.125 19.875C3.04167 19.7917 3 19.6917 3 19.575C3 19.4583 3.04167 19.3583 3.125 19.275C3.20833 19.1917 3.30833 19.15 3.425 19.15H5.1V18.5H4.475C4.35833 18.5 4.25833 18.4583 4.175 18.375C4.09167 18.2917 4.05 18.1917 4.05 18.075C4.05 17.9583 4.09167 17.8583 4.175 17.775C4.25833 17.6917 4.35833 17.65 4.475 17.65H5.1V17H3.425C3.30833 17 3.20833 16.9583 3.125 16.875C3.04167 16.7917 3 16.6917 3 16.575C3 16.4583 3.04167 16.3583 3.125 16.275C3.20833 16.1917 3.30833 16.15 3.425 16.15H5.525C5.64167 16.15 5.74167 16.1917 5.825 16.275C5.90833 16.3583 5.95 16.4583 5.95 16.575V19.575C5.95 19.6917 5.90833 19.7917 5.825 19.875C5.74167 19.9583 5.64167 20 5.525 20H3.425ZM4.475 7.9C4.35833 7.9 4.25833 7.85833 4.175 7.775C4.09167 7.69167 4.05 7.59167 4.05 7.475V4.85H3.425C3.30833 4.85 3.20833 4.80833 3.125 4.725C3.04167 4.64167 3 4.54167 3 4.425C3 4.30833 3.04167 4.20833 3.125 4.125C3.20833 4.04167 3.30833 4 3.425 4H4.475C4.59167 4 4.69167 4.04167 4.775 4.125C4.85833 4.20833 4.9 4.30833 4.9 4.425V7.475C4.9 7.59167 4.85833 7.69167 4.775 7.775C4.69167 7.85833 4.59167 7.9 4.475 7.9V7.9ZM3.425 13.925C3.30833 13.925 3.20833 13.8833 3.125 13.8C3.04167 13.7167 3 13.6167 3 13.5V13.275C3 13.2583 3.03333 13.1667 3.1 13L4.875 10.925H3.425C3.30833 10.925 3.20833 10.8833 3.125 10.8C3.04167 10.7167 3 10.6167 3 10.5C3 10.3833 3.04167 10.2833 3.125 10.2C3.20833 10.1167 3.30833 10.075 3.425 10.075H5.525C5.64167 10.075 5.74167 10.1167 5.825 10.2C5.90833 10.2833 5.95 10.3833 5.95 10.5V10.725C5.95 10.7417 5.91667 10.8333 5.85 11L4.05 13.075H5.525C5.64167 13.075 5.74167 13.1167 5.825 13.2C5.90833 13.2833 5.95 13.3833 5.95 13.5C5.95 13.6167 5.90833 13.7167 5.825 13.8C5.74167 13.8833 5.64167 13.925 5.525 13.925H3.425ZM8.975 18.775C8.75833 18.775 8.57917 18.7042 8.4375 18.5625C8.29583 18.4208 8.225 18.2417 8.225 18.025C8.225 17.8083 8.29583 17.6292 8.4375 17.4875C8.57917 17.3458 8.75833 17.275 8.975 17.275H20.25C20.4667 17.275 20.6458 17.3458 20.7875 17.4875C20.9292 17.6292 21 17.8083 21 18.025C21 18.2417 20.9292 18.4208 20.7875 18.5625C20.6458 18.7042 20.4667 18.775 20.25 18.775H8.975ZM8.975 12.7C8.75833 12.7 8.57917 12.6292 8.4375 12.4875C8.29583 12.3458 8.225 12.1667 8.225 11.95C8.225 11.7333 8.29583 11.5542 8.4375 11.4125C8.57917 11.2708 8.75833 11.2 8.975 11.2H20.25C20.4667 11.2 20.6458 11.2708 20.7875 11.4125C20.9292 11.5542 21 11.7333 21 11.95C21 12.1667 20.9292 12.3458 20.7875 12.4875C20.6458 12.6292 20.4667 12.7 20.25 12.7H8.975ZM8.975 6.625C8.75833 6.625 8.57917 6.55417 8.4375 6.4125C8.29583 6.27083 8.225 6.09167 8.225 5.875C8.225 5.65833 8.29583 5.47917 8.4375 5.3375C8.57917 5.19583 8.75833 5.125 8.975 5.125H20.25C20.4667 5.125 20.6458 5.19583 20.7875 5.3375C20.9292 5.47917 21 5.65833 21 5.875C21 6.09167 20.9292 6.27083 20.7875 6.4125C20.6458 6.55417 20.4667 6.625 20.25 6.625H8.975Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Strikethrough = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M2 13.75V12.25H22V13.75H2ZM10.75 10.75V6.5H5V4H19V6.5H13.25V10.75H10.75ZM10.75 20V15.25H13.25V20H10.75Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { SVGProps } from 'react';\n\nexport const Underline = (props: SVGProps<SVGSVGElement>) => (\n <svg {...props}>\n <path\n d=\"M5 21V19.5H19V21H5ZM12 17C10.3167 17 8.89583 16.425 7.7375 15.275C6.57917 14.125 6 12.7167 6 11.05V3H8V11.1C8 12.2 8.38333 13.125 9.15 13.875C9.91667 14.625 10.8667 15 12 15C13.1333 15 14.0833 14.625 14.85 13.875C15.6167 13.125 16 12.2 16 11.1V3H18V11.05C18 12.7167 17.4208 14.125 16.2625 15.275C15.1042 16.425 13.6833 17 12 17Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import type { RefObject, ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport { isNonEmptyString } from '@wistia/type-guards';\nimport { Backdrop } from '../Backdrop';\nimport type { OnBeforeHideInterface } from '../ModalBase';\nimport { ModalBase } from '../ModalBase';\nimport { Button } from '../Button';\nimport { CloseIcon } from '../CloseButton/CloseIcon';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\n// TODO use a shared close button\nconst CloseButton = styled(Button)`\n color: ${({ theme }) => theme.color.grey700};\n height: 42px;\n position: fixed;\n right: ${({ theme }) => theme.spacing.space05};\n top: ${({ theme }) => theme.spacing.space05};\n width: 42px;\n\n &:hover {\n color: ${({ theme }) => theme.color.grey900};\n }\n`;\n\nexport type FullScreenModalProps = {\n /**\n * Color of the modal background\n */\n backgroundColor?: string;\n /**\n * Contents of the modal\n */\n content: (hide: () => unknown) => ReactNode;\n /**\n * Render the modal initially in shown state\n */\n initialShownState?: boolean;\n /**\n * Callback invoked before the modal is hidden\n */\n onBeforeHide?: (() => OnBeforeHideInterface) | undefined;\n /**\n * Callback invoked when the modal is shown\n */\n onHide?: () => unknown;\n /**\n * function(show, ref) that returns a node to open the modal\n */\n toggle?:\n | ((\n show: () => unknown,\n toggleButtonRef?: RefObject<HTMLElement | null | undefined>,\n ) => ReactNode)\n | undefined;\n};\n\nexport const FullScreenModal = ({\n content,\n toggle,\n backgroundColor,\n initialShownState = false,\n onBeforeHide,\n onHide,\n}: FullScreenModalProps) => {\n const defaultBackgroundColor = useThemeColor('grey100');\n\n return (\n <ModalBase\n initialShownState={initialShownState}\n onBeforeHide={onBeforeHide}\n onHide={onHide}\n render={(hide) => (\n <Backdrop\n backgroundColor={\n isNonEmptyString(backgroundColor) ? backgroundColor : defaultBackgroundColor\n }\n >\n <CloseButton\n noStyle={true}\n onClick={hide}\n title=\"Close\"\n >\n <CloseIcon />\n </CloseButton>\n {content(hide)}\n </Backdrop>\n )}\n toggle={toggle}\n />\n );\n};\n\nFullScreenModal.displayName = 'FullScreenModal_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\n\nconst getFillStyle = ($fillContainer: boolean | string): string | undefined => {\n if ($fillContainer === 'horizontal') {\n return 'width: 100%;';\n }\n if ($fillContainer === 'vertical') {\n return 'height: 100%;';\n }\n if ($fillContainer === true) {\n return `\n width: 100%;\n height: 100%;\n `;\n }\n return undefined;\n};\n\nexport type ImageComponentProps = {\n $fillContainer: boolean | 'horizontal' | 'vertical';\n $objFit?: string | undefined;\n $objPosition?: string | undefined;\n};\n\nconst ImageComponent = styled.img<ImageComponentProps>`\n ${({ $fillContainer }) => getFillStyle($fillContainer)};\n object-fit: ${({ $objFit }) => $objFit};\n object-position: ${({ $objPosition }) => $objPosition};\n`;\n\nexport type ImageProps = ComponentPropsWithoutRef<'img'> & {\n /**\n * Accessible text to apply to the image\n */\n alt: string;\n /**\n * Specifies whether the width and/or height should fill the container\n *\n * *Note: this will override height/width attributes*\n */\n fill?: boolean | 'horizontal' | 'vertical';\n /**\n * Specifies how the image's intrinsic size (ie. its natural size) should\n * be adjusted to fit within its container\n */\n fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';\n /**\n * Indicates how the browser should load the image; `eager`loads the image immediately,\n * `lazy` defers loading the image until it reaches a calculated distance from the viewport.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading\n */\n loading?: 'eager' | 'lazy';\n /**\n * Specifies how the image will align itself in its container\n */\n position?: string;\n /**\n * URL to image file\n */\n src: string;\n};\n\nexport const Image = ({\n src,\n alt,\n fill: fillContainer = false,\n fit: objFit,\n loading = 'lazy',\n position: objPosition,\n ...otherProps\n}: ImageProps): JSX.Element => (\n <ImageComponent\n $fillContainer={fillContainer}\n $objFit={objFit}\n $objPosition={objPosition}\n alt={alt}\n loading={loading}\n src={src}\n {...otherProps}\n />\n);\n\nImage.displayName = 'Image_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil, isArray } from '@wistia/type-guards';\nimport type { KeyboardKeys } from './KeyboardKeyTypes';\n\nexport type KeyboardShortcutProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * @description The visual style of the keyboard shortcut. Choose light if the background is dark and dark if the background is light.\n */\n componentStyle?: 'dark' | 'light';\n /**\n * @description If set to true, the keyboard shortcut will stretch the full width of its container.\n */\n fullWidth?: boolean;\n /**\n * @description The keys displayed.\n */\n keyboardKeys: KeyboardKeys | KeyboardKeys[];\n /**\n * @description A visual label for the keyboard shortcut.\n */\n label?: string;\n};\n\ntype LabelProps = {\n $componentStyle: 'dark' | 'light';\n};\n\ntype KeyboardShortcutComponentProps = {\n $componentStyle: 'dark' | 'light';\n $fullWidth: boolean;\n};\n\ntype StyledKeyProps = {\n $componentStyle: 'dark' | 'light';\n};\n\nconst KeyboardShortcutComponent = styled.div<KeyboardShortcutComponentProps>`\n align-items: center;\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n ${({ $fullWidth }) => $fullWidth && 'width: 100%; justify-content: space-between;'}\n`;\n\nconst StyledKey = styled.kbd<StyledKeyProps>`\n align-items: center;\n background: ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey200 : theme.color.grey600};\n border-bottom: 1px solid\n ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey400 : theme.color.grey800};\n border-radius: 4px;\n color: ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey700 : theme.color.grey100};\n display: flex;\n font-family: InterVariable, sans-serif;\n\n /* Adds serif to uppercase \"I\" to distinguish it from \"l\": https://rsms.me/inter/glyphs/?g=I.1 */\n font-feature-settings: 'cv08' on;\n font-size: 10px;\n\n /* Adds a slash to the zero to distinguish it from the letter \"O\": https://rsms.me/inter/glyphs/?g=zero.tf.slash */\n\n /* Adds tabular numbers to ensure the width of the key is consistent */\n font-variant-numeric: slashed-zero tabular-nums;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n height: 20px;\n justify-content: center;\n line-height: 20px;\n min-width: 20px;\n padding: 0 ${({ theme }) => theme.spacing.space01};\n`;\n\nconst Label = styled.span<LabelProps>`\n color: ${({ $componentStyle, theme }) =>\n $componentStyle === 'dark' ? theme.color.grey700 : theme.color.grey100};\n font-size: 12px;\n`;\n\nconst KeysContainer = styled.div`\n display: flex;\n gap: ${({ theme }) => theme.spacing.space01};\n`;\n\nconst keyToString = (key: KeyboardKeys): string => {\n switch (\n key // eslint-disable-line @typescript-eslint/switch-exhaustiveness-check\n ) {\n // Arrow Keys\n case 'ArrowDown':\n return '↓';\n case 'ArrowLeft':\n return '←';\n case 'ArrowRight':\n return '→';\n case 'ArrowUp':\n return '↑';\n // Modifier Keys\n case 'Alt':\n return 'Alt';\n case 'Cmd':\n case 'Meta':\n if (/Mac|iPhone|iPad/.test(window.navigator.userAgent)) {\n return '⌘';\n }\n if (window.navigator.userAgent.includes('Win')) {\n return '⊞';\n }\n return '^';\n case 'Ctrl':\n return 'Ctrl';\n case 'Option':\n return '⌥';\n case 'Shift':\n return '⇧';\n // Whitespace Keys\n case 'Enter':\n return '↵';\n case 'Space':\n return 'Space';\n case 'Tab':\n return 'Tab';\n case 'Backspace':\n return 'Del';\n case 'Esc':\n return 'Esc';\n default:\n return key.toUpperCase();\n }\n};\n\nexport const KeyboardShortcut = ({\n label,\n keyboardKeys,\n fullWidth = false,\n componentStyle = 'dark',\n ...otherProps\n}: KeyboardShortcutProps): JSX.Element => {\n const kbKeys = isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys];\n\n return (\n <KeyboardShortcutComponent\n $componentStyle={componentStyle}\n $fullWidth={fullWidth}\n {...otherProps}\n >\n {isNotNil(label) && <Label $componentStyle={componentStyle}>{label}</Label>}\n <KeysContainer>\n {kbKeys.map((keyboardKey, index) => (\n <StyledKey\n // in this instance keyboardKey might not be unique, so index is our only option\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n $componentStyle={componentStyle}\n >\n {keyToString(keyboardKey)}\n </StyledKey>\n ))}\n </KeysContainer>\n </KeyboardShortcutComponent>\n );\n};\n\nKeyboardShortcut.displayName = 'KeyboardShortcut_VHS';\n","import type { ReactNode, MouseEvent, KeyboardEvent, ComponentPropsWithoutRef } from 'react';\nimport { forwardRef } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil, isNil } from '@wistia/type-guards';\nimport type { LinkStyleProps } from '../Link/linkStyle';\nimport { linkStyle, underlineOnHoverStyle } from '../Link/linkStyle';\n\nconst isEnterOrSpace = (event: KeyboardEvent): boolean =>\n event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar';\n\n/**\n * <LinkButton>\n *\n * This is a button that looks like a link. Useful for when you need an\n * interactive control (like an onClick handler), but want it to have the\n * identical box-model, hover, and focus appearance of a VHS `<Link>`.\n *\n * Why is this a `span` instead of a link or `button`? Well, that's a can of\n * worms there, stranger — explored before in #3 . There are many reasons NOT\n * to do this, (detailed in #0), but to summarize:\n *\n * > Always try to use the correct semantic element for the job. Except when\n * > you can't.\n *\n * This is more the case where the price of maintaining an identical visual\n * appearance with an HTML link for an interactive button type of component is\n * annoyingly high across browsers and platforms (#2) — a list which includes\n * style differences like inherited line-height, focus-inner Shadow DOM, and\n * more specifically `display` properties (#1). This last one is the\n * deal-breaker, in that despite your best efforts, you can't coerce a button\n * to flow inline with text like a link will. Having considered all these\n * issues, the approach here is to live with resolving the semantic differences\n * between a `span` and a `button` in order to provide an **identical** styling\n * experience without having to fight through all the user-agent defaults with\n * CSS resets.\n *\n * The rest of the social contract is ensuring that `LinkButton` identifies as\n * a button to Assistive Technologies and follows the rules for keyboard\n * interactivity without the unintended side-effects raised in\n * https://github.com/wistia/wistia/pull/11388 is . We use ARIA here, as a last\n * resort, to atone for using a `span` by setting `tabIndex` and `role`.\n *\n * #0 @link: https://dev.to/jakepartusch/how-to-create-a-button-with-a-div-in-react-and-why-you-shouldn-t-1743\n * #1 @link: https://html.spec.whatwg.org/multipage/rendering.html#button-layout\n * #2 @link: https://www.scottohara.me/blog/2018/10/03/unbutton-buttons.html#trickier-than-you-might-think\n * #3 @link: https://github.com/wistia/wistia/pull/10388/files#r405861522\n */\n\ntype LinkButtonStyledComponentProps = {\n $noStyle: boolean;\n $underlineOnHover: boolean;\n};\n\nconst LinkButtonStyledComponent = styled.span<LinkButtonStyledComponentProps & LinkStyleProps>`\n ${({ $noStyle }) => (!$noStyle ? linkStyle : undefined)};\n\n &[tabindex] {\n ${({ $underlineOnHover }) => ($underlineOnHover ? underlineOnHoverStyle : undefined)};\n }\n`;\n\nexport type LinkButtonProps = ComponentPropsWithoutRef<'button'> & {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n /**\n * Disables Button\n */\n disabled?: boolean;\n /**\n * @ignore\n * Force a Button into a particular css state (for debugging)\n */\n forceState?: 'active' | 'focus' | 'hover';\n /**\n * Text that appears inside the button\n */\n label?: string;\n /**\n * Provides a button without any styling (useful for wrapping another element)\n */\n noStyle?: boolean;\n /**\n * Callback function invoked when the button is clicked\n */\n onClick?: (event: KeyboardEvent | MouseEvent) => void;\n /**\n * Will only display an underline when the Link is in a hover state\n */\n underlineOnHover?: boolean;\n /**\n * The visual type of Button to display\n */\n variant?: 'primary' | 'secondary';\n};\n\nexport const LinkButton = forwardRef<HTMLSpanElement, LinkButtonProps>(\n (\n {\n children,\n disabled = false,\n forceState,\n label,\n onClick,\n noStyle = false,\n underlineOnHover = false,\n variant = 'primary',\n ...otherProps\n }: LinkButtonProps,\n ref,\n ) => {\n const handleLinkClick = (event: MouseEvent) => {\n if (isNil(onClick)) {\n return;\n }\n if (disabled) {\n return;\n }\n\n onClick(event);\n };\n\n // This approach replaces the previous hooks implementation using techniques\n // found in #0\n const handleKeypress = (event: KeyboardEvent) => {\n if (isNil(onClick)) {\n return;\n }\n if (isEnterOrSpace(event)) {\n event.preventDefault();\n onClick(event);\n }\n };\n\n const computedTabIndex = disabled ? undefined : 0;\n\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const getContent = () => {\n if (isNotNil(children)) {\n return children;\n }\n if (isNotNil(label)) {\n return label;\n }\n return null;\n };\n\n return (\n <LinkButtonStyledComponent\n ref={ref}\n $disabledLink={disabled}\n $forceState={forceState}\n $noStyle={noStyle}\n $underlineOnHover={underlineOnHover}\n $variant={variant}\n aria-disabled={disabled}\n onClick={handleLinkClick}\n onKeyPress={handleKeypress} // eslint-disable-line @typescript-eslint/no-deprecated\n role=\"button\"\n tabIndex={computedTabIndex}\n {...otherProps}\n >\n {getContent()}\n </LinkButtonStyledComponent>\n );\n },\n);\n\nLinkButton.displayName = 'LinkButton_VHS';\n","import type { ComponentPropsWithoutRef, ReactNode, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\nimport { ListItem } from './ListItem';\n\nconst spacesStyle = css`\n overflow: hidden;\n padding-left: 0;\n vertical-align: bottom;\n\n li {\n display: block;\n float: left;\n\n &::after {\n content: ' ';\n padding-right: ${({ theme }) => theme.spacing.space03};\n }\n\n &:last-child {\n &::after {\n content: '' !important;\n padding-right: 0;\n }\n }\n }\n`;\n\nconst commasStyle = css`\n ${spacesStyle};\n\n li {\n &::after {\n content: ',' !important;\n padding-right: ${({ theme }) => theme.spacing.space01};\n }\n }\n`;\n\nconst slashesStyle = css`\n ${spacesStyle};\n\n li {\n &::after {\n content: '/' !important;\n padding-left: ${({ theme }) => theme.spacing.space01};\n padding-right: ${({ theme }) => theme.spacing.space01};\n }\n }\n`;\n\nconst breadcrumbsStyle = css`\n ${spacesStyle};\n\n li {\n &::after {\n content: '>' !important;\n padding-left: ${({ theme }) => theme.spacing.space01};\n padding-right: ${({ theme }) => theme.spacing.space01};\n }\n }\n`;\n\nconst unbulletedStyle = css`\n list-style: none;\n padding-left: 0;\n`;\nexport type ListComponentProps = {\n variant: string;\n};\n\nconst ListComponent = styled.ul<ListComponentProps>`\n list-style-position: outside;\n margin: ${({ theme }) => `0 0 ${theme.spacing.space01}`};\n padding: ${({ theme }) => `0 0 0 ${theme.spacing.space04}`};\n ${({ variant }) => variant === 'unbulleted' && unbulletedStyle};\n ${({ variant }) => variant === 'spaces' && spacesStyle};\n ${({ variant }) => variant === 'commas' && commasStyle};\n ${({ variant }) => variant === 'slashes' && slashesStyle};\n ${({ variant }) => variant === 'breadcrumbs' && breadcrumbsStyle};\n\n > li:last-child {\n margin-bottom: 0;\n }\n\n ul,\n ol {\n margin-top: ${({ theme }) => theme.spacing.space01};\n }\n\n /* nested lists should not have bottom margins because their container <li> will have one */\n li ul,\n li ol {\n margin-bottom: 0;\n }\n`;\n\nconst renderListComponent = (listItems: ReactNode, variant: VariantType, { ...otherProps }) => {\n // always use a `ul` unless we're rendering the \"ordered\" variant\n const elementType = variant === 'ordered' ? 'ol' : 'ul';\n\n return (\n <ListComponent\n as={elementType}\n variant={variant}\n {...otherProps}\n >\n {listItems}\n </ListComponent>\n );\n};\n\nconst renderListFromArray = (\n listItems: ItemType[],\n variant: VariantType,\n otherProps: Record<string, unknown>,\n) => {\n let itemCount = 0;\n const items = listItems.map((listItem, i) => {\n const item = listItem;\n const nextItem = listItems[i + 1];\n const key = `item-${(itemCount += 1)}`; // hacky way to autogenerate keys\n\n // if the *next* item in the array is a nested list then we need to include\n // the next <ul/ol> as a child of the current <li>\n if (Array.isArray(nextItem)) {\n return (\n <ListItem key={key}>\n {item}\n {renderListFromArray(nextItem, variant, otherProps)}\n </ListItem>\n );\n }\n\n // if the current item is an array, do nothing because we rendered\n // these items previously\n if (Array.isArray(item)) {\n return null;\n }\n\n return <ListItem key={key}>{item}</ListItem>;\n });\n\n return renderListComponent(items, variant, otherProps);\n};\n\nexport type VariantType =\n | 'breadcrumbs'\n | 'bullets'\n | 'commas'\n | 'ordered'\n | 'slashes'\n | 'spaces'\n | 'unbulleted';\n\ntype ItemType = ItemType[] | string[] | string;\n\nexport type ListProps = ComponentPropsWithoutRef<'ul'> & {\n /**\n * Children should be wrapped in `<ListItem>`\n */\n children?: ReactNode;\n /**\n * As an alternative to passing children you can supply an array of strings that\n * will be rendered as child `<ListItems>`s. Note that all items will be of the same variant.\n */\n items?: ItemType[];\n /**\n * The kind of list to render\n */\n variant?: VariantType;\n};\n\nexport const List = ({\n children,\n items,\n variant,\n ...otherProps\n}: ListProps): JSX.Element | null => {\n const listVariant = variant ?? 'bullets';\n if (isNotNil(children)) {\n // children exist, but it's an empty array so do nothing\n if (Array.isArray(children) && !children.length) {\n return null;\n }\n\n return renderListComponent(children, listVariant, otherProps);\n }\n\n if (isNotNil(items)) {\n // items is empty so do nothing\n if (!items.length) {\n return null;\n }\n\n return renderListFromArray(items, listVariant, otherProps);\n }\n\n // neither children nor items provided, so render nothing\n return null;\n};\n\nList.displayName = 'List_VHS';\n","import type { ReactNode, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNil } from '@wistia/type-guards';\n\nconst ListItemComponent = styled.li`\n margin-bottom: ${({ theme }) => theme.spacing.space02};\n`;\n\nexport type ListItemProps = {\n /**\n * Pass an arbitrary child node\n */\n children?: ReactNode;\n};\n\nexport const ListItem = ({ children }: ListItemProps): JSX.Element | null => {\n if (isNil(children)) {\n return null;\n }\n\n return <ListItemComponent>{children}</ListItemComponent>;\n};\n\nListItem.displayName = 'ListItem_VHS';\n","export type { MenuProps } from './Menu';\nexport type { MenuItemProps, CheckboxMenuItemProps, RadioMenuItemProps } from './MenuItem';\nexport { DropdownMenuRadioGroup as MenuRadioGroup } from '@radix-ui/react-dropdown-menu';\nexport { Menu } from './Menu';\nexport { MenuItem, CheckboxMenuItem, RadioMenuItem } from './MenuItem';\nexport { MenuLabel } from './MenuLabel';\nexport { SubMenu } from './SubMenu';\n","import type { ReactNode, JSX } from 'react';\nimport { styled, css, keyframes } from 'styled-components';\nimport type { DropdownMenuProps, DropdownMenuContentProps } from '@radix-ui/react-dropdown-menu';\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuPortal,\n DropdownMenuContent,\n} from '@radix-ui/react-dropdown-menu';\nimport { isNotNil, isNotUndefined } from '@wistia/type-guards';\nimport { mq } from '../../helpers/mq';\nimport type { ButtonProps } from '../Button';\nimport { Button } from '../Button';\n\ntype ControlledMenuProps = {\n /** Is the menu open. Must be used with `onOpenChange`. */\n isOpen: boolean;\n /** When an attempt to toggle the menu is triggered,\n * must be used with `isOpen`.\n */\n onOpenChange: (isOpen: boolean) => void;\n};\n\ntype UncontrolledMenuProps = {\n isOpen?: never;\n onOpenChange?: never;\n};\n\ntype MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;\n\ntype DefaultMenuProps = DropdownMenuProps &\n MenuControlProps & {\n /** The position of the Menu */\n align?: 'center' | 'end' | 'start';\n children: ReactNode;\n /** Callback for when the user clicks or focuses outside of the menu */\n onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];\n /** Props to pass to the trigger component, the default trigger is Button */\n triggerProps?: ButtonProps;\n };\n\ntype MenuPropsWithLabel = DefaultMenuProps & {\n /** The label for the trigger element */\n label: string;\n trigger?: never;\n};\n\ntype MenuPropsWithCustomTrigger = DefaultMenuProps & {\n label?: never;\n /** Replace the default trigger */\n trigger: JSX.Element;\n};\n\nexport type MenuProps = MenuPropsWithCustomTrigger | MenuPropsWithLabel;\n\nconst gutterWidth = '8px';\n\nconst open = keyframes`\n from {\n opacity: 0;\n transform: scale(.97) translateY(-8px);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n`;\n\nconst close = keyframes`\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(.97) translateY(-8px);\n }\n`;\n\nexport const menuContentCss = css`\n animation: ${open} ${({ theme }) => theme.duration.productive.moderate}\n ${({ theme }) => theme.easing.entrance.productive};\n background: white;\n border-radius: 4px;\n box-shadow: ${({ theme }) => theme.shadow.elevation2};\n max-height: var(--radix-dropdown-menu-content-available-height);\n max-width: 100vw;\n overflow: auto;\n padding: ${gutterWidth} ${gutterWidth} ${({ theme }) => theme.spacing.space04} ${gutterWidth};\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n z-index: ${({ theme }) => theme.zIndex.MenuComponent};\n\n &[data-state='closed'] {\n animation: ${close} ${({ theme }) => theme.duration.productive.moderate}\n ${({ theme }) => theme.easing.exit.productive};\n }\n\n ${mq.smAndUp} {\n bottom: 0;\n padding: ${gutterWidth};\n right: 0;\n top: 0;\n transform: initial;\n }\n\n hr {\n margin: ${({ theme }) => theme.spacing.space02} 0;\n }\n`;\n\nconst MenuContent = styled(DropdownMenuContent)`\n ${menuContentCss}\n`;\n\nexport const Menu = ({\n align = 'start',\n children,\n trigger,\n label,\n isOpen,\n triggerProps = {},\n // TODO - come back to this. This error is bizarre\n // eslint-disable-next-line @typescript-eslint/unbound-method\n onOpenChange,\n onInteractOutside,\n ...props\n}: MenuProps): JSX.Element => {\n return (\n <DropdownMenu\n modal={false}\n {...(isNotNil(onOpenChange) && isNotNil(isOpen) ? { open: isOpen, onOpenChange } : {})}\n >\n <DropdownMenuTrigger asChild={true}>\n {isNotUndefined(trigger) ? (\n trigger\n ) : (\n <Button\n aria-expanded={isOpen}\n forceState={isOpen ? 'active' : undefined}\n iconName=\"caret-down\"\n iconPosition=\"end\"\n {...triggerProps}\n >\n {label}\n </Button>\n )}\n </DropdownMenuTrigger>\n <DropdownMenuPortal>\n <MenuContent\n {...props}\n align={align}\n onInteractOutside={onInteractOutside}\n sideOffset={6}\n >\n {children}\n </MenuContent>\n </DropdownMenuPortal>\n </DropdownMenu>\n );\n};\n\nMenu.displayName = 'Menu_VHS';\n","import {\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSubTrigger,\n} from '@radix-ui/react-dropdown-menu';\nimport { isNonEmptyString, isNotNil, isNotUndefined } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\nimport { darken } from 'polished';\nimport type {\n DropdownMenuCheckboxItemProps,\n DropdownMenuItemProps,\n DropdownMenuRadioItemProps,\n} from '@radix-ui/react-dropdown-menu';\nimport type { ElementType, ReactNode } from 'react';\nimport { buttonResetStyle } from '../Button/ButtonStyledComponent';\nimport { ellipsisStyle } from '../Ellipsis';\nimport { Text } from '../Text';\nimport { Icon } from '../Icon';\nimport { useMq } from '../..';\n\ntype MenuItemPropsWithLabelDescription = {\n href?: string;\n badge?: ReactNode;\n children?: never;\n label: ReactNode | string;\n description?: ReactNode | string;\n icon?: ReactNode;\n indicator?: ReactNode;\n renderAs?: ElementType;\n target?: HTMLAnchorElement['target'];\n variant?: 'dangerous' | 'pricing' | 'primary';\n};\n\ntype MenuItemPropsWithChildren = {\n href?: string;\n children: ReactNode | string;\n badge?: never;\n label?: never;\n description?: never;\n icon?: never;\n indicator?: ReactNode;\n renderAs?: ElementType;\n target?: HTMLAnchorElement['target'];\n variant?: 'dangerous' | 'pricing' | 'primary';\n};\n\nexport type MenuItemProps = DropdownMenuItemProps &\n (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);\n\nexport type CheckboxMenuItemProps = DropdownMenuCheckboxItemProps &\n (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);\n\nexport type RadioMenuItemProps = DropdownMenuRadioItemProps &\n (MenuItemPropsWithChildren | MenuItemPropsWithLabelDescription);\n\nconst hoverDarken = '0.04';\nconst focusDarken = '0.08';\n\nconst dangerousMenuItemStyles = css`\n color: ${({ theme }) => theme.color.error700};\n\n &:focus,\n [data-state='highlighted'] {\n background-color: ${({ theme }) => darken(focusDarken, theme.color.error100)};\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => darken(hoverDarken, theme.color.error100)};\n }\n`;\n\nconst pricingMenuItemStyles = css`\n color: ${({ theme }) => theme.color.purple600};\n\n &:focus,\n [data-state='highlighted'] {\n background-color: ${({ theme }) => darken(focusDarken, theme.color.purple100)};\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => darken(hoverDarken, theme.color.purple100)};\n }\n`;\n\nconst getMenuItemStyles = (variant: 'dangerous' | 'pricing' | 'primary') => {\n switch (variant) {\n case 'dangerous':\n return dangerousMenuItemStyles;\n case 'pricing':\n return pricingMenuItemStyles;\n case 'primary':\n default:\n return null;\n }\n};\n\nconst StyledMenuItem = styled.div<{ $variant?: 'dangerous' | 'pricing' | 'primary' }>`\n ${buttonResetStyle};\n border-radius: 4px;\n ${ellipsisStyle};\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space02};\n text-decoration: none;\n\n &:hover,\n &:focus {\n border: none;\n color: ${({ theme }) => theme.color.grey900};\n outline: none;\n }\n\n &:focus,\n [data-state='highlighted'] {\n background-color: ${({ theme }) => darken(focusDarken, theme.color.grey200)};\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => theme.color.grey200};\n }\n\n /* Precedence boost: https://styled-components.com/docs/basics#pseudoelements-pseudoselectors-and-nesting */\n && {\n ${({ $variant }) => isNotNil($variant) && getMenuItemStyles($variant)};\n }\n`;\n\nconst StyledMenuItemContent = styled.div`\n align-items: center;\n display: grid;\n gap: ${({ theme }) => theme.spacing.space03};\n grid-template-columns: auto 1fr;\n grid-template-rows: auto auto;\n row-gap: 0;\n width: 100%;\n`;\n\nconst StyledMenuItemLabel = styled.div`\n display: flex;\n font-size: 14px;\n font-weight: ${({ theme }) => theme.font.weight.medium};\n justify-content: space-between;\n line-height: 1.5;\n min-width: 100%;\n`;\n\nconst IconContainer = styled.div`\n grid-row: span 2;\n text-align: center;\n width: 24px;\n`;\n\nconst NoIconContainer = styled.div`\n grid-row: span 2;\n text-align: center;\n width: 0;\n`;\n\nexport const MenuItem = ({\n children,\n label,\n description,\n badge,\n icon,\n renderAs,\n href,\n target,\n variant = 'primary',\n ...props\n}: MenuItemProps) => {\n const as = renderAs ?? (isNotUndefined(href) ? 'a' : 'div');\n\n const targetProp = as === 'a' && isNonEmptyString(target) ? { target } : {};\n\n return (\n <DropdownMenuItem\n style={{ outline: 'none' }}\n {...props}\n asChild={true}\n >\n <StyledMenuItem\n $variant={variant}\n as={as}\n href={href}\n {...targetProp}\n >\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) && <IconContainer>{icon}</IconContainer>}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n </StyledMenuItem>\n </DropdownMenuItem>\n );\n};\n\nexport const CheckboxMenuItem = ({\n children,\n label,\n description,\n badge,\n icon,\n indicator = (\n <Icon\n size=\"sm\"\n type=\"checkmark\"\n />\n ),\n ...props\n}: CheckboxMenuItemProps) => {\n return (\n <DropdownMenuCheckboxItem\n {...props}\n asChild={true}\n >\n <StyledMenuItem>\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) ? <IconContainer>{icon}</IconContainer> : <NoIconContainer />}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n <DropdownMenuItemIndicator>{indicator}</DropdownMenuItemIndicator>\n </StyledMenuItem>\n </DropdownMenuCheckboxItem>\n );\n};\n\nexport const RadioMenuItem = ({\n children,\n label,\n badge,\n description,\n icon,\n indicator = (\n <Icon\n size=\"sm\"\n type=\"checkmark\"\n />\n ),\n ...props\n}: RadioMenuItemProps) => {\n return (\n <DropdownMenuRadioItem\n {...props}\n asChild={true}\n >\n <StyledMenuItem>\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) ? <IconContainer>{icon}</IconContainer> : <NoIconContainer />}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>{' '}\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n <DropdownMenuItemIndicator>{indicator}</DropdownMenuItemIndicator>\n </StyledMenuItem>\n </DropdownMenuRadioItem>\n );\n};\nconst SubTrigger = styled(DropdownMenuSubTrigger)`\n outline: none;\n\n &[data-state='open'],\n &[data-highlighted] {\n background-color: ${({ theme }) => theme.color.grey200};\n }\n`;\n\nexport const SubMenuTrigger = ({\n children,\n label,\n badge,\n description,\n icon,\n onClick,\n}: MenuItemProps) => {\n const { isSmAndUp } = useMq();\n const Trigger = isSmAndUp ? SubTrigger : DropdownMenuItem;\n return (\n <Trigger\n onClick={(event) => {\n if (isNotUndefined(onClick)) {\n onClick(event);\n }\n }}\n >\n <StyledMenuItem>\n {isNotUndefined(children) ? (\n children\n ) : (\n <StyledMenuItemContent>\n {isNotUndefined(icon) ? <IconContainer>{icon}</IconContainer> : <NoIconContainer />}\n <StyledMenuItemLabel>\n {label} {badge}\n </StyledMenuItemLabel>\n {isNotUndefined(description) ? <Text variant=\"caption\">{description}</Text> : null}\n </StyledMenuItemContent>\n )}\n <Icon\n size=\"md\"\n type=\"caret-right\"\n />\n </StyledMenuItem>\n </Trigger>\n );\n};\n","import type { ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport { DropdownMenuLabel } from '@radix-ui/react-dropdown-menu';\nimport { Text } from '../Text';\nimport { useThemeColor } from '../../hooks/useThemeColor';\n\ntype MenuLabelProps = {\n children: ReactNode | string;\n};\n\nconst StyledMenuLabel = styled(DropdownMenuLabel)`\n /* TODO - this should be in theme */\n padding: 8px;\n`;\n\nexport const MenuLabel = ({ children, ...props }: MenuLabelProps) => {\n const grey700 = useThemeColor('grey700');\n return (\n <StyledMenuLabel asChild={true}>\n <Text\n colorOverride={grey700}\n variant=\"overline\"\n {...props}\n >\n {children}\n </Text>\n </StyledMenuLabel>\n );\n};\n","import { useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { styled } from 'styled-components';\nimport {\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuGroup,\n DropdownMenuSubContent,\n} from '@radix-ui/react-dropdown-menu';\nimport { useMq } from '../../hooks/useMq';\nimport { mq } from '../../helpers/mq';\nimport { menuContentCss } from './Menu';\nimport { SubMenuTrigger } from './MenuItem';\n\ntype SubMenuProps = {\n label: string;\n children: ReactNode;\n icon?: ReactNode;\n description?: ReactNode;\n};\n\nconst SubMenuContent = styled(DropdownMenuSubContent)`\n ${menuContentCss}\n\n ${mq.smAndDown} {\n transform: translateX(-100%) !important;\n }\n`;\n\nconst StyledMobileSubMenuItems = styled.div`\n margin-left: ${({ theme }) => theme.spacing.space03};\n`;\n\nexport const SubMenu = ({ label, icon, description, children }: SubMenuProps) => {\n const { isSmAndUp } = useMq();\n const [isExpanded, setIsExpanded] = useState(false);\n\n return isSmAndUp ? (\n <DropdownMenuSub>\n <SubMenuTrigger\n description={description}\n icon={icon}\n label={label}\n />\n\n <DropdownMenuPortal>\n <SubMenuContent>{children}</SubMenuContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n ) : (\n <DropdownMenuGroup>\n <SubMenuTrigger\n description={description}\n icon={icon}\n label={label}\n onClick={(event) => {\n event.preventDefault();\n setIsExpanded((prev) => !prev);\n }}\n />\n <StyledMobileSubMenuItems>{isExpanded ? children : null}</StyledMobileSubMenuItems>\n </DropdownMenuGroup>\n );\n};\n","import type { MouseEvent, ReactElement, ReactNode, JSX } from 'react';\nimport { useCallback, cloneElement, useState, useLayoutEffect, useRef } from 'react';\nimport { isFunction, isNotNil } from '@wistia/type-guards';\nimport { styled, css } from 'styled-components';\nimport type { ButtonProps } from '../Button';\nimport { Button } from '../Button';\nimport { Menu } from '../../private/components/Menu';\nimport { useBoolean } from '../../hooks/useBoolean';\nimport { Backdrop } from '../Backdrop';\nimport { MenuHeader } from './MenuHeader';\nimport { mq } from '../../helpers/mq';\nimport { useMq } from '../../hooks/useMq';\nimport { coerceToBoolean } from '../../helpers/stringHelpers/coerceToBoolean';\n\nconst MARGIN_BETWEEN_BUTTON_AND_MENU = 8;\n\nconst menuPositionAboveCss = css<MenuComponentProps>`\n bottom: 0;\n margin-bottom: ${({ $dropdownButtonHeight }) =>\n $dropdownButtonHeight + MARGIN_BETWEEN_BUTTON_AND_MENU}px;\n`;\n\nconst menuPositionBelowCss = css<MenuComponentProps>`\n margin-top: ${({ $dropdownButtonHeight }) =>\n $dropdownButtonHeight + MARGIN_BETWEEN_BUTTON_AND_MENU}px;\n top: 0;\n`;\n\nexport type MenuComponentProps = {\n $isMenuVisible: boolean;\n $menuAlignment: string;\n $menuPosition: string;\n $dropdownButtonHeight: number;\n};\n\n// instead of mounting & unmounting the menu we just \"hide\" it via display\n// this is done to support modal buttons in the menu\nconst MenuComponent = styled(Menu)<MenuComponentProps>`\n animation-duration: ${({ theme }) => theme.duration.productive.fast};\n animation-timing-function: ${({ theme }) => theme.easing.entrance.productive};\n bottom: 0;\n display: ${({ $isMenuVisible }) => ($isMenuVisible ? 'block' : 'none')};\n left: 0;\n position: fixed;\n width: 100%;\n\n ${mq.smAndUp} {\n animation: unset;\n bottom: initial;\n left: initial;\n position: absolute;\n width: initial;\n ${({ $menuAlignment }) => ($menuAlignment === 'left' ? 'left: 0;' : 'left: unset; right: 0')};\n ${({ $menuPosition }) =>\n $menuPosition === 'above' ? menuPositionAboveCss : menuPositionBelowCss};\n }\n`;\n\nconst MenuButtonContainer = styled.div`\n align-items: stretch;\n display: inline-flex;\n flex-direction: column;\n flex-shrink: 0;\n\n /* prevent dropdown button from wrapping underneath main button */\n position: relative;\n`;\n\nexport type MenuButtonProps = ButtonProps & {\n /**\n * Disables button\n */\n disabled?: boolean;\n /**\n * Use this prop to pass an IconButton as the \"trigger\" instead of a standard Button\n */\n iconButtonComponent?: JSX.Element | ReactElement;\n /**\n * Text that appears inside the button\n */\n label: string;\n /**\n * Which side of the button should the menu be aligned\n */\n menuAlignment?: 'left' | 'right';\n /**\n * An array of Button/Link components\n */\n menuItems?: JSX.Element[];\n /**\n * Where should the menu appear relative to the button\n */\n menuPosition?: 'above' | 'below';\n /**\n * Can be a CSS width value string, 'fullWidth' or 'maxItem' (sized to the largest item width)\n */\n menuWidth?: string;\n /**\n * Function that is called after the menu is closed\n */\n onMenuClosed?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;\n /**\n * Function that is called when the menu button is clicked\n */\n onMenuClick?: ((event: MouseEvent) => ReactNode) | ((event: MouseEvent) => void) | undefined;\n /**\n * A custom node to be displayed in the menu on extra small screens.\n */\n overrideMenuHeader?: ReactNode;\n /**\n * The size of button to display\n */\n\n size?: 'lg' | 'md' | 'sm';\n};\n\n/**\n * @deprecated Please use Menu with a Button trigger, see [documentation](https://wistia.github.io/vhs/?path=/docs-components-menu--docs).\n *\n * #### Why MenuButton is being deprecated\n *\n * The [Menu](https://wistia.github.io/vhs/?path=/docs-components-menu--docs) component is preferred over MenuButton for several reasons:\n * 1. Menu has better alignment and collision detection.\n * 2. Menu supports submenus.\n * 3. Menu is properly portalled.\n */\nexport const MenuButton = ({\n label,\n menuAlignment = 'right',\n menuItems,\n menuPosition = 'below',\n menuWidth = 'maxItem',\n onMenuClick,\n onMenuClosed,\n disabled = false,\n iconButtonComponent,\n overrideMenuHeader,\n size = 'lg',\n ...otherProps\n}: MenuButtonProps): JSX.Element => {\n const [isMenuVisible, toggleMenu, , hideMenu] = useBoolean(false);\n const [shouldRenderItems, setShouldRenderItems] = useState(false);\n const [dropdownButtonHeight, setDropdownButtonHeight] = useState(0);\n const dropdownButton = useRef<HTMLButtonElement>(null);\n const { isXsAndDown } = useMq();\n\n useLayoutEffect(() => {\n if (!dropdownButton.current) {\n return;\n }\n\n setDropdownButtonHeight(dropdownButton.current.offsetHeight);\n }, [dropdownButton]);\n\n // clicking inside of the menu on an item should hide the menu\n // and throw focus back to the dropdown button\n // clicking outside of the menu should hide the menu\n // clicking esc key should hide the menu\n const dismissMenu = (event: Event | MouseEvent) => {\n // clicking the dropdown button \"counts\" as an outside click\n // but we want to let toggleMenu handle the state in that situation\n // else the menu will be immediately redisplayed\n if (\n !isMenuVisible ||\n (isNotNil(event) && coerceToBoolean(dropdownButton.current?.contains(event.target as Node)))\n ) {\n return;\n }\n hideMenu();\n if (isFunction(onMenuClosed)) {\n onMenuClosed();\n }\n dropdownButton.current?.focus();\n };\n\n // For performance, we defer rendering menu items until the MenuButton is\n // open. Once we do render the menu items, though, we should never remove\n // them since doing so could break interactivity with menu item child\n // components (e.g. triggering an ActionModal via menu item but then removing\n // it from the DOM before it can be displayed).\n const toggleMenuAndRenderItems = useCallback(() => {\n setShouldRenderItems(true);\n toggleMenu();\n }, [toggleMenu]);\n\n const onClickButton = useCallback(\n (event: MouseEvent) => {\n if (onMenuClick) {\n onMenuClick(event); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n toggleMenuAndRenderItems();\n },\n [onMenuClick, toggleMenuAndRenderItems],\n );\n\n // eslint-disable-next-line react/no-unstable-nested-components\n let MenuTriggerButton = () => (\n <Button\n ref={dropdownButton}\n aria-expanded={isMenuVisible}\n disabled={disabled}\n forceState={isMenuVisible ? 'active' : undefined}\n iconName=\"caret-down\"\n iconPosition=\"end\"\n label={label}\n onClick={onClickButton}\n size={size}\n {...otherProps}\n />\n );\n\n // TODO: How to handle button and iconButton having size props that could differ in the future\n if (isNotNil(iconButtonComponent)) {\n MenuTriggerButton = () =>\n cloneElement(iconButtonComponent, {\n label,\n onClick: onClickButton,\n ref: dropdownButton,\n disabled,\n 'aria-expanded': isMenuVisible,\n ...otherProps,\n });\n }\n\n return (\n <MenuButtonContainer>\n {/* eslint-disable-next-line react-hooks/static-components */}\n <MenuTriggerButton />\n <MenuComponent\n $dropdownButtonHeight={dropdownButtonHeight}\n $isMenuVisible={isMenuVisible}\n $menuAlignment={menuAlignment}\n $menuPosition={menuPosition}\n items={shouldRenderItems ? menuItems : []}\n menuHeader={\n isXsAndDown ? (\n <MenuHeader\n label={label}\n onCloseClick={dismissMenu}\n overrideMenuHeader={overrideMenuHeader}\n />\n ) : null\n }\n onClick={dismissMenu}\n onClickOutside={dismissMenu}\n onPressEsc={dismissMenu}\n width={menuWidth}\n />\n {isXsAndDown && isMenuVisible ? <Backdrop /> : null}\n </MenuButtonContainer>\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nMenuButton.displayName = 'MenuButton_VHS';\n","import type { MouseEventHandler, ReactNode, JSX } from 'react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { styled, css } from 'styled-components';\nimport { darken } from 'polished';\nimport { isNotNil, isNonEmptyString } from '@wistia/type-guards';\nimport { buttonResetStyle } from '../../../components/Button/ButtonStyledComponent';\nimport { ellipsisStyle } from '../../../components/Ellipsis';\nimport { useMergedRefs } from '../../../hooks/useMergedRefs';\nimport { useOnClickOutside } from '../../../hooks/useOnClickOutside';\nimport { Divider } from '../../../components/Divider';\nimport { mq } from '../../../helpers/mq';\n\nexport const MENU_WIDTH_OPTIONS = ['fullWidth', 'maxItem'];\nconst GUTTER_WIDTH = '8px';\nconst FOCUS_DARKEN = '0.08';\n\nconst getMenuWidth = (width: string) => {\n if (MENU_WIDTH_OPTIONS.includes(width)) {\n return null;\n }\n\n return width;\n};\n\ntype MenuComponentProps = {\n $menuWidth: string;\n};\n\nconst MenuComponent = styled.div<MenuComponentProps>`\n background: white;\n border-radius: 4px 4px 0 0;\n box-shadow: ${({ theme }) => theme.shadow.elevation2};\n display: ${({ $menuWidth }) => ($menuWidth === 'maxItem' ? 'inline-block' : 'block')};\n padding: ${GUTTER_WIDTH} ${GUTTER_WIDTH} ${({ theme }) => theme.spacing.space04} ${GUTTER_WIDTH};\n width: ${({ $menuWidth }) => getMenuWidth($menuWidth)};\n z-index: ${({ theme }) => theme.zIndex.MenuComponent};\n\n ${mq.smAndUp} {\n border-radius: 4px;\n padding: ${GUTTER_WIDTH};\n }\n`;\n\nconst dangerousMenuItemStyles = css`\n /* stylelint-disable no-descending-specificity */\n button,\n a {\n &:hover {\n background-color: ${({ theme }) => theme.color.red100};\n color: ${({ theme }) => theme.color.red600};\n }\n\n &:focus {\n background-color: ${({ theme }) => darken(FOCUS_DARKEN, theme.color.red100)};\n color: ${({ theme }) => theme.color.red600};\n }\n }\n`;\n\nconst disabledMenuItemStyles = css`\n button,\n a {\n background-color: transparent;\n color: ${({ theme }) => theme.color.grey500};\n cursor: not-allowed;\n opacity: 1;\n\n &:hover,\n &:focus {\n background-color: transparent;\n color: ${({ theme }) => theme.color.grey500};\n opacity: 1;\n }\n }\n`;\n\ntype MenuItemProps = {\n disabled?: boolean;\n variant?: string | undefined;\n};\n\nconst MenuItem = styled.div<MenuItemProps>`\n /* divider */\n hr {\n border-top: 1px solid ${({ theme }) => theme.color.grey300};\n margin: ${({ theme }) => theme.spacing.space01} ${GUTTER_WIDTH};\n }\n\n button {\n ${buttonResetStyle}\n }\n\n a {\n text-decoration: none;\n vertical-align: middle;\n }\n\n /* NOTE: some styles that may seem unnecessary or redundant are probably to override styles\n that come along with the Button, Link & FileSelect components that are allowed in the items array */\n button,\n a,\n label {\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey900};\n display: block;\n font-size: 18px;\n height: 44px;\n line-height: 40px;\n padding: 0 ${GUTTER_WIDTH};\n width: 100%;\n ${ellipsisStyle};\n\n ${mq.smAndUp} {\n font-size: 16px;\n height: 40px;\n }\n\n /* support FileSelect; this prevents an inner button or link from inheriting unwanted space */\n button,\n a {\n padding: 0;\n }\n\n &:hover,\n &:focus {\n border: none;\n color: ${({ theme }) => theme.color.grey900};\n outline: none;\n }\n\n &:hover:not([aria-disabled]) {\n background-color: ${({ theme }) => theme.color.grey200};\n }\n\n &:focus {\n background-color: ${({ theme }) => darken(FOCUS_DARKEN, theme.color.grey200)};\n }\n }\n\n /* Precedence boost: https://styled-components.com/docs/basics#pseudoelements-pseudoselectors-and-nesting */\n && {\n ${({ variant }) => (variant === 'dangerous' ? dangerousMenuItemStyles : null)}\n ${({ disabled }) => (isNotNil(disabled) && disabled ? disabledMenuItemStyles : null)}\n }\n`;\n\nexport type MenuProps = {\n /**\n * An array of Button/Link components\n */\n items?: JSX.Element[] | undefined;\n /**\n * A header for the menu on extra small screens\n */\n menuHeader?: ReactNode;\n /**\n * Callback function invoked when user clicks inside the Menu component\n */\n onClick?: (event: Event) => void;\n /**\n * Callback function invoked when user clicks outside the Menu component\n */\n onClickOutside?: (event: Event) => void;\n /**\n * Callback function invoked when Menu component is unmounted\n */\n onClose?: (event?: Event) => unknown;\n /**\n * Callback function invoked when Menu component is mounted\n */\n onOpen?: (event?: Event) => unknown;\n /**\n * Callback function invoked when user presses escape key\n */\n onPressEsc?: (event: Event) => void;\n /**\n * Can be a CSS width value string, \"fullWidth\" or \"maxItem\" (sized to the largest item width)\n */\n width?: string;\n};\n\nexport const Menu = forwardRef(\n (\n {\n items,\n menuHeader,\n width = 'fullWidth',\n onClick,\n onClickOutside,\n onPressEsc,\n onOpen,\n onClose,\n ...otherProps\n }: MenuProps,\n ref,\n ) => {\n const menuRef = useRef(undefined);\n\n const onClickOutsideFn = isNotNil(onClickOutside) ? onClickOutside : () => {}; // eslint-disable-line @typescript-eslint/no-empty-function\n useOnClickOutside(menuRef, onClickOutsideFn);\n\n const menuRefs = useMergedRefs([menuRef, ref]);\n\n // invoke onOpen callback when Menu is mounted\n // invoke onClose callback when Menu is unmounted\n useEffect(() => {\n if (onOpen) {\n onOpen();\n }\n return () => {\n if (onClose) {\n onClose();\n }\n };\n }, [onOpen, onClose]);\n\n // invoke onPressEsc callback when escape key is pressed\n useEffect(() => {\n const onKeyup = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && onPressEsc) {\n onPressEsc(event);\n }\n };\n\n document.addEventListener('keyup', onKeyup);\n\n return () => {\n document.removeEventListener('keyup', onKeyup);\n };\n }, [onPressEsc]);\n\n // render nothing if no items are provided\n if (items?.length == null) {\n return null;\n }\n\n const itemsToRender = items.map((item) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { disabled, variant } = item.props;\n const disabledValue = isNotNil(disabled) ? (disabled as boolean) : false;\n const variantValue = isNonEmptyString(variant) ? variant : undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const key = `wrapper-${item.key!}`; // \"steal\" key from item needed for wrapper\n\n return (\n <MenuItem\n key={key}\n disabled={disabledValue}\n variant={variantValue}\n >\n {item}\n </MenuItem>\n );\n });\n\n const handleOnClick = onClick as unknown as MouseEventHandler<HTMLDivElement>;\n\n return (\n // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions\n <MenuComponent\n ref={menuRefs}\n $menuWidth={width}\n onClick={handleOnClick}\n {...otherProps}\n >\n {isNotNil(menuHeader) ? (\n <>\n {menuHeader}\n <MenuItem>\n <Divider />\n </MenuItem>\n </>\n ) : null}\n {itemsToRender}\n </MenuComponent>\n );\n },\n);\n\nMenu.displayName = 'Menu';\n","import { styled } from 'styled-components';\nimport type { MouseEvent, ReactNode, JSX } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\nimport { ModalCloseButton } from '../../private/components/ModalCloseButton';\n\nconst HeaderAndButton = styled.div`\n align-items: center;\n display: flex;\n gap: ${({ theme }) => theme.spacing.space02};\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space02};\n`;\n\nconst HeaderText = styled.span`\n color: ${({ theme }) => theme.color.grey900};\n font-size: 20px;\n font-weight: 700;\n line-height: 24px;\n`;\n\nexport type MenuHeaderProps = {\n /**\n * Text to be shown as the menu header\n */\n label: string;\n /**\n * The function to be executed when the close button is clicked\n */\n onCloseClick: (event: MouseEvent) => void;\n /**\n * A custom node to be displayed as the menu header\n */\n overrideMenuHeader?: ReactNode;\n};\n\nexport const MenuHeader = ({\n label,\n onCloseClick,\n overrideMenuHeader = undefined,\n}: MenuHeaderProps): JSX.Element => (\n <HeaderAndButton>\n {isNotNil(overrideMenuHeader) ? overrideMenuHeader : <HeaderText>{label || 'Menu'}</HeaderText>}\n <ModalCloseButton onClick={onCloseClick} />\n </HeaderAndButton>\n);\n","import type { ReactNode, ComponentPropsWithoutRef, RefObject, JSX, ForwardedRef } from 'react';\nimport { forwardRef, useEffect, useRef } from 'react';\nimport { styled, css } from 'styled-components';\nimport { hasKey, isNotNil, isNotUndefined } from '@wistia/type-guards';\nimport { createPortal } from 'react-dom';\nimport { useKeyPressOnce } from '../../hooks/useKeyPressOnce';\nimport { usePreventScroll } from '../../hooks/usePreventScroll';\nimport { useOnClickOutside } from '../../hooks/useOnClickOutside';\nimport { Backdrop } from '../Backdrop';\nimport { ModalAnimation } from '../../private/components/ModalAnimation';\nimport { useFocusTrap } from '../../hooks/useFocusTrap';\nimport { Dialog } from './Dialog';\nimport { ModalCloseProvider } from './ModalCloseContext';\nimport { mq } from '../../helpers/mq';\n\nexport type ModalProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Horizontally align modal to the left, center, or right of the container\n */\n alignHorizontal?: 'center' | 'left' | 'normal' | 'right';\n /**\n * Vertically align modal to the top, center, or bottom of the container\n */\n alignVertical?: 'bottom' | 'center' | 'normal' | 'top';\n\n /**\n * Whether or not the modal should be allowed to exceed the viewport bounds.\n * If it exceeds the bounds, the entire backdrop will be scrollable.\n */\n allowModalToExceedViewportBounds?: boolean;\n\n /**\n * Contents of the modal\n */\n children?: ReactNode;\n /**\n * Class to be applied to the base element of the modal\n */\n className?: string;\n\n /**\n * Whether or not the modal should take up the full height of the viewport\n */\n fullHeight?: boolean;\n\n /**\n * Ref to the element that should receive focus when the modal opens\n */\n initialFocusRef?: RefObject<HTMLElement | null>;\n\n /**\n * Whether or not the modal is open, and should be rendered\n */\n isOpen: boolean;\n\n /**\n * When the Modal is dismissed, this function will be called. You'll typically want to set the\n * state of `isOpen` to false here\n * @returns\n */\n onRequestClose?: () => void;\n\n /**\n * Whether or not the modal should be closed when the user clicks outside of it\n * @default true\n */\n shouldCloseOnClickOutside?: boolean;\n\n /**\n * Whether or not the modal should trap focus within itself\n *\n */\n shouldTrapFocus?: boolean;\n\n /** The base width to apply to the Modal */\n width?: string;\n\n /**\n * The overflow behavior to apply to the modal\n * @default 'auto'\n */\n overflow?: 'auto' | 'clip' | 'hidden' | 'scroll' | 'visible';\n};\n\ntype ModalContentProps = Omit<ModalProps, 'id'>;\n\n// Safari doesn't like display grid for some reason\nconst StyledBackdrop = styled(Backdrop)<{\n $allowModalToExceedViewportBounds: boolean;\n}>`\n display: flex;\n\n ${({ $allowModalToExceedViewportBounds }) =>\n $allowModalToExceedViewportBounds &&\n css`\n ${mq.smAndUp} {\n padding: ${({ theme }) => theme.spacing.space05};\n }\n `}\n`;\n\nconst StyledDialog = styled(Dialog)<{\n $allowModalToExceedViewportBounds: boolean;\n}>`\n ${({ $allowModalToExceedViewportBounds }) =>\n $allowModalToExceedViewportBounds &&\n css`\n ${mq.smAndUp} {\n max-height: min-content;\n margin: auto;\n }\n `}\n`;\n\nconst ModalInner = styled.div`\n align-items: stretch;\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst isMutableRef = (\n ref: React.ForwardedRef<HTMLDivElement>,\n): ref is RefObject<HTMLDivElement | null> => {\n return isNotNil(ref) && hasKey(ref, 'current') && isNotNil(ref.current);\n};\n\nconst useFocusRestore = (ref: ForwardedRef<HTMLDivElement>) => {\n useEffect(() => {\n const previousFocus = document.activeElement as HTMLElement | null;\n\n if (isMutableRef(ref)) {\n const el = ref.current;\n if (isNotNil(el)) {\n el.focus();\n }\n }\n\n return () => {\n if (previousFocus !== null) {\n setTimeout(() => {\n previousFocus.focus();\n }, 0);\n }\n };\n }, [ref]);\n};\n\nconst ModalContent = forwardRef<HTMLDivElement, ModalContentProps>(\n (\n {\n alignHorizontal = 'center',\n alignVertical = 'center',\n allowModalToExceedViewportBounds = false,\n children,\n className,\n fullHeight = false,\n initialFocusRef,\n isOpen = false,\n shouldTrapFocus = true,\n onRequestClose,\n shouldCloseOnClickOutside = true,\n width,\n overflow = 'auto',\n ...props\n }: ModalContentProps,\n ref,\n ): JSX.Element => {\n useFocusRestore(ref);\n\n const outerRef = useRef(null);\n\n const focusRef = useFocusTrap(shouldTrapFocus, {\n focusSelector: isNotUndefined(initialFocusRef) ? initialFocusRef : null,\n });\n\n useOnClickOutside(outerRef, () => {\n if (onRequestClose && shouldCloseOnClickOutside) {\n onRequestClose();\n }\n });\n usePreventScroll(isOpen);\n useKeyPressOnce('Escape', (event: KeyboardEvent) => {\n if (onRequestClose) {\n onRequestClose();\n }\n event.preventDefault();\n });\n\n return (\n <ModalCloseProvider value={onRequestClose}>\n <StyledBackdrop\n $allowModalToExceedViewportBounds={allowModalToExceedViewportBounds}\n alignHorizontal={alignHorizontal}\n alignVertical={alignVertical}\n >\n <StyledDialog\n ref={focusRef}\n $allowModalToExceedViewportBounds={allowModalToExceedViewportBounds}\n $fullHeight={fullHeight}\n $overflow={overflow}\n $width={width}\n aria-modal=\"true\"\n role=\"dialog\"\n tabIndex={-1}\n {...props}\n >\n <ModalInner ref={outerRef}>{children}</ModalInner>\n </StyledDialog>\n </StyledBackdrop>\n </ModalCloseProvider>\n );\n },\n);\n\nexport const Modal = (props: ModalProps): JSX.Element => {\n const { id, ...rest } = props;\n\n // TODO need to fix for SSR compat\n const modalEl = document.createElement('div');\n\n modalEl.classList.add('Modal');\n\n if (isNotUndefined(props.className)) {\n modalEl.classList.add(props.className);\n }\n\n if (isNotUndefined(id)) {\n modalEl.id = id;\n }\n\n const modalRoot = useRef<HTMLDivElement>(modalEl);\n // on mount, append this modal's portal target to the DOM. remove on unmount.\n // this allows us to render multiple modals on a page w/o them clobbering\n // each other.\n useEffect(() => {\n const modalRootEl = modalRoot.current;\n document.body.appendChild(modalRootEl);\n return () => modalRootEl.remove();\n }, []);\n\n return createPortal(\n <ModalAnimation>\n {props.isOpen ? (\n <ModalContent\n ref={modalRoot}\n {...rest}\n />\n ) : null}\n </ModalAnimation>,\n modalRoot.current,\n );\n};\n\n// For some reason, react-docgen-typescript will assume the \"primary\" export of this file is ModalContent\n// if its displayName is defined before Modal\nModal.displayName = 'Modal_VHS';\nModalContent.displayName = 'ModalContent_VHS';\n","import { styled } from 'styled-components';\nimport { mq } from '../../helpers/mq';\nimport type { ModalProps } from './Modal';\n\nexport type DialogProps = {\n $fullHeight?: boolean | undefined;\n $width?: string | undefined;\n $overflow?: ModalProps['overflow'] | undefined;\n};\n\nexport const Dialog = styled.div<DialogProps>`\n background-color: white;\n box-sizing: border-box;\n display: flex;\n\n /* latest versions of FF, Safari, and Chrome support dynamic viewport units; 100vh left as a fallback */\n height: 100vh;\n overflow: ${({ $overflow }) => $overflow ?? 'auto'};\n position: relative;\n width: 100vw;\n\n ${mq.smAndUp} {\n border-radius: 16px;\n height: ${({ $fullHeight }) => ($fullHeight ? 'min-content' : 'auto')};\n margin: ${({ theme }) => theme.spacing.space05};\n max-height: 90vh;\n ${({ $fullHeight }) => ($fullHeight ? 'min-height: calc(100vh - 48px);' : '')}\n max-width: 90vw;\n min-width: ${({ $width }) => $width ?? '480px'};\n width: min-content;\n }\n`;\n","import { isNotUndefined } from '@wistia/type-guards';\nimport { createContext, useContext } from 'react';\n\nconst ModalCloseContext = createContext<(() => void) | undefined>(undefined);\n\nexport const ModalCloseProvider = ModalCloseContext.Provider;\n\nexport const useModalClose = (): (() => void) => {\n const modalClose = useContext(ModalCloseContext);\n\n if (isNotUndefined(modalClose)) {\n return modalClose;\n }\n\n throw new Error('useModalClose must be used within a ModalCloseProvider');\n};\n","import { styled } from 'styled-components';\nimport type { MouseEvent, JSX } from 'react';\nimport { Icon } from '../Icon';\nimport { IconButton } from '../IconButton';\nimport { useModalClose } from './ModalCloseContext';\n\n// Use ModalHeader to provide a consistent padding and alignment for a static header\nexport const ModalHeader = styled.div`\n align-items: center;\n display: flex;\n padding: ${({ theme }) => theme.spacing.space04} ${({ theme }) => theme.spacing.space04};\n`;\n\n// Use ModalBody to provide a scrollable area for the modal content and a consistent padding.\nexport const ModalBody = styled.div`\n flex: auto;\n height: 100%;\n margin-top: ${({ theme }) => theme.spacing.space04};\n overflow: auto;\n padding: ${({ theme }) => theme.spacing.space04};\n`;\n\n// Use ModalFooter to provide a consistent padding and alignment for a static footer\nexport const ModalFooter = styled.div`\n padding: ${({ theme }) => theme.spacing.space04};\n`;\n\nexport type ModalCloseButtonProps = {\n /**\n * Callback invoked when the button is clicked\n */\n onClick?: (event: MouseEvent) => void;\n};\n\nconst StyledIconButton = styled(IconButton)`\n position: absolute;\n right: ${({ theme }) => theme.spacing.space04};\n top: ${({ theme }) => theme.spacing.space04};\n z-index: ${({ theme }) => theme.zIndex.ModalCloseButton};\n`;\n\nexport const ModalCloseButton = ({ onClick, ...props }: ModalCloseButtonProps): JSX.Element => {\n const onRequestClose = useModalClose();\n return (\n <StyledIconButton\n aria-label=\"Close\"\n icon={\n <Icon\n size=\"sm\"\n type=\"close\"\n />\n }\n onClick={onRequestClose}\n preventTooltip={true}\n {...props}\n />\n );\n};\n","import type { ReactNode, ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\n\ntype PaperComponentProps = {\n children: ReactNode;\n $elevationToken: 'elevation0' | 'elevation1' | 'elevation2';\n};\n\nexport type PaperProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * The content within Paper component\n */\n children: ReactNode;\n /**\n * The \"elevation\" level of the Paper component\n */\n elevation?: 0 | 1 | 2 | undefined;\n};\n\nconst PaperComponent = styled.div<PaperComponentProps>`\n background-color: white;\n border-radius: 8px;\n box-shadow: ${({ theme, $elevationToken }) => theme.paper[$elevationToken]};\n`;\n\nexport const Paper = ({ children, elevation = 1, ...otherProps }: PaperProps): JSX.Element => {\n const elevationToken = `elevation${elevation}` as const;\n\n return (\n <PaperComponent\n {...otherProps}\n $elevationToken={elevationToken}\n >\n {children}\n </PaperComponent>\n );\n};\n\nPaper.displayName = 'Paper_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\n\nconst progressBarHeight = '8px';\n\nexport type ProgressBarContainerProps = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'aria-valuemax': any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 'aria-valuemin': any;\n};\n\nconst ProgressBarContainer = styled.div<ProgressBarContainerProps>`\n display: flex;\n`;\n\nexport type ProgressBarMeterProps = {\n /**\n * Allows user to override default progress bar meter background colors\n */\n $meterBgColorOverride?: string | undefined;\n};\n\nconst ProgressBarMeter = styled.div<ProgressBarMeterProps>`\n align-self: center;\n background: ${({ theme, $meterBgColorOverride }) => $meterBgColorOverride ?? theme.color.grey300};\n border-radius: ${progressBarHeight};\n flex: 1;\n height: ${progressBarHeight};\n`;\n\nexport type ProgressBarLevelProps = {\n /**\n * Allows user to override default progress bar meter background colors\n */\n $meterBgColorOverride?: string | undefined;\n /**\n * Allows user to override default colors\n */\n $colorOverride?: string | undefined;\n /**\n * Current numeric level of the progress (0 -> 1), which controls width of the ProgressBarLevel\n */\n $progress: number;\n};\n\nconst ProgressBarLevel = styled.div<ProgressBarLevelProps>`\n background: ${({ theme, $colorOverride }) => $colorOverride ?? theme.color.brandBlue500};\n border-radius: ${progressBarHeight};\n height: 100%;\n transition: width 0.2s ease-out;\n width: ${({ $progress }) => $progress * 100}%;\n`;\n\nexport type ProgressBarLabelProps = {\n /**\n * Allows user to override default progress bar label colors\n */\n $labelColorOverride?: string | undefined;\n};\n\nconst ProgressBarLabel = styled.div<ProgressBarLabelProps>`\n color: ${({ theme, $labelColorOverride }) => $labelColorOverride ?? theme.color.grey900};\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n line-height: 6px;\n margin-right: ${({ theme }) => theme.spacing.space04};\n text-align: right;\n width: 5ch;\n`;\n\nexport type ProgressBarProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Whether the progress bar has a label\n */\n hasLabel?: boolean;\n /**\n * Current numeric level of the progress (0 -> 1)\n */\n progress?: number;\n /**\n * Allows user to override default progress bar label colors\n */\n labelColorOverride?: string;\n /**\n * Allows user to override default progress bar meter background colors\n */\n meterBgColorOverride?: string;\n /**\n * Allows user to override default colors\n */\n colorOverride?: string;\n};\n\nexport const ProgressBar = ({\n hasLabel = true,\n progress = 0,\n colorOverride = undefined,\n labelColorOverride = undefined,\n meterBgColorOverride = undefined,\n ...otherProps\n}: ProgressBarProps): JSX.Element => {\n // prevent progress from going below 0 or above 1\n // future consideration for UI: should we throw an error if out of range?\n // should we try to create a type that enforces this?\n const clampedProgress = Math.min(Math.max(progress, 0), 1);\n const currentProgress = Math.round(clampedProgress * 100);\n\n return (\n <ProgressBarContainer\n aria-label=\"Progress\"\n aria-valuemax=\"100\"\n aria-valuemin=\"0\"\n aria-valuenow={currentProgress}\n data-testid=\"progress-bar\"\n role=\"progressbar\"\n {...otherProps}\n >\n {hasLabel ? (\n <ProgressBarLabel\n $labelColorOverride={labelColorOverride}\n data-testid=\"progress-bar-label\"\n >\n {currentProgress}%\n </ProgressBarLabel>\n ) : null}\n <ProgressBarMeter $meterBgColorOverride={meterBgColorOverride}>\n <ProgressBarLevel\n $colorOverride={colorOverride}\n $progress={clampedProgress}\n />\n </ProgressBarMeter>\n </ProgressBarContainer>\n );\n};\n\nProgressBar.displayName = 'ProgressBar_VHS';\n","import type { MouseEvent, JSX, ComponentType } from 'react';\nimport { useEffect, useState } from 'react';\nimport { styled } from 'styled-components';\nimport { isSameDay } from 'date-fns';\nimport type { DateRangeType } from '../../private/components/RangeSelectorInput/utils';\nimport { RangeSelectorCalendar } from '../../private/components/RangeSelectorCalendar';\nimport { RangeSelectorInput } from '../../private/components/RangeSelectorInput';\nimport { useTheme } from '../../hooks/useTheme';\nimport { Button } from '../Button';\nimport { ButtonGroup } from '../ButtonGroup';\nimport { List } from '../List';\nimport { ListItem } from '../List/ListItem';\nimport { Icon } from '../Icon';\nimport { Tooltip } from '../Tooltip';\n\nconst TooltipWrapper = styled.div`\n text-align: left;\n width: 240px;\n`;\n\nconst PresetTooltip = ({ tooltipText }: { tooltipText: string }) => {\n return (\n <Tooltip\n direction=\"right\"\n label={<TooltipWrapper>{tooltipText}</TooltipWrapper>}\n shouldWrap={true}\n >\n <Icon\n size=\"md\"\n style={{ verticalAlign: 'text-bottom' }}\n type=\"question-mark\"\n />\n </Tooltip>\n );\n};\n\nconst formatDate = (date: Date): string =>\n date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n });\n\nconst formatFunc = ({ start, end }: DateRangeType) => `${formatDate(start)} - ${formatDate(end)}`;\n\nconst isSameRange = (r1: DateRangeType, r2: DateRangeType): boolean =>\n isSameDay(r1.start, r2.start) && isSameDay(r1.end, r2.end);\n\nconst CalendarPadding = styled.div`\n padding: ${({ theme }) => `0 ${theme.spacing.space03}`};\n`;\n\ntype RangeSelectorWrapperProps = {\n onClick: (event: MouseEvent) => void;\n $width?: number | string | undefined;\n};\n\nconst RangeSelectorWrapper = styled.div<RangeSelectorWrapperProps>`\n position: relative;\n width: ${({ $width }) => $width ?? 'auto'};\n`;\n\nconst StyledButton = styled(Button)<{ $inputButtonOverride: boolean }>`\n ${({ theme, $inputButtonOverride }) =>\n $inputButtonOverride &&\n `\n && {\n background-color: white;\n border: 1px solid ${theme.color.grey300};\n border-radius: 4px;\n color: ${theme.color.grey900};\n font-size: 14px;\n height: 36px;\n\n &:hover,\n &:focus,\n &:active {\n background-color: white;\n box-shadow: 0 0 0 1.5px ${theme.color.brandBlue500};\n }\n }\n `}\n`;\n\ntype ItemProps = {\n $isActive: boolean;\n};\n\nconst Item = styled.button<ItemProps>`\n background: white;\n border: none;\n color: ${({ theme }) => theme.color.grey800};\n cursor: pointer;\n display: flex;\n font-size: 15px;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space03};\n width: 100%;\n\n &:hover {\n background: ${({ theme }) => theme.color.grey100};\n }\n\n ${({ theme, $isActive }) =>\n $isActive &&\n `\n color: ${theme.color.blue600};\n font-weight: 600;\n `};\n`;\n\nconst Break = styled.div`\n flex-basis: 100%;\n height: 0;\n`;\n\ntype SelectorProps = {\n align: 'left' | 'right';\n $hasPresets: boolean;\n};\n\nconst Selector = styled.div<SelectorProps>`\n background: white;\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n position: absolute;\n top: ${({ theme }) => theme.spacing.space07};\n ${({ align }) =>\n align === 'left' &&\n `\n left: 0;\n `};\n ${({ align }) =>\n align === 'right' &&\n `\n right: 0;\n `};\n z-index: ${({ theme }) => theme.zIndex.RangeSelector};\n`;\n\nconst SelectorInner = styled.div`\n display: flex;\n`;\n\nconst SelectorSection = styled.div`\n padding: ${({ theme }) => `${theme.spacing.space05} ${theme.spacing.space03}`};\n`;\n\nconst Footer = styled.div`\n border-top: 1px solid ${({ theme }) => theme.color.grey400};\n display: flex;\n flex-shrink: 0;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.space05};\n width: 100%;\n`;\n\nconst Label = styled.span`\n text-align: left;\n white-space: nowrap;\n\n &&::before {\n content: attr(data-title);\n display: block;\n font-weight: bold;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n width: calc(100% + 40px);\n }\n`;\n\ntype Preset = {\n label?: string;\n value: {\n end: Date;\n start: Date;\n };\n tooltipText?: string;\n};\n\nexport type RangeSelectorProps = {\n /**\n * Align the popup to the left or the right of the tigger button\n */\n align?: 'left' | 'right';\n /**\n * The variant to be passed to the button component\n */\n buttonVariant?: 'input' | 'primary' | 'secondary' | 'tertiary';\n /**\n * The earliest selectable date\n */\n earliestDate?: Date;\n /**\n * The latest selectable date\n */\n latestDate?: Date;\n /**\n * Text to display in the footer\n */\n footerText?: JSX.Element | string;\n /**\n * A function that receives a date range object and returns a string to be rendered in the\n * trigger button\n */\n format?: (dataRange: DateRangeType) => JSX.Element | string;\n /**\n * Callback fired when the date range changes\n */\n onChange?: (dateRange: DateRangeType) => unknown;\n /*\n * A list of preset date ranges\n */\n presets?: Preset[];\n /**\n * The date range to be displayed in the picker\n */\n range?: DateRangeType;\n /**\n * Prevent dates in the future from being selected\n */\n shouldPreventFuture?: boolean;\n /**\n * If true, the button will take up the full width of its container\n */\n fullWidth?: boolean;\n /**\n * A custom width for the RangeSelector component (in px, %, or other CSS units)\n */\n width?: number | string;\n /**\n * A custom React component to use as the trigger button. The component should accept onClick,\n * children, and other standard button props.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customTriggerComponent?: ComponentType<Record<string, any>>;\n};\n\nexport const RangeSelector = ({\n align = 'left',\n buttonVariant = 'secondary',\n earliestDate,\n latestDate,\n format = formatFunc,\n fullWidth = false,\n footerText,\n onChange,\n presets = [],\n range = {\n end: new Date(),\n start: new Date(),\n },\n shouldPreventFuture = false,\n customTriggerComponent,\n width,\n ...props\n}: RangeSelectorProps): JSX.Element => {\n const [internalRange, setInternalRange] = useState<DateRangeType>(range);\n const [isOpen, setIsOpen] = useState(false);\n const [isCurrentCalendarValid, setIsCurrentCalendarValid] = useState(true);\n const [rangePartToShow, setRangePartToShow] = useState<'' | 'end' | 'start'>('end');\n const [errors, setErrors] = useState<string[]>([]);\n const theme = useTheme();\n\n useEffect(() => {\n setInternalRange(range);\n }, [range]);\n\n useEffect(() => {\n const onClick = () => {\n setIsOpen(false);\n setInternalRange(range);\n };\n\n if (isOpen) {\n window.addEventListener('click', onClick);\n }\n\n return () => {\n window.removeEventListener('click', onClick);\n };\n }, [isOpen, range, setInternalRange]);\n\n const handleClick = (event: MouseEvent): void => event.stopPropagation();\n\n const commonTriggerProps = {\n 'data-testid': 'trigger',\n fullWidth,\n onClick: () => setIsOpen(!isOpen),\n children: format(range),\n // spread all props except data-testid to avoid duplicate test IDs\n ...Object.fromEntries(Object.entries(props).filter(([key]) => key !== 'data-testid')),\n };\n\n const CustomTrigger = customTriggerComponent;\n\n return (\n // eslint-disable-next-line styled-components-a11y/no-static-element-interactions, styled-components-a11y/click-events-have-key-events\n <RangeSelectorWrapper\n $width={width}\n data-testid=\"rangeselector-test-identifier\"\n onClick={handleClick}\n >\n {CustomTrigger ? (\n <CustomTrigger {...commonTriggerProps} />\n ) : (\n <StyledButton\n {...commonTriggerProps}\n $inputButtonOverride={buttonVariant === 'input'}\n icon={\n <Icon\n size=\"sm\"\n type=\"caret-down\"\n />\n }\n iconPosition=\"end\"\n textAlign=\"left\"\n variant={buttonVariant === 'input' ? 'tertiary' : buttonVariant}\n />\n )}\n {isOpen ? (\n <Selector\n $hasPresets={Boolean(presets.length)}\n align={align}\n >\n <SelectorInner>\n {Boolean(presets.length) && (\n <List\n data-testid=\"presets\"\n style={{\n marginBottom: 0,\n borderRight: `1px solid ${theme.color.grey400}`,\n padding: '12px',\n }}\n variant=\"unbulleted\"\n >\n {presets.map(({ label, value, tooltipText }) => (\n <ListItem key={label}>\n <Item\n $isActive={isSameRange(internalRange, value)}\n data-testid={label?.replaceAll(' ', '_')}\n onClick={() => {\n setInternalRange(value);\n }}\n >\n {/* the title attr is this way is to ensure there is enough space for text and icon without layout shifting */}\n <Label data-title={`${label}___`}>\n {label}{' '}\n {tooltipText !== undefined ? (\n <PresetTooltip tooltipText={tooltipText} />\n ) : null}\n </Label>\n </Item>\n </ListItem>\n ))}\n </List>\n )}\n\n <SelectorSection>\n <CalendarPadding>\n <RangeSelectorInput\n earliestDate={earliestDate}\n latestDate={latestDate}\n onChange={(next: DateRangeType) => {\n setInternalRange(next);\n }}\n onErrorChange={setErrors}\n onSelectedRangePartChange={setRangePartToShow}\n range={internalRange}\n shouldPreventFuture={shouldPreventFuture}\n width=\"100%\"\n />\n <RangeSelectorCalendar\n earliestDate={earliestDate}\n latestDate={latestDate}\n onChange={(next) => {\n setInternalRange(next as DateRangeType);\n }}\n onIsValidChange={setIsCurrentCalendarValid}\n range={internalRange}\n rangePartToShow={rangePartToShow}\n shouldPreventFuture={shouldPreventFuture}\n />\n </CalendarPadding>\n </SelectorSection>\n </SelectorInner>\n <Break />\n <Footer>\n <div>{footerText}</div>\n <ButtonGroup align=\"right\">\n <Button\n onClick={() => {\n setInternalRange(range);\n setIsOpen(false);\n }}\n style={{ marginLeft: 0 }}\n variant=\"secondary\"\n >\n Cancel\n </Button>\n <Button\n data-testid=\"apply-button\"\n disabled={Boolean(errors.length) || !isCurrentCalendarValid}\n onMouseUp={() => {\n if (onChange) {\n onChange(internalRange);\n }\n setIsOpen(false);\n }}\n >\n Apply\n </Button>\n </ButtonGroup>\n </Footer>\n </Selector>\n ) : null}\n </RangeSelectorWrapper>\n );\n};\n\nRangeSelector.displayName = 'RangeSelector_VHS';\n","/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport type { ComponentPropsWithoutRef, Dispatch, SetStateAction, JSX } from 'react';\nimport { useEffect, useMemo, useState } from 'react';\nimport { isNotNil, isNil } from '@wistia/type-guards';\nimport { styled } from 'styled-components';\nimport { debounce } from 'throttle-debounce';\nimport {\n addDays,\n compareAsc,\n differenceInDays,\n endOfDay,\n isBefore,\n isEqual,\n isSameDay,\n isWithinInterval,\n startOfMonth,\n} from 'date-fns';\nimport type { DateRangeType } from '../RangeSelectorInput/utils';\nimport { usePreviousValue } from '../../../hooks/usePreviousValue';\nimport { Calendar, Day, DayNumber } from '../Calendar';\n\n// TODO: Use real Day types once it has been converted to TS\ntype EnhancedDayProps = ComponentPropsWithoutRef<'button'> & {\n $isBeginning: boolean;\n $isEnd: boolean;\n $isInRange: boolean;\n $isInTempRange: boolean;\n $isActive: boolean;\n $isHovered: boolean;\n disabled?: boolean;\n $val: string;\n};\n\nconst EnhancedDay = styled(Day)<EnhancedDayProps>`\n ${({ $isBeginning, $isInRange }) =>\n $isBeginning &&\n !$isInRange &&\n `\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n `};\n ${({ $isEnd, $isInRange }) =>\n $isEnd &&\n !$isInRange &&\n `\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n `};\n ${({ $isEnd, $isBeginning }) =>\n $isEnd &&\n $isBeginning &&\n `\n border-radius: 50%;\n `};\n ${({ theme, $isInRange }) =>\n $isInRange &&\n `\n background: ${theme.color.brandBlue200};\n border: 0px solid ${theme.color.grey300};\n border-radius: 0;\n `};\n ${({ theme, $isInTempRange }) =>\n $isInTempRange &&\n `\n border-width: 1px 0;\n border-style: solid;\n border-color: ${theme.color.brandBlue500};\n border-radius: 0;\n `};\n ${({ theme, $isActive }) =>\n $isActive &&\n `\n background: ${theme.color.blue500};\n background: ${theme.color.brandBlue500};\n border: none;\n color: white;\n `};\n ${({ theme, $isHovered }) =>\n $isHovered &&\n `\n &::after {\n border: 1px solid ${theme.color.brandBlue500};\n border-radius: 50%;\n content: '';\n display: block;\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 0;\n };\n\n &:disabled:after {\n display: none;\n };\n `};\n ${({ theme, $isBeginning, $isEnd, $isHovered }) =>\n $isBeginning &&\n !$isEnd &&\n $isHovered &&\n `\n color: white;\n\n &::after {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-left: 0px;\n background: ${theme.color.brandBlue500};\n color: white;\n }\n `};\n ${({ theme, disabled, $isEnd, $isBeginning, $isHovered }) =>\n isNotNil($isEnd) &&\n !$isBeginning &&\n !disabled &&\n $isHovered &&\n `\n color: white;\n\n &::after {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-right: 0px;\n background: ${theme.color.brandBlue500};\n }\n `}\n`;\n\nexport const isValidRange = (range?: DateRangeType) => {\n if (isNil(range)) {\n return false;\n }\n const { start, end } = range;\n return start instanceof Date && end instanceof Date && isBefore(start, end);\n};\n\nexport const isInRange = (range: DateRangeType | undefined, day: Date) => {\n if (isNil(range)) {\n return false;\n }\n const diff = differenceInDays(range.end, range.start);\n\n if (diff < 2) {\n return false;\n }\n\n return isWithinInterval(day, { start: addDays(range.start, 1), end: addDays(range.end, -1) });\n};\n\nconst makeRange = (firstDate?: Date | false, secondDate?: Date): DateRangeType | undefined => {\n if (firstDate instanceof Date && isNotNil(secondDate)) {\n const [start, end] = [firstDate, secondDate].sort(compareAsc);\n if (isNotNil(start) && isNotNil(end)) {\n return { start, end: endOfDay(end) };\n }\n }\n\n return undefined;\n};\n\nconst useRange = (firstDate?: Date | false, secondDate?: Date): DateRangeType | undefined => {\n const [range, setRange] = useState<DateRangeType | undefined>();\n\n useEffect(() => {\n setRange(makeRange(firstDate, secondDate));\n }, [firstDate, secondDate, setRange]);\n\n return range;\n};\n\nexport type RangeSelectorCalendarProps = {\n earliestDate?: Date | undefined;\n latestDate?: Date | undefined;\n onChange?: (...args: unknown[]) => unknown;\n onIsValidChange?: Dispatch<SetStateAction<boolean>>;\n range?: DateRangeType;\n rangePartToShow?: '' | 'end' | 'start';\n shouldPreventFuture?: boolean;\n};\n\n// TODO: this component should live within the RangeSelector folder since its not usable on its own\nexport const RangeSelectorCalendar = ({\n range = {\n end: new Date(),\n start: new Date(),\n },\n rangePartToShow = '',\n onChange,\n onIsValidChange = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function\n earliestDate,\n latestDate,\n shouldPreventFuture = false,\n}: RangeSelectorCalendarProps): JSX.Element => {\n const thisMonth = useMemo(() => startOfMonth(new Date()), []);\n const initialDisplayDate = isNotNil(range.end) ? range.end : thisMonth;\n const [displayDate, setDisplayDate] = useState(initialDisplayDate);\n const [{ firstDate, secondDate }, setDates] = useState<Record<string, Date | undefined>>({}); // eslint-disable-line react/hook-use-state\n const [hoveredDate, setHoveredDate] = useState<Date>();\n const internalRange = useRange(firstDate, secondDate);\n const priorInternalRange = usePreviousValue(internalRange);\n const tempRange = useRange(!isValidRange(internalRange) && firstDate, hoveredDate);\n const onIsValidChangeDebounced = useMemo(() => debounce(100, onIsValidChange), [onIsValidChange]);\n const setDisplayDateDebounced = useMemo(() => debounce(0, setDisplayDate), []);\n\n useEffect(() => {\n setDisplayDateDebounced(range.end);\n /* eslint-disable-next-line react-hooks/exhaustive-deps */\n }, []);\n\n useEffect(() => {\n if (!internalRange || !priorInternalRange) {\n return;\n }\n if (rangePartToShow) {\n const date = internalRange[rangePartToShow];\n setDisplayDateDebounced(date);\n }\n }, [rangePartToShow, internalRange, priorInternalRange, setDisplayDateDebounced]);\n\n useEffect(() => {\n onIsValidChangeDebounced(isValidRange(internalRange));\n }, [internalRange, onIsValidChangeDebounced]);\n\n useEffect(() => {\n if (isValidRange(range)) {\n let date; // eslint-disable-line @typescript-eslint/init-declarations\n if (priorInternalRange && !isEqual(range.start, priorInternalRange.start)) {\n date = range.start;\n }\n\n if (priorInternalRange && !isEqual(range.end, priorInternalRange.end)) {\n date = range.end;\n }\n\n if (date) {\n setDisplayDateDebounced(date);\n }\n\n setDates({ firstDate: range.start, secondDate: range.end });\n }\n }, [range, priorInternalRange, setDisplayDateDebounced]);\n\n const dayProps = (day: Date) => {\n // place these props in a function so we can log them out for debugging.\n // there's a lot going on here.\n // logging when isHovered is true is more useful\n const isActive =\n (isNotNil(firstDate) && isSameDay(firstDate, day)) ||\n (isNotNil(secondDate) && isSameDay(secondDate, day));\n const isInR = isInRange(internalRange, day);\n const isInTempRange = !internalRange && isInRange(tempRange, day);\n const val = day.toLocaleDateString('en-US');\n const isHovered = isNotNil(hoveredDate) ? isSameDay(day, hoveredDate) : false;\n const isBeginning = Boolean(\n (internalRange && isSameDay(internalRange.start, day)) ||\n (tempRange && isSameDay(tempRange.start, day)),\n );\n const isEnd = Boolean(\n (internalRange && isSameDay(internalRange.end, day)) ||\n (tempRange && isSameDay(tempRange.end, day)),\n );\n\n return {\n $isActive: isActive,\n $isBeginning: isBeginning,\n $isEnd: isEnd,\n $isInRange: isInR,\n $isInTempRange: isInTempRange,\n $isHovered: isHovered,\n $val: val,\n };\n };\n\n return (\n <Calendar\n displayDate={displayDate}\n earliestDate={earliestDate}\n latestDate={latestDate}\n onDisplayDateChange={setDisplayDateDebounced as (d?: Date) => unknown}\n onMouseLeave={() => {\n setHoveredDate(undefined);\n }}\n renderDay={({ day, isDisabled, formattedDay }): JSX.Element => {\n const propsForDay = dayProps(day);\n return (\n <EnhancedDay\n key={day as unknown as string}\n {...propsForDay}\n data-day={formattedDay}\n data-is-beginning={propsForDay.$isBeginning}\n data-is-end={propsForDay.$isEnd}\n data-is-in-temp-range={propsForDay.$isInTempRange}\n disabled={isDisabled}\n onClick={() => {\n let nextFirst: Date | undefined = day;\n let nextSecond: Date | undefined = day;\n if (firstDate && secondDate) {\n nextSecond = undefined;\n } else if (!firstDate) {\n nextSecond = secondDate;\n } else {\n nextFirst = firstDate;\n }\n\n setDates({ firstDate: nextFirst, secondDate: nextSecond });\n const nextRange = makeRange(nextFirst, nextSecond);\n\n if (isValidRange(nextRange) && onChange) {\n onChange(nextRange);\n }\n setHoveredDate(undefined);\n }}\n onMouseOver={() => {\n if (firstDate && !isDisabled) {\n setHoveredDate(day);\n }\n }}\n >\n <DayNumber>{formattedDay}</DayNumber>\n </EnhancedDay>\n );\n }}\n shouldPreventFuture={shouldPreventFuture}\n />\n );\n};\n\nRangeSelectorCalendar.displayName = 'RangeSelectorCalendar';\n","import { styled } from 'styled-components';\nimport {\n isBefore,\n isAfter,\n isFuture,\n addYears,\n eachDayOfInterval,\n eachMonthOfInterval,\n startOfDay,\n startOfMonth,\n endOfMonth,\n getDay,\n addMonths,\n} from 'date-fns';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { JSX } from 'react';\nimport type { OptionsType } from '../../../components/Select';\nimport { Select } from '../../../components/Select';\nimport { Icon } from '../../../components/Icon';\n\nconst dayDimension = 45;\n\nconst daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\nconst daysInAWeek = 7;\n\nconst hasDates = (week: (Date | [] | undefined)[]): boolean =>\n week[0] instanceof Date || week[6] instanceof Date;\n\nconst daysOfMonth = (dateInMonth: Date): Date[] => {\n const interval = {\n start: startOfMonth(startOfDay(dateInMonth)),\n end: endOfMonth(startOfDay(dateInMonth)),\n };\n return eachDayOfInterval(interval);\n};\n\nconst makeEmptyWeek = (): [][] => Array.from({ length: daysInAWeek }, () => []);\n\nconst monthLayout = (days: Date[]) => {\n const month = [];\n const dayOfStart = isNotNil(days[0]) ? getDay(days[0]) : 0;\n let currentWeek: (Date | [] | undefined)[] = makeEmptyWeek();\n\n for (let i = 0; i < days.length; i++) {\n const positionInWeek = (i + dayOfStart) % daysInAWeek;\n if (positionInWeek === 0 && hasDates(currentWeek)) {\n month.push(currentWeek);\n currentWeek = makeEmptyWeek();\n }\n currentWeek[positionInWeek] = days[i];\n }\n\n if (hasDates(currentWeek)) {\n month.push(currentWeek);\n }\n\n return month;\n};\n\nconst Month = styled.div`\n cursor: not-allowed;\n padding-top: ${({ theme }) => theme.spacing.space04};\n width: ${dayDimension * daysInAWeek}px;\n`;\n\nconst MonthHeader = styled.div`\n display: flex;\n justify-content: space-between;\n margin-bottom: ${({ theme }) => theme.spacing.space04};\n`;\n\nconst MonthLayout = styled.div`\n display: grid;\n grid-template-columns: repeat(7, 14.28% [col-start]);\n width: 100%;\n`;\n\nexport const Day = styled.button`\n background: none;\n border: 0 solid white;\n border-radius: 50%;\n color: ${({ theme }) => theme.color.grey800};\n cursor: pointer;\n font-size: 14px;\n height: ${dayDimension}px;\n margin-bottom: ${({ theme }) => theme.spacing.space01};\n position: relative;\n text-align: center;\n user-select: none;\n width: ${dayDimension}px;\n\n &:disabled {\n border: 0 solid white;\n color: ${({ theme }) => theme.color.grey300};\n cursor: not-allowed;\n }\n`;\n\nconst NullDay = styled.div`\n height: ${dayDimension}px;\n`;\n\nconst DayLabel = styled.span`\n font-size: 14px;\n font-weight: 500;\n margin-bottom: ${({ theme }) => theme.spacing.space02};\n text-align: center;\n user-select: none;\n`;\n\nexport const DayNumber = styled.span`\n position: relative;\n z-index: 1;\n`;\n\nconst MonthButton = styled.button`\n background: none;\n border: none;\n color: ${({ theme }) => theme.color.grey500};\n cursor: pointer;\n\n &:disabled {\n color: ${({ theme }) => theme.color.grey300};\n cursor: not-allowed;\n }\n`;\n\ntype RenderDayProps = {\n day: Date;\n isDisabled: boolean;\n formattedDay: string;\n};\n\nexport type CalendarProps = {\n displayDate: Date;\n earliestDate?: Date | undefined;\n latestDate?: Date | undefined;\n onDisplayDateChange?: (d?: Date) => unknown;\n onMouseLeave?: () => void;\n renderDay?: (args: RenderDayProps) => JSX.Element;\n shouldPreventFuture?: boolean;\n};\n\nexport const Calendar = ({\n displayDate,\n earliestDate,\n latestDate,\n onDisplayDateChange,\n onMouseLeave,\n shouldPreventFuture = false,\n renderDay,\n}: CalendarProps): JSX.Element => {\n const month = monthLayout(daysOfMonth(displayDate));\n const nextMonth = startOfMonth(addMonths(displayDate, 1));\n const prevMonth = endOfMonth(addMonths(displayDate, -1));\n\n const isAfterLatest = (date: Date) => {\n if (!latestDate) {\n return false;\n }\n\n return isAfter(date, latestDate);\n };\n\n const isInFuture = (date: Date) => {\n if (!shouldPreventFuture) {\n return false;\n }\n\n return isFuture(date);\n };\n\n const isBeforeEarliest = (date: Date) => {\n if (!earliestDate) {\n return false;\n }\n\n return isBefore(date, earliestDate);\n };\n\n const isDisabled = (date: Date) =>\n isAfterLatest(date) || isInFuture(date) || isBeforeEarliest(date);\n\n const formatDay = (date: Date) => date.toLocaleDateString('en-US', { day: 'numeric' });\n\n const renderDayFunc = (day: Date): JSX.Element =>\n renderDay ? (\n renderDay({\n day,\n isDisabled: isDisabled(day),\n formattedDay: formatDay(day),\n })\n ) : (\n <Day\n key={day as unknown as string}\n data-day={formatDay(day)}\n disabled={isDisabled(day)}\n >\n <DayNumber>{formatDay(day)}</DayNumber>\n </Day>\n );\n\n const possibleRange = {\n start: earliestDate ?? addYears(new Date(), -5), // eslint-disable-line @typescript-eslint/no-magic-numbers\n end: shouldPreventFuture ? new Date() : addYears(new Date(), 5),\n };\n\n const currentYear = displayDate.getFullYear();\n const getMonthOptions = () => {\n const formatter = new Intl.DateTimeFormat('en', { month: 'long' });\n\n return eachMonthOfInterval(possibleRange)\n .filter((date) => date.getFullYear() === displayDate.getFullYear())\n .map((date) => ({ value: date.getMonth(), label: formatter.format(date) }));\n };\n\n const getYearOptions = (): OptionsType =>\n Object.values(\n eachMonthOfInterval(possibleRange)\n .map((date) => ({ value: date.getFullYear(), label: date.getFullYear() }))\n .reduce((memo, entry) => {\n if (isNotNil(memo[entry.value as keyof typeof memo])) {\n return memo;\n }\n return { ...memo, [entry.value]: entry };\n }, {}),\n );\n\n const monthOptions = getMonthOptions();\n const yearOptions = getYearOptions();\n\n return (\n <Month data-testid=\"calendar-test-identifier\">\n <MonthHeader>\n <MonthButton\n aria-label=\"Previous month\"\n data-testid=\"month-prev\"\n disabled={isBeforeEarliest(prevMonth)}\n onClick={() => {\n if (onDisplayDateChange) {\n onDisplayDateChange(prevMonth);\n }\n }}\n style={{ transform: 'translateX(-5px)' }}\n type=\"button\"\n >\n <Icon\n size=\"md\"\n type=\"caret-left\"\n />\n </MonthButton>\n <Select\n aria-label=\"Select month\"\n data-testid=\"monthSelect\"\n fullWidth={false}\n onChange={(event) => {\n const selectedMonth = event.target.value;\n const nextDate = new Date(currentYear, Number(selectedMonth));\n if (onDisplayDateChange) {\n if (isInFuture(nextDate)) {\n onDisplayDateChange(new Date());\n } else if (isBeforeEarliest(nextDate)) {\n onDisplayDateChange(earliestDate);\n } else {\n onDisplayDateChange(nextDate);\n }\n }\n }}\n options={monthOptions}\n placeholder={null}\n value={displayDate.getMonth()}\n />\n <Select\n aria-label=\"Select year\"\n data-testid=\"yearSelect\"\n fullWidth={false}\n onChange={(event) => {\n const currentMonth = displayDate.getMonth();\n const selectedYear = event.target.value;\n const nextDate = new Date(Number(selectedYear), currentMonth);\n if (onDisplayDateChange) {\n if (isInFuture(nextDate)) {\n onDisplayDateChange(new Date());\n } else if (isBeforeEarliest(nextDate)) {\n onDisplayDateChange(earliestDate);\n } else {\n onDisplayDateChange(nextDate);\n }\n }\n }}\n options={yearOptions}\n placeholder={null}\n value={displayDate.getFullYear()}\n />\n <MonthButton\n aria-label=\"Next month\"\n data-testid=\"month-next\"\n disabled={isInFuture(nextMonth)}\n onClick={() => {\n if (onDisplayDateChange) {\n onDisplayDateChange(nextMonth);\n }\n }}\n style={{ transform: 'translateX(4px)' }}\n type=\"button\"\n >\n <Icon\n size=\"md\"\n type=\"caret-right\"\n />\n </MonthButton>\n </MonthHeader>\n\n {/* eslint-disable-next-line styled-components-a11y/interactive-supports-focus */}\n <MonthLayout\n aria-label=\"Day selection grid\"\n onMouseLeave={onMouseLeave}\n role=\"button\"\n >\n {daysOfWeek.map((day) => (\n <DayLabel key={day}>{day}</DayLabel>\n ))}\n {month.map((week: (Date | [] | undefined)[]): JSX.Element[] =>\n week.map((day) =>\n day instanceof Date ? renderDayFunc(day) : <NullDay key={Math.random()} />,\n ),\n )}\n </MonthLayout>\n </Month>\n );\n};\n\nCalendar.displayName = 'Calendar';\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { styled } from 'styled-components';\nimport { endOfDay } from 'date-fns';\nimport { isNotUndefined, isUndefined, isNotNil } from '@wistia/type-guards';\nimport { ErrorMessages } from './ErrorMessages';\nimport { INITIAL_VALUE, DATE_PART_POSITIONS } from './constants';\nimport { isPermissableKey, isValueChangeEvent, isMoveEvent } from './eventTypes';\nimport { getValueParts, rangeToString, stringToRange } from './conversions';\nimport { getNextValue, getNextSelection } from './iterators';\nimport type { DateRangeType } from './utils';\nimport { isValidRange, preventDoubleClick, getErrors, orderRange } from './utils';\nimport {\n getSelectionFromMove,\n getSelectionFromCursor,\n getFirstDefaultPosition,\n getRangePartFromSelection,\n setCursorPosition,\n} from './selection';\n\ntype InputStyledProps = {\n $width?: string;\n};\n\nconst Input = styled.input<InputStyledProps>`\n border: 1px solid ${({ theme }) => theme.color.grey400};\n border-radius: 4px;\n color: ${({ theme }) => theme.color.grey800};\n outline: none;\n padding: ${({ theme }) => theme.spacing.space03};\n resize: none;\n text-align: center;\n width: ${({ $width }) => $width};\n\n &:focus {\n border: 1px solid ${({ theme }) => theme.color.brandBlue500};\n }\n`;\n\ntype GetMaxDateProps = {\n latestDate?: Date | undefined;\n shouldPreventFuture: boolean;\n};\n\nconst getMaxDate = ({ latestDate, shouldPreventFuture }: GetMaxDateProps): Date | undefined => {\n if (latestDate) {\n return latestDate;\n }\n\n return shouldPreventFuture ? endOfDay(new Date()) : undefined;\n};\n\nexport type RangeSelectorInputProps = {\n earliestDate?: Date | undefined;\n latestDate?: Date | undefined;\n onChange?: (next: DateRangeType) => void;\n onErrorChange?: (value: string[]) => void;\n onSelectedRangePartChange?: (next: '' | 'end' | 'start') => void;\n range: DateRangeType;\n shouldPreventFuture?: boolean;\n width?: string;\n};\n\n// TODO: this component should live within the RangeSelector folder since its not usable on its own\nexport const RangeSelectorInput = ({\n onChange,\n onSelectedRangePartChange,\n range,\n earliestDate,\n latestDate,\n shouldPreventFuture = false,\n width = '100%',\n onErrorChange,\n}: RangeSelectorInputProps) => {\n const [value, setValue] = useState<string>(INITIAL_VALUE);\n const [keyCount, setKeyCount] = useState(0);\n const [errorMessages, setErrorMessages] = useState<string[]>([]);\n const ref = useRef<HTMLInputElement>(null);\n const [currentSelection, setCurrentSelection] = useState<number[]>([0, -1]);\n const selectionLength =\n isUndefined(currentSelection) ||\n isUndefined(currentSelection[1]) ||\n isUndefined(currentSelection[0])\n ? 0\n : currentSelection[1] - currentSelection[0];\n const valueParts = getValueParts(value);\n\n const applyChange = useCallback(\n (nextRange: DateRangeType) => {\n const errors = getErrors({\n range: nextRange,\n maxDate: getMaxDate({ latestDate, shouldPreventFuture }),\n minDate: earliestDate,\n });\n\n if (isValidRange(nextRange)) {\n setValue(rangeToString(nextRange));\n if (!errors.length && isNotUndefined(onChange)) {\n onChange(orderRange(nextRange));\n }\n }\n\n setErrorMessages(errors);\n },\n [earliestDate, latestDate, shouldPreventFuture, onChange],\n );\n\n // update our internal state when the range prop changes\n useEffect(() => {\n setErrorMessages([]);\n setValue(rangeToString(range));\n }, [range]);\n\n useEffect(() => {\n if (isNotUndefined(onErrorChange)) {\n onErrorChange(errorMessages);\n }\n }, [errorMessages, onErrorChange]);\n\n // when the user has pressed the number of keys to fill a section, highlight the next one\n useEffect(() => {\n if (selectionLength === keyCount) {\n setKeyCount(0);\n const nextSelection = getSelectionFromMove(currentSelection, 1, DATE_PART_POSITIONS);\n setCurrentSelection(nextSelection);\n }\n }, [keyCount, currentSelection, selectionLength]);\n\n // apply the current selection to the dom\n useEffect(() => {\n setCursorPosition(ref, currentSelection[0], currentSelection[1]);\n if (isNotUndefined(onSelectedRangePartChange)) {\n onSelectedRangePartChange(getRangePartFromSelection(currentSelection));\n }\n }, [currentSelection, value, ref, onSelectedRangePartChange]);\n\n return (\n <div>\n {Boolean(errorMessages.length) && <ErrorMessages messages={errorMessages} />}\n <Input\n ref={ref}\n $width={width}\n data-testid=\"range-selector-input\"\n onBlur={() => {\n if (keyCount !== selectionLength && keyCount !== 0) {\n const stringToRangeValue = stringToRange(value);\n if (isNotNil(stringToRangeValue)) {\n applyChange(stringToRangeValue);\n }\n }\n setCurrentSelection([0, -1]);\n }}\n onFocus={() => {\n const index = getFirstDefaultPosition(value);\n if (index !== -1) {\n const firstPosition = DATE_PART_POSITIONS[0];\n\n if (isNotNil(firstPosition)) {\n const { start, end } = firstPosition;\n setCurrentSelection([start, end]);\n }\n }\n }}\n onKeyDown={(event) => {\n const args = {\n event,\n currentSelection,\n keyCount,\n valueParts,\n selectionLength,\n };\n\n if (!isPermissableKey(event)) {\n event.preventDefault();\n return;\n }\n\n if (isValueChangeEvent(event)) {\n const { nextValue, nextKeyCount, shouldApply } = getNextValue(args);\n const nextRange = stringToRange(nextValue);\n\n if (shouldApply && isNotUndefined(nextRange)) {\n applyChange(nextRange);\n } else {\n setValue(nextValue);\n }\n\n setKeyCount(nextKeyCount);\n }\n\n if (isMoveEvent(event)) {\n const { nextSelection, nextKeyCount } = getNextSelection(args);\n\n if (isNotUndefined(nextSelection)) {\n setCurrentSelection(nextSelection);\n }\n setKeyCount(nextKeyCount);\n const stringToRangeValue = stringToRange(value);\n\n if (isNotUndefined(stringToRangeValue)) {\n applyChange(stringToRangeValue);\n }\n }\n }}\n onMouseDown={preventDoubleClick}\n onMouseUp={() => {\n // determine the current segment to highlight when the user clicks on the input\n setKeyCount(0);\n setCurrentSelection(getSelectionFromCursor(ref, DATE_PART_POSITIONS));\n }}\n readOnly={true}\n type=\"text\"\n value={value}\n />\n </div>\n );\n};\n\nRangeSelectorInput.displayName = 'RangeSelectorInput';\n","import { styled } from 'styled-components';\nimport type { JSX } from 'react';\n\nconst ErrorMessagesList = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n`;\n\nconst ErrorMessage = styled.li`\n color: ${({ theme }) => theme.color.error600};\n font-size: 12px;\n`;\n\nexport type ErrorMessagesProps = {\n messages?: string[];\n};\n\nexport const ErrorMessages = ({ messages = [] }: ErrorMessagesProps): JSX.Element => (\n <ErrorMessagesList>\n {messages.map((message) => (\n <ErrorMessage key={message}>{message}</ErrorMessage>\n ))}\n </ErrorMessagesList>\n);\n","export const DIVIDER_STRING = ' - ';\nexport const INITIAL_VALUE = `mm/dd/yyyy${DIVIDER_STRING}mm/dd/yyyy`;\n\nconst positionElements = [\n { type: 'month', id: 'month1' },\n { type: 'day', id: 'day1' },\n { type: 'year', id: 'year1' },\n { type: 'skip' },\n { type: 'month', id: 'month2' },\n { type: 'day', id: 'day2' },\n { type: 'year', id: 'year2' },\n];\n\ntype positionElementType = {\n type: string;\n id?: string;\n};\nexport type PositionType = {\n start: number;\n end: number;\n type: string;\n id: string | undefined;\n};\n\nexport type DatePartsType = {\n month1: string;\n day1: string;\n year1: string;\n month2: string;\n day2: string;\n year2: string;\n};\n\nconst createPositionsFromElements = (elements: positionElementType[]): PositionType[] => {\n const spaces = {\n month: 2,\n day: 2,\n year: 4,\n skip: DIVIDER_STRING.length - 2,\n };\n\n let currentPosition = 0;\n\n return elements.map(({ type, id }, index) => {\n const start = currentPosition + (index === 0 ? 0 : 1);\n const end = start + spaces[type as keyof typeof spaces];\n currentPosition = end;\n\n return { start, end, type, id };\n });\n};\n\nexport const DATE_PART_POSITIONS = createPositionsFromElements(positionElements);\n","import type { KeyboardEvent } from 'react';\n\nconst keys = new Set([\n 'Enter',\n 'Backspace',\n 'Tab',\n 'ArrowRight',\n 'ArrowLeft',\n 'ArrowUp',\n 'ArrowDown',\n '/',\n]);\n\nexport const isANum = (event: KeyboardEvent): boolean => /^[0-9]$/i.test(event.key);\n\nexport const isAModifier = (event: KeyboardEvent): boolean => keys.has(event.key);\n\nexport const isPermissableKey = (event: KeyboardEvent): boolean =>\n isANum(event) || isAModifier(event);\n\nexport const isMoveRightChar = ({ key, shiftKey }: KeyboardEvent): boolean =>\n (key === 'Tab' && !shiftKey) || key === '/' || key === 'ArrowRight';\n\nexport const isMoveLeftChar = ({ key, shiftKey }: KeyboardEvent) =>\n key === 'ArrowLeft' || (key === 'Tab' && shiftKey);\n\nexport const isArrowUpDown = (event: KeyboardEvent): boolean =>\n event.key === 'ArrowUp' || event.key === 'ArrowDown';\n\nexport const isBackspace = (event: KeyboardEvent): boolean => event.key === 'Backspace';\n\nexport const isValueChangeEvent = (event: KeyboardEvent): boolean =>\n isANum(event) || isArrowUpDown(event) || isBackspace(event);\n\nexport const isMoveEvent = (event: KeyboardEvent): boolean =>\n isMoveLeftChar(event) || isMoveRightChar(event);\n","import { startOfDay, endOfDay, isValid } from 'date-fns';\nimport { isNotNil, isNonEmptyString } from '@wistia/type-guards';\nimport type { DatePartsType } from './constants';\nimport { DIVIDER_STRING } from './constants';\nimport type { DateRangeType } from './utils';\n\nexport const getValueParts = (value: string): DatePartsType => {\n const [start, end] = value.split(DIVIDER_STRING);\n let month1Val: string | undefined = '';\n let day1Val: string | undefined = '';\n let year1Val: string | undefined = '';\n let month2Val: string | undefined = '';\n let day2Val: string | undefined = '';\n let year2Val: string | undefined = '';\n\n if (isNotNil(start)) {\n [month1Val, day1Val, year1Val] = start.split('/');\n }\n if (isNotNil(end)) {\n [month2Val, day2Val, year2Val] = end.split('/');\n }\n\n const month1 = isNonEmptyString(month1Val) ? month1Val : '';\n const day1 = isNonEmptyString(day1Val) ? day1Val : '';\n const year1 = isNonEmptyString(year1Val) ? year1Val : '';\n const month2 = isNonEmptyString(month2Val) ? month2Val : '';\n const day2 = isNonEmptyString(day2Val) ? day2Val : '';\n const year2 = isNonEmptyString(year2Val) ? year2Val : '';\n\n return { month1, day1, year1, month2, day2, year2 };\n};\n\nexport const dateOnlyStringNumeric = (date: Date): string => {\n if (!isValid(date)) {\n return '';\n }\n\n try {\n return new Intl.DateTimeFormat(['en-US'], {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n }).format(date);\n } catch {\n return ''; // handle bad input\n }\n};\n\nexport type DatePartsKeysType = keyof DatePartsType;\nexport const datePartsToString = (parts: DatePartsType): string => {\n const { month1, day1, year1, month2, day2, year2 } = parts;\n\n return `${month1}/${day1}/${year1}${DIVIDER_STRING}${month2}/${day2}/${year2}`;\n};\n\nexport const stringToRange = (value: string): DateRangeType | undefined => {\n const { month1, day1, year1, month2, day2, year2 } = getValueParts(value);\n\n try {\n const start = startOfDay(new Date(Number(year1), Number(month1) - 1, Number(day1)));\n const end = endOfDay(new Date(Number(year2), Number(month2) - 1, Number(day2)));\n\n return { start, end };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error: unknown) {\n return undefined;\n }\n};\n\nexport const rangeToString = ({ start, end }: DateRangeType) => {\n const opts: Intl.DateTimeFormatOptions = { month: '2-digit', day: '2-digit', year: 'numeric' };\n const startString = start.toLocaleDateString('en-US', opts);\n const endString = end.toLocaleDateString('en-US', opts);\n return `${startString}${DIVIDER_STRING}${endString}`;\n};\n","import isEqual from 'react-fast-compare';\nimport type { KeyboardEvent } from 'react';\nimport { getValueParts, datePartsToString } from './conversions';\nimport type { DatePartsType } from './constants';\nimport { INITIAL_VALUE, DATE_PART_POSITIONS } from './constants';\nimport { getFieldId, getMaxValue } from './utils';\nimport { isBackspace, isMoveLeftChar, isMoveRightChar, isArrowUpDown, isANum } from './eventTypes';\nimport { getSelectionFromMove } from './selection';\n\nconst validateDays = (parts: DatePartsType): DatePartsType => {\n const nextParts = { ...parts };\n const pad = (val: number | string) => `${val}`.padStart(2, '0');\n\n if (parts.day1 !== 'dd') {\n nextParts.day1 = pad(Math.min(Number(parts.day1), getMaxValue(parts, 'day1')));\n }\n\n if (parts.day2 !== 'dd') {\n nextParts.day2 = pad(Math.min(Number(parts.day2), getMaxValue(parts, 'day2')));\n }\n\n return nextParts;\n};\n\n// figure out what the next value should be\nexport const applyNumKey = (\n valueParts: DatePartsType,\n part: keyof DatePartsType,\n type: string,\n key: string,\n keyCount: number,\n): DatePartsType => {\n const defaultValue = getValueParts(INITIAL_VALUE)[part];\n const len = defaultValue.length;\n const pad = (val: number | string) => `${val}`.padStart(len, '0');\n const merge = (val: number | string) => ({ ...valueParts, [part]: pad(val) });\n const value = valueParts[part];\n const isDefault = value === defaultValue;\n\n if (keyCount === 0) {\n return merge(pad(key));\n }\n\n const maxValue = getMaxValue(valueParts, part);\n const priorValue = `${Number.parseInt(value, 10)}`;\n const nextValue = `${priorValue}${key}`;\n const exceedsLength = priorValue.length === len;\n\n if (isDefault && type !== 'year') {\n return merge(key);\n }\n if (exceedsLength) {\n return merge(key);\n }\n if (Number.parseInt(nextValue, 10) > maxValue) {\n return merge(maxValue);\n }\n\n return merge(nextValue);\n};\n\nconst inc = (value: string, max: number, diff: number): number => {\n let intValue = Number.parseInt(value, 10);\n if (Number.isNaN(intValue)) {\n intValue = 0;\n }\n\n const nextValue = intValue + diff;\n if (nextValue <= 0 || nextValue > max) {\n return intValue;\n }\n return nextValue;\n};\n\nexport const applyUpDownArrow = (\n valueParts: DatePartsType,\n part: keyof DatePartsType,\n diff: number,\n): DatePartsType => {\n const defaultValue = getValueParts(INITIAL_VALUE)[part];\n const len = defaultValue.length;\n const pad = (val: number | string) => `${val}`.padStart(len, '0');\n const merge = (val: number | string) => ({ ...valueParts, [part]: pad(val) });\n const value = valueParts[part];\n const maxValue = getMaxValue(valueParts, part);\n\n return merge(pad(inc(value, maxValue, diff)));\n};\n\ntype getNextValueProps = {\n event: KeyboardEvent;\n currentSelection: number[];\n keyCount: number;\n valueParts: DatePartsType;\n selectionLength: number;\n};\nexport const getNextValue = ({\n event,\n currentSelection,\n keyCount,\n valueParts,\n selectionLength,\n}: getNextValueProps): {\n nextValue: string;\n nextKeyCount: number;\n shouldApply: boolean;\n} => {\n let nextValue = '';\n let nextKeyCount = keyCount;\n let shouldApply = false;\n const id = getFieldId(currentSelection, DATE_PART_POSITIONS);\n const type = id.substring(0, id.length - 1);\n\n if (isANum(event)) {\n event.preventDefault();\n const nextPotentialParts = applyNumKey(\n valueParts,\n id as keyof DatePartsType,\n type,\n event.key,\n keyCount,\n );\n const validatedParts = validateDays(nextPotentialParts);\n nextValue = datePartsToString(validatedParts);\n nextKeyCount += 1;\n shouldApply = selectionLength === nextKeyCount;\n }\n\n if (isArrowUpDown(event)) {\n event.preventDefault();\n const diff = event.key === 'ArrowUp' ? 1 : -1;\n const nextPotentialParts = applyUpDownArrow(valueParts, id as keyof DatePartsType, diff);\n const validatedParts = validateDays(nextPotentialParts);\n nextValue = datePartsToString(validatedParts);\n nextKeyCount = 0;\n shouldApply = true;\n }\n\n if (isBackspace(event)) {\n event.preventDefault();\n const initialValueParts = getValueParts(INITIAL_VALUE);\n nextValue = datePartsToString({\n ...valueParts,\n [id as keyof DatePartsType]: initialValueParts[id as keyof DatePartsType],\n });\n nextKeyCount = 0;\n }\n\n return { nextValue, nextKeyCount, shouldApply };\n};\n\ntype getNextSelectionProps = {\n event: KeyboardEvent;\n currentSelection: number[];\n};\nexport const getNextSelection = ({ event, currentSelection }: getNextSelectionProps) => {\n // eslint-disable-next-line @typescript-eslint/init-declarations\n let nextSelection;\n\n if (isMoveRightChar(event)) {\n nextSelection = getSelectionFromMove(currentSelection, 1, DATE_PART_POSITIONS);\n if (!isEqual(nextSelection, currentSelection)) {\n event.preventDefault();\n }\n }\n\n if (isMoveLeftChar(event)) {\n nextSelection = getSelectionFromMove(currentSelection, -1, DATE_PART_POSITIONS);\n if (!isEqual(nextSelection, currentSelection)) {\n event.preventDefault();\n }\n }\n\n return { nextSelection, nextKeyCount: 0 };\n};\n","import { isValid, getDaysInMonth, getYear, isBefore, isSameDay, compareAsc } from 'date-fns';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { MouseEvent } from 'react';\nimport { dateOnlyStringNumeric } from './conversions';\nimport type { PositionType } from './constants';\n\nexport type DateRangeType = {\n start: Date;\n end: Date;\n};\n\n// eslint-disable-next-line @typescript-eslint/init-declarations\nlet timeout: ReturnType<typeof setTimeout> | undefined;\nexport const preventDoubleClick = (event: MouseEvent) => {\n const delay = 200;\n\n if (isNotNil(timeout)) {\n event.preventDefault();\n clearTimeout(timeout);\n timeout = undefined;\n }\n timeout = setTimeout(() => {\n clearTimeout(timeout);\n timeout = undefined;\n }, delay);\n};\n\nexport const isValidRange = ({ start, end }: DateRangeType) => isValid(start) && isValid(end);\n\nexport const getFieldId = ([start]: number[], positions: PositionType[]): string => {\n const currentPosition: PositionType | undefined = positions.find((pos) => pos.start === start);\n return isNotNil(currentPosition) && isNotNil(currentPosition.id) ? currentPosition.id : '';\n};\n\nexport const getMaxValue = (valueParts: Record<string, string>, part: string) => {\n const partType = part.substring(0, part.length - 1);\n const index = part.charAt(part.length - 1);\n const monthsInYear = 12;\n const maxDaysInMonth = 31;\n\n switch (partType) {\n case 'month':\n return monthsInYear;\n case 'year':\n return getYear(new Date());\n case 'day':\n if (valueParts[`month${index}`] !== 'mm') {\n const monthAsNumber = valueParts[`month${index}`] as unknown as number;\n const month = monthAsNumber - 1;\n if (valueParts[`year${index}`] !== 'yyyy') {\n const year = valueParts[`year${index}`] as unknown as number;\n return getDaysInMonth(new Date(year, month));\n }\n return getDaysInMonth(new Date(getYear(new Date()), month));\n }\n return maxDaysInMonth;\n default:\n return 0;\n }\n};\n\ntype getErrorsProps = {\n range: DateRangeType;\n maxDate?: Date | undefined;\n minDate?: Date | undefined;\n};\n\nexport const getErrors = ({ range, maxDate, minDate }: getErrorsProps) => {\n const startString = dateOnlyStringNumeric(range.start);\n const endString = dateOnlyStringNumeric(range.end);\n const errorMessages = [];\n\n if (isNotNil(maxDate)) {\n const maxString = dateOnlyStringNumeric(maxDate);\n if (isBefore(maxDate, range.start)) {\n errorMessages.push(`${startString} is after maximum of ${maxString}`);\n }\n if (isBefore(maxDate, range.end)) {\n errorMessages.push(`${endString} is after maximum of ${maxString}`);\n }\n }\n\n if (minDate) {\n const minString = dateOnlyStringNumeric(minDate);\n if (isBefore(range.start, minDate)) {\n errorMessages.push(`${startString} is before minimum of ${minString}`);\n }\n if (isBefore(range.end, minDate)) {\n errorMessages.push(`${endString} is before minimum of ${minString}`);\n }\n }\n\n if (isBefore(range.end, range.start) || isSameDay(range.end, range.start)) {\n errorMessages.push('start date must come before end date');\n }\n\n return errorMessages;\n};\n\nexport const orderRange = (range: DateRangeType): DateRangeType => {\n const [start, end] = [range.start, range.end].sort(compareAsc);\n\n // @ts-expect-error These will both be defined based on the sort method above.\n return { start, end };\n};\n","import type { RefObject } from 'react';\nimport { isNotUndefined, isUndefined, isNotNil } from '@wistia/type-guards';\nimport type { DatePartsKeysType } from './conversions';\nimport { getValueParts } from './conversions';\nimport type { PositionType } from './constants';\nimport { INITIAL_VALUE, DIVIDER_STRING } from './constants';\n\nconst getCursorPosition = (ref: RefObject<HTMLInputElement | null>) => {\n const startPos = ref.current?.selectionStart;\n const endPos = ref.current?.selectionEnd;\n return { startPos, endPos };\n};\n\nexport const setCursorPosition = (\n ref: RefObject<HTMLInputElement | null>,\n start: number | undefined,\n end: number | undefined,\n) => {\n const elem: HTMLInputElement | null = ref.current;\n if (!elem) {\n return;\n }\n\n // @ts-expect-error This seems to be a quirk of the tsc compiler - these params can be undefined (not null)\n elem.setSelectionRange(start, end);\n};\n\nexport const getSelectionFromMove = (\n selection: number[],\n move: number,\n positions: PositionType[],\n): number[] => {\n const currentIndex = positions.findIndex((pos) => pos.start === selection[0]);\n let nextPosition = positions[currentIndex + move];\n\n if (nextPosition?.type === 'skip') {\n nextPosition = positions[currentIndex + move * 2];\n }\n\n if (nextPosition) {\n return [nextPosition.start, nextPosition.end];\n }\n\n return selection;\n};\n\nexport const getSelectionFromCursor = (\n ref: RefObject<HTMLInputElement | null>,\n positions: PositionType[],\n) => {\n const pos = getCursorPosition(ref);\n\n for (let i = 0; i < positions.length; i++) {\n if (isUndefined(positions[i])) {\n return [];\n }\n const { start, end, type } = positions[i]!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n if (isNotNil(pos.startPos) && pos.startPos > start - 1 && pos.startPos <= end) {\n if (type === 'skip' && isNotUndefined(positions[i + 1])) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return [positions[i + 1]!.start, positions[i + 1]!.end];\n }\n return [start, end];\n }\n }\n\n return [];\n};\n\nexport const getFirstDefaultPosition = (value: string) => {\n const vp = getValueParts(value);\n const dvp = getValueParts(INITIAL_VALUE);\n const parts: DatePartsKeysType[] = ['month1', 'day1', 'year1', 'month2', 'day2', 'year2'];\n for (let i = 0; i < parts.length; i++) {\n if (isUndefined(parts[i])) {\n return -1;\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (vp[parts[i]!] === dvp[parts[i]!]) {\n return i;\n }\n }\n return -1;\n};\n\nexport const getRangePartFromSelection = ([, end]: number[]): '' | 'end' | 'start' => {\n const indexOfDivider = INITIAL_VALUE.indexOf(DIVIDER_STRING);\n if (end === -1) {\n return '';\n }\n\n if (isNotUndefined(end) && end <= indexOfDivider) {\n return 'start';\n }\n\n return 'end';\n};\n","import type { ComponentPropsWithoutRef, JSX, HTMLAttributes, RefCallback, Key } from 'react';\nimport { styled, css } from 'styled-components';\nimport ReactSlider from 'react-slider';\nimport {\n isFunction,\n isNonEmptyArray,\n isNonEmptyString,\n isNotNil,\n isNumber,\n isString,\n} from '@wistia/type-guards';\n\nconst TRACK_SIZE = '4px';\n\nconst DisabledSliderStyles = css`\n opacity: 0.5;\n\n & * {\n pointer-events: none;\n }\n`;\n\ntype SliderContainerProps = {\n disabled: boolean;\n};\n\nconst SliderContainer = styled.div<SliderContainerProps>`\n padding-bottom: ${TRACK_SIZE};\n width: 100%;\n ${({ disabled }) => (disabled ? DisabledSliderStyles : null)}\n`;\n\nconst StyledThumb = styled.div`\n background-color: ${({ theme }) => theme.color.brandBlue100};\n border-color: ${({ theme }) => theme.color.brandBlue500};\n border-radius: 50%;\n border-style: solid;\n border-width: 2px;\n box-shadow: ${({ theme }) => theme.shadow.elevation1};\n cursor: grab;\n height: 20px;\n transform: translateY(-8px);\n transition-duration: ${({ theme }) => theme.duration.productive.fast};\n transition-property: border-width, transform;\n transition-timing-function: ${({ theme }) => theme.easing.exit.productive};\n width: 20px;\n\n &:hover,\n &:active {\n transform: translateY(-8px) scale(1.2);\n transform-origin: center;\n transition-timing-function: ${({ theme }) => theme.easing.entrance.productive};\n }\n\n &:focus-visible {\n border-width: 3px;\n outline: none;\n }\n`;\n\nconst checkIfFilledTrack = (trackState: { index: number; value: number | readonly number[] }) => {\n // sefault assumption for single-thumb sliders\n let isFilledTrack = trackState.index === 0;\n\n // handling multi-thumb scenario\n if (Array.isArray(trackState.value)) {\n const valueArray = trackState.value as readonly number[];\n if (valueArray.length > 1) {\n // adjust logic as necessary based on criteria for a filled track\n isFilledTrack = trackState.index > 0 && trackState.index < valueArray.length;\n }\n }\n\n return isFilledTrack;\n};\n\ntype StyledTrackProps = {\n $isFilledTrack: boolean;\n};\n\nconst StyledTrack = styled.div<StyledTrackProps>`\n background: ${({ $isFilledTrack, theme }) =>\n $isFilledTrack ? theme.color.brandBlue500 : theme.color.grey400};\n border-radius: 999px;\n height: ${TRACK_SIZE};\n`;\n\n// this type removes `onChange`, which is a React built-in for some form elements &\n// it causes conflict with the props we use for the Slider component\ntype ComponentPropsWithoutRefWithoutOnChange = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'>;\n\nexport type SliderProps = ComponentPropsWithoutRefWithoutOnChange & {\n /**\n * aria-label for screen-readers to apply to the thumbs. Use an array for more than one thumb.\n * The length of the array must match the number of thumbs in the value array.\n */\n ariaLabel?: string[] | string | undefined;\n /**\n * aria-labelledby for screen-readers to apply to the thumbs. Used when slider rendered with separate label.\n * Use an array for more than one thumb. The length of the array must match the number of thumbs in the value array.\n */\n ariaLabelledby?: string[] | string | undefined;\n /**\n *\n */\n ariaValuetext?: string | ((state: Record<string, unknown>) => unknown);\n /**\n * @ignore\n */\n 'data-testid'?: string;\n /**\n * Determines the initial position(s) of the thumb(s) and the number of thumbs.\n *\n * If a number is passed a slider with one thumb will be rendered.\n * If an array is passed each value will determine the position of one thumb.\n * The values in the array must be sorted.\n *\n * Don't pass a default value if the slider is controlled (i.e. if you already\n * use the `value` prop).\n */\n initialValue?: number[] | number | undefined; // note: this is `defaultValue` in react-slider\n /**\n * If `true` the thumbs can't be moved.\n */\n disabled?: boolean;\n /**\n * The maximum value of the slider.\n */\n max?: number;\n /**\n * The minimum value of the slider.\n */\n min?: number;\n /**\n * Callback called on every value change. The function will be called with two arguments,\n * the first being the new value(s) the second being thumb index. **It does not return an event.**\n */\n onChange?: (value: number, index?: number) => unknown;\n /**\n * Value to be added or subtracted on each step the slider makes. Must be greater than zero.\n * max - min should be evenly divisible by the step value.\n */\n step?: number;\n /**\n * Like 'initialValue' but for controlled components.\n */\n value?: number[] | number;\n};\n\nexport const Slider = ({\n ariaLabel,\n ariaLabelledby,\n ariaValuetext,\n disabled = false,\n initialValue = 0,\n max = 100,\n min = 0,\n onChange,\n step = 1,\n value,\n 'data-testid': passedDataTestId,\n ...otherProps\n}: SliderProps): JSX.Element => {\n if (!(isNonEmptyString(ariaLabel) || isNonEmptyString(ariaLabelledby))) {\n // eslint-disable-next-line no-console\n console.warn(\n 'VHS Slider: Sliders are required to have an accessible name. Add a label using the ariaLabel or ariaLabelledby prop.',\n );\n }\n\n const dataTestId = isNotNil(passedDataTestId) ? passedDataTestId : 'vhs-slider';\n\n return (\n <SliderContainer\n {...otherProps}\n data-testid={dataTestId}\n disabled={disabled}\n >\n {/* @ts-expect-error no overload matches this call */}\n <ReactSlider\n ariaLabel={\n (isString(ariaLabel) || isNonEmptyArray(ariaLabel) ? ariaLabel : undefined) as\n | string\n | undefined\n }\n ariaLabelledby={\n (isString(ariaLabelledby) || isNonEmptyArray(ariaLabelledby)\n ? ariaLabelledby\n : undefined) as string | undefined\n }\n ariaValuetext={\n isFunction(ariaValuetext)\n ? (state: { index: number; value: number; valueNow: number }) => ariaValuetext(state)\n : ariaValuetext\n }\n defaultValue={\n isNumber(initialValue) || isNonEmptyArray(initialValue) ? initialValue : undefined\n }\n disabled={disabled}\n marks={step}\n max={max}\n min={min}\n onChange={onChange}\n renderMark={(\n markProps: HTMLAttributes<HTMLSpanElement> & {\n ref: RefCallback<HTMLSpanElement>;\n } & { key: Key },\n ) => {\n const { key, ...restProps } = markProps;\n return (\n <span\n key={key}\n {...restProps}\n data-testid={`${dataTestId}-mark-${(markProps.key as number) + min}`}\n />\n );\n }}\n renderThumb={(thumbProps, thumbState) => {\n const { key, as, ...restProps } = thumbProps;\n return (\n <StyledThumb\n key={key}\n {...restProps}\n data-testid={`${dataTestId}-thumb-${thumbState.index}`}\n />\n );\n }}\n renderTrack={(trackProps, trackState) => {\n const { key, as, ...restProps } = trackProps;\n return (\n <StyledTrack\n key={key}\n {...restProps}\n $isFilledTrack={checkIfFilledTrack(trackState)}\n data-testid={`${dataTestId}-track-${trackState.index}`}\n />\n );\n }}\n step={step}\n value={isNumber(value) || isNonEmptyArray(value) ? value : undefined}\n />\n </SliderContainer>\n );\n};\n\nSlider.displayName = 'Slider_VHS';\n","import type {\n JSX,\n ElementType,\n ComponentPropsWithoutRef,\n PropsWithChildren,\n ForwardedRef,\n} from 'react';\nimport { forwardRef } from 'react';\nimport type { DefaultTheme } from 'styled-components';\nimport { styled } from 'styled-components';\n\nexport type StackProps<T extends ElementType> = ComponentPropsWithoutRef<T> &\n PropsWithChildren & {\n /**\n * The gap between each item in the stack. Should be one of the spacing values from the theme\n */\n gap?: keyof DefaultTheme['spacing'];\n /**\n * Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.\n * The default behavior is `vertical`.\n */\n direction?: 'horizontal' | 'vertical';\n /**\n * The element (e.g. div, span, p) or component to render as the root element.\n */\n renderAs?: T | 'div';\n };\n\ntype StyledStackProps = {\n $gap: keyof DefaultTheme['spacing'];\n $direction: 'horizontal' | 'vertical';\n};\n\nconst StyledStack = styled.div<StyledStackProps>`\n display: flex;\n flex-direction: ${({ $direction }) => ($direction === 'horizontal' ? 'row' : 'column')};\n gap: ${({ $gap, theme }) => theme.spacing[$gap]};\n\n > * {\n flex: 1;\n }\n`;\n\nexport const Stack = forwardRef(\n <T extends ElementType = 'div'>(\n { renderAs = 'div', direction = 'vertical', gap = 'space02', ...props }: StackProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n ): JSX.Element => {\n return (\n <StyledStack\n {...props}\n ref={ref}\n $direction={direction}\n $gap={gap}\n as={renderAs}\n />\n );\n },\n);\n\nStack.displayName = 'Stack_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled, css } from 'styled-components';\n\ntype SwitchComponentProps = {\n $colorOverride?: string | undefined;\n $hideText?: boolean;\n};\n\nconst SwitchComponent = styled.button<SwitchComponentProps>`\n background-color: white;\n border-color: ${({ theme }) => theme.color.grey700};\n border-radius: 20px;\n border-style: solid;\n border-width: 1px;\n color: ${({ theme }) => theme.color.grey700};\n cursor: pointer;\n display: inline-block;\n height: 20px;\n margin: 0;\n overflow: hidden;\n padding: 0;\n transition: background 175ms ease-out;\n vertical-align: middle;\n width: ${({ $hideText }) => ($hideText ? '40px' : '48px')};\n\n &:hover {\n opacity: 0.8;\n }\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.color.brandBlue500};\n outline-offset: 1px;\n }\n\n &[aria-checked='true'] {\n background-color: ${({ $colorOverride, theme }) => $colorOverride ?? theme.color.success600};\n border-color: ${({ $colorOverride, theme }) => $colorOverride ?? theme.color.success600};\n color: white;\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n opacity: 0.5;\n }\n`;\n\nconst ShowTextStyles = css`\n &::before,\n &::after {\n display: inline-block;\n font-size: 10px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n line-height: 20px;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n\n &::before {\n content: 'ON';\n left: -24px;\n }\n\n &::after {\n color: ${({ theme }) => theme.color.grey700};\n content: 'OFF';\n font-weight: ${({ theme }) => theme.font.weight.bold};\n left: 16px;\n\n ${SwitchComponent}[aria-checked=\"true\"] & {\n left: 20px;\n }\n }\n`;\n\nconst SwitchKnob = styled.div<{ $hideText?: boolean }>`\n background-color: ${({ theme }) => theme.color.grey700};\n border-radius: 50%;\n height: 12px;\n position: relative;\n transform: translateY(0%) translateX(4px);\n transition:\n background 175ms ease-out,\n color 175ms ease-out,\n transform 175ms ease-out;\n width: 12px;\n\n --switch-knob-x-offset: ${({ $hideText }) => ($hideText ? '22px' : '31px')};\n\n ${SwitchComponent}[aria-checked=\"true\"] & {\n background-color: white;\n transform: translateY(0%) translateX(var(--switch-knob-x-offset));\n }\n\n ${({ $hideText }) => !$hideText && ShowTextStyles}\n`;\n\nexport type SwitchProps = Omit<ComponentPropsWithoutRef<'button'>, 'onChange'> & {\n /**\n * Allows user to override default \"on\" color\n */\n colorOverride?: string;\n /**\n * Controls the `aria-disabled` property of the Switch\n */\n disabled?: boolean;\n /**\n * Determines if switch is checked\n */\n isChecked?: boolean;\n /**\n * Callback function invoked when the switch checked state changes\n */\n onChange?: (isChecked: boolean) => unknown;\n /**\n * Controls wether or not the ON / OFF text is shown\n */\n hideText?: boolean;\n};\n\nexport const Switch = ({\n disabled = false,\n isChecked = false,\n onChange,\n colorOverride,\n hideText = false,\n ...otherProps\n}: SwitchProps): JSX.Element => {\n const ariaLabel = isChecked ? 'on' : 'off';\n const handleClick = () => {\n if (onChange) {\n onChange(!isChecked);\n }\n };\n\n return (\n <SwitchComponent\n $colorOverride={colorOverride}\n $hideText={hideText}\n aria-checked={isChecked}\n aria-disabled={disabled}\n aria-label={ariaLabel}\n onClick={!disabled ? handleClick : undefined}\n role=\"switch\"\n type=\"button\"\n {...otherProps}\n >\n <SwitchKnob $hideText={hideText} />\n </SwitchComponent>\n );\n};\n\nSwitch.displayName = 'Switch_VHS';\n","import type { ComponentPropsWithoutRef, JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { GradientNameType } from '../../helpers/getBackgroundGradient/getBackgroundGradient';\nimport { getBackgroundGradient } from '../../helpers/getBackgroundGradient';\nimport { Icon } from '../Icon';\nimport type { IconNameType } from '../Icon/iconMap';\n\ntype ThumbnailComponentProps = {\n $backgroundUrl: string;\n $width: string;\n $gradientBackground?: GradientNameType;\n};\n\ntype IconThumbnailProps = {\n /**\n * The desired display of the thumbnail, either wide or square\n */\n thumbnailImageType?: never;\n /**\n * The URL of the thumbnail image to display\n */\n thumbnailUrl?: never;\n /**\n * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image\n */\n icon: IconNameType;\n /**\n * The color of the icon\n */\n iconColor?: string;\n};\n\ntype ImageThumbnailProps = {\n /**\n * The desired display of the thumbnail, either wide or square\n */\n thumbnailImageType?: 'square' | 'wide' | undefined;\n /**\n * The URL of the thumbnail image to display\n */\n thumbnailUrl: string[] | string | null;\n /**\n * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image\n */\n icon?: never;\n /**\n * The color of the icon\n */\n iconColor?: never;\n};\n\nexport type ThumbnailProps = ComponentPropsWithoutRef<'div'> & {\n /**\n * Text that displays in the bottom right hand corner of the thumbnail, usually the media duration\n */\n bottomRightText?: string;\n /**\n * Icon to display in bottom right corner of the thumbnail\n */\n bottomRightIcon?: IconNameType;\n /**\n * The type of gradient to show either behind the icon or when there is no thumbnail image\n */\n gradientBackground?: GradientNameType;\n /**\n * Width of the thumbnail. By default, the thumbnail will grow to fit its container.\n */\n width?: string;\n} & (IconThumbnailProps | ImageThumbnailProps);\n\nconst ThumbnailComponent = styled.div<ThumbnailComponentProps>`\n ${({ $gradientBackground }) => getBackgroundGradient($gradientBackground)};\n aspect-ratio: 16 / 9;\n background-image: ${({ $backgroundUrl }) => $backgroundUrl};\n background-position: center;\n background-size: cover;\n border-radius: 4px;\n display: flex;\n overflow: hidden;\n position: relative;\n width: ${({ $width }) => $width};\n`;\n\nconst WideThumbnailImage = styled.img`\n height: 100%;\n object-fit: cover;\n width: 100%;\n`;\n\nconst SquareThumbnailImage = styled.img`\n backdrop-filter: blur(8px);\n object-fit: contain;\n width: 100%;\n`;\n\nconst BottomRightText = styled.div`\n align-items: center;\n background-color: rgb(0 0 0 / 50%);\n border-radius: 2px;\n bottom: 0;\n color: white;\n display: flex;\n font-size: 12px;\n font-weight: ${({ theme }) => theme.font.weight.bold};\n gap: ${({ theme }) => theme.spacing.space01};\n margin-bottom: ${({ theme }) => theme.spacing.space01};\n margin-right: ${({ theme }) => theme.spacing.space01};\n padding: 0 ${({ theme }) => theme.spacing.space01};\n position: absolute;\n right: 0;\n z-index: 1;\n`;\n\nconst IconContainer = styled.div`\n align-self: center;\n aspect-ratio: 1;\n margin: 30%;\n width: 40%;\n\n > * {\n height: 100%;\n width: 100%;\n }\n`;\n\ntype ThumbnailImageProps = {\n $thumbnailImageType?: 'square' | 'wide' | undefined;\n $thumbnailUrl: string;\n};\n\nconst ThumbnailImage = ({ $thumbnailImageType, $thumbnailUrl }: ThumbnailImageProps) => {\n if ($thumbnailImageType === 'wide') {\n return (\n <WideThumbnailImage\n alt=\"\"\n src={$thumbnailUrl}\n />\n );\n }\n if ($thumbnailImageType === 'square') {\n return (\n <SquareThumbnailImage\n alt=\"\"\n src={$thumbnailUrl}\n />\n );\n }\n return null;\n};\n\nexport const Collage = styled.div`\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 50% 50%;\n width: 100%;\n`;\n\ntype CollageImageProps = {\n $thumbnailUrl: string;\n total: number;\n};\n\nconst CollageImage = styled.div<CollageImageProps>`\n background-image: ${({ $thumbnailUrl }) => `url(${$thumbnailUrl})`};\n background-position: center;\n background-size: cover;\n min-width: 100px;\n\n &:nth-child(1) {\n grid-column: 1;\n grid-row: 1 / 3;\n }\n\n &:nth-child(2) {\n grid-column: 2;\n ${({ total }) => total === 2 && 'grid-row: 1 / 3;'}\n }\n`;\n\nexport const Thumbnail = ({\n bottomRightText,\n thumbnailUrl,\n thumbnailImageType = 'square',\n icon,\n bottomRightIcon,\n width = 'auto',\n gradientBackground = 'defaultMidOne',\n iconColor = 'white',\n ...otherProps\n}: ThumbnailProps): JSX.Element => {\n const thumbnailUrlToUse = Array.isArray(thumbnailUrl) ? thumbnailUrl[0] : thumbnailUrl;\n\n return (\n <ThumbnailComponent\n $backgroundUrl={\n thumbnailImageType === 'square' && isNotNil(thumbnailUrlToUse)\n ? `url(${thumbnailUrlToUse})`\n : ''\n }\n $gradientBackground={gradientBackground}\n $width={width}\n {...otherProps}\n >\n {isNotNil(bottomRightText) ? (\n <BottomRightText>\n {bottomRightIcon ? (\n <Icon\n size=\"sm\"\n type={bottomRightIcon}\n />\n ) : null}\n <span>{bottomRightText}</span>\n </BottomRightText>\n ) : null}\n {isNotNil(icon) && (\n <IconContainer>\n <Icon\n color={iconColor}\n type={icon}\n />\n </IconContainer>\n )}\n {!Array.isArray(thumbnailUrl) && isNotNil(thumbnailImageType) && isNotNil(thumbnailUrl) && (\n <ThumbnailImage\n $thumbnailImageType={thumbnailImageType}\n $thumbnailUrl={thumbnailUrl}\n />\n )}\n {Array.isArray(thumbnailUrl) && isNotNil(thumbnailImageType) && isNotNil(thumbnailUrl) && (\n <Collage data-testid=\"thumbnail-collage\">\n {thumbnailUrl.map((url, index) => (\n <CollageImage\n key={`${url}${index}`} // eslint-disable-line react/no-array-index-key\n $thumbnailUrl={url}\n data-testid={`collage-image-${index}`}\n total={thumbnailUrl.length}\n />\n ))}\n </Collage>\n )}\n </ThumbnailComponent>\n );\n};\n\nThumbnail.displayName = 'Thumbnail_VHS';\n","import type { JSX } from 'react';\nimport { styled } from 'styled-components';\nimport { isNotNil } from '@wistia/type-guards';\nimport type { GradientNameType } from '../../helpers/getBackgroundGradient/getBackgroundGradient';\nimport { getBackgroundGradient } from '../../helpers/getBackgroundGradient';\n\nconst ThumbnailCollageContainer = styled.div`\n display: grid;\n grid-template-columns: 3fr 2fr;\n grid-template-rows: 1fr 1fr;\n width: 100%;\n gap: ${({ theme }) => theme.spacing.space01};\n height: 100%;\n`;\n\ntype CollageImageProps = {\n $thumbnailUrl?: string;\n $backgroundGradient?: GradientNameType;\n};\n\nconst CollageImage = styled.div<CollageImageProps>`\n ${({ $thumbnailUrl }) => isNotNil($thumbnailUrl) && `background-image: url(${$thumbnailUrl})`};\n ${({ $backgroundGradient }) => $backgroundGradient && getBackgroundGradient($backgroundGradient)};\n background-position: center;\n background-size: cover;\n border-radius: 8px;\n\n &:nth-child(1) {\n grid-column: 1;\n grid-row: 1 / 3;\n }\n\n &:only-child {\n grid-column: 1 / 3;\n grid-row: 1 / 3;\n }\n\n &:nth-child(2) {\n grid-column: 2;\n\n &:last-child {\n grid-row: 1 / 3;\n }\n }\n`;\n\nexport type ThumbnailCollageProps = {\n /**\n * An array of image urls to show in the thumbnail. Supports up to 3 images\n */\n thumbnailUrls: string[];\n /**\n * The type of gradient to show when there are no thumbnail urls\n */\n gradientBackground?: GradientNameType;\n};\n\nconst ThumbnailCollage = ({\n thumbnailUrls,\n gradientBackground = 'defaultMidOne',\n ...props\n}: ThumbnailCollageProps): JSX.Element => {\n return (\n <ThumbnailCollageContainer\n role=\"presentation\"\n {...props}\n >\n {thumbnailUrls.length ? (\n thumbnailUrls.map((thumbnailUrl) => (\n <CollageImage\n key={thumbnailUrl}\n $thumbnailUrl={thumbnailUrl}\n />\n ))\n ) : (\n <CollageImage $backgroundGradient={gradientBackground} />\n )}\n </ThumbnailCollageContainer>\n );\n};\n\nexport { ThumbnailCollage };\n","import { styled } from 'styled-components';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { isNotNil } from '@wistia/type-guards';\n\n// brandmark = the Wistia flags icon\n// logotype = the \"wistia\" text\n\n// because the flags are shorter than the logo text we need to have a 2nd path (and viewBox),\n// for when the brandmark is rendered without the logotype\nconst renderBrandmark = (brandmarkColor: string, iconOnly: boolean) => {\n if (iconOnly) {\n return (\n <g fill={brandmarkColor}>\n <path d=\"M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z\" />\n </g>\n );\n }\n\n return (\n <g fill={brandmarkColor}>\n <path d=\"M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z\" />\n </g>\n );\n};\n\nconst renderLogotype = (logotypeColor: string, iconOnly: boolean) => {\n if (iconOnly) {\n return null;\n }\n\n return (\n <g fill={logotypeColor}>\n <path d=\"M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z\" />\n </g>\n );\n};\n\n// viewBox sizes differ depending on which parts of the logo are visible\nconst computedViewBox = (iconOnly: boolean) => {\n if (iconOnly) {\n return '0 0 34.4 26.78';\n }\n\n return '0 0 144 31.47';\n};\n\nconst WistiaLogoComponent = styled.svg<{\n height: number;\n $hoverColor: string | undefined;\n}>`\n height: ${({ height }) => `${height}px`};\n\n /* ensure it will always fit on mobile */\n max-height: 22vw;\n max-width: 100%;\n\n &:hover {\n path {\n ${({ $hoverColor }) => ($hoverColor !== undefined ? `fill: ${$hoverColor}` : null)};\n }\n }\n`;\n\nexport type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {\n /**\n * An optional accessible description for the logo\n */\n description?: string;\n /**\n * Height, in pixels, of the logo\n */\n height?: number;\n /**\n * @ignore\n * Change the color when hovering over the logo\n */\n hoverColor?: string;\n /**\n * Display just the icon portion of the logo (ie. hide `Wistia` text)\n * note: there is no analogue to this because by brand guidelines, the\n * `Wistia` text must not be displayed without the \"flags\" iconography\n */\n iconOnly?: boolean;\n /**\n * If provided, will wrap the logo in a link\n */\n href?: string;\n /**\n * An accessible title for the logo (defaults to \"Wistia Logo\")\n */\n title?: string;\n /**\n * Style of the logo\n */\n variant?: 'dark' | 'light' | 'standard';\n};\n\nexport const WistiaLogo = ({\n description = undefined,\n height = 100,\n hoverColor = undefined,\n href = undefined,\n iconOnly = false,\n title = 'Wistia Logo',\n variant = 'standard',\n ...otherProps\n}: WistiaLogoProps) => {\n // can't use `useThemeColor` since these are not in our color palette yet\n const primaryColor = '#2949e5';\n const darkColor = '#000934';\n const lightColor = '#ffffff';\n\n const VARIANT_COLORS = {\n standard: {\n brandmark: primaryColor,\n logotype: darkColor,\n },\n dark: {\n brandmark: darkColor,\n logotype: darkColor,\n },\n light: {\n brandmark: lightColor,\n logotype: lightColor,\n },\n };\n const brandmarkColor = VARIANT_COLORS[variant].brandmark;\n const logotypeColor = VARIANT_COLORS[variant].logotype;\n\n const Logo = (\n <WistiaLogoComponent\n $hoverColor={hoverColor}\n height={height}\n role=\"img\"\n viewBox={computedViewBox(iconOnly)}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...otherProps}\n >\n <title>{title}</title>\n {isNotNil(description) ? <desc>{description}</desc> : null}\n {renderBrandmark(brandmarkColor, iconOnly)}\n {renderLogotype(logotypeColor, iconOnly)}\n </WistiaLogoComponent>\n );\n\n // wrap logo in a link if href prop is present\n return href !== undefined ? <a href={href}>{Logo}</a> : Logo;\n};\n\nWistiaLogo.displayName = 'WistiaLogo_VHS';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,kBAAkB,OAAO,eAAsC;AAG1E,MAAI,UAAU,WAAoC;AAChD,WAAO,UAAU,UAAU,UAAU,UAAU,EAAE,MAAM,CAAC,UAAmB;AACzE,UAAI,iBAAiB,OAAO;AAC1B,cAAM;AAAA,MACR;AACA,YAAM,IAAI,aAAa,mCAAmC,iBAAiB;AAAA,IAC7E,CAAC;AAAA,EACH;AAKA,QAAM,OAAO,SAAS,cAAc,MAAM;AAC1C,OAAK,cAAc;AAGnB,OAAK,MAAM,a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["Image","ModalCloseButton","differenceInDays","import_type_guards","hashCode","theme","keys","import_react_aria_live","import_react","import_styled_components","theme","import_react","import_react","import_react_aria_live","import_styled_components","import_type_guards","import_react","import_styled_components","useStyledComponentsTheme","import_react","theme","import_jsx_runtime","theme","import_react","import_type_guards","import_styled_components","import_type_guards","import_type_guards","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","theme","iconSizeMap","import_styled_components","import_polished","theme","import_type_guards","import_jsx_runtime","import_jsx_runtime","theme","timeout","import_react","import_jsx_runtime","timeout","import_react","import_type_guards","import_react","import_jsx_runtime","import_styled_components","import_styled_components","import_styled_components","theme","import_jsx_runtime","theme","Link","import_react","import_react","import_react","timeout","timeout","import_react","import_react","import_react","import_type_guards","focusElement","import_react","import_react","import_react","import_react","import_react","import_react","import_react","import_react","import_react","import_styled_components","import_type_guards","import_react","import_react_dom","import_styled_components","import_type_guards","import_react","import_type_guards","import_jsx_runtime","import_jsx_runtime","GlobalStyle","isEqual","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_react","import_styled_components","import_type_guards","import_styled_components","import_jsx_runtime","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","import_react","import_styled_components","import_polished","import_type_guards","import_styled_components","import_type_guards","import_jsx_runtime","import_react","import_styled_components","import_type_guards","import_styled_components","import_jsx_runtime","theme","shouldWrap","import_type_guards","import_jsx_runtime","import_jsx_runtime","shouldWrap","handleFocus","handleBlur","import_jsx_runtime","theme","Button","import_jsx_runtime","import_styled_components","import_jsx_runtime","theme","import_react","import_type_guards","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_jsx_runtime","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_styled_components","import_jsx_runtime","theme","Body","import_jsx_runtime","theme","Body","import_react","import_styled_components","import_type_guards","import_jsx_runtime","import_react","import_styled_components","import_type_guards","import_styled_components","import_react","import_styled_components","import_polished","primaryHoverStyle","theme","primaryStyle","secondaryHoverStyle","secondaryStyle","disabledStyle","import_jsx_runtime","keys","import_jsx_runtime","import_react","import_type_guards","import_styled_components","theme","disabledStyle","import_jsx_runtime","import_styled_components","import_type_guards","import_styled_components","import_styled_components","import_jsx_runtime","disabledStyle","theme","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","disabledStyle","theme","import_jsx_runtime","import_jsx_runtime","theme","import_react","import_styled_components","import_jsx_runtime","import_styled_components","import_jsx_runtime","CloseIcon","import_jsx_runtime","Button","theme","CloseIcon","import_react","import_styled_components","import_polished","import_type_guards","import_jsx_runtime","TRANSITION_TIME","theme","open","import_styled_components","import_jsx_runtime","import_react","import_styled_components","import_jsx_runtime","import_react","import_formik","import_type_guards","import_react","import_formik","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_react","import_react","import_react","timeout","timeout","import_jsx_runtime","isValid","FormikForm","import_formik","import_jsx_runtime","import_jsx_runtime","import_react","import_styled_components","import_formik","import_type_guards","import_jsx_runtime","import_type_guards","import_jsx_runtime","Element","import_type_guards","import_react","import_styled_components","import_type_guards","import_styled_components","theme","errorStyle","disabledStyle","import_react","import_styled_components","import_type_guards","import_polished","import_jsx_runtime","theme","InputStyledComponent","import_type_guards","import_jsx_runtime","theme","import_jsx_runtime","handleBlur","import_react","import_styled_components","import_type_guards","import_react","import_type_guards","import_jsx_runtime","import_jsx_runtime","StyledOptionContainer","theme","import_jsx_runtime","import_type_guards","import_react","import_styled_components","import_type_guards","import_styled_components","focusStyle","theme","disabledStyle","errorStyle","import_jsx_runtime","theme","renderIcon","import_jsx_runtime","import_react","import_type_guards","import_jsx_runtime","import_react","import_styled_components","import_type_guards","import_react","import_styled_components","import_slate_react","import_slate","import_type_guards","import_react_fast_compare","import_type_guards","import_type_guards","import_jsx_runtime","import_styled_components","import_jsx_runtime","theme","Element","import_slate_react","import_styled_components","import_slate","import_type_guards","import_slate","import_type_guards","import_slate","import_type_guards","SlateEditor","emptyTextNode","import_slate","import_type_guards","import_slate","import_type_guards","iconMap","icons_exports","Image","Link","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","Image","import_jsx_runtime","import_jsx_runtime","Link","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","iconSizeMap","Icon","iconMap","icons_exports","import_jsx_runtime","theme","Icon","import_jsx_runtime","theme","emptyTextNode","Element","isEqual","import_jsx_runtime","Wrapper","theme","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_jsx_runtime","CloseButton","theme","CloseIcon","import_styled_components","import_jsx_runtime","getFillStyle","Image","import_styled_components","import_type_guards","import_jsx_runtime","theme","Label","import_react","import_styled_components","import_type_guards","import_jsx_runtime","import_type_guards","import_styled_components","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_jsx_runtime","theme","import_react_dropdown_menu","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_react_dropdown_menu","import_type_guards","import_styled_components","import_polished","import_jsx_runtime","hoverDarken","theme","IconContainer","import_styled_components","import_react_dropdown_menu","import_jsx_runtime","import_react","import_styled_components","import_react_dropdown_menu","import_jsx_runtime","theme","import_react","import_type_guards","import_styled_components","import_react","import_styled_components","import_polished","import_type_guards","import_jsx_runtime","theme","dangerousMenuItemStyles","MenuItem","Menu","import_styled_components","import_type_guards","import_jsx_runtime","theme","import_jsx_runtime","MenuComponent","Menu","theme","import_react","import_styled_components","import_type_guards","import_react_dom","import_styled_components","theme","import_type_guards","import_react","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","ModalCloseButton","import_styled_components","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","import_react","import_styled_components","import_date_fns","import_react","import_type_guards","import_styled_components","import_throttle_debounce","import_date_fns","import_styled_components","import_date_fns","import_type_guards","import_jsx_runtime","theme","memo","import_jsx_runtime","theme","import_react","import_styled_components","import_date_fns","import_type_guards","import_styled_components","import_jsx_runtime","theme","import_date_fns","import_type_guards","dateOnlyStringNumeric","import_react_fast_compare","import_date_fns","import_type_guards","isValidRange","dateOnlyStringNumeric","import_type_guards","defaultValue","merge","isEqual","import_jsx_runtime","Input","theme","isValidRange","import_jsx_runtime","TooltipWrapper","theme","Label","import_styled_components","import_type_guards","import_jsx_runtime","theme","ReactSlider","import_react","import_styled_components","import_jsx_runtime","theme","import_styled_components","import_jsx_runtime","theme","import_styled_components","import_type_guards","import_jsx_runtime","theme","IconContainer","import_styled_components","import_type_guards","import_jsx_runtime","theme","CollageImage","import_styled_components","import_type_guards","import_jsx_runtime"]}