@alfadocs/ui-kit 0.30.5 → 0.31.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.
- package/dist/_chunks/{accordion-CNcodXuO.js → accordion-bSU21uTV.js} +3 -3
- package/dist/_chunks/{agenda-card-DO9_yogb.js → agenda-card-UJA6Arbs.js} +3 -3
- package/dist/_chunks/{agenda-tray-WLbfMip6.js → agenda-tray-1fAxNOMz.js} +4 -4
- package/dist/_chunks/{ai-prompt-input-BXlwNnWe.js → ai-prompt-input-C6sCr1Vi.js} +11 -10
- package/dist/_chunks/{alia-sidebar-C-232sD7.js → alia-sidebar-BEoMl6UL.js} +9 -9
- package/dist/_chunks/ar-CEpIJtcO.js +399 -0
- package/dist/_chunks/{audio-recorder-DL800PE_.js → audio-recorder-C1rhKhSN.js} +114 -114
- package/dist/_chunks/audio-visualiser-l6zPd0AG.js +162 -0
- package/dist/_chunks/{autocomplete-CUh0f7Dj.js → autocomplete-DIgdhCGJ.js} +2 -2
- package/dist/_chunks/{avatar-D_H4emLo.js → avatar-BNQNhoyL.js} +19 -18
- package/dist/_chunks/{badge-CIjQ1Us1.js → badge-CptERaHx.js} +2 -2
- package/dist/_chunks/{booking-Cw92aqo3.js → booking-BIZ9GSer.js} +149 -160
- package/dist/_chunks/{breadcrumb--YI7lcHA.js → breadcrumb-CLlhx7qo.js} +2 -2
- package/dist/_chunks/{button-group-Bh2g_Ng-.js → button-group-Ciq6J4IW.js} +15 -14
- package/dist/_chunks/{calendar-WWNx448i.js → calendar-YHFknAGv.js} +22 -22
- package/dist/_chunks/calendar-clock-CYkcqdwl.js +19 -0
- package/dist/_chunks/{carousel.agent-C2Icc9_T.js → carousel.agent-DrX96W-1.js} +2 -2
- package/dist/_chunks/{chart-BLvFl169.js → chart-DLkVn_ex.js} +2 -2
- package/dist/_chunks/{chat-container-izziXViv.js → chat-container-ogB4OskO.js} +24 -23
- package/dist/_chunks/{chat-input-cyl_y9bh.js → chat-input-CQe7nR_v.js} +132 -118
- package/dist/_chunks/{chat-message-fg221-yx.js → chat-message-D53_fH2w.js} +2 -2
- package/dist/_chunks/{checkbox-Dgp_cfUr.js → checkbox-DRcOdmXv.js} +3 -3
- package/dist/_chunks/{checkbox-group-eVowqKcT.js → checkbox-group-CpUwlHug.js} +3 -3
- package/dist/_chunks/{collapsible-hHiyZp0b.js → collapsible-CERONory.js} +2 -2
- package/dist/_chunks/{color-picker-Bm-gzpsh.js → color-picker-9tL7pz5y.js} +192 -181
- package/dist/_chunks/{combobox-Da9eq00i.js → combobox-BC-DFx8G.js} +31 -30
- package/dist/_chunks/{command-palette-11BieSNq.js → command-palette-BiPAAno-.js} +125 -123
- package/dist/_chunks/{copy-field-BAF4mt9h.js → copy-field-CCq7j6Zc.js} +2 -2
- package/dist/_chunks/{date-picker-D0Ry1dMz.js → date-picker-B94HAV4A.js} +4 -4
- package/dist/_chunks/{date-range-picker-DYgHzMOo.js → date-range-picker-D4dgDlLU.js} +73 -73
- package/dist/_chunks/{date-time-picker-CGmGtcyc.js → date-time-picker-D1GEzf8p.js} +5 -5
- package/dist/_chunks/de-Dfbeau59.js +477 -0
- package/dist/_chunks/{description-list-CWjnaDGn.js → description-list-BEbK2g93.js} +2 -2
- package/dist/_chunks/{dialog-C-lTGVkB.js → dialog-Cee13rHU.js} +3 -3
- package/dist/_chunks/{dropdown-menu-DZxwF23X.js → dropdown-menu-BC5ZdOMo.js} +3 -3
- package/dist/_chunks/{editable-currency-cell-renderer-CztRy_21.js → editable-currency-cell-renderer-BpicmolK.js} +308 -322
- package/dist/_chunks/el-Dro3J7CP.js +373 -0
- package/dist/_chunks/{email-input-DvJ_kPKL.js → email-input-lQivsFrw.js} +3 -3
- package/dist/_chunks/es-Dvg8u70B.js +373 -0
- package/dist/_chunks/{file-upload-DxAQprcU.js → file-upload-CdozCPct.js} +226 -233
- package/dist/_chunks/fr-VOGjBSPP.js +338 -0
- package/dist/_chunks/{freemium-paywall-B9c8Ylww.js → freemium-paywall-D1N02Oam.js} +4 -4
- package/dist/_chunks/{header-DDj7uGD-.js → header-CTZWX-tm.js} +2 -2
- package/dist/_chunks/hi-BSDxWU_y.js +433 -0
- package/dist/_chunks/{icon-button-DPEqBKBQ.js → icon-button-CKEOrN37.js} +2 -2
- package/dist/_chunks/{icon-button-group-DeV3FpNY.js → icon-button-group-C48khLE0.js} +23 -22
- package/dist/_chunks/{isSameDay-DHG8Xade.js → isSameDay-DUEiAT0G.js} +2 -2
- package/dist/_chunks/isSameWeek-Dfzu29cW.js +14 -0
- package/dist/_chunks/it-CuonvcI_.js +401 -0
- package/dist/_chunks/ja-DO57gIOT.js +366 -0
- package/dist/_chunks/{key-value-pair-BvDY3zuc.js → key-value-pair-C8DaR3Xs.js} +2 -2
- package/dist/_chunks/{list-BdvDctBz.js → list-BOwqwy03.js} +44 -43
- package/dist/_chunks/{locale-picker-CY89MChR.js → locale-picker-D99UyZVJ.js} +4 -4
- package/dist/_chunks/{map-view-DyB8tr6c.js → map-view-WEWqXzof.js} +569 -557
- package/dist/_chunks/{message-card-D6iyPacd.js → message-card-BbRhZkDI.js} +3 -3
- package/dist/_chunks/{message-tray-Bh-0ra-Y.js → message-tray-B762TKuv.js} +11 -10
- package/dist/_chunks/{multi-select-dSe6Xtc4.js → multi-select-DOLO3K_z.js} +26 -25
- package/dist/_chunks/{navigation-menu-CyS1fBJ7.js → navigation-menu-C6lBYVv9.js} +3 -3
- package/dist/_chunks/nl-DjPaaWaW.js +326 -0
- package/dist/_chunks/{notification-card-vaMaA7Wa.js → notification-card-DMdO4g54.js} +2 -2
- package/dist/_chunks/{notification-tray-Cnum6LwM.js → notification-tray-Dl3FTleW.js} +17 -16
- package/dist/_chunks/{number-input-BZXu6bPY.js → number-input-Dj5L3pXK.js} +2 -2
- package/dist/_chunks/{otp-input-BDF_iNpa.js → otp-input-BEg_sn8A.js} +2 -2
- package/dist/_chunks/{pagination-BWaXF7W0.js → pagination-DQOgnxxw.js} +2 -2
- package/dist/_chunks/{parseISO-Dk4xa7q6.js → parseISO-DEpUNwxZ.js} +2 -2
- package/dist/_chunks/{patient-search-ZpHN-pgJ.js → patient-search-hFiYbqcl.js} +8 -8
- package/dist/_chunks/{patient-shell-CYaNkbA1.js → patient-shell-CDvMw_Nk.js} +6 -6
- package/dist/_chunks/{payment-form-Ds3rxvad.js → payment-form-D5rgnZu7.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CIuaocnq.js → pdf-viewer-DvtEHcEP.js} +347 -320
- package/dist/_chunks/{phone-input-DKSHX7NQ.js → phone-input-DfZbPPvh.js} +217 -201
- package/dist/_chunks/pl-Cl4lOx2N.js +514 -0
- package/dist/_chunks/{popover-BfHSBEKq.js → popover-Devce-tT.js} +3 -3
- package/dist/_chunks/practice-results-JQunxBIg.js +1618 -0
- package/dist/_chunks/{privacy-lock-C6Ra5m3p.js → privacy-lock-DD-wHxBg.js} +3 -3
- package/dist/_chunks/{progress-B-PSO5OS.js → progress-kzIRcdaq.js} +11 -10
- package/dist/_chunks/pt-D7qO5CzD.js +370 -0
- package/dist/_chunks/{public-footer.agent-Bc99tE5Z.js → public-footer.agent-Bh0rnx4i.js} +21 -14
- package/dist/_chunks/{public-header.agent-B-B0WDAi.js → public-header.agent-B2dDg2_d.js} +3 -3
- package/dist/_chunks/{radio-i4ogu3cq.js → radio-TWf9Q-mp.js} +2 -2
- package/dist/_chunks/{radio-group-CTlGc36r.js → radio-group-BcF92GEF.js} +4 -4
- package/dist/_chunks/{react-day-picker-D3yzgvDB.js → react-day-picker-DsjfS7uI.js} +662 -615
- package/dist/_chunks/recaptcha-widget-CFYyLSEX.js +221 -0
- package/dist/_chunks/refresh-cw-CC8jSKMr.js +17 -0
- package/dist/_chunks/registry-nPAVE19X.js +21 -0
- package/dist/_chunks/{resizable-COV-cnth.js → resizable-3vzqDlg6.js} +29 -28
- package/dist/_chunks/{reviews-panel-bKEUKSic.js → reviews-panel-yanuBZs-.js} +4 -4
- package/dist/_chunks/{rich-text-editor-J-wAz9eN.js → rich-text-editor-CHmr9Bz8.js} +2 -2
- package/dist/_chunks/ro-CP2-VJ_O.js +361 -0
- package/dist/_chunks/ru-RPn9_Lpq.js +561 -0
- package/dist/_chunks/{scroll-area-DEDU-lp-.js → scroll-area-BWqCkEGz.js} +2 -2
- package/dist/_chunks/{search-bar-BRMW1-WG.js → search-bar-CP6wUJFY.js} +3 -3
- package/dist/_chunks/{search-input-CIA6pPfn.js → search-input-C1C3jQpD.js} +24 -23
- package/dist/_chunks/{select-C92AT_OZ.js → select-hsCaJSX3.js} +3 -3
- package/dist/_chunks/{sheet-D8Yl0nKR.js → sheet-BV-yuLE2.js} +3 -3
- package/dist/_chunks/{sidebar-DkyC6GvS.js → sidebar-BbR8f6oe.js} +3 -3
- package/dist/_chunks/{signature-capture-DjMlFOzS.js → signature-capture-C-fF71xI.js} +213 -205
- package/dist/_chunks/{slider-CfEzeseL.js → slider-BHWzXdjt.js} +3 -3
- package/dist/_chunks/{slot-grid-Q94gVmhn.js → slot-grid-Dz13dH82.js} +4 -4
- package/dist/_chunks/smile-BSYLAHy6.js +17 -0
- package/dist/_chunks/{sparkline-B5Ms55PZ.js → sparkline-DEROcSl0.js} +2 -2
- package/dist/_chunks/sq-AQvefouo.js +355 -0
- package/dist/_chunks/{stepper-progress-jFY8BSf7.js → stepper-progress-DDjq5nei.js} +16 -15
- package/dist/_chunks/streaming-text-GH07yIYh.js +127 -0
- package/dist/_chunks/sv-zkx9eBtD.js +376 -0
- package/dist/_chunks/{switch-D916VW86.js → switch-BJ6HD3Mn.js} +2 -2
- package/dist/_chunks/{tabs-aEQfQV3x.js → tabs-BpPYVme_.js} +4 -4
- package/dist/_chunks/{tag-bBPAvXyh.js → tag-CyoaEmf_.js} +2 -2
- package/dist/_chunks/{task-tray-6NlryfMJ.js → task-tray-DRK0b0Qb.js} +3 -3
- package/dist/_chunks/{text-area-D5GAe8pV.js → text-area-BIx0tZ05.js} +27 -26
- package/dist/_chunks/{text-input-CakysYnD.js → text-input-BaClJL8Y.js} +2 -2
- package/dist/_chunks/{theme-toggle-JoeMs_ws.js → theme-toggle-DpC28kt5.js} +6 -6
- package/dist/_chunks/{time-picker-DeVZkIY2.js → time-picker-B5umYwfv.js} +2 -2
- package/dist/_chunks/{timeline-CR7HjZCK.js → timeline-D0Wo7v_o.js} +3 -3
- package/dist/_chunks/{toast.agent-DVpKt38p.js → toast.agent-WHHfw5VX.js} +322 -320
- package/dist/_chunks/{tooltip-ClJd0ciy.js → tooltip-DvmfrNvB.js} +29 -20
- package/dist/_chunks/{tooth-scheme-3mITSXiZ.js → tooth-scheme-CxlsLjfN.js} +2 -2
- package/dist/_chunks/tr-Dmr412Ac.js +378 -0
- package/dist/_chunks/{transaction-chip-z9ENE50O.js → transaction-chip-B8ujzowA.js} +47 -60
- package/dist/_chunks/{transcript-panel-QUQ9XJmf.js → transcript-panel-DyhTpAP7.js} +21 -20
- package/dist/_chunks/{use-direction-D6rvvG9G.js → use-direction-Dp8h70PP.js} +7 -6
- package/dist/_chunks/use-isomorphic-layout-effect-BGfaCOP1.js +6 -0
- package/dist/_chunks/use-media-query-CcAx5SMM.js +16 -0
- package/dist/_chunks/{use-password-requirements-E0sSfx5X.js → use-password-requirements-DsgduV1x.js} +3 -3
- package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +43 -0
- package/dist/_chunks/{workflow-map-DlWBJJBt.js → workflow-map-BSvQS3be.js} +6 -6
- package/dist/_chunks/zh-CN-DxVt64Zk.js +388 -0
- package/dist/agent/registry.d.ts +1 -6
- package/dist/agent-catalog.json +42 -1
- package/dist/components/_shared/date-locale.d.ts +7 -2
- package/dist/components/_shared/index.d.ts +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/audio-visualiser/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +6 -6
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +10 -0
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.d.ts +4 -0
- package/dist/components/practice-results/index.js +6 -0
- package/dist/components/practice-results/practice-results.agent.d.ts +4 -0
- package/dist/components/practice-results/practice-results.d.ts +159 -0
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/resizable/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/stepper-progress/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.js +69 -66
- package/dist/i18n/locales/ar.d.ts +92 -0
- package/dist/i18n/locales/ar.js +82 -0
- package/dist/i18n/locales/de.d.ts +92 -0
- package/dist/i18n/locales/de.js +81 -0
- package/dist/i18n/locales/el.d.ts +92 -0
- package/dist/i18n/locales/el.js +82 -0
- package/dist/i18n/locales/en.d.ts +92 -0
- package/dist/i18n/locales/en.js +92 -0
- package/dist/i18n/locales/es.d.ts +92 -0
- package/dist/i18n/locales/es.js +81 -0
- package/dist/i18n/locales/fr.d.ts +92 -0
- package/dist/i18n/locales/fr.js +81 -0
- package/dist/i18n/locales/hi.d.ts +92 -0
- package/dist/i18n/locales/hi.js +82 -0
- package/dist/i18n/locales/it.d.ts +92 -0
- package/dist/i18n/locales/it.js +81 -0
- package/dist/i18n/locales/ja.d.ts +92 -0
- package/dist/i18n/locales/ja.js +82 -0
- package/dist/i18n/locales/nl.d.ts +92 -0
- package/dist/i18n/locales/nl.js +81 -0
- package/dist/i18n/locales/pl.d.ts +92 -0
- package/dist/i18n/locales/pl.js +82 -0
- package/dist/i18n/locales/pt.d.ts +92 -0
- package/dist/i18n/locales/pt.js +83 -0
- package/dist/i18n/locales/ro.d.ts +92 -0
- package/dist/i18n/locales/ro.js +82 -0
- package/dist/i18n/locales/ru.d.ts +92 -0
- package/dist/i18n/locales/ru.js +82 -0
- package/dist/i18n/locales/sq.d.ts +92 -0
- package/dist/i18n/locales/sq.js +82 -0
- package/dist/i18n/locales/sv.d.ts +92 -0
- package/dist/i18n/locales/sv.js +82 -0
- package/dist/i18n/locales/tr.d.ts +92 -0
- package/dist/i18n/locales/tr.js +82 -0
- package/dist/i18n/locales/zh.d.ts +92 -0
- package/dist/i18n/locales/zh.js +82 -0
- package/dist/index.js +532 -528
- package/dist/locales/ar.json +92 -0
- package/dist/locales/de.json +92 -0
- package/dist/locales/el.json +92 -0
- package/dist/locales/en.json +92 -0
- package/dist/locales/es.json +92 -0
- package/dist/locales/fr.json +92 -0
- package/dist/locales/hi.json +92 -0
- package/dist/locales/it.json +92 -0
- package/dist/locales/ja.json +92 -0
- package/dist/locales/nl.json +92 -0
- package/dist/locales/pl.json +92 -0
- package/dist/locales/pt.json +92 -0
- package/dist/locales/ro.json +92 -0
- package/dist/locales/ru.json +92 -0
- package/dist/locales/sq.json +92 -0
- package/dist/locales/sv.json +92 -0
- package/dist/locales/tr.json +92 -0
- package/dist/locales/zh.json +92 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -2
- package/dist/_chunks/audio-visualiser-I-T4Z7EU.js +0 -145
- package/dist/_chunks/recaptcha-widget-BtBNb6tB.js +0 -192
- package/dist/_chunks/registry-C9nwlNyL.js +0 -21
- package/dist/_chunks/streaming-text-BgjCTVOw.js +0 -105
- package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +0 -55
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import s, { useState as Ot, useRef as
|
|
3
|
-
import
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { I as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
function
|
|
1
|
+
import { jsx as H, jsxs as Ht } from "react/jsx-runtime";
|
|
2
|
+
import s, { useState as Ot, useRef as Zt, useEffect as jt } from "react";
|
|
3
|
+
import te from "react-dom";
|
|
4
|
+
import { useTranslation as ee } from "react-i18next";
|
|
5
|
+
import { I as ae } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { C as se } from "./circle-x-Du2CmjaU.js";
|
|
7
|
+
import { T as oe } from "./triangle-alert-CBPUIzQo.js";
|
|
8
|
+
import { C as ne } from "./circle-check-9AeSgJD_.js";
|
|
9
|
+
import { I as re } from "./info-B9XNKn05.js";
|
|
10
|
+
import { X as ie } from "./x-CCcI3eJp.js";
|
|
11
|
+
function le(o) {
|
|
12
12
|
if (typeof document > "u") return;
|
|
13
13
|
let a = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
|
|
14
14
|
e.type = "text/css", a.appendChild(e), e.styleSheet ? e.styleSheet.cssText = o : e.appendChild(document.createTextNode(o));
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const de = (o) => {
|
|
17
17
|
switch (o) {
|
|
18
18
|
case "success":
|
|
19
|
-
return
|
|
19
|
+
return me;
|
|
20
20
|
case "info":
|
|
21
|
-
return ge;
|
|
22
|
-
case "warning":
|
|
23
21
|
return pe;
|
|
22
|
+
case "warning":
|
|
23
|
+
return fe;
|
|
24
24
|
case "error":
|
|
25
|
-
return
|
|
25
|
+
return ge;
|
|
26
26
|
default:
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, ce = Array(12).fill(0), ue = ({ visible: o, className: a }) => /* @__PURE__ */ s.createElement("div", {
|
|
30
30
|
className: [
|
|
31
31
|
"sonner-loading-wrapper",
|
|
32
32
|
a
|
|
@@ -34,10 +34,10 @@ const ce = (o) => {
|
|
|
34
34
|
"data-visible": o
|
|
35
35
|
}, /* @__PURE__ */ s.createElement("div", {
|
|
36
36
|
className: "sonner-spinner"
|
|
37
|
-
},
|
|
37
|
+
}, ce.map((e, n) => /* @__PURE__ */ s.createElement("div", {
|
|
38
38
|
className: "sonner-loading-bar",
|
|
39
39
|
key: `spinner-bar-${n}`
|
|
40
|
-
})))),
|
|
40
|
+
})))), me = /* @__PURE__ */ s.createElement("svg", {
|
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
42
|
viewBox: "0 0 20 20",
|
|
43
43
|
fill: "currentColor",
|
|
@@ -47,7 +47,7 @@ const ce = (o) => {
|
|
|
47
47
|
fillRule: "evenodd",
|
|
48
48
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
49
49
|
clipRule: "evenodd"
|
|
50
|
-
})),
|
|
50
|
+
})), fe = /* @__PURE__ */ s.createElement("svg", {
|
|
51
51
|
xmlns: "http://www.w3.org/2000/svg",
|
|
52
52
|
viewBox: "0 0 24 24",
|
|
53
53
|
fill: "currentColor",
|
|
@@ -57,7 +57,7 @@ const ce = (o) => {
|
|
|
57
57
|
fillRule: "evenodd",
|
|
58
58
|
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
59
59
|
clipRule: "evenodd"
|
|
60
|
-
})),
|
|
60
|
+
})), pe = /* @__PURE__ */ s.createElement("svg", {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
viewBox: "0 0 20 20",
|
|
63
63
|
fill: "currentColor",
|
|
@@ -67,7 +67,7 @@ const ce = (o) => {
|
|
|
67
67
|
fillRule: "evenodd",
|
|
68
68
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
69
69
|
clipRule: "evenodd"
|
|
70
|
-
})),
|
|
70
|
+
})), ge = /* @__PURE__ */ s.createElement("svg", {
|
|
71
71
|
xmlns: "http://www.w3.org/2000/svg",
|
|
72
72
|
viewBox: "0 0 20 20",
|
|
73
73
|
fill: "currentColor",
|
|
@@ -77,7 +77,7 @@ const ce = (o) => {
|
|
|
77
77
|
fillRule: "evenodd",
|
|
78
78
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
79
79
|
clipRule: "evenodd"
|
|
80
|
-
})),
|
|
80
|
+
})), he = /* @__PURE__ */ s.createElement("svg", {
|
|
81
81
|
xmlns: "http://www.w3.org/2000/svg",
|
|
82
82
|
width: "12",
|
|
83
83
|
height: "12",
|
|
@@ -97,7 +97,7 @@ const ce = (o) => {
|
|
|
97
97
|
y1: "6",
|
|
98
98
|
x2: "18",
|
|
99
99
|
y2: "18"
|
|
100
|
-
})),
|
|
100
|
+
})), be = () => {
|
|
101
101
|
const [o, a] = s.useState(document.hidden);
|
|
102
102
|
return s.useEffect(() => {
|
|
103
103
|
const e = () => {
|
|
@@ -107,7 +107,7 @@ const ce = (o) => {
|
|
|
107
107
|
}, []), o;
|
|
108
108
|
};
|
|
109
109
|
let St = 1;
|
|
110
|
-
class
|
|
110
|
+
class ve {
|
|
111
111
|
constructor() {
|
|
112
112
|
this.subscribe = (a) => (this.subscribers.push(a), () => {
|
|
113
113
|
const e = this.subscribers.indexOf(a);
|
|
@@ -121,24 +121,24 @@ class ye {
|
|
|
121
121
|
];
|
|
122
122
|
}, this.create = (a) => {
|
|
123
123
|
var e;
|
|
124
|
-
const { message: n, ...
|
|
125
|
-
return this.dismissedToasts.has(
|
|
126
|
-
...
|
|
124
|
+
const { message: n, ...v } = a, l = typeof (a == null ? void 0 : a.id) == "number" || ((e = a.id) == null ? void 0 : e.length) > 0 ? a.id : St++, u = this.toasts.find((b) => b.id === l), h = a.dismissible === void 0 ? !0 : a.dismissible;
|
|
125
|
+
return this.dismissedToasts.has(l) && this.dismissedToasts.delete(l), u ? this.toasts = this.toasts.map((b) => b.id === l ? (this.publish({
|
|
126
|
+
...b,
|
|
127
127
|
...a,
|
|
128
|
-
id:
|
|
128
|
+
id: l,
|
|
129
129
|
title: n
|
|
130
130
|
}), {
|
|
131
|
-
...
|
|
131
|
+
...b,
|
|
132
132
|
...a,
|
|
133
|
-
id:
|
|
134
|
-
dismissible:
|
|
133
|
+
id: l,
|
|
134
|
+
dismissible: h,
|
|
135
135
|
title: n
|
|
136
|
-
}) :
|
|
136
|
+
}) : b) : this.addToast({
|
|
137
137
|
title: n,
|
|
138
|
-
...
|
|
139
|
-
dismissible:
|
|
140
|
-
id:
|
|
141
|
-
}),
|
|
138
|
+
...v,
|
|
139
|
+
dismissible: h,
|
|
140
|
+
id: l
|
|
141
|
+
}), l;
|
|
142
142
|
}, this.dismiss = (a) => (a ? (this.dismissedToasts.add(a), requestAnimationFrame(() => this.subscribers.forEach((e) => e({
|
|
143
143
|
id: a,
|
|
144
144
|
dismiss: !0
|
|
@@ -181,75 +181,75 @@ class ye {
|
|
|
181
181
|
message: e.loading,
|
|
182
182
|
description: typeof e.description != "function" ? e.description : void 0
|
|
183
183
|
}));
|
|
184
|
-
const
|
|
185
|
-
let
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
184
|
+
const v = Promise.resolve(a instanceof Function ? a() : a);
|
|
185
|
+
let l = n !== void 0, u;
|
|
186
|
+
const h = v.then(async (r) => {
|
|
187
|
+
if (u = [
|
|
188
188
|
"resolve",
|
|
189
|
-
|
|
190
|
-
], s.isValidElement(
|
|
191
|
-
|
|
189
|
+
r
|
|
190
|
+
], s.isValidElement(r))
|
|
191
|
+
l = !1, this.create({
|
|
192
192
|
id: n,
|
|
193
193
|
type: "default",
|
|
194
|
-
message:
|
|
194
|
+
message: r
|
|
195
195
|
});
|
|
196
|
-
else if (
|
|
197
|
-
|
|
198
|
-
const t = typeof e.error == "function" ? await e.error(`HTTP error! status: ${
|
|
196
|
+
else if (xe(r) && !r.ok) {
|
|
197
|
+
l = !1;
|
|
198
|
+
const t = typeof e.error == "function" ? await e.error(`HTTP error! status: ${r.status}`) : e.error, T = typeof e.description == "function" ? await e.description(`HTTP error! status: ${r.status}`) : e.description, k = typeof t == "object" && !s.isValidElement(t) ? t : {
|
|
199
199
|
message: t
|
|
200
200
|
};
|
|
201
201
|
this.create({
|
|
202
202
|
id: n,
|
|
203
203
|
type: "error",
|
|
204
|
-
description:
|
|
205
|
-
...
|
|
204
|
+
description: T,
|
|
205
|
+
...k
|
|
206
206
|
});
|
|
207
|
-
} else if (
|
|
208
|
-
|
|
209
|
-
const t = typeof e.error == "function" ? await e.error(
|
|
207
|
+
} else if (r instanceof Error) {
|
|
208
|
+
l = !1;
|
|
209
|
+
const t = typeof e.error == "function" ? await e.error(r) : e.error, T = typeof e.description == "function" ? await e.description(r) : e.description, k = typeof t == "object" && !s.isValidElement(t) ? t : {
|
|
210
210
|
message: t
|
|
211
211
|
};
|
|
212
212
|
this.create({
|
|
213
213
|
id: n,
|
|
214
214
|
type: "error",
|
|
215
|
-
description:
|
|
216
|
-
...
|
|
215
|
+
description: T,
|
|
216
|
+
...k
|
|
217
217
|
});
|
|
218
218
|
} else if (e.success !== void 0) {
|
|
219
|
-
|
|
220
|
-
const t = typeof e.success == "function" ? await e.success(
|
|
219
|
+
l = !1;
|
|
220
|
+
const t = typeof e.success == "function" ? await e.success(r) : e.success, T = typeof e.description == "function" ? await e.description(r) : e.description, k = typeof t == "object" && !s.isValidElement(t) ? t : {
|
|
221
221
|
message: t
|
|
222
222
|
};
|
|
223
223
|
this.create({
|
|
224
224
|
id: n,
|
|
225
225
|
type: "success",
|
|
226
|
-
description:
|
|
227
|
-
...
|
|
226
|
+
description: T,
|
|
227
|
+
...k
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
}).catch(async (
|
|
231
|
-
if (
|
|
230
|
+
}).catch(async (r) => {
|
|
231
|
+
if (u = [
|
|
232
232
|
"reject",
|
|
233
|
-
|
|
233
|
+
r
|
|
234
234
|
], e.error !== void 0) {
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
message:
|
|
235
|
+
l = !1;
|
|
236
|
+
const N = typeof e.error == "function" ? await e.error(r) : e.error, t = typeof e.description == "function" ? await e.description(r) : e.description, O = typeof N == "object" && !s.isValidElement(N) ? N : {
|
|
237
|
+
message: N
|
|
238
238
|
};
|
|
239
239
|
this.create({
|
|
240
240
|
id: n,
|
|
241
241
|
type: "error",
|
|
242
242
|
description: t,
|
|
243
|
-
...
|
|
243
|
+
...O
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
}).finally(() => {
|
|
247
|
-
|
|
248
|
-
}),
|
|
247
|
+
l && (this.dismiss(n), n = void 0), e.finally == null || e.finally.call(e);
|
|
248
|
+
}), b = () => new Promise((r, N) => h.then(() => u[0] === "reject" ? N(u[1]) : r(u[1])).catch(N));
|
|
249
249
|
return typeof n != "string" && typeof n != "number" ? {
|
|
250
|
-
unwrap:
|
|
250
|
+
unwrap: b
|
|
251
251
|
} : Object.assign(n, {
|
|
252
|
-
unwrap:
|
|
252
|
+
unwrap: b
|
|
253
253
|
});
|
|
254
254
|
}, this.custom = (a, e) => {
|
|
255
255
|
const n = (e == null ? void 0 : e.id) || St++;
|
|
@@ -261,14 +261,14 @@ class ye {
|
|
|
261
261
|
}, this.getActiveToasts = () => this.toasts.filter((a) => !this.dismissedToasts.has(a.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
const S = new
|
|
264
|
+
const S = new ve(), ye = (o, a) => {
|
|
265
265
|
const e = (a == null ? void 0 : a.id) || St++;
|
|
266
266
|
return S.addToast({
|
|
267
267
|
title: o,
|
|
268
268
|
...a,
|
|
269
269
|
id: e
|
|
270
270
|
}), e;
|
|
271
|
-
},
|
|
271
|
+
}, xe = (o) => o && typeof o == "object" && "ok" in o && typeof o.ok == "boolean" && "status" in o && typeof o.status == "number", we = ye, Ee = () => S.toasts, Te = () => S.getActiveToasts(), Y = Object.assign(we, {
|
|
272
272
|
success: S.success,
|
|
273
273
|
info: S.info,
|
|
274
274
|
warning: S.warning,
|
|
@@ -279,120 +279,120 @@ const S = new ye(), xe = (o, a) => {
|
|
|
279
279
|
dismiss: S.dismiss,
|
|
280
280
|
loading: S.loading
|
|
281
281
|
}, {
|
|
282
|
-
getHistory:
|
|
283
|
-
getToasts:
|
|
282
|
+
getHistory: Ee,
|
|
283
|
+
getToasts: Te
|
|
284
284
|
});
|
|
285
|
-
de("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--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-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");
|
|
285
|
+
le("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--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-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");
|
|
286
286
|
function ht(o) {
|
|
287
287
|
return o.label !== void 0;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const ke = 3, Ne = "24px", Se = "16px", Pt = 4e3, De = 356, _e = 14, Re = 45, Ce = 200;
|
|
290
290
|
function z(...o) {
|
|
291
291
|
return o.filter(Boolean).join(" ");
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Ie(o) {
|
|
294
294
|
const [a, e] = o.split("-"), n = [];
|
|
295
295
|
return a && n.push(a), e && n.push(e), n;
|
|
296
296
|
}
|
|
297
297
|
const Be = (o) => {
|
|
298
|
-
var a, e, n,
|
|
299
|
-
const { invert:
|
|
298
|
+
var a, e, n, v, l, u, h, b, r;
|
|
299
|
+
const { invert: N, toast: t, unstyled: T, interacting: O, setHeights: k, visibleToasts: vt, heights: W, index: c, toasts: rt, expanded: K, removeToast: it, defaultRichColors: yt, closeButton: j, style: at, cancelButtonStyle: F, actionButtonStyle: xt, className: lt = "", descriptionClassName: wt = "", duration: st, position: A, gap: dt, expandByDefault: ot, classNames: m, icons: x, closeButtonAriaLabel: L = "Close toast" } = o, [V, I] = s.useState(null), [U, ct] = s.useState(null), [d, g] = s.useState(!1), [p, R] = s.useState(!1), [q, f] = s.useState(!1), [G, ut] = s.useState(!1), [mt, Q] = s.useState(!1), [$t, Et] = s.useState(0), [Yt, Dt] = s.useState(0), nt = s.useRef(t.duration || st || Pt), _t = s.useRef(null), P = s.useRef(null), Ft = c === 0, Vt = c + 1 <= vt, D = t.type, J = t.dismissible !== !1, Ut = t.className || "", Xt = t.descriptionClassName || "", ft = s.useMemo(() => W.findIndex((i) => i.toastId === t.id) || 0, [
|
|
300
300
|
W,
|
|
301
301
|
t.id
|
|
302
|
-
]),
|
|
303
|
-
var
|
|
304
|
-
return (
|
|
302
|
+
]), Wt = s.useMemo(() => {
|
|
303
|
+
var i;
|
|
304
|
+
return (i = t.closeButton) != null ? i : j;
|
|
305
305
|
}, [
|
|
306
306
|
t.closeButton,
|
|
307
|
-
|
|
308
|
-
]),
|
|
307
|
+
j
|
|
308
|
+
]), Rt = s.useMemo(() => t.duration || st || Pt, [
|
|
309
309
|
t.duration,
|
|
310
310
|
st
|
|
311
|
-
]), Tt = s.useRef(0), Z = s.useRef(0),
|
|
311
|
+
]), Tt = s.useRef(0), Z = s.useRef(0), Ct = s.useRef(0), tt = s.useRef(null), [Kt, qt] = A.split("-"), It = s.useMemo(() => W.reduce((i, y, E) => E >= ft ? i : i + y.height, 0), [
|
|
312
312
|
W,
|
|
313
313
|
ft
|
|
314
|
-
]),
|
|
314
|
+
]), Bt = be(), Gt = t.invert || N, kt = D === "loading";
|
|
315
315
|
Z.current = s.useMemo(() => ft * dt + It, [
|
|
316
316
|
ft,
|
|
317
317
|
It
|
|
318
318
|
]), s.useEffect(() => {
|
|
319
|
-
nt.current =
|
|
319
|
+
nt.current = Rt;
|
|
320
320
|
}, [
|
|
321
|
-
|
|
321
|
+
Rt
|
|
322
322
|
]), s.useEffect(() => {
|
|
323
|
-
|
|
323
|
+
g(!0);
|
|
324
324
|
}, []), s.useEffect(() => {
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
327
|
-
const
|
|
328
|
-
return Dt(
|
|
325
|
+
const i = P.current;
|
|
326
|
+
if (i) {
|
|
327
|
+
const y = i.getBoundingClientRect().height;
|
|
328
|
+
return Dt(y), k((E) => [
|
|
329
329
|
{
|
|
330
330
|
toastId: t.id,
|
|
331
|
-
height:
|
|
331
|
+
height: y,
|
|
332
332
|
position: t.position
|
|
333
333
|
},
|
|
334
|
-
...
|
|
335
|
-
]), () =>
|
|
334
|
+
...E
|
|
335
|
+
]), () => k((E) => E.filter((_) => _.toastId !== t.id));
|
|
336
336
|
}
|
|
337
337
|
}, [
|
|
338
|
-
|
|
338
|
+
k,
|
|
339
339
|
t.id
|
|
340
340
|
]), s.useLayoutEffect(() => {
|
|
341
|
-
if (!
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
...
|
|
347
|
-
height:
|
|
348
|
-
} :
|
|
341
|
+
if (!d) return;
|
|
342
|
+
const i = P.current, y = i.style.height;
|
|
343
|
+
i.style.height = "auto";
|
|
344
|
+
const E = i.getBoundingClientRect().height;
|
|
345
|
+
i.style.height = y, Dt(E), k((_) => _.find((w) => w.toastId === t.id) ? _.map((w) => w.toastId === t.id ? {
|
|
346
|
+
...w,
|
|
347
|
+
height: E
|
|
348
|
+
} : w) : [
|
|
349
349
|
{
|
|
350
350
|
toastId: t.id,
|
|
351
|
-
height:
|
|
351
|
+
height: E,
|
|
352
352
|
position: t.position
|
|
353
353
|
},
|
|
354
354
|
..._
|
|
355
355
|
]);
|
|
356
356
|
}, [
|
|
357
|
-
|
|
357
|
+
d,
|
|
358
358
|
t.title,
|
|
359
359
|
t.description,
|
|
360
|
-
|
|
360
|
+
k,
|
|
361
361
|
t.id,
|
|
362
362
|
t.jsx,
|
|
363
363
|
t.action,
|
|
364
364
|
t.cancel
|
|
365
365
|
]);
|
|
366
366
|
const $ = s.useCallback(() => {
|
|
367
|
-
|
|
367
|
+
R(!0), Et(Z.current), k((i) => i.filter((y) => y.toastId !== t.id)), setTimeout(() => {
|
|
368
368
|
it(t);
|
|
369
|
-
},
|
|
369
|
+
}, Ce);
|
|
370
370
|
}, [
|
|
371
371
|
t,
|
|
372
372
|
it,
|
|
373
|
-
|
|
373
|
+
k,
|
|
374
374
|
Z
|
|
375
375
|
]);
|
|
376
376
|
s.useEffect(() => {
|
|
377
377
|
if (t.promise && D === "loading" || t.duration === 1 / 0 || t.type === "loading") return;
|
|
378
|
-
let
|
|
379
|
-
return K ||
|
|
380
|
-
if (
|
|
378
|
+
let i;
|
|
379
|
+
return K || O || Bt ? (() => {
|
|
380
|
+
if (Ct.current < Tt.current) {
|
|
381
381
|
const _ = (/* @__PURE__ */ new Date()).getTime() - Tt.current;
|
|
382
382
|
nt.current = nt.current - _;
|
|
383
383
|
}
|
|
384
|
-
|
|
384
|
+
Ct.current = (/* @__PURE__ */ new Date()).getTime();
|
|
385
385
|
})() : (() => {
|
|
386
|
-
nt.current !== 1 / 0 && (Tt.current = (/* @__PURE__ */ new Date()).getTime(),
|
|
386
|
+
nt.current !== 1 / 0 && (Tt.current = (/* @__PURE__ */ new Date()).getTime(), i = setTimeout(() => {
|
|
387
387
|
t.onAutoClose == null || t.onAutoClose.call(t, t), $();
|
|
388
388
|
}, nt.current));
|
|
389
|
-
})(), () => clearTimeout(
|
|
389
|
+
})(), () => clearTimeout(i);
|
|
390
390
|
}, [
|
|
391
391
|
K,
|
|
392
|
-
|
|
392
|
+
O,
|
|
393
393
|
t,
|
|
394
394
|
D,
|
|
395
|
-
|
|
395
|
+
Bt,
|
|
396
396
|
$
|
|
397
397
|
]), s.useEffect(() => {
|
|
398
398
|
t.delete && ($(), t.onDismiss == null || t.onDismiss.call(t, t));
|
|
@@ -400,108 +400,108 @@ const Be = (o) => {
|
|
|
400
400
|
$,
|
|
401
401
|
t.delete
|
|
402
402
|
]);
|
|
403
|
-
function
|
|
404
|
-
var
|
|
405
|
-
if (
|
|
406
|
-
var
|
|
403
|
+
function Qt() {
|
|
404
|
+
var i;
|
|
405
|
+
if (x != null && x.loading) {
|
|
406
|
+
var y;
|
|
407
407
|
return /* @__PURE__ */ s.createElement("div", {
|
|
408
|
-
className: z(m == null ? void 0 : m.loader, t == null || (
|
|
408
|
+
className: z(m == null ? void 0 : m.loader, t == null || (y = t.classNames) == null ? void 0 : y.loader, "sonner-loader"),
|
|
409
409
|
"data-visible": D === "loading"
|
|
410
|
-
},
|
|
410
|
+
}, x.loading);
|
|
411
411
|
}
|
|
412
|
-
return /* @__PURE__ */ s.createElement(
|
|
413
|
-
className: z(m == null ? void 0 : m.loader, t == null || (
|
|
412
|
+
return /* @__PURE__ */ s.createElement(ue, {
|
|
413
|
+
className: z(m == null ? void 0 : m.loader, t == null || (i = t.classNames) == null ? void 0 : i.loader),
|
|
414
414
|
visible: D === "loading"
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
|
-
const
|
|
418
|
-
var
|
|
417
|
+
const Jt = t.icon || (x == null ? void 0 : x[D]) || de(D);
|
|
418
|
+
var Mt, At;
|
|
419
419
|
return /* @__PURE__ */ s.createElement("li", {
|
|
420
420
|
tabIndex: 0,
|
|
421
|
-
ref:
|
|
422
|
-
className: z(lt,
|
|
421
|
+
ref: P,
|
|
422
|
+
className: z(lt, Ut, m == null ? void 0 : m.toast, t == null || (a = t.classNames) == null ? void 0 : a.toast, m == null ? void 0 : m.default, m == null ? void 0 : m[D], t == null || (e = t.classNames) == null ? void 0 : e[D]),
|
|
423
423
|
"data-sonner-toast": "",
|
|
424
|
-
"data-rich-colors": (
|
|
425
|
-
"data-styled": !(t.jsx || t.unstyled ||
|
|
426
|
-
"data-mounted":
|
|
424
|
+
"data-rich-colors": (Mt = t.richColors) != null ? Mt : yt,
|
|
425
|
+
"data-styled": !(t.jsx || t.unstyled || T),
|
|
426
|
+
"data-mounted": d,
|
|
427
427
|
"data-promise": !!t.promise,
|
|
428
428
|
"data-swiped": mt,
|
|
429
429
|
"data-removed": p,
|
|
430
|
-
"data-visible":
|
|
431
|
-
"data-y-position":
|
|
432
|
-
"data-x-position":
|
|
433
|
-
"data-index":
|
|
434
|
-
"data-front":
|
|
430
|
+
"data-visible": Vt,
|
|
431
|
+
"data-y-position": Kt,
|
|
432
|
+
"data-x-position": qt,
|
|
433
|
+
"data-index": c,
|
|
434
|
+
"data-front": Ft,
|
|
435
435
|
"data-swiping": q,
|
|
436
436
|
"data-dismissible": J,
|
|
437
437
|
"data-type": D,
|
|
438
|
-
"data-invert":
|
|
438
|
+
"data-invert": Gt,
|
|
439
439
|
"data-swipe-out": G,
|
|
440
440
|
"data-swipe-direction": U,
|
|
441
|
-
"data-expanded": !!(K || ot &&
|
|
441
|
+
"data-expanded": !!(K || ot && d),
|
|
442
442
|
"data-testid": t.testId,
|
|
443
443
|
style: {
|
|
444
|
-
"--index":
|
|
445
|
-
"--toasts-before":
|
|
446
|
-
"--z-index": rt.length -
|
|
447
|
-
"--offset": `${p ?
|
|
448
|
-
"--initial-height": ot ? "auto" : `${
|
|
444
|
+
"--index": c,
|
|
445
|
+
"--toasts-before": c,
|
|
446
|
+
"--z-index": rt.length - c,
|
|
447
|
+
"--offset": `${p ? $t : Z.current}px`,
|
|
448
|
+
"--initial-height": ot ? "auto" : `${Yt}px`,
|
|
449
449
|
...at,
|
|
450
450
|
...t.style
|
|
451
451
|
},
|
|
452
452
|
onDragEnd: () => {
|
|
453
453
|
f(!1), I(null), tt.current = null;
|
|
454
454
|
},
|
|
455
|
-
onPointerDown: (
|
|
456
|
-
|
|
457
|
-
x:
|
|
458
|
-
y:
|
|
455
|
+
onPointerDown: (i) => {
|
|
456
|
+
i.button !== 2 && (kt || !J || (_t.current = /* @__PURE__ */ new Date(), Et(Z.current), i.target.setPointerCapture(i.pointerId), i.target.tagName !== "BUTTON" && (f(!0), tt.current = {
|
|
457
|
+
x: i.clientX,
|
|
458
|
+
y: i.clientY
|
|
459
459
|
})));
|
|
460
460
|
},
|
|
461
461
|
onPointerUp: () => {
|
|
462
|
-
var
|
|
462
|
+
var i, y, E;
|
|
463
463
|
if (G || !J) return;
|
|
464
464
|
tt.current = null;
|
|
465
|
-
const _ = Number(((
|
|
466
|
-
if (Math.abs(
|
|
465
|
+
const _ = Number(((i = P.current) == null ? void 0 : i.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), pt = Number(((y = P.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), w = (/* @__PURE__ */ new Date()).getTime() - ((E = _t.current) == null ? void 0 : E.getTime()), C = V === "x" ? _ : pt, gt = Math.abs(C) / w;
|
|
466
|
+
if (Math.abs(C) >= Re || gt > 0.11) {
|
|
467
467
|
Et(Z.current), t.onDismiss == null || t.onDismiss.call(t, t), ct(V === "x" ? _ > 0 ? "right" : "left" : pt > 0 ? "down" : "up"), $(), ut(!0);
|
|
468
468
|
return;
|
|
469
469
|
} else {
|
|
470
|
-
var
|
|
471
|
-
(
|
|
470
|
+
var B, M;
|
|
471
|
+
(B = P.current) == null || B.style.setProperty("--swipe-amount-x", "0px"), (M = P.current) == null || M.style.setProperty("--swipe-amount-y", "0px");
|
|
472
472
|
}
|
|
473
473
|
Q(!1), f(!1), I(null);
|
|
474
474
|
},
|
|
475
|
-
onPointerMove: (
|
|
476
|
-
var
|
|
477
|
-
if (!tt.current || !J || ((
|
|
478
|
-
const
|
|
475
|
+
onPointerMove: (i) => {
|
|
476
|
+
var y, E, _;
|
|
477
|
+
if (!tt.current || !J || ((y = window.getSelection()) == null ? void 0 : y.toString().length) > 0) return;
|
|
478
|
+
const w = i.clientY - tt.current.y, C = i.clientX - tt.current.x;
|
|
479
479
|
var gt;
|
|
480
|
-
const
|
|
481
|
-
!V && (Math.abs(
|
|
482
|
-
let
|
|
480
|
+
const B = (gt = o.swipeDirections) != null ? gt : Ie(A);
|
|
481
|
+
!V && (Math.abs(C) > 1 || Math.abs(w) > 1) && I(Math.abs(C) > Math.abs(w) ? "x" : "y");
|
|
482
|
+
let M = {
|
|
483
483
|
x: 0,
|
|
484
484
|
y: 0
|
|
485
485
|
};
|
|
486
486
|
const zt = (X) => 1 / (1.5 + Math.abs(X) / 20);
|
|
487
487
|
if (V === "y") {
|
|
488
|
-
if (
|
|
489
|
-
if (
|
|
490
|
-
|
|
488
|
+
if (B.includes("top") || B.includes("bottom"))
|
|
489
|
+
if (B.includes("top") && w < 0 || B.includes("bottom") && w > 0)
|
|
490
|
+
M.y = w;
|
|
491
491
|
else {
|
|
492
|
-
const X =
|
|
493
|
-
|
|
492
|
+
const X = w * zt(w);
|
|
493
|
+
M.y = Math.abs(X) < Math.abs(w) ? X : w;
|
|
494
494
|
}
|
|
495
|
-
} else if (V === "x" && (
|
|
496
|
-
if (
|
|
497
|
-
|
|
495
|
+
} else if (V === "x" && (B.includes("left") || B.includes("right")))
|
|
496
|
+
if (B.includes("left") && C < 0 || B.includes("right") && C > 0)
|
|
497
|
+
M.x = C;
|
|
498
498
|
else {
|
|
499
|
-
const X =
|
|
500
|
-
|
|
499
|
+
const X = C * zt(C);
|
|
500
|
+
M.x = Math.abs(X) < Math.abs(C) ? X : C;
|
|
501
501
|
}
|
|
502
|
-
(Math.abs(
|
|
502
|
+
(Math.abs(M.x) > 0 || Math.abs(M.y) > 0) && Q(!0), (E = P.current) == null || E.style.setProperty("--swipe-amount-x", `${M.x}px`), (_ = P.current) == null || _.style.setProperty("--swipe-amount-y", `${M.y}px`);
|
|
503
503
|
}
|
|
504
|
-
},
|
|
504
|
+
}, Wt && !t.jsx && D !== "loading" ? /* @__PURE__ */ s.createElement("button", {
|
|
505
505
|
"aria-label": L,
|
|
506
506
|
"data-disabled": kt,
|
|
507
507
|
"data-close-button": !0,
|
|
@@ -510,34 +510,34 @@ const Be = (o) => {
|
|
|
510
510
|
$(), t.onDismiss == null || t.onDismiss.call(t, t);
|
|
511
511
|
},
|
|
512
512
|
className: z(m == null ? void 0 : m.closeButton, t == null || (n = t.classNames) == null ? void 0 : n.closeButton)
|
|
513
|
-
}, (At =
|
|
513
|
+
}, (At = x == null ? void 0 : x.close) != null ? At : he) : null, (D || t.icon || t.promise) && t.icon !== null && ((x == null ? void 0 : x[D]) !== null || t.icon) ? /* @__PURE__ */ s.createElement("div", {
|
|
514
514
|
"data-icon": "",
|
|
515
|
-
className: z(m == null ? void 0 : m.icon, t == null || (
|
|
516
|
-
}, t.promise || t.type === "loading" && !t.icon ? t.icon ||
|
|
515
|
+
className: z(m == null ? void 0 : m.icon, t == null || (v = t.classNames) == null ? void 0 : v.icon)
|
|
516
|
+
}, t.promise || t.type === "loading" && !t.icon ? t.icon || Qt() : null, t.type !== "loading" ? Jt : null) : null, /* @__PURE__ */ s.createElement("div", {
|
|
517
517
|
"data-content": "",
|
|
518
|
-
className: z(m == null ? void 0 : m.content, t == null || (
|
|
518
|
+
className: z(m == null ? void 0 : m.content, t == null || (l = t.classNames) == null ? void 0 : l.content)
|
|
519
519
|
}, /* @__PURE__ */ s.createElement("div", {
|
|
520
520
|
"data-title": "",
|
|
521
|
-
className: z(m == null ? void 0 : m.title, t == null || (
|
|
521
|
+
className: z(m == null ? void 0 : m.title, t == null || (u = t.classNames) == null ? void 0 : u.title)
|
|
522
522
|
}, t.jsx ? t.jsx : typeof t.title == "function" ? t.title() : t.title), t.description ? /* @__PURE__ */ s.createElement("div", {
|
|
523
523
|
"data-description": "",
|
|
524
|
-
className: z(wt,
|
|
524
|
+
className: z(wt, Xt, m == null ? void 0 : m.description, t == null || (h = t.classNames) == null ? void 0 : h.description)
|
|
525
525
|
}, typeof t.description == "function" ? t.description() : t.description) : null), /* @__PURE__ */ s.isValidElement(t.cancel) ? t.cancel : t.cancel && ht(t.cancel) ? /* @__PURE__ */ s.createElement("button", {
|
|
526
526
|
"data-button": !0,
|
|
527
527
|
"data-cancel": !0,
|
|
528
528
|
style: t.cancelButtonStyle || F,
|
|
529
|
-
onClick: (
|
|
530
|
-
ht(t.cancel) && J && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel,
|
|
529
|
+
onClick: (i) => {
|
|
530
|
+
ht(t.cancel) && J && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel, i), $());
|
|
531
531
|
},
|
|
532
|
-
className: z(m == null ? void 0 : m.cancelButton, t == null || (
|
|
532
|
+
className: z(m == null ? void 0 : m.cancelButton, t == null || (b = t.classNames) == null ? void 0 : b.cancelButton)
|
|
533
533
|
}, t.cancel.label) : null, /* @__PURE__ */ s.isValidElement(t.action) ? t.action : t.action && ht(t.action) ? /* @__PURE__ */ s.createElement("button", {
|
|
534
534
|
"data-button": !0,
|
|
535
535
|
"data-action": !0,
|
|
536
536
|
style: t.actionButtonStyle || xt,
|
|
537
|
-
onClick: (
|
|
538
|
-
ht(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action,
|
|
537
|
+
onClick: (i) => {
|
|
538
|
+
ht(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action, i), !i.defaultPrevented && $());
|
|
539
539
|
},
|
|
540
|
-
className: z(m == null ? void 0 : m.actionButton, t == null || (
|
|
540
|
+
className: z(m == null ? void 0 : m.actionButton, t == null || (r = t.classNames) == null ? void 0 : r.actionButton)
|
|
541
541
|
}, t.action.label) : null);
|
|
542
542
|
};
|
|
543
543
|
function Lt() {
|
|
@@ -545,55 +545,55 @@ function Lt() {
|
|
|
545
545
|
const o = document.documentElement.getAttribute("dir");
|
|
546
546
|
return o === "auto" || !o ? window.getComputedStyle(document.documentElement).direction : o;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function Me(o, a) {
|
|
549
549
|
const e = {};
|
|
550
550
|
return [
|
|
551
551
|
o,
|
|
552
552
|
a
|
|
553
|
-
].forEach((n,
|
|
554
|
-
const
|
|
555
|
-
function
|
|
553
|
+
].forEach((n, v) => {
|
|
554
|
+
const l = v === 1, u = l ? "--mobile-offset" : "--offset", h = l ? Se : Ne;
|
|
555
|
+
function b(r) {
|
|
556
556
|
[
|
|
557
557
|
"top",
|
|
558
558
|
"right",
|
|
559
559
|
"bottom",
|
|
560
560
|
"left"
|
|
561
|
-
].forEach((
|
|
562
|
-
e[`${
|
|
561
|
+
].forEach((N) => {
|
|
562
|
+
e[`${u}-${N}`] = typeof r == "number" ? `${r}px` : r;
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
|
-
typeof n == "number" || typeof n == "string" ?
|
|
565
|
+
typeof n == "number" || typeof n == "string" ? b(n) : typeof n == "object" ? [
|
|
566
566
|
"top",
|
|
567
567
|
"right",
|
|
568
568
|
"bottom",
|
|
569
569
|
"left"
|
|
570
|
-
].forEach((
|
|
571
|
-
n[
|
|
572
|
-
}) :
|
|
570
|
+
].forEach((r) => {
|
|
571
|
+
n[r] === void 0 ? e[`${u}-${r}`] = h : e[`${u}-${r}`] = typeof n[r] == "number" ? `${n[r]}px` : n[r];
|
|
572
|
+
}) : b(h);
|
|
573
573
|
}), e;
|
|
574
574
|
}
|
|
575
|
-
const
|
|
576
|
-
const { id: n, invert:
|
|
575
|
+
const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
576
|
+
const { id: n, invert: v, position: l = "bottom-right", hotkey: u = [
|
|
577
577
|
"altKey",
|
|
578
578
|
"KeyT"
|
|
579
|
-
], expand:
|
|
580
|
-
|
|
579
|
+
], expand: h, closeButton: b, className: r, offset: N, mobileOffset: t, theme: T = "light", richColors: O, duration: k, style: vt, visibleToasts: W = ke, toastOptions: c, dir: rt = Lt(), gap: K = _e, icons: it, containerAriaLabel: yt = "Notifications" } = a, [j, at] = s.useState([]), F = s.useMemo(() => n ? j.filter((d) => d.toasterId === n) : j.filter((d) => !d.toasterId), [
|
|
580
|
+
j,
|
|
581
581
|
n
|
|
582
582
|
]), xt = s.useMemo(() => Array.from(new Set([
|
|
583
|
-
|
|
584
|
-
].concat(F.filter((
|
|
583
|
+
l
|
|
584
|
+
].concat(F.filter((d) => d.position).map((d) => d.position)))), [
|
|
585
585
|
F,
|
|
586
|
-
|
|
587
|
-
]), [lt, wt] = s.useState([]), [st, A] = s.useState(!1), [dt, ot] = s.useState(!1), [m,
|
|
588
|
-
at((
|
|
586
|
+
l
|
|
587
|
+
]), [lt, wt] = s.useState([]), [st, A] = s.useState(!1), [dt, ot] = s.useState(!1), [m, x] = s.useState(T !== "system" ? T : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), L = s.useRef(null), V = u.join("+").replace(/Key/g, "").replace(/Digit/g, ""), I = s.useRef(null), U = s.useRef(!1), ct = s.useCallback((d) => {
|
|
588
|
+
at((g) => {
|
|
589
589
|
var p;
|
|
590
|
-
return (p =
|
|
590
|
+
return (p = g.find((R) => R.id === d.id)) != null && p.delete || S.dismiss(d.id), g.filter(({ id: R }) => R !== d.id);
|
|
591
591
|
});
|
|
592
592
|
}, []);
|
|
593
|
-
return s.useEffect(() => S.subscribe((
|
|
594
|
-
if (
|
|
593
|
+
return s.useEffect(() => S.subscribe((d) => {
|
|
594
|
+
if (d.dismiss) {
|
|
595
595
|
requestAnimationFrame(() => {
|
|
596
|
-
at((
|
|
596
|
+
at((g) => g.map((p) => p.id === d.id ? {
|
|
597
597
|
...p,
|
|
598
598
|
delete: !0
|
|
599
599
|
} : p));
|
|
@@ -601,63 +601,63 @@ const ze = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
603
|
setTimeout(() => {
|
|
604
|
-
|
|
605
|
-
at((
|
|
606
|
-
const p =
|
|
604
|
+
te.flushSync(() => {
|
|
605
|
+
at((g) => {
|
|
606
|
+
const p = g.findIndex((R) => R.id === d.id);
|
|
607
607
|
return p !== -1 ? [
|
|
608
|
-
...
|
|
608
|
+
...g.slice(0, p),
|
|
609
609
|
{
|
|
610
|
-
...
|
|
611
|
-
...
|
|
610
|
+
...g[p],
|
|
611
|
+
...d
|
|
612
612
|
},
|
|
613
|
-
...
|
|
613
|
+
...g.slice(p + 1)
|
|
614
614
|
] : [
|
|
615
|
-
|
|
616
|
-
...
|
|
615
|
+
d,
|
|
616
|
+
...g
|
|
617
617
|
];
|
|
618
618
|
});
|
|
619
619
|
});
|
|
620
620
|
});
|
|
621
621
|
}), [
|
|
622
|
-
|
|
622
|
+
j
|
|
623
623
|
]), s.useEffect(() => {
|
|
624
|
-
if (
|
|
625
|
-
|
|
624
|
+
if (T !== "system") {
|
|
625
|
+
x(T);
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
if (
|
|
629
|
-
const
|
|
628
|
+
if (T === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? x("dark") : x("light")), typeof window > "u") return;
|
|
629
|
+
const d = window.matchMedia("(prefers-color-scheme: dark)");
|
|
630
630
|
try {
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
d.addEventListener("change", ({ matches: g }) => {
|
|
632
|
+
x(g ? "dark" : "light");
|
|
633
633
|
});
|
|
634
634
|
} catch {
|
|
635
|
-
|
|
635
|
+
d.addListener(({ matches: p }) => {
|
|
636
636
|
try {
|
|
637
|
-
|
|
638
|
-
} catch (
|
|
639
|
-
console.error(
|
|
637
|
+
x(p ? "dark" : "light");
|
|
638
|
+
} catch (R) {
|
|
639
|
+
console.error(R);
|
|
640
640
|
}
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
643
|
}, [
|
|
644
|
-
|
|
644
|
+
T
|
|
645
645
|
]), s.useEffect(() => {
|
|
646
|
-
|
|
646
|
+
j.length <= 1 && A(!1);
|
|
647
647
|
}, [
|
|
648
|
-
|
|
648
|
+
j
|
|
649
649
|
]), s.useEffect(() => {
|
|
650
|
-
const
|
|
650
|
+
const d = (g) => {
|
|
651
651
|
var p;
|
|
652
|
-
if (
|
|
652
|
+
if (u.every((f) => g[f] || g.code === f)) {
|
|
653
653
|
var q;
|
|
654
654
|
A(!0), (q = L.current) == null || q.focus();
|
|
655
655
|
}
|
|
656
|
-
|
|
656
|
+
g.code === "Escape" && (document.activeElement === L.current || (p = L.current) != null && p.contains(document.activeElement)) && A(!1);
|
|
657
657
|
};
|
|
658
|
-
return document.addEventListener("keydown",
|
|
658
|
+
return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
|
|
659
659
|
}, [
|
|
660
|
-
|
|
660
|
+
u
|
|
661
661
|
]), s.useEffect(() => {
|
|
662
662
|
if (L.current)
|
|
663
663
|
return () => {
|
|
@@ -676,25 +676,25 @@ const ze = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
676
676
|
"aria-relevant": "additions text",
|
|
677
677
|
"aria-atomic": "false",
|
|
678
678
|
suppressHydrationWarning: !0
|
|
679
|
-
}, xt.map((
|
|
679
|
+
}, xt.map((d, g) => {
|
|
680
680
|
var p;
|
|
681
|
-
const [
|
|
681
|
+
const [R, q] = d.split("-");
|
|
682
682
|
return F.length ? /* @__PURE__ */ s.createElement("ol", {
|
|
683
|
-
key:
|
|
683
|
+
key: d,
|
|
684
684
|
dir: rt === "auto" ? Lt() : rt,
|
|
685
685
|
tabIndex: -1,
|
|
686
686
|
ref: L,
|
|
687
|
-
className:
|
|
687
|
+
className: r,
|
|
688
688
|
"data-sonner-toaster": !0,
|
|
689
689
|
"data-sonner-theme": m,
|
|
690
|
-
"data-y-position":
|
|
690
|
+
"data-y-position": R,
|
|
691
691
|
"data-x-position": q,
|
|
692
692
|
style: {
|
|
693
693
|
"--front-toast-height": `${((p = lt[0]) == null ? void 0 : p.height) || 0}px`,
|
|
694
|
-
"--width": `${
|
|
694
|
+
"--width": `${De}px`,
|
|
695
695
|
"--gap": `${K}px`,
|
|
696
696
|
...vt,
|
|
697
|
-
...
|
|
697
|
+
...Me(N, t)
|
|
698
698
|
},
|
|
699
699
|
onBlur: (f) => {
|
|
700
700
|
U.current && !f.currentTarget.contains(f.relatedTarget) && (U.current = !1, I.current && (I.current.focus({
|
|
@@ -714,66 +714,66 @@ const ze = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
714
714
|
f.target instanceof HTMLElement && f.target.dataset.dismissible === "false" || ot(!0);
|
|
715
715
|
},
|
|
716
716
|
onPointerUp: () => ot(!1)
|
|
717
|
-
}, F.filter((f) => !f.position &&
|
|
717
|
+
}, F.filter((f) => !f.position && g === 0 || f.position === d).map((f, G) => {
|
|
718
718
|
var ut, mt;
|
|
719
719
|
return /* @__PURE__ */ s.createElement(Be, {
|
|
720
720
|
key: f.id,
|
|
721
721
|
icons: it,
|
|
722
722
|
index: G,
|
|
723
723
|
toast: f,
|
|
724
|
-
defaultRichColors:
|
|
725
|
-
duration: (ut =
|
|
726
|
-
className:
|
|
727
|
-
descriptionClassName:
|
|
728
|
-
invert:
|
|
724
|
+
defaultRichColors: O,
|
|
725
|
+
duration: (ut = c == null ? void 0 : c.duration) != null ? ut : k,
|
|
726
|
+
className: c == null ? void 0 : c.className,
|
|
727
|
+
descriptionClassName: c == null ? void 0 : c.descriptionClassName,
|
|
728
|
+
invert: v,
|
|
729
729
|
visibleToasts: W,
|
|
730
|
-
closeButton: (mt =
|
|
730
|
+
closeButton: (mt = c == null ? void 0 : c.closeButton) != null ? mt : b,
|
|
731
731
|
interacting: dt,
|
|
732
|
-
position:
|
|
733
|
-
style:
|
|
734
|
-
unstyled:
|
|
735
|
-
classNames:
|
|
736
|
-
cancelButtonStyle:
|
|
737
|
-
actionButtonStyle:
|
|
738
|
-
closeButtonAriaLabel:
|
|
732
|
+
position: d,
|
|
733
|
+
style: c == null ? void 0 : c.style,
|
|
734
|
+
unstyled: c == null ? void 0 : c.unstyled,
|
|
735
|
+
classNames: c == null ? void 0 : c.classNames,
|
|
736
|
+
cancelButtonStyle: c == null ? void 0 : c.cancelButtonStyle,
|
|
737
|
+
actionButtonStyle: c == null ? void 0 : c.actionButtonStyle,
|
|
738
|
+
closeButtonAriaLabel: c == null ? void 0 : c.closeButtonAriaLabel,
|
|
739
739
|
removeToast: ct,
|
|
740
740
|
toasts: F.filter((Q) => Q.position == f.position),
|
|
741
741
|
heights: lt.filter((Q) => Q.position == f.position),
|
|
742
742
|
setHeights: wt,
|
|
743
|
-
expandByDefault:
|
|
743
|
+
expandByDefault: h,
|
|
744
744
|
gap: K,
|
|
745
745
|
expanded: st,
|
|
746
746
|
swipeDirections: a.swipeDirections
|
|
747
747
|
});
|
|
748
748
|
})) : null;
|
|
749
749
|
}));
|
|
750
|
-
}),
|
|
751
|
-
info: /* @__PURE__ */
|
|
752
|
-
|
|
750
|
+
}), ze = {
|
|
751
|
+
info: /* @__PURE__ */ H(
|
|
752
|
+
re,
|
|
753
753
|
{
|
|
754
754
|
"aria-hidden": "true",
|
|
755
755
|
size: 20,
|
|
756
756
|
className: "ds:shrink-0 ds:text-[var(--info)]"
|
|
757
757
|
}
|
|
758
758
|
),
|
|
759
|
-
success: /* @__PURE__ */
|
|
760
|
-
|
|
759
|
+
success: /* @__PURE__ */ H(
|
|
760
|
+
ne,
|
|
761
761
|
{
|
|
762
762
|
"aria-hidden": "true",
|
|
763
763
|
size: 20,
|
|
764
764
|
className: "ds:shrink-0 ds:text-[var(--success)]"
|
|
765
765
|
}
|
|
766
766
|
),
|
|
767
|
-
warning: /* @__PURE__ */
|
|
768
|
-
|
|
767
|
+
warning: /* @__PURE__ */ H(
|
|
768
|
+
oe,
|
|
769
769
|
{
|
|
770
770
|
"aria-hidden": "true",
|
|
771
771
|
size: 20,
|
|
772
772
|
className: "ds:shrink-0 ds:text-[var(--warning)]"
|
|
773
773
|
}
|
|
774
774
|
),
|
|
775
|
-
error: /* @__PURE__ */
|
|
776
|
-
|
|
775
|
+
error: /* @__PURE__ */ H(
|
|
776
|
+
se,
|
|
777
777
|
{
|
|
778
778
|
"aria-hidden": "true",
|
|
779
779
|
size: 20,
|
|
@@ -781,9 +781,9 @@ const ze = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
781
781
|
}
|
|
782
782
|
)
|
|
783
783
|
};
|
|
784
|
-
let
|
|
784
|
+
let Nt = !1;
|
|
785
785
|
const et = /* @__PURE__ */ new Set();
|
|
786
|
-
function
|
|
786
|
+
function He(o) {
|
|
787
787
|
const a = typeof document < "u" && document.documentElement.dir === "rtl";
|
|
788
788
|
return {
|
|
789
789
|
"top-start": a ? "top-right" : "top-left",
|
|
@@ -794,42 +794,40 @@ function Oe(o) {
|
|
|
794
794
|
"bottom-end": a ? "bottom-left" : "bottom-right"
|
|
795
795
|
}[o];
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Oe({
|
|
798
798
|
position: o = "bottom-end",
|
|
799
799
|
offset: a = "var(--spacing-lg)",
|
|
800
800
|
gap: e = 8,
|
|
801
801
|
visibleToasts: n = 3,
|
|
802
|
-
className:
|
|
802
|
+
className: v
|
|
803
803
|
}) {
|
|
804
|
-
const
|
|
805
|
-
$t = d("common.close", "Close");
|
|
806
|
-
const [c] = Ot(() => Nt ? !1 : (Nt = !0, !0)), b = te(null), [v, i] = Ot(
|
|
804
|
+
const [l] = Ot(() => Nt ? !1 : (Nt = !0, !0)), u = Zt(null), [h, b] = Ot(
|
|
807
805
|
() => typeof document < "u" && document.documentElement.dir || "ltr"
|
|
808
806
|
);
|
|
809
807
|
return jt(() => () => {
|
|
810
|
-
|
|
811
|
-
}, [
|
|
812
|
-
if (!
|
|
813
|
-
const
|
|
814
|
-
|
|
808
|
+
l && (Nt = !1);
|
|
809
|
+
}, [l]), jt(() => {
|
|
810
|
+
if (!l) return;
|
|
811
|
+
const r = new MutationObserver(() => {
|
|
812
|
+
b(document.documentElement.dir || "ltr");
|
|
815
813
|
});
|
|
816
|
-
return
|
|
814
|
+
return r.observe(document.documentElement, {
|
|
817
815
|
attributes: !0,
|
|
818
816
|
attributeFilter: ["dir"]
|
|
819
|
-
}), () =>
|
|
820
|
-
}, [
|
|
821
|
-
|
|
817
|
+
}), () => r.disconnect();
|
|
818
|
+
}, [l]), l ? /* @__PURE__ */ H(
|
|
819
|
+
Ae,
|
|
822
820
|
{
|
|
823
|
-
ref: (
|
|
824
|
-
|
|
821
|
+
ref: (r) => {
|
|
822
|
+
u.current = r, r && r.setAttribute("data-component", "toast-region");
|
|
825
823
|
},
|
|
826
|
-
dir:
|
|
827
|
-
position:
|
|
824
|
+
dir: h,
|
|
825
|
+
position: He(o),
|
|
828
826
|
richColors: !1,
|
|
829
827
|
visibleToasts: n,
|
|
830
828
|
gap: e,
|
|
831
829
|
offset: a,
|
|
832
|
-
className:
|
|
830
|
+
className: v,
|
|
833
831
|
toastOptions: {
|
|
834
832
|
unstyled: !0,
|
|
835
833
|
classNames: {
|
|
@@ -853,13 +851,13 @@ function je({
|
|
|
853
851
|
}
|
|
854
852
|
) : null;
|
|
855
853
|
}
|
|
856
|
-
|
|
857
|
-
function
|
|
854
|
+
Oe.displayName = "Toaster";
|
|
855
|
+
function je(o, a, e, n) {
|
|
858
856
|
return /* @__PURE__ */ Ht("div", { className: "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
859
|
-
|
|
857
|
+
ze[o],
|
|
860
858
|
/* @__PURE__ */ Ht("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
n && /* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ H("span", { dir: "auto", className: "type-label ds:leading-snug ds:break-words", children: a }),
|
|
860
|
+
n && /* @__PURE__ */ H(
|
|
863
861
|
"span",
|
|
864
862
|
{
|
|
865
863
|
dir: "auto",
|
|
@@ -868,48 +866,52 @@ function Pe(o, a, e, n) {
|
|
|
868
866
|
}
|
|
869
867
|
)
|
|
870
868
|
] }),
|
|
871
|
-
/* @__PURE__ */
|
|
872
|
-
se,
|
|
873
|
-
{
|
|
874
|
-
icon: /* @__PURE__ */ P(oe, {}),
|
|
875
|
-
intent: "ghost",
|
|
876
|
-
size: "sm",
|
|
877
|
-
"aria-label": $t,
|
|
878
|
-
onClick: () => Y.dismiss(e),
|
|
879
|
-
className: "ds:shrink-0"
|
|
880
|
-
}
|
|
881
|
-
)
|
|
869
|
+
/* @__PURE__ */ H(Pe, { toastId: e })
|
|
882
870
|
] });
|
|
883
871
|
}
|
|
872
|
+
function Pe({ toastId: o }) {
|
|
873
|
+
const { t: a } = ee();
|
|
874
|
+
return /* @__PURE__ */ H(
|
|
875
|
+
ae,
|
|
876
|
+
{
|
|
877
|
+
icon: /* @__PURE__ */ H(ie, {}),
|
|
878
|
+
intent: "ghost",
|
|
879
|
+
size: "sm",
|
|
880
|
+
"aria-label": a("common.close"),
|
|
881
|
+
onClick: () => Y.dismiss(o),
|
|
882
|
+
className: "ds:shrink-0"
|
|
883
|
+
}
|
|
884
|
+
);
|
|
885
|
+
}
|
|
884
886
|
function bt(o, a, e) {
|
|
885
|
-
const n = o === "error" ? 1 / 0 : 4e3,
|
|
886
|
-
et.add(
|
|
887
|
-
const
|
|
888
|
-
id:
|
|
887
|
+
const n = o === "error" ? 1 / 0 : 4e3, v = `${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, l = je(o, a, v, e == null ? void 0 : e.description);
|
|
888
|
+
et.add(v);
|
|
889
|
+
const u = {
|
|
890
|
+
id: v,
|
|
889
891
|
icon: null,
|
|
890
892
|
duration: (e == null ? void 0 : e.duration) ?? n,
|
|
891
893
|
action: e != null && e.action ? { label: e.action.label, onClick: e.action.onClick } : void 0,
|
|
892
894
|
cancel: e != null && e.cancel ? { label: e.cancel.label, onClick: e.cancel.onClick } : void 0,
|
|
893
895
|
onDismiss: () => {
|
|
894
|
-
var
|
|
895
|
-
et.delete(
|
|
896
|
+
var h;
|
|
897
|
+
et.delete(v), (h = e == null ? void 0 : e.onDismiss) == null || h.call(e);
|
|
896
898
|
},
|
|
897
899
|
onAutoClose: () => {
|
|
898
|
-
var
|
|
899
|
-
et.delete(
|
|
900
|
+
var h;
|
|
901
|
+
et.delete(v), (h = e == null ? void 0 : e.onAutoClose) == null || h.call(e);
|
|
900
902
|
}
|
|
901
903
|
};
|
|
902
904
|
switch (o) {
|
|
903
905
|
case "error":
|
|
904
|
-
return Y.error(
|
|
906
|
+
return Y.error(l, u);
|
|
905
907
|
case "success":
|
|
906
|
-
return Y.success(
|
|
908
|
+
return Y.success(l, u);
|
|
907
909
|
case "warning":
|
|
908
|
-
return Y.warning(
|
|
910
|
+
return Y.warning(l, u);
|
|
909
911
|
case "info":
|
|
910
|
-
return Y.info(
|
|
912
|
+
return Y.info(l, u);
|
|
911
913
|
default:
|
|
912
|
-
return Y(
|
|
914
|
+
return Y(l, u);
|
|
913
915
|
}
|
|
914
916
|
}
|
|
915
917
|
function Qe(o, a) {
|
|
@@ -975,7 +977,7 @@ const ea = {
|
|
|
975
977
|
}
|
|
976
978
|
};
|
|
977
979
|
export {
|
|
978
|
-
|
|
980
|
+
Oe as T,
|
|
979
981
|
ea as a,
|
|
980
982
|
ta as b,
|
|
981
983
|
Qe as c,
|
|
@@ -983,4 +985,4 @@ export {
|
|
|
983
985
|
Ze as e,
|
|
984
986
|
aa as t
|
|
985
987
|
};
|
|
986
|
-
//# sourceMappingURL=toast.agent-
|
|
988
|
+
//# sourceMappingURL=toast.agent-WHHfw5VX.js.map
|