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,CAAAA,CACA2B,eAAAA,CAAAA,CACAC,mBAAAA,CACF,EAAA5C,EACQ,CAAE/G,OAAAA,CAAAA,CAAQuF,SAAAA,CAAS,EAAIjB,GAAW9C,GAExC,OACE0G,EAAAA,aAAA,CAAC,OACCvL,GAAG,eACH6F,MAAO,CACLyC,SAAU,QACV2E,OAAQ,KACRd,IAnBe,GAoBfG,KApBe,GAqBfC,MArBe,GAsBfI,OAtBe,GAuBfO,cAAe,OACf,GAAGH,CACL,EACAnL,UAAWoL,EACXG,aAAcvE,EAAS1B,UAAA,CACvBkG,aAAcxE,EAASb,QAAA,EAEtB1E,EAAOE,GAAA,CAAKjE,IACX,IAAM+N,EAAgB/N,EAAEgJ,QAAA,EAAYA,EAM9BgF,EAAgBrB,GAAiBoB,EALxBzE,EAASX,eAAA,CAAgB3I,EAAG,CACzC4I,aAAAA,EACAC,OAAAA,EACAC,gBAAiBE,CACnB,IAGA,OACEiD,EAAAA,aAAA,CAACC,GAAA,CACCxL,GAAIV,EAAEU,EAAA,CACNuN,IAAKjO,EAAEU,EAAA,CACPyL,eAAgB7C,EAAS5B,YAAA,CACzBpF,UAAWtC,EAAEqE,OAAA,CAAUiJ,GAAc,GACrC/G,MAAOyH,CAAAA,EAENhO,WAAAA,EAAE8D,IAAA,CACDX,EAAanD,EAAEyG,OAAA,CAASzG,GACtB8L,EACFA,EAAS9L,GAETiM,EAAAA,aAAA,CAACJ,GAAA,CAAS7H,MAAOhE,EAAGgJ,SAAU+E,CAAAA,GAItC,GAGN,ECjIOG,GAAQlK","sources":["webpack://_N_E/./node_modules/next/node_modules/@swc/helpers/esm/_tagged_template_literal.js","webpack://_N_E/./node_modules/goober/dist/goober.modern.js","webpack://_N_E/../src/core/types.ts","webpack://_N_E/../src/core/utils.ts","webpack://_N_E/../src/core/store.ts","webpack://_N_E/../src/core/toast.ts","webpack://_N_E/../src/core/use-toaster.ts","webpack://_N_E/../src/components/toast-bar.tsx","webpack://_N_E/../src/components/toast-icon.tsx","webpack://_N_E/../src/components/error.tsx","webpack://_N_E/../src/components/loader.tsx","webpack://_N_E/../src/components/checkmark.tsx","webpack://_N_E/../src/components/toaster.tsx","webpack://_N_E/../src/index.ts"],"sourcesContent":["export function _tagged_template_literal(strings, raw) {\n if (!raw) raw = strings.slice(0);\n\n return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } }));\n}\nexport { _tagged_template_literal as _ };\n","let e={data:\"\"},t=t=>\"object\"==typeof window?((t?t.querySelector(\"#_goober\"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement(\"style\")),{innerHTML:\" \",id:\"_goober\"})).firstChild:t||e,r=e=>{let r=t(e),l=r.data;return r.data=\"\",l},l=/(?:([\\u0080-\\uFFFF\\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\\s*)/g,a=/\\/\\*[^]*?\\*\\/| +/g,n=/\\n+/g,o=(e,t)=>{let r=\"\",l=\"\",a=\"\";for(let n in e){let c=e[n];\"@\"==n[0]?\"i\"==n[1]?r=n+\" \"+c+\";\":l+=\"f\"==n[1]?o(c,n):n+\"{\"+o(c,\"k\"==n[1]?\"\":t)+\"}\":\"object\"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\\S+\\([^)]*\\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+\" \"+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,\"-$&\").toLowerCase(),a+=o.p?o.p(n,c):n+\":\"+c+\";\")}return r+(t&&a?t+\"{\"+a+\"}\":a)+l},c={},s=e=>{if(\"object\"==typeof e){let t=\"\";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t>>0;return\"go\"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,\"\"));)t[4]?o.shift():t[3]?(r=t[3].replace(n,\" \").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n,\" \").trim();return o[0]})(e);c[d]=o(p?{[\"@keyframes \"+d]:t}:t,r?\"\":\".\"+d)}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?\".\"+t:e&&\"object\"==typeof e?e.props?\"\":o(e,\"\"):!1===e?\"\":e}return e+l+(null==n?\"\":n)},\"\");function u(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g,b=u.bind({g:1}),h=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\\d+/.test(s),c.className=u.apply(r,l)+(s?\" \"+s:\"\"),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}export{u as css,r as extractCss,b as glob,h as keyframes,m as setup,j as styled};\n","import { CSSProperties } from 'react';\n\nexport type ToastType = 'success' | 'error' | 'loading' | 'blank' | 'custom';\nexport type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right';\n\nexport type Renderable = React.ReactElement | string | null;\n\nexport interface IconTheme {\n primary: string;\n secondary: string;\n}\n\nexport type ValueFunction = (arg: TArg) => TValue;\nexport type ValueOrFunction =\n | TValue\n | ValueFunction;\n\nconst isFunction = (\n valOrFunction: ValueOrFunction\n): valOrFunction is ValueFunction =>\n typeof valOrFunction === 'function';\n\nexport const resolveValue = (\n valOrFunction: ValueOrFunction,\n arg: TArg\n): TValue => (isFunction(valOrFunction) ? valOrFunction(arg) : valOrFunction);\n\nexport interface Toast {\n type: ToastType;\n id: string;\n message: ValueOrFunction;\n icon?: Renderable;\n duration?: number;\n pauseDuration: number;\n position?: ToastPosition;\n removeDelay?: number;\n\n ariaProps: {\n role: 'status' | 'alert';\n 'aria-live': 'assertive' | 'off' | 'polite';\n };\n\n style?: CSSProperties;\n className?: string;\n iconTheme?: IconTheme;\n\n createdAt: number;\n visible: boolean;\n dismissed: boolean;\n height?: number;\n}\n\nexport type ToastOptions = Partial<\n Pick<\n Toast,\n | 'id'\n | 'icon'\n | 'duration'\n | 'ariaProps'\n | 'className'\n | 'style'\n | 'position'\n | 'iconTheme'\n | 'removeDelay'\n >\n>;\n\nexport type DefaultToastOptions = ToastOptions & {\n [key in ToastType]?: ToastOptions;\n};\n\nexport interface ToasterProps {\n position?: ToastPosition;\n toastOptions?: DefaultToastOptions;\n reverseOrder?: boolean;\n gutter?: number;\n containerStyle?: React.CSSProperties;\n containerClassName?: string;\n children?: (toast: Toast) => React.ReactElement;\n}\n\nexport interface ToastWrapperProps {\n id: string;\n className?: string;\n style?: React.CSSProperties;\n onHeightUpdate: (id: string, height: number) => void;\n children?: React.ReactNode;\n}\n","export const genId = (() => {\n let count = 0;\n return () => {\n return (++count).toString();\n };\n})();\n\nexport const prefersReducedMotion = (() => {\n // Cache result\n let shouldReduceMotion: boolean | undefined = undefined;\n\n return () => {\n if (shouldReduceMotion === undefined && typeof window !== 'undefined') {\n const mediaQuery = matchMedia('(prefers-reduced-motion: reduce)');\n shouldReduceMotion = !mediaQuery || mediaQuery.matches;\n }\n return shouldReduceMotion;\n };\n})();\n","import { useEffect, useState, useRef } from 'react';\nimport { DefaultToastOptions, Toast, ToastType } from './types';\n\nconst TOAST_LIMIT = 20;\n\nexport enum ActionType {\n ADD_TOAST,\n UPDATE_TOAST,\n UPSERT_TOAST,\n DISMISS_TOAST,\n REMOVE_TOAST,\n START_PAUSE,\n END_PAUSE,\n}\n\ntype Action =\n | {\n type: ActionType.ADD_TOAST;\n toast: Toast;\n }\n | {\n type: ActionType.UPSERT_TOAST;\n toast: Toast;\n }\n | {\n type: ActionType.UPDATE_TOAST;\n toast: Partial;\n }\n | {\n type: ActionType.DISMISS_TOAST;\n toastId?: string;\n }\n | {\n type: ActionType.REMOVE_TOAST;\n toastId?: string;\n }\n | {\n type: ActionType.START_PAUSE;\n time: number;\n }\n | {\n type: ActionType.END_PAUSE;\n time: number;\n };\n\ninterface State {\n toasts: Toast[];\n pausedAt: number | undefined;\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case ActionType.ADD_TOAST:\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case ActionType.UPDATE_TOAST:\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n };\n\n case ActionType.UPSERT_TOAST:\n const { toast } = action;\n return reducer(state, {\n type: state.toasts.find((t) => t.id === toast.id)\n ? ActionType.UPDATE_TOAST\n : ActionType.ADD_TOAST,\n toast,\n });\n\n case ActionType.DISMISS_TOAST:\n const { toastId } = action;\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n dismissed: true,\n visible: false,\n }\n : t\n ),\n };\n case ActionType.REMOVE_TOAST:\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n\n case ActionType.START_PAUSE:\n return {\n ...state,\n pausedAt: action.time,\n };\n\n case ActionType.END_PAUSE:\n const diff = action.time - (state.pausedAt || 0);\n\n return {\n ...state,\n pausedAt: undefined,\n toasts: state.toasts.map((t) => ({\n ...t,\n pauseDuration: t.pauseDuration + diff,\n })),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [], pausedAt: undefined };\n\nexport const dispatch = (action: Action) => {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n};\n\nexport const defaultTimeouts: {\n [key in ToastType]: number;\n} = {\n blank: 4000,\n error: 4000,\n success: 2000,\n loading: Infinity,\n custom: 4000,\n};\n\nexport const useStore = (toastOptions: DefaultToastOptions = {}): State => {\n const [state, setState] = useState(memoryState);\n const initial = useRef(memoryState);\n\n // TODO: Switch to useSyncExternalStore when targeting React 18+\n useEffect(() => {\n if (initial.current !== memoryState) {\n setState(memoryState);\n }\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, []);\n\n const mergedToasts = state.toasts.map((t) => ({\n ...toastOptions,\n ...toastOptions[t.type],\n ...t,\n removeDelay:\n t.removeDelay ||\n toastOptions[t.type]?.removeDelay ||\n toastOptions?.removeDelay,\n duration:\n t.duration ||\n toastOptions[t.type]?.duration ||\n toastOptions?.duration ||\n defaultTimeouts[t.type],\n style: {\n ...toastOptions.style,\n ...toastOptions[t.type]?.style,\n ...t.style,\n },\n }));\n\n return {\n ...state,\n toasts: mergedToasts,\n };\n};\n","import {\n Renderable,\n Toast,\n ToastOptions,\n ToastType,\n DefaultToastOptions,\n ValueOrFunction,\n resolveValue,\n} from './types';\nimport { genId } from './utils';\nimport { dispatch, ActionType } from './store';\n\ntype Message = ValueOrFunction;\n\ntype ToastHandler = (message: Message, options?: ToastOptions) => string;\n\nconst createToast = (\n message: Message,\n type: ToastType = 'blank',\n opts?: ToastOptions\n): Toast => ({\n createdAt: Date.now(),\n visible: true,\n dismissed: false,\n type,\n ariaProps: {\n role: 'status',\n 'aria-live': 'polite',\n },\n message,\n pauseDuration: 0,\n ...opts,\n id: opts?.id || genId(),\n});\n\nconst createHandler =\n (type?: ToastType): ToastHandler =>\n (message, options) => {\n const toast = createToast(message, type, options);\n dispatch({ type: ActionType.UPSERT_TOAST, toast });\n return toast.id;\n };\n\nconst toast = (message: Message, opts?: ToastOptions) =>\n createHandler('blank')(message, opts);\n\ntoast.error = createHandler('error');\ntoast.success = createHandler('success');\ntoast.loading = createHandler('loading');\ntoast.custom = createHandler('custom');\n\ntoast.dismiss = (toastId?: string) => {\n dispatch({\n type: ActionType.DISMISS_TOAST,\n toastId,\n });\n};\n\ntoast.remove = (toastId?: string) =>\n dispatch({ type: ActionType.REMOVE_TOAST, toastId });\n\ntoast.promise = (\n promise: Promise | (() => Promise),\n msgs: {\n loading: Renderable;\n success?: ValueOrFunction;\n error?: ValueOrFunction;\n },\n opts?: DefaultToastOptions\n) => {\n const id = toast.loading(msgs.loading, { ...opts, ...opts?.loading });\n\n if (typeof promise === 'function') {\n promise = promise();\n }\n\n promise\n .then((p) => {\n const successMessage = msgs.success\n ? resolveValue(msgs.success, p)\n : undefined;\n\n if (successMessage) {\n toast.success(successMessage, {\n id,\n ...opts,\n ...opts?.success,\n });\n } else {\n toast.dismiss(id);\n }\n return p;\n })\n .catch((e) => {\n const errorMessage = msgs.error ? resolveValue(msgs.error, e) : undefined;\n\n if (errorMessage) {\n toast.error(errorMessage, {\n id,\n ...opts,\n ...opts?.error,\n });\n } else {\n toast.dismiss(id);\n }\n });\n\n return promise;\n};\n\nexport { toast };\n","import { useEffect, useCallback } from 'react';\nimport { dispatch, ActionType, useStore } from './store';\nimport { toast } from './toast';\nimport { DefaultToastOptions, Toast, ToastPosition } from './types';\n\nconst updateHeight = (toastId: string, height: number) => {\n dispatch({\n type: ActionType.UPDATE_TOAST,\n toast: { id: toastId, height },\n });\n};\nconst startPause = () => {\n dispatch({\n type: ActionType.START_PAUSE,\n time: Date.now(),\n });\n};\n\nconst toastTimeouts = new Map>();\n\nexport const REMOVE_DELAY = 1000;\n\nconst addToRemoveQueue = (toastId: string, removeDelay = REMOVE_DELAY) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: ActionType.REMOVE_TOAST,\n toastId: toastId,\n });\n }, removeDelay);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const useToaster = (toastOptions?: DefaultToastOptions) => {\n const { toasts, pausedAt } = useStore(toastOptions);\n\n useEffect(() => {\n if (pausedAt) {\n return;\n }\n\n const now = Date.now();\n const timeouts = toasts.map((t) => {\n if (t.duration === Infinity) {\n return;\n }\n\n const durationLeft =\n (t.duration || 0) + t.pauseDuration - (now - t.createdAt);\n\n if (durationLeft < 0) {\n if (t.visible) {\n toast.dismiss(t.id);\n }\n return;\n }\n return setTimeout(() => toast.dismiss(t.id), durationLeft);\n });\n\n return () => {\n timeouts.forEach((timeout) => timeout && clearTimeout(timeout));\n };\n }, [toasts, pausedAt]);\n\n const endPause = useCallback(() => {\n if (pausedAt) {\n dispatch({ type: ActionType.END_PAUSE, time: Date.now() });\n }\n }, [pausedAt]);\n\n const calculateOffset = useCallback(\n (\n toast: Toast,\n opts?: {\n reverseOrder?: boolean;\n gutter?: number;\n defaultPosition?: ToastPosition;\n }\n ) => {\n const { reverseOrder = false, gutter = 8, defaultPosition } = opts || {};\n\n const relevantToasts = toasts.filter(\n (t) =>\n (t.position || defaultPosition) ===\n (toast.position || defaultPosition) && t.height\n );\n const toastIndex = relevantToasts.findIndex((t) => t.id === toast.id);\n const toastsBefore = relevantToasts.filter(\n (toast, i) => i < toastIndex && toast.visible\n ).length;\n\n const offset = relevantToasts\n .filter((t) => t.visible)\n .slice(...(reverseOrder ? [toastsBefore + 1] : [0, toastsBefore]))\n .reduce((acc, t) => acc + (t.height || 0) + gutter, 0);\n\n return offset;\n },\n [toasts]\n );\n\n useEffect(() => {\n // Add dismissed toasts to remove queue\n toasts.forEach((toast) => {\n if (toast.dismissed) {\n addToRemoveQueue(toast.id, toast.removeDelay);\n } else {\n // If toast becomes visible again, remove it from the queue\n const timeout = toastTimeouts.get(toast.id);\n if (timeout) {\n clearTimeout(timeout);\n toastTimeouts.delete(toast.id);\n }\n }\n });\n }, [toasts]);\n\n return {\n toasts,\n handlers: {\n updateHeight,\n startPause,\n endPause,\n calculateOffset,\n },\n };\n};\n","import * as React from 'react';\nimport { styled, keyframes } from 'goober';\n\nimport { Toast, ToastPosition, resolveValue, Renderable } from '../core/types';\nimport { ToastIcon } from './toast-icon';\nimport { prefersReducedMotion } from '../core/utils';\n\nconst enterAnimation = (factor: number) => `\n0% {transform: translate3d(0,${factor * -200}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`;\n\nconst exitAnimation = (factor: number) => `\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${factor * -150}%,-1px) scale(.6); opacity:0;}\n`;\n\nconst fadeInAnimation = `0%{opacity:0;} 100%{opacity:1;}`;\nconst fadeOutAnimation = `0%{opacity:1;} 100%{opacity:0;}`;\n\nconst ToastBarBase = styled('div')`\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n`;\n\nconst Message = styled('div')`\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n`;\n\ninterface ToastBarProps {\n toast: Toast;\n position?: ToastPosition;\n style?: React.CSSProperties;\n children?: (components: {\n icon: Renderable;\n message: Renderable;\n }) => Renderable;\n}\n\nconst getAnimationStyle = (\n position: ToastPosition,\n visible: boolean\n): React.CSSProperties => {\n const top = position.includes('top');\n const factor = top ? 1 : -1;\n\n const [enter, exit] = prefersReducedMotion()\n ? [fadeInAnimation, fadeOutAnimation]\n : [enterAnimation(factor), exitAnimation(factor)];\n\n return {\n animation: visible\n ? `${keyframes(enter)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`\n : `${keyframes(exit)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`,\n };\n};\n\nexport const ToastBar: React.FC = React.memo(\n ({ toast, position, style, children }) => {\n const animationStyle: React.CSSProperties = toast.height\n ? getAnimationStyle(\n toast.position || position || 'top-center',\n toast.visible\n )\n : { opacity: 0 };\n\n const icon = ;\n const message = (\n \n {resolveValue(toast.message, toast)}\n \n );\n\n return (\n \n {typeof children === 'function' ? (\n children({\n icon,\n message,\n })\n ) : (\n <>\n {icon}\n {message}\n \n )}\n \n );\n }\n);\n","import * as React from 'react';\nimport { styled, keyframes } from 'goober';\n\nimport { Toast } from '../core/types';\nimport { ErrorIcon, ErrorTheme } from './error';\nimport { LoaderIcon, LoaderTheme } from './loader';\nimport { CheckmarkIcon, CheckmarkTheme } from './checkmark';\n\nconst StatusWrapper = styled('div')`\n position: absolute;\n`;\n\nconst IndicatorWrapper = styled('div')`\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n`;\n\nconst enter = keyframes`\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}`;\n\nexport const AnimatedIconWrapper = styled('div')`\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: ${enter} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n`;\n\nexport type IconThemes = Partial<{\n success: CheckmarkTheme;\n error: ErrorTheme;\n loading: LoaderTheme;\n}>;\n\nexport const ToastIcon: React.FC<{\n toast: Toast;\n}> = ({ toast }) => {\n const { icon, type, iconTheme } = toast;\n if (icon !== undefined) {\n if (typeof icon === 'string') {\n return {icon};\n } else {\n return icon;\n }\n }\n\n if (type === 'blank') {\n return null;\n }\n\n return (\n \n \n {type !== 'loading' && (\n \n {type === 'error' ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n};\n","import { styled, keyframes } from 'goober';\n\nconst circleAnimation = keyframes`\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n opacity: 1;\n}`;\n\nconst firstLineAnimation = keyframes`\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}`;\n\nconst secondLineAnimation = keyframes`\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}`;\n\nexport interface ErrorTheme {\n primary?: string;\n secondary?: string;\n}\n\nexport const ErrorIcon = styled('div')`\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ${(p) => p.primary || '#ff4b4b'};\n position: relative;\n transform: rotate(45deg);\n\n animation: ${circleAnimation} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: ${firstLineAnimation} 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ${(p) => p.secondary || '#fff'};\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: ${secondLineAnimation} 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n`;\n","import { styled, keyframes } from 'goober';\n\nconst rotate = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`;\n\nexport interface LoaderTheme {\n primary?: string;\n secondary?: string;\n}\n\nexport const LoaderIcon = styled('div')`\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: ${(p) => p.secondary || '#e0e0e0'};\n border-right-color: ${(p) => p.primary || '#616161'};\n animation: ${rotate} 1s linear infinite;\n`;\n","import { styled, keyframes } from 'goober';\n\nconst circleAnimation = keyframes`\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}`;\n\nconst checkmarkAnimation = keyframes`\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}`;\n\nexport interface CheckmarkTheme {\n primary?: string;\n secondary?: string;\n}\n\nexport const CheckmarkIcon = styled('div')`\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ${(p) => p.primary || '#61d345'};\n position: relative;\n transform: rotate(45deg);\n\n animation: ${circleAnimation} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: ${checkmarkAnimation} 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ${(p) => p.secondary || '#fff'};\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n`;\n","import { css, setup } from 'goober';\nimport * as React from 'react';\nimport {\n resolveValue,\n ToasterProps,\n ToastPosition,\n ToastWrapperProps,\n} from '../core/types';\nimport { useToaster } from '../core/use-toaster';\nimport { prefersReducedMotion } from '../core/utils';\nimport { ToastBar } from './toast-bar';\n\nsetup(React.createElement);\n\nconst ToastWrapper = ({\n id,\n className,\n style,\n onHeightUpdate,\n children,\n}: ToastWrapperProps) => {\n const ref = React.useCallback(\n (el: HTMLElement | null) => {\n if (el) {\n const updateHeight = () => {\n const height = el.getBoundingClientRect().height;\n onHeightUpdate(id, height);\n };\n updateHeight();\n new MutationObserver(updateHeight).observe(el, {\n subtree: true,\n childList: true,\n characterData: true,\n });\n }\n },\n [id, onHeightUpdate]\n );\n\n return (\n
\n {children}\n
\n );\n};\n\nconst getPositionStyle = (\n position: ToastPosition,\n offset: number\n): React.CSSProperties => {\n const top = position.includes('top');\n const verticalStyle: React.CSSProperties = top ? { top: 0 } : { bottom: 0 };\n const horizontalStyle: React.CSSProperties = position.includes('center')\n ? {\n justifyContent: 'center',\n }\n : position.includes('right')\n ? {\n justifyContent: 'flex-end',\n }\n : {};\n return {\n left: 0,\n right: 0,\n display: 'flex',\n position: 'absolute',\n transition: prefersReducedMotion()\n ? undefined\n : `all 230ms cubic-bezier(.21,1.02,.73,1)`,\n transform: `translateY(${offset * (top ? 1 : -1)}px)`,\n ...verticalStyle,\n ...horizontalStyle,\n };\n};\n\nconst activeClass = css`\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n`;\n\nconst DEFAULT_OFFSET = 16;\n\nexport const Toaster: React.FC = ({\n reverseOrder,\n position = 'top-center',\n toastOptions,\n gutter,\n children,\n containerStyle,\n containerClassName,\n}) => {\n const { toasts, handlers } = useToaster(toastOptions);\n\n return (\n \n {toasts.map((t) => {\n const toastPosition = t.position || position;\n const offset = handlers.calculateOffset(t, {\n reverseOrder,\n gutter,\n defaultPosition: position,\n });\n const positionStyle = getPositionStyle(toastPosition, offset);\n\n return (\n \n {t.type === 'custom' ? (\n resolveValue(t.message, t)\n ) : children ? (\n children(t)\n ) : (\n \n )}\n \n );\n })}\n \n );\n};\n","import { toast } from './core/toast';\n\nexport * from './headless';\n\nexport { ToastBar } from './components/toast-bar';\nexport { ToastIcon } from './components/toast-icon';\nexport { Toaster } from './components/toaster';\nexport { CheckmarkIcon } from './components/checkmark';\nexport { ErrorIcon } from './components/error';\nexport { LoaderIcon } from './components/loader';\n\nexport { toast };\nexport default toast;\n"],"names":["count","shouldReduceMotion","_tagged_template_literal","strings","raw","slice","Object","freeze","defineProperties","value","e","data","t","window","querySelector","_goober","assign","document","head","appendChild","createElement","innerHTML","id","firstChild","l","a","n","o","r","c","replace","test","toLowerCase","p","s","i","u","d","length","charCodeAt","exec","shift","trim","unshift","f","g","indexOf","reduce","call","props","className","arguments","target","k","bind","h","j","theme","apply","ref","as","isFunction","valOrFunction","resolveValue","arg","genId","toString","prefersReducedMotion","mediaQuery","matchMedia","matches","reducer","state","action","type","toasts","toast","map","find","toastId","dismissed","visible","filter","pausedAt","time","diff","pauseDuration","listeners","memoryState","dispatch","forEach","listener","defaultTimeouts","blank","error","success","loading","custom","useStore","toastOptions","setState","useState","initial","useRef","useEffect","current","push","index","splice","mergedToasts","_a","_b","_c","removeDelay","duration","style","createToast","message","opts","createdAt","Date","now","ariaProps","role","createHandler","options","dismiss","remove","promise","msgs","then","successMessage","catch","errorMessage","updateHeight","height","startPause","toastTimeouts","Map","addToRemoveQueue","has","timeout","setTimeout","delete","set","useToaster","timeouts","durationLeft","clearTimeout","endPause","useCallback","calculateOffset","reverseOrder","gutter","defaultPosition","relevantToasts","position","toastIndex","findIndex","toastsBefore","acc","get","handlers","circleAnimation","keyframes","firstLineAnimation","secondLineAnimation","ErrorIcon","styled","_templateObject3","primary","secondary","rotate","LoaderIcon","_templateObject5","checkmarkAnimation","CheckmarkIcon","_templateObject8","StatusWrapper","_templateObject9","IndicatorWrapper","_templateObject10","enter","AnimatedIconWrapper","_templateObject12","ToastIcon","param","icon","iconTheme","enterAnimation","factor","concat","exitAnimation","ToastBarBase","_templateObject13","Message","_templateObject14","getAnimationStyle","includes","exit","animation","ToastBar","children","animationStyle","opacity","T","ToastWrapper","onHeightUpdate","el","getBoundingClientRect","MutationObserver","observe","subtree","childList","characterData","getPositionStyle","offset","top","horizontalStyle","justifyContent","left","right","display","transition","transform","bottom","activeClass","css","Toaster","containerStyle","containerClassName","zIndex","pointerEvents","onMouseEnter","onMouseLeave","toastPosition","positionStyle","key","src_default"],"sourceRoot":""}