coursekit-lms 0.1.1 → 0.2.0
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/CHANGELOG.md +82 -1
- package/README.md +128 -27
- package/dist/cli/index.js +7140 -1634
- package/dist/cli/index.js.map +1 -1
- package/dist/server/index.js +7129 -1656
- package/dist/server/index.js.map +1 -1
- package/dist/types/server/config.d.ts +4 -0
- package/dist/types/server/db/migrations/002_email.d.ts +8 -0
- package/dist/types/server/db/migrations/003_groups_cohorts.d.ts +7 -0
- package/dist/types/server/db/migrations/004_completion_badges.d.ts +8 -0
- package/dist/types/server/db/migrations/005_question_bank.d.ts +11 -0
- package/dist/types/server/db/migrations/006_grade_categories.d.ts +11 -0
- package/dist/types/server/db/schema-completion.d.ts +79 -0
- package/dist/types/server/db/schema.d.ts +165 -5
- package/dist/types/server/index.d.ts +7 -0
- package/dist/types/server/lib/events.d.ts +105 -0
- package/dist/types/server/routes/badges.d.ts +4 -0
- package/dist/types/server/routes/certificates.d.ts +3 -0
- package/dist/types/server/routes/cohorts.d.ts +6 -0
- package/dist/types/server/routes/completion.d.ts +4 -0
- package/dist/types/server/routes/email.d.ts +13 -0
- package/dist/types/server/routes/grade-categories.d.ts +4 -0
- package/dist/types/server/routes/groups.d.ts +4 -0
- package/dist/types/server/routes/question-bank.d.ts +4 -0
- package/dist/types/server/seed/demo-completion.d.ts +2 -0
- package/dist/types/server/seed/demo-email.d.ts +2 -0
- package/dist/types/server/seed/demo-grade-categories.d.ts +6 -0
- package/dist/types/server/seed/demo-groups.d.ts +6 -0
- package/dist/types/server/seed/demo-question-bank.d.ts +20 -0
- package/dist/types/server/seed/demo.d.ts +2 -1
- package/dist/types/server/services/badges.d.ts +39 -0
- package/dist/types/server/services/certificates.d.ts +42 -0
- package/dist/types/server/services/cohorts.d.ts +64 -0
- package/dist/types/server/services/completion.d.ts +63 -0
- package/dist/types/server/services/course-total.d.ts +107 -0
- package/dist/types/server/services/email/config.d.ts +55 -0
- package/dist/types/server/services/email/digests.d.ts +57 -0
- package/dist/types/server/services/email/outbox.d.ts +61 -0
- package/dist/types/server/services/email/preferences.d.ts +25 -0
- package/dist/types/server/services/email/service.d.ts +116 -0
- package/dist/types/server/services/email/templates.d.ts +74 -0
- package/dist/types/server/services/email/tokens.d.ts +11 -0
- package/dist/types/server/services/email/transport.d.ts +29 -0
- package/dist/types/server/services/enrolments.d.ts +32 -0
- package/dist/types/server/services/grade-categories.d.ts +31 -0
- package/dist/types/server/services/gradebook.d.ts +18 -0
- package/dist/types/server/services/groups.d.ts +90 -0
- package/dist/types/server/services/notify.d.ts +4 -1
- package/dist/types/server/services/question-bank.d.ts +53 -0
- package/dist/types/server/services/question-types.d.ts +146 -0
- package/dist/types/server/services/quiz-slots.d.ts +33 -0
- package/dist/types/server/services/quiz.d.ts +45 -14
- package/dist/types/shared/completion.d.ts +214 -0
- package/dist/types/shared/email.d.ts +117 -0
- package/dist/types/shared/grades.d.ts +18 -0
- package/dist/types/shared/groups.d.ts +17 -0
- package/dist/types/shared/permissions.d.ts +1 -1
- package/dist/types/shared/types.d.ts +268 -2
- package/dist/web/assets/{ActivityEditor-BVSZUV8l.js → ActivityEditor-BNG3aTQa.js} +2 -2
- package/dist/web/assets/ActivityPage-i0XHYD2Q.js +1 -0
- package/dist/web/assets/AdminBadgesPage-DvpxIg1P.js +1 -0
- package/dist/web/assets/AdminCohortsPage-B5PWBkjp.js +3 -0
- package/dist/web/assets/AdminCoursesPage-Dm1ECbS-.js +1 -0
- package/dist/web/assets/AdminEmailPage-D3E_Db1_.js +1 -0
- package/dist/web/assets/AdminLayout-BVeduyCQ.js +1 -0
- package/dist/web/assets/{AdminOverviewPage-DnTrdGbr.js → AdminOverviewPage-BaCKvhgr.js} +1 -1
- package/dist/web/assets/{AdminSettingsPage-B82cX8xU.js → AdminSettingsPage-B5Ag5K15.js} +1 -1
- package/dist/web/assets/AdminUsersPage-BVCG65EK.js +1 -0
- package/dist/web/assets/{AnnouncementsPage-BKW30k0Z.js → AnnouncementsPage-C0OAzyvW.js} +1 -1
- package/dist/web/assets/BadgePage-B3Ecudas.js +1 -0
- package/dist/web/assets/CalendarPage-CEks5F4m.js +1 -0
- package/dist/web/assets/{CatalogPage-BiMgSSBR.js → CatalogPage-e7lVtwUN.js} +1 -1
- package/dist/web/assets/CertificatePage-_eSGt8R-.js +9 -0
- package/dist/web/assets/CompletionPage-Dxp-ulA_.js +1 -0
- package/dist/web/assets/CourseBadgesPage-Vi3P1Lnc.js +1 -0
- package/dist/web/assets/CourseContentPage-IFlhVsO5.js +1 -0
- package/dist/web/assets/CourseLayout-BqwXol8L.js +1 -0
- package/dist/web/assets/CourseSettingsPage-BIagLirb.js +1 -0
- package/dist/web/assets/CreateCoursePage-BBcdiTtz.js +1 -0
- package/dist/web/assets/{DiscussionPage-CWwVpFQV.js → DiscussionPage-C23QoCSw.js} +1 -1
- package/dist/web/assets/GradebookSetupPage-a5GH4xIk.js +1 -0
- package/dist/web/assets/GradesPage-CY6MtJxs.js +1 -0
- package/dist/web/assets/GroupsPage-DS3HFeC4.js +1 -0
- package/dist/web/assets/{MyCoursesPage-Dd-Oaygv.js → MyCoursesPage-Ckj-1SCA.js} +1 -1
- package/dist/web/assets/{NotFoundPage-BRquC7-l.js → NotFoundPage-BmwVsGAy.js} +1 -1
- package/dist/web/assets/NotificationsPage-DBRM37F1.js +1 -0
- package/dist/web/assets/ParticipantsPage-DV4Mjfxo.js +1 -0
- package/dist/web/assets/ProfilePage-BqG55_02.js +1 -0
- package/dist/web/assets/QuestionAnswer-CJIoWSz2.js +1 -0
- package/dist/web/assets/QuestionBankPage-BkI44c4K.js +1 -0
- package/dist/web/assets/QuizAttemptPage-DQVfbLKI.js +1 -0
- package/dist/web/assets/QuizEditorPage-muk-KVG1.js +1 -0
- package/dist/web/assets/SubmissionsPage-Dx97JOzE.js +1 -0
- package/dist/web/assets/UnsubscribePage-BPLiTiaG.js +1 -0
- package/dist/web/assets/VerifyCertificatePage-Cw9iXN3C.js +1 -0
- package/dist/web/assets/achievements-DaIfUTKU.js +1 -0
- package/dist/web/assets/{arrow-up-LHDup5m4.js → arrow-up-lI30bvj5.js} +1 -1
- package/dist/web/assets/badge-art-QPo-pYql.js +1 -0
- package/dist/web/assets/badge-card-ByT0wR6q.js +1 -0
- package/dist/web/assets/badge-dialog-p2zTk4h0.js +1 -0
- package/dist/web/assets/{ban-D3Vsxg_g.js → ban-DEiI8npI.js} +1 -1
- package/dist/web/assets/bank-S3XEFPfe.js +3 -0
- package/dist/web/assets/bell-off-Bo2RE0kn.js +1 -0
- package/dist/web/assets/calendar-range-Cfg-P4Md.js +1 -0
- package/dist/web/assets/certificate-sheet-DzW0lfzR.js +2 -0
- package/dist/web/assets/chevron-left-Bu6IJANV.js +1 -0
- package/dist/web/assets/circle-dashed-D34ZjnSx.js +1 -0
- package/dist/web/assets/clock-DPBmdKAi.js +1 -0
- package/dist/web/assets/cohorts-DL0Dsxva.js +1 -0
- package/dist/web/assets/completion-2z7I-ypT.js +1 -0
- package/dist/web/assets/contact-NCWQa7wc.js +1 -0
- package/dist/web/assets/{context-BLVW7NB7.js → context-D8W_QqNi.js} +1 -1
- package/dist/web/assets/{copy-Bxxjq6zo.js → copy-B5IKRMFo.js} +1 -1
- package/dist/web/assets/download-BrtK5sVk.js +1 -0
- package/dist/web/assets/{ellipsis-c2POIN-Y.js → ellipsis-BDmYLoyn.js} +1 -1
- package/dist/web/assets/email-BZ3kGs-R.js +1 -0
- package/dist/web/assets/flag-DOzXVys0.js +1 -0
- package/dist/web/assets/folder-input-M2p_UJZX.js +1 -0
- package/dist/web/assets/{library-3WG9oLCb.js → folder-tree-B-DoLXMB.js} +1 -1
- package/dist/web/assets/frame-DZh5g5b3.js +1 -0
- package/dist/web/assets/globe-DDTr53UY.js +1 -0
- package/dist/web/assets/grades-ogaD0MDO.js +1 -0
- package/dist/web/assets/groups-CrYV_AFp.js +1 -0
- package/dist/web/assets/{hooks-BBARn-DA.js → hooks-EFhyJ5yU.js} +1 -1
- package/dist/web/assets/hourglass-BKca6Cje.js +1 -0
- package/dist/web/assets/inbox-x1U4YU-c.js +1 -0
- package/dist/web/assets/index-BdPmMS6n.css +2 -0
- package/dist/web/assets/index-CEZdqKdi.js +50 -0
- package/dist/web/assets/{key-round-B_KI-brR.js → key-round-fzvV-etw.js} +1 -1
- package/dist/web/assets/library-Bcm33ouq.js +1 -0
- package/dist/web/assets/lightbulb-CjSpJ1_v.js +1 -0
- package/dist/web/assets/{lock-BjbqwA_0.js → lock-C2edVDOc.js} +1 -1
- package/dist/web/assets/mail-CQ9yiBph.js +1 -0
- package/dist/web/assets/mail-x-B6oBqlcw.js +1 -0
- package/dist/web/assets/{markdown-ykrkPMbn.js → markdown-HNlXovsL.js} +3 -3
- package/dist/web/assets/message-square-text-wvO9_guT.js +1 -0
- package/dist/web/assets/{misc-DvgDEI3I.js → misc-CyGhN6HT.js} +1 -1
- package/dist/web/assets/{pencil-p0GQmIMo.js → pencil-DFUpj3YP.js} +1 -1
- package/dist/web/assets/{pin-DlYC3uec.js → pin-DNUQ6-WX.js} +1 -1
- package/dist/web/assets/revoke-dialog-DjBKaFTV.js +1 -0
- package/dist/web/assets/rotate-ccw-yBj9Ri49.js +1 -0
- package/dist/web/assets/scroll-text-RmPlZi3F.js +1 -0
- package/dist/web/assets/{send-mxSHcdcD.js → send-BnVkFV8w.js} +1 -1
- package/dist/web/assets/{settings-DRKWzSHN.js → settings-BxdCrDf8.js} +1 -1
- package/dist/web/assets/shield-x-RpNHS0o8.js +1 -0
- package/dist/web/assets/shuffle-C1aB_4dp.js +1 -0
- package/dist/web/assets/target-G9Q_WQLB.js +1 -0
- package/dist/web/assets/trophy-BFFngFEh.js +1 -0
- package/dist/web/assets/user-minus-CkOPT3ak.js +1 -0
- package/dist/web/assets/users-round-CNhv0Whm.js +1 -0
- package/dist/web/index.html +4 -4
- package/package.json +6 -1
- package/dist/web/assets/ActivityPage-DPmSV_mU.js +0 -1
- package/dist/web/assets/AdminCoursesPage-uaSHNtzf.js +0 -1
- package/dist/web/assets/AdminLayout-DqoShZGn.js +0 -1
- package/dist/web/assets/AdminUsersPage-3d2F9AEl.js +0 -1
- package/dist/web/assets/CalendarPage-CLRWyTNT.js +0 -1
- package/dist/web/assets/CourseContentPage-BIDH0UbG.js +0 -1
- package/dist/web/assets/CourseLayout-ql01LEmj.js +0 -1
- package/dist/web/assets/CourseSettingsPage-CReoPqOa.js +0 -1
- package/dist/web/assets/CreateCoursePage-DFCHlq5M.js +0 -1
- package/dist/web/assets/GradesPage-Bu5vphcG.js +0 -1
- package/dist/web/assets/NotificationsPage-LJvqb6Dj.js +0 -1
- package/dist/web/assets/ParticipantsPage-wFxiphna.js +0 -1
- package/dist/web/assets/ProfilePage-CzfhacAX.js +0 -1
- package/dist/web/assets/QuizAttemptPage-CEAV6wAL.js +0 -1
- package/dist/web/assets/QuizEditorPage-DS_czQVM.js +0 -3
- package/dist/web/assets/SubmissionsPage-CQjcx09G.js +0 -1
- package/dist/web/assets/chevron-left-D6IMQD6N.js +0 -1
- package/dist/web/assets/frame-CGabirLa.js +0 -1
- package/dist/web/assets/index-B29bTBiJ.js +0 -50
- package/dist/web/assets/index-WxCvsbJq.css +0 -2
- package/dist/web/assets/message-square-text-fe24gbEU.js +0 -1
- package/dist/web/assets/trophy-Cch2iF1m.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./hooks-
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`library`,size:24,node:[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`lightbulb`,size:24,node:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./hooks-
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`mail-x`,size:24,node:[[`path`,{d:`M22 12.532V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8.792`,key:`8lpqwp`}],[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`path`,{d:`m16.5 16.5 5 5`,key:`zc9lw7`}],[`path`,{d:`m21.5 16.5-5 5`,key:`1empo3`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{H as e,_ as t,dt as n,ft as r,mt as i}from"./hooks-
|
|
1
|
+
import{H as e,_ as t,dt as n,ft as r,mt as i}from"./hooks-EFhyJ5yU.js";import{m as a,vt as o}from"./index-CEZdqKdi.js";var s={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};s.node;var c=e(s),l={name:`heading-2`,size:24,node:[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1`,key:`9jr5yi`}]]};l.node;var u=e(l),d={name:`italic`,size:24,node:[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]};d.node;var f=e(d),p={name:`letter-b`,size:24,node:[[`path`,{d:`M6 12h9a4 4 0 010 8H7a1 1 0 01-1-1V5a1 1 0 011-1h7a4 4 0 010 8`,key:`n8tvfh`}]],aliases:[`bold`]};p.node;var ee=e(p),m={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};m.node;var te=e(m),h={name:`list`,size:24,node:[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]};h.node;var g=e(h),ne={name:`quote`,size:24,node:[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]};ne.node;var re=e(ne);function ie(e,t){this.v=e,this.k=t}function ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oe(e){if(Array.isArray(e))return e}function _(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function v(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(e,t){return oe(e)||_(e,t)||ce(e,t)||v()}function ce(e,t){if(e){if(typeof e==`string`)return ae(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,t):void 0}}function le(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof ie;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}le.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},le.prototype.next=function(e){return this._invoke(`next`,e)},le.prototype.throw=function(e){return this._invoke(`throw`,e)},le.prototype.return=function(e){return this._invoke(`return`,e)};var ue=Object.entries,y=Object.keys,b=Object.setPrototypeOf,de=Object.isFrozen,fe=Object.getPrototypeOf,pe=Object.getOwnPropertyDescriptor,x=Object.freeze,S=Object.seal,me=Object.create,he=typeof Reflect<`u`&&Reflect,ge=he.apply,_e=he.construct;x||=function(e){return e},S||=function(e){return e},ge||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},_e||=function(e){return new e(...[...arguments].slice(1))};var C=O(Array.prototype.forEach),ve=O(Array.prototype.lastIndexOf),ye=O(Array.prototype.pop),be=O(Array.prototype.push),xe=O(Array.prototype.slice),Se=O(Array.prototype.splice),Ce=Array.isArray,we=He(Set),Te=O(Set.prototype.add),Ee=O(Set.prototype.has),De=O(Set.prototype.delete),Oe=He(Map),ke=O(Map.prototype.get),Ae=O(Map.prototype.set),w=O(String.prototype.toLowerCase),je=O(String.prototype.toString),Me=O(String.prototype.match),Ne=O(String.prototype.replace),Pe=O(String.prototype.indexOf),Fe=O(String.prototype.trim),Ie=O(Number.prototype.toString),Le=O(Boolean.prototype.toString),Re=typeof BigInt>`u`?null:O(BigInt.prototype.toString),ze=typeof Symbol>`u`?null:O(Symbol.prototype.toString),T=O(Object.prototype.hasOwnProperty),Be=O(Object.prototype.toString),Ve=RegExp.prototype.test,E=function(e,t){return e instanceof RegExp&&(e.lastIndex=0),ge(Ve,e,[t])},D=He(TypeError);function O(e){return function(t){var n=[...arguments].slice(1);return ge(e,t,n)}}function He(e){return function(){return _e(e,[...arguments])}}function k(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w;if(b&&b(e,null),!Ce(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(de(t)||(t[r]=e),i=e)}e[i]=!0}return e}function A(e){for(let t=0;t<e.length;t++)T(e,t)||(e[t]=null);return e}function Ue(e){let t=me(null);for(let r of ue(e)){var n=se(r,2);let i=n[0],a=n[1];T(e,i)&&(t[i]=Ce(a)?A(a):a&&typeof a==`object`&&a.constructor===Object?Ue(a):a)}return t}function We(e){let t=me(null),n=y(e),r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}function Ge(e){switch(typeof e){case`string`:return e;case`number`:return Ie(e);case`boolean`:return Le(e);case`bigint`:return Re?Re(e):`0`;case`symbol`:return ze?ze(e):`Symbol()`;case`undefined`:return Be(e);case`function`:case`object`:{if(e===null)return Be(e);let t=e,n=j(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Be(e)}return Be(e)}default:return Be(e)}}function j(e,t){for(;e!==null;){let n=pe(e,t);if(n){if(n.get)return O(n.get);if(typeof n.value==`function`)return O(n.value)}e=fe(e)}function n(){return null}return n}function Ke(e,t){for(;e!==null;){let n=pe(e,t);if(n)return n.get?O(n.get):null;e=fe(e)}return null}function qe(e){if(!e)return!1;try{return E(e,``),!0}catch{return!1}}var Je=x(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ye=x(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.filter.font.g.glyph.glyphref.hkern.image.line.lineargradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Xe=x([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ze=x([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Qe=x(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),$e=x([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),et=x([`#text`]),tt=x(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),nt=x(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),rt=x(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),it=x([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),at=S(/{{[\w\W]*|^[\w\W]*}}/g),ot=S(/<%[\w\W]*|^[\w\W]*%>/g),st=S(/\${[\w\W]*/g),ct=S(/{{|}}|\${|<%|%>/),lt=S(/[^\t\n\f\r ]/),ut=S(/\u0000/g),dt=S(/^data-[\-\w.\u00B7-\uFFFF]+$/),ft=S(/^aria-[\-\w]+$/),pt=S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mt=S(/^(?:\w+script|data):/i),ht=S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gt=S(/^html$/i),_t=S(/^[a-z][.\w]*(-[.\w]+)+$/i),vt=S(/<[/\w!]/g),yt=S(/<[/\w]/g),bt=S(/<[/\w]|^-?>|--!?>|<!-$/g),xt=S(/<\/no(script|embed|frames)/i),St=S(/\/>/i),Ct=S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),wt=S(/^[\r\n\t ]+/),M={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},Tt=x(k({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),Et=x(k({},[`textarea`,`title`])),Dt=x(k({},[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`embed`,`frame`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`])),Ot=function(){return typeof window>`u`?null:window},kt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},At=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},jt=function(e,t,n,r){return T(e,t)&&Ce(e[t])?k(r.base?We(r.base):{},e[t],r.transform):n},Mt=function(e,t,n){let r=T(e,t)?e[t]:void 0;return r&&typeof r==`object`?Ue(r):n};function Nt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ot(),t=e=>Nt(e);if(t.version=`3.5.0`,t.removed=[],!e||!e.document||e.document.nodeType!==M.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript,a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter,l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=j(d,`cloneNode`),p=j(d,`remove`),ee=j(d,`removeChild`),m=j(d,`removeAttributeNode`),te=j(d,`nextSibling`),h=j(d,`childNodes`),g=j(d,`parentNode`),ne=j(d,`shadowRoot`),re=j(d,`attributes`),ie=o&&o.prototype?j(o.prototype,`nodeType`):null,ae=o&&o.prototype?j(o.prototype,`nodeName`):null,oe=o&&o.prototype?j(o.prototype,`ownerDocument`):null,_=function(e){return ie?ie(e):e.nodeType},v=function(e){return ae?ae(e):e.nodeName},se=Ke(d,`namespaceURI`),ce=function(e){return se?se(e):e.namespaceURI},le=function(e){return _(e)===M.element?re(e):null};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,b=``,de,fe=!1,pe=0,he=function(){if(pe>0)throw D(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ge=function(e){he(),pe++;try{return y.createHTML(e)}finally{pe--}},_e=function(e){return y&&nn?ge(e):e},Ie=function(e){he(),pe++;try{return y.createScriptURL(e)}finally{pe--}},Le=function(){return fe||=(de=kt(u,i),!0),de},Re=n,ze=Re.implementation,Be=Re.createNodeIterator,Ve=Re.createDocumentFragment,O=Re.getElementsByTagName,He=r.importNode,A=At();t.isSupported=typeof ue==`function`&&typeof g==`function`&&ze&&ze.createHTMLDocument!==void 0;let Pt=at,Ft=ot,It=st,Lt=dt,Rt=ft,N=mt,P=ht,zt=_t,Bt=pt,F=null,Vt=k({},[...Je,...Ye,...Xe,...Qe,...et]),I=null,Ht=k({},[...tt,...nt,...rt,...it]),L=null,Ut=null,Wt=null,R=Object.seal(me(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Gt=!0,Kt=!0,qt=!1,Jt=!0,z=!1,Yt=!0,B=!1,Xt=!1,Zt=null,Qt=null,$t=!1,en=!1,tn=!1,nn=!1,rn=!0,an=!1,on=`user-content-`,sn=!0,cn=!1,V=null,ln=null,un=!1,dn=null,H=k({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),fn=null,pn=k({},[`audio`,`video`,`img`,`source`,`image`,`track`]),mn=null,hn=k({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),gn=`http://www.w3.org/1998/Math/MathML`,_n=`http://www.w3.org/2000/svg`,U=`http://www.w3.org/1999/xhtml`,vn=U,yn=!1,bn=null,xn=k({},[gn,_n,U],je),Sn=x(k({},[`mi`,`mo`,`mn`,`ms`,`mtext`])),Cn=null,wn=x(k({},[`annotation-xml`])),Tn=null,En=x(me(null)),Dn=k({},[`title`,`style`,`font`,`a`,`script`]),On=null,kn=[`application/xhtml+xml`,`text/html`],W=null,An=null,jn=null,Mn=n.createElement(`form`),Nn=function(e){return e instanceof RegExp||e instanceof Function},Pn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e&&typeof e==`object`||(e={}),e=Ue(e),On=kn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,W=On===`application/xhtml+xml`?je:w,F=jt(e,`ALLOWED_TAGS`,Vt,{transform:W}),I=jt(e,`ALLOWED_ATTR`,Ht,{transform:W}),bn=jt(e,`ALLOWED_NAMESPACES`,xn,{transform:je}),mn=jt(e,`ADD_URI_SAFE_ATTR`,hn,{transform:W,base:hn}),fn=jt(e,`ADD_DATA_URI_TAGS`,pn,{transform:W,base:pn}),dn=jt(e,`FORBID_CONTENTS`,H,{transform:W}),Ut=jt(e,`FORBID_TAGS`,me(null),{transform:W}),Wt=jt(e,`FORBID_ATTR`,me(null),{transform:W}),un=T(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Ue(e.USE_PROFILES):e.USE_PROFILES:!1,Gt=e.ALLOW_ARIA_ATTR!==!1,Kt=e.ALLOW_DATA_ATTR!==!1,qt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Jt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z=e.SAFE_FOR_TEMPLATES||!1,Yt=e.SAFE_FOR_XML!==!1,B=e.WHOLE_DOCUMENT||!1,en=e.RETURN_DOM||!1,tn=e.RETURN_DOM_FRAGMENT||!1,nn=e.RETURN_TRUSTED_TYPE||!1,$t=e.FORCE_BODY||!1,rn=e.SANITIZE_DOM!==!1,an=e.SANITIZE_NAMED_PROPS||!1,sn=e.KEEP_CONTENT!==!1,cn=e.IN_PLACE||!1,Bt=qe(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:pt,vn=typeof e.NAMESPACE==`string`?e.NAMESPACE:U,Cn=Mt(e,`MATHML_TEXT_INTEGRATION_POINTS`,Sn),Tn=Mt(e,`HTML_INTEGRATION_POINTS`,wn);let t=Mt(e,`CUSTOM_ELEMENT_HANDLING`,En);if(L=me(null),T(t,`tagNameCheck`)&&Nn(t.tagNameCheck)&&(L.tagNameCheck=t.tagNameCheck),T(t,`attributeNameCheck`)&&Nn(t.attributeNameCheck)&&(L.attributeNameCheck=t.attributeNameCheck),T(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(L.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),S(L),z&&(Kt=!1),tn&&(en=!0),un&&((T(e,`ALLOWED_TAGS`)||T(e,`ALLOWED_ATTR`))&&typeof console<`u`&&typeof console.warn==`function`&&console.warn(`DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together.`),F=k({},et),I=me(null),un.html===!0&&(k(F,Je),k(I,tt)),un.svg===!0&&(k(F,Ye),k(I,nt),k(I,it)),un.svgFilters===!0&&(k(F,Xe),k(I,nt),k(I,it)),un.mathMl===!0&&(k(F,Qe),k(I,rt),k(I,it))),R.tagCheck=null,R.attributeCheck=null,T(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?R.tagCheck=e.ADD_TAGS:Ce(e.ADD_TAGS)&&(F===Vt&&(F=We(F)),k(F,e.ADD_TAGS,W))),T(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?R.attributeCheck=e.ADD_ATTR:Ce(e.ADD_ATTR)&&(I===Ht&&(I=We(I)),k(I,e.ADD_ATTR,W))),T(e,`ADD_FORBID_CONTENTS`)&&Ce(e.ADD_FORBID_CONTENTS)&&(dn===H&&(dn=We(dn)),k(dn,e.ADD_FORBID_CONTENTS,W)),sn&&(F[`#text`]=!0),B&&k(F,[`html`,`head`,`body`]),F.table&&(F.tbody=!0,delete Ut.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw D(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw D(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=y;y=e.TRUSTED_TYPES_POLICY;try{b=ge(``)}catch(e){throw y=t,e}}else e.TRUSTED_TYPES_POLICY===null?(y=void 0,b=``):(y===void 0&&(y=Le()),y&&typeof b==`string`&&(b=ge(``)));An=x(e)},Fn=k({},[...Ye,...Xe,...Ze]),In=k({},[...Qe,...$e]),Ln=function(e,t,n){return t===U?e===`svg`:t===gn?e===`svg`&&(n===`annotation-xml`||Cn[n]):!!Fn[e]},Rn=function(e,t,n){return t===U?e===`math`:t===_n?e===`math`&&Tn[n]:!!In[e]},zn=function(e,t,n){return t===_n&&!Tn[n]||t===gn&&!Cn[n]?!1:!In[e]&&(Dn[e]||!Fn[e])},Bn=function(e){let t=ce(e),n=w(v(e)),r=g(e),i=vn,a=`template`;return r&&_(r)===M.element&&(i=ce(r),a=w(v(r))),bn[t]?t===_n?Ln(n,i,a):t===gn?Rn(n,i,a):t===U?zn(n,i,a):On===`application/xhtml+xml`:!1},Vn=function(e){be(t.removed,{element:e}),tr(e);try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw D(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},Hn=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},Un=function(e){qn(e);let t=h(e);t&&C(xe(t),t=>{try{ee(e,t)}catch{}}),_(e)===M.element&&Gn(e,!1)},Wn=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}if(be(t.removed,{attribute:r||null,from:n}),r)Hn(n,r,e);else try{n.removeAttribute(e)}catch{}if(e===`is`){if(en||tn)try{Vn(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Gn=function(e,t){let n=re(e);if(n)for(let r=n.length-1;r>=0;--r){let i=n[r],a=i&&i.name;typeof a==`string`&&!(t&&I[W(a)])&&Hn(e,i,a)}},Kn=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&_(e)===M.element){let t=ne(e);q(t)&&r.push(t)}let i=h(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},qn=function(e){Kn(e,e=>{_(e)===M.element&&Gn(e,!0)})},Jn=function(e){let t=[];return Kn(e,e=>{t.push(e)},!0),t},Yn=function(e,t){let n=we();C(Jn(e),e=>{_(e)===M.element&&Te(n,e)}),C(t,e=>{_(e)===M.element&&!Ee(n,e)&&Gn(e,!0)})},Xn=function(e,n){let r=!1;return C(t.removed,t=>{t.element&&(r||=t.element===e,qn(t.element))}),Yn(e,n),r},Zn=function(e,t){Un(e),Xn(e,t)},Qn=function(e,t){let n=V,r=null,i=()=>(r||(r=we(),C(t,e=>{Te(r,e)})),r);for(let t=0;;t++){let r=Jn(e),a=[e],o=!1;if(C(r,e=>{_(e)===M.documentFragment?be(a,e):!o&&!Ee(n,e)&&(o=Ee(i(),e))}),!o)return;if(t>=8)throw D(`the tree kept changing during in-place sanitization; refusing to return it`);C(a,(t,n)=>{$n(t,n>0,e,i())})}},$n=function(e,t,n,r){let i=ir(e),a;for(;a=i.nextNode();)Ee(r,a)&&!Ee(V,a)&&(t&&J(A.uponSanitizeShadowNode,a,null),Tr(a,n))},er=function(e){if(!V)return;Te(V,e);let t=ke(ln,e);if(t!==void 0){if(t>=8)throw D(`the tree kept changing during in-place sanitization; refusing to return it`);Ae(ln,e,t+1)}},tr=function(e){V&&(De(V,e),ke(ln,e)===void 0&&Ae(ln,e,0))},nr=function(e,t){return Yt?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},rr=function(e){Yt&&Kn(e,e=>{let t=_(e);if(t===M.processingInstruction||t===M.comment&&E(yt,e.data)){try{p(e)}catch{}return!1}if(t===M.element){let t=e,n=W(v(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&nr(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},G=function(e){let t=null,r=null;if($t)e=`<remove></remove>`+e;else{let t=Me(e,wt);r=t&&t[0]}On===`application/xhtml+xml`&&vn===U&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?ge(e):e;if(vn===U)try{t=new l().parseFromString(i,On)}catch{}if(!t||!t.documentElement){t=ze.createDocument(vn,`template`,null);try{t.documentElement.innerHTML=yn?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),vn===U?O.call(t,B?`html`:`body`)[0]:B?t.documentElement:a},ir=function(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=oe?oe(e):e.ownerDocument;return Be.call(n||e,e,(t?0:c.SHOW_ELEMENT)|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ar=function(e){return e=Ne(e,Pt,` `),e=Ne(e,Ft,` `),e=Ne(e,It,` `),e},or=function(e){cr(e);let t=e.querySelectorAll?.call(e,`template`);t&&C(t,e=>{q(e.content)&&or(e.content)})},K=k({},[`caption`,`colgroup`,`col`,`thead`,`tbody`,`tfoot`,`tr`,`td`,`th`,`style`,`script`,`template`]),sr=function(e){if(On===`application/xhtml+xml`)return;let t=e.querySelectorAll?.call(e,`table,tbody,thead,tfoot,tr,colgroup`);t&&t.length!==0&&C(t,t=>{C(xe(h(t)),n=>{let r=_(n);if(!(r===M.text?E(lt,n.data):r===M.element&&!K[w(v(n))]))return;let i=t;for(;i&&w(v(i))!==`table`;)i=i===e?null:g(i);let a=i&&i!==e?g(i):null;if(a)try{a.insertBefore(n,i)}catch{}})})},cr=function(e){sr(e),e.normalize();let t=ir(e,!0),n=null,r=t.nextNode();for(;r;){let e=r.data;if(E(ut,e)&&(e=Ne(e,ut,``),r.data=e),E(ct,e)&&(e=ar(e),r.data=e),e&&_(r)===M.text){if(n){let t=n.data;E(ct,t[t.length-1]+e[0])&&(n.data=ar(t+e[0]))}n=r}r=t.nextNode()}},lr=function(e){let t=ae?ae(e):null;return typeof t!=`string`||W(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==re(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==ie(e)||e.childNodes!==h(e)},ur=function(e){if(!ie||typeof e!=`object`||!e)return null;try{let t=ie(e);return typeof t==`number`?t:null}catch{return null}},q=function(e){return ur(e)===M.documentFragment},dr=function(e){return ur(e)!==null};function J(e,n,r){e.length!==0&&C(e,e=>{e.call(t,n,r,An)})}let fr=function(e,t){let n=!!Dt[t],r=!!Tt[t];return!n&&!r&&!Et[t]||ce(e)!==U?!1:n?e.hasChildNodes():dr(e.firstElementChild)?!0:r&&typeof e.textContent==`string`&&E(vt,e.textContent)},pr=function(e,t,n){return!!(Yt&&n===M.element&&e.hasChildNodes()&&!dr(e.firstElementChild)&&E(vt,e.textContent)&&E(vt,e.innerHTML)||Yt&&n===M.element&&fr(e,t)||n===M.processingInstruction||Yt&&n===M.comment&&E(bt,e.data))},mr=function(e,t){return e instanceof RegExp?E(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},hr=function(e,t,n){if(!Ut[t]&&xr(t)&&mr(L.tagNameCheck,t))return!1;if(sn&&!dn[t]&&!dn[w(t)]){let t=g(e),r=h(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,te(e))}}}return Vn(e),!0},gr=function(e,t,n,r){return e.length===0?t:t===n||t===r?We(t):t},_r=function(e,t){return e===t||g(e)!==null?!1:(cn&&qn(e),tr(e),!0)},vr=function(e,n){if(er(e),J(A.beforeSanitizeElements,e,null),_r(e,n))return!0;if(lr(e))return Vn(e),!0;let r=W(v(e)),i=_(e);if(F=gr(A.uponSanitizeElement,F,Vt,Zt),J(A.uponSanitizeElement,e,{tagName:r,allowedTags:F}),_r(e,n))return!0;if(pr(e,r,i))return Vn(e),!0;if((Ut[r]||!(R.tagCheck instanceof Function&&R.tagCheck(r))&&!F[r])&&hr(e,r,n))return!0;if(i===M.element&&!Bn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&E(xt,e.innerHTML))return Vn(e),!0;if(z&&i===M.text){let n=e.textContent,r=ar(n);n!==r&&(be(t.removed,{element:e.cloneNode()}),e.textContent=r)}return J(A.afterSanitizeElements,e,null),_r(e,n)},yr=function(e,t,r){if(Wt[t]||nr(t,e)||rn&&(t===`id`||t===`name`)&&(r in n||r in Mn))return!1;let i=I[t]||R.attributeCheck instanceof Function&&R.attributeCheck(t,e);if(Kt&&E(Lt,t)||Gt&&E(Rt,t))return!0;if(!i)return xr(e)&&mr(L.tagNameCheck,e)&&mr(L.attributeNameCheck,t,e)||t===`is`&&L.allowCustomizedBuiltInElements&&mr(L.tagNameCheck,r);if(mn[t])return!0;let a=Ne(r,P,``);return E(Bt,a)||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Pe(r,`data:`)===0&&fn[e]||qt&&!E(N,a)?!0:!r},br=k({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),xr=function(e){return!br[w(e)]&&E(zt,e)},Sr=function(e,t,n,r){if(y&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ge(r);case`TrustedScriptURL`:return Ie(r)}return r},Y=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!lr(e)||(Vn(e),!1)}catch{return Wn(t,e),!1}},Cr=function(e,t){return Yt&&E(Ct,t)?!0:w(e)===`attributename`&&Pe(t,`href`)!==-1},wr=function(e,n){if(J(A.beforeSanitizeAttributes,e,null),_r(e,n))return;let r=le(e);if(!r||lr(e))return;I=gr(A.uponSanitizeAttribute,I,Ht,Qt);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},a=r.length,o=W(v(e));for(;a--;){let n=r[a];if(!n)continue;let s=n.name,c=n.namespaceURI,l=n.value,u=W(s),d=l,f=s===`value`?d:Fe(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,J(A.uponSanitizeAttribute,e,i),f=i.attrValue,an&&(u===`id`||u===`name`)&&Pe(f,on)!==0&&(Wn(s,e,n),f=on+f,p=!0),Cr(s,f)?Wn(s,e,n):i.forceKeepAttr||(i.keepAttr?!Jt&&E(St,f)?Wn(s,e,n):(z&&(f=ar(f)),yr(o,u,f)?(f=Sr(o,u,c,f),f!==d&&Y(e,s,c,f)&&p&&ye(t.removed)):Wn(s,e,n)):Wn(s,e,n))}J(A.afterSanitizeAttributes,e,null),_r(e,n)},Tr=function(e,t){vr(e,t),wr(e,t),q(e.content)&&X(e.content)},X=function(e){let t=null,n=ir(e);for(J(A.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(J(A.uponSanitizeShadowNode,t,null),Tr(t,e),_(t)===M.element){let e=ne(t);q(e)&&(Er(e),X(e))}z&&cr(e),J(A.afterSanitizeShadowDOM,e,null)},Er=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){X(e.shadow);continue}let n=e.node,r=_(n)===M.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=ae?ae(n):null;if(typeof e==`string`&&W(e)===`template`){let e=n.content;q(e)&&t.push({node:e,shadow:null})}}if(r){let e=ne(n);q(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}},Z=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(yn=!e,yn&&(e=`<!-->`),typeof e!=`string`&&!dr(e)&&(e=Ge(e),typeof e!=`string`))throw D(`dirty is not a string, aborting`);if(!t.isSupported)return e;Xt?(F=Zt,I=Qt):Pn(n),jn=An,t.removed=[];let c=cn&&typeof e!=`string`&&dr(e),l=[],u=V,d=ln;if(c){rr(e),l=Jn(e);let t=v(e);if(typeof t==`string`){let n=W(t);if(!F[n]||Ut[n])throw Zn(e,l),D(`root node is forbidden and cannot be sanitized in-place`)}if(lr(e))throw Zn(e,l),D(`root node is clobbered and cannot be sanitized in-place`);V=we(),ln=Oe()}else if(dr(e))i=G(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===M.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Er(i);else{if(!en&&!z&&!B&&e.indexOf(`<`)===-1)return _e(e);if(i=G(e),!i)return en?null:nn?b:``}i&&$t&&Vn(i.firstChild);let f=c?e:i;try{c&&Er(e);let t=ir(f);for(;o=t.nextNode();)Tr(o,f);c&&Qn(e,l)}catch(t){throw c&&Zn(e,l),t}finally{V=u,ln=d}if(c){if(Xn(e,l))throw D(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return z&&or(e),e}if(en){if(z&&or(i),tn)for(s=Ve.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(I.shadowroot||I.shadowrootmode)&&(s=He.call(r,s,!0)),s}z&&cr(i);let p=B?i.outerHTML:i.innerHTML;return B&&F[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&E(gt,i.ownerDocument.doctype.name)&&(p=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
3
|
`+p),_e(p)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=jn,i=F,a=I,o=t.removed;jn=null;try{return Z(e,n)}finally{jn=r,r&&(Xt||Pn(r),F=i,I=a,t.removed=o)}},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Pn(e),Xt=!0,Zt=F,Qt=I},t.clearConfig=function(){An=null,Xt=!1,Zt=null,Qt=null,y=de,b=``},t.isValidAttribute=function(e,t,n){An||Pn({});let r=W(e),i=W(t);return typeof n==`string`&&(Cr(t,n)||!Jt&&E(St,n))?!1:yr(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&T(A,e)&&be(A[e],t)},t.removeHook=function(e,t){if(T(A,e)){if(t!==void 0){let n=ve(A[e],t);return n===-1?void 0:Se(A[e],n,1)[0]}return ye(A[e])}},t.removeHooks=function(e){T(A,e)&&(A[e]=[])},t.removeAllHooks=function(){A=At()},t}var Pt=Nt();function Ft(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var It=Ft();function Lt(e){It=e}var Rt={exec:()=>null};function N(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function P(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(F.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var zt=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Bt=`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)`,F={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,textIndentedContinuation:/^(?:\n(?: {4}| {0,3}\t)[ \t]*[^ \t\n][^\n]*)+/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)(\t[ \t]*)/gm,blockquoteFenceOpen:/^ {0,3}(`{3,}(?=[^`]*$)|~{3,})/,blockquoteFenceClose:/^ {0,3}(`{3,}|~{3,})[ \t]*$/,blockquoteListItemStart:/^ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|$)/,nestedBlockMarker:/^ {0,3}(?:(?:[*+-]|\d{1,9}[.)])(?: |$)|> ?)/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableHeader:RegExp(Bt+`(?:\\n|$)`),tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:N(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:N(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:N(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:N(e=>RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:N(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:N(e=>RegExp(`^ {0,${e}}(?:</?(?:${R})(?:[ \\t]+|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,`i`)),blockquoteBeginRegex:N(e=>RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},Vt=/^(?:[ \t]*(?:\n|$))+/,I=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ht=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*)[ \t]*(?=\n|$)|$)/,L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ut=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,R=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Gt=P(` {0,3}(?:</?(?:tag)(?:[ \\t]+|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,R).getRegex(),Kt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,qt=P(Kt).replace(/bull/g,Wt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/\|table/g,``).replace(/html/g,Gt).getRegex(),Jt=P(Kt).replace(/bull/g,Wt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).replace(/html/g,Gt).getRegex(),z=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Yt=/^[^\n]+/,B=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,Xt=P(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<(?:\\.|[^\n<>\\])*>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,B).replace(`title`,/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),Zt=P(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Wt).getRegex(),Qt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$t=P(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*?[ \\t]*/?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Qt).replace(`tag`,R).replace(`attribute`,/[ \t]+[a-zA-Z:_][\w.:-]*(?:[ \t]*=[ \t]*"[^"\n]*"|[ \t]*=[ \t]*'[^'\n]*'|[ \t]*=[ \t]*[^\s"'=<>`]+)?/).getRegex(),en=e=>P(z).replace(`hr`,L).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,Gt).getRegex(),tn=en(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),nn=en(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),rn=/ {0,3}> ?(?:(?!blank)(paragraph)|[^\n]*)(?:\n|$)/,an={blockquote:P(/^(first)(?:next)*/).replace(`first`,P(rn).replace(`blank`,/[ \t]*(?:\n|$)| {4}/).getRegex()).replace(`next`,P(rn).replace(`blank`,/[ \t]*(?:\n|$)/).getRegex()).replace(/paragraph/g,nn).getRegex(),code:I,def:Xt,fences:Ht,heading:Ut,hr:L,html:$t,lheading:qt,list:Zt,newline:Vt,paragraph:tn,table:Rt,text:Yt},on=P(Bt+`(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,L).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,Gt).getRegex(),sn={...an,lheading:Jt,table:on,paragraph:P(z).replace(`hr`,L).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,F.tableHeader).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,Gt).getRegex()},cn={...an,html:P(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace(`comment`,Qt).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Rt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(z).replace(`hr`,L).replace(`heading`,` *#{1,6} *[^
|
|
4
4
|
]`).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).replace(`lheading`,qt).getRegex()},V=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ln=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,un=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,dn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,H=/[\p{P}\p{S}]/u,fn=/[\s\p{P}\p{S}]/u,pn=/[^\s\p{P}\p{S}]/u,mn=P(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,fn).getRegex(),hn=/[\p{Pi}\p{Ps}"']/u,gn=/(?!~)[\p{P}\p{S}]/u,_n=/(?!~)[\s\p{P}\p{S}]/u,U=/(?:[^\s\p{P}\p{S}]|~)/u,vn=P(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,zt?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),yn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,bn=P(yn,`u`).replace(/punct/g,H).getRegex(),xn=P(yn,`u`).replace(/punct/g,gn).getRegex(),Sn=P(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,hn).replace(/punct/g,H).getRegex(),Cn=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,wn=P(Cn,`gu`).replace(/notPunctSpace/g,pn).replace(/punctSpace/g,fn).replace(/punct/g,H).getRegex(),Tn=P(Cn,`gu`).replace(/notPunctSpace/g,U).replace(/punctSpace/g,_n).replace(/punct/g,gn).getRegex(),En=P(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,pn).replace(/punctSpace/g,fn).replace(/punct/g,H).getRegex(),Dn=P(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,pn).replace(/punctSpace/g,fn).replace(/punct/g,H).getRegex(),On=P(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,pn).replace(/punctSpace/g,fn).replace(/punct/g,H).getRegex(),kn=P(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,H).getRegex(),W=P(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,pn).replace(/punctSpace/g,fn).replace(/punct/g,H).getRegex(),An=P(/\\(punct)/,`gu`).replace(/punct/g,H).getRegex(),jn=P(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,`gu`).replace(/punct/g,H).getRegex(),Mn=P(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Nn=P(Qt).replace(`(?:-->|$)`,`-->`).getRegex(),Pn=P(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Nn).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Fn=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,In=P(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Fn).getRegex(),Ln=/\\[^ \t\n\x00-\x1f]|\\(?=[ \t\n])|[^ \t\n\x00-\x1f\\()]/,Rn=P(/\((?:char)*\)/).replace(`char`,Ln).getRegex(),zn=P(/\((?:char|p1)*\)/).replace(`char`,Ln).replace(`p1`,Rn).getRegex(),Bn=P(/\((?:char|p2)*\)/).replace(`char`,Ln).replace(`p2`,zn).getRegex(),Vn=P(/(?!<)(?:char|p3)+/).replace(`char`,Ln).replace(`p3`,Bn).getRegex(),Hn=P(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,In).replace(`href`,P(/<(?:\\.|[^\n<>\\])*>|bareHref|(?=\))/).replace(`bareHref`,Vn).getRegex()).replace(`title`,/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Un=P(/^!?\[(label)\]\[(ref)\]/).replace(`label`,In).replace(`ref`,B).getRegex(),Wn=P(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,B).getRegex(),Gn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Kn=P(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Fn).getRegex(),qn=P(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,P(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Kn).replace(`ref`,Gn).getRegex()).replace(`nolink`,P(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Gn).getRegex()).getRegex(),Jn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Yn=P(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Xn={_backpedal:Rt,anyPunctuation:An,anyPunctuationOutsideCode:jn,autolink:Mn,blockSkip:vn,br:un,code:ln,del:Rt,delLDelim:Rt,delRDelim:Rt,emStrongLDelim:bn,emStrongRDelimAst:wn,emStrongRDelimUnd:Dn,escape:V,link:Hn,nolink:Wn,punctuation:mn,reflink:Un,reflinkSearch:qn,tag:Pn,text:dn,url:Rt},Zn={...Xn,emStrongLDelim:Sn,emStrongRDelimAst:En,emStrongRDelimUnd:On,link:P(/^!?\[(label)\]\((.*?)\)/).replace(`label`,In).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,In).getRegex()},Qn={...Xn,emStrongRDelimAst:Tn,emStrongLDelim:xn,delLDelim:kn,delRDelim:W,url:P(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,Yn).replace(`protocol`,Jn).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:P(/^(?:[A-Za-z0-9.+-]+(?=@)|[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,Jn).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace(`wwwStart`,zt?`(?<![^\\s*_~(])www\\.`:`www\\.`).getRegex()},$n={...Qn,br:P(un).replace(`{2,}`,`*`).getRegex(),text:P(Qn.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},er={normal:an,gfm:sn,pedantic:cn},tr={normal:Xn,gfm:Qn,breaks:$n,pedantic:Zn},nr={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},rr=e=>nr[e];function G(e,t){if(t){if(F.escapeTest.test(e))return e.replace(F.escapeReplace,rr)}else if(F.escapeTestNoEncode.test(e))return e.replace(F.escapeReplaceNoEncode,rr);return e}function ir(e){return F.numericCharacterReference.test(e)?e.replace(F.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return`&`;let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:r===38?`&`:String.fromCodePoint(r)}):e}function ar(e){try{e=encodeURI(e).replace(F.percentDecode,`%`)}catch{return null}return e}function or(e,t){let n=e.replace(F.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(F.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(F.slashPipe,`|`);return n}function K(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function sr(e){let t=e.split(`
|
|
@@ -75,9 +75,9 @@ ${e}</tr>
|
|
|
75
75
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
76
76
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${G(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?G(n,!0):this.parser.parseInline(r),o=ar(e);if(o===null)return a;e=G(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+G(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(Cr(r),this.parser.textRenderer));let i=ar(e);if(i===null)return G(n);e=i;let a=`<img src="${G(e)}" alt="${G(n)}"`;return t&&(a+=` title="${G(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:G(e.text)}},Tr=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`
|
|
77
77
|
`}checkbox({raw:e}){return e}},X=class e{options;renderer;textRenderer;constructor(e){this.options=e||It,this.options.renderer=this.options.renderer||new wr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Tr,this.textRenderer.parser=this}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n],i=this.options.extensions?.renderers;if(i&&Object.hasOwn(i,r.type)&&i[r.type]){let e=r,n=i[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n===!1?``:n??``;continue}}let a=r;switch(a.type){case`space`:t+=this.renderer.space(a);break;case`hr`:t+=this.renderer.hr(a);break;case`heading`:t+=this.renderer.heading(a);break;case`code`:t+=this.renderer.code(a);break;case`table`:t+=this.renderer.table(a);break;case`blockquote`:t+=this.renderer.blockquote(a);break;case`list`:t+=this.renderer.list(a);break;case`checkbox`:t+=this.renderer.checkbox(a);break;case`html`:t+=this.renderer.html(a);break;case`def`:t+=this.renderer.def(a);break;case`paragraph`:t+=this.renderer.paragraph(a);break;case`text`:t+=this.renderer.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r],a=this.options.extensions?.renderers;if(a&&Object.hasOwn(a,i.type)&&a[i.type]){let e=a[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e===!1?``:e??``;continue}}let o=i;switch(o.type){case`escape`:n+=t.text(o);break;case`html`:n+=t.html(o);break;case`link`:n+=t.link(o);break;case`image`:n+=t.image(o);break;case`checkbox`:n+=t.checkbox(o);break;case`strong`:n+=t.strong(o);break;case`em`:n+=t.em(o);break;case`codespan`:n+=t.codespan(o);break;case`br`:n+=t.br(o);break;case`del`:n+=t.del(o);break;case`text`:n+=t.text(o);break;default:{let e=`Token with "`+o.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Er=class{options;block;constructor(e){this.options=e||It}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Y.lex:Y.lexInline}provideParser(e=this.block){return e?X.parse:X.parseInline}};function Z(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);else e.push(t)}var Dr=class{defaults=Ft();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=X;Renderer=wr;TextRenderer=Tr;Lexer=Y;Tokenizer=Sr;Hooks=Er;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(Z(n,t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)Z(n,this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)Z(n,this.walkTokens(e.tokens,t));break}case`list`:{let e=r;Z(n,this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{if(e[r]){let i=e[r].flat(1/0);Z(n,this.walkTokens(i,t))}}):e.tokens&&Z(n,this.walkTokens(e.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new wr(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n===!1?``:n??``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Sr(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Er;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Er.passThroughHooks.has(n)?e=>{if(t.options.async&&Er.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(t.options.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return Z(n,r.call(this,e)),t&&Z(n,t.call(this,e)),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Y.lex(e,t??this.defaults)}parser(e,t){return X.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Y.lex:Y.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?X.parse:X.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Y.lex:Y.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?X.parse:X.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
78
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+G(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Or=new Dr;function Q(e,t){return Or.parse(e,t)}Q.options=Q.setOptions=function(e){return Or.setOptions(e),Q.defaults=Or.defaults,Lt(Q.defaults),Q},Q.getDefaults=Ft,Q.defaults=It;function kr(...e){return Or.use(...e),Q.defaults=Or.defaults,Lt(Q.defaults),Q}Q.use=kr,Q.walkTokens=function(e,t){return Or.walkTokens(e,t)},Q.parseInline=Or.parseInline,Q.Parser=X,Q.parser=X.parse,Q.Renderer=wr,Q.TextRenderer=Tr,Q.Lexer=Y,Q.lexer=Y.lex,Q.Tokenizer=Sr,Q.Hooks=Er,Q.parse=Q,Q.options,Q.setOptions,Q.walkTokens,Q.parseInline,X.parse,Y.lex;var Ar=i(r(),1),$=n(),jr=new Dr({gfm:!0,breaks:!0});Pt.addHook(`afterSanitizeAttributes`,e=>{e.tagName===`A`&&e.getAttribute(`href`)?.match(/^https?:\/\//)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`))});function Mr(e){return Pt.sanitize(jr.parse(e??``,{async:!1}))}function Nr(e){return Pt.sanitize(jr.parseInline(e??``,{async:!1}))}function Pr({source:e,className:n}){let r=(0,Ar.useMemo)(()=>Mr(e),[e]);return(0,$.jsx)(`div`,{className:t(`ck-prose`,n),dangerouslySetInnerHTML:{__html:r}})}function Fr({source:e,className:n}){let r=(0,Ar.useMemo)(()=>Nr(e),[e]);return(0,$.jsx)(`span`,{className:t(`ck-inline-prose`,n),dangerouslySetInnerHTML:{__html:r}})}var Ir=[{icon:(0,$.jsx)(u,{}),label:`Heading`,apply:e=>({text:`## ${e||`Heading`}`})},{icon:(0,$.jsx)(ee,{}),label:`Bold`,apply:e=>({text:`**${e||`bold text`}**`})},{icon:(0,$.jsx)(f,{}),label:`Italic`,apply:e=>({text:`_${e||`italic text`}_`})},{icon:(0,$.jsx)(
|
|
78
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+G(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Or=new Dr;function Q(e,t){return Or.parse(e,t)}Q.options=Q.setOptions=function(e){return Or.setOptions(e),Q.defaults=Or.defaults,Lt(Q.defaults),Q},Q.getDefaults=Ft,Q.defaults=It;function kr(...e){return Or.use(...e),Q.defaults=Or.defaults,Lt(Q.defaults),Q}Q.use=kr,Q.walkTokens=function(e,t){return Or.walkTokens(e,t)},Q.parseInline=Or.parseInline,Q.Parser=X,Q.parser=X.parse,Q.Renderer=wr,Q.TextRenderer=Tr,Q.Lexer=Y,Q.lexer=Y.lex,Q.Tokenizer=Sr,Q.Hooks=Er,Q.parse=Q,Q.options,Q.setOptions,Q.walkTokens,Q.parseInline,X.parse,Y.lex;var Ar=i(r(),1),$=n(),jr=new Dr({gfm:!0,breaks:!0});Pt.addHook(`afterSanitizeAttributes`,e=>{e.tagName===`A`&&e.getAttribute(`href`)?.match(/^https?:\/\//)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`))});function Mr(e){return Pt.sanitize(jr.parse(e??``,{async:!1}))}function Nr(e){return Pt.sanitize(jr.parseInline(e??``,{async:!1}))}function Pr({source:e,className:n}){let r=(0,Ar.useMemo)(()=>Mr(e),[e]);return(0,$.jsx)(`div`,{className:t(`ck-prose`,n),dangerouslySetInnerHTML:{__html:r}})}function Fr({source:e,className:n}){let r=(0,Ar.useMemo)(()=>Nr(e),[e]);return(0,$.jsx)(`span`,{className:t(`ck-inline-prose`,n),dangerouslySetInnerHTML:{__html:r}})}var Ir=[{icon:(0,$.jsx)(u,{}),label:`Heading`,apply:e=>({text:`## ${e||`Heading`}`})},{icon:(0,$.jsx)(ee,{}),label:`Bold`,apply:e=>({text:`**${e||`bold text`}**`})},{icon:(0,$.jsx)(f,{}),label:`Italic`,apply:e=>({text:`_${e||`italic text`}_`})},{icon:(0,$.jsx)(o,{}),label:`Link`,apply:e=>({text:`[${e||`link text`}](https://)`})},{icon:(0,$.jsx)(c,{}),label:`Code`,apply:e=>({text:e.includes(`
|
|
79
79
|
`)?`\`\`\`\n${e}\n\`\`\``:`\`${e||`code`}\``})},{icon:(0,$.jsx)(re,{}),label:`Quote`,apply:e=>({text:`> ${e||`Quote`}`})},{icon:(0,$.jsx)(g,{}),label:`Bulleted list`,apply:e=>({text:(e||`Item`).split(`
|
|
80
80
|
`).map(e=>`- ${e}`).join(`
|
|
81
81
|
`)})},{icon:(0,$.jsx)(te,{}),label:`Numbered list`,apply:e=>({text:(e||`Item`).split(`
|
|
82
82
|
`).map((e,t)=>`${t+1}. ${e}`).join(`
|
|
83
|
-
`)})}];function Lr({value:e,onChange:n,placeholder:r,rows:i=8,id:
|
|
83
|
+
`)})}];function Lr({value:e,onChange:n,placeholder:r,rows:i=8,id:o,className:s,autoFocus:c}){let[l,u]=(0,Ar.useState)(`write`),d=(0,Ar.useRef)(null),f=t=>{let r=d.current;if(!r)return;let i=r.selectionStart,a=r.selectionEnd,{text:o}=t.apply(e.slice(i,a));n(e.slice(0,i)+o+e.slice(a)),requestAnimationFrame(()=>{r.focus(),r.setSelectionRange(i,i+o.length)})};return(0,$.jsxs)(`div`,{className:t(`overflow-hidden rounded-lg border border-input bg-card shadow-xs focus-within:border-primary focus-within:ring-3 focus-within:ring-primary/15`,s),children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b bg-muted/40 px-1.5 py-1`,children:[(0,$.jsx)(`div`,{className:`flex items-center gap-0.5`,children:[`write`,`preview`].map(e=>(0,$.jsx)(`button`,{type:`button`,onClick:()=>u(e),className:t(`rounded-md px-2.5 py-1 text-xs font-medium capitalize text-muted-foreground transition-colors hover:text-foreground`,l===e&&`bg-card text-foreground shadow-xs`),children:e},e))}),l===`write`&&(0,$.jsx)(`div`,{className:`flex items-center gap-0.5 overflow-x-auto`,children:Ir.map(e=>(0,$.jsx)(`button`,{type:`button`,title:e.label,onClick:()=>f(e),className:`grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground [&_svg]:size-3.5`,children:e.icon},e.label))})]}),l===`write`?(0,$.jsx)(a,{ref:d,id:o,value:e,rows:i,autoFocus:c,placeholder:r,onChange:e=>n(e.target.value),className:`rounded-none border-0 font-mono text-[13px] shadow-none focus-visible:ring-0`}):(0,$.jsx)(`div`,{className:`min-h-24 px-4 py-3`,style:{minHeight:`${i*1.6}rem`},children:e.trim()?(0,$.jsx)(Pr,{source:e,className:`prose-sm`}):(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing to preview yet.`})}),(0,$.jsx)(`div`,{className:`border-t px-3 py-1.5 text-[11px] text-muted-foreground`,children:"Markdown supported: **bold**, _italic_, `code`, lists, tables and links."})]})}export{te as i,Pr as n,Lr as r,Fr as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`message-square-text`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,H as t,L as n,V as r,_ as i,dt as a,ft as o,g as s,h as c,mt as l,pt as u}from"./hooks-BBARn-DA.js";var d=u((e=>{var t=o();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=i.p;try{if(u.T=null,i.p=2,e)return e()}finally{u.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),f=u(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=d()})),p=l(o(),1),m=l(f(),1);function h(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var g=e=>{switch(e){case`success`:return y;case`info`:return x;case`warning`:return b;case`error`:return S;default:return null}},_=Array(12).fill(0),v=({visible:e,className:t})=>p.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},p.createElement(`div`,{className:`sonner-spinner`},_.map((e,t)=>p.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),y=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),b=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),x=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),S=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),ee=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},p.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),C=()=>{let[e,t]=p.useState(document.hidden);return p.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},w=1,T=100,te=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:w++,E=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-T;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=te(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],p.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(ne(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=te(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},D=(e,t)=>E.message(e,t),ne=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,O=Object.assign(D,{success:E.success,info:E.info,warning:E.warning,error:E.error,custom:E.custom,message:E.message,promise:E.promise,dismiss:E.dismiss,loading:E.loading},{getHistory:()=>E.toasts,getToasts:()=>E.getActiveToasts()});h(`[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;flex:1;min-width:0}[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(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);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]{-webkit-user-select:none;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%)}`);function k(e){return e.label!==void 0}var re=3,ie=`24px`,ae=`16px`,oe=4e3,se=356,ce=14,A=45,j=200;function M(...e){return e.filter(Boolean).join(` `)}function N(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var le=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:m,style:h,cancelButtonStyle:_,actionButtonStyle:y,className:b=``,descriptionClassName:x=``,duration:S,position:w,gap:T,expandByDefault:te,classNames:E,icons:D,closeButtonAriaLabel:ne=`Close toast`}=e,[O,re]=p.useState(null),[ie,ae]=p.useState(null),[se,ce]=p.useState(!1),[le,ue]=p.useState(!1),[de,P]=p.useState(!1),[F,fe]=p.useState(!1),[I,pe]=p.useState(!1),[me,L]=p.useState(0),[he,ge]=p.useState(0),R=p.useRef(n.duration||S||oe),_e=p.useRef(null),z=p.useRef(null),ve=c===0,B=c+1<=o,V=n.type,H=V??`default`,U=n.dismissible!==!1,ye=n.className||``,be=n.descriptionClassName||``,W=p.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),xe=p.useMemo(()=>n.closeButton??m,[n.closeButton,m]),Se=p.useMemo(()=>n.duration||S||oe,[n.duration,S]),Ce=p.useRef(0),G=p.useRef(0),we=p.useRef(0),K=p.useRef(null),[Te,Ee]=w.split(`-`),De=p.useMemo(()=>s.reduce((e,t,n)=>n>=W?e:e+t.height,0),[s,W]),q=C(),J=p.useMemo(()=>e.swipeDirections??N(w),[e.swipeDirections,w]),Y=n.invert||t,Oe=V===`loading`;G.current=p.useMemo(()=>W*T+De,[W,De]),p.useEffect(()=>{R.current=Se},[Se]),p.useEffect(()=>{ce(!0)},[]),p.useEffect(()=>{let e=z.current;if(e){let t=e.getBoundingClientRect().height;return ge(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),p.useLayoutEffect(()=>{if(!se)return;let e=z.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ge(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[se,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let X=p.useCallback(()=>{ue(!0),L(G.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},j)},[n,d,a,G]);p.useEffect(()=>{if(n.promise&&V===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||q?(()=>{if(we.current<Ce.current){let e=new Date().getTime()-Ce.current;R.current-=e}we.current=new Date().getTime()})():R.current!==1/0&&(Ce.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),X()},R.current)),()=>clearTimeout(e)},[u,i,n,V,q,X]),p.useEffect(()=>{n.delete&&(X(),n.onDismiss==null||n.onDismiss.call(n,n))},[X,n.delete]);function ke(){return D?.loading?p.createElement(`div`,{className:M(E?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":V===`loading`},D.loading):p.createElement(v,{className:M(E?.loader,n?.classNames?.loader),visible:V===`loading`})}let Ae=n.icon||D?.[V]||g(V);return p.createElement(`li`,{tabIndex:0,ref:z,className:M(b,ye,E?.toast,n?.classNames?.toast,E?.[H],n?.classNames?.[H]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":se,"data-promise":!!n.promise,"data-swiped":I,"data-removed":le,"data-visible":B,"data-y-position":Te,"data-x-position":Ee,"data-index":c,"data-front":ve,"data-swiping":de,"data-dismissible":U,"data-type":V,"data-invert":Y,"data-swipe-out":F,"data-swipe-direction":ie,"data-expanded":!!(u||te&&se),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${le?me:G.current}px`,"--initial-height":te?`auto`:`${he}px`,...h,...n.style},onDragEnd:()=>{P(!1),re(null),K.current=null},onPointerDown:e=>{e.button!==2&&!Oe&&U&&(_e.current=new Date,L(G.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),K.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(F||!U)return;K.current=null;let e=Number(z.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(z.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-_e.current?.getTime(),i=O===`x`?e:t,a=Math.abs(i)/r;if((O===`x`?J.includes(e>0?`right`:`left`):J.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=A||a>.11))L(G.current),n.onDismiss==null||n.onDismiss.call(n,n),ae(O===`x`?e>0?`right`:`left`:t>0?`down`:`up`),X(),fe(!0);else{var o,s;(o=z.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=z.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),pe(!1),P(!1),re(null)}},onPointerMove:e=>{var t,n;if(!K.current||!U||window.getSelection()?.toString().length>0)return;let r=e.clientY-K.current.y,i=e.clientX-K.current.x;!O&&(Math.abs(i)>1||Math.abs(r)>1)&&re(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(O===`y`){if(J.includes(`top`)||J.includes(`bottom`)){if(J.includes(`top`)&&r<0||J.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(O===`x`&&(J.includes(`left`)||J.includes(`right`))){if(J.includes(`left`)&&i<0||J.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&pe(!0),(t=z.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=z.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},xe&&!n.jsx&&V!==`loading`?p.createElement(`button`,{"aria-label":ne,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!U?()=>{}:()=>{X(),n.onDismiss==null||n.onDismiss.call(n,n)},className:M(E?.closeButton,n?.classNames?.closeButton)},D?.close??ee):null,(V||n.icon||n.promise)&&n.icon!==null&&(D?.[V]!==null||n.icon)?p.createElement(`div`,{"data-icon":``,className:M(E?.icon,n?.classNames?.icon)},V===`loading`?n.icon||ke():n.promise?ke():null,V===`loading`?null:Ae):null,p.createElement(`div`,{"data-content":``,className:M(E?.content,n?.classNames?.content)},p.createElement(`div`,{"data-title":``,className:M(E?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?p.createElement(`div`,{"data-description":``,className:M(x,be,E?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),p.isValidElement(n.cancel)?n.cancel:n.cancel&&k(n.cancel)?p.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||_,onClick:e=>{k(n.cancel)&&U&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),X())},className:M(E?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,p.isValidElement(n.action)?n.action:n.action&&k(n.action)?p.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||y,onClick:e=>{k(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||X())},className:M(E?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function ue(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function de(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ae:ie;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var P=p.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:h,style:g,visibleToasts:_=re,toastOptions:v,dir:y=ue(),gap:b=ce,icons:x,customAriaLabel:S,containerAriaLabel:ee=`Notifications`}=e,[C,w]=p.useState([]),T=p.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),te=p.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,ne]=p.useState([]),[O,k]=p.useState(!1),[ie,ae]=p.useState(!1),[oe,A]=p.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),j=p.useRef(null),M=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),N=p.useRef(null),P=p.useRef(!1),F=p.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||E.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return p.useEffect(()=>E.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{m.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),p.useEffect(()=>{if(d!==`system`){A(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?A(`dark`):A(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{A(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{A(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),p.useEffect(()=>{C.length<=1&&k(!1)},[C]),p.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),p.useEffect(()=>{if(j.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,P.current=!1)}},[j.current]),p.createElement(`section`,{ref:t,"aria-label":S??`${ee} ${M}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},te.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?p.createElement(`ol`,{key:t,dir:y===`auto`?ue():y,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":oe,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${se}px`,"--gap":`${b}px`,...g,...de(l,u)},onBlur:e=>{P.current&&!e.currentTarget.contains(e.relatedTarget)&&(P.current=!1,N.current&&=(N.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||P.current||(P.current=!0,N.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{ie||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ae(!0)},onPointerUp:()=>ae(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>p.createElement(le,{key:n.id,icons:x,index:i,toast:n,defaultRichColors:f,duration:v?.duration??h,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:r,visibleToasts:_,closeButton:v?.closeButton??s,interacting:ie,position:t,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:F,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:ne,expandByDefault:o,gap:b,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),F={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};F.node;var fe=t(F),I=a(),pe=Object.defineProperty,me=(e,t)=>pe(e,`name`,{value:t,configurable:!0}),L=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let r=n(`Primitive.${t}`),i=p.forwardRef((e,n)=>{let{asChild:i,...a}=e,o=i?r:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,I.jsx)(o,{...a,ref:n})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function he(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}me(he,`dispatchDiscreteCustomEvent`);var ge=Object.defineProperty,R=(e,t)=>ge(e,`name`,{value:t,configurable:!0});function _e(e,t){let n=p.createContext(t);n.displayName=e+`Context`;let r=R(e=>{let{children:t,...r}=e,i=p.useMemo(()=>r,Object.values(r));return(0,I.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=p.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return R(i,`useContext`),[r,i]}R(_e,`createContext`);function z(e,t=[]){let n=[];function r(t,r){let i=p.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=R(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=p.useMemo(()=>o,Object.values(o));return(0,I.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=p.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return R(s,`useContext`),[o,s]}R(r,`createContext`);let i=R(()=>{let t=n.map(e=>p.createContext(e));return R(function(n){let r=n?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,ve(i,...t)]}R(z,`createContextScope`);function ve(...e){let t=e[0];if(e.length===1)return t;let n=R(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return R(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}R(ve,`composeContextScopes`);var B=globalThis?.document?p.useLayoutEffect:()=>{},V=Object.defineProperty,H=(e,t)=>V(e,`name`,{value:t,configurable:!0});function U(t){let r=t+`CollectionProvider`,[i,a]=z(r),[o,s]=i(r,{collectionRef:{current:null},itemMap:new Map}),c=H(e=>{let{scope:t,children:n}=e,r=p.useRef(null),i=p.useRef(new Map).current;return(0,I.jsx)(o,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=r;let l=t+`CollectionSlot`,u=n(l),d=p.forwardRef((t,n)=>{let{scope:r,children:i}=t,a=s(l,r),o=e(n,a.collectionRef);return(0,I.jsx)(u,{ref:o,children:i})});d.displayName=l;let f=t+`CollectionItemSlot`,m=`data-radix-collection-item`,h=n(f),g=p.forwardRef((t,n)=>{let{scope:r,children:i,...a}=t,o=p.useRef(null),c=e(n,o),l=s(f,r);return p.useEffect(()=>(l.itemMap.set(o,{ref:o,...a}),()=>void l.itemMap.delete(o))),(0,I.jsx)(h,{[m]:``,ref:c,children:i})});g.displayName=f;function _(e){let n=s(t+`CollectionConsumer`,e);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return H(_,`useCollection`),[{Provider:c,Slot:d,ItemSlot:g},_,a]}H(U,`createCollection`);var ye=new WeakMap,be=class e extends Map{static{H(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ye.set(this,!0)}set(e,t){return ye.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=Se(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=W(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=W(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return W(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function W(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=xe(e,t);return n===-1?void 0:e[n]}H(W,`at`);function xe(e,t){let n=e.length,r=Se(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}H(xe,`toSafeIndex`);function Se(e){return e!==e||e===0?0:Math.trunc(e)}H(Se,`toSafeInteger`);function Ce(t){let r=t+`CollectionProvider`,[i,a]=z(r),[o,s]=i(r);o.displayName=t+`CollectionStableContextProvider`;let[c,l]=i(r);c.displayName=t+`CollectionStatefulContextProvider`;let u=H(({state:e,...t})=>e?(0,I.jsx)(f,{...t,state:e}):(0,I.jsx)(d,{...t}),`CollectionProvider`);u.displayName=r;let d=H(e=>{let t=b();return(0,I.jsx)(f,{...e,state:t})},`CollectionInit`);d.displayName=t+`CollectionInit`;let f=H(t=>{let{scope:n,children:r,state:i}=t,a=p.useRef(null),[s,l]=p.useState(null),u=e(a,l),[d,f]=i,m=p.useRef(new be),h=p.useCallback(()=>{let e=m.current;return K(e)||e.sort(Te),e},[]);return p.useEffect(()=>{if(!s)return;let e=Ee(()=>{f(e=>{let t=e.toSorted(Te);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,f]),(0,I.jsx)(o,{scope:n,collectionElementRef:u,collectionElementRefObject:a,getCollection:h,setCollection:f,registryRef:m,children:(0,I.jsx)(c,{scope:n,collectionElement:s,collection:d,children:r})})},`CollectionProviderImpl`);f.displayName=t+`CollectionProviderImpl`;let m=t+`CollectionSlot`,h=n(m),g=p.forwardRef((t,n)=>{let{scope:r,children:i}=t,a=s(m,r),o=e(n,a.collectionElementRef);return(0,I.jsx)(h,{ref:o,children:i})});g.displayName=m;let _=t+`CollectionItemSlot`,v=n(_),y=p.forwardRef((t,n)=>{let{scope:r,children:i,...a}=t,o=p.useRef(null),{setCollection:c,registryRef:l}=s(_,r),u=p.useRef(a);G(u.current,a)||(u.current=a);let d=u.current,f=p.useCallback(e=>{let t=l.current;e?t.set(e,{...u.current,element:e}):o.current&&t.delete(o.current)},[l]),m=e(n,f,o);B(()=>{let e=o.current,t=l.current;e&&t.has(e)&&t.set(e,{...d,element:e})},[d,l]);let h=p.useRef(null);return p.useEffect(()=>{let e=o.current,t=h.current;((t?.element??null)!==e||e&&t?.itemData!==d)&&(h.current=e?{element:e,itemData:d}:null,c(n=>{let r=new be(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...d,element:e}),r.sort(Te)}))}),p.useEffect(()=>()=>{let e=h.current;h.current=null,e&&c(t=>{if(!t.has(e.element))return t;let n=new be(t);return n.delete(e.element),n})},[c]),(0,I.jsx)(v,{"data-radix-collection-item":``,ref:m,children:i})});y.displayName=_;function b(){return p.useState(new be)}H(b,`useInitCollection`);function x(e){let{collection:n}=l(t+`CollectionConsumer`,e);return n}H(x,`useCollection`);function S(e){let{getCollection:n}=s(t+`CollectionConsumer`,e);return n}return H(S,`useGetCollection`),[{Provider:u,Slot:g,ItemSlot:y},{createCollectionScope:a,useCollection:x,useGetCollection:S,useInitCollection:b}]}H(Ce,`createCollection`);function G(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}H(G,`shallowEqual`);function we(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}H(we,`isElementPreceding`);function K(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}H(K,`isInDocumentOrder`);function Te(e,t){return!e[1].element||!t[1].element?0:we(e[1].element,t[1].element)?-1:1}H(Te,`sortByDocumentPosition`);function Ee(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}H(Ee,`getChildListObserver`);var De=Object.defineProperty,q=(e,t)=>De(e,`name`,{value:t,configurable:!0}),J=!!(typeof window<`u`&&window.document&&window.document.createElement);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return q(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}q(Y,`composeEventHandlers`);function Oe(e){if(!J)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}q(Oe,`getOwnerWindow`);function X(e){if(!J)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}q(X,`getOwnerDocument`);function ke(e,t=!1){let{activeElement:n}=X(e);if(!n?.nodeName)return null;if(Ae(n)&&n.contentDocument)return ke(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=X(n).getElementById(e);if(t)return t}}return n}q(ke,`getActiveElement`);function Ae(e){return e.tagName===`IFRAME`}q(Ae,`isFrame`);var je=Object.defineProperty,Me=(e,t)=>je(e,`name`,{value:t,configurable:!0}),Ne=p.useEffectEvent,Pe=p.useInsertionEffect;function Fe(e){if(typeof Ne==`function`)return Ne(e);let t=p.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Pe==`function`?Pe(()=>{t.current=e}):B(()=>{t.current=e}),p.useMemo(()=>((...e)=>t.current?.(...e)),[])}Me(Fe,`useEffectEvent`);var Ie=Object.defineProperty,Le=(e,t)=>Ie(e,`name`,{value:t,configurable:!0}),Re=p.useInsertionEffect||B;function ze({prop:e,defaultProp:t,onChange:n=Le(()=>{},`onChange`),caller:r}){let[i,a,o]=Be({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,p.useCallback(t=>{if(s){let n=Ve(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Le(ze,`useControllableState`);function Be({defaultProp:e,onChange:t}){let[n,r]=p.useState(e),i=p.useRef(n),a=p.useRef(t);return Re(()=>{a.current=t},[t]),p.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Le(Be,`useUncontrolledState`);function Ve(e){return typeof e==`function`}Le(Ve,`isFunction`);var He=Symbol(`RADIX:SYNC_STATE`);function Ue(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Fe(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=p.useReducer((t,n)=>{if(n.type===He)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),m=d.state,h=p.useRef(m);p.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let g=p.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return p.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:He,state:i})},[i,d.state,c]),[g,f]}Le(Ue,`useControllableStateReducer`);var We=Object.defineProperty,Z=(e,t)=>We(e,`name`,{value:t,configurable:!0});function Ge(e,t){return p.useReducer((e,n)=>t[e][n]??e,e)}Z(Ge,`useStateMachine`);var Ke=Z(e=>{let{present:t,children:n}=e,r=qe(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=Ye(r.ref,Xe(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null},`Presence`);function qe(e){let[t,n]=p.useState(),r=p.useRef(null),i=p.useRef(e),a=p.useRef(`none`),o=p.useRef(void 0),[s,c]=Ge(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{s===`mounted`?(a.current=o.current??Q(r.current),o.current=void 0):a.current=`none`},[s]),B(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Q(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),B(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Z(a=>{let o=Q(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Z(e=>{e.target===t&&(a.current=Q(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:p.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Q(t)}else r.current=null;n(e)},[])}}Z(qe,`usePresence`);function Je(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Z(Je,`setRef`);function Ye(...e){let t=p.useRef(e);return t.current=e,p.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Je(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Je(n[e],null)}}},[])}Z(Ye,`useStableComposedRefs`);function Q(e){return e?.animationName||`none`}Z(Q,`getAnimationName`);function Xe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Z(Xe,`getElementRef`);var Ze=Object.defineProperty,Qe=(e,t)=>Ze(e,`name`,{value:t,configurable:!0}),$e=p.useId||(()=>void 0),et=0;function tt(e){let[t,n]=p.useState($e());return B(()=>{e||n(e=>e??String(et++))},[e]),e||(t?`radix-${t}`:``)}Qe(tt,`useId`);var nt=Object.defineProperty,rt=(e,t)=>nt(e,`name`,{value:t,configurable:!0}),it={LTR:`ltr`,RTL:`rtl`},at=p.createContext(void 0);function ot(e){let t=p.useContext(at);return e||t||it.LTR}rt(ot,`useDirection`);var st=Object.defineProperty,ct=(e,t)=>st(e,`name`,{value:t,configurable:!0}),lt=p.useInsertionEffect;function ut(e){let t=p.useRef(e);return typeof lt==`function`?lt(()=>{t.current=e}):B(()=>{t.current=e}),p.useMemo(()=>((...e)=>t.current?.(...e)),[])}ct(ut,`useCallbackRef`);var dt=Object.defineProperty,ft=(e,t)=>dt(e,`name`,{value:t,configurable:!0}),pt=!1;function mt(){let[e,t]=p.useState(pt);return p.useEffect(()=>{pt||(pt=!0,t(!0))},[]),e}ft(mt,`useIsHydrated`);var ht=p.useSyncExternalStore;function gt(){return()=>{}}ft(gt,`subscribe`);function _t(){return ht(gt,()=>!0,()=>!1)}ft(_t,`useIsHydratedModern`);var vt=typeof ht==`function`?_t:mt,yt=Object.defineProperty,$=(e,t)=>yt(e,`name`,{value:t,configurable:!0}),bt=`rovingFocusGroup.onEntryFocus`,xt={bubbles:!1,cancelable:!0},St=`RovingFocusGroup`,[Ct,wt,Tt]=U(St),[Et,Dt]=z(St,[Tt]),Ot={Vertical:`vertical`,Horizontal:`horizontal`},kt={LTR:`ltr`,RTL:`rtl`},[At,jt]=Et(St),Mt=p.forwardRef($(function(e,t){return(0,I.jsx)(Ct.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Ct.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Nt,{...e,ref:t})})})},`RovingFocusGroup`)),Nt=p.forwardRef($(function(t,n){let{__scopeRovingFocusGroup:r,orientation:i,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,m=p.useRef(null),h=e(n,m),g=ot(o),[_,v]=ze({prop:s,defaultProp:c??null,onChange:l,caller:St}),[y,b]=p.useState(!1),x=ut(u),S=wt(r),ee=p.useRef(!1),[C,w]=p.useState(0);return p.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(bt,x),()=>e.removeEventListener(bt,x)},[x]),(0,I.jsx)(At,{scope:r,orientation:i,dir:g,loop:a,currentTabStopId:_,onItemFocus:p.useCallback(e=>v(e),[v]),onItemShiftTab:p.useCallback(()=>b(!0),[]),onFocusableItemAdd:p.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>w(e=>e-1),[]),children:(0,I.jsx)(L.div,{tabIndex:y||C===0?-1:0,"data-orientation":i,...f,ref:h,style:{outline:`none`,...t.style},onMouseDown:Y(t.onMouseDown,()=>{ee.current=!0}),onFocus:Y(t.onFocus,e=>{let t=!ee.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(bt,xt);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);zt([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),d)}}ee.current=!1}),onBlur:Y(t.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),Pt=`RovingFocusGroupItem`,Ft=p.forwardRef($(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=tt(),l=a||c,u=jt(Pt,n),d=u.currentTabStopId===l,f=wt(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=u,_=vt();return B(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),p.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),(0,I.jsx)(Ct.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(L.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Y(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Y(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Y(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Rt(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Bt(n,r+1):n.slice(r+1)}setTimeout(()=>zt(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:g!=null}):o})})},`RovingFocusGroupItem`)),It={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Lt(e,t){return t===kt.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}$(Lt,`getDirectionAwareKey`);function Rt(e,t,n){let r=Lt(e.key,n);if(!(t===Ot.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Ot.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return It[r]}$(Rt,`getFocusIntent`);function zt(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}$(zt,`focusFirst`);function Bt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$(Bt,`wrapArray`);var Vt=Object.defineProperty,Ht=(e,t)=>Vt(e,`name`,{value:t,configurable:!0}),Ut=`Tabs`,[Wt,Gt]=z(Ut,[Dt]);Dt();var[Kt,qt]=Wt(Ut);function Jt(e,t){return`${e}-trigger-${t}`}Ht(Jt,`makeTriggerId`);function Yt(e,t){return`${e}-content-${t}`}Ht(Yt,`makeContentId`);function Xt({value:e,className:t,tone:n=`primary`}){let r=Math.max(0,Math.min(100,e));return(0,I.jsx)(`div`,{className:i(`h-1.5 w-full overflow-hidden rounded-full`,n===`white`?`bg-white/25`:`bg-muted`,t),role:`progressbar`,"aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,children:(0,I.jsx)(`div`,{className:i(`h-full rounded-full transition-[width] duration-500`,n===`primary`&&`bg-primary`,n===`success`&&`bg-success`,n===`white`&&`bg-white`),style:{width:`${r}%`}})})}function Zt({value:e,size:t=44,stroke:n=4,className:r,label:a}){let o=(t-n)/2,s=2*Math.PI*o,c=Math.max(0,Math.min(100,e));return(0,I.jsxs)(`div`,{className:i(`relative inline-grid place-items-center`,r),style:{width:t,height:t},children:[(0,I.jsxs)(`svg`,{width:t,height:t,className:`-rotate-90`,children:[(0,I.jsx)(`circle`,{cx:t/2,cy:t/2,r:o,fill:`none`,strokeWidth:n,className:`stroke-current opacity-15`}),(0,I.jsx)(`circle`,{cx:t/2,cy:t/2,r:o,fill:`none`,strokeWidth:n,strokeLinecap:`round`,strokeDasharray:s,strokeDashoffset:s-c/100*s,className:`stroke-current transition-[stroke-dashoffset] duration-700`})]}),(0,I.jsx)(`span`,{className:`absolute text-[11px] font-semibold tabular-nums`,children:a??`${Math.round(c)}%`})]})}function Qt({className:e,...t}){return(0,I.jsx)(`div`,{className:i(`animate-pulse rounded-lg bg-muted`,e),...t})}function $t({className:e}){return(0,I.jsx)(r,{className:i(`size-5 animate-spin text-muted-foreground`,e)})}function en(){return(0,I.jsx)(`div`,{className:`grid min-h-[40vh] place-items-center`,children:(0,I.jsx)($t,{className:`size-6`})})}function tn({icon:e,title:t,description:n,action:r,className:a}){return(0,I.jsxs)(`div`,{className:i(`flex flex-col items-center justify-center rounded-xl border border-dashed px-6 py-12 text-center`,a),children:[(0,I.jsxs)(`div`,{className:`relative mb-4`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 scale-150 rounded-full bg-primary/10 blur-xl`}),(0,I.jsx)(`div`,{className:`relative grid size-12 place-items-center rounded-2xl border bg-card text-primary shadow-sm`,children:(0,I.jsx)(e,{className:`size-5.5`})})]}),(0,I.jsx)(`h3`,{className:`text-[15px] font-semibold`,children:t}),n&&(0,I.jsx)(`p`,{className:`mt-1 max-w-sm text-sm text-muted-foreground`,children:n}),r&&(0,I.jsx)(`div`,{className:`mt-5`,children:r})]})}function nn({error:e,onRetry:t}){return(0,I.jsx)(tn,{icon:fe,title:`Something went wrong`,description:c(e),action:t&&(0,I.jsx)(s,{variant:`outline`,size:`sm`,onClick:t,children:`Try again`})})}function rn({value:e,onChange:t,options:n,className:r}){return(0,I.jsx)(`div`,{className:i(`ck-no-scrollbar inline-flex max-w-full items-center gap-1 overflow-x-auto rounded-lg bg-muted p-1`,r),children:n.map(n=>(0,I.jsxs)(`button`,{type:`button`,onClick:()=>t(n.value),className:i(`inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md px-3 text-[13px] font-medium text-muted-foreground transition-all hover:text-foreground`,n.value===e&&`bg-card text-foreground shadow-sm`),children:[n.label,n.count!=null&&(0,I.jsx)(`span`,{className:`rounded-full bg-foreground/8 px-1.5 text-[11px] tabular-nums`,children:n.count})]},n.value))})}function an({children:e,className:t}){return(0,I.jsx)(`kbd`,{className:i(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1 font-sans text-[10px] font-medium text-muted-foreground`,t),children:e})}export{he as C,f as E,L as S,O as T,ze as _,Xt as a,B as b,Qt as c,Ft as d,Dt as f,Ke as g,tt as h,en as i,$t as l,ot as m,nn as n,Zt as o,ut as p,an as r,rn as s,tn as t,Mt as u,Y as v,P as w,z as x,U as y};
|
|
1
|
+
import{B as e,H as t,L as n,V as r,_ as i,dt as a,ft as o,g as s,h as c,mt as l,pt as u}from"./hooks-EFhyJ5yU.js";var d=u((e=>{var t=o();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=i.p;try{if(u.T=null,i.p=2,e)return e()}finally{u.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),f=u(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=d()})),p=l(o(),1),m=l(f(),1);function h(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var g=e=>{switch(e){case`success`:return y;case`info`:return x;case`warning`:return b;case`error`:return S;default:return null}},_=Array(12).fill(0),v=({visible:e,className:t})=>p.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},p.createElement(`div`,{className:`sonner-spinner`},_.map((e,t)=>p.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),y=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),b=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),x=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),S=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,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`,clipRule:`evenodd`})),ee=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},p.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),C=()=>{let[e,t]=p.useState(document.hidden);return p.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},w=1,T=100,te=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:w++,E=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-T;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=te(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],p.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(ne(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=te(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},D=(e,t)=>E.message(e,t),ne=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,O=Object.assign(D,{success:E.success,info:E.info,warning:E.warning,error:E.error,custom:E.custom,message:E.message,promise:E.promise,dismiss:E.dismiss,loading:E.loading},{getHistory:()=>E.toasts,getToasts:()=>E.getActiveToasts()});h(`[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;flex:1;min-width:0}[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(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);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]{-webkit-user-select:none;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%)}`);function k(e){return e.label!==void 0}var re=3,ie=`24px`,ae=`16px`,oe=4e3,se=356,ce=14,A=45,j=200;function M(...e){return e.filter(Boolean).join(` `)}function N(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var le=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:m,style:h,cancelButtonStyle:_,actionButtonStyle:y,className:b=``,descriptionClassName:x=``,duration:S,position:w,gap:T,expandByDefault:te,classNames:E,icons:D,closeButtonAriaLabel:ne=`Close toast`}=e,[O,re]=p.useState(null),[ie,ae]=p.useState(null),[se,ce]=p.useState(!1),[le,ue]=p.useState(!1),[de,P]=p.useState(!1),[F,fe]=p.useState(!1),[I,pe]=p.useState(!1),[me,L]=p.useState(0),[he,ge]=p.useState(0),R=p.useRef(n.duration||S||oe),_e=p.useRef(null),z=p.useRef(null),ve=c===0,B=c+1<=o,V=n.type,H=V??`default`,U=n.dismissible!==!1,ye=n.className||``,be=n.descriptionClassName||``,W=p.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),xe=p.useMemo(()=>n.closeButton??m,[n.closeButton,m]),Se=p.useMemo(()=>n.duration||S||oe,[n.duration,S]),Ce=p.useRef(0),G=p.useRef(0),we=p.useRef(0),K=p.useRef(null),[Te,Ee]=w.split(`-`),De=p.useMemo(()=>s.reduce((e,t,n)=>n>=W?e:e+t.height,0),[s,W]),q=C(),J=p.useMemo(()=>e.swipeDirections??N(w),[e.swipeDirections,w]),Y=n.invert||t,Oe=V===`loading`;G.current=p.useMemo(()=>W*T+De,[W,De]),p.useEffect(()=>{R.current=Se},[Se]),p.useEffect(()=>{ce(!0)},[]),p.useEffect(()=>{let e=z.current;if(e){let t=e.getBoundingClientRect().height;return ge(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),p.useLayoutEffect(()=>{if(!se)return;let e=z.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ge(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[se,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let X=p.useCallback(()=>{ue(!0),L(G.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},j)},[n,d,a,G]);p.useEffect(()=>{if(n.promise&&V===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||q?(()=>{if(we.current<Ce.current){let e=new Date().getTime()-Ce.current;R.current-=e}we.current=new Date().getTime()})():R.current!==1/0&&(Ce.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),X()},R.current)),()=>clearTimeout(e)},[u,i,n,V,q,X]),p.useEffect(()=>{n.delete&&(X(),n.onDismiss==null||n.onDismiss.call(n,n))},[X,n.delete]);function ke(){return D?.loading?p.createElement(`div`,{className:M(E?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":V===`loading`},D.loading):p.createElement(v,{className:M(E?.loader,n?.classNames?.loader),visible:V===`loading`})}let Ae=n.icon||D?.[V]||g(V);return p.createElement(`li`,{tabIndex:0,ref:z,className:M(b,ye,E?.toast,n?.classNames?.toast,E?.[H],n?.classNames?.[H]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":se,"data-promise":!!n.promise,"data-swiped":I,"data-removed":le,"data-visible":B,"data-y-position":Te,"data-x-position":Ee,"data-index":c,"data-front":ve,"data-swiping":de,"data-dismissible":U,"data-type":V,"data-invert":Y,"data-swipe-out":F,"data-swipe-direction":ie,"data-expanded":!!(u||te&&se),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${le?me:G.current}px`,"--initial-height":te?`auto`:`${he}px`,...h,...n.style},onDragEnd:()=>{P(!1),re(null),K.current=null},onPointerDown:e=>{e.button!==2&&!Oe&&U&&(_e.current=new Date,L(G.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),K.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(F||!U)return;K.current=null;let e=Number(z.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(z.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-_e.current?.getTime(),i=O===`x`?e:t,a=Math.abs(i)/r;if((O===`x`?J.includes(e>0?`right`:`left`):J.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=A||a>.11))L(G.current),n.onDismiss==null||n.onDismiss.call(n,n),ae(O===`x`?e>0?`right`:`left`:t>0?`down`:`up`),X(),fe(!0);else{var o,s;(o=z.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=z.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),pe(!1),P(!1),re(null)}},onPointerMove:e=>{var t,n;if(!K.current||!U||window.getSelection()?.toString().length>0)return;let r=e.clientY-K.current.y,i=e.clientX-K.current.x;!O&&(Math.abs(i)>1||Math.abs(r)>1)&&re(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(O===`y`){if(J.includes(`top`)||J.includes(`bottom`)){if(J.includes(`top`)&&r<0||J.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(O===`x`&&(J.includes(`left`)||J.includes(`right`))){if(J.includes(`left`)&&i<0||J.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&pe(!0),(t=z.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=z.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},xe&&!n.jsx&&V!==`loading`?p.createElement(`button`,{"aria-label":ne,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!U?()=>{}:()=>{X(),n.onDismiss==null||n.onDismiss.call(n,n)},className:M(E?.closeButton,n?.classNames?.closeButton)},D?.close??ee):null,(V||n.icon||n.promise)&&n.icon!==null&&(D?.[V]!==null||n.icon)?p.createElement(`div`,{"data-icon":``,className:M(E?.icon,n?.classNames?.icon)},V===`loading`?n.icon||ke():n.promise?ke():null,V===`loading`?null:Ae):null,p.createElement(`div`,{"data-content":``,className:M(E?.content,n?.classNames?.content)},p.createElement(`div`,{"data-title":``,className:M(E?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?p.createElement(`div`,{"data-description":``,className:M(x,be,E?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),p.isValidElement(n.cancel)?n.cancel:n.cancel&&k(n.cancel)?p.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||_,onClick:e=>{k(n.cancel)&&U&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),X())},className:M(E?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,p.isValidElement(n.action)?n.action:n.action&&k(n.action)?p.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||y,onClick:e=>{k(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||X())},className:M(E?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function ue(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function de(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ae:ie;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var P=p.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:h,style:g,visibleToasts:_=re,toastOptions:v,dir:y=ue(),gap:b=ce,icons:x,customAriaLabel:S,containerAriaLabel:ee=`Notifications`}=e,[C,w]=p.useState([]),T=p.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),te=p.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,ne]=p.useState([]),[O,k]=p.useState(!1),[ie,ae]=p.useState(!1),[oe,A]=p.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),j=p.useRef(null),M=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),N=p.useRef(null),P=p.useRef(!1),F=p.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||E.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return p.useEffect(()=>E.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{m.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),p.useEffect(()=>{if(d!==`system`){A(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?A(`dark`):A(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{A(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{A(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),p.useEffect(()=>{C.length<=1&&k(!1)},[C]),p.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),p.useEffect(()=>{if(j.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,P.current=!1)}},[j.current]),p.createElement(`section`,{ref:t,"aria-label":S??`${ee} ${M}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},te.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?p.createElement(`ol`,{key:t,dir:y===`auto`?ue():y,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":oe,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${se}px`,"--gap":`${b}px`,...g,...de(l,u)},onBlur:e=>{P.current&&!e.currentTarget.contains(e.relatedTarget)&&(P.current=!1,N.current&&=(N.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||P.current||(P.current=!0,N.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{ie||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ae(!0)},onPointerUp:()=>ae(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>p.createElement(le,{key:n.id,icons:x,index:i,toast:n,defaultRichColors:f,duration:v?.duration??h,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:r,visibleToasts:_,closeButton:v?.closeButton??s,interacting:ie,position:t,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:F,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:ne,expandByDefault:o,gap:b,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),F={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};F.node;var fe=t(F),I=a(),pe=Object.defineProperty,me=(e,t)=>pe(e,`name`,{value:t,configurable:!0}),L=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let r=n(`Primitive.${t}`),i=p.forwardRef((e,n)=>{let{asChild:i,...a}=e,o=i?r:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,I.jsx)(o,{...a,ref:n})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function he(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}me(he,`dispatchDiscreteCustomEvent`);var ge=Object.defineProperty,R=(e,t)=>ge(e,`name`,{value:t,configurable:!0});function _e(e,t){let n=p.createContext(t);n.displayName=e+`Context`;let r=R(e=>{let{children:t,...r}=e,i=p.useMemo(()=>r,Object.values(r));return(0,I.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=p.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return R(i,`useContext`),[r,i]}R(_e,`createContext`);function z(e,t=[]){let n=[];function r(t,r){let i=p.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=R(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=p.useMemo(()=>o,Object.values(o));return(0,I.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=p.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return R(s,`useContext`),[o,s]}R(r,`createContext`);let i=R(()=>{let t=n.map(e=>p.createContext(e));return R(function(n){let r=n?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,ve(i,...t)]}R(z,`createContextScope`);function ve(...e){let t=e[0];if(e.length===1)return t;let n=R(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return R(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}R(ve,`composeContextScopes`);var B=globalThis?.document?p.useLayoutEffect:()=>{},V=Object.defineProperty,H=(e,t)=>V(e,`name`,{value:t,configurable:!0});function U(t){let r=t+`CollectionProvider`,[i,a]=z(r),[o,s]=i(r,{collectionRef:{current:null},itemMap:new Map}),c=H(e=>{let{scope:t,children:n}=e,r=p.useRef(null),i=p.useRef(new Map).current;return(0,I.jsx)(o,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=r;let l=t+`CollectionSlot`,u=n(l),d=p.forwardRef((t,n)=>{let{scope:r,children:i}=t,a=s(l,r),o=e(n,a.collectionRef);return(0,I.jsx)(u,{ref:o,children:i})});d.displayName=l;let f=t+`CollectionItemSlot`,m=`data-radix-collection-item`,h=n(f),g=p.forwardRef((t,n)=>{let{scope:r,children:i,...a}=t,o=p.useRef(null),c=e(n,o),l=s(f,r);return p.useEffect(()=>(l.itemMap.set(o,{ref:o,...a}),()=>void l.itemMap.delete(o))),(0,I.jsx)(h,{[m]:``,ref:c,children:i})});g.displayName=f;function _(e){let n=s(t+`CollectionConsumer`,e);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return H(_,`useCollection`),[{Provider:c,Slot:d,ItemSlot:g},_,a]}H(U,`createCollection`);var ye=new WeakMap,be=class e extends Map{static{H(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ye.set(this,!0)}set(e,t){return ye.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=Se(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=W(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=W(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return W(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function W(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=xe(e,t);return n===-1?void 0:e[n]}H(W,`at`);function xe(e,t){let n=e.length,r=Se(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}H(xe,`toSafeIndex`);function Se(e){return e!==e||e===0?0:Math.trunc(e)}H(Se,`toSafeInteger`);function Ce(t){let r=t+`CollectionProvider`,[i,a]=z(r),[o,s]=i(r);o.displayName=t+`CollectionStableContextProvider`;let[c,l]=i(r);c.displayName=t+`CollectionStatefulContextProvider`;let u=H(({state:e,...t})=>e?(0,I.jsx)(f,{...t,state:e}):(0,I.jsx)(d,{...t}),`CollectionProvider`);u.displayName=r;let d=H(e=>{let t=b();return(0,I.jsx)(f,{...e,state:t})},`CollectionInit`);d.displayName=t+`CollectionInit`;let f=H(t=>{let{scope:n,children:r,state:i}=t,a=p.useRef(null),[s,l]=p.useState(null),u=e(a,l),[d,f]=i,m=p.useRef(new be),h=p.useCallback(()=>{let e=m.current;return K(e)||e.sort(Te),e},[]);return p.useEffect(()=>{if(!s)return;let e=Ee(()=>{f(e=>{let t=e.toSorted(Te);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,f]),(0,I.jsx)(o,{scope:n,collectionElementRef:u,collectionElementRefObject:a,getCollection:h,setCollection:f,registryRef:m,children:(0,I.jsx)(c,{scope:n,collectionElement:s,collection:d,children:r})})},`CollectionProviderImpl`);f.displayName=t+`CollectionProviderImpl`;let m=t+`CollectionSlot`,h=n(m),g=p.forwardRef((t,n)=>{let{scope:r,children:i}=t,a=s(m,r),o=e(n,a.collectionElementRef);return(0,I.jsx)(h,{ref:o,children:i})});g.displayName=m;let _=t+`CollectionItemSlot`,v=n(_),y=p.forwardRef((t,n)=>{let{scope:r,children:i,...a}=t,o=p.useRef(null),{setCollection:c,registryRef:l}=s(_,r),u=p.useRef(a);G(u.current,a)||(u.current=a);let d=u.current,f=p.useCallback(e=>{let t=l.current;e?t.set(e,{...u.current,element:e}):o.current&&t.delete(o.current)},[l]),m=e(n,f,o);B(()=>{let e=o.current,t=l.current;e&&t.has(e)&&t.set(e,{...d,element:e})},[d,l]);let h=p.useRef(null);return p.useEffect(()=>{let e=o.current,t=h.current;((t?.element??null)!==e||e&&t?.itemData!==d)&&(h.current=e?{element:e,itemData:d}:null,c(n=>{let r=new be(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...d,element:e}),r.sort(Te)}))}),p.useEffect(()=>()=>{let e=h.current;h.current=null,e&&c(t=>{if(!t.has(e.element))return t;let n=new be(t);return n.delete(e.element),n})},[c]),(0,I.jsx)(v,{"data-radix-collection-item":``,ref:m,children:i})});y.displayName=_;function b(){return p.useState(new be)}H(b,`useInitCollection`);function x(e){let{collection:n}=l(t+`CollectionConsumer`,e);return n}H(x,`useCollection`);function S(e){let{getCollection:n}=s(t+`CollectionConsumer`,e);return n}return H(S,`useGetCollection`),[{Provider:u,Slot:g,ItemSlot:y},{createCollectionScope:a,useCollection:x,useGetCollection:S,useInitCollection:b}]}H(Ce,`createCollection`);function G(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}H(G,`shallowEqual`);function we(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}H(we,`isElementPreceding`);function K(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}H(K,`isInDocumentOrder`);function Te(e,t){return!e[1].element||!t[1].element?0:we(e[1].element,t[1].element)?-1:1}H(Te,`sortByDocumentPosition`);function Ee(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}H(Ee,`getChildListObserver`);var De=Object.defineProperty,q=(e,t)=>De(e,`name`,{value:t,configurable:!0}),J=!!(typeof window<`u`&&window.document&&window.document.createElement);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return q(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}q(Y,`composeEventHandlers`);function Oe(e){if(!J)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}q(Oe,`getOwnerWindow`);function X(e){if(!J)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}q(X,`getOwnerDocument`);function ke(e,t=!1){let{activeElement:n}=X(e);if(!n?.nodeName)return null;if(Ae(n)&&n.contentDocument)return ke(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=X(n).getElementById(e);if(t)return t}}return n}q(ke,`getActiveElement`);function Ae(e){return e.tagName===`IFRAME`}q(Ae,`isFrame`);var je=Object.defineProperty,Me=(e,t)=>je(e,`name`,{value:t,configurable:!0}),Ne=p.useEffectEvent,Pe=p.useInsertionEffect;function Fe(e){if(typeof Ne==`function`)return Ne(e);let t=p.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Pe==`function`?Pe(()=>{t.current=e}):B(()=>{t.current=e}),p.useMemo(()=>((...e)=>t.current?.(...e)),[])}Me(Fe,`useEffectEvent`);var Ie=Object.defineProperty,Le=(e,t)=>Ie(e,`name`,{value:t,configurable:!0}),Re=p.useInsertionEffect||B;function ze({prop:e,defaultProp:t,onChange:n=Le(()=>{},`onChange`),caller:r}){let[i,a,o]=Be({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,p.useCallback(t=>{if(s){let n=Ve(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Le(ze,`useControllableState`);function Be({defaultProp:e,onChange:t}){let[n,r]=p.useState(e),i=p.useRef(n),a=p.useRef(t);return Re(()=>{a.current=t},[t]),p.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Le(Be,`useUncontrolledState`);function Ve(e){return typeof e==`function`}Le(Ve,`isFunction`);var He=Symbol(`RADIX:SYNC_STATE`);function Ue(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Fe(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=p.useReducer((t,n)=>{if(n.type===He)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),m=d.state,h=p.useRef(m);p.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let g=p.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return p.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:He,state:i})},[i,d.state,c]),[g,f]}Le(Ue,`useControllableStateReducer`);var We=Object.defineProperty,Z=(e,t)=>We(e,`name`,{value:t,configurable:!0});function Ge(e,t){return p.useReducer((e,n)=>t[e][n]??e,e)}Z(Ge,`useStateMachine`);var Ke=Z(e=>{let{present:t,children:n}=e,r=qe(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=Ye(r.ref,Xe(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null},`Presence`);function qe(e){let[t,n]=p.useState(),r=p.useRef(null),i=p.useRef(e),a=p.useRef(`none`),o=p.useRef(void 0),[s,c]=Ge(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{s===`mounted`?(a.current=o.current??Q(r.current),o.current=void 0):a.current=`none`},[s]),B(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Q(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),B(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Z(a=>{let o=Q(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Z(e=>{e.target===t&&(a.current=Q(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:p.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Q(t)}else r.current=null;n(e)},[])}}Z(qe,`usePresence`);function Je(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Z(Je,`setRef`);function Ye(...e){let t=p.useRef(e);return t.current=e,p.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Je(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Je(n[e],null)}}},[])}Z(Ye,`useStableComposedRefs`);function Q(e){return e?.animationName||`none`}Z(Q,`getAnimationName`);function Xe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Z(Xe,`getElementRef`);var Ze=Object.defineProperty,Qe=(e,t)=>Ze(e,`name`,{value:t,configurable:!0}),$e=p.useId||(()=>void 0),et=0;function tt(e){let[t,n]=p.useState($e());return B(()=>{e||n(e=>e??String(et++))},[e]),e||(t?`radix-${t}`:``)}Qe(tt,`useId`);var nt=Object.defineProperty,rt=(e,t)=>nt(e,`name`,{value:t,configurable:!0}),it={LTR:`ltr`,RTL:`rtl`},at=p.createContext(void 0);function ot(e){let t=p.useContext(at);return e||t||it.LTR}rt(ot,`useDirection`);var st=Object.defineProperty,ct=(e,t)=>st(e,`name`,{value:t,configurable:!0}),lt=p.useInsertionEffect;function ut(e){let t=p.useRef(e);return typeof lt==`function`?lt(()=>{t.current=e}):B(()=>{t.current=e}),p.useMemo(()=>((...e)=>t.current?.(...e)),[])}ct(ut,`useCallbackRef`);var dt=Object.defineProperty,ft=(e,t)=>dt(e,`name`,{value:t,configurable:!0}),pt=!1;function mt(){let[e,t]=p.useState(pt);return p.useEffect(()=>{pt||(pt=!0,t(!0))},[]),e}ft(mt,`useIsHydrated`);var ht=p.useSyncExternalStore;function gt(){return()=>{}}ft(gt,`subscribe`);function _t(){return ht(gt,()=>!0,()=>!1)}ft(_t,`useIsHydratedModern`);var vt=typeof ht==`function`?_t:mt,yt=Object.defineProperty,$=(e,t)=>yt(e,`name`,{value:t,configurable:!0}),bt=`rovingFocusGroup.onEntryFocus`,xt={bubbles:!1,cancelable:!0},St=`RovingFocusGroup`,[Ct,wt,Tt]=U(St),[Et,Dt]=z(St,[Tt]),Ot={Vertical:`vertical`,Horizontal:`horizontal`},kt={LTR:`ltr`,RTL:`rtl`},[At,jt]=Et(St),Mt=p.forwardRef($(function(e,t){return(0,I.jsx)(Ct.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Ct.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Nt,{...e,ref:t})})})},`RovingFocusGroup`)),Nt=p.forwardRef($(function(t,n){let{__scopeRovingFocusGroup:r,orientation:i,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,m=p.useRef(null),h=e(n,m),g=ot(o),[_,v]=ze({prop:s,defaultProp:c??null,onChange:l,caller:St}),[y,b]=p.useState(!1),x=ut(u),S=wt(r),ee=p.useRef(!1),[C,w]=p.useState(0);return p.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(bt,x),()=>e.removeEventListener(bt,x)},[x]),(0,I.jsx)(At,{scope:r,orientation:i,dir:g,loop:a,currentTabStopId:_,onItemFocus:p.useCallback(e=>v(e),[v]),onItemShiftTab:p.useCallback(()=>b(!0),[]),onFocusableItemAdd:p.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>w(e=>e-1),[]),children:(0,I.jsx)(L.div,{tabIndex:y||C===0?-1:0,"data-orientation":i,...f,ref:h,style:{outline:`none`,...t.style},onMouseDown:Y(t.onMouseDown,()=>{ee.current=!0}),onFocus:Y(t.onFocus,e=>{let t=!ee.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(bt,xt);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);zt([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),d)}}ee.current=!1}),onBlur:Y(t.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),Pt=`RovingFocusGroupItem`,Ft=p.forwardRef($(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=tt(),l=a||c,u=jt(Pt,n),d=u.currentTabStopId===l,f=wt(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=u,_=vt();return B(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),p.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),(0,I.jsx)(Ct.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(L.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Y(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Y(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Y(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Rt(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Bt(n,r+1):n.slice(r+1)}setTimeout(()=>zt(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:g!=null}):o})})},`RovingFocusGroupItem`)),It={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Lt(e,t){return t===kt.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}$(Lt,`getDirectionAwareKey`);function Rt(e,t,n){let r=Lt(e.key,n);if(!(t===Ot.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Ot.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return It[r]}$(Rt,`getFocusIntent`);function zt(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}$(zt,`focusFirst`);function Bt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$(Bt,`wrapArray`);var Vt=Object.defineProperty,Ht=(e,t)=>Vt(e,`name`,{value:t,configurable:!0}),Ut=`Tabs`,[Wt,Gt]=z(Ut,[Dt]);Dt();var[Kt,qt]=Wt(Ut);function Jt(e,t){return`${e}-trigger-${t}`}Ht(Jt,`makeTriggerId`);function Yt(e,t){return`${e}-content-${t}`}Ht(Yt,`makeContentId`);function Xt({value:e,className:t,tone:n=`primary`}){let r=Math.max(0,Math.min(100,e));return(0,I.jsx)(`div`,{className:i(`h-1.5 w-full overflow-hidden rounded-full`,n===`white`?`bg-white/25`:`bg-muted`,t),role:`progressbar`,"aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,children:(0,I.jsx)(`div`,{className:i(`h-full rounded-full transition-[width] duration-500`,n===`primary`&&`bg-primary`,n===`success`&&`bg-success`,n===`white`&&`bg-white`),style:{width:`${r}%`}})})}function Zt({value:e,size:t=44,stroke:n=4,className:r,label:a}){let o=(t-n)/2,s=2*Math.PI*o,c=Math.max(0,Math.min(100,e));return(0,I.jsxs)(`div`,{className:i(`relative inline-grid place-items-center`,r),style:{width:t,height:t},children:[(0,I.jsxs)(`svg`,{width:t,height:t,className:`-rotate-90`,children:[(0,I.jsx)(`circle`,{cx:t/2,cy:t/2,r:o,fill:`none`,strokeWidth:n,className:`stroke-current opacity-15`}),(0,I.jsx)(`circle`,{cx:t/2,cy:t/2,r:o,fill:`none`,strokeWidth:n,strokeLinecap:`round`,strokeDasharray:s,strokeDashoffset:s-c/100*s,className:`stroke-current transition-[stroke-dashoffset] duration-700`})]}),(0,I.jsx)(`span`,{className:`absolute text-[11px] font-semibold tabular-nums`,children:a??`${Math.round(c)}%`})]})}function Qt({className:e,...t}){return(0,I.jsx)(`div`,{className:i(`animate-pulse rounded-lg bg-muted`,e),...t})}function $t({className:e}){return(0,I.jsx)(r,{className:i(`size-5 animate-spin text-muted-foreground`,e)})}function en(){return(0,I.jsx)(`div`,{className:`grid min-h-[40vh] place-items-center`,children:(0,I.jsx)($t,{className:`size-6`})})}function tn({icon:e,title:t,description:n,action:r,className:a}){return(0,I.jsxs)(`div`,{className:i(`flex flex-col items-center justify-center rounded-xl border border-dashed px-6 py-12 text-center`,a),children:[(0,I.jsxs)(`div`,{className:`relative mb-4`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 scale-150 rounded-full bg-primary/10 blur-xl`}),(0,I.jsx)(`div`,{className:`relative grid size-12 place-items-center rounded-2xl border bg-card text-primary shadow-sm`,children:(0,I.jsx)(e,{className:`size-5.5`})})]}),(0,I.jsx)(`h3`,{className:`text-[15px] font-semibold`,children:t}),n&&(0,I.jsx)(`p`,{className:`mt-1 max-w-sm text-sm text-muted-foreground`,children:n}),r&&(0,I.jsx)(`div`,{className:`mt-5`,children:r})]})}function nn({error:e,onRetry:t}){return(0,I.jsx)(tn,{icon:fe,title:`Something went wrong`,description:c(e),action:t&&(0,I.jsx)(s,{variant:`outline`,size:`sm`,onClick:t,children:`Try again`})})}function rn({value:e,onChange:t,options:n,className:r}){return(0,I.jsx)(`div`,{className:i(`ck-no-scrollbar inline-flex max-w-full items-center gap-1 overflow-x-auto rounded-lg bg-muted p-1`,r),children:n.map(n=>(0,I.jsxs)(`button`,{type:`button`,onClick:()=>t(n.value),className:i(`inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md px-3 text-[13px] font-medium text-muted-foreground transition-all hover:text-foreground`,n.value===e&&`bg-card text-foreground shadow-sm`),children:[n.label,n.count!=null&&(0,I.jsx)(`span`,{className:`rounded-full bg-foreground/8 px-1.5 text-[11px] tabular-nums`,children:n.count})]},n.value))})}function an({children:e,className:t}){return(0,I.jsx)(`kbd`,{className:i(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1 font-sans text-[10px] font-medium text-muted-foreground`,t),children:e})}export{he as C,f as D,O as E,L as S,P as T,ze as _,Xt as a,B as b,Qt as c,Ft as d,Dt as f,Ke as g,tt as h,en as i,$t as l,ot as m,nn as n,Zt as o,ut as p,an as r,rn as s,tn as t,Mt as u,Y as v,fe as w,z as x,U as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./hooks-
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./hooks-
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t,E as n,Gt as r,O as i,k as a,l as o,m as s}from"./index-CEZdqKdi.js";import{t as c}from"./shield-x-RpNHS0o8.js";import{dt as l,ft as u,g as d,h as f,m as p,mt as m}from"./hooks-EFhyJ5yU.js";import{E as h}from"./misc-CyGhN6HT.js";var g=m(u(),1),_=l();function v({certificate:l,open:u,onOpenChange:m,onDone:v}){let[y,b]=(0,g.useState)(``),x=r({mutationFn:()=>p.post(`/certificates/${l.id}/revoke`,{reason:y.trim()||null}),onSuccess:e=>{h.success(`Revoked ${l.recipientName}’s certificate`),b(``),m(!1),v?.(e)},onError:e=>h.error(f(e))});return(0,_.jsx)(n,{open:u,onOpenChange:m,children:(0,_.jsx)(i,{size:`sm`,children:(0,_.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),x.mutate()},children:[(0,_.jsx)(e,{icon:(0,_.jsx)(c,{className:`size-5`}),title:`Revoke this certificate?`,description:`${l.recipientName}’s certificate will show as revoked to anyone who checks its code. You can restore it later.`}),(0,_.jsx)(t,{children:(0,_.jsx)(o,{label:`Reason`,optional:!0,hint:`Shown to the student and to staff, never on the public verification page.`,children:e=>(0,_.jsx)(s,{...e,rows:3,maxLength:300,value:y,onChange:e=>b(e.target.value)})})}),(0,_.jsxs)(a,{children:[(0,_.jsx)(d,{type:`button`,variant:`outline`,onClick:()=>m(!1),children:`Cancel`}),(0,_.jsx)(d,{type:`submit`,variant:`destructive`,loading:x.isPending,children:`Revoke certificate`})]})]})})})}export{v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./hooks-
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./hooks-
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`shield-x`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m14.5 9.5-5 5`,key:`17q4r4`}],[`path`,{d:`m9.5 9.5 5 5`,key:`18nt4w`}]],aliases:[`shield-close`]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`shuffle`,size:24,node:[[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`,key:`1ailkh`}],[`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`,key:`km57vx`}],[`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`,key:`os18l9`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`target`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`trophy`,size:24,node:[[`path`,{d:`M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2`,key:`pwuv1l`}],[`path`,{d:`M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2`,key:`1y54w1`}],[`path`,{d:`M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3`,key:`e30mpu`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3`,key:`i0yafy`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`user-minus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./hooks-EFhyJ5yU.js";var t={name:`users-round`,size:24,node:[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]],aliases:[`users-2`]};t.node;var n=e(t);export{n as t};
|