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OAAA/I,EAAA,MAAAiJ,EAAA,OAAAA,EAAc,UAAdjJ,EAA0BiG,EACpC,UAAW,MAAAgD,EAAA,OAAAA,EAAc,UACzB,qBAAsB,MAAAA,EAAA,OAAAA,EAAc,qBACpC,OAAQrC,EACR,cAAe5D,EACf,qBAAa,MAAAiG,EAAA,OAAAA,EAAc,aAAd/G,EAA6B8D,EAC1C,YAAalD,EACb,SAAUa,EACV,MAAO,MAAAsF,EAAA,OAAAA,EAAc,MACrB,SAAU,MAAAA,EAAA,OAAAA,EAAc,SACxB,WAAY,MAAAA,EAAA,OAAAA,EAAc,WAC1B,kBAAmB,MAAAA,EAAA,OAAAA,EAAc,kBACjC,kBAAmB,MAAAA,EAAA,OAAAA,EAAc,kBACjC,YAAa7F,EACb,OAAQF,EAAO,UAAc+G,EAAE,UAAY5J,EAAM,QAAQ,EACzD,QAAS4C,EAAQ,OAAQ8D,GAAMA,EAAE,UAAY1G,EAAM,QAAQ,EAC3D,WAAY0C,EACZ,gBAAiB6F,EACjB,IAAKhF,EACL,YAAawF,EACb,SAAUjG,EACV,sBAAuBe,EACvB,gBAAiBjC,EAAM,gBACzB,EACD,CACL,EA/FyB,IAiG7B,CAAC,CACH,CAEJ,CAAC","sources":["webpack://_N_E/../src/index.tsx","webpack://_N_E/../src/assets.tsx","webpack://_N_E/../src/hooks.tsx","webpack://_N_E/../src/state.ts","webpack://_N_E/#style-inject:#style-inject","webpack://_N_E/../src/styles.css","webpack://_N_E/../src/types.ts"],"sourcesContent":["'use client';\n\nimport React, { forwardRef, isValidElement } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { CloseIcon, getAsset, Loader } from './assets';\nimport { useIsDocumentHidden } from './hooks';\nimport { toast, ToastState } from './state';\nimport './styles.css';\nimport {\n isAction,\n SwipeDirection,\n type ExternalToast,\n type HeightT,\n type ToasterProps,\n type ToastProps,\n type ToastT,\n type ToastToDismiss,\n} from './types';\n\n// Visible toasts amount\nconst VISIBLE_TOASTS_AMOUNT = 3;\n\n// Viewport padding\nconst VIEWPORT_OFFSET = '32px';\n\n// Mobile viewport padding\nconst MOBILE_VIEWPORT_OFFSET = '16px';\n\n// Default lifetime of a toasts (in ms)\nconst TOAST_LIFETIME = 4000;\n\n// Default toast width\nconst TOAST_WIDTH = 356;\n\n// Default gap between toasts\nconst GAP = 14;\n\n// Threshold to dismiss a toast\nconst SWIPE_THRESHOLD = 20;\n\n// Equal to exit animation duration\nconst TIME_BEFORE_UNMOUNT = 200;\n\nfunction cn(...classes: (string | undefined)[]) {\n return classes.filter(Boolean).join(' ');\n}\n\nfunction getDefaultSwipeDirections(position: string): Array {\n const [y, x] = position.split('-');\n const directions: Array = [];\n\n if (y) {\n directions.push(y as SwipeDirection);\n }\n\n if (x) {\n directions.push(x as SwipeDirection);\n }\n\n return directions;\n}\n\nconst Toast = (props: ToastProps) => {\n const {\n invert: ToasterInvert,\n toast,\n unstyled,\n interacting,\n setHeights,\n visibleToasts,\n heights,\n index,\n toasts,\n expanded,\n removeToast,\n defaultRichColors,\n closeButton: closeButtonFromToaster,\n style,\n cancelButtonStyle,\n actionButtonStyle,\n className = '',\n descriptionClassName = '',\n duration: durationFromToaster,\n position,\n gap,\n loadingIcon: loadingIconProp,\n expandByDefault,\n classNames,\n icons,\n closeButtonAriaLabel = 'Close toast',\n pauseWhenPageIsHidden,\n } = props;\n const [swipeDirection, setSwipeDirection] = React.useState<'x' | 'y' | null>(null);\n const [swipeOutDirection, setSwipeOutDirection] = React.useState<'left' | 'right' | 'up' | 'down' | null>(null);\n const [mounted, setMounted] = React.useState(false);\n const [removed, setRemoved] = React.useState(false);\n const [swiping, setSwiping] = React.useState(false);\n const [swipeOut, setSwipeOut] = React.useState(false);\n const [isSwiped, setIsSwiped] = React.useState(false);\n const [offsetBeforeRemove, setOffsetBeforeRemove] = React.useState(0);\n const [initialHeight, setInitialHeight] = React.useState(0);\n const remainingTime = React.useRef(toast.duration || durationFromToaster || TOAST_LIFETIME);\n const dragStartTime = React.useRef(null);\n const toastRef = React.useRef(null);\n const isFront = index === 0;\n const isVisible = index + 1 <= visibleToasts;\n const toastType = toast.type;\n const dismissible = toast.dismissible !== false;\n const toastClassname = toast.className || '';\n const toastDescriptionClassname = toast.descriptionClassName || '';\n // Height index is used to calculate the offset as it gets updated before the toast array, which means we can calculate the new layout faster.\n const heightIndex = React.useMemo(\n () => heights.findIndex((height) => height.toastId === toast.id) || 0,\n [heights, toast.id],\n );\n const closeButton = React.useMemo(\n () => toast.closeButton ?? closeButtonFromToaster,\n [toast.closeButton, closeButtonFromToaster],\n );\n const duration = React.useMemo(\n () => toast.duration || durationFromToaster || TOAST_LIFETIME,\n [toast.duration, durationFromToaster],\n );\n const closeTimerStartTimeRef = React.useRef(0);\n const offset = React.useRef(0);\n const lastCloseTimerStartTimeRef = React.useRef(0);\n const pointerStartRef = React.useRef<{ x: number; y: number } | null>(null);\n const [y, x] = position.split('-');\n const toastsHeightBefore = React.useMemo(() => {\n return heights.reduce((prev, curr, reducerIndex) => {\n // Calculate offset up until current toast\n if (reducerIndex >= heightIndex) {\n return prev;\n }\n\n return prev + curr.height;\n }, 0);\n }, [heights, heightIndex]);\n const isDocumentHidden = useIsDocumentHidden();\n\n const invert = toast.invert || ToasterInvert;\n const disabled = toastType === 'loading';\n\n offset.current = React.useMemo(() => heightIndex * gap + toastsHeightBefore, [heightIndex, toastsHeightBefore]);\n\n React.useEffect(() => {\n remainingTime.current = duration;\n }, [duration]);\n\n React.useEffect(() => {\n // Trigger enter animation without using CSS animation\n setMounted(true);\n }, []);\n\n React.useEffect(() => {\n const toastNode = toastRef.current;\n if (toastNode) {\n const height = toastNode.getBoundingClientRect().height;\n // Add toast height to heights array after the toast is mounted\n setInitialHeight(height);\n setHeights((h) => [{ toastId: toast.id, height, position: toast.position }, ...h]);\n return () => setHeights((h) => h.filter((height) => height.toastId !== toast.id));\n }\n }, [setHeights, toast.id]);\n\n React.useLayoutEffect(() => {\n if (!mounted) return;\n const toastNode = toastRef.current;\n const originalHeight = toastNode.style.height;\n toastNode.style.height = 'auto';\n const newHeight = toastNode.getBoundingClientRect().height;\n toastNode.style.height = originalHeight;\n\n setInitialHeight(newHeight);\n\n setHeights((heights) => {\n const alreadyExists = heights.find((height) => height.toastId === toast.id);\n if (!alreadyExists) {\n return [{ toastId: toast.id, height: newHeight, position: toast.position }, ...heights];\n } else {\n return heights.map((height) => (height.toastId === toast.id ? { ...height, height: newHeight } : height));\n }\n });\n }, [mounted, toast.title, toast.description, setHeights, toast.id]);\n\n const deleteToast = React.useCallback(() => {\n // Save the offset for the exit swipe animation\n setRemoved(true);\n setOffsetBeforeRemove(offset.current);\n setHeights((h) => h.filter((height) => height.toastId !== toast.id));\n\n setTimeout(() => {\n removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n }, [toast, removeToast, setHeights, offset]);\n\n React.useEffect(() => {\n if ((toast.promise && toastType === 'loading') || toast.duration === Infinity || toast.type === 'loading') return;\n let timeoutId: NodeJS.Timeout;\n\n // Pause the timer on each hover\n const pauseTimer = () => {\n if (lastCloseTimerStartTimeRef.current < closeTimerStartTimeRef.current) {\n // Get the elapsed time since the timer started\n const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current;\n\n remainingTime.current = remainingTime.current - elapsedTime;\n }\n\n lastCloseTimerStartTimeRef.current = new Date().getTime();\n };\n\n const startTimer = () => {\n // setTimeout(, Infinity) behaves as if the delay is 0.\n // As a result, the toast would be closed immediately, giving the appearance that it was never rendered.\n // See: https://github.com/denysdovhan/wtfjs?tab=readme-ov-file#an-infinite-timeout\n if (remainingTime.current === Infinity) return;\n\n closeTimerStartTimeRef.current = new Date().getTime();\n\n // Let the toast know it has started\n timeoutId = setTimeout(() => {\n toast.onAutoClose?.(toast);\n deleteToast();\n }, remainingTime.current);\n };\n\n if (expanded || interacting || (pauseWhenPageIsHidden && isDocumentHidden)) {\n pauseTimer();\n } else {\n startTimer();\n }\n\n return () => clearTimeout(timeoutId);\n }, [expanded, interacting, toast, toastType, pauseWhenPageIsHidden, isDocumentHidden, deleteToast]);\n\n React.useEffect(() => {\n if (toast.delete) {\n deleteToast();\n }\n }, [deleteToast, toast.delete]);\n\n function getLoadingIcon() {\n if (icons?.loading) {\n return (\n \n {icons.loading}\n \n );\n }\n\n if (loadingIconProp) {\n return (\n \n {loadingIconProp}\n \n );\n }\n return ;\n }\n\n return (\n {\n setSwiping(false);\n setSwipeDirection(null);\n pointerStartRef.current = null;\n }}\n onPointerDown={(event) => {\n if (disabled || !dismissible) return;\n dragStartTime.current = new Date();\n setOffsetBeforeRemove(offset.current);\n // Ensure we maintain correct pointer capture even when going outside of the toast (e.g. when swiping)\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n if ((event.target as HTMLElement).tagName === 'BUTTON') return;\n setSwiping(true);\n pointerStartRef.current = { x: event.clientX, y: event.clientY };\n }}\n onPointerUp={() => {\n if (swipeOut || !dismissible) return;\n\n pointerStartRef.current = null;\n const swipeAmountX = Number(\n toastRef.current?.style.getPropertyValue('--swipe-amount-x').replace('px', '') || 0,\n );\n const swipeAmountY = Number(\n toastRef.current?.style.getPropertyValue('--swipe-amount-y').replace('px', '') || 0,\n );\n const timeTaken = new Date().getTime() - dragStartTime.current?.getTime();\n\n const swipeAmount = swipeDirection === 'x' ? swipeAmountX : swipeAmountY;\n const velocity = Math.abs(swipeAmount) / timeTaken;\n\n if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) {\n setOffsetBeforeRemove(offset.current);\n toast.onDismiss?.(toast);\n\n if (swipeDirection === 'x') {\n setSwipeOutDirection(swipeAmountX > 0 ? 'right' : 'left');\n } else {\n setSwipeOutDirection(swipeAmountY > 0 ? 'down' : 'up');\n }\n\n deleteToast();\n setSwipeOut(true);\n setIsSwiped(false);\n return;\n }\n\n setSwiping(false);\n setSwipeDirection(null);\n }}\n onPointerMove={(event) => {\n if (!pointerStartRef.current || !dismissible) return;\n\n const isHighlighted = window.getSelection()?.toString().length > 0;\n if (isHighlighted) return;\n\n const yDelta = event.clientY - pointerStartRef.current.y;\n const xDelta = event.clientX - pointerStartRef.current.x;\n\n const swipeDirections = props.swipeDirections ?? getDefaultSwipeDirections(position);\n\n // Determine swipe direction if not already locked\n if (!swipeDirection && (Math.abs(xDelta) > 1 || Math.abs(yDelta) > 1)) {\n setSwipeDirection(Math.abs(xDelta) > Math.abs(yDelta) ? 'x' : 'y');\n }\n\n let swipeAmount = { x: 0, y: 0 };\n\n // Only apply swipe in the locked direction\n if (swipeDirection === 'y') {\n // Handle vertical swipes\n if (swipeDirections.includes('top') || swipeDirections.includes('bottom')) {\n if (swipeDirections.includes('top') && yDelta < 0) {\n swipeAmount.y = yDelta;\n } else if (swipeDirections.includes('bottom') && yDelta > 0) {\n swipeAmount.y = yDelta;\n }\n }\n } else if (swipeDirection === 'x') {\n // Handle horizontal swipes\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n if (swipeDirections.includes('left') && xDelta < 0) {\n swipeAmount.x = xDelta;\n } else if (swipeDirections.includes('right') && xDelta > 0) {\n swipeAmount.x = xDelta;\n }\n }\n }\n\n if (Math.abs(swipeAmount.x) > 0 || Math.abs(swipeAmount.y) > 0) {\n setIsSwiped(true);\n }\n\n // Apply transform using both x and y values\n toastRef.current?.style.setProperty('--swipe-amount-x', `${swipeAmount.x}px`);\n toastRef.current?.style.setProperty('--swipe-amount-y', `${swipeAmount.y}px`);\n }}\n >\n {closeButton && !toast.jsx ? (\n {}\n : () => {\n deleteToast();\n toast.onDismiss?.(toast);\n }\n }\n className={cn(classNames?.closeButton, toast?.classNames?.closeButton)}\n >\n {icons?.close ?? CloseIcon}\n \n ) : null}\n {/* TODO: This can be cleaner */}\n {toast.jsx || isValidElement(toast.title) ? (\n toast.jsx ? (\n toast.jsx\n ) : typeof toast.title === 'function' ? (\n toast.title()\n ) : (\n toast.title\n )\n ) : (\n <>\n {toastType || toast.icon || toast.promise ? (\n
\n {toast.promise || (toast.type === 'loading' && !toast.icon) ? toast.icon || getLoadingIcon() : null}\n {toast.type !== 'loading' ? toast.icon || icons?.[toastType] || getAsset(toastType) : null}\n
\n ) : null}\n\n
\n
\n {typeof toast.title === 'function' ? toast.title() : toast.title}\n
\n {toast.description ? (\n \n {typeof toast.description === 'function' ? toast.description() : toast.description}\n
\n ) : null}\n \n {isValidElement(toast.cancel) ? (\n toast.cancel\n ) : toast.cancel && isAction(toast.cancel) ? (\n {\n // We need to check twice because typescript\n if (!isAction(toast.cancel)) return;\n if (!dismissible) return;\n toast.cancel.onClick?.(event);\n deleteToast();\n }}\n className={cn(classNames?.cancelButton, toast?.classNames?.cancelButton)}\n >\n {toast.cancel.label}\n \n ) : null}\n {isValidElement(toast.action) ? (\n toast.action\n ) : toast.action && isAction(toast.action) ? (\n {\n // We need to check twice because typescript\n if (!isAction(toast.action)) return;\n toast.action.onClick?.(event);\n if (event.defaultPrevented) return;\n deleteToast();\n }}\n className={cn(classNames?.actionButton, toast?.classNames?.actionButton)}\n >\n {toast.action.label}\n \n ) : null}\n \n )}\n \n );\n};\n\nfunction getDocumentDirection(): ToasterProps['dir'] {\n if (typeof window === 'undefined') return 'ltr';\n if (typeof document === 'undefined') return 'ltr'; // For Fresh purpose\n\n const dirAttribute = document.documentElement.getAttribute('dir');\n\n if (dirAttribute === 'auto' || !dirAttribute) {\n return window.getComputedStyle(document.documentElement).direction as ToasterProps['dir'];\n }\n\n return dirAttribute as ToasterProps['dir'];\n}\n\nfunction assignOffset(defaultOffset: ToasterProps['offset'], mobileOffset: ToasterProps['mobileOffset']) {\n const styles = {} as React.CSSProperties;\n\n [defaultOffset, mobileOffset].forEach((offset, index) => {\n const isMobile = index === 1;\n const prefix = isMobile ? '--mobile-offset' : '--offset';\n const defaultValue = isMobile ? MOBILE_VIEWPORT_OFFSET : VIEWPORT_OFFSET;\n\n function assignAll(offset: string | number) {\n ['top', 'right', 'bottom', 'left'].forEach((key) => {\n styles[`${prefix}-${key}`] = typeof offset === 'number' ? `${offset}px` : offset;\n });\n }\n\n if (typeof offset === 'number' || typeof offset === 'string') {\n assignAll(offset);\n } else if (typeof offset === 'object') {\n ['top', 'right', 'bottom', 'left'].forEach((key) => {\n if (offset[key] === undefined) {\n styles[`${prefix}-${key}`] = defaultValue;\n } else {\n styles[`${prefix}-${key}`] = typeof offset[key] === 'number' ? `${offset[key]}px` : offset[key];\n }\n });\n } else {\n assignAll(defaultValue);\n }\n });\n\n return styles;\n}\n\nfunction useSonner() {\n const [activeToasts, setActiveToasts] = React.useState([]);\n\n React.useEffect(() => {\n return ToastState.subscribe((toast) => {\n if ((toast as ToastToDismiss).dismiss) {\n setTimeout(() => {\n ReactDOM.flushSync(() => {\n setActiveToasts((toasts) => toasts.filter((t) => t.id !== toast.id));\n });\n });\n return;\n }\n\n // Prevent batching, temp solution.\n setTimeout(() => {\n ReactDOM.flushSync(() => {\n setActiveToasts((toasts) => {\n const indexOfExistingToast = toasts.findIndex((t) => t.id === toast.id);\n\n // Update the toast if it already exists\n if (indexOfExistingToast !== -1) {\n return [\n ...toasts.slice(0, indexOfExistingToast),\n { ...toasts[indexOfExistingToast], ...toast },\n ...toasts.slice(indexOfExistingToast + 1),\n ];\n }\n\n return [toast, ...toasts];\n });\n });\n });\n });\n }, []);\n\n return {\n toasts: activeToasts,\n };\n}\n\nconst Toaster = forwardRef(function Toaster(props, ref) {\n const {\n invert,\n position = 'bottom-right',\n hotkey = ['altKey', 'KeyT'],\n expand,\n closeButton,\n className,\n offset,\n mobileOffset,\n theme = 'light',\n richColors,\n duration,\n style,\n visibleToasts = VISIBLE_TOASTS_AMOUNT,\n toastOptions,\n dir = getDocumentDirection(),\n gap = GAP,\n loadingIcon,\n icons,\n containerAriaLabel = 'Notifications',\n pauseWhenPageIsHidden,\n } = props;\n const [toasts, setToasts] = React.useState([]);\n const possiblePositions = React.useMemo(() => {\n return Array.from(\n new Set([position].concat(toasts.filter((toast) => toast.position).map((toast) => toast.position))),\n );\n }, [toasts, position]);\n const [heights, setHeights] = React.useState([]);\n const [expanded, setExpanded] = React.useState(false);\n const [interacting, setInteracting] = React.useState(false);\n const [actualTheme, setActualTheme] = React.useState(\n theme !== 'system'\n ? theme\n : typeof window !== 'undefined'\n ? window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light'\n : 'light',\n );\n\n const listRef = React.useRef(null);\n const hotkeyLabel = hotkey.join('+').replace(/Key/g, '').replace(/Digit/g, '');\n const lastFocusedElementRef = React.useRef(null);\n const isFocusWithinRef = React.useRef(false);\n\n const removeToast = React.useCallback((toastToRemove: ToastT) => {\n setToasts((toasts) => {\n if (!toasts.find((toast) => toast.id === toastToRemove.id)?.delete) {\n ToastState.dismiss(toastToRemove.id);\n }\n\n return toasts.filter(({ id }) => id !== toastToRemove.id);\n });\n }, []);\n\n React.useEffect(() => {\n return ToastState.subscribe((toast) => {\n if ((toast as ToastToDismiss).dismiss) {\n setToasts((toasts) => toasts.map((t) => (t.id === toast.id ? { ...t, delete: true } : t)));\n return;\n }\n\n // Prevent batching, temp solution.\n setTimeout(() => {\n ReactDOM.flushSync(() => {\n setToasts((toasts) => {\n const indexOfExistingToast = toasts.findIndex((t) => t.id === toast.id);\n\n // Update the toast if it already exists\n if (indexOfExistingToast !== -1) {\n return [\n ...toasts.slice(0, indexOfExistingToast),\n { ...toasts[indexOfExistingToast], ...toast },\n ...toasts.slice(indexOfExistingToast + 1),\n ];\n }\n\n return [toast, ...toasts];\n });\n });\n });\n });\n }, []);\n\n React.useEffect(() => {\n if (theme !== 'system') {\n setActualTheme(theme);\n return;\n }\n\n if (theme === 'system') {\n // check if current preference is dark\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n // it's currently dark\n setActualTheme('dark');\n } else {\n // it's not dark\n setActualTheme('light');\n }\n }\n\n if (typeof window === 'undefined') return;\n const darkMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n\n try {\n // Chrome & Firefox\n darkMediaQuery.addEventListener('change', ({ matches }) => {\n if (matches) {\n setActualTheme('dark');\n } else {\n setActualTheme('light');\n }\n });\n } catch (error) {\n // Safari < 14\n darkMediaQuery.addListener(({ matches }) => {\n try {\n if (matches) {\n setActualTheme('dark');\n } else {\n setActualTheme('light');\n }\n } catch (e) {\n console.error(e);\n }\n });\n }\n }, [theme]);\n\n React.useEffect(() => {\n // Ensure expanded is always false when no toasts are present / only one left\n if (toasts.length <= 1) {\n setExpanded(false);\n }\n }, [toasts]);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isHotkeyPressed = hotkey.every((key) => (event as any)[key] || event.code === key);\n\n if (isHotkeyPressed) {\n setExpanded(true);\n listRef.current?.focus();\n }\n\n if (\n event.code === 'Escape' &&\n (document.activeElement === listRef.current || listRef.current?.contains(document.activeElement))\n ) {\n setExpanded(false);\n }\n };\n document.addEventListener('keydown', handleKeyDown);\n\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [hotkey]);\n\n React.useEffect(() => {\n if (listRef.current) {\n return () => {\n if (lastFocusedElementRef.current) {\n lastFocusedElementRef.current.focus({ preventScroll: true });\n lastFocusedElementRef.current = null;\n isFocusWithinRef.current = false;\n }\n };\n }\n }, [listRef.current]);\n\n return (\n // Remove item from normal navigation flow, only available via hotkey\n \n {possiblePositions.map((position, index) => {\n const [y, x] = position.split('-');\n\n if (!toasts.length) return null;\n\n return (\n 1 && !expand}\n data-x-position={x}\n style={\n {\n '--front-toast-height': `${heights[0]?.height || 0}px`,\n '--width': `${TOAST_WIDTH}px`,\n '--gap': `${gap}px`,\n ...style,\n ...assignOffset(offset, mobileOffset),\n } as React.CSSProperties\n }\n onBlur={(event) => {\n if (isFocusWithinRef.current && !event.currentTarget.contains(event.relatedTarget)) {\n isFocusWithinRef.current = false;\n if (lastFocusedElementRef.current) {\n lastFocusedElementRef.current.focus({ preventScroll: true });\n lastFocusedElementRef.current = null;\n }\n }\n }}\n onFocus={(event) => {\n const isNotDismissible =\n event.target instanceof HTMLElement && event.target.dataset.dismissible === 'false';\n\n if (isNotDismissible) return;\n\n if (!isFocusWithinRef.current) {\n isFocusWithinRef.current = true;\n lastFocusedElementRef.current = event.relatedTarget as HTMLElement;\n }\n }}\n onMouseEnter={() => setExpanded(true)}\n onMouseMove={() => setExpanded(true)}\n onMouseLeave={() => {\n // Avoid setting expanded to false when interacting with a toast, e.g. swiping\n if (!interacting) {\n setExpanded(false);\n }\n }}\n onDragEnd={() => setExpanded(false)}\n onPointerDown={(event) => {\n const isNotDismissible =\n event.target instanceof HTMLElement && event.target.dataset.dismissible === 'false';\n\n if (isNotDismissible) return;\n setInteracting(true);\n }}\n onPointerUp={() => setInteracting(false)}\n >\n {toasts\n .filter((toast) => (!toast.position && index === 0) || toast.position === position)\n .map((toast, index) => (\n t.position == toast.position)}\n heights={heights.filter((h) => h.position == toast.position)}\n setHeights={setHeights}\n expandByDefault={expand}\n gap={gap}\n loadingIcon={loadingIcon}\n expanded={expanded}\n pauseWhenPageIsHidden={pauseWhenPageIsHidden}\n swipeDirections={props.swipeDirections}\n />\n ))}\n \n );\n })}\n \n );\n});\nexport { toast, Toaster, type ExternalToast, type ToastT, type ToasterProps, useSonner };\nexport { type ToastClassnames, type ToastToDismiss, type Action } from './types';\n","'use client';\nimport React from 'react';\nimport type { ToastTypes } from './types';\n\nexport const getAsset = (type: ToastTypes): JSX.Element | null => {\n switch (type) {\n case 'success':\n return SuccessIcon;\n\n case 'info':\n return InfoIcon;\n\n case 'warning':\n return WarningIcon;\n\n case 'error':\n return ErrorIcon;\n\n default:\n return null;\n }\n};\n\nconst bars = Array(12).fill(0);\n\nexport const Loader = ({ visible, className }: { visible: boolean, className?: string }) => {\n return (\n
\n
\n {bars.map((_, i) => (\n
\n ))}\n
\n
\n );\n};\n\nconst SuccessIcon = (\n \n \n \n);\n\nconst WarningIcon = (\n \n \n \n);\n\nconst InfoIcon = (\n \n \n \n);\n\nconst ErrorIcon = (\n \n \n \n);\n\nexport const CloseIcon = (\n \n \n \n \n);\n","import React from 'react';\n\nexport const useIsDocumentHidden = () => {\n const [isDocumentHidden, setIsDocumentHidden] = React.useState(document.hidden);\n\n React.useEffect(() => {\n const callback = () => {\n setIsDocumentHidden(document.hidden);\n };\n document.addEventListener('visibilitychange', callback);\n return () => window.removeEventListener('visibilitychange', callback);\n }, []);\n\n return isDocumentHidden;\n};\n","import type { ExternalToast, PromiseData, PromiseT, ToastT, ToastToDismiss, ToastTypes } from './types';\n\nimport React from 'react';\n\nlet toastsCounter = 1;\n\ntype titleT = (() => React.ReactNode) | React.ReactNode;\n\nclass Observer {\n subscribers: Array<(toast: ExternalToast | ToastToDismiss) => void>;\n toasts: Array;\n dismissedToasts: Set;\n\n constructor() {\n this.subscribers = [];\n this.toasts = [];\n this.dismissedToasts = new Set();\n }\n\n // We use arrow functions to maintain the correct `this` reference\n subscribe = (subscriber: (toast: ToastT | ToastToDismiss) => void) => {\n this.subscribers.push(subscriber);\n\n return () => {\n const index = this.subscribers.indexOf(subscriber);\n this.subscribers.splice(index, 1);\n };\n };\n\n publish = (data: ToastT) => {\n this.subscribers.forEach((subscriber) => subscriber(data));\n };\n\n addToast = (data: ToastT) => {\n this.publish(data);\n this.toasts = [...this.toasts, data];\n };\n\n create = (\n data: ExternalToast & {\n message?: titleT;\n type?: ToastTypes;\n promise?: PromiseT;\n jsx?: React.ReactElement;\n },\n ) => {\n const { message, ...rest } = data;\n const id = typeof data?.id === 'number' || data.id?.length > 0 ? data.id : toastsCounter++;\n const alreadyExists = this.toasts.find((toast) => {\n return toast.id === id;\n });\n const dismissible = data.dismissible === undefined ? true : data.dismissible;\n\n if (this.dismissedToasts.has(id)) {\n this.dismissedToasts.delete(id);\n }\n\n if (alreadyExists) {\n this.toasts = this.toasts.map((toast) => {\n if (toast.id === id) {\n this.publish({ ...toast, ...data, id, title: message });\n return {\n ...toast,\n ...data,\n id,\n dismissible,\n title: message,\n };\n }\n\n return toast;\n });\n } else {\n this.addToast({ title: message, ...rest, dismissible, id });\n }\n\n return id;\n };\n\n dismiss = (id?: number | string) => {\n this.dismissedToasts.add(id);\n\n if (!id) {\n this.toasts.forEach((toast) => {\n this.subscribers.forEach((subscriber) => subscriber({ id: toast.id, dismiss: true }));\n });\n }\n this.subscribers.forEach((subscriber) => subscriber({ id, dismiss: true }));\n return id;\n };\n\n message = (message: titleT | React.ReactNode, data?: ExternalToast) => {\n return this.create({ ...data, message });\n };\n\n error = (message: titleT | React.ReactNode, data?: ExternalToast) => {\n return this.create({ ...data, message, type: 'error' });\n };\n\n success = (message: titleT | React.ReactNode, data?: ExternalToast) => {\n return this.create({ ...data, type: 'success', message });\n };\n\n info = (message: titleT | React.ReactNode, data?: ExternalToast) => {\n return this.create({ ...data, type: 'info', message });\n };\n\n warning = (message: titleT | React.ReactNode, data?: ExternalToast) => {\n return this.create({ ...data, type: 'warning', message });\n };\n\n loading = (message: titleT | React.ReactNode, data?: ExternalToast) => {\n return this.create({ ...data, type: 'loading', message });\n };\n\n promise = (promise: PromiseT, data?: PromiseData) => {\n if (!data) {\n // Nothing to show\n return;\n }\n\n let id: string | number | undefined = undefined;\n if (data.loading !== undefined) {\n id = this.create({\n ...data,\n promise,\n type: 'loading',\n message: data.loading,\n description: typeof data.description !== 'function' ? data.description : undefined,\n });\n }\n\n const p = promise instanceof Promise ? promise : promise();\n\n let shouldDismiss = id !== undefined;\n let result: ['resolve', ToastData] | ['reject', unknown];\n\n const originalPromise = p\n .then(async (response) => {\n result = ['resolve', response];\n const isReactElementResponse = React.isValidElement(response);\n if (isReactElementResponse) {\n shouldDismiss = false;\n this.create({ id, type: 'default', message: response });\n } else if (isHttpResponse(response) && !response.ok) {\n shouldDismiss = false;\n const message =\n typeof data.error === 'function' ? await data.error(`HTTP error! status: ${response.status}`) : data.error;\n const description =\n typeof data.description === 'function'\n ? await data.description(`HTTP error! status: ${response.status}`)\n : data.description;\n this.create({ id, type: 'error', message, description });\n } else if (data.success !== undefined) {\n shouldDismiss = false;\n const message = typeof data.success === 'function' ? await data.success(response) : data.success;\n const description =\n typeof data.description === 'function' ? await data.description(response) : data.description;\n this.create({ id, type: 'success', message, description });\n }\n })\n .catch(async (error) => {\n result = ['reject', error];\n if (data.error !== undefined) {\n shouldDismiss = false;\n const message = typeof data.error === 'function' ? await data.error(error) : data.error;\n const description = typeof data.description === 'function' ? await data.description(error) : data.description;\n this.create({ id, type: 'error', message, description });\n }\n })\n .finally(() => {\n if (shouldDismiss) {\n // Toast is still in load state (and will be indefinitely — dismiss it)\n this.dismiss(id);\n id = undefined;\n }\n\n data.finally?.();\n });\n\n const unwrap = () =>\n new Promise((resolve, reject) =>\n originalPromise.then(() => (result[0] === 'reject' ? reject(result[1]) : resolve(result[1]))).catch(reject),\n );\n\n if (typeof id !== 'string' && typeof id !== 'number') {\n // cannot Object.assign on undefined\n return { unwrap };\n } else {\n return Object.assign(id, { unwrap });\n }\n };\n\n custom = (jsx: (id: number | string) => React.ReactElement, data?: ExternalToast) => {\n const id = data?.id || toastsCounter++;\n this.create({ jsx: jsx(id), id, ...data });\n return id;\n };\n\n getActiveToasts = () => {\n return this.toasts.filter((toast) => !this.dismissedToasts.has(toast.id));\n };\n}\n\nexport const ToastState = new Observer();\n\n// bind this to the toast function\nconst toastFunction = (message: titleT, data?: ExternalToast) => {\n const id = data?.id || toastsCounter++;\n\n ToastState.addToast({\n title: message,\n ...data,\n id,\n });\n return id;\n};\n\nconst isHttpResponse = (data: any): data is Response => {\n return (\n data &&\n typeof data === 'object' &&\n 'ok' in data &&\n typeof data.ok === 'boolean' &&\n 'status' in data &&\n typeof data.status === 'number'\n );\n};\n\nconst basicToast = toastFunction;\n\nconst getHistory = () => ToastState.toasts;\nconst getToasts = () => ToastState.getActiveToasts();\n\n// We use `Object.assign` to maintain the correct types as we would lose them otherwise\nexport const toast = Object.assign(\n basicToast,\n {\n success: ToastState.success,\n info: ToastState.info,\n warning: ToastState.warning,\n error: ToastState.error,\n custom: ToastState.custom,\n message: ToastState.message,\n promise: ToastState.promise,\n dismiss: ToastState.dismiss,\n loading: ToastState.loading,\n },\n { getHistory, getToasts },\n);\n","\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n ","import styleInject from '#style-inject';styleInject(\":where(html[dir=\\\"ltr\\\"]),:where([data-sonner-toaster][dir=\\\"ltr\\\"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir=\\\"rtl\\\"]),:where([data-sonner-toaster][dir=\\\"rtl\\\"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted=\\\"true\\\"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted=\\\"true\\\"]){transform:none}}:where([data-sonner-toaster][data-x-position=\\\"right\\\"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position=\\\"left\\\"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position=\\\"center\\\"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position=\\\"top\\\"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position=\\\"bottom\\\"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled=\\\"true\\\"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position=\\\"top\\\"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position=\\\"bottom\\\"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise=\\\"true\\\"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme=\\\"dark\\\"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled=\\\"true\\\"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping=\\\"true\\\"]):before{content:\\\"\\\";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position=\\\"top\\\"][data-swiping=\\\"true\\\"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position=\\\"bottom\\\"][data-swiping=\\\"true\\\"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping=\\\"false\\\"][data-removed=\\\"true\\\"]):before{content:\\\"\\\";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:\\\"\\\";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted=\\\"true\\\"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded=\\\"false\\\"][data-front=\\\"false\\\"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded=\\\"false\\\"][data-front=\\\"false\\\"][data-styled=\\\"true\\\"])>*{opacity:0}:where([data-sonner-toast][data-visible=\\\"false\\\"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted=\\\"true\\\"][data-expanded=\\\"true\\\"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed=\\\"true\\\"][data-front=\\\"true\\\"][data-swipe-out=\\\"false\\\"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=\\\"true\\\"][data-front=\\\"false\\\"][data-swipe-out=\\\"false\\\"][data-expanded=\\\"true\\\"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=\\\"true\\\"][data-front=\\\"false\\\"][data-swipe-out=\\\"false\\\"][data-expanded=\\\"false\\\"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed=\\\"true\\\"][data-front=\\\"false\\\"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\\n\")","import React from 'react';\n\nexport type ToastTypes = 'normal' | 'action' | 'success' | 'info' | 'warning' | 'error' | 'loading' | 'default';\n\nexport type PromiseT = Promise | (() => Promise);\n\nexport type PromiseTResult =\n | string\n | React.ReactNode\n | ((data: Data) => React.ReactNode | string | Promise);\n\nexport type PromiseExternalToast = Omit;\n\nexport type PromiseData = PromiseExternalToast & {\n loading?: string | React.ReactNode;\n success?: PromiseTResult;\n error?: PromiseTResult;\n description?: PromiseTResult;\n finally?: () => void | Promise;\n};\n\nexport interface ToastClassnames {\n toast?: string;\n title?: string;\n description?: string;\n loader?: string;\n closeButton?: string;\n cancelButton?: string;\n actionButton?: string;\n success?: string;\n error?: string;\n info?: string;\n warning?: string;\n loading?: string;\n default?: string;\n content?: string;\n icon?: string;\n}\n\nexport interface ToastIcons {\n success?: React.ReactNode;\n info?: React.ReactNode;\n warning?: React.ReactNode;\n error?: React.ReactNode;\n loading?: React.ReactNode;\n close?: React.ReactNode;\n}\n\nexport interface Action {\n label: React.ReactNode;\n onClick: (event: React.MouseEvent) => void;\n actionButtonStyle?: React.CSSProperties;\n}\n\nexport interface ToastT {\n id: number | string;\n title?: (() => React.ReactNode) | React.ReactNode;\n type?: ToastTypes;\n icon?: React.ReactNode;\n jsx?: React.ReactNode;\n richColors?: boolean;\n invert?: boolean;\n closeButton?: boolean;\n dismissible?: boolean;\n description?: (() => React.ReactNode) | React.ReactNode;\n duration?: number;\n delete?: boolean;\n action?: Action | React.ReactNode;\n cancel?: Action | React.ReactNode;\n onDismiss?: (toast: ToastT) => void;\n onAutoClose?: (toast: ToastT) => void;\n promise?: PromiseT;\n cancelButtonStyle?: React.CSSProperties;\n actionButtonStyle?: React.CSSProperties;\n style?: React.CSSProperties;\n unstyled?: boolean;\n className?: string;\n classNames?: ToastClassnames;\n descriptionClassName?: string;\n position?: Position;\n}\n\nexport function isAction(action: Action | React.ReactNode): action is Action {\n return (action as Action).label !== undefined;\n}\n\nexport type Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';\nexport interface HeightT {\n height: number;\n toastId: number | string;\n position: Position;\n}\n\ninterface ToastOptions {\n className?: string;\n closeButton?: boolean;\n descriptionClassName?: string;\n style?: React.CSSProperties;\n cancelButtonStyle?: React.CSSProperties;\n actionButtonStyle?: React.CSSProperties;\n duration?: number;\n unstyled?: boolean;\n classNames?: ToastClassnames;\n}\n\ntype Offset =\n | {\n top?: string | number;\n right?: string | number;\n bottom?: string | number;\n left?: string | number;\n }\n | string\n | number;\n\nexport interface ToasterProps {\n invert?: boolean;\n theme?: 'light' | 'dark' | 'system';\n position?: Position;\n hotkey?: string[];\n richColors?: boolean;\n expand?: boolean;\n duration?: number;\n gap?: number;\n visibleToasts?: number;\n closeButton?: boolean;\n toastOptions?: ToastOptions;\n className?: string;\n style?: React.CSSProperties;\n offset?: Offset;\n mobileOffset?: Offset;\n dir?: 'rtl' | 'ltr' | 'auto';\n swipeDirections?: SwipeDirection[];\n /**\n * @deprecated Please use the `icons` prop instead:\n * ```jsx\n * }}\n * />\n * ```\n */\n loadingIcon?: React.ReactNode;\n icons?: ToastIcons;\n containerAriaLabel?: string;\n pauseWhenPageIsHidden?: boolean;\n}\n\nexport type SwipeDirection = 'top' | 'right' | 'bottom' | 'left';\n\nexport interface ToastProps {\n toast: ToastT;\n toasts: ToastT[];\n index: number;\n swipeDirections?: SwipeDirection[];\n expanded: boolean;\n invert: boolean;\n heights: HeightT[];\n setHeights: React.Dispatch>;\n removeToast: (toast: ToastT) => void;\n gap?: number;\n position: Position;\n visibleToasts: number;\n expandByDefault: boolean;\n closeButton: boolean;\n interacting: boolean;\n style?: React.CSSProperties;\n cancelButtonStyle?: React.CSSProperties;\n actionButtonStyle?: React.CSSProperties;\n duration?: number;\n className?: string;\n unstyled?: boolean;\n descriptionClassName?: string;\n loadingIcon?: React.ReactNode;\n classNames?: ToastClassnames;\n icons?: ToastIcons;\n closeButtonAriaLabel?: string;\n pauseWhenPageIsHidden: boolean;\n defaultRichColors?: boolean;\n}\n\nexport enum SwipeStateTypes {\n SwipedOut = 'SwipedOut',\n SwipedBack = 'SwipedBack',\n NotSwiped = 'NotSwiped',\n}\n\nexport type Theme = 'light' | 'dark';\n\nexport interface ToastToDismiss {\n id: number | string;\n dismiss: boolean;\n}\n\nexport type ExternalToast = Omit & {\n id?: number | string;\n};\n"],"names":["getAsset","type","SuccessIcon","InfoIcon","WarningIcon","ErrorIcon","bars","Loader","visible","className","_","i","CloseIcon","useIsDocumentHidden","isDocumentHidden","setIsDocumentHidden","callback","toastsCounter","ToastState","Observer","toastFunction","subscriber","index","data","_a","message","rest","id","alreadyExists","toast","dismissible","promise","p","shouldDismiss","result","originalPromise","response","isHttpResponse","description","error","unwrap","resolve","reject","jsx","basicToast","getHistory","getToasts","isAction","action","cn","classes","styleInject","css","insertAt","head","style","Toast","props","_b","_c","_d","_e","_f","_g","_h","_i","_j","_k","ToasterInvert","unstyled","interacting","setHeights","visibleToasts","heights","toasts","expanded","removeToast","defaultRichColors","closeButtonFromToaster","cancelButtonStyle","actionButtonStyle","descriptionClassName","durationFromToaster","position","gap","loadingIconProp","expandByDefault","classNames","icons","closeButtonAriaLabel","pauseWhenPageIsHidden","swipeDirection","setSwipeDirection","setSwipeOut","swipeOutDirection","setSwipeOutDirection","mounted","setMounted","removed","setRemoved","swiping","setSwiping","swipeOut","isSwiped","setIsSwiped","offsetBeforeRemove","setOffsetBeforeRemove","initialHeight","setInitialHeight","remainingTime","TOAST_LIFETIME","dragStartTime","toastRef","isFront","isVisible","toastType","toastClassname","toastDescriptionClassname","heightIndex","height","closeButton","duration","closeTimerStartTimeRef","offset","lastCloseTimerStartTimeRef","pointerStartRef","y","x","toastsHeightBefore","prev","curr","reducerIndex","invert","disabled","toastNode","h","originalHeight","newHeight","deleteToast","TIME_BEFORE_UNMOUNT","timeoutId","elapsedTime","event","swipeAmountX","swipeAmountY","timeTaken","swipeAmount","velocity","SWIPE_THRESHOLD","yDelta","xDelta","swipeDirections","getDefaultSwipeDirections","directions","indexOfExistingToast","isValidElement","getLoadingIcon","getDocumentDirection","dirAttribute","Toaster","darkMediaQuery","forwardRef","ref","hotkey","expand","mobileOffset","theme","richColors","VISIBLE_TOASTS_AMOUNT","toastOptions","dir","GAP","loadingIcon","containerAriaLabel","setToasts","possiblePositions","setExpanded","setInteracting","actualTheme","setActualTheme","listRef","hotkeyLabel","lastFocusedElementRef","isFocusWithinRef","toastToRemove","t","matches","e","handleKeyDown","key","TOAST_WIDTH","styles","isMobile","prefix","defaultValue","MOBILE_VIEWPORT_OFFSET","assignAll","assignOffset"],"sourceRoot":"","ignoreList":[]}