@lovelybunch/api 1.0.73 → 1.0.74

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.
Files changed (92) hide show
  1. package/dist/routes/api/v1/ai/route.js +79 -18
  2. package/dist/routes/api/v1/ai/tools.js +76 -16
  3. package/dist/routes/api/v1/mcp/index.js +129 -573
  4. package/dist/routes/api/v1/proposals/[id]/route.d.ts +12 -0
  5. package/dist/routes/api/v1/proposals/route.d.ts +12 -0
  6. package/package.json +6 -5
  7. package/static/assets/ActivityPage-AWTVFLmK.js +1 -0
  8. package/static/assets/{AgentDetailPage-WLAnnZep.js → AgentDetailPage-DtGFrHzZ.js} +1 -1
  9. package/static/assets/{AgentEditPage-DOemUkvg.js → AgentEditPage-1026aJox.js} +1 -1
  10. package/static/assets/{AgentsPage-Bage8eYW.js → AgentsPage-9Hre8AD1.js} +2 -2
  11. package/static/assets/{AgentsSettingsPage-Cw2MTnHU.js → AgentsSettingsPage-CILCHaO9.js} +1 -1
  12. package/static/assets/{ApiKeysSettingsPage-DCKd4LXE.js → ApiKeysSettingsPage-D-l8q30N.js} +1 -1
  13. package/static/assets/{ArchitectureEditPage-WY9k_1tR.js → ArchitectureEditPage-DiRR28Rx.js} +1 -1
  14. package/static/assets/{ArchitecturePage-Cj4dVDWO.js → ArchitecturePage-FcRJGw8O.js} +1 -1
  15. package/static/assets/{AuthSettingsPage-Bs5wL5Yj.js → AuthSettingsPage-D528tGhc.js} +1 -1
  16. package/static/assets/{CallbackPage-CtydJ4j3.js → CallbackPage-BMZOjCy_.js} +1 -1
  17. package/static/assets/CodePage-CCNmmkv_.js +2 -0
  18. package/static/assets/{CollapsibleSection-5qSoX47l.js → CollapsibleSection-CG5gAVWB.js} +1 -1
  19. package/static/assets/DashboardPage-D5C34QbO.js +41 -0
  20. package/static/assets/{GitPage-BG-ZSGfu.js → GitPage-ofZrdSSl.js} +1 -1
  21. package/static/assets/{GitSettingsPage-Cn-MciXq.js → GitSettingsPage-Cld_sN5t.js} +1 -1
  22. package/static/assets/{IdentityPage-DCpoDF2j.js → IdentityPage-Dj-Do8q7.js} +1 -1
  23. package/static/assets/{ImplementationStepsEditor-PM47REBn.js → ImplementationStepsEditor-BZQKPJ1C.js} +1 -1
  24. package/static/assets/{IntegrationsSettingsPage-DJpf2gZn.js → IntegrationsSettingsPage-DTT6nX3v.js} +1 -1
  25. package/static/assets/JobDetailPage-CWexORzH.js +1 -0
  26. package/static/assets/{KnowledgeDetailPage-CLizVIxC.js → KnowledgeDetailPage-C-a0njhy.js} +1 -1
  27. package/static/assets/{KnowledgeEditPage-B-sdY_DS.js → KnowledgeEditPage-B93ffsgz.js} +1 -1
  28. package/static/assets/{KnowledgePage-DIlUufGq.js → KnowledgePage-DS7xi1qJ.js} +1 -1
  29. package/static/assets/{LoginPage-DcTU__Dc.js → LoginPage-FUflG9B8.js} +1 -1
  30. package/static/assets/{McpSettingsPage-BPDLne4q.js → McpSettingsPage-A6uws8gQ.js} +1 -1
  31. package/static/assets/{NewAgentPage-8-abvhkI.js → NewAgentPage-CqBlVqdy.js} +1 -1
  32. package/static/assets/{NewKnowledgePage-Rvj741x1.js → NewKnowledgePage-ue0ZRgKf.js} +1 -1
  33. package/static/assets/{NewProposalPage-BLIqmuks.js → NewProposalPage-BDbStKts.js} +1 -1
  34. package/static/assets/{ProjectEditPage-DC5-v_2a.js → ProjectEditPage-_a9hJTgi.js} +1 -1
  35. package/static/assets/{ProjectPage-_L4wqwrB.js → ProjectPage-DAlEu9Af.js} +1 -1
  36. package/static/assets/{PromptsSettingsPage-K-qqpF2S.js → PromptsSettingsPage-4_C5zvq6.js} +1 -1
  37. package/static/assets/{ProposalDetailPage-BVXTjXw2.js → ProposalDetailPage-mZ9qj0wJ.js} +1 -1
  38. package/static/assets/{ProposalEditPage-Bs3ak0PG.js → ProposalEditPage-DqJ3Po23.js} +1 -1
  39. package/static/assets/{ProposalsPage-BvKlKvuo.js → ProposalsPage-DaR_KuZx.js} +1 -1
  40. package/static/assets/{ResourcesPage-BSyX_kHV.js → ResourcesPage-WMPlFn0S.js} +1 -1
  41. package/static/assets/{RoleEditPage-CnWierul.js → RoleEditPage-DIoamJfW.js} +1 -1
  42. package/static/assets/{RolePage-D8xB0I-F.js → RolePage-4aL0vR7F.js} +1 -1
  43. package/static/assets/{RulesSettingsPage-CZBQ0u-x.js → RulesSettingsPage-CerRq_kE.js} +1 -1
  44. package/static/assets/SchedulePage-DF9TqOA6.js +4 -0
  45. package/static/assets/{SourceInput-BoRGYtye.js → SourceInput-CXv23vkE.js} +1 -1
  46. package/static/assets/{TagInput-CdXzv6hj.js → TagInput-DL_48L0p.js} +1 -1
  47. package/static/assets/{TerminalPage-CqPXFOIN.js → TerminalPage-BL8pa_9k.js} +1 -1
  48. package/static/assets/{TerminalSessionPage-DR2cApWv.js → TerminalSessionPage-DcC_o_sA.js} +1 -1
  49. package/static/assets/{UserPreferencesPage-CPkulDiM.js → UserPreferencesPage-DoMyvwD4.js} +1 -1
  50. package/static/assets/{UserSettingsPage-BuMnU394.js → UserSettingsPage-CqibuEiq.js} +1 -1
  51. package/static/assets/{UtilitiesPage-BGiBB5PT.js → UtilitiesPage-6BGeolw9.js} +1 -1
  52. package/static/assets/{alert-CHpdnk6F.js → alert-DQ9shGSz.js} +1 -1
  53. package/static/assets/{arrow-down-BjGtxyJ7.js → arrow-down-D5oSUxtq.js} +1 -1
  54. package/static/assets/{arrow-left-DR0foZvi.js → arrow-left-BJ9vzpff.js} +1 -1
  55. package/static/assets/{arrow-up-DCGMV1HG.js → arrow-up-DWNinaN_.js} +1 -1
  56. package/static/assets/{badge-Cds9UgAB.js → badge-BLbqPEov.js} +1 -1
  57. package/static/assets/{browser-modal-Ck4-s_jh.js → browser-modal-Dh2dy_2x.js} +1 -1
  58. package/static/assets/{calendar-CWhxfYG2.js → calendar-CaBty4QE.js} +1 -1
  59. package/static/assets/{card-BdOrf6VU.js → card-BTg0Fecj.js} +1 -1
  60. package/static/assets/{chevron-left-Wnwkk8g7.js → chevron-left-V0REBjky.js} +1 -1
  61. package/static/assets/{chevrons-up-DbnuGl5g.js → chevrons-up-BvR9KFeO.js} +1 -1
  62. package/static/assets/{circle-alert-BPvQggmh.js → circle-alert-DR1DiLh5.js} +1 -1
  63. package/static/assets/{circle-check-CTlDV9K4.js → circle-check-DED-Ne-m.js} +1 -1
  64. package/static/assets/{circle-check-big-KMhw8TDM.js → circle-check-big-CFsUUo2_.js} +1 -1
  65. package/static/assets/{circle-play-tZLgOcAc.js → circle-play-DQ32zg60.js} +1 -1
  66. package/static/assets/{circle-x-D3tazxxl.js → circle-x-CDTWutj4.js} +1 -1
  67. package/static/assets/{clipboard-C86rsVqL.js → clipboard-CTFAlaYo.js} +1 -1
  68. package/static/assets/{clock-Qm5u6CAm.js → clock-pVWUoJDo.js} +1 -1
  69. package/static/assets/{download-Bo3vdlNo.js → download-Bt7lWWYL.js} +1 -1
  70. package/static/assets/{eye-Cr9Hfzxo.js → eye-o7gPa7E6.js} +1 -1
  71. package/static/assets/{folder-git-2-Em4ZglGs.js → folder-git-2-CHwnYB8a.js} +1 -1
  72. package/static/assets/{index-CQpPrvm_.js → index-DaqYJNAM.js} +30 -30
  73. package/static/assets/{label-nG86oxuW.js → label-BtnLfquf.js} +1 -1
  74. package/static/assets/{markdown-editor-CEQMlLWe.js → markdown-editor-Cmsc5nNu.js} +1 -1
  75. package/static/assets/{pause-DuR7ql7H.js → pause-EIDnvByV.js} +1 -1
  76. package/static/assets/{play-p4m8WHP3.js → play-D_fLXyLR.js} +1 -1
  77. package/static/assets/{plus-CD075YlZ.js → plus-ZCd709aN.js} +1 -1
  78. package/static/assets/{radio-group-DCKkxIgI.js → radio-group-STvlCDl-.js} +1 -1
  79. package/static/assets/{refresh-cw-D-IgYQ7y.js → refresh-cw-BF0hXtxu.js} +1 -1
  80. package/static/assets/{search-W3H-E0eW.js → search-kmqzieAc.js} +1 -1
  81. package/static/assets/{switch-E0GrYmgh.js → switch-CjDKvzd0.js} +1 -1
  82. package/static/assets/{tabs-DjZiD9WD.js → tabs-DPohYGac.js} +1 -1
  83. package/static/assets/{tag-D0iVh1-U.js → tag-Dg9notds.js} +1 -1
  84. package/static/assets/{terminal-preview-BQBOEop2.js → terminal-preview-CnytxbzD.js} +1 -1
  85. package/static/assets/{use-terminal-0TezQnxO.js → use-terminal-LpFJK0k7.js} +1 -1
  86. package/static/assets/{zap-C_5I7lLi.js → zap-DBKgrFQ_.js} +1 -1
  87. package/static/index.html +1 -1
  88. package/static/assets/ActivityPage-C_HqpJt2.js +0 -1
  89. package/static/assets/CodePage-BiRf5q_q.js +0 -2
  90. package/static/assets/DashboardPage-e9hNRsi2.js +0 -41
  91. package/static/assets/JobDetailPage-9shaUPlO.js +0 -1
  92. package/static/assets/SchedulePage-HBFJT_19.js +0 -4
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-e9hNRsi2.js","assets/card-BdOrf6VU.js","assets/badge-Cds9UgAB.js","assets/label-nG86oxuW.js","assets/use-terminal-0TezQnxO.js","assets/terminal-preview-BQBOEop2.js","assets/xterm-DTxiCjtJ.js","assets/xterm-qxJ8_QYu.css","assets/circle-check-CTlDV9K4.js","assets/chevron-left-Wnwkk8g7.js","assets/search-W3H-E0eW.js","assets/zap-C_5I7lLi.js","assets/calendar-CWhxfYG2.js","assets/folder-git-2-Em4ZglGs.js","assets/play-p4m8WHP3.js","assets/clock-Qm5u6CAm.js","assets/circle-check-big-KMhw8TDM.js","assets/plus-CD075YlZ.js","assets/LoginPage-DcTU__Dc.js","assets/tabs-DjZiD9WD.js","assets/CallbackPage-CtydJ4j3.js","assets/circle-x-D3tazxxl.js","assets/ProposalsPage-BvKlKvuo.js","assets/ProposalDetailPage-BVXTjXw2.js","assets/clipboard-B9ndUJKl.js","assets/arrow-left-DR0foZvi.js","assets/clipboard-C86rsVqL.js","assets/download-Bo3vdlNo.js","assets/ProposalEditPage-Bs3ak0PG.js","assets/markdown-editor-CEQMlLWe.js","assets/markdown-editor-DUEthZ0y.css","assets/CollapsibleSection-5qSoX47l.js","assets/ImplementationStepsEditor-PM47REBn.js","assets/TagInput-CdXzv6hj.js","assets/NewProposalPage-BLIqmuks.js","assets/TerminalPage-CqPXFOIN.js","assets/refresh-cw-D-IgYQ7y.js","assets/chevrons-up-DbnuGl5g.js","assets/circle-play-tZLgOcAc.js","assets/terminal-xj47PT8r.css","assets/TerminalSessionPage-DR2cApWv.js","assets/radio-group-DCKkxIgI.js","assets/arrow-down-BjGtxyJ7.js","assets/droid-Caom7ttu.js","assets/UtilitiesPage-BGiBB5PT.js","assets/CodePage-BiRf5q_q.js","assets/AgentsPage-Bage8eYW.js","assets/browser-modal-Ck4-s_jh.js","assets/registry-ANRa5WBi.js","assets/tag-D0iVh1-U.js","assets/AgentDetailPage-WLAnnZep.js","assets/NewAgentPage-8-abvhkI.js","assets/AgentEditPage-DOemUkvg.js","assets/ResourcesPage-BSyX_kHV.js","assets/KnowledgePage-DIlUufGq.js","assets/arrow-up-DCGMV1HG.js","assets/KnowledgeDetailPage-CLizVIxC.js","assets/KnowledgeEditPage-B-sdY_DS.js","assets/SourceInput-BoRGYtye.js","assets/NewKnowledgePage-Rvj741x1.js","assets/ProjectPage-_L4wqwrB.js","assets/ProjectEditPage-DC5-v_2a.js","assets/ArchitecturePage-Cj4dVDWO.js","assets/ArchitectureEditPage-WY9k_1tR.js","assets/RolePage-D8xB0I-F.js","assets/RoleEditPage-CnWierul.js","assets/IdentityPage-DCpoDF2j.js","assets/alert-CHpdnk6F.js","assets/eye-Cr9Hfzxo.js","assets/UserSettingsPage-BuMnU394.js","assets/AuthSettingsPage-Bs5wL5Yj.js","assets/switch-E0GrYmgh.js","assets/circle-alert-BPvQggmh.js","assets/ApiKeysSettingsPage-DCKd4LXE.js","assets/AgentsSettingsPage-Cw2MTnHU.js","assets/pause-DuR7ql7H.js","assets/IntegrationsSettingsPage-DJpf2gZn.js","assets/GitSettingsPage-Cn-MciXq.js","assets/McpSettingsPage-BPDLne4q.js","assets/PromptsSettingsPage-K-qqpF2S.js","assets/RulesSettingsPage-CZBQ0u-x.js","assets/GitPage-BG-ZSGfu.js","assets/SchedulePage-HBFJT_19.js","assets/JobDetailPage-9shaUPlO.js","assets/UserPreferencesPage-CPkulDiM.js","assets/ActivityPage-C_HqpJt2.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-D5C34QbO.js","assets/card-BTg0Fecj.js","assets/badge-BLbqPEov.js","assets/label-BtnLfquf.js","assets/use-terminal-LpFJK0k7.js","assets/terminal-preview-CnytxbzD.js","assets/xterm-DTxiCjtJ.js","assets/xterm-qxJ8_QYu.css","assets/circle-check-DED-Ne-m.js","assets/chevron-left-V0REBjky.js","assets/search-kmqzieAc.js","assets/zap-DBKgrFQ_.js","assets/calendar-CaBty4QE.js","assets/folder-git-2-CHwnYB8a.js","assets/play-D_fLXyLR.js","assets/clock-pVWUoJDo.js","assets/circle-check-big-CFsUUo2_.js","assets/plus-ZCd709aN.js","assets/LoginPage-FUflG9B8.js","assets/tabs-DPohYGac.js","assets/CallbackPage-BMZOjCy_.js","assets/circle-x-CDTWutj4.js","assets/ProposalsPage-DaR_KuZx.js","assets/ProposalDetailPage-mZ9qj0wJ.js","assets/clipboard-B9ndUJKl.js","assets/arrow-left-BJ9vzpff.js","assets/clipboard-CTFAlaYo.js","assets/download-Bt7lWWYL.js","assets/ProposalEditPage-DqJ3Po23.js","assets/markdown-editor-Cmsc5nNu.js","assets/markdown-editor-DUEthZ0y.css","assets/CollapsibleSection-CG5gAVWB.js","assets/ImplementationStepsEditor-BZQKPJ1C.js","assets/TagInput-DL_48L0p.js","assets/NewProposalPage-BDbStKts.js","assets/TerminalPage-BL8pa_9k.js","assets/refresh-cw-BF0hXtxu.js","assets/chevrons-up-BvR9KFeO.js","assets/circle-play-DQ32zg60.js","assets/terminal-xj47PT8r.css","assets/TerminalSessionPage-DcC_o_sA.js","assets/radio-group-STvlCDl-.js","assets/arrow-down-D5oSUxtq.js","assets/droid-Caom7ttu.js","assets/UtilitiesPage-6BGeolw9.js","assets/CodePage-CCNmmkv_.js","assets/AgentsPage-9Hre8AD1.js","assets/browser-modal-Dh2dy_2x.js","assets/registry-ANRa5WBi.js","assets/tag-Dg9notds.js","assets/AgentDetailPage-DtGFrHzZ.js","assets/NewAgentPage-CqBlVqdy.js","assets/AgentEditPage-1026aJox.js","assets/ResourcesPage-WMPlFn0S.js","assets/KnowledgePage-DS7xi1qJ.js","assets/arrow-up-DWNinaN_.js","assets/KnowledgeDetailPage-C-a0njhy.js","assets/KnowledgeEditPage-B93ffsgz.js","assets/SourceInput-CXv23vkE.js","assets/NewKnowledgePage-ue0ZRgKf.js","assets/ProjectPage-DAlEu9Af.js","assets/ProjectEditPage-_a9hJTgi.js","assets/ArchitecturePage-FcRJGw8O.js","assets/ArchitectureEditPage-DiRR28Rx.js","assets/RolePage-4aL0vR7F.js","assets/RoleEditPage-DIoamJfW.js","assets/IdentityPage-Dj-Do8q7.js","assets/alert-DQ9shGSz.js","assets/eye-o7gPa7E6.js","assets/UserSettingsPage-CqibuEiq.js","assets/AuthSettingsPage-D528tGhc.js","assets/switch-CjDKvzd0.js","assets/circle-alert-DR1DiLh5.js","assets/ApiKeysSettingsPage-D-l8q30N.js","assets/AgentsSettingsPage-CILCHaO9.js","assets/pause-EIDnvByV.js","assets/IntegrationsSettingsPage-DTT6nX3v.js","assets/GitSettingsPage-Cld_sN5t.js","assets/McpSettingsPage-A6uws8gQ.js","assets/PromptsSettingsPage-4_C5zvq6.js","assets/RulesSettingsPage-CerRq_kE.js","assets/GitPage-ofZrdSSl.js","assets/SchedulePage-DF9TqOA6.js","assets/JobDetailPage-CWexORzH.js","assets/UserPreferencesPage-DoMyvwD4.js","assets/ActivityPage-AWTVFLmK.js"])))=>i.map(i=>d[i]);
2
2
  function MT(e,n){for(var r=0;r<n.length;r++){const i=n[r];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in e)){const s=Object.getOwnPropertyDescriptor(i,l);s&&Object.defineProperty(e,l,s.get?s:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(l){if(l.ep)return;l.ep=!0;const s=r(l);fetch(l.href,s)}})();function Cc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ph={exports:{}},Al={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -39,15 +39,15 @@ function MT(e,n){for(var r=0;r<n.length;r++){const i=n[r];if(typeof i!="string"&
39
39
  *
40
40
  * This source code is licensed under the MIT license found in the
41
41
  * LICENSE file in the root directory of this source tree.
42
- */var Zx;function IT(){if(Zx)return Tl;Zx=1;var e=LT(),n=Yp(),r=G0();function i(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function c(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(s(t)!==t)throw Error(i(188))}function d(t){var a=t.alternate;if(!a){if(a=s(t),a===null)throw Error(i(188));return a!==t?null:t}for(var o=t,u=a;;){var p=o.return;if(p===null)break;var x=p.alternate;if(x===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===o)return f(p),t;if(x===u)return f(p),a;x=x.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=x;else{for(var C=!1,_=p.child;_;){if(_===o){C=!0,o=p,u=x;break}if(_===u){C=!0,u=p,o=x;break}_=_.sibling}if(!C){for(_=x.child;_;){if(_===o){C=!0,o=x,u=p;break}if(_===u){C=!0,u=x,o=p;break}_=_.sibling}if(!C)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?t:a}function h(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=h(t),a!==null)return a;t=t.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),R=Symbol.for("react.consumer"),N=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function J(t){return t===null||typeof t!="object"?null:(t=Z&&t[Z]||t["@@iterator"],typeof t=="function"?t:null)}var ne=Symbol.for("react.client.reference");function G(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ne?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case S:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case j:return"SuspenseList";case Y:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case b:return"Portal";case N:return(t.displayName||"Context")+".Provider";case R:return(t._context.displayName||"Context")+".Consumer";case O:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case H:return a=t.displayName||null,a!==null?a:G(t.type)||"Memo";case $:a=t._payload,t=t._init;try{return G(t(a))}catch{}}return null}var ae=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},ie=[],k=-1;function W(t){return{current:t}}function se(t){0>k||(t.current=ie[k],ie[k]=null,k--)}function M(t,a){k++,ie[k]=t.current,t.current=a}var ce=W(null),Ee=W(null),pe=W(null),le=W(null);function ve(t,a){switch(M(pe,a),M(Ee,t),M(ce,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?yx(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=yx(a),t=vx(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}se(ce),M(ce,t)}function Ve(){se(ce),se(Ee),se(pe)}function De(t){t.memoizedState!==null&&M(le,t);var a=ce.current,o=vx(a,t.type);a!==o&&(M(Ee,t),M(ce,o))}function Be(t){Ee.current===t&&(se(ce),se(Ee)),le.current===t&&(se(le),wl._currentValue=B)}var We=Object.prototype.hasOwnProperty,Ke=e.unstable_scheduleCallback,xt=e.unstable_cancelCallback,zn=e.unstable_shouldYield,tr=e.unstable_requestPaint,Rt=e.unstable_now,yi=e.unstable_getCurrentPriorityLevel,bn=e.unstable_ImmediatePriority,wn=e.unstable_UserBlockingPriority,hr=e.unstable_NormalPriority,ea=e.unstable_LowPriority,Sn=e.unstable_IdlePriority,ta=e.log,vi=e.unstable_setDisableYieldValue,ee=null,de=null;function ke(t){if(typeof ta=="function"&&vi(t),de&&typeof de.setStrictMode=="function")try{de.setStrictMode(ee,t)}catch{}}var Ae=Math.clz32?Math.clz32:fn,Je=Math.log,Zt=Math.LN2;function fn(t){return t>>>=0,t===0?32:31-(Je(t)/Zt|0)|0}var Wt=256,In=4194304;function Jt(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Nt(t,a,o){var u=t.pendingLanes;if(u===0)return 0;var p=0,x=t.suspendedLanes,C=t.pingedLanes;t=t.warmLanes;var _=u&134217727;return _!==0?(u=_&~x,u!==0?p=Jt(u):(C&=_,C!==0?p=Jt(C):o||(o=_&~t,o!==0&&(p=Jt(o))))):(_=u&~x,_!==0?p=Jt(_):C!==0?p=Jt(C):o||(o=u&~t,o!==0&&(p=Jt(o)))),p===0?0:a!==0&&a!==p&&(a&x)===0&&(x=p&-p,o=a&-a,x>=o||x===32&&(o&4194048)!==0)?a:p}function dn(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function En(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Cs(){var t=Wt;return Wt<<=1,(Wt&4194048)===0&&(Wt=256),t}function ks(){var t=In;return In<<=1,(In&62914560)===0&&(In=4194304),t}function jo(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function La(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function As(t,a,o,u,p,x){var C=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var _=t.entanglements,P=t.expirationTimes,q=t.hiddenUpdates;for(o=C&~o;0<o;){var te=31-Ae(o),oe=1<<te;_[te]=0,P[te]=-1;var K=q[te];if(K!==null)for(q[te]=null,te=0;te<K.length;te++){var X=K[te];X!==null&&(X.lane&=-536870913)}o&=~oe}u!==0&&xi(t,u,0),x!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=x&~(C&~a))}function xi(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var u=31-Ae(a);t.entangledLanes|=a,t.entanglements[u]=t.entanglements[u]|1073741824|o&4194090}function Do(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var u=31-Ae(o),p=1<<u;p&a|t[u]&a&&(t[u]|=a),o&=~p}}function pr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function za(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function F(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:zx(t.type))}function fe(t,a){var o=Q.p;try{return Q.p=t,a()}finally{Q.p=o}}var ye=Math.random().toString(36).slice(2),ge="__reactFiber$"+ye,Se="__reactProps$"+ye,Ue="__reactContainer$"+ye,It="__reactEvents$"+ye,pt="__reactListeners$"+ye,Xe="__reactHandles$"+ye,Gt="__reactResources$"+ye,an="__reactMarker$"+ye;function hn(t){delete t[ge],delete t[Se],delete t[It],delete t[pt],delete t[Xe]}function lt(t){var a=t[ge];if(a)return a;for(var o=t.parentNode;o;){if(a=o[Ue]||o[ge]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=Sx(t);t!==null;){if(o=t[ge])return o;t=Sx(t)}return a}t=o,o=t.parentNode}return null}function Yt(t){if(t=t[ge]||t[Ue]){var a=t.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return t}return null}function Bt(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(i(33))}function mr(t){var a=t[Gt];return a||(a=t[Gt]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function mt(t){t[an]=!0}var bi=new Set,Ts={};function Ot(t,a){Ut(t,a),Ut(t+"Capture",a)}function Ut(t,a){for(Ts[t]=a,t=0;t<a.length;t++)bi.add(a[t])}var gt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ia={},Ct={};function _t(t){return We.call(Ct,t)?!0:We.call(Ia,t)?!1:gt.test(t)?Ct[t]=!0:(Ia[t]=!0,!1)}function bt(t,a,o){if(_t(a))if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+o)}}function nr(t,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+o)}}function Cn(t,a,o,u){if(u===null)t.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(a,o,""+u)}}var Mr,Ht;function kn(t){if(Mr===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Mr=a&&a[1]||"",Ht=-1<o.stack.indexOf(`
42
+ */var Zx;function IT(){if(Zx)return Tl;Zx=1;var e=LT(),n=Yp(),r=G0();function i(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function c(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(s(t)!==t)throw Error(i(188))}function d(t){var a=t.alternate;if(!a){if(a=s(t),a===null)throw Error(i(188));return a!==t?null:t}for(var o=t,u=a;;){var p=o.return;if(p===null)break;var x=p.alternate;if(x===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===o)return f(p),t;if(x===u)return f(p),a;x=x.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=x;else{for(var C=!1,_=p.child;_;){if(_===o){C=!0,o=p,u=x;break}if(_===u){C=!0,u=p,o=x;break}_=_.sibling}if(!C){for(_=x.child;_;){if(_===o){C=!0,o=x,u=p;break}if(_===u){C=!0,u=x,o=p;break}_=_.sibling}if(!C)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?t:a}function h(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=h(t),a!==null)return a;t=t.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),R=Symbol.for("react.consumer"),N=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function J(t){return t===null||typeof t!="object"?null:(t=Z&&t[Z]||t["@@iterator"],typeof t=="function"?t:null)}var ne=Symbol.for("react.client.reference");function G(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ne?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case S:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case j:return"SuspenseList";case Y:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case b:return"Portal";case N:return(t.displayName||"Context")+".Provider";case R:return(t._context.displayName||"Context")+".Consumer";case O:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case H:return a=t.displayName||null,a!==null?a:G(t.type)||"Memo";case $:a=t._payload,t=t._init;try{return G(t(a))}catch{}}return null}var ae=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},ie=[],k=-1;function W(t){return{current:t}}function se(t){0>k||(t.current=ie[k],ie[k]=null,k--)}function M(t,a){k++,ie[k]=t.current,t.current=a}var ce=W(null),Ee=W(null),pe=W(null),le=W(null);function ve(t,a){switch(M(pe,a),M(Ee,t),M(ce,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?yx(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=yx(a),t=vx(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}se(ce),M(ce,t)}function Ve(){se(ce),se(Ee),se(pe)}function De(t){t.memoizedState!==null&&M(le,t);var a=ce.current,o=vx(a,t.type);a!==o&&(M(Ee,t),M(ce,o))}function Be(t){Ee.current===t&&(se(ce),se(Ee)),le.current===t&&(se(le),wl._currentValue=B)}var We=Object.prototype.hasOwnProperty,Ke=e.unstable_scheduleCallback,xt=e.unstable_cancelCallback,zn=e.unstable_shouldYield,tr=e.unstable_requestPaint,Rt=e.unstable_now,yi=e.unstable_getCurrentPriorityLevel,bn=e.unstable_ImmediatePriority,wn=e.unstable_UserBlockingPriority,hr=e.unstable_NormalPriority,ea=e.unstable_LowPriority,Sn=e.unstable_IdlePriority,ta=e.log,vi=e.unstable_setDisableYieldValue,ee=null,de=null;function ke(t){if(typeof ta=="function"&&vi(t),de&&typeof de.setStrictMode=="function")try{de.setStrictMode(ee,t)}catch{}}var Ae=Math.clz32?Math.clz32:fn,Je=Math.log,Zt=Math.LN2;function fn(t){return t>>>=0,t===0?32:31-(Je(t)/Zt|0)|0}var Wt=256,In=4194304;function Jt(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Nt(t,a,o){var u=t.pendingLanes;if(u===0)return 0;var p=0,x=t.suspendedLanes,C=t.pingedLanes;t=t.warmLanes;var _=u&134217727;return _!==0?(u=_&~x,u!==0?p=Jt(u):(C&=_,C!==0?p=Jt(C):o||(o=_&~t,o!==0&&(p=Jt(o))))):(_=u&~x,_!==0?p=Jt(_):C!==0?p=Jt(C):o||(o=u&~t,o!==0&&(p=Jt(o)))),p===0?0:a!==0&&a!==p&&(a&x)===0&&(x=p&-p,o=a&-a,x>=o||x===32&&(o&4194048)!==0)?a:p}function dn(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function En(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Es(){var t=Wt;return Wt<<=1,(Wt&4194048)===0&&(Wt=256),t}function Cs(){var t=In;return In<<=1,(In&62914560)===0&&(In=4194304),t}function jo(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function La(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ks(t,a,o,u,p,x){var C=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var _=t.entanglements,P=t.expirationTimes,q=t.hiddenUpdates;for(o=C&~o;0<o;){var te=31-Ae(o),oe=1<<te;_[te]=0,P[te]=-1;var K=q[te];if(K!==null)for(q[te]=null,te=0;te<K.length;te++){var X=K[te];X!==null&&(X.lane&=-536870913)}o&=~oe}u!==0&&xi(t,u,0),x!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=x&~(C&~a))}function xi(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var u=31-Ae(a);t.entangledLanes|=a,t.entanglements[u]=t.entanglements[u]|1073741824|o&4194090}function Do(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var u=31-Ae(o),p=1<<u;p&a|t[u]&a&&(t[u]|=a),o&=~p}}function pr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function za(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function F(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:zx(t.type))}function fe(t,a){var o=Q.p;try{return Q.p=t,a()}finally{Q.p=o}}var ye=Math.random().toString(36).slice(2),ge="__reactFiber$"+ye,Se="__reactProps$"+ye,Ue="__reactContainer$"+ye,It="__reactEvents$"+ye,pt="__reactListeners$"+ye,Xe="__reactHandles$"+ye,Gt="__reactResources$"+ye,an="__reactMarker$"+ye;function hn(t){delete t[ge],delete t[Se],delete t[It],delete t[pt],delete t[Xe]}function lt(t){var a=t[ge];if(a)return a;for(var o=t.parentNode;o;){if(a=o[Ue]||o[ge]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=Sx(t);t!==null;){if(o=t[ge])return o;t=Sx(t)}return a}t=o,o=t.parentNode}return null}function Yt(t){if(t=t[ge]||t[Ue]){var a=t.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return t}return null}function Bt(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(i(33))}function mr(t){var a=t[Gt];return a||(a=t[Gt]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function mt(t){t[an]=!0}var bi=new Set,As={};function Ot(t,a){Ut(t,a),Ut(t+"Capture",a)}function Ut(t,a){for(As[t]=a,t=0;t<a.length;t++)bi.add(a[t])}var gt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ia={},Ct={};function _t(t){return We.call(Ct,t)?!0:We.call(Ia,t)?!1:gt.test(t)?Ct[t]=!0:(Ia[t]=!0,!1)}function bt(t,a,o){if(_t(a))if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+o)}}function nr(t,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+o)}}function Cn(t,a,o,u){if(u===null)t.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(a,o,""+u)}}var Mr,Ht;function kn(t){if(Mr===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Mr=a&&a[1]||"",Ht=-1<o.stack.indexOf(`
43
43
  at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
44
44
  `+Mr+t+Ht}var jr=!1;function cf(t,a){if(!t||jr)return"";jr=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(X){var K=X}Reflect.construct(t,[],oe)}else{try{oe.call()}catch(X){K=X}t.call(oe.prototype)}}else{try{throw Error()}catch(X){K=X}(oe=t())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(X){if(X&&K&&typeof X.stack=="string")return[X.stack,K.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=u.DetermineComponentFrameRoot(),C=x[0],_=x[1];if(C&&_){var P=C.split(`
45
45
  `),q=_.split(`
46
46
  `);for(p=u=0;u<P.length&&!P[u].includes("DetermineComponentFrameRoot");)u++;for(;p<q.length&&!q[p].includes("DetermineComponentFrameRoot");)p++;if(u===P.length||p===q.length)for(u=P.length-1,p=q.length-1;1<=u&&0<=p&&P[u]!==q[p];)p--;for(;1<=u&&0<=p;u--,p--)if(P[u]!==q[p]){if(u!==1||p!==1)do if(u--,p--,0>p||P[u]!==q[p]){var te=`
47
47
  `+P[u].replace(" at new "," at ");return t.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",t.displayName)),te}while(1<=u&&0<=p);break}}}finally{jr=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?kn(o):""}function k2(t){switch(t.tag){case 26:case 27:case 5:return kn(t.type);case 16:return kn("Lazy");case 13:return kn("Suspense");case 19:return kn("SuspenseList");case 0:case 15:return cf(t.type,!1);case 11:return cf(t.type.render,!1);case 1:return cf(t.type,!0);case 31:return kn("Activity");default:return""}}function fg(t){try{var a="";do a+=k2(t),t=t.return;while(t);return a}catch(o){return`
48
48
  Error generating stack: `+o.message+`
49
- `+o.stack}}function Bn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function dg(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function A2(t){var a=dg(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,a),u=""+t[a];if(!t.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var p=o.get,x=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return p.call(this)},set:function(C){u=""+C,x.call(this,C)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(C){u=""+C},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Rs(t){t._valueTracker||(t._valueTracker=A2(t))}function hg(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return t&&(u=dg(t)?t.checked?"true":"false":t.value),t=u,t!==o?(a.setValue(t),!0):!1}function Ns(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var T2=/[\n"\\]/g;function Un(t){return t.replace(T2,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function ff(t,a,o,u,p,x,C,_){t.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?t.type=C:t.removeAttribute("type"),a!=null?C==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+Bn(a)):t.value!==""+Bn(a)&&(t.value=""+Bn(a)):C!=="submit"&&C!=="reset"||t.removeAttribute("value"),a!=null?df(t,C,Bn(a)):o!=null?df(t,C,Bn(o)):u!=null&&t.removeAttribute("value"),p==null&&x!=null&&(t.defaultChecked=!!x),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Bn(_):t.removeAttribute("name")}function pg(t,a,o,u,p,x,C,_){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.type=x),a!=null||o!=null){if(!(x!=="submit"&&x!=="reset"||a!=null))return;o=o!=null?""+Bn(o):"",a=a!=null?""+Bn(a):o,_||a===t.value||(t.value=a),t.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=_?t.checked:!!u,t.defaultChecked=!!u,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(t.name=C)}function df(t,a,o){a==="number"&&Ns(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function wi(t,a,o,u){if(t=t.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<t.length;o++)p=a.hasOwnProperty("$"+t[o].value),t[o].selected!==p&&(t[o].selected=p),p&&u&&(t[o].defaultSelected=!0)}else{for(o=""+Bn(o),a=null,p=0;p<t.length;p++){if(t[p].value===o){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}a!==null||t[p].disabled||(a=t[p])}a!==null&&(a.selected=!0)}}function mg(t,a,o){if(a!=null&&(a=""+Bn(a),a!==t.value&&(t.value=a),o==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=o!=null?""+Bn(o):""}function gg(t,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(ae(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=Bn(a),t.defaultValue=o,u=t.textContent,u===o&&u!==""&&u!==null&&(t.value=u)}function Si(t,a){if(a){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=a;return}}t.textContent=a}var R2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function yg(t,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":u?t.setProperty(a,o):typeof o!="number"||o===0||R2.has(a)?a==="float"?t.cssFloat=o:t[a]=(""+o).trim():t[a]=o+"px"}function vg(t,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(t=t.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&yg(t,p,u)}else for(var x in a)a.hasOwnProperty(x)&&yg(t,x,a[x])}function hf(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var N2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _s(t){return _2.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var pf=null;function mf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ei=null,Ci=null;function xg(t){var a=Yt(t);if(a&&(t=a.stateNode)){var o=t[Se]||null;e:switch(t=a.stateNode,a.type){case"input":if(ff(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Un(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==t&&u.form===t.form){var p=u[Se]||null;if(!p)throw Error(i(90));ff(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===t.form&&hg(u)}break e;case"textarea":mg(t,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&wi(t,!!o.multiple,a,!1)}}}var gf=!1;function bg(t,a,o){if(gf)return t(a,o);gf=!0;try{var u=t(a);return u}finally{if(gf=!1,(Ei!==null||Ci!==null)&&(mu(),Ei&&(a=Ei,t=Ci,Ci=Ei=null,xg(a),t)))for(a=0;a<t.length;a++)xg(t[a])}}function Oo(t,a){var o=t.stateNode;if(o===null)return null;var u=o[Se]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yf=!1;if(Dr)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){yf=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{yf=!1}var na=null,vf=null,Ms=null;function wg(){if(Ms)return Ms;var t,a=vf,o=a.length,u,p="value"in na?na.value:na.textContent,x=p.length;for(t=0;t<o&&a[t]===p[t];t++);var C=o-t;for(u=1;u<=C&&a[o-u]===p[x-u];u++);return Ms=p.slice(t,1<u?1-u:void 0)}function js(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function Ds(){return!0}function Sg(){return!1}function pn(t){function a(o,u,p,x,C){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(o=t[_],this[_]=o?o(x):x[_]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Ds:Sg,this.isPropagationStopped=Sg,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Ds)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ds)},persist:function(){},isPersistent:Ds}),a}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Os=pn(Ba),Lo=m({},Ba,{view:0,detail:0}),M2=pn(Lo),xf,bf,zo,Ps=m({},Lo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==zo&&(zo&&t.type==="mousemove"?(xf=t.screenX-zo.screenX,bf=t.screenY-zo.screenY):bf=xf=0,zo=t),xf)},movementY:function(t){return"movementY"in t?t.movementY:bf}}),Eg=pn(Ps),j2=m({},Ps,{dataTransfer:0}),D2=pn(j2),O2=m({},Lo,{relatedTarget:0}),wf=pn(O2),P2=m({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),L2=pn(P2),z2=m({},Ba,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),I2=pn(z2),B2=m({},Ba,{data:0}),Cg=pn(B2),U2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},F2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V2(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=F2[t])?!!a[t]:!1}function Sf(){return V2}var q2=m({},Lo,{key:function(t){if(t.key){var a=U2[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=js(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?H2[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sf,charCode:function(t){return t.type==="keypress"?js(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?js(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),$2=pn(q2),G2=m({},Ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kg=pn(G2),Y2=m({},Lo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sf}),K2=pn(Y2),X2=m({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q2=pn(X2),Z2=m({},Ps,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),W2=pn(Z2),J2=m({},Ba,{newState:0,oldState:0}),eA=pn(J2),tA=[9,13,27,32],Ef=Dr&&"CompositionEvent"in window,Io=null;Dr&&"documentMode"in document&&(Io=document.documentMode);var nA=Dr&&"TextEvent"in window&&!Io,Ag=Dr&&(!Ef||Io&&8<Io&&11>=Io),Tg=" ",Rg=!1;function Ng(t,a){switch(t){case"keyup":return tA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _g(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ki=!1;function rA(t,a){switch(t){case"compositionend":return _g(a);case"keypress":return a.which!==32?null:(Rg=!0,Tg);case"textInput":return t=a.data,t===Tg&&Rg?null:t;default:return null}}function aA(t,a){if(ki)return t==="compositionend"||!Ef&&Ng(t,a)?(t=wg(),Ms=vf=na=null,ki=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Ag&&a.locale!=="ko"?null:a.data;default:return null}}var iA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mg(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!iA[t.type]:a==="textarea"}function jg(t,a,o,u){Ei?Ci?Ci.push(u):Ci=[u]:Ei=u,a=wu(a,"onChange"),0<a.length&&(o=new Os("onChange","change",null,o,u),t.push({event:o,listeners:a}))}var Bo=null,Uo=null;function oA(t){dx(t,0)}function Ls(t){var a=Bt(t);if(hg(a))return t}function Dg(t,a){if(t==="change")return a}var Og=!1;if(Dr){var Cf;if(Dr){var kf="oninput"in document;if(!kf){var Pg=document.createElement("div");Pg.setAttribute("oninput","return;"),kf=typeof Pg.oninput=="function"}Cf=kf}else Cf=!1;Og=Cf&&(!document.documentMode||9<document.documentMode)}function Lg(){Bo&&(Bo.detachEvent("onpropertychange",zg),Uo=Bo=null)}function zg(t){if(t.propertyName==="value"&&Ls(Uo)){var a=[];jg(a,Uo,t,mf(t)),bg(oA,a)}}function lA(t,a,o){t==="focusin"?(Lg(),Bo=a,Uo=o,Bo.attachEvent("onpropertychange",zg)):t==="focusout"&&Lg()}function sA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ls(Uo)}function uA(t,a){if(t==="click")return Ls(a)}function cA(t,a){if(t==="input"||t==="change")return Ls(a)}function fA(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var An=typeof Object.is=="function"?Object.is:fA;function Ho(t,a){if(An(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var o=Object.keys(t),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!We.call(a,p)||!An(t[p],a[p]))return!1}return!0}function Ig(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Bg(t,a){var o=Ig(t);t=0;for(var u;o;){if(o.nodeType===3){if(u=t+o.textContent.length,t<=a&&u>=a)return{node:o,offset:a-t};t=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Ig(o)}}function Ug(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Ug(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Hg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=Ns(t.document);a instanceof t.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)t=a.contentWindow;else break;a=Ns(t.document)}return a}function Af(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var dA=Dr&&"documentMode"in document&&11>=document.documentMode,Ai=null,Tf=null,Fo=null,Rf=!1;function Fg(t,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Rf||Ai==null||Ai!==Ns(u)||(u=Ai,"selectionStart"in u&&Af(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Fo&&Ho(Fo,u)||(Fo=u,u=wu(Tf,"onSelect"),0<u.length&&(a=new Os("onSelect","select",null,a,o),t.push({event:a,listeners:u}),a.target=Ai)))}function Ua(t,a){var o={};return o[t.toLowerCase()]=a.toLowerCase(),o["Webkit"+t]="webkit"+a,o["Moz"+t]="moz"+a,o}var Ti={animationend:Ua("Animation","AnimationEnd"),animationiteration:Ua("Animation","AnimationIteration"),animationstart:Ua("Animation","AnimationStart"),transitionrun:Ua("Transition","TransitionRun"),transitionstart:Ua("Transition","TransitionStart"),transitioncancel:Ua("Transition","TransitionCancel"),transitionend:Ua("Transition","TransitionEnd")},Nf={},Vg={};Dr&&(Vg=document.createElement("div").style,"AnimationEvent"in window||(delete Ti.animationend.animation,delete Ti.animationiteration.animation,delete Ti.animationstart.animation),"TransitionEvent"in window||delete Ti.transitionend.transition);function Ha(t){if(Nf[t])return Nf[t];if(!Ti[t])return t;var a=Ti[t],o;for(o in a)if(a.hasOwnProperty(o)&&o in Vg)return Nf[t]=a[o];return t}var qg=Ha("animationend"),$g=Ha("animationiteration"),Gg=Ha("animationstart"),hA=Ha("transitionrun"),pA=Ha("transitionstart"),mA=Ha("transitioncancel"),Yg=Ha("transitionend"),Kg=new Map,_f="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");_f.push("scrollEnd");function rr(t,a){Kg.set(t,a),Ot(a,[t])}var Xg=new WeakMap;function Hn(t,a){if(typeof t=="object"&&t!==null){var o=Xg.get(t);return o!==void 0?o:(a={value:t,source:a,stack:fg(a)},Xg.set(t,a),a)}return{value:t,source:a,stack:fg(a)}}var Fn=[],Ri=0,Mf=0;function zs(){for(var t=Ri,a=Mf=Ri=0;a<t;){var o=Fn[a];Fn[a++]=null;var u=Fn[a];Fn[a++]=null;var p=Fn[a];Fn[a++]=null;var x=Fn[a];if(Fn[a++]=null,u!==null&&p!==null){var C=u.pending;C===null?p.next=p:(p.next=C.next,C.next=p),u.pending=p}x!==0&&Qg(o,p,x)}}function Is(t,a,o,u){Fn[Ri++]=t,Fn[Ri++]=a,Fn[Ri++]=o,Fn[Ri++]=u,Mf|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function jf(t,a,o,u){return Is(t,a,o,u),Bs(t)}function Ni(t,a){return Is(t,null,null,a),Bs(t)}function Qg(t,a,o){t.lanes|=o;var u=t.alternate;u!==null&&(u.lanes|=o);for(var p=!1,x=t.return;x!==null;)x.childLanes|=o,u=x.alternate,u!==null&&(u.childLanes|=o),x.tag===22&&(t=x.stateNode,t===null||t._visibility&1||(p=!0)),t=x,x=x.return;return t.tag===3?(x=t.stateNode,p&&a!==null&&(p=31-Ae(o),t=x.hiddenUpdates,u=t[p],u===null?t[p]=[a]:u.push(a),a.lane=o|536870912),x):null}function Bs(t){if(50<hl)throw hl=0,Id=null,Error(i(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var _i={};function gA(t,a,o,u){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(t,a,o,u){return new gA(t,a,o,u)}function Df(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Or(t,a){var o=t.alternate;return o===null?(o=Tn(t.tag,a,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=a,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,a=t.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function Zg(t,a){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,a=o.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function Us(t,a,o,u,p,x){var C=0;if(u=t,typeof t=="function")Df(t)&&(C=1);else if(typeof t=="string")C=vT(t,o,ce.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Y:return t=Tn(31,o,a,p),t.elementType=Y,t.lanes=x,t;case S:return Fa(o.children,p,x,a);case E:C=8,p|=24;break;case T:return t=Tn(12,o,a,p|2),t.elementType=T,t.lanes=x,t;case L:return t=Tn(13,o,a,p),t.elementType=L,t.lanes=x,t;case j:return t=Tn(19,o,a,p),t.elementType=j,t.lanes=x,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case A:case N:C=10;break e;case R:C=9;break e;case O:C=11;break e;case H:C=14;break e;case $:C=16,u=null;break e}C=29,o=Error(i(130,t===null?"null":typeof t,"")),u=null}return a=Tn(C,o,a,p),a.elementType=t,a.type=u,a.lanes=x,a}function Fa(t,a,o,u){return t=Tn(7,t,u,a),t.lanes=o,t}function Of(t,a,o){return t=Tn(6,t,null,a),t.lanes=o,t}function Pf(t,a,o){return a=Tn(4,t.children!==null?t.children:[],t.key,a),a.lanes=o,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var Mi=[],ji=0,Hs=null,Fs=0,Vn=[],qn=0,Va=null,Pr=1,Lr="";function qa(t,a){Mi[ji++]=Fs,Mi[ji++]=Hs,Hs=t,Fs=a}function Wg(t,a,o){Vn[qn++]=Pr,Vn[qn++]=Lr,Vn[qn++]=Va,Va=t;var u=Pr;t=Lr;var p=32-Ae(u)-1;u&=~(1<<p),o+=1;var x=32-Ae(a)+p;if(30<x){var C=p-p%5;x=(u&(1<<C)-1).toString(32),u>>=C,p-=C,Pr=1<<32-Ae(a)+p|o<<p|u,Lr=x+t}else Pr=1<<x|o<<p|u,Lr=t}function Lf(t){t.return!==null&&(qa(t,1),Wg(t,1,0))}function zf(t){for(;t===Hs;)Hs=Mi[--ji],Mi[ji]=null,Fs=Mi[--ji],Mi[ji]=null;for(;t===Va;)Va=Vn[--qn],Vn[qn]=null,Lr=Vn[--qn],Vn[qn]=null,Pr=Vn[--qn],Vn[qn]=null}var on=null,wt=null,tt=!1,$a=null,gr=!1,If=Error(i(519));function Ga(t){var a=Error(i(418,""));throw $o(Hn(a,t)),If}function Jg(t){var a=t.stateNode,o=t.type,u=t.memoizedProps;switch(a[ge]=t,a[Se]=u,o){case"dialog":Ge("cancel",a),Ge("close",a);break;case"iframe":case"object":case"embed":Ge("load",a);break;case"video":case"audio":for(o=0;o<ml.length;o++)Ge(ml[o],a);break;case"source":Ge("error",a);break;case"img":case"image":case"link":Ge("error",a),Ge("load",a);break;case"details":Ge("toggle",a);break;case"input":Ge("invalid",a),pg(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Rs(a);break;case"select":Ge("invalid",a);break;case"textarea":Ge("invalid",a),gg(a,u.value,u.defaultValue,u.children),Rs(a)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||gx(a.textContent,o)?(u.popover!=null&&(Ge("beforetoggle",a),Ge("toggle",a)),u.onScroll!=null&&Ge("scroll",a),u.onScrollEnd!=null&&Ge("scrollend",a),u.onClick!=null&&(a.onclick=Su),a=!0):a=!1,a||Ga(t)}function ey(t){for(on=t.return;on;)switch(on.tag){case 5:case 13:gr=!1;return;case 27:case 3:gr=!0;return;default:on=on.return}}function Vo(t){if(t!==on)return!1;if(!tt)return ey(t),tt=!0,!1;var a=t.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||eh(t.type,t.memoizedProps)),o=!o),o&&wt&&Ga(t),ey(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));e:{for(t=t.nextSibling,a=0;t;){if(t.nodeType===8)if(o=t.data,o==="/$"){if(a===0){wt=ir(t.nextSibling);break e}a--}else o!=="$"&&o!=="$!"&&o!=="$?"||a++;t=t.nextSibling}wt=null}}else a===27?(a=wt,va(t.type)?(t=ah,ah=null,wt=t):wt=a):wt=on?ir(t.stateNode.nextSibling):null;return!0}function qo(){wt=on=null,tt=!1}function ty(){var t=$a;return t!==null&&(yn===null?yn=t:yn.push.apply(yn,t),$a=null),t}function $o(t){$a===null?$a=[t]:$a.push(t)}var Bf=W(null),Ya=null,zr=null;function ra(t,a,o){M(Bf,a._currentValue),a._currentValue=o}function Ir(t){t._currentValue=Bf.current,se(Bf)}function Uf(t,a,o){for(;t!==null;){var u=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),t===o)break;t=t.return}}function Hf(t,a,o,u){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var x=p.dependencies;if(x!==null){var C=p.child;x=x.firstContext;e:for(;x!==null;){var _=x;x=p;for(var P=0;P<a.length;P++)if(_.context===a[P]){x.lanes|=o,_=x.alternate,_!==null&&(_.lanes|=o),Uf(x.return,o,t),u||(C=null);break e}x=_.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(i(341));C.lanes|=o,x=C.alternate,x!==null&&(x.lanes|=o),Uf(C,o,t),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===t){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function Go(t,a,o,u){t=null;for(var p=a,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var C=p.alternate;if(C===null)throw Error(i(387));if(C=C.memoizedProps,C!==null){var _=p.type;An(p.pendingProps.value,C.value)||(t!==null?t.push(_):t=[_])}}else if(p===le.current){if(C=p.alternate,C===null)throw Error(i(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(wl):t=[wl])}p=p.return}t!==null&&Hf(a,t,o,u),a.flags|=262144}function Vs(t){for(t=t.firstContext;t!==null;){if(!An(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ka(t){Ya=t,zr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function en(t){return ny(Ya,t)}function qs(t,a){return Ya===null&&Ka(t),ny(t,a)}function ny(t,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},zr===null){if(t===null)throw Error(i(308));zr=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else zr=zr.next=a;return o}var yA=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(o,u){t.push(u)}};this.abort=function(){a.aborted=!0,t.forEach(function(o){return o()})}},vA=e.unstable_scheduleCallback,xA=e.unstable_NormalPriority,Pt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new yA,data:new Map,refCount:0}}function Yo(t){t.refCount--,t.refCount===0&&vA(xA,function(){t.controller.abort()})}var Ko=null,Vf=0,Di=0,Oi=null;function bA(t,a){if(Ko===null){var o=Ko=[];Vf=0,Di=$d(),Oi={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Vf++,a.then(ry,ry),a}function ry(){if(--Vf===0&&Ko!==null){Oi!==null&&(Oi.status="fulfilled");var t=Ko;Ko=null,Di=0,Oi=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function wA(t,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return t.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var ay=z.S;z.S=function(t,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&bA(t,a),ay!==null&&ay(t,a)};var Xa=W(null);function qf(){var t=Xa.current;return t!==null?t:ct.pooledCache}function $s(t,a){a===null?M(Xa,Xa.current):M(Xa,a.pool)}function iy(){var t=qf();return t===null?null:{parent:Pt._currentValue,pool:t}}var Xo=Error(i(460)),oy=Error(i(474)),Gs=Error(i(542)),$f={then:function(){}};function ly(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ys(){}function sy(t,a,o){switch(o=t[o],o===void 0?t.push(a):o!==a&&(a.then(Ys,Ys),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,cy(t),t;default:if(typeof a.status=="string")a.then(Ys,Ys);else{if(t=ct,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=a,t.status="pending",t.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,cy(t),t}throw Qo=a,Xo}}var Qo=null;function uy(){if(Qo===null)throw Error(i(459));var t=Qo;return Qo=null,t}function cy(t){if(t===Xo||t===Gs)throw Error(i(483))}var aa=!1;function Gf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yf(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ia(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function oa(t,a,o){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(nt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=Bs(t),Qg(t,null,o),a}return Is(t,u,a,o),Bs(t)}function Zo(t,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=t.pendingLanes,o|=u,a.lanes=o,Do(t,o)}}function Kf(t,a){var o=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,x=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};x===null?p=x=C:x=x.next=C,o=o.next}while(o!==null);x===null?p=x=a:x=x.next=a}else p=x=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:u.shared,callbacks:u.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=a:t.next=a,o.lastBaseUpdate=a}var Xf=!1;function Wo(){if(Xf){var t=Oi;if(t!==null)throw t}}function Jo(t,a,o,u){Xf=!1;var p=t.updateQueue;aa=!1;var x=p.firstBaseUpdate,C=p.lastBaseUpdate,_=p.shared.pending;if(_!==null){p.shared.pending=null;var P=_,q=P.next;P.next=null,C===null?x=q:C.next=q,C=P;var te=t.alternate;te!==null&&(te=te.updateQueue,_=te.lastBaseUpdate,_!==C&&(_===null?te.firstBaseUpdate=q:_.next=q,te.lastBaseUpdate=P))}if(x!==null){var oe=p.baseState;C=0,te=q=P=null,_=x;do{var K=_.lane&-536870913,X=K!==_.lane;if(X?(Qe&K)===K:(u&K)===K){K!==0&&K===Di&&(Xf=!0),te!==null&&(te=te.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Me=t,Re=_;K=a;var ot=o;switch(Re.tag){case 1:if(Me=Re.payload,typeof Me=="function"){oe=Me.call(ot,oe,K);break e}oe=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Re.payload,K=typeof Me=="function"?Me.call(ot,oe,K):Me,K==null)break e;oe=m({},oe,K);break e;case 2:aa=!0}}K=_.callback,K!==null&&(t.flags|=64,X&&(t.flags|=8192),X=p.callbacks,X===null?p.callbacks=[K]:X.push(K))}else X={lane:K,tag:_.tag,payload:_.payload,callback:_.callback,next:null},te===null?(q=te=X,P=oe):te=te.next=X,C|=K;if(_=_.next,_===null){if(_=p.shared.pending,_===null)break;X=_,_=X.next,X.next=null,p.lastBaseUpdate=X,p.shared.pending=null}}while(!0);te===null&&(P=oe),p.baseState=P,p.firstBaseUpdate=q,p.lastBaseUpdate=te,x===null&&(p.shared.lanes=0),pa|=C,t.lanes=C,t.memoizedState=oe}}function fy(t,a){if(typeof t!="function")throw Error(i(191,t));t.call(a)}function dy(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)fy(o[t],a)}var Pi=W(null),Ks=W(0);function hy(t,a){t=$r,M(Ks,t),M(Pi,a),$r=t|a.baseLanes}function Qf(){M(Ks,$r),M(Pi,Pi.current)}function Zf(){$r=Ks.current,se(Pi),se(Ks)}var la=0,He=null,at=null,Mt=null,Xs=!1,Li=!1,Qa=!1,Qs=0,el=0,zi=null,SA=0;function kt(){throw Error(i(321))}function Wf(t,a){if(a===null)return!1;for(var o=0;o<a.length&&o<t.length;o++)if(!An(t[o],a[o]))return!1;return!0}function Jf(t,a,o,u,p,x){return la=x,He=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,z.H=t===null||t.memoizedState===null?Qy:Zy,Qa=!1,x=o(u,p),Qa=!1,Li&&(x=my(a,o,u,p)),py(t),x}function py(t){z.H=nu;var a=at!==null&&at.next!==null;if(la=0,Mt=at=He=null,Xs=!1,el=0,zi=null,a)throw Error(i(300));t===null||Ft||(t=t.dependencies,t!==null&&Vs(t)&&(Ft=!0))}function my(t,a,o,u){He=t;var p=0;do{if(Li&&(zi=null),el=0,Li=!1,25<=p)throw Error(i(301));if(p+=1,Mt=at=null,t.updateQueue!=null){var x=t.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}z.H=NA,x=a(o,u)}while(Li);return x}function EA(){var t=z.H,a=t.useState()[0];return a=typeof a.then=="function"?tl(a):a,t=t.useState()[0],(at!==null?at.memoizedState:null)!==t&&(He.flags|=1024),a}function ed(){var t=Qs!==0;return Qs=0,t}function td(t,a,o){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~o}function nd(t){if(Xs){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Xs=!1}la=0,Mt=at=He=null,Li=!1,el=Qs=0,zi=null}function mn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?He.memoizedState=Mt=t:Mt=Mt.next=t,Mt}function jt(){if(at===null){var t=He.alternate;t=t!==null?t.memoizedState:null}else t=at.next;var a=Mt===null?He.memoizedState:Mt.next;if(a!==null)Mt=a,at=t;else{if(t===null)throw He.alternate===null?Error(i(467)):Error(i(310));at=t,t={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Mt===null?He.memoizedState=Mt=t:Mt=Mt.next=t}return Mt}function rd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function tl(t){var a=el;return el+=1,zi===null&&(zi=[]),t=sy(zi,t,a),a=He,(Mt===null?a.memoizedState:Mt.next)===null&&(a=a.alternate,z.H=a===null||a.memoizedState===null?Qy:Zy),t}function Zs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return tl(t);if(t.$$typeof===N)return en(t)}throw Error(i(438,String(t)))}function ad(t){var a=null,o=He.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=He.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=rd(),He.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(t),u=0;u<t;u++)o[u]=D;return a.index++,o}function Br(t,a){return typeof a=="function"?a(t):a}function Ws(t){var a=jt();return id(a,at,t)}function id(t,a,o){var u=t.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=t.baseQueue,x=u.pending;if(x!==null){if(p!==null){var C=p.next;p.next=x.next,x.next=C}a.baseQueue=p=x,u.pending=null}if(x=t.baseState,p===null)t.memoizedState=x;else{a=p.next;var _=C=null,P=null,q=a,te=!1;do{var oe=q.lane&-536870913;if(oe!==q.lane?(Qe&oe)===oe:(la&oe)===oe){var K=q.revertLane;if(K===0)P!==null&&(P=P.next={lane:0,revertLane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),oe===Di&&(te=!0);else if((la&K)===K){q=q.next,K===Di&&(te=!0);continue}else oe={lane:0,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},P===null?(_=P=oe,C=x):P=P.next=oe,He.lanes|=K,pa|=K;oe=q.action,Qa&&o(x,oe),x=q.hasEagerState?q.eagerState:o(x,oe)}else K={lane:oe,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},P===null?(_=P=K,C=x):P=P.next=K,He.lanes|=oe,pa|=oe;q=q.next}while(q!==null&&q!==a);if(P===null?C=x:P.next=_,!An(x,t.memoizedState)&&(Ft=!0,te&&(o=Oi,o!==null)))throw o;t.memoizedState=x,t.baseState=C,t.baseQueue=P,u.lastRenderedState=x}return p===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function od(t){var a=jt(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var u=o.dispatch,p=o.pending,x=a.memoizedState;if(p!==null){o.pending=null;var C=p=p.next;do x=t(x,C.action),C=C.next;while(C!==p);An(x,a.memoizedState)||(Ft=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),o.lastRenderedState=x}return[x,u]}function gy(t,a,o){var u=He,p=jt(),x=tt;if(x){if(o===void 0)throw Error(i(407));o=o()}else o=a();var C=!An((at||p).memoizedState,o);C&&(p.memoizedState=o,Ft=!0),p=p.queue;var _=xy.bind(null,u,p,t);if(nl(2048,8,_,[t]),p.getSnapshot!==a||C||Mt!==null&&Mt.memoizedState.tag&1){if(u.flags|=2048,Ii(9,Js(),vy.bind(null,u,p,o,a),null),ct===null)throw Error(i(349));x||(la&124)!==0||yy(u,a,o)}return o}function yy(t,a,o){t.flags|=16384,t={getSnapshot:a,value:o},a=He.updateQueue,a===null?(a=rd(),He.updateQueue=a,a.stores=[t]):(o=a.stores,o===null?a.stores=[t]:o.push(t))}function vy(t,a,o,u){a.value=o,a.getSnapshot=u,by(a)&&wy(t)}function xy(t,a,o){return o(function(){by(a)&&wy(t)})}function by(t){var a=t.getSnapshot;t=t.value;try{var o=a();return!An(t,o)}catch{return!0}}function wy(t){var a=Ni(t,2);a!==null&&jn(a,t,2)}function ld(t){var a=mn();if(typeof t=="function"){var o=t;if(t=o(),Qa){ke(!0);try{o()}finally{ke(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:t},a}function Sy(t,a,o,u){return t.baseState=o,id(t,at,typeof u=="function"?u:Br)}function CA(t,a,o,u,p){if(tu(t))throw Error(i(485));if(t=a.action,t!==null){var x={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};z.T!==null?o(!0):x.isTransition=!1,u(x),o=a.pending,o===null?(x.next=a.pending=x,Ey(a,x)):(x.next=o.next,a.pending=o.next=x)}}function Ey(t,a){var o=a.action,u=a.payload,p=t.state;if(a.isTransition){var x=z.T,C={};z.T=C;try{var _=o(p,u),P=z.S;P!==null&&P(C,_),Cy(t,a,_)}catch(q){sd(t,a,q)}finally{z.T=x}}else try{x=o(p,u),Cy(t,a,x)}catch(q){sd(t,a,q)}}function Cy(t,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){ky(t,a,u)},function(u){return sd(t,a,u)}):ky(t,a,o)}function ky(t,a,o){a.status="fulfilled",a.value=o,Ay(a),t.state=o,a=t.pending,a!==null&&(o=a.next,o===a?t.pending=null:(o=o.next,a.next=o,Ey(t,o)))}function sd(t,a,o){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,Ay(a),a=a.next;while(a!==u)}t.action=null}function Ay(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function Ty(t,a){return a}function Ry(t,a){if(tt){var o=ct.formState;if(o!==null){e:{var u=He;if(tt){if(wt){t:{for(var p=wt,x=gr;p.nodeType!==8;){if(!x){p=null;break t}if(p=ir(p.nextSibling),p===null){p=null;break t}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){wt=ir(p.nextSibling),u=p.data==="F!";break e}}Ga(u)}u=!1}u&&(a=o[0])}}return o=mn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ty,lastRenderedState:a},o.queue=u,o=Yy.bind(null,He,u),u.dispatch=o,u=ld(!1),x=hd.bind(null,He,!1,u.queue),u=mn(),p={state:a,dispatch:null,action:t,pending:null},u.queue=p,o=CA.bind(null,He,p,x,o),p.dispatch=o,u.memoizedState=t,[a,o,!1]}function Ny(t){var a=jt();return _y(a,at,t)}function _y(t,a,o){if(a=id(t,a,Ty)[0],t=Ws(Br)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=tl(a)}catch(C){throw C===Xo?Gs:C}else u=a;a=jt();var p=a.queue,x=p.dispatch;return o!==a.memoizedState&&(He.flags|=2048,Ii(9,Js(),kA.bind(null,p,o),null)),[u,x,t]}function kA(t,a){t.action=a}function My(t){var a=jt(),o=at;if(o!==null)return _y(a,o,t);jt(),a=a.memoizedState,o=jt();var u=o.queue.dispatch;return o.memoizedState=t,[a,u,!1]}function Ii(t,a,o,u){return t={tag:t,create:o,deps:u,inst:a,next:null},a=He.updateQueue,a===null&&(a=rd(),He.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=t.next=t:(u=o.next,o.next=t,t.next=u,a.lastEffect=t),t}function Js(){return{destroy:void 0,resource:void 0}}function jy(){return jt().memoizedState}function eu(t,a,o,u){var p=mn();u=u===void 0?null:u,He.flags|=t,p.memoizedState=Ii(1|a,Js(),o,u)}function nl(t,a,o,u){var p=jt();u=u===void 0?null:u;var x=p.memoizedState.inst;at!==null&&u!==null&&Wf(u,at.memoizedState.deps)?p.memoizedState=Ii(a,x,o,u):(He.flags|=t,p.memoizedState=Ii(1|a,x,o,u))}function Dy(t,a){eu(8390656,8,t,a)}function Oy(t,a){nl(2048,8,t,a)}function Py(t,a){return nl(4,2,t,a)}function Ly(t,a){return nl(4,4,t,a)}function zy(t,a){if(typeof a=="function"){t=t();var o=a(t);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function Iy(t,a,o){o=o!=null?o.concat([t]):null,nl(4,4,zy.bind(null,a,t),o)}function ud(){}function By(t,a){var o=jt();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&Wf(a,u[1])?u[0]:(o.memoizedState=[t,a],t)}function Uy(t,a){var o=jt();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&Wf(a,u[1]))return u[0];if(u=t(),Qa){ke(!0);try{t()}finally{ke(!1)}}return o.memoizedState=[u,a],u}function cd(t,a,o){return o===void 0||(la&1073741824)!==0?t.memoizedState=a:(t.memoizedState=o,t=Vv(),He.lanes|=t,pa|=t,o)}function Hy(t,a,o,u){return An(o,a)?o:Pi.current!==null?(t=cd(t,o,u),An(t,a)||(Ft=!0),t):(la&42)===0?(Ft=!0,t.memoizedState=o):(t=Vv(),He.lanes|=t,pa|=t,a)}function Fy(t,a,o,u,p){var x=Q.p;Q.p=x!==0&&8>x?x:8;var C=z.T,_={};z.T=_,hd(t,!1,a,o);try{var P=p(),q=z.S;if(q!==null&&q(_,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var te=wA(P,u);rl(t,a,te,Mn(t))}else rl(t,a,u,Mn(t))}catch(oe){rl(t,a,{then:function(){},status:"rejected",reason:oe},Mn())}finally{Q.p=x,z.T=C}}function AA(){}function fd(t,a,o,u){if(t.tag!==5)throw Error(i(476));var p=Vy(t).queue;Fy(t,p,a,B,o===null?AA:function(){return qy(t),o(u)})}function Vy(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:B},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function qy(t){var a=Vy(t).next.queue;rl(t,a,{},Mn())}function dd(){return en(wl)}function $y(){return jt().memoizedState}function Gy(){return jt().memoizedState}function TA(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=Mn();t=ia(o);var u=oa(a,t,o);u!==null&&(jn(u,a,o),Zo(u,a,o)),a={cache:Ff()},t.payload=a;return}a=a.return}}function RA(t,a,o){var u=Mn();o={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},tu(t)?Ky(a,o):(o=jf(t,a,o,u),o!==null&&(jn(o,t,u),Xy(o,a,u)))}function Yy(t,a,o){var u=Mn();rl(t,a,o,u)}function rl(t,a,o,u){var p={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(tu(t))Ky(a,p);else{var x=t.alternate;if(t.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var C=a.lastRenderedState,_=x(C,o);if(p.hasEagerState=!0,p.eagerState=_,An(_,C))return Is(t,a,p,0),ct===null&&zs(),!1}catch{}finally{}if(o=jf(t,a,p,u),o!==null)return jn(o,t,u),Xy(o,a,u),!0}return!1}function hd(t,a,o,u){if(u={lane:2,revertLane:$d(),action:u,hasEagerState:!1,eagerState:null,next:null},tu(t)){if(a)throw Error(i(479))}else a=jf(t,o,u,2),a!==null&&jn(a,t,2)}function tu(t){var a=t.alternate;return t===He||a!==null&&a===He}function Ky(t,a){Li=Xs=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function Xy(t,a,o){if((o&4194048)!==0){var u=a.lanes;u&=t.pendingLanes,o|=u,a.lanes=o,Do(t,o)}}var nu={readContext:en,use:Zs,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt},Qy={readContext:en,use:Zs,useCallback:function(t,a){return mn().memoizedState=[t,a===void 0?null:a],t},useContext:en,useEffect:Dy,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,eu(4194308,4,zy.bind(null,a,t),o)},useLayoutEffect:function(t,a){return eu(4194308,4,t,a)},useInsertionEffect:function(t,a){eu(4,2,t,a)},useMemo:function(t,a){var o=mn();a=a===void 0?null:a;var u=t();if(Qa){ke(!0);try{t()}finally{ke(!1)}}return o.memoizedState=[u,a],u},useReducer:function(t,a,o){var u=mn();if(o!==void 0){var p=o(a);if(Qa){ke(!0);try{o(a)}finally{ke(!1)}}}else p=a;return u.memoizedState=u.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},u.queue=t,t=t.dispatch=RA.bind(null,He,t),[u.memoizedState,t]},useRef:function(t){var a=mn();return t={current:t},a.memoizedState=t},useState:function(t){t=ld(t);var a=t.queue,o=Yy.bind(null,He,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:ud,useDeferredValue:function(t,a){var o=mn();return cd(o,t,a)},useTransition:function(){var t=ld(!1);return t=Fy.bind(null,He,t.queue,!0,!1),mn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,o){var u=He,p=mn();if(tt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),ct===null)throw Error(i(349));(Qe&124)!==0||yy(u,a,o)}p.memoizedState=o;var x={value:o,getSnapshot:a};return p.queue=x,Dy(xy.bind(null,u,x,t),[t]),u.flags|=2048,Ii(9,Js(),vy.bind(null,u,x,o,a),null),o},useId:function(){var t=mn(),a=ct.identifierPrefix;if(tt){var o=Lr,u=Pr;o=(u&~(1<<32-Ae(u)-1)).toString(32)+o,a="«"+a+"R"+o,o=Qs++,0<o&&(a+="H"+o.toString(32)),a+="»"}else o=SA++,a="«"+a+"r"+o.toString(32)+"»";return t.memoizedState=a},useHostTransitionStatus:dd,useFormState:Ry,useActionState:Ry,useOptimistic:function(t){var a=mn();a.memoizedState=a.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=hd.bind(null,He,!0,o),o.dispatch=a,[t,a]},useMemoCache:ad,useCacheRefresh:function(){return mn().memoizedState=TA.bind(null,He)}},Zy={readContext:en,use:Zs,useCallback:By,useContext:en,useEffect:Oy,useImperativeHandle:Iy,useInsertionEffect:Py,useLayoutEffect:Ly,useMemo:Uy,useReducer:Ws,useRef:jy,useState:function(){return Ws(Br)},useDebugValue:ud,useDeferredValue:function(t,a){var o=jt();return Hy(o,at.memoizedState,t,a)},useTransition:function(){var t=Ws(Br)[0],a=jt().memoizedState;return[typeof t=="boolean"?t:tl(t),a]},useSyncExternalStore:gy,useId:$y,useHostTransitionStatus:dd,useFormState:Ny,useActionState:Ny,useOptimistic:function(t,a){var o=jt();return Sy(o,at,t,a)},useMemoCache:ad,useCacheRefresh:Gy},NA={readContext:en,use:Zs,useCallback:By,useContext:en,useEffect:Oy,useImperativeHandle:Iy,useInsertionEffect:Py,useLayoutEffect:Ly,useMemo:Uy,useReducer:od,useRef:jy,useState:function(){return od(Br)},useDebugValue:ud,useDeferredValue:function(t,a){var o=jt();return at===null?cd(o,t,a):Hy(o,at.memoizedState,t,a)},useTransition:function(){var t=od(Br)[0],a=jt().memoizedState;return[typeof t=="boolean"?t:tl(t),a]},useSyncExternalStore:gy,useId:$y,useHostTransitionStatus:dd,useFormState:My,useActionState:My,useOptimistic:function(t,a){var o=jt();return at!==null?Sy(o,at,t,a):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:ad,useCacheRefresh:Gy},Bi=null,al=0;function ru(t){var a=al;return al+=1,Bi===null&&(Bi=[]),sy(Bi,t,a)}function il(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function au(t,a){throw a.$$typeof===y?Error(i(525)):(t=Object.prototype.toString.call(a),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Wy(t){var a=t._init;return a(t._payload)}function Jy(t){function a(U,I){if(t){var V=U.deletions;V===null?(U.deletions=[I],U.flags|=16):V.push(I)}}function o(U,I){if(!t)return null;for(;I!==null;)a(U,I),I=I.sibling;return null}function u(U){for(var I=new Map;U!==null;)U.key!==null?I.set(U.key,U):I.set(U.index,U),U=U.sibling;return I}function p(U,I){return U=Or(U,I),U.index=0,U.sibling=null,U}function x(U,I,V){return U.index=V,t?(V=U.alternate,V!==null?(V=V.index,V<I?(U.flags|=67108866,I):V):(U.flags|=67108866,I)):(U.flags|=1048576,I)}function C(U){return t&&U.alternate===null&&(U.flags|=67108866),U}function _(U,I,V,re){return I===null||I.tag!==6?(I=Of(V,U.mode,re),I.return=U,I):(I=p(I,V),I.return=U,I)}function P(U,I,V,re){var xe=V.type;return xe===S?te(U,I,V.props.children,re,V.key):I!==null&&(I.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===$&&Wy(xe)===I.type)?(I=p(I,V.props),il(I,V),I.return=U,I):(I=Us(V.type,V.key,V.props,null,U.mode,re),il(I,V),I.return=U,I)}function q(U,I,V,re){return I===null||I.tag!==4||I.stateNode.containerInfo!==V.containerInfo||I.stateNode.implementation!==V.implementation?(I=Pf(V,U.mode,re),I.return=U,I):(I=p(I,V.children||[]),I.return=U,I)}function te(U,I,V,re,xe){return I===null||I.tag!==7?(I=Fa(V,U.mode,re,xe),I.return=U,I):(I=p(I,V),I.return=U,I)}function oe(U,I,V){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=Of(""+I,U.mode,V),I.return=U,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case w:return V=Us(I.type,I.key,I.props,null,U.mode,V),il(V,I),V.return=U,V;case b:return I=Pf(I,U.mode,V),I.return=U,I;case $:var re=I._init;return I=re(I._payload),oe(U,I,V)}if(ae(I)||J(I))return I=Fa(I,U.mode,V,null),I.return=U,I;if(typeof I.then=="function")return oe(U,ru(I),V);if(I.$$typeof===N)return oe(U,qs(U,I),V);au(U,I)}return null}function K(U,I,V,re){var xe=I!==null?I.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return xe!==null?null:_(U,I,""+V,re);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case w:return V.key===xe?P(U,I,V,re):null;case b:return V.key===xe?q(U,I,V,re):null;case $:return xe=V._init,V=xe(V._payload),K(U,I,V,re)}if(ae(V)||J(V))return xe!==null?null:te(U,I,V,re,null);if(typeof V.then=="function")return K(U,I,ru(V),re);if(V.$$typeof===N)return K(U,I,qs(U,V),re);au(U,V)}return null}function X(U,I,V,re,xe){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return U=U.get(V)||null,_(I,U,""+re,xe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return U=U.get(re.key===null?V:re.key)||null,P(I,U,re,xe);case b:return U=U.get(re.key===null?V:re.key)||null,q(I,U,re,xe);case $:var qe=re._init;return re=qe(re._payload),X(U,I,V,re,xe)}if(ae(re)||J(re))return U=U.get(V)||null,te(I,U,re,xe,null);if(typeof re.then=="function")return X(U,I,V,ru(re),xe);if(re.$$typeof===N)return X(U,I,V,qs(I,re),xe);au(I,re)}return null}function Me(U,I,V,re){for(var xe=null,qe=null,Ce=I,Ne=I=0,qt=null;Ce!==null&&Ne<V.length;Ne++){Ce.index>Ne?(qt=Ce,Ce=null):qt=Ce.sibling;var et=K(U,Ce,V[Ne],re);if(et===null){Ce===null&&(Ce=qt);break}t&&Ce&&et.alternate===null&&a(U,Ce),I=x(et,I,Ne),qe===null?xe=et:qe.sibling=et,qe=et,Ce=qt}if(Ne===V.length)return o(U,Ce),tt&&qa(U,Ne),xe;if(Ce===null){for(;Ne<V.length;Ne++)Ce=oe(U,V[Ne],re),Ce!==null&&(I=x(Ce,I,Ne),qe===null?xe=Ce:qe.sibling=Ce,qe=Ce);return tt&&qa(U,Ne),xe}for(Ce=u(Ce);Ne<V.length;Ne++)qt=X(Ce,U,Ne,V[Ne],re),qt!==null&&(t&&qt.alternate!==null&&Ce.delete(qt.key===null?Ne:qt.key),I=x(qt,I,Ne),qe===null?xe=qt:qe.sibling=qt,qe=qt);return t&&Ce.forEach(function(Ea){return a(U,Ea)}),tt&&qa(U,Ne),xe}function Re(U,I,V,re){if(V==null)throw Error(i(151));for(var xe=null,qe=null,Ce=I,Ne=I=0,qt=null,et=V.next();Ce!==null&&!et.done;Ne++,et=V.next()){Ce.index>Ne?(qt=Ce,Ce=null):qt=Ce.sibling;var Ea=K(U,Ce,et.value,re);if(Ea===null){Ce===null&&(Ce=qt);break}t&&Ce&&Ea.alternate===null&&a(U,Ce),I=x(Ea,I,Ne),qe===null?xe=Ea:qe.sibling=Ea,qe=Ea,Ce=qt}if(et.done)return o(U,Ce),tt&&qa(U,Ne),xe;if(Ce===null){for(;!et.done;Ne++,et=V.next())et=oe(U,et.value,re),et!==null&&(I=x(et,I,Ne),qe===null?xe=et:qe.sibling=et,qe=et);return tt&&qa(U,Ne),xe}for(Ce=u(Ce);!et.done;Ne++,et=V.next())et=X(Ce,U,Ne,et.value,re),et!==null&&(t&&et.alternate!==null&&Ce.delete(et.key===null?Ne:et.key),I=x(et,I,Ne),qe===null?xe=et:qe.sibling=et,qe=et);return t&&Ce.forEach(function(_T){return a(U,_T)}),tt&&qa(U,Ne),xe}function ot(U,I,V,re){if(typeof V=="object"&&V!==null&&V.type===S&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case w:e:{for(var xe=V.key;I!==null;){if(I.key===xe){if(xe=V.type,xe===S){if(I.tag===7){o(U,I.sibling),re=p(I,V.props.children),re.return=U,U=re;break e}}else if(I.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===$&&Wy(xe)===I.type){o(U,I.sibling),re=p(I,V.props),il(re,V),re.return=U,U=re;break e}o(U,I);break}else a(U,I);I=I.sibling}V.type===S?(re=Fa(V.props.children,U.mode,re,V.key),re.return=U,U=re):(re=Us(V.type,V.key,V.props,null,U.mode,re),il(re,V),re.return=U,U=re)}return C(U);case b:e:{for(xe=V.key;I!==null;){if(I.key===xe)if(I.tag===4&&I.stateNode.containerInfo===V.containerInfo&&I.stateNode.implementation===V.implementation){o(U,I.sibling),re=p(I,V.children||[]),re.return=U,U=re;break e}else{o(U,I);break}else a(U,I);I=I.sibling}re=Pf(V,U.mode,re),re.return=U,U=re}return C(U);case $:return xe=V._init,V=xe(V._payload),ot(U,I,V,re)}if(ae(V))return Me(U,I,V,re);if(J(V)){if(xe=J(V),typeof xe!="function")throw Error(i(150));return V=xe.call(V),Re(U,I,V,re)}if(typeof V.then=="function")return ot(U,I,ru(V),re);if(V.$$typeof===N)return ot(U,I,qs(U,V),re);au(U,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,I!==null&&I.tag===6?(o(U,I.sibling),re=p(I,V),re.return=U,U=re):(o(U,I),re=Of(V,U.mode,re),re.return=U,U=re),C(U)):o(U,I)}return function(U,I,V,re){try{al=0;var xe=ot(U,I,V,re);return Bi=null,xe}catch(Ce){if(Ce===Xo||Ce===Gs)throw Ce;var qe=Tn(29,Ce,null,U.mode);return qe.lanes=re,qe.return=U,qe}finally{}}}var Ui=Jy(!0),ev=Jy(!1),$n=W(null),yr=null;function sa(t){var a=t.alternate;M(Lt,Lt.current&1),M($n,t),yr===null&&(a===null||Pi.current!==null||a.memoizedState!==null)&&(yr=t)}function tv(t){if(t.tag===22){if(M(Lt,Lt.current),M($n,t),yr===null){var a=t.alternate;a!==null&&a.memoizedState!==null&&(yr=t)}}else ua()}function ua(){M(Lt,Lt.current),M($n,$n.current)}function Ur(t){se($n),yr===t&&(yr=null),se(Lt)}var Lt=W(0);function iu(t){for(var a=t;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||rh(o)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function pd(t,a,o,u){a=t.memoizedState,o=o(u,a),o=o==null?a:m({},a,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var md={enqueueSetState:function(t,a,o){t=t._reactInternals;var u=Mn(),p=ia(u);p.payload=a,o!=null&&(p.callback=o),a=oa(t,p,u),a!==null&&(jn(a,t,u),Zo(a,t,u))},enqueueReplaceState:function(t,a,o){t=t._reactInternals;var u=Mn(),p=ia(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=oa(t,p,u),a!==null&&(jn(a,t,u),Zo(a,t,u))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var o=Mn(),u=ia(o);u.tag=2,a!=null&&(u.callback=a),a=oa(t,u,o),a!==null&&(jn(a,t,o),Zo(a,t,o))}};function nv(t,a,o,u,p,x,C){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,x,C):a.prototype&&a.prototype.isPureReactComponent?!Ho(o,u)||!Ho(p,x):!0}function rv(t,a,o,u){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==t&&md.enqueueReplaceState(a,a.state,null)}function Za(t,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(t=t.defaultProps){o===a&&(o=m({},o));for(var p in t)o[p]===void 0&&(o[p]=t[p])}return o}var ou=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function av(t){ou(t)}function iv(t){console.error(t)}function ov(t){ou(t)}function lu(t,a){try{var o=t.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function lv(t,a,o){try{var u=t.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function gd(t,a,o){return o=ia(o),o.tag=3,o.payload={element:null},o.callback=function(){lu(t,a)},o}function sv(t){return t=ia(t),t.tag=3,t}function uv(t,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var x=u.value;t.payload=function(){return p(x)},t.callback=function(){lv(a,o,u)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(t.callback=function(){lv(a,o,u),typeof p!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function _A(t,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&Go(a,o,p,!0),o=$n.current,o!==null){switch(o.tag){case 13:return yr===null?Ud():o.alternate===null&&St===0&&(St=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===$f?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Fd(t,u,p)),!1;case 22:return o.flags|=65536,u===$f?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Fd(t,u,p)),!1}throw Error(i(435,o.tag))}return Fd(t,u,p),Ud(),!1}if(tt)return a=$n.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==If&&(t=Error(i(422),{cause:u}),$o(Hn(t,o)))):(u!==If&&(a=Error(i(423),{cause:u}),$o(Hn(a,o))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,u=Hn(u,o),p=gd(t.stateNode,u,p),Kf(t,p),St!==4&&(St=2)),!1;var x=Error(i(520),{cause:u});if(x=Hn(x,o),dl===null?dl=[x]:dl.push(x),St!==4&&(St=2),a===null)return!0;u=Hn(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,t=p&-p,o.lanes|=t,t=gd(o.stateNode,u,t),Kf(o,t),!1;case 1:if(a=o.type,x=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ma===null||!ma.has(x))))return o.flags|=65536,p&=-p,o.lanes|=p,p=sv(p),uv(p,t,o,u),Kf(o,p),!1}o=o.return}while(o!==null);return!1}var cv=Error(i(461)),Ft=!1;function Kt(t,a,o,u){a.child=t===null?ev(a,null,o,u):Ui(a,t.child,o,u)}function fv(t,a,o,u,p){o=o.render;var x=a.ref;if("ref"in u){var C={};for(var _ in u)_!=="ref"&&(C[_]=u[_])}else C=u;return Ka(a),u=Jf(t,a,o,C,x,p),_=ed(),t!==null&&!Ft?(td(t,a,p),Hr(t,a,p)):(tt&&_&&Lf(a),a.flags|=1,Kt(t,a,u,p),a.child)}function dv(t,a,o,u,p){if(t===null){var x=o.type;return typeof x=="function"&&!Df(x)&&x.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=x,hv(t,a,x,u,p)):(t=Us(o.type,null,u,a,a.mode,p),t.ref=a.ref,t.return=a,a.child=t)}if(x=t.child,!Cd(t,p)){var C=x.memoizedProps;if(o=o.compare,o=o!==null?o:Ho,o(C,u)&&t.ref===a.ref)return Hr(t,a,p)}return a.flags|=1,t=Or(x,u),t.ref=a.ref,t.return=a,a.child=t}function hv(t,a,o,u,p){if(t!==null){var x=t.memoizedProps;if(Ho(x,u)&&t.ref===a.ref)if(Ft=!1,a.pendingProps=u=x,Cd(t,p))(t.flags&131072)!==0&&(Ft=!0);else return a.lanes=t.lanes,Hr(t,a,p)}return yd(t,a,o,u,p)}function pv(t,a,o){var u=a.pendingProps,p=u.children,x=t!==null?t.memoizedState:null;if(u.mode==="hidden"){if((a.flags&128)!==0){if(u=x!==null?x.baseLanes|o:o,t!==null){for(p=a.child=t.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;a.childLanes=x&~u}else a.childLanes=0,a.child=null;return mv(t,a,u,o)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&$s(a,x!==null?x.cachePool:null),x!==null?hy(a,x):Qf(),tv(a);else return a.lanes=a.childLanes=536870912,mv(t,a,x!==null?x.baseLanes|o:o,o)}else x!==null?($s(a,x.cachePool),hy(a,x),ua(),a.memoizedState=null):(t!==null&&$s(a,null),Qf(),ua());return Kt(t,a,p,o),a.child}function mv(t,a,o,u){var p=qf();return p=p===null?null:{parent:Pt._currentValue,pool:p},a.memoizedState={baseLanes:o,cachePool:p},t!==null&&$s(a,null),Qf(),tv(a),t!==null&&Go(t,a,u,!0),null}function su(t,a){var o=a.ref;if(o===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(t===null||t.ref!==o)&&(a.flags|=4194816)}}function yd(t,a,o,u,p){return Ka(a),o=Jf(t,a,o,u,void 0,p),u=ed(),t!==null&&!Ft?(td(t,a,p),Hr(t,a,p)):(tt&&u&&Lf(a),a.flags|=1,Kt(t,a,o,p),a.child)}function gv(t,a,o,u,p,x){return Ka(a),a.updateQueue=null,o=my(a,u,o,p),py(t),u=ed(),t!==null&&!Ft?(td(t,a,x),Hr(t,a,x)):(tt&&u&&Lf(a),a.flags|=1,Kt(t,a,o,x),a.child)}function yv(t,a,o,u,p){if(Ka(a),a.stateNode===null){var x=_i,C=o.contextType;typeof C=="object"&&C!==null&&(x=en(C)),x=new o(u,x),a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=md,a.stateNode=x,x._reactInternals=a,x=a.stateNode,x.props=u,x.state=a.memoizedState,x.refs={},Gf(a),C=o.contextType,x.context=typeof C=="object"&&C!==null?en(C):_i,x.state=a.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(pd(a,o,C,u),x.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&md.enqueueReplaceState(x,x.state,null),Jo(a,u,x,p),Wo(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(t===null){x=a.stateNode;var _=a.memoizedProps,P=Za(o,_);x.props=P;var q=x.context,te=o.contextType;C=_i,typeof te=="object"&&te!==null&&(C=en(te));var oe=o.getDerivedStateFromProps;te=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function",_=a.pendingProps!==_,te||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(_||q!==C)&&rv(a,x,u,C),aa=!1;var K=a.memoizedState;x.state=K,Jo(a,u,x,p),Wo(),q=a.memoizedState,_||K!==q||aa?(typeof oe=="function"&&(pd(a,o,oe,u),q=a.memoizedState),(P=aa||nv(a,o,P,u,K,q,C))?(te||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(a.flags|=4194308)):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=q),x.props=u,x.state=q,x.context=C,u=P):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{x=a.stateNode,Yf(t,a),C=a.memoizedProps,te=Za(o,C),x.props=te,oe=a.pendingProps,K=x.context,q=o.contextType,P=_i,typeof q=="object"&&q!==null&&(P=en(q)),_=o.getDerivedStateFromProps,(q=typeof _=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==oe||K!==P)&&rv(a,x,u,P),aa=!1,K=a.memoizedState,x.state=K,Jo(a,u,x,p),Wo();var X=a.memoizedState;C!==oe||K!==X||aa||t!==null&&t.dependencies!==null&&Vs(t.dependencies)?(typeof _=="function"&&(pd(a,o,_,u),X=a.memoizedState),(te=aa||nv(a,o,te,u,K,X,P)||t!==null&&t.dependencies!==null&&Vs(t.dependencies))?(q||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(u,X,P),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(u,X,P)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=X),x.props=u,x.state=X,x.context=P,u=te):(typeof x.componentDidUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=1024),u=!1)}return x=u,su(t,a),u=(a.flags&128)!==0,x||u?(x=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:x.render(),a.flags|=1,t!==null&&u?(a.child=Ui(a,t.child,null,p),a.child=Ui(a,null,o,p)):Kt(t,a,o,p),a.memoizedState=x.state,t=a.child):t=Hr(t,a,p),t}function vv(t,a,o,u){return qo(),a.flags|=256,Kt(t,a,o,u),a.child}var vd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xd(t){return{baseLanes:t,cachePool:iy()}}function bd(t,a,o){return t=t!==null?t.childLanes&~o:0,a&&(t|=Gn),t}function xv(t,a,o){var u=a.pendingProps,p=!1,x=(a.flags&128)!==0,C;if((C=x)||(C=t!==null&&t.memoizedState===null?!1:(Lt.current&2)!==0),C&&(p=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,t===null){if(tt){if(p?sa(a):ua(),tt){var _=wt,P;if(P=_){e:{for(P=_,_=gr;P.nodeType!==8;){if(!_){_=null;break e}if(P=ir(P.nextSibling),P===null){_=null;break e}}_=P}_!==null?(a.memoizedState={dehydrated:_,treeContext:Va!==null?{id:Pr,overflow:Lr}:null,retryLane:536870912,hydrationErrors:null},P=Tn(18,null,null,0),P.stateNode=_,P.return=a,a.child=P,on=a,wt=null,P=!0):P=!1}P||Ga(a)}if(_=a.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return rh(_)?a.lanes=32:a.lanes=536870912,null;Ur(a)}return _=u.children,u=u.fallback,p?(ua(),p=a.mode,_=uu({mode:"hidden",children:_},p),u=Fa(u,p,o,null),_.return=a,u.return=a,_.sibling=u,a.child=_,p=a.child,p.memoizedState=xd(o),p.childLanes=bd(t,C,o),a.memoizedState=vd,u):(sa(a),wd(a,_))}if(P=t.memoizedState,P!==null&&(_=P.dehydrated,_!==null)){if(x)a.flags&256?(sa(a),a.flags&=-257,a=Sd(t,a,o)):a.memoizedState!==null?(ua(),a.child=t.child,a.flags|=128,a=null):(ua(),p=u.fallback,_=a.mode,u=uu({mode:"visible",children:u.children},_),p=Fa(p,_,o,null),p.flags|=2,u.return=a,p.return=a,u.sibling=p,a.child=u,Ui(a,t.child,null,o),u=a.child,u.memoizedState=xd(o),u.childLanes=bd(t,C,o),a.memoizedState=vd,a=p);else if(sa(a),rh(_)){if(C=_.nextSibling&&_.nextSibling.dataset,C)var q=C.dgst;C=q,u=Error(i(419)),u.stack="",u.digest=C,$o({value:u,source:null,stack:null}),a=Sd(t,a,o)}else if(Ft||Go(t,a,o,!1),C=(o&t.childLanes)!==0,Ft||C){if(C=ct,C!==null&&(u=o&-o,u=(u&42)!==0?1:pr(u),u=(u&(C.suspendedLanes|o))!==0?0:u,u!==0&&u!==P.retryLane))throw P.retryLane=u,Ni(t,u),jn(C,t,u),cv;_.data==="$?"||Ud(),a=Sd(t,a,o)}else _.data==="$?"?(a.flags|=192,a.child=t.child,a=null):(t=P.treeContext,wt=ir(_.nextSibling),on=a,tt=!0,$a=null,gr=!1,t!==null&&(Vn[qn++]=Pr,Vn[qn++]=Lr,Vn[qn++]=Va,Pr=t.id,Lr=t.overflow,Va=a),a=wd(a,u.children),a.flags|=4096);return a}return p?(ua(),p=u.fallback,_=a.mode,P=t.child,q=P.sibling,u=Or(P,{mode:"hidden",children:u.children}),u.subtreeFlags=P.subtreeFlags&65011712,q!==null?p=Or(q,p):(p=Fa(p,_,o,null),p.flags|=2),p.return=a,u.return=a,u.sibling=p,a.child=u,u=p,p=a.child,_=t.child.memoizedState,_===null?_=xd(o):(P=_.cachePool,P!==null?(q=Pt._currentValue,P=P.parent!==q?{parent:q,pool:q}:P):P=iy(),_={baseLanes:_.baseLanes|o,cachePool:P}),p.memoizedState=_,p.childLanes=bd(t,C,o),a.memoizedState=vd,u):(sa(a),o=t.child,t=o.sibling,o=Or(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,t!==null&&(C=a.deletions,C===null?(a.deletions=[t],a.flags|=16):C.push(t)),a.child=o,a.memoizedState=null,o)}function wd(t,a){return a=uu({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function uu(t,a){return t=Tn(22,t,null,a),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Sd(t,a,o){return Ui(a,t.child,null,o),t=wd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function bv(t,a,o){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a),Uf(t.return,a,o)}function Ed(t,a,o,u,p){var x=t.memoizedState;x===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=o,x.tailMode=p)}function wv(t,a,o){var u=a.pendingProps,p=u.revealOrder,x=u.tail;if(Kt(t,a,u.children,o),u=Lt.current,(u&2)!==0)u=u&1|2,a.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&bv(t,o,a);else if(t.tag===19)bv(t,o,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}switch(M(Lt,u),p){case"forwards":for(o=a.child,p=null;o!==null;)t=o.alternate,t!==null&&iu(t)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Ed(a,!1,p,o,x);break;case"backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(t=p.alternate,t!==null&&iu(t)===null){a.child=p;break}t=p.sibling,p.sibling=o,o=p,p=t}Ed(a,!0,o,null,x);break;case"together":Ed(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Hr(t,a,o){if(t!==null&&(a.dependencies=t.dependencies),pa|=a.lanes,(o&a.childLanes)===0)if(t!==null){if(Go(t,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(i(153));if(a.child!==null){for(t=a.child,o=Or(t,t.pendingProps),a.child=o,o.return=a;t.sibling!==null;)t=t.sibling,o=o.sibling=Or(t,t.pendingProps),o.return=a;o.sibling=null}return a.child}function Cd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Vs(t)))}function MA(t,a,o){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),ra(a,Pt,t.memoizedState.cache),qo();break;case 27:case 5:De(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:ra(a,a.type,a.memoizedProps.value);break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(sa(a),a.flags|=128,null):(o&a.child.childLanes)!==0?xv(t,a,o):(sa(a),t=Hr(t,a,o),t!==null?t.sibling:null);sa(a);break;case 19:var p=(t.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(Go(t,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return wv(t,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),M(Lt,Lt.current),u)break;return null;case 22:case 23:return a.lanes=0,pv(t,a,o);case 24:ra(a,Pt,t.memoizedState.cache)}return Hr(t,a,o)}function Sv(t,a,o){if(t!==null)if(t.memoizedProps!==a.pendingProps)Ft=!0;else{if(!Cd(t,o)&&(a.flags&128)===0)return Ft=!1,MA(t,a,o);Ft=(t.flags&131072)!==0}else Ft=!1,tt&&(a.flags&1048576)!==0&&Wg(a,Fs,a.index);switch(a.lanes=0,a.tag){case 16:e:{t=a.pendingProps;var u=a.elementType,p=u._init;if(u=p(u._payload),a.type=u,typeof u=="function")Df(u)?(t=Za(u,t),a.tag=1,a=yv(null,a,u,t,o)):(a.tag=0,a=yd(null,a,u,t,o));else{if(u!=null){if(p=u.$$typeof,p===O){a.tag=11,a=fv(null,a,u,t,o);break e}else if(p===H){a.tag=14,a=dv(null,a,u,t,o);break e}}throw a=G(u)||u,Error(i(306,a,""))}}return a;case 0:return yd(t,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Za(u,a.pendingProps),yv(t,a,u,p,o);case 3:e:{if(ve(a,a.stateNode.containerInfo),t===null)throw Error(i(387));u=a.pendingProps;var x=a.memoizedState;p=x.element,Yf(t,a),Jo(a,u,null,o);var C=a.memoizedState;if(u=C.cache,ra(a,Pt,u),u!==x.cache&&Hf(a,[Pt],o,!0),Wo(),u=C.element,x.isDehydrated)if(x={element:u,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){a=vv(t,a,u,o);break e}else if(u!==p){p=Hn(Error(i(424)),a),$o(p),a=vv(t,a,u,o);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(wt=ir(t.firstChild),on=a,tt=!0,$a=null,gr=!0,o=ev(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(qo(),u===p){a=Hr(t,a,o);break e}Kt(t,a,u,o)}a=a.child}return a;case 26:return su(t,a),t===null?(o=Ax(a.type,null,a.pendingProps,null))?a.memoizedState=o:tt||(o=a.type,t=a.pendingProps,u=Eu(pe.current).createElement(o),u[ge]=a,u[Se]=t,Qt(u,o,t),mt(u),a.stateNode=u):a.memoizedState=Ax(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return De(a),t===null&&tt&&(u=a.stateNode=Ex(a.type,a.pendingProps,pe.current),on=a,gr=!0,p=wt,va(a.type)?(ah=p,wt=ir(u.firstChild)):wt=p),Kt(t,a,a.pendingProps.children,o),su(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&tt&&((p=u=wt)&&(u=iT(u,a.type,a.pendingProps,gr),u!==null?(a.stateNode=u,on=a,wt=ir(u.firstChild),gr=!1,p=!0):p=!1),p||Ga(a)),De(a),p=a.type,x=a.pendingProps,C=t!==null?t.memoizedProps:null,u=x.children,eh(p,x)?u=null:C!==null&&eh(p,C)&&(a.flags|=32),a.memoizedState!==null&&(p=Jf(t,a,EA,null,null,o),wl._currentValue=p),su(t,a),Kt(t,a,u,o),a.child;case 6:return t===null&&tt&&((t=o=wt)&&(o=oT(o,a.pendingProps,gr),o!==null?(a.stateNode=o,on=a,wt=null,t=!0):t=!1),t||Ga(a)),null;case 13:return xv(t,a,o);case 4:return ve(a,a.stateNode.containerInfo),u=a.pendingProps,t===null?a.child=Ui(a,null,u,o):Kt(t,a,u,o),a.child;case 11:return fv(t,a,a.type,a.pendingProps,o);case 7:return Kt(t,a,a.pendingProps,o),a.child;case 8:return Kt(t,a,a.pendingProps.children,o),a.child;case 12:return Kt(t,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,ra(a,a.type,u.value),Kt(t,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Ka(a),p=en(p),u=u(p),a.flags|=1,Kt(t,a,u,o),a.child;case 14:return dv(t,a,a.type,a.pendingProps,o);case 15:return hv(t,a,a.type,a.pendingProps,o);case 19:return wv(t,a,o);case 31:return u=a.pendingProps,o=a.mode,u={mode:u.mode,children:u.children},t===null?(o=uu(u,o),o.ref=a.ref,a.child=o,o.return=a,a=o):(o=Or(t.child,u),o.ref=a.ref,a.child=o,o.return=a,a=o),a;case 22:return pv(t,a,o);case 24:return Ka(a),u=en(Pt),t===null?(p=qf(),p===null&&(p=ct,x=Ff(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=o),p=x),a.memoizedState={parent:u,cache:p},Gf(a),ra(a,Pt,p)):((t.lanes&o)!==0&&(Yf(t,a),Jo(a,null,null,o),Wo()),p=t.memoizedState,x=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),ra(a,Pt,u)):(u=x.cache,ra(a,Pt,u),u!==p.cache&&Hf(a,[Pt],o,!0))),Kt(t,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Fr(t){t.flags|=4}function Ev(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Mx(a)){if(a=$n.current,a!==null&&((Qe&4194048)===Qe?yr!==null:(Qe&62914560)!==Qe&&(Qe&536870912)===0||a!==yr))throw Qo=$f,oy;t.flags|=8192}}function cu(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?ks():536870912,t.lanes|=a,qi|=a)}function ol(t,a){if(!tt)switch(t.tailMode){case"hidden":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function yt(t){var a=t.alternate!==null&&t.alternate.child===t.child,o=0,u=0;if(a)for(var p=t.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=o,a}function jA(t,a,o){var u=a.pendingProps;switch(zf(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(a),null;case 1:return yt(a),null;case 3:return o=a.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Ir(Pt),Ve(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(Vo(a)?Fr(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ty())),yt(a),null;case 26:return o=a.memoizedState,t===null?(Fr(a),o!==null?(yt(a),Ev(a,o)):(yt(a),a.flags&=-16777217)):o?o!==t.memoizedState?(Fr(a),yt(a),Ev(a,o)):(yt(a),a.flags&=-16777217):(t.memoizedProps!==u&&Fr(a),yt(a),a.flags&=-16777217),null;case 27:Be(a),o=pe.current;var p=a.type;if(t!==null&&a.stateNode!=null)t.memoizedProps!==u&&Fr(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return yt(a),null}t=ce.current,Vo(a)?Jg(a):(t=Ex(p,u,o),a.stateNode=t,Fr(a))}return yt(a),null;case 5:if(Be(a),o=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==u&&Fr(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return yt(a),null}if(t=ce.current,Vo(a))Jg(a);else{switch(p=Eu(pe.current),t){case 1:t=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:t=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":t=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":t=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":t=p.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof u.is=="string"?p.createElement("select",{is:u.is}):p.createElement("select"),u.multiple?t.multiple=!0:u.size&&(t.size=u.size);break;default:t=typeof u.is=="string"?p.createElement(o,{is:u.is}):p.createElement(o)}}t[ge]=a,t[Se]=u;e:for(p=a.child;p!==null;){if(p.tag===5||p.tag===6)t.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===a)break e;for(;p.sibling===null;){if(p.return===null||p.return===a)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}a.stateNode=t;e:switch(Qt(t,o,u),o){case"button":case"input":case"select":case"textarea":t=!!u.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&Fr(a)}}return yt(a),a.flags&=-16777217,null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==u&&Fr(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(t=pe.current,Vo(a)){if(t=a.stateNode,o=a.memoizedProps,u=null,p=on,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}t[ge]=a,t=!!(t.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||gx(t.nodeValue,o)),t||Ga(a)}else t=Eu(t).createTextNode(u),t[ge]=a,a.stateNode=t}return yt(a),null;case 13:if(u=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=Vo(a),u!==null&&u.dehydrated!==null){if(t===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[ge]=a}else qo(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;yt(a),p=!1}else p=ty(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Ur(a),a):(Ur(a),null)}if(Ur(a),(a.flags&128)!==0)return a.lanes=o,a;if(o=u!==null,t=t!==null&&t.memoizedState!==null,o){u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool);var x=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(x=u.memoizedState.cachePool.pool),x!==p&&(u.flags|=2048)}return o!==t&&o&&(a.child.flags|=8192),cu(a,a.updateQueue),yt(a),null;case 4:return Ve(),t===null&&Xd(a.stateNode.containerInfo),yt(a),null;case 10:return Ir(a.type),yt(a),null;case 19:if(se(Lt),p=a.memoizedState,p===null)return yt(a),null;if(u=(a.flags&128)!==0,x=p.rendering,x===null)if(u)ol(p,!1);else{if(St!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(x=iu(t),x!==null){for(a.flags|=128,ol(p,!1),t=x.updateQueue,a.updateQueue=t,cu(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)Zg(o,t),o=o.sibling;return M(Lt,Lt.current&1|2),a.child}t=t.sibling}p.tail!==null&&Rt()>hu&&(a.flags|=128,u=!0,ol(p,!1),a.lanes=4194304)}else{if(!u)if(t=iu(x),t!==null){if(a.flags|=128,u=!0,t=t.updateQueue,a.updateQueue=t,cu(a,t),ol(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!tt)return yt(a),null}else 2*Rt()-p.renderingStartTime>hu&&o!==536870912&&(a.flags|=128,u=!0,ol(p,!1),a.lanes=4194304);p.isBackwards?(x.sibling=a.child,a.child=x):(t=p.last,t!==null?t.sibling=x:a.child=x,p.last=x)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=Rt(),a.sibling=null,t=Lt.current,M(Lt,u?t&1|2:t&1),a):(yt(a),null);case 22:case 23:return Ur(a),Zf(),u=a.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(yt(a),a.subtreeFlags&6&&(a.flags|=8192)):yt(a),o=a.updateQueue,o!==null&&cu(a,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),t!==null&&se(Xa),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Ir(Pt),yt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function DA(t,a){switch(zf(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return Ir(Pt),Ve(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Be(a),null;case 13:if(Ur(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(i(340));qo()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return se(Lt),null;case 4:return Ve(),null;case 10:return Ir(a.type),null;case 22:case 23:return Ur(a),Zf(),t!==null&&se(Xa),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return Ir(Pt),null;case 25:return null;default:return null}}function Cv(t,a){switch(zf(a),a.tag){case 3:Ir(Pt),Ve();break;case 26:case 27:case 5:Be(a);break;case 4:Ve();break;case 13:Ur(a);break;case 19:se(Lt);break;case 10:Ir(a.type);break;case 22:case 23:Ur(a),Zf(),t!==null&&se(Xa);break;case 24:Ir(Pt)}}function ll(t,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&t)===t){u=void 0;var x=o.create,C=o.inst;u=x(),C.destroy=u}o=o.next}while(o!==p)}}catch(_){st(a,a.return,_)}}function ca(t,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var x=p.next;u=x;do{if((u.tag&t)===t){var C=u.inst,_=C.destroy;if(_!==void 0){C.destroy=void 0,p=a;var P=o,q=_;try{q()}catch(te){st(p,P,te)}}}u=u.next}while(u!==x)}}catch(te){st(a,a.return,te)}}function kv(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{dy(a,o)}catch(u){st(t,t.return,u)}}}function Av(t,a,o){o.props=Za(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(u){st(t,a,u)}}function sl(t,a){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof o=="function"?t.refCleanup=o(u):o.current=u}}catch(p){st(t,a,p)}}function vr(t,a){var o=t.ref,u=t.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){st(t,a,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){st(t,a,p)}else o.current=null}function Tv(t){var a=t.type,o=t.memoizedProps,u=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){st(t,t.return,p)}}function kd(t,a,o){try{var u=t.stateNode;eT(u,t.type,o,a),u[Se]=a}catch(p){st(t,t.return,p)}}function Rv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&va(t.type)||t.tag===4}function Ad(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Rv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&va(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Td(t,a,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(t),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Su));else if(u!==4&&(u===27&&va(t.type)&&(o=t.stateNode,a=null),t=t.child,t!==null))for(Td(t,a,o),t=t.sibling;t!==null;)Td(t,a,o),t=t.sibling}function fu(t,a,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,a?o.insertBefore(t,a):o.appendChild(t);else if(u!==4&&(u===27&&va(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(fu(t,a,o),t=t.sibling;t!==null;)fu(t,a,o),t=t.sibling}function Nv(t){var a=t.stateNode,o=t.memoizedProps;try{for(var u=t.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Qt(a,u,o),a[ge]=t,a[Se]=o}catch(x){st(t,t.return,x)}}var Vr=!1,At=!1,Rd=!1,_v=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function OA(t,a){if(t=t.containerInfo,Wd=Nu,t=Hg(t),Af(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,x=u.focusNode;u=u.focusOffset;try{o.nodeType,x.nodeType}catch{o=null;break e}var C=0,_=-1,P=-1,q=0,te=0,oe=t,K=null;t:for(;;){for(var X;oe!==o||p!==0&&oe.nodeType!==3||(_=C+p),oe!==x||u!==0&&oe.nodeType!==3||(P=C+u),oe.nodeType===3&&(C+=oe.nodeValue.length),(X=oe.firstChild)!==null;)K=oe,oe=X;for(;;){if(oe===t)break t;if(K===o&&++q===p&&(_=C),K===x&&++te===u&&(P=C),(X=oe.nextSibling)!==null)break;oe=K,K=oe.parentNode}oe=X}o=_===-1||P===-1?null:{start:_,end:P}}else o=null}o=o||{start:0,end:0}}else o=null;for(Jd={focusedElem:t,selectionRange:o},Nu=!1,Vt=a;Vt!==null;)if(a=Vt,t=a.child,(a.subtreeFlags&1024)!==0&&t!==null)t.return=a,Vt=t;else for(;Vt!==null;){switch(a=Vt,x=a.alternate,t=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&x!==null){t=void 0,o=a,p=x.memoizedProps,x=x.memoizedState,u=o.stateNode;try{var Me=Za(o.type,p,o.elementType===o.type);t=u.getSnapshotBeforeUpdate(Me,x),u.__reactInternalSnapshotBeforeUpdate=t}catch(Re){st(o,o.return,Re)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,o=t.nodeType,o===9)nh(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":nh(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=a.sibling,t!==null){t.return=a.return,Vt=t;break}Vt=a.return}}function Mv(t,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:fa(t,o),u&4&&ll(5,o);break;case 1:if(fa(t,o),u&4)if(t=o.stateNode,a===null)try{t.componentDidMount()}catch(C){st(o,o.return,C)}else{var p=Za(o.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(p,a,t.__reactInternalSnapshotBeforeUpdate)}catch(C){st(o,o.return,C)}}u&64&&kv(o),u&512&&sl(o,o.return);break;case 3:if(fa(t,o),u&64&&(t=o.updateQueue,t!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{dy(t,a)}catch(C){st(o,o.return,C)}}break;case 27:a===null&&u&4&&Nv(o);case 26:case 5:fa(t,o),a===null&&u&4&&Tv(o),u&512&&sl(o,o.return);break;case 12:fa(t,o);break;case 13:fa(t,o),u&4&&Ov(t,o),u&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=VA.bind(null,o),lT(t,o))));break;case 22:if(u=o.memoizedState!==null||Vr,!u){a=a!==null&&a.memoizedState!==null||At,p=Vr;var x=At;Vr=u,(At=a)&&!x?da(t,o,(o.subtreeFlags&8772)!==0):fa(t,o),Vr=p,At=x}break;case 30:break;default:fa(t,o)}}function jv(t){var a=t.alternate;a!==null&&(t.alternate=null,jv(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&hn(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var dt=null,gn=!1;function qr(t,a,o){for(o=o.child;o!==null;)Dv(t,a,o),o=o.sibling}function Dv(t,a,o){if(de&&typeof de.onCommitFiberUnmount=="function")try{de.onCommitFiberUnmount(ee,o)}catch{}switch(o.tag){case 26:At||vr(o,a),qr(t,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:At||vr(o,a);var u=dt,p=gn;va(o.type)&&(dt=o.stateNode,gn=!1),qr(t,a,o),yl(o.stateNode),dt=u,gn=p;break;case 5:At||vr(o,a);case 6:if(u=dt,p=gn,dt=null,qr(t,a,o),dt=u,gn=p,dt!==null)if(gn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(o.stateNode)}catch(x){st(o,a,x)}else try{dt.removeChild(o.stateNode)}catch(x){st(o,a,x)}break;case 18:dt!==null&&(gn?(t=dt,wx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),kl(t)):wx(dt,o.stateNode));break;case 4:u=dt,p=gn,dt=o.stateNode.containerInfo,gn=!0,qr(t,a,o),dt=u,gn=p;break;case 0:case 11:case 14:case 15:At||ca(2,o,a),At||ca(4,o,a),qr(t,a,o);break;case 1:At||(vr(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&Av(o,a,u)),qr(t,a,o);break;case 21:qr(t,a,o);break;case 22:At=(u=At)||o.memoizedState!==null,qr(t,a,o),At=u;break;default:qr(t,a,o)}}function Ov(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{kl(t)}catch(o){st(a,a.return,o)}}function PA(t){switch(t.tag){case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new _v),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new _v),a;default:throw Error(i(435,t.tag))}}function Nd(t,a){var o=PA(t);a.forEach(function(u){var p=qA.bind(null,t,u);o.has(u)||(o.add(u),u.then(p,p))})}function Rn(t,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],x=t,C=a,_=C;e:for(;_!==null;){switch(_.tag){case 27:if(va(_.type)){dt=_.stateNode,gn=!1;break e}break;case 5:dt=_.stateNode,gn=!1;break e;case 3:case 4:dt=_.stateNode.containerInfo,gn=!0;break e}_=_.return}if(dt===null)throw Error(i(160));Dv(x,C,p),dt=null,gn=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)Pv(a,t),a=a.sibling}var ar=null;function Pv(t,a){var o=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Rn(a,t),Nn(t),u&4&&(ca(3,t,t.return),ll(3,t),ca(5,t,t.return));break;case 1:Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),u&64&&Vr&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=ar;if(Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),u&4){var x=o!==null?o.memoizedState:null;if(u=t.memoizedState,o===null)if(u===null)if(t.stateNode===null){e:{u=t.type,o=t.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":x=p.getElementsByTagName("title")[0],(!x||x[an]||x[ge]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(u),p.head.insertBefore(x,p.querySelector("head > title"))),Qt(x,u,o),x[ge]=t,mt(x),u=x;break e;case"link":var C=Nx("link","href",p).get(u+(o.href||""));if(C){for(var _=0;_<C.length;_++)if(x=C[_],x.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&x.getAttribute("rel")===(o.rel==null?null:o.rel)&&x.getAttribute("title")===(o.title==null?null:o.title)&&x.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){C.splice(_,1);break t}}x=p.createElement(u),Qt(x,u,o),p.head.appendChild(x);break;case"meta":if(C=Nx("meta","content",p).get(u+(o.content||""))){for(_=0;_<C.length;_++)if(x=C[_],x.getAttribute("content")===(o.content==null?null:""+o.content)&&x.getAttribute("name")===(o.name==null?null:o.name)&&x.getAttribute("property")===(o.property==null?null:o.property)&&x.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&x.getAttribute("charset")===(o.charSet==null?null:o.charSet)){C.splice(_,1);break t}}x=p.createElement(u),Qt(x,u,o),p.head.appendChild(x);break;default:throw Error(i(468,u))}x[ge]=t,mt(x),u=x}t.stateNode=u}else _x(p,t.type,t.stateNode);else t.stateNode=Rx(p,u,t.memoizedProps);else x!==u?(x===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):x.count--,u===null?_x(p,t.type,t.stateNode):Rx(p,u,t.memoizedProps)):u===null&&t.stateNode!==null&&kd(t,t.memoizedProps,o.memoizedProps)}break;case 27:Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),o!==null&&u&4&&kd(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),t.flags&32){p=t.stateNode;try{Si(p,"")}catch(X){st(t,t.return,X)}}u&4&&t.stateNode!=null&&(p=t.memoizedProps,kd(t,p,o!==null?o.memoizedProps:p)),u&1024&&(Rd=!0);break;case 6:if(Rn(a,t),Nn(t),u&4){if(t.stateNode===null)throw Error(i(162));u=t.memoizedProps,o=t.stateNode;try{o.nodeValue=u}catch(X){st(t,t.return,X)}}break;case 3:if(Au=null,p=ar,ar=Cu(a.containerInfo),Rn(a,t),ar=p,Nn(t),u&4&&o!==null&&o.memoizedState.isDehydrated)try{kl(a.containerInfo)}catch(X){st(t,t.return,X)}Rd&&(Rd=!1,Lv(t));break;case 4:u=ar,ar=Cu(t.stateNode.containerInfo),Rn(a,t),Nn(t),ar=u;break;case 12:Rn(a,t),Nn(t);break;case 13:Rn(a,t),Nn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Pd=Rt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Nd(t,u)));break;case 22:p=t.memoizedState!==null;var P=o!==null&&o.memoizedState!==null,q=Vr,te=At;if(Vr=q||p,At=te||P,Rn(a,t),At=te,Vr=q,Nn(t),u&8192)e:for(a=t.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||P||Vr||At||Wa(t)),o=null,a=t;;){if(a.tag===5||a.tag===26){if(o===null){P=o=a;try{if(x=P.stateNode,p)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{_=P.stateNode;var oe=P.memoizedProps.style,K=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;_.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(X){st(P,P.return,X)}}}else if(a.tag===6){if(o===null){P=a;try{P.stateNode.nodeValue=p?"":P.memoizedProps}catch(X){st(P,P.return,X)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=t.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Nd(t,o))));break;case 19:Rn(a,t),Nn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Nd(t,u)));break;case 30:break;case 21:break;default:Rn(a,t),Nn(t)}}function Nn(t){var a=t.flags;if(a&2){try{for(var o,u=t.return;u!==null;){if(Rv(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,x=Ad(t);fu(t,x,p);break;case 5:var C=o.stateNode;o.flags&32&&(Si(C,""),o.flags&=-33);var _=Ad(t);fu(t,_,C);break;case 3:case 4:var P=o.stateNode.containerInfo,q=Ad(t);Td(t,q,P);break;default:throw Error(i(161))}}catch(te){st(t,t.return,te)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Lv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Lv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function fa(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Mv(t,a.alternate,a),a=a.sibling}function Wa(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:ca(4,a,a.return),Wa(a);break;case 1:vr(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Av(a,a.return,o),Wa(a);break;case 27:yl(a.stateNode);case 26:case 5:vr(a,a.return),Wa(a);break;case 22:a.memoizedState===null&&Wa(a);break;case 30:Wa(a);break;default:Wa(a)}t=t.sibling}}function da(t,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=t,x=a,C=x.flags;switch(x.tag){case 0:case 11:case 15:da(p,x,o),ll(4,x);break;case 1:if(da(p,x,o),u=x,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(q){st(u,u.return,q)}if(u=x,p=u.updateQueue,p!==null){var _=u.stateNode;try{var P=p.shared.hiddenCallbacks;if(P!==null)for(p.shared.hiddenCallbacks=null,p=0;p<P.length;p++)fy(P[p],_)}catch(q){st(u,u.return,q)}}o&&C&64&&kv(x),sl(x,x.return);break;case 27:Nv(x);case 26:case 5:da(p,x,o),o&&u===null&&C&4&&Tv(x),sl(x,x.return);break;case 12:da(p,x,o);break;case 13:da(p,x,o),o&&C&4&&Ov(p,x);break;case 22:x.memoizedState===null&&da(p,x,o),sl(x,x.return);break;case 30:break;default:da(p,x,o)}a=a.sibling}}function _d(t,a){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Yo(o))}function Md(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Yo(t))}function xr(t,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)zv(t,a,o,u),a=a.sibling}function zv(t,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:xr(t,a,o,u),p&2048&&ll(9,a);break;case 1:xr(t,a,o,u);break;case 3:xr(t,a,o,u),p&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Yo(t)));break;case 12:if(p&2048){xr(t,a,o,u),t=a.stateNode;try{var x=a.memoizedProps,C=x.id,_=x.onPostCommit;typeof _=="function"&&_(C,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(P){st(a,a.return,P)}}else xr(t,a,o,u);break;case 13:xr(t,a,o,u);break;case 23:break;case 22:x=a.stateNode,C=a.alternate,a.memoizedState!==null?x._visibility&2?xr(t,a,o,u):ul(t,a):x._visibility&2?xr(t,a,o,u):(x._visibility|=2,Hi(t,a,o,u,(a.subtreeFlags&10256)!==0)),p&2048&&_d(C,a);break;case 24:xr(t,a,o,u),p&2048&&Md(a.alternate,a);break;default:xr(t,a,o,u)}}function Hi(t,a,o,u,p){for(p=p&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var x=t,C=a,_=o,P=u,q=C.flags;switch(C.tag){case 0:case 11:case 15:Hi(x,C,_,P,p),ll(8,C);break;case 23:break;case 22:var te=C.stateNode;C.memoizedState!==null?te._visibility&2?Hi(x,C,_,P,p):ul(x,C):(te._visibility|=2,Hi(x,C,_,P,p)),p&&q&2048&&_d(C.alternate,C);break;case 24:Hi(x,C,_,P,p),p&&q&2048&&Md(C.alternate,C);break;default:Hi(x,C,_,P,p)}a=a.sibling}}function ul(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=t,u=a,p=u.flags;switch(u.tag){case 22:ul(o,u),p&2048&&_d(u.alternate,u);break;case 24:ul(o,u),p&2048&&Md(u.alternate,u);break;default:ul(o,u)}a=a.sibling}}var cl=8192;function Fi(t){if(t.subtreeFlags&cl)for(t=t.child;t!==null;)Iv(t),t=t.sibling}function Iv(t){switch(t.tag){case 26:Fi(t),t.flags&cl&&t.memoizedState!==null&&bT(ar,t.memoizedState,t.memoizedProps);break;case 5:Fi(t);break;case 3:case 4:var a=ar;ar=Cu(t.stateNode.containerInfo),Fi(t),ar=a;break;case 22:t.memoizedState===null&&(a=t.alternate,a!==null&&a.memoizedState!==null?(a=cl,cl=16777216,Fi(t),cl=a):Fi(t));break;default:Fi(t)}}function Bv(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function fl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];Vt=u,Hv(u,t)}Bv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Uv(t),t=t.sibling}function Uv(t){switch(t.tag){case 0:case 11:case 15:fl(t),t.flags&2048&&ca(9,t,t.return);break;case 3:fl(t);break;case 12:fl(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,du(t)):fl(t);break;default:fl(t)}}function du(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];Vt=u,Hv(u,t)}Bv(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:ca(8,a,a.return),du(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,du(a));break;default:du(a)}t=t.sibling}}function Hv(t,a){for(;Vt!==null;){var o=Vt;switch(o.tag){case 0:case 11:case 15:ca(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Yo(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,Vt=u;else e:for(o=t;Vt!==null;){u=Vt;var p=u.sibling,x=u.return;if(jv(u),u===o){Vt=null;break e}if(p!==null){p.return=x,Vt=p;break e}Vt=x}}}var LA={getCacheForType:function(t){var a=en(Pt),o=a.data.get(t);return o===void 0&&(o=t(),a.data.set(t,o)),o}},zA=typeof WeakMap=="function"?WeakMap:Map,nt=0,ct=null,$e=null,Qe=0,rt=0,_n=null,ha=!1,Vi=!1,jd=!1,$r=0,St=0,pa=0,Ja=0,Dd=0,Gn=0,qi=0,dl=null,yn=null,Od=!1,Pd=0,hu=1/0,pu=null,ma=null,Xt=0,ga=null,$i=null,Gi=0,Ld=0,zd=null,Fv=null,hl=0,Id=null;function Mn(){if((nt&2)!==0&&Qe!==0)return Qe&-Qe;if(z.T!==null){var t=Di;return t!==0?t:$d()}return F()}function Vv(){Gn===0&&(Gn=(Qe&536870912)===0||tt?Cs():536870912);var t=$n.current;return t!==null&&(t.flags|=32),Gn}function jn(t,a,o){(t===ct&&(rt===2||rt===9)||t.cancelPendingCommit!==null)&&(Yi(t,0),ya(t,Qe,Gn,!1)),La(t,o),((nt&2)===0||t!==ct)&&(t===ct&&((nt&2)===0&&(Ja|=o),St===4&&ya(t,Qe,Gn,!1)),br(t))}function qv(t,a,o){if((nt&6)!==0)throw Error(i(327));var u=!o&&(a&124)===0&&(a&t.expiredLanes)===0||dn(t,a),p=u?UA(t,a):Hd(t,a,!0),x=u;do{if(p===0){Vi&&!u&&ya(t,a,0,!1);break}else{if(o=t.current.alternate,x&&!IA(o)){p=Hd(t,a,!1),x=!1;continue}if(p===2){if(x=a,t.errorRecoveryDisabledLanes&x)var C=0;else C=t.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){a=C;e:{var _=t;p=dl;var P=_.current.memoizedState.isDehydrated;if(P&&(Yi(_,C).flags|=256),C=Hd(_,C,!1),C!==2){if(jd&&!P){_.errorRecoveryDisabledLanes|=x,Ja|=x,p=4;break e}x=yn,yn=p,x!==null&&(yn===null?yn=x:yn.push.apply(yn,x))}p=C}if(x=!1,p!==2)continue}}if(p===1){Yi(t,0),ya(t,a,0,!0);break}e:{switch(u=t,x=p,x){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ya(u,a,Gn,!ha);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Pd+300-Rt(),10<p)){if(ya(u,a,Gn,!ha),Nt(u,0,!0)!==0)break e;u.timeoutHandle=xx($v.bind(null,u,o,yn,pu,Od,a,Gn,Ja,qi,ha,x,2,-0,0),p);break e}$v(u,o,yn,pu,Od,a,Gn,Ja,qi,ha,x,0,-0,0)}}break}while(!0);br(t)}function $v(t,a,o,u,p,x,C,_,P,q,te,oe,K,X){if(t.timeoutHandle=-1,oe=a.subtreeFlags,(oe&8192||(oe&16785408)===16785408)&&(bl={stylesheets:null,count:0,unsuspend:xT},Iv(a),oe=wT(),oe!==null)){t.cancelPendingCommit=oe(Wv.bind(null,t,a,x,o,u,p,C,_,P,te,1,K,X)),ya(t,x,C,!q);return}Wv(t,a,x,o,u,p,C,_,P)}function IA(t){for(var a=t;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],x=p.getSnapshot;p=p.value;try{if(!An(x(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ya(t,a,o,u){a&=~Dd,a&=~Ja,t.suspendedLanes|=a,t.pingedLanes&=~a,u&&(t.warmLanes|=a),u=t.expirationTimes;for(var p=a;0<p;){var x=31-Ae(p),C=1<<x;u[x]=-1,p&=~C}o!==0&&xi(t,o,a)}function mu(){return(nt&6)===0?(pl(0),!1):!0}function Bd(){if($e!==null){if(rt===0)var t=$e.return;else t=$e,zr=Ya=null,nd(t),Bi=null,al=0,t=$e;for(;t!==null;)Cv(t.alternate,t),t=t.return;$e=null}}function Yi(t,a){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,nT(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),Bd(),ct=t,$e=o=Or(t.current,null),Qe=a,rt=0,_n=null,ha=!1,Vi=dn(t,a),jd=!1,qi=Gn=Dd=Ja=pa=St=0,yn=dl=null,Od=!1,(a&8)!==0&&(a|=a&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=a;0<u;){var p=31-Ae(u),x=1<<p;a|=t[p],u&=~x}return $r=a,zs(),o}function Gv(t,a){He=null,z.H=nu,a===Xo||a===Gs?(a=uy(),rt=3):a===oy?(a=uy(),rt=4):rt=a===cv?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,_n=a,$e===null&&(St=1,lu(t,Hn(a,t.current)))}function Yv(){var t=z.H;return z.H=nu,t===null?nu:t}function Kv(){var t=z.A;return z.A=LA,t}function Ud(){St=4,ha||(Qe&4194048)!==Qe&&$n.current!==null||(Vi=!0),(pa&134217727)===0&&(Ja&134217727)===0||ct===null||ya(ct,Qe,Gn,!1)}function Hd(t,a,o){var u=nt;nt|=2;var p=Yv(),x=Kv();(ct!==t||Qe!==a)&&(pu=null,Yi(t,a)),a=!1;var C=St;e:do try{if(rt!==0&&$e!==null){var _=$e,P=_n;switch(rt){case 8:Bd(),C=6;break e;case 3:case 2:case 9:case 6:$n.current===null&&(a=!0);var q=rt;if(rt=0,_n=null,Ki(t,_,P,q),o&&Vi){C=0;break e}break;default:q=rt,rt=0,_n=null,Ki(t,_,P,q)}}BA(),C=St;break}catch(te){Gv(t,te)}while(!0);return a&&t.shellSuspendCounter++,zr=Ya=null,nt=u,z.H=p,z.A=x,$e===null&&(ct=null,Qe=0,zs()),C}function BA(){for(;$e!==null;)Xv($e)}function UA(t,a){var o=nt;nt|=2;var u=Yv(),p=Kv();ct!==t||Qe!==a?(pu=null,hu=Rt()+500,Yi(t,a)):Vi=dn(t,a);e:do try{if(rt!==0&&$e!==null){a=$e;var x=_n;t:switch(rt){case 1:rt=0,_n=null,Ki(t,a,x,1);break;case 2:case 9:if(ly(x)){rt=0,_n=null,Qv(a);break}a=function(){rt!==2&&rt!==9||ct!==t||(rt=7),br(t)},x.then(a,a);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:ly(x)?(rt=0,_n=null,Qv(a)):(rt=0,_n=null,Ki(t,a,x,7));break;case 5:var C=null;switch($e.tag){case 26:C=$e.memoizedState;case 5:case 27:var _=$e;if(!C||Mx(C)){rt=0,_n=null;var P=_.sibling;if(P!==null)$e=P;else{var q=_.return;q!==null?($e=q,gu(q)):$e=null}break t}}rt=0,_n=null,Ki(t,a,x,5);break;case 6:rt=0,_n=null,Ki(t,a,x,6);break;case 8:Bd(),St=6;break e;default:throw Error(i(462))}}HA();break}catch(te){Gv(t,te)}while(!0);return zr=Ya=null,z.H=u,z.A=p,nt=o,$e!==null?0:(ct=null,Qe=0,zs(),St)}function HA(){for(;$e!==null&&!zn();)Xv($e)}function Xv(t){var a=Sv(t.alternate,t,$r);t.memoizedProps=t.pendingProps,a===null?gu(t):$e=a}function Qv(t){var a=t,o=a.alternate;switch(a.tag){case 15:case 0:a=gv(o,a,a.pendingProps,a.type,void 0,Qe);break;case 11:a=gv(o,a,a.pendingProps,a.type.render,a.ref,Qe);break;case 5:nd(a);default:Cv(o,a),a=$e=Zg(a,$r),a=Sv(o,a,$r)}t.memoizedProps=t.pendingProps,a===null?gu(t):$e=a}function Ki(t,a,o,u){zr=Ya=null,nd(a),Bi=null,al=0;var p=a.return;try{if(_A(t,p,a,o,Qe)){St=1,lu(t,Hn(o,t.current)),$e=null;return}}catch(x){if(p!==null)throw $e=p,x;St=1,lu(t,Hn(o,t.current)),$e=null;return}a.flags&32768?(tt||u===1?t=!0:Vi||(Qe&536870912)!==0?t=!1:(ha=t=!0,(u===2||u===9||u===3||u===6)&&(u=$n.current,u!==null&&u.tag===13&&(u.flags|=16384))),Zv(a,t)):gu(a)}function gu(t){var a=t;do{if((a.flags&32768)!==0){Zv(a,ha);return}t=a.return;var o=jA(a.alternate,a,$r);if(o!==null){$e=o;return}if(a=a.sibling,a!==null){$e=a;return}$e=a=t}while(a!==null);St===0&&(St=5)}function Zv(t,a){do{var o=DA(t.alternate,t);if(o!==null){o.flags&=32767,$e=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(t=t.sibling,t!==null)){$e=t;return}$e=t=o}while(t!==null);St=6,$e=null}function Wv(t,a,o,u,p,x,C,_,P){t.cancelPendingCommit=null;do yu();while(Xt!==0);if((nt&6)!==0)throw Error(i(327));if(a!==null){if(a===t.current)throw Error(i(177));if(x=a.lanes|a.childLanes,x|=Mf,As(t,o,x,C,_,P),t===ct&&($e=ct=null,Qe=0),$i=a,ga=t,Gi=o,Ld=x,zd=p,Fv=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,$A(hr,function(){return rx(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=z.T,z.T=null,p=Q.p,Q.p=2,C=nt,nt|=4;try{OA(t,a,o)}finally{nt=C,Q.p=p,z.T=u}}Xt=1,Jv(),ex(),tx()}}function Jv(){if(Xt===1){Xt=0;var t=ga,a=$i,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=z.T,z.T=null;var u=Q.p;Q.p=2;var p=nt;nt|=4;try{Pv(a,t);var x=Jd,C=Hg(t.containerInfo),_=x.focusedElem,P=x.selectionRange;if(C!==_&&_&&_.ownerDocument&&Ug(_.ownerDocument.documentElement,_)){if(P!==null&&Af(_)){var q=P.start,te=P.end;if(te===void 0&&(te=q),"selectionStart"in _)_.selectionStart=q,_.selectionEnd=Math.min(te,_.value.length);else{var oe=_.ownerDocument||document,K=oe&&oe.defaultView||window;if(K.getSelection){var X=K.getSelection(),Me=_.textContent.length,Re=Math.min(P.start,Me),ot=P.end===void 0?Re:Math.min(P.end,Me);!X.extend&&Re>ot&&(C=ot,ot=Re,Re=C);var U=Bg(_,Re),I=Bg(_,ot);if(U&&I&&(X.rangeCount!==1||X.anchorNode!==U.node||X.anchorOffset!==U.offset||X.focusNode!==I.node||X.focusOffset!==I.offset)){var V=oe.createRange();V.setStart(U.node,U.offset),X.removeAllRanges(),Re>ot?(X.addRange(V),X.extend(I.node,I.offset)):(V.setEnd(I.node,I.offset),X.addRange(V))}}}}for(oe=[],X=_;X=X.parentNode;)X.nodeType===1&&oe.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<oe.length;_++){var re=oe[_];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Nu=!!Wd,Jd=Wd=null}finally{nt=p,Q.p=u,z.T=o}}t.current=a,Xt=2}}function ex(){if(Xt===2){Xt=0;var t=ga,a=$i,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=z.T,z.T=null;var u=Q.p;Q.p=2;var p=nt;nt|=4;try{Mv(t,a.alternate,a)}finally{nt=p,Q.p=u,z.T=o}}Xt=3}}function tx(){if(Xt===4||Xt===3){Xt=0,tr();var t=ga,a=$i,o=Gi,u=Fv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Xt=5:(Xt=0,$i=ga=null,nx(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(ma=null),za(o),a=a.stateNode,de&&typeof de.onCommitFiberRoot=="function")try{de.onCommitFiberRoot(ee,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=z.T,p=Q.p,Q.p=2,z.T=null;try{for(var x=t.onRecoverableError,C=0;C<u.length;C++){var _=u[C];x(_.value,{componentStack:_.stack})}}finally{z.T=a,Q.p=p}}(Gi&3)!==0&&yu(),br(t),p=t.pendingLanes,(o&4194090)!==0&&(p&42)!==0?t===Id?hl++:(hl=0,Id=t):hl=0,pl(0)}}function nx(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,Yo(a)))}function yu(t){return Jv(),ex(),tx(),rx()}function rx(){if(Xt!==5)return!1;var t=ga,a=Ld;Ld=0;var o=za(Gi),u=z.T,p=Q.p;try{Q.p=32>o?32:o,z.T=null,o=zd,zd=null;var x=ga,C=Gi;if(Xt=0,$i=ga=null,Gi=0,(nt&6)!==0)throw Error(i(331));var _=nt;if(nt|=4,Uv(x.current),zv(x,x.current,C,o),nt=_,pl(0,!1),de&&typeof de.onPostCommitFiberRoot=="function")try{de.onPostCommitFiberRoot(ee,x)}catch{}return!0}finally{Q.p=p,z.T=u,nx(t,a)}}function ax(t,a,o){a=Hn(o,a),a=gd(t.stateNode,a,2),t=oa(t,a,2),t!==null&&(La(t,2),br(t))}function st(t,a,o){if(t.tag===3)ax(t,t,o);else for(;a!==null;){if(a.tag===3){ax(a,t,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ma===null||!ma.has(u))){t=Hn(o,t),o=sv(2),u=oa(a,o,2),u!==null&&(uv(o,u,a,t),La(u,2),br(u));break}}a=a.return}}function Fd(t,a,o){var u=t.pingCache;if(u===null){u=t.pingCache=new zA;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||(jd=!0,p.add(o),t=FA.bind(null,t,a,o),a.then(t,t))}function FA(t,a,o){var u=t.pingCache;u!==null&&u.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,ct===t&&(Qe&o)===o&&(St===4||St===3&&(Qe&62914560)===Qe&&300>Rt()-Pd?(nt&2)===0&&Yi(t,0):Dd|=o,qi===Qe&&(qi=0)),br(t)}function ix(t,a){a===0&&(a=ks()),t=Ni(t,a),t!==null&&(La(t,a),br(t))}function VA(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),ix(t,o)}function qA(t,a){var o=0;switch(t.tag){case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),ix(t,o)}function $A(t,a){return Ke(t,a)}var vu=null,Xi=null,Vd=!1,xu=!1,qd=!1,ei=0;function br(t){t!==Xi&&t.next===null&&(Xi===null?vu=Xi=t:Xi=Xi.next=t),xu=!0,Vd||(Vd=!0,YA())}function pl(t,a){if(!qd&&xu){qd=!0;do for(var o=!1,u=vu;u!==null;){if(t!==0){var p=u.pendingLanes;if(p===0)var x=0;else{var C=u.suspendedLanes,_=u.pingedLanes;x=(1<<31-Ae(42|t)+1)-1,x&=p&~(C&~_),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(o=!0,ux(u,x))}else x=Qe,x=Nt(u,u===ct?x:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(x&3)===0||dn(u,x)||(o=!0,ux(u,x));u=u.next}while(o);qd=!1}}function GA(){ox()}function ox(){xu=Vd=!1;var t=0;ei!==0&&(tT()&&(t=ei),ei=0);for(var a=Rt(),o=null,u=vu;u!==null;){var p=u.next,x=lx(u,a);x===0?(u.next=null,o===null?vu=p:o.next=p,p===null&&(Xi=o)):(o=u,(t!==0||(x&3)!==0)&&(xu=!0)),u=p}pl(t)}function lx(t,a){for(var o=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,x=t.pendingLanes&-62914561;0<x;){var C=31-Ae(x),_=1<<C,P=p[C];P===-1?((_&o)===0||(_&u)!==0)&&(p[C]=En(_,a)):P<=a&&(t.expiredLanes|=_),x&=~_}if(a=ct,o=Qe,o=Nt(t,t===a?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,o===0||t===a&&(rt===2||rt===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&xt(u),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||dn(t,o)){if(a=o&-o,a===t.callbackPriority)return a;switch(u!==null&&xt(u),za(o)){case 2:case 8:o=wn;break;case 32:o=hr;break;case 268435456:o=Sn;break;default:o=hr}return u=sx.bind(null,t),o=Ke(o,u),t.callbackPriority=a,t.callbackNode=o,a}return u!==null&&u!==null&&xt(u),t.callbackPriority=2,t.callbackNode=null,2}function sx(t,a){if(Xt!==0&&Xt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(yu()&&t.callbackNode!==o)return null;var u=Qe;return u=Nt(t,t===ct?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(qv(t,u,a),lx(t,Rt()),t.callbackNode!=null&&t.callbackNode===o?sx.bind(null,t):null)}function ux(t,a){if(yu())return null;qv(t,a,!0)}function YA(){rT(function(){(nt&6)!==0?Ke(bn,GA):ox()})}function $d(){return ei===0&&(ei=Cs()),ei}function cx(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:_s(""+t)}function fx(t,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,t.id&&o.setAttribute("form",t.id),a.parentNode.insertBefore(o,a),t=new FormData(t),o.parentNode.removeChild(o),t}function KA(t,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var x=cx((p[Se]||null).action),C=u.submitter;C&&(a=(a=C[Se]||null)?cx(a.formAction):C.getAttribute("formAction"),a!==null&&(x=a,C=null));var _=new Os("action","action",null,u,p);t.push({event:_,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ei!==0){var P=C?fx(p,C):new FormData(p);fd(o,{pending:!0,data:P,method:p.method,action:x},null,P)}}else typeof x=="function"&&(_.preventDefault(),P=C?fx(p,C):new FormData(p),fd(o,{pending:!0,data:P,method:p.method,action:x},x,P))},currentTarget:p}]})}}for(var Gd=0;Gd<_f.length;Gd++){var Yd=_f[Gd],XA=Yd.toLowerCase(),QA=Yd[0].toUpperCase()+Yd.slice(1);rr(XA,"on"+QA)}rr(qg,"onAnimationEnd"),rr($g,"onAnimationIteration"),rr(Gg,"onAnimationStart"),rr("dblclick","onDoubleClick"),rr("focusin","onFocus"),rr("focusout","onBlur"),rr(hA,"onTransitionRun"),rr(pA,"onTransitionStart"),rr(mA,"onTransitionCancel"),rr(Yg,"onTransitionEnd"),Ut("onMouseEnter",["mouseout","mouseover"]),Ut("onMouseLeave",["mouseout","mouseover"]),Ut("onPointerEnter",["pointerout","pointerover"]),Ut("onPointerLeave",["pointerout","pointerover"]),Ot("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ot("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ot("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ot("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ZA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function dx(t,a){a=(a&4)!==0;for(var o=0;o<t.length;o++){var u=t[o],p=u.event;u=u.listeners;e:{var x=void 0;if(a)for(var C=u.length-1;0<=C;C--){var _=u[C],P=_.instance,q=_.currentTarget;if(_=_.listener,P!==x&&p.isPropagationStopped())break e;x=_,p.currentTarget=q;try{x(p)}catch(te){ou(te)}p.currentTarget=null,x=P}else for(C=0;C<u.length;C++){if(_=u[C],P=_.instance,q=_.currentTarget,_=_.listener,P!==x&&p.isPropagationStopped())break e;x=_,p.currentTarget=q;try{x(p)}catch(te){ou(te)}p.currentTarget=null,x=P}}}}function Ge(t,a){var o=a[It];o===void 0&&(o=a[It]=new Set);var u=t+"__bubble";o.has(u)||(hx(a,t,2,!1),o.add(u))}function Kd(t,a,o){var u=0;a&&(u|=4),hx(o,t,u,a)}var bu="_reactListening"+Math.random().toString(36).slice(2);function Xd(t){if(!t[bu]){t[bu]=!0,bi.forEach(function(o){o!=="selectionchange"&&(ZA.has(o)||Kd(o,!1,t),Kd(o,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[bu]||(a[bu]=!0,Kd("selectionchange",!1,a))}}function hx(t,a,o,u){switch(zx(a)){case 2:var p=CT;break;case 8:p=kT;break;default:p=uh}o=p.bind(null,a,o,t),p=void 0,!yf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(a,o,{capture:!0,passive:p}):t.addEventListener(a,o,!0):p!==void 0?t.addEventListener(a,o,{passive:p}):t.addEventListener(a,o,!1)}function Qd(t,a,o,u,p){var x=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var C=u.tag;if(C===3||C===4){var _=u.stateNode.containerInfo;if(_===p)break;if(C===4)for(C=u.return;C!==null;){var P=C.tag;if((P===3||P===4)&&C.stateNode.containerInfo===p)return;C=C.return}for(;_!==null;){if(C=lt(_),C===null)return;if(P=C.tag,P===5||P===6||P===26||P===27){u=x=C;continue e}_=_.parentNode}}u=u.return}bg(function(){var q=x,te=mf(o),oe=[];e:{var K=Kg.get(t);if(K!==void 0){var X=Os,Me=t;switch(t){case"keypress":if(js(o)===0)break e;case"keydown":case"keyup":X=$2;break;case"focusin":Me="focus",X=wf;break;case"focusout":Me="blur",X=wf;break;case"beforeblur":case"afterblur":X=wf;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Eg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=D2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=K2;break;case qg:case $g:case Gg:X=L2;break;case Yg:X=Q2;break;case"scroll":case"scrollend":X=M2;break;case"wheel":X=W2;break;case"copy":case"cut":case"paste":X=I2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=kg;break;case"toggle":case"beforetoggle":X=eA}var Re=(a&4)!==0,ot=!Re&&(t==="scroll"||t==="scrollend"),U=Re?K!==null?K+"Capture":null:K;Re=[];for(var I=q,V;I!==null;){var re=I;if(V=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||V===null||U===null||(re=Oo(I,U),re!=null&&Re.push(gl(I,re,V))),ot)break;I=I.return}0<Re.length&&(K=new X(K,Me,null,o,te),oe.push({event:K,listeners:Re}))}}if((a&7)===0){e:{if(K=t==="mouseover"||t==="pointerover",X=t==="mouseout"||t==="pointerout",K&&o!==pf&&(Me=o.relatedTarget||o.fromElement)&&(lt(Me)||Me[Ue]))break e;if((X||K)&&(K=te.window===te?te:(K=te.ownerDocument)?K.defaultView||K.parentWindow:window,X?(Me=o.relatedTarget||o.toElement,X=q,Me=Me?lt(Me):null,Me!==null&&(ot=s(Me),Re=Me.tag,Me!==ot||Re!==5&&Re!==27&&Re!==6)&&(Me=null)):(X=null,Me=q),X!==Me)){if(Re=Eg,re="onMouseLeave",U="onMouseEnter",I="mouse",(t==="pointerout"||t==="pointerover")&&(Re=kg,re="onPointerLeave",U="onPointerEnter",I="pointer"),ot=X==null?K:Bt(X),V=Me==null?K:Bt(Me),K=new Re(re,I+"leave",X,o,te),K.target=ot,K.relatedTarget=V,re=null,lt(te)===q&&(Re=new Re(U,I+"enter",Me,o,te),Re.target=V,Re.relatedTarget=ot,re=Re),ot=re,X&&Me)t:{for(Re=X,U=Me,I=0,V=Re;V;V=Qi(V))I++;for(V=0,re=U;re;re=Qi(re))V++;for(;0<I-V;)Re=Qi(Re),I--;for(;0<V-I;)U=Qi(U),V--;for(;I--;){if(Re===U||U!==null&&Re===U.alternate)break t;Re=Qi(Re),U=Qi(U)}Re=null}else Re=null;X!==null&&px(oe,K,X,Re,!1),Me!==null&&ot!==null&&px(oe,ot,Me,Re,!0)}}e:{if(K=q?Bt(q):window,X=K.nodeName&&K.nodeName.toLowerCase(),X==="select"||X==="input"&&K.type==="file")var xe=Dg;else if(Mg(K))if(Og)xe=cA;else{xe=sA;var qe=lA}else X=K.nodeName,!X||X.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?q&&hf(q.elementType)&&(xe=Dg):xe=uA;if(xe&&(xe=xe(t,q))){jg(oe,xe,o,te);break e}qe&&qe(t,K,q),t==="focusout"&&q&&K.type==="number"&&q.memoizedProps.value!=null&&df(K,"number",K.value)}switch(qe=q?Bt(q):window,t){case"focusin":(Mg(qe)||qe.contentEditable==="true")&&(Ai=qe,Tf=q,Fo=null);break;case"focusout":Fo=Tf=Ai=null;break;case"mousedown":Rf=!0;break;case"contextmenu":case"mouseup":case"dragend":Rf=!1,Fg(oe,o,te);break;case"selectionchange":if(dA)break;case"keydown":case"keyup":Fg(oe,o,te)}var Ce;if(Ef)e:{switch(t){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else ki?Ng(t,o)&&(Ne="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(Ne="onCompositionStart");Ne&&(Ag&&o.locale!=="ko"&&(ki||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&ki&&(Ce=wg()):(na=te,vf="value"in na?na.value:na.textContent,ki=!0)),qe=wu(q,Ne),0<qe.length&&(Ne=new Cg(Ne,t,null,o,te),oe.push({event:Ne,listeners:qe}),Ce?Ne.data=Ce:(Ce=_g(o),Ce!==null&&(Ne.data=Ce)))),(Ce=nA?rA(t,o):aA(t,o))&&(Ne=wu(q,"onBeforeInput"),0<Ne.length&&(qe=new Cg("onBeforeInput","beforeinput",null,o,te),oe.push({event:qe,listeners:Ne}),qe.data=Ce)),KA(oe,t,q,o,te)}dx(oe,a)})}function gl(t,a,o){return{instance:t,listener:a,currentTarget:o}}function wu(t,a){for(var o=a+"Capture",u=[];t!==null;){var p=t,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=Oo(t,o),p!=null&&u.unshift(gl(t,p,x)),p=Oo(t,a),p!=null&&u.push(gl(t,p,x))),t.tag===3)return u;t=t.return}return[]}function Qi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function px(t,a,o,u,p){for(var x=a._reactName,C=[];o!==null&&o!==u;){var _=o,P=_.alternate,q=_.stateNode;if(_=_.tag,P!==null&&P===u)break;_!==5&&_!==26&&_!==27||q===null||(P=q,p?(q=Oo(o,x),q!=null&&C.unshift(gl(o,q,P))):p||(q=Oo(o,x),q!=null&&C.push(gl(o,q,P)))),o=o.return}C.length!==0&&t.push({event:a,listeners:C})}var WA=/\r\n?/g,JA=/\u0000|\uFFFD/g;function mx(t){return(typeof t=="string"?t:""+t).replace(WA,`
50
- `).replace(JA,"")}function gx(t,a){return a=mx(a),mx(t)===a}function Su(){}function it(t,a,o,u,p,x){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Si(t,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Si(t,""+u);break;case"className":nr(t,"class",u);break;case"tabIndex":nr(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":nr(t,o,u);break;case"style":vg(t,u,x);break;case"data":if(a!=="object"){nr(t,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=_s(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(o==="formAction"?(a!=="input"&&it(t,a,"name",p.name,p,null),it(t,a,"formEncType",p.formEncType,p,null),it(t,a,"formMethod",p.formMethod,p,null),it(t,a,"formTarget",p.formTarget,p,null)):(it(t,a,"encType",p.encType,p,null),it(t,a,"method",p.method,p,null),it(t,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=_s(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Su);break;case"onScroll":u!=null&&Ge("scroll",t);break;case"onScrollEnd":u!=null&&Ge("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=_s(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":Ge("beforetoggle",t),Ge("toggle",t),bt(t,"popover",u);break;case"xlinkActuate":Cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Cn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Cn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Cn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Cn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":bt(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=N2.get(o)||o,bt(t,o,u))}}function Zd(t,a,o,u,p,x){switch(o){case"style":vg(t,u,x);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"children":typeof u=="string"?Si(t,u):(typeof u=="number"||typeof u=="bigint")&&Si(t,""+u);break;case"onScroll":u!=null&&Ge("scroll",t);break;case"onScrollEnd":u!=null&&Ge("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Su);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ts.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),x=t[Se]||null,x=x!=null?x[o]:null,typeof x=="function"&&t.removeEventListener(a,x,p),typeof u=="function")){typeof x!="function"&&x!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(a,u,p);break e}o in t?t[o]=u:u===!0?t.setAttribute(o,""):bt(t,o,u)}}}function Qt(t,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",t),Ge("load",t);var u=!1,p=!1,x;for(x in o)if(o.hasOwnProperty(x)){var C=o[x];if(C!=null)switch(x){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(t,a,x,C,o,null)}}p&&it(t,a,"srcSet",o.srcSet,o,null),u&&it(t,a,"src",o.src,o,null);return;case"input":Ge("invalid",t);var _=x=C=p=null,P=null,q=null;for(u in o)if(o.hasOwnProperty(u)){var te=o[u];if(te!=null)switch(u){case"name":p=te;break;case"type":C=te;break;case"checked":P=te;break;case"defaultChecked":q=te;break;case"value":x=te;break;case"defaultValue":_=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,a));break;default:it(t,a,u,te,o,null)}}pg(t,x,_,P,q,C,p,!1),Rs(t);return;case"select":Ge("invalid",t),u=C=x=null;for(p in o)if(o.hasOwnProperty(p)&&(_=o[p],_!=null))switch(p){case"value":x=_;break;case"defaultValue":C=_;break;case"multiple":u=_;default:it(t,a,p,_,o,null)}a=x,o=C,t.multiple=!!u,a!=null?wi(t,!!u,a,!1):o!=null&&wi(t,!!u,o,!0);return;case"textarea":Ge("invalid",t),x=p=u=null;for(C in o)if(o.hasOwnProperty(C)&&(_=o[C],_!=null))switch(C){case"value":u=_;break;case"defaultValue":p=_;break;case"children":x=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:it(t,a,C,_,o,null)}gg(t,u,p,x),Rs(t);return;case"option":for(P in o)if(o.hasOwnProperty(P)&&(u=o[P],u!=null))switch(P){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:it(t,a,P,u,o,null)}return;case"dialog":Ge("beforetoggle",t),Ge("toggle",t),Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":Ge("load",t);break;case"video":case"audio":for(u=0;u<ml.length;u++)Ge(ml[u],t);break;case"image":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"embed":case"source":case"link":Ge("error",t),Ge("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in o)if(o.hasOwnProperty(q)&&(u=o[q],u!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(t,a,q,u,o,null)}return;default:if(hf(a)){for(te in o)o.hasOwnProperty(te)&&(u=o[te],u!==void 0&&Zd(t,a,te,u,o,void 0));return}}for(_ in o)o.hasOwnProperty(_)&&(u=o[_],u!=null&&it(t,a,_,u,o,null))}function eT(t,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,C=null,_=null,P=null,q=null,te=null;for(X in o){var oe=o[X];if(o.hasOwnProperty(X)&&oe!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":P=oe;default:u.hasOwnProperty(X)||it(t,a,X,null,u,oe)}}for(var K in u){var X=u[K];if(oe=o[K],u.hasOwnProperty(K)&&(X!=null||oe!=null))switch(K){case"type":x=X;break;case"name":p=X;break;case"checked":q=X;break;case"defaultChecked":te=X;break;case"value":C=X;break;case"defaultValue":_=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,a));break;default:X!==oe&&it(t,a,K,X,u,oe)}}ff(t,C,_,P,q,te,x,p);return;case"select":X=C=_=K=null;for(x in o)if(P=o[x],o.hasOwnProperty(x)&&P!=null)switch(x){case"value":break;case"multiple":X=P;default:u.hasOwnProperty(x)||it(t,a,x,null,u,P)}for(p in u)if(x=u[p],P=o[p],u.hasOwnProperty(p)&&(x!=null||P!=null))switch(p){case"value":K=x;break;case"defaultValue":_=x;break;case"multiple":C=x;default:x!==P&&it(t,a,p,x,u,P)}a=_,o=C,u=X,K!=null?wi(t,!!o,K,!1):!!u!=!!o&&(a!=null?wi(t,!!o,a,!0):wi(t,!!o,o?[]:"",!1));return;case"textarea":X=K=null;for(_ in o)if(p=o[_],o.hasOwnProperty(_)&&p!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:it(t,a,_,null,u,p)}for(C in u)if(p=u[C],x=o[C],u.hasOwnProperty(C)&&(p!=null||x!=null))switch(C){case"value":K=p;break;case"defaultValue":X=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==x&&it(t,a,C,p,u,x)}mg(t,K,X);return;case"option":for(var Me in o)if(K=o[Me],o.hasOwnProperty(Me)&&K!=null&&!u.hasOwnProperty(Me))switch(Me){case"selected":t.selected=!1;break;default:it(t,a,Me,null,u,K)}for(P in u)if(K=u[P],X=o[P],u.hasOwnProperty(P)&&K!==X&&(K!=null||X!=null))switch(P){case"selected":t.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:it(t,a,P,K,u,X)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in o)K=o[Re],o.hasOwnProperty(Re)&&K!=null&&!u.hasOwnProperty(Re)&&it(t,a,Re,null,u,K);for(q in u)if(K=u[q],X=o[q],u.hasOwnProperty(q)&&K!==X&&(K!=null||X!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,a));break;default:it(t,a,q,K,u,X)}return;default:if(hf(a)){for(var ot in o)K=o[ot],o.hasOwnProperty(ot)&&K!==void 0&&!u.hasOwnProperty(ot)&&Zd(t,a,ot,void 0,u,K);for(te in u)K=u[te],X=o[te],!u.hasOwnProperty(te)||K===X||K===void 0&&X===void 0||Zd(t,a,te,K,u,X);return}}for(var U in o)K=o[U],o.hasOwnProperty(U)&&K!=null&&!u.hasOwnProperty(U)&&it(t,a,U,null,u,K);for(oe in u)K=u[oe],X=o[oe],!u.hasOwnProperty(oe)||K===X||K==null&&X==null||it(t,a,oe,K,u,X)}var Wd=null,Jd=null;function Eu(t){return t.nodeType===9?t:t.ownerDocument}function yx(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vx(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function eh(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var th=null;function tT(){var t=window.event;return t&&t.type==="popstate"?t===th?!1:(th=t,!0):(th=null,!1)}var xx=typeof setTimeout=="function"?setTimeout:void 0,nT=typeof clearTimeout=="function"?clearTimeout:void 0,bx=typeof Promise=="function"?Promise:void 0,rT=typeof queueMicrotask=="function"?queueMicrotask:typeof bx<"u"?function(t){return bx.resolve(null).then(t).catch(aT)}:xx;function aT(t){setTimeout(function(){throw t})}function va(t){return t==="head"}function wx(t,a){var o=a,u=0,p=0;do{var x=o.nextSibling;if(t.removeChild(o),x&&x.nodeType===8)if(o=x.data,o==="/$"){if(0<u&&8>u){o=u;var C=t.ownerDocument;if(o&1&&yl(C.documentElement),o&2&&yl(C.body),o&4)for(o=C.head,yl(o),C=o.firstChild;C;){var _=C.nextSibling,P=C.nodeName;C[an]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&C.rel.toLowerCase()==="stylesheet"||o.removeChild(C),C=_}}if(p===0){t.removeChild(x),kl(a);return}p--}else o==="$"||o==="$?"||o==="$!"?p++:u=o.charCodeAt(0)-48;else u=0;o=x}while(o);kl(a)}function nh(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":nh(o),hn(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function iT(t,a,o,u){for(;t.nodeType===1;){var p=o;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[an])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(x=t.getAttribute("rel"),x==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(x!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(x=t.getAttribute("src"),(x!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===x)return t}else return t;if(t=ir(t.nextSibling),t===null)break}return null}function oT(t,a,o){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=ir(t.nextSibling),t===null))return null;return t}function rh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function lT(t,a){var o=t.ownerDocument;if(t.data!=="$?"||o.readyState==="complete")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function ir(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return t}var ah=null;function Sx(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(a===0)return t;a--}else o==="/$"&&a++}t=t.previousSibling}return null}function Ex(t,a,o){switch(a=Eu(o),t){case"html":if(t=a.documentElement,!t)throw Error(i(452));return t;case"head":if(t=a.head,!t)throw Error(i(453));return t;case"body":if(t=a.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function yl(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);hn(t)}var Yn=new Map,Cx=new Set;function Cu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Gr=Q.d;Q.d={f:sT,r:uT,D:cT,C:fT,L:dT,m:hT,X:mT,S:pT,M:gT};function sT(){var t=Gr.f(),a=mu();return t||a}function uT(t){var a=Yt(t);a!==null&&a.tag===5&&a.type==="form"?qy(a):Gr.r(t)}var Zi=typeof document>"u"?null:document;function kx(t,a,o){var u=Zi;if(u&&typeof a=="string"&&a){var p=Un(a);p='link[rel="'+t+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Cx.has(p)||(Cx.add(p),t={rel:t,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),Qt(a,"link",t),mt(a),u.head.appendChild(a)))}}function cT(t){Gr.D(t),kx("dns-prefetch",t,null)}function fT(t,a){Gr.C(t,a),kx("preconnect",t,a)}function dT(t,a,o){Gr.L(t,a,o);var u=Zi;if(u&&t&&a){var p='link[rel="preload"][as="'+Un(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Un(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Un(o.imageSizes)+'"]')):p+='[href="'+Un(t)+'"]';var x=p;switch(a){case"style":x=Wi(t);break;case"script":x=Ji(t)}Yn.has(x)||(t=m({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),Yn.set(x,t),u.querySelector(p)!==null||a==="style"&&u.querySelector(vl(x))||a==="script"&&u.querySelector(xl(x))||(a=u.createElement("link"),Qt(a,"link",t),mt(a),u.head.appendChild(a)))}}function hT(t,a){Gr.m(t,a);var o=Zi;if(o&&t){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Un(u)+'"][href="'+Un(t)+'"]',x=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Ji(t)}if(!Yn.has(x)&&(t=m({rel:"modulepreload",href:t},a),Yn.set(x,t),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(xl(x)))return}u=o.createElement("link"),Qt(u,"link",t),mt(u),o.head.appendChild(u)}}}function pT(t,a,o){Gr.S(t,a,o);var u=Zi;if(u&&t){var p=mr(u).hoistableStyles,x=Wi(t);a=a||"default";var C=p.get(x);if(!C){var _={loading:0,preload:null};if(C=u.querySelector(vl(x)))_.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":a},o),(o=Yn.get(x))&&ih(t,o);var P=C=u.createElement("link");mt(P),Qt(P,"link",t),P._p=new Promise(function(q,te){P.onload=q,P.onerror=te}),P.addEventListener("load",function(){_.loading|=1}),P.addEventListener("error",function(){_.loading|=2}),_.loading|=4,ku(C,a,u)}C={type:"stylesheet",instance:C,count:1,state:_},p.set(x,C)}}}function mT(t,a){Gr.X(t,a);var o=Zi;if(o&&t){var u=mr(o).hoistableScripts,p=Ji(t),x=u.get(p);x||(x=o.querySelector(xl(p)),x||(t=m({src:t,async:!0},a),(a=Yn.get(p))&&oh(t,a),x=o.createElement("script"),mt(x),Qt(x,"link",t),o.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},u.set(p,x))}}function gT(t,a){Gr.M(t,a);var o=Zi;if(o&&t){var u=mr(o).hoistableScripts,p=Ji(t),x=u.get(p);x||(x=o.querySelector(xl(p)),x||(t=m({src:t,async:!0,type:"module"},a),(a=Yn.get(p))&&oh(t,a),x=o.createElement("script"),mt(x),Qt(x,"link",t),o.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},u.set(p,x))}}function Ax(t,a,o,u){var p=(p=pe.current)?Cu(p):null;if(!p)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Wi(o.href),o=mr(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=Wi(o.href);var x=mr(p).hoistableStyles,C=x.get(t);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(t,C),(x=p.querySelector(vl(t)))&&!x._p&&(C.instance=x,C.state.loading=5),Yn.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Yn.set(t,o),x||yT(p,t,o,C.state))),a&&u===null)throw Error(i(528,""));return C}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ji(o),o=mr(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function Wi(t){return'href="'+Un(t)+'"'}function vl(t){return'link[rel="stylesheet"]['+t+"]"}function Tx(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function yT(t,a,o,u){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=t.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Qt(a,"link",o),mt(a),t.head.appendChild(a))}function Ji(t){return'[src="'+Un(t)+'"]'}function xl(t){return"script[async]"+t}function Rx(t,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=t.querySelector('style[data-href~="'+Un(o.href)+'"]');if(u)return a.instance=u,mt(u),u;var p=m({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),mt(u),Qt(u,"style",p),ku(u,o.precedence,t),a.instance=u;case"stylesheet":p=Wi(o.href);var x=t.querySelector(vl(p));if(x)return a.state.loading|=4,a.instance=x,mt(x),x;u=Tx(o),(p=Yn.get(p))&&ih(u,p),x=(t.ownerDocument||t).createElement("link"),mt(x);var C=x;return C._p=new Promise(function(_,P){C.onload=_,C.onerror=P}),Qt(x,"link",u),a.state.loading|=4,ku(x,o.precedence,t),a.instance=x;case"script":return x=Ji(o.src),(p=t.querySelector(xl(x)))?(a.instance=p,mt(p),p):(u=o,(p=Yn.get(x))&&(u=m({},o),oh(u,p)),t=t.ownerDocument||t,p=t.createElement("script"),mt(p),Qt(p,"link",u),t.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,ku(u,o.precedence,t));return a.instance}function ku(t,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,x=p,C=0;C<u.length;C++){var _=u[C];if(_.dataset.precedence===a)x=_;else if(x!==p)break}x?x.parentNode.insertBefore(t,x.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(t,a.firstChild))}function ih(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function oh(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Au=null;function Nx(t,a,o){if(Au===null){var u=new Map,p=Au=new Map;p.set(o,u)}else p=Au,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(t))return u;for(u.set(t,null),o=o.getElementsByTagName(t),p=0;p<o.length;p++){var x=o[p];if(!(x[an]||x[ge]||t==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(a)||"";C=t+C;var _=u.get(C);_?_.push(x):u.set(C,[x])}}return u}function _x(t,a,o){t=t.ownerDocument||t,t.head.insertBefore(o,a==="title"?t.querySelector("head > title"):null)}function vT(t,a,o){if(o===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Mx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var bl=null;function xT(){}function bT(t,a,o){if(bl===null)throw Error(i(475));var u=bl;if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Wi(o.href),x=t.querySelector(vl(p));if(x){t=x._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(u.count++,u=Tu.bind(u),t.then(u,u)),a.state.loading|=4,a.instance=x,mt(x);return}x=t.ownerDocument||t,o=Tx(o),(p=Yn.get(p))&&ih(o,p),x=x.createElement("link"),mt(x);var C=x;C._p=new Promise(function(_,P){C.onload=_,C.onerror=P}),Qt(x,"link",o),a.instance=x}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(u.count++,a=Tu.bind(u),t.addEventListener("load",a),t.addEventListener("error",a))}}function wT(){if(bl===null)throw Error(i(475));var t=bl;return t.stylesheets&&t.count===0&&lh(t,t.stylesheets),0<t.count?function(a){var o=setTimeout(function(){if(t.stylesheets&&lh(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o)}}:null}function Tu(){if(this.count--,this.count===0){if(this.stylesheets)lh(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ru=null;function lh(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ru=new Map,a.forEach(ST,t),Ru=null,Tu.call(t))}function ST(t,a){if(!(a.state.loading&4)){var o=Ru.get(t);if(o)var u=o.get(null);else{o=new Map,Ru.set(t,o);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var C=p[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(o.set(C.dataset.precedence,C),u=C)}u&&o.set(null,u)}p=a.instance,C=p.getAttribute("data-precedence"),x=o.get(C)||u,x===u&&o.set(null,p),o.set(C,p),this.count++,u=Tu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),x?x.parentNode.insertBefore(p,x.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),a.state.loading|=4}}var wl={$$typeof:N,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function ET(t,a,o,u,p,x,C,_){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=jo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jo(0),this.hiddenUpdates=jo(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function jx(t,a,o,u,p,x,C,_,P,q,te,oe){return t=new ET(t,a,o,C,_,P,q,oe),a=1,x===!0&&(a|=24),x=Tn(3,null,null,a),t.current=x,x.stateNode=t,a=Ff(),a.refCount++,t.pooledCache=a,a.refCount++,x.memoizedState={element:u,isDehydrated:o,cache:a},Gf(x),t}function Dx(t){return t?(t=_i,t):_i}function Ox(t,a,o,u,p,x){p=Dx(p),u.context===null?u.context=p:u.pendingContext=p,u=ia(a),u.payload={element:o},x=x===void 0?null:x,x!==null&&(u.callback=x),o=oa(t,u,a),o!==null&&(jn(o,t,a),Zo(o,t,a))}function Px(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<a?o:a}}function sh(t,a){Px(t,a),(t=t.alternate)&&Px(t,a)}function Lx(t){if(t.tag===13){var a=Ni(t,67108864);a!==null&&jn(a,t,67108864),sh(t,67108864)}}var Nu=!0;function CT(t,a,o,u){var p=z.T;z.T=null;var x=Q.p;try{Q.p=2,uh(t,a,o,u)}finally{Q.p=x,z.T=p}}function kT(t,a,o,u){var p=z.T;z.T=null;var x=Q.p;try{Q.p=8,uh(t,a,o,u)}finally{Q.p=x,z.T=p}}function uh(t,a,o,u){if(Nu){var p=ch(u);if(p===null)Qd(t,a,u,_u,o),Ix(t,u);else if(TT(p,t,a,o,u))u.stopPropagation();else if(Ix(t,u),a&4&&-1<AT.indexOf(t)){for(;p!==null;){var x=Yt(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=Jt(x.pendingLanes);if(C!==0){var _=x;for(_.pendingLanes|=2,_.entangledLanes|=2;C;){var P=1<<31-Ae(C);_.entanglements[1]|=P,C&=~P}br(x),(nt&6)===0&&(hu=Rt()+500,pl(0))}}break;case 13:_=Ni(x,2),_!==null&&jn(_,x,2),mu(),sh(x,2)}if(x=ch(u),x===null&&Qd(t,a,u,_u,o),x===p)break;p=x}p!==null&&u.stopPropagation()}else Qd(t,a,u,null,o)}}function ch(t){return t=mf(t),fh(t)}var _u=null;function fh(t){if(_u=null,t=lt(t),t!==null){var a=s(t);if(a===null)t=null;else{var o=a.tag;if(o===13){if(t=c(a),t!==null)return t;t=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return _u=t,null}function zx(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(yi()){case bn:return 2;case wn:return 8;case hr:case ea:return 32;case Sn:return 268435456;default:return 32}default:return 32}}var dh=!1,xa=null,ba=null,wa=null,Sl=new Map,El=new Map,Sa=[],AT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ix(t,a){switch(t){case"focusin":case"focusout":xa=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":wa=null;break;case"pointerover":case"pointerout":Sl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":El.delete(a.pointerId)}}function Cl(t,a,o,u,p,x){return t===null||t.nativeEvent!==x?(t={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:x,targetContainers:[p]},a!==null&&(a=Yt(a),a!==null&&Lx(a)),t):(t.eventSystemFlags|=u,a=t.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),t)}function TT(t,a,o,u,p){switch(a){case"focusin":return xa=Cl(xa,t,a,o,u,p),!0;case"dragenter":return ba=Cl(ba,t,a,o,u,p),!0;case"mouseover":return wa=Cl(wa,t,a,o,u,p),!0;case"pointerover":var x=p.pointerId;return Sl.set(x,Cl(Sl.get(x)||null,t,a,o,u,p)),!0;case"gotpointercapture":return x=p.pointerId,El.set(x,Cl(El.get(x)||null,t,a,o,u,p)),!0}return!1}function Bx(t){var a=lt(t.target);if(a!==null){var o=s(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){t.blockedOn=a,fe(t.priority,function(){if(o.tag===13){var u=Mn();u=pr(u);var p=Ni(o,u);p!==null&&jn(p,o,u),sh(o,u)}});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Mu(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var o=ch(t.nativeEvent);if(o===null){o=t.nativeEvent;var u=new o.constructor(o.type,o);pf=u,o.target.dispatchEvent(u),pf=null}else return a=Yt(o),a!==null&&Lx(a),t.blockedOn=o,!1;a.shift()}return!0}function Ux(t,a,o){Mu(t)&&o.delete(a)}function RT(){dh=!1,xa!==null&&Mu(xa)&&(xa=null),ba!==null&&Mu(ba)&&(ba=null),wa!==null&&Mu(wa)&&(wa=null),Sl.forEach(Ux),El.forEach(Ux)}function ju(t,a){t.blockedOn===a&&(t.blockedOn=null,dh||(dh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,RT)))}var Du=null;function Hx(t){Du!==t&&(Du=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Du===t&&(Du=null);for(var a=0;a<t.length;a+=3){var o=t[a],u=t[a+1],p=t[a+2];if(typeof u!="function"){if(fh(u||o)===null)continue;break}var x=Yt(o);x!==null&&(t.splice(a,3),a-=3,fd(x,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function kl(t){function a(P){return ju(P,t)}xa!==null&&ju(xa,t),ba!==null&&ju(ba,t),wa!==null&&ju(wa,t),Sl.forEach(a),El.forEach(a);for(var o=0;o<Sa.length;o++){var u=Sa[o];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Sa.length&&(o=Sa[0],o.blockedOn===null);)Bx(o),o.blockedOn===null&&Sa.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],x=o[u+1],C=p[Se]||null;if(typeof x=="function")C||Hx(o);else if(C){var _=null;if(x&&x.hasAttribute("formAction")){if(p=x,C=x[Se]||null)_=C.formAction;else if(fh(p)!==null)continue}else _=C.action;typeof _=="function"?o[u+1]=_:(o.splice(u,3),u-=3),Hx(o)}}}function hh(t){this._internalRoot=t}Ou.prototype.render=hh.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=Mn();Ox(o,u,t,a,null,null)},Ou.prototype.unmount=hh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Ox(t.current,2,null,t,null,null),mu(),a[Ue]=null}};function Ou(t){this._internalRoot=t}Ou.prototype.unstable_scheduleHydration=function(t){if(t){var a=F();t={blockedOn:null,target:t,priority:a};for(var o=0;o<Sa.length&&a!==0&&a<Sa[o].priority;o++);Sa.splice(o,0,t),o===0&&Bx(t)}};var Fx=n.version;if(Fx!=="19.1.1")throw Error(i(527,Fx,"19.1.1"));Q.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=d(a),t=t!==null?h(t):null,t=t===null?null:t.stateNode,t};var NT={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{ee=Pu.inject(NT),de=Pu}catch{}}return Tl.createRoot=function(t,a){if(!l(t))throw Error(i(299));var o=!1,u="",p=av,x=iv,C=ov,_=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(_=a.unstable_transitionCallbacks)),a=jx(t,1,!1,null,null,o,u,p,x,C,_,null),t[Ue]=a.current,Xd(t),new hh(a)},Tl.hydrateRoot=function(t,a,o){if(!l(t))throw Error(i(299));var u=!1,p="",x=av,C=iv,_=ov,P=null,q=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(C=o.onCaughtError),o.onRecoverableError!==void 0&&(_=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(P=o.unstable_transitionCallbacks),o.formState!==void 0&&(q=o.formState)),a=jx(t,1,!0,a,o??null,u,p,x,C,_,P,q),a.context=Dx(null),o=a.current,u=Mn(),u=pr(u),p=ia(u),p.callback=null,oa(o,p,u),o=u,a.current.lanes=o,La(a,o),br(a),t[Ue]=a.current,Xd(t),new Ou(a)},Tl.version="19.1.1",Tl}var Wx;function BT(){if(Wx)return gh.exports;Wx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),gh.exports=IT(),gh.exports}var UT=BT();const HT="modulepreload",FT=function(e){return"/"+e},Jx={},Ie=function(n,r,i){let l=Promise.resolve();if(r&&r.length>0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");l=d(r.map(h=>{if(h=FT(h),h in Jx)return;Jx[h]=!0;const m=h.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":HT,m||(w.as="script"),w.crossOrigin="",w.href=h,f&&w.setAttribute("nonce",f),document.head.appendChild(w),m)return new Promise((b,S)=>{w.addEventListener("load",b),w.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&s(f.reason);return n().catch(s)})};/**
49
+ `+o.stack}}function Bn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function dg(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function A2(t){var a=dg(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,a),u=""+t[a];if(!t.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var p=o.get,x=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return p.call(this)},set:function(C){u=""+C,x.call(this,C)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(C){u=""+C},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Ts(t){t._valueTracker||(t._valueTracker=A2(t))}function hg(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return t&&(u=dg(t)?t.checked?"true":"false":t.value),t=u,t!==o?(a.setValue(t),!0):!1}function Rs(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var T2=/[\n"\\]/g;function Un(t){return t.replace(T2,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function ff(t,a,o,u,p,x,C,_){t.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?t.type=C:t.removeAttribute("type"),a!=null?C==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+Bn(a)):t.value!==""+Bn(a)&&(t.value=""+Bn(a)):C!=="submit"&&C!=="reset"||t.removeAttribute("value"),a!=null?df(t,C,Bn(a)):o!=null?df(t,C,Bn(o)):u!=null&&t.removeAttribute("value"),p==null&&x!=null&&(t.defaultChecked=!!x),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Bn(_):t.removeAttribute("name")}function pg(t,a,o,u,p,x,C,_){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.type=x),a!=null||o!=null){if(!(x!=="submit"&&x!=="reset"||a!=null))return;o=o!=null?""+Bn(o):"",a=a!=null?""+Bn(a):o,_||a===t.value||(t.value=a),t.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=_?t.checked:!!u,t.defaultChecked=!!u,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(t.name=C)}function df(t,a,o){a==="number"&&Rs(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function wi(t,a,o,u){if(t=t.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<t.length;o++)p=a.hasOwnProperty("$"+t[o].value),t[o].selected!==p&&(t[o].selected=p),p&&u&&(t[o].defaultSelected=!0)}else{for(o=""+Bn(o),a=null,p=0;p<t.length;p++){if(t[p].value===o){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}a!==null||t[p].disabled||(a=t[p])}a!==null&&(a.selected=!0)}}function mg(t,a,o){if(a!=null&&(a=""+Bn(a),a!==t.value&&(t.value=a),o==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=o!=null?""+Bn(o):""}function gg(t,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(ae(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=Bn(a),t.defaultValue=o,u=t.textContent,u===o&&u!==""&&u!==null&&(t.value=u)}function Si(t,a){if(a){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=a;return}}t.textContent=a}var R2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function yg(t,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":u?t.setProperty(a,o):typeof o!="number"||o===0||R2.has(a)?a==="float"?t.cssFloat=o:t[a]=(""+o).trim():t[a]=o+"px"}function vg(t,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(t=t.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&yg(t,p,u)}else for(var x in a)a.hasOwnProperty(x)&&yg(t,x,a[x])}function hf(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var N2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ns(t){return _2.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var pf=null;function mf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ei=null,Ci=null;function xg(t){var a=Yt(t);if(a&&(t=a.stateNode)){var o=t[Se]||null;e:switch(t=a.stateNode,a.type){case"input":if(ff(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Un(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==t&&u.form===t.form){var p=u[Se]||null;if(!p)throw Error(i(90));ff(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===t.form&&hg(u)}break e;case"textarea":mg(t,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&wi(t,!!o.multiple,a,!1)}}}var gf=!1;function bg(t,a,o){if(gf)return t(a,o);gf=!0;try{var u=t(a);return u}finally{if(gf=!1,(Ei!==null||Ci!==null)&&(pu(),Ei&&(a=Ei,t=Ci,Ci=Ei=null,xg(a),t)))for(a=0;a<t.length;a++)xg(t[a])}}function Oo(t,a){var o=t.stateNode;if(o===null)return null;var u=o[Se]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yf=!1;if(Dr)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){yf=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{yf=!1}var na=null,vf=null,_s=null;function wg(){if(_s)return _s;var t,a=vf,o=a.length,u,p="value"in na?na.value:na.textContent,x=p.length;for(t=0;t<o&&a[t]===p[t];t++);var C=o-t;for(u=1;u<=C&&a[o-u]===p[x-u];u++);return _s=p.slice(t,1<u?1-u:void 0)}function Ms(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function js(){return!0}function Sg(){return!1}function pn(t){function a(o,u,p,x,C){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(o=t[_],this[_]=o?o(x):x[_]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?js:Sg,this.isPropagationStopped=Sg,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=js)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=js)},persist:function(){},isPersistent:js}),a}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ds=pn(Ba),Lo=m({},Ba,{view:0,detail:0}),M2=pn(Lo),xf,bf,zo,Os=m({},Lo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==zo&&(zo&&t.type==="mousemove"?(xf=t.screenX-zo.screenX,bf=t.screenY-zo.screenY):bf=xf=0,zo=t),xf)},movementY:function(t){return"movementY"in t?t.movementY:bf}}),Eg=pn(Os),j2=m({},Os,{dataTransfer:0}),D2=pn(j2),O2=m({},Lo,{relatedTarget:0}),wf=pn(O2),P2=m({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),L2=pn(P2),z2=m({},Ba,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),I2=pn(z2),B2=m({},Ba,{data:0}),Cg=pn(B2),U2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},F2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V2(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=F2[t])?!!a[t]:!1}function Sf(){return V2}var q2=m({},Lo,{key:function(t){if(t.key){var a=U2[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=Ms(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?H2[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sf,charCode:function(t){return t.type==="keypress"?Ms(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ms(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),$2=pn(q2),G2=m({},Os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kg=pn(G2),Y2=m({},Lo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sf}),K2=pn(Y2),X2=m({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q2=pn(X2),Z2=m({},Os,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),W2=pn(Z2),J2=m({},Ba,{newState:0,oldState:0}),eA=pn(J2),tA=[9,13,27,32],Ef=Dr&&"CompositionEvent"in window,Io=null;Dr&&"documentMode"in document&&(Io=document.documentMode);var nA=Dr&&"TextEvent"in window&&!Io,Ag=Dr&&(!Ef||Io&&8<Io&&11>=Io),Tg=" ",Rg=!1;function Ng(t,a){switch(t){case"keyup":return tA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _g(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ki=!1;function rA(t,a){switch(t){case"compositionend":return _g(a);case"keypress":return a.which!==32?null:(Rg=!0,Tg);case"textInput":return t=a.data,t===Tg&&Rg?null:t;default:return null}}function aA(t,a){if(ki)return t==="compositionend"||!Ef&&Ng(t,a)?(t=wg(),_s=vf=na=null,ki=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Ag&&a.locale!=="ko"?null:a.data;default:return null}}var iA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mg(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!iA[t.type]:a==="textarea"}function jg(t,a,o,u){Ei?Ci?Ci.push(u):Ci=[u]:Ei=u,a=bu(a,"onChange"),0<a.length&&(o=new Ds("onChange","change",null,o,u),t.push({event:o,listeners:a}))}var Bo=null,Uo=null;function oA(t){dx(t,0)}function Ps(t){var a=Bt(t);if(hg(a))return t}function Dg(t,a){if(t==="change")return a}var Og=!1;if(Dr){var Cf;if(Dr){var kf="oninput"in document;if(!kf){var Pg=document.createElement("div");Pg.setAttribute("oninput","return;"),kf=typeof Pg.oninput=="function"}Cf=kf}else Cf=!1;Og=Cf&&(!document.documentMode||9<document.documentMode)}function Lg(){Bo&&(Bo.detachEvent("onpropertychange",zg),Uo=Bo=null)}function zg(t){if(t.propertyName==="value"&&Ps(Uo)){var a=[];jg(a,Uo,t,mf(t)),bg(oA,a)}}function lA(t,a,o){t==="focusin"?(Lg(),Bo=a,Uo=o,Bo.attachEvent("onpropertychange",zg)):t==="focusout"&&Lg()}function sA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ps(Uo)}function uA(t,a){if(t==="click")return Ps(a)}function cA(t,a){if(t==="input"||t==="change")return Ps(a)}function fA(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var An=typeof Object.is=="function"?Object.is:fA;function Ho(t,a){if(An(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var o=Object.keys(t),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!We.call(a,p)||!An(t[p],a[p]))return!1}return!0}function Ig(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Bg(t,a){var o=Ig(t);t=0;for(var u;o;){if(o.nodeType===3){if(u=t+o.textContent.length,t<=a&&u>=a)return{node:o,offset:a-t};t=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Ig(o)}}function Ug(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Ug(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Hg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=Rs(t.document);a instanceof t.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)t=a.contentWindow;else break;a=Rs(t.document)}return a}function Af(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var dA=Dr&&"documentMode"in document&&11>=document.documentMode,Ai=null,Tf=null,Fo=null,Rf=!1;function Fg(t,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Rf||Ai==null||Ai!==Rs(u)||(u=Ai,"selectionStart"in u&&Af(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Fo&&Ho(Fo,u)||(Fo=u,u=bu(Tf,"onSelect"),0<u.length&&(a=new Ds("onSelect","select",null,a,o),t.push({event:a,listeners:u}),a.target=Ai)))}function Ua(t,a){var o={};return o[t.toLowerCase()]=a.toLowerCase(),o["Webkit"+t]="webkit"+a,o["Moz"+t]="moz"+a,o}var Ti={animationend:Ua("Animation","AnimationEnd"),animationiteration:Ua("Animation","AnimationIteration"),animationstart:Ua("Animation","AnimationStart"),transitionrun:Ua("Transition","TransitionRun"),transitionstart:Ua("Transition","TransitionStart"),transitioncancel:Ua("Transition","TransitionCancel"),transitionend:Ua("Transition","TransitionEnd")},Nf={},Vg={};Dr&&(Vg=document.createElement("div").style,"AnimationEvent"in window||(delete Ti.animationend.animation,delete Ti.animationiteration.animation,delete Ti.animationstart.animation),"TransitionEvent"in window||delete Ti.transitionend.transition);function Ha(t){if(Nf[t])return Nf[t];if(!Ti[t])return t;var a=Ti[t],o;for(o in a)if(a.hasOwnProperty(o)&&o in Vg)return Nf[t]=a[o];return t}var qg=Ha("animationend"),$g=Ha("animationiteration"),Gg=Ha("animationstart"),hA=Ha("transitionrun"),pA=Ha("transitionstart"),mA=Ha("transitioncancel"),Yg=Ha("transitionend"),Kg=new Map,_f="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");_f.push("scrollEnd");function rr(t,a){Kg.set(t,a),Ot(a,[t])}var Xg=new WeakMap;function Hn(t,a){if(typeof t=="object"&&t!==null){var o=Xg.get(t);return o!==void 0?o:(a={value:t,source:a,stack:fg(a)},Xg.set(t,a),a)}return{value:t,source:a,stack:fg(a)}}var Fn=[],Ri=0,Mf=0;function Ls(){for(var t=Ri,a=Mf=Ri=0;a<t;){var o=Fn[a];Fn[a++]=null;var u=Fn[a];Fn[a++]=null;var p=Fn[a];Fn[a++]=null;var x=Fn[a];if(Fn[a++]=null,u!==null&&p!==null){var C=u.pending;C===null?p.next=p:(p.next=C.next,C.next=p),u.pending=p}x!==0&&Qg(o,p,x)}}function zs(t,a,o,u){Fn[Ri++]=t,Fn[Ri++]=a,Fn[Ri++]=o,Fn[Ri++]=u,Mf|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function jf(t,a,o,u){return zs(t,a,o,u),Is(t)}function Ni(t,a){return zs(t,null,null,a),Is(t)}function Qg(t,a,o){t.lanes|=o;var u=t.alternate;u!==null&&(u.lanes|=o);for(var p=!1,x=t.return;x!==null;)x.childLanes|=o,u=x.alternate,u!==null&&(u.childLanes|=o),x.tag===22&&(t=x.stateNode,t===null||t._visibility&1||(p=!0)),t=x,x=x.return;return t.tag===3?(x=t.stateNode,p&&a!==null&&(p=31-Ae(o),t=x.hiddenUpdates,u=t[p],u===null?t[p]=[a]:u.push(a),a.lane=o|536870912),x):null}function Is(t){if(50<hl)throw hl=0,Id=null,Error(i(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var _i={};function gA(t,a,o,u){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(t,a,o,u){return new gA(t,a,o,u)}function Df(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Or(t,a){var o=t.alternate;return o===null?(o=Tn(t.tag,a,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=a,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,a=t.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function Zg(t,a){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,a=o.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function Bs(t,a,o,u,p,x){var C=0;if(u=t,typeof t=="function")Df(t)&&(C=1);else if(typeof t=="string")C=vT(t,o,ce.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Y:return t=Tn(31,o,a,p),t.elementType=Y,t.lanes=x,t;case S:return Fa(o.children,p,x,a);case E:C=8,p|=24;break;case T:return t=Tn(12,o,a,p|2),t.elementType=T,t.lanes=x,t;case L:return t=Tn(13,o,a,p),t.elementType=L,t.lanes=x,t;case j:return t=Tn(19,o,a,p),t.elementType=j,t.lanes=x,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case A:case N:C=10;break e;case R:C=9;break e;case O:C=11;break e;case H:C=14;break e;case $:C=16,u=null;break e}C=29,o=Error(i(130,t===null?"null":typeof t,"")),u=null}return a=Tn(C,o,a,p),a.elementType=t,a.type=u,a.lanes=x,a}function Fa(t,a,o,u){return t=Tn(7,t,u,a),t.lanes=o,t}function Of(t,a,o){return t=Tn(6,t,null,a),t.lanes=o,t}function Pf(t,a,o){return a=Tn(4,t.children!==null?t.children:[],t.key,a),a.lanes=o,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var Mi=[],ji=0,Us=null,Hs=0,Vn=[],qn=0,Va=null,Pr=1,Lr="";function qa(t,a){Mi[ji++]=Hs,Mi[ji++]=Us,Us=t,Hs=a}function Wg(t,a,o){Vn[qn++]=Pr,Vn[qn++]=Lr,Vn[qn++]=Va,Va=t;var u=Pr;t=Lr;var p=32-Ae(u)-1;u&=~(1<<p),o+=1;var x=32-Ae(a)+p;if(30<x){var C=p-p%5;x=(u&(1<<C)-1).toString(32),u>>=C,p-=C,Pr=1<<32-Ae(a)+p|o<<p|u,Lr=x+t}else Pr=1<<x|o<<p|u,Lr=t}function Lf(t){t.return!==null&&(qa(t,1),Wg(t,1,0))}function zf(t){for(;t===Us;)Us=Mi[--ji],Mi[ji]=null,Hs=Mi[--ji],Mi[ji]=null;for(;t===Va;)Va=Vn[--qn],Vn[qn]=null,Lr=Vn[--qn],Vn[qn]=null,Pr=Vn[--qn],Vn[qn]=null}var on=null,wt=null,tt=!1,$a=null,gr=!1,If=Error(i(519));function Ga(t){var a=Error(i(418,""));throw $o(Hn(a,t)),If}function Jg(t){var a=t.stateNode,o=t.type,u=t.memoizedProps;switch(a[ge]=t,a[Se]=u,o){case"dialog":Ge("cancel",a),Ge("close",a);break;case"iframe":case"object":case"embed":Ge("load",a);break;case"video":case"audio":for(o=0;o<ml.length;o++)Ge(ml[o],a);break;case"source":Ge("error",a);break;case"img":case"image":case"link":Ge("error",a),Ge("load",a);break;case"details":Ge("toggle",a);break;case"input":Ge("invalid",a),pg(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Ts(a);break;case"select":Ge("invalid",a);break;case"textarea":Ge("invalid",a),gg(a,u.value,u.defaultValue,u.children),Ts(a)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||gx(a.textContent,o)?(u.popover!=null&&(Ge("beforetoggle",a),Ge("toggle",a)),u.onScroll!=null&&Ge("scroll",a),u.onScrollEnd!=null&&Ge("scrollend",a),u.onClick!=null&&(a.onclick=wu),a=!0):a=!1,a||Ga(t)}function ey(t){for(on=t.return;on;)switch(on.tag){case 5:case 13:gr=!1;return;case 27:case 3:gr=!0;return;default:on=on.return}}function Vo(t){if(t!==on)return!1;if(!tt)return ey(t),tt=!0,!1;var a=t.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||eh(t.type,t.memoizedProps)),o=!o),o&&wt&&Ga(t),ey(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));e:{for(t=t.nextSibling,a=0;t;){if(t.nodeType===8)if(o=t.data,o==="/$"){if(a===0){wt=ir(t.nextSibling);break e}a--}else o!=="$"&&o!=="$!"&&o!=="$?"||a++;t=t.nextSibling}wt=null}}else a===27?(a=wt,va(t.type)?(t=ah,ah=null,wt=t):wt=a):wt=on?ir(t.stateNode.nextSibling):null;return!0}function qo(){wt=on=null,tt=!1}function ty(){var t=$a;return t!==null&&(yn===null?yn=t:yn.push.apply(yn,t),$a=null),t}function $o(t){$a===null?$a=[t]:$a.push(t)}var Bf=W(null),Ya=null,zr=null;function ra(t,a,o){M(Bf,a._currentValue),a._currentValue=o}function Ir(t){t._currentValue=Bf.current,se(Bf)}function Uf(t,a,o){for(;t!==null;){var u=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),t===o)break;t=t.return}}function Hf(t,a,o,u){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var x=p.dependencies;if(x!==null){var C=p.child;x=x.firstContext;e:for(;x!==null;){var _=x;x=p;for(var P=0;P<a.length;P++)if(_.context===a[P]){x.lanes|=o,_=x.alternate,_!==null&&(_.lanes|=o),Uf(x.return,o,t),u||(C=null);break e}x=_.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(i(341));C.lanes|=o,x=C.alternate,x!==null&&(x.lanes|=o),Uf(C,o,t),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===t){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function Go(t,a,o,u){t=null;for(var p=a,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var C=p.alternate;if(C===null)throw Error(i(387));if(C=C.memoizedProps,C!==null){var _=p.type;An(p.pendingProps.value,C.value)||(t!==null?t.push(_):t=[_])}}else if(p===le.current){if(C=p.alternate,C===null)throw Error(i(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(wl):t=[wl])}p=p.return}t!==null&&Hf(a,t,o,u),a.flags|=262144}function Fs(t){for(t=t.firstContext;t!==null;){if(!An(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ka(t){Ya=t,zr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function en(t){return ny(Ya,t)}function Vs(t,a){return Ya===null&&Ka(t),ny(t,a)}function ny(t,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},zr===null){if(t===null)throw Error(i(308));zr=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else zr=zr.next=a;return o}var yA=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(o,u){t.push(u)}};this.abort=function(){a.aborted=!0,t.forEach(function(o){return o()})}},vA=e.unstable_scheduleCallback,xA=e.unstable_NormalPriority,Pt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new yA,data:new Map,refCount:0}}function Yo(t){t.refCount--,t.refCount===0&&vA(xA,function(){t.controller.abort()})}var Ko=null,Vf=0,Di=0,Oi=null;function bA(t,a){if(Ko===null){var o=Ko=[];Vf=0,Di=$d(),Oi={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Vf++,a.then(ry,ry),a}function ry(){if(--Vf===0&&Ko!==null){Oi!==null&&(Oi.status="fulfilled");var t=Ko;Ko=null,Di=0,Oi=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function wA(t,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return t.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var ay=z.S;z.S=function(t,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&bA(t,a),ay!==null&&ay(t,a)};var Xa=W(null);function qf(){var t=Xa.current;return t!==null?t:ct.pooledCache}function qs(t,a){a===null?M(Xa,Xa.current):M(Xa,a.pool)}function iy(){var t=qf();return t===null?null:{parent:Pt._currentValue,pool:t}}var Xo=Error(i(460)),oy=Error(i(474)),$s=Error(i(542)),$f={then:function(){}};function ly(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Gs(){}function sy(t,a,o){switch(o=t[o],o===void 0?t.push(a):o!==a&&(a.then(Gs,Gs),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,cy(t),t;default:if(typeof a.status=="string")a.then(Gs,Gs);else{if(t=ct,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=a,t.status="pending",t.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,cy(t),t}throw Qo=a,Xo}}var Qo=null;function uy(){if(Qo===null)throw Error(i(459));var t=Qo;return Qo=null,t}function cy(t){if(t===Xo||t===$s)throw Error(i(483))}var aa=!1;function Gf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yf(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ia(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function oa(t,a,o){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(nt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=Is(t),Qg(t,null,o),a}return zs(t,u,a,o),Is(t)}function Zo(t,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=t.pendingLanes,o|=u,a.lanes=o,Do(t,o)}}function Kf(t,a){var o=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,x=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};x===null?p=x=C:x=x.next=C,o=o.next}while(o!==null);x===null?p=x=a:x=x.next=a}else p=x=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:u.shared,callbacks:u.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=a:t.next=a,o.lastBaseUpdate=a}var Xf=!1;function Wo(){if(Xf){var t=Oi;if(t!==null)throw t}}function Jo(t,a,o,u){Xf=!1;var p=t.updateQueue;aa=!1;var x=p.firstBaseUpdate,C=p.lastBaseUpdate,_=p.shared.pending;if(_!==null){p.shared.pending=null;var P=_,q=P.next;P.next=null,C===null?x=q:C.next=q,C=P;var te=t.alternate;te!==null&&(te=te.updateQueue,_=te.lastBaseUpdate,_!==C&&(_===null?te.firstBaseUpdate=q:_.next=q,te.lastBaseUpdate=P))}if(x!==null){var oe=p.baseState;C=0,te=q=P=null,_=x;do{var K=_.lane&-536870913,X=K!==_.lane;if(X?(Qe&K)===K:(u&K)===K){K!==0&&K===Di&&(Xf=!0),te!==null&&(te=te.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Me=t,Re=_;K=a;var ot=o;switch(Re.tag){case 1:if(Me=Re.payload,typeof Me=="function"){oe=Me.call(ot,oe,K);break e}oe=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Re.payload,K=typeof Me=="function"?Me.call(ot,oe,K):Me,K==null)break e;oe=m({},oe,K);break e;case 2:aa=!0}}K=_.callback,K!==null&&(t.flags|=64,X&&(t.flags|=8192),X=p.callbacks,X===null?p.callbacks=[K]:X.push(K))}else X={lane:K,tag:_.tag,payload:_.payload,callback:_.callback,next:null},te===null?(q=te=X,P=oe):te=te.next=X,C|=K;if(_=_.next,_===null){if(_=p.shared.pending,_===null)break;X=_,_=X.next,X.next=null,p.lastBaseUpdate=X,p.shared.pending=null}}while(!0);te===null&&(P=oe),p.baseState=P,p.firstBaseUpdate=q,p.lastBaseUpdate=te,x===null&&(p.shared.lanes=0),pa|=C,t.lanes=C,t.memoizedState=oe}}function fy(t,a){if(typeof t!="function")throw Error(i(191,t));t.call(a)}function dy(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)fy(o[t],a)}var Pi=W(null),Ys=W(0);function hy(t,a){t=$r,M(Ys,t),M(Pi,a),$r=t|a.baseLanes}function Qf(){M(Ys,$r),M(Pi,Pi.current)}function Zf(){$r=Ys.current,se(Pi),se(Ys)}var la=0,He=null,at=null,Mt=null,Ks=!1,Li=!1,Qa=!1,Xs=0,el=0,zi=null,SA=0;function kt(){throw Error(i(321))}function Wf(t,a){if(a===null)return!1;for(var o=0;o<a.length&&o<t.length;o++)if(!An(t[o],a[o]))return!1;return!0}function Jf(t,a,o,u,p,x){return la=x,He=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,z.H=t===null||t.memoizedState===null?Qy:Zy,Qa=!1,x=o(u,p),Qa=!1,Li&&(x=my(a,o,u,p)),py(t),x}function py(t){z.H=tu;var a=at!==null&&at.next!==null;if(la=0,Mt=at=He=null,Ks=!1,el=0,zi=null,a)throw Error(i(300));t===null||Ft||(t=t.dependencies,t!==null&&Fs(t)&&(Ft=!0))}function my(t,a,o,u){He=t;var p=0;do{if(Li&&(zi=null),el=0,Li=!1,25<=p)throw Error(i(301));if(p+=1,Mt=at=null,t.updateQueue!=null){var x=t.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}z.H=NA,x=a(o,u)}while(Li);return x}function EA(){var t=z.H,a=t.useState()[0];return a=typeof a.then=="function"?tl(a):a,t=t.useState()[0],(at!==null?at.memoizedState:null)!==t&&(He.flags|=1024),a}function ed(){var t=Xs!==0;return Xs=0,t}function td(t,a,o){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~o}function nd(t){if(Ks){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Ks=!1}la=0,Mt=at=He=null,Li=!1,el=Xs=0,zi=null}function mn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?He.memoizedState=Mt=t:Mt=Mt.next=t,Mt}function jt(){if(at===null){var t=He.alternate;t=t!==null?t.memoizedState:null}else t=at.next;var a=Mt===null?He.memoizedState:Mt.next;if(a!==null)Mt=a,at=t;else{if(t===null)throw He.alternate===null?Error(i(467)):Error(i(310));at=t,t={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Mt===null?He.memoizedState=Mt=t:Mt=Mt.next=t}return Mt}function rd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function tl(t){var a=el;return el+=1,zi===null&&(zi=[]),t=sy(zi,t,a),a=He,(Mt===null?a.memoizedState:Mt.next)===null&&(a=a.alternate,z.H=a===null||a.memoizedState===null?Qy:Zy),t}function Qs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return tl(t);if(t.$$typeof===N)return en(t)}throw Error(i(438,String(t)))}function ad(t){var a=null,o=He.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=He.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=rd(),He.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(t),u=0;u<t;u++)o[u]=D;return a.index++,o}function Br(t,a){return typeof a=="function"?a(t):a}function Zs(t){var a=jt();return id(a,at,t)}function id(t,a,o){var u=t.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=t.baseQueue,x=u.pending;if(x!==null){if(p!==null){var C=p.next;p.next=x.next,x.next=C}a.baseQueue=p=x,u.pending=null}if(x=t.baseState,p===null)t.memoizedState=x;else{a=p.next;var _=C=null,P=null,q=a,te=!1;do{var oe=q.lane&-536870913;if(oe!==q.lane?(Qe&oe)===oe:(la&oe)===oe){var K=q.revertLane;if(K===0)P!==null&&(P=P.next={lane:0,revertLane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),oe===Di&&(te=!0);else if((la&K)===K){q=q.next,K===Di&&(te=!0);continue}else oe={lane:0,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},P===null?(_=P=oe,C=x):P=P.next=oe,He.lanes|=K,pa|=K;oe=q.action,Qa&&o(x,oe),x=q.hasEagerState?q.eagerState:o(x,oe)}else K={lane:oe,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},P===null?(_=P=K,C=x):P=P.next=K,He.lanes|=oe,pa|=oe;q=q.next}while(q!==null&&q!==a);if(P===null?C=x:P.next=_,!An(x,t.memoizedState)&&(Ft=!0,te&&(o=Oi,o!==null)))throw o;t.memoizedState=x,t.baseState=C,t.baseQueue=P,u.lastRenderedState=x}return p===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function od(t){var a=jt(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var u=o.dispatch,p=o.pending,x=a.memoizedState;if(p!==null){o.pending=null;var C=p=p.next;do x=t(x,C.action),C=C.next;while(C!==p);An(x,a.memoizedState)||(Ft=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),o.lastRenderedState=x}return[x,u]}function gy(t,a,o){var u=He,p=jt(),x=tt;if(x){if(o===void 0)throw Error(i(407));o=o()}else o=a();var C=!An((at||p).memoizedState,o);C&&(p.memoizedState=o,Ft=!0),p=p.queue;var _=xy.bind(null,u,p,t);if(nl(2048,8,_,[t]),p.getSnapshot!==a||C||Mt!==null&&Mt.memoizedState.tag&1){if(u.flags|=2048,Ii(9,Ws(),vy.bind(null,u,p,o,a),null),ct===null)throw Error(i(349));x||(la&124)!==0||yy(u,a,o)}return o}function yy(t,a,o){t.flags|=16384,t={getSnapshot:a,value:o},a=He.updateQueue,a===null?(a=rd(),He.updateQueue=a,a.stores=[t]):(o=a.stores,o===null?a.stores=[t]:o.push(t))}function vy(t,a,o,u){a.value=o,a.getSnapshot=u,by(a)&&wy(t)}function xy(t,a,o){return o(function(){by(a)&&wy(t)})}function by(t){var a=t.getSnapshot;t=t.value;try{var o=a();return!An(t,o)}catch{return!0}}function wy(t){var a=Ni(t,2);a!==null&&jn(a,t,2)}function ld(t){var a=mn();if(typeof t=="function"){var o=t;if(t=o(),Qa){ke(!0);try{o()}finally{ke(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:t},a}function Sy(t,a,o,u){return t.baseState=o,id(t,at,typeof u=="function"?u:Br)}function CA(t,a,o,u,p){if(eu(t))throw Error(i(485));if(t=a.action,t!==null){var x={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};z.T!==null?o(!0):x.isTransition=!1,u(x),o=a.pending,o===null?(x.next=a.pending=x,Ey(a,x)):(x.next=o.next,a.pending=o.next=x)}}function Ey(t,a){var o=a.action,u=a.payload,p=t.state;if(a.isTransition){var x=z.T,C={};z.T=C;try{var _=o(p,u),P=z.S;P!==null&&P(C,_),Cy(t,a,_)}catch(q){sd(t,a,q)}finally{z.T=x}}else try{x=o(p,u),Cy(t,a,x)}catch(q){sd(t,a,q)}}function Cy(t,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){ky(t,a,u)},function(u){return sd(t,a,u)}):ky(t,a,o)}function ky(t,a,o){a.status="fulfilled",a.value=o,Ay(a),t.state=o,a=t.pending,a!==null&&(o=a.next,o===a?t.pending=null:(o=o.next,a.next=o,Ey(t,o)))}function sd(t,a,o){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,Ay(a),a=a.next;while(a!==u)}t.action=null}function Ay(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function Ty(t,a){return a}function Ry(t,a){if(tt){var o=ct.formState;if(o!==null){e:{var u=He;if(tt){if(wt){t:{for(var p=wt,x=gr;p.nodeType!==8;){if(!x){p=null;break t}if(p=ir(p.nextSibling),p===null){p=null;break t}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){wt=ir(p.nextSibling),u=p.data==="F!";break e}}Ga(u)}u=!1}u&&(a=o[0])}}return o=mn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ty,lastRenderedState:a},o.queue=u,o=Yy.bind(null,He,u),u.dispatch=o,u=ld(!1),x=hd.bind(null,He,!1,u.queue),u=mn(),p={state:a,dispatch:null,action:t,pending:null},u.queue=p,o=CA.bind(null,He,p,x,o),p.dispatch=o,u.memoizedState=t,[a,o,!1]}function Ny(t){var a=jt();return _y(a,at,t)}function _y(t,a,o){if(a=id(t,a,Ty)[0],t=Zs(Br)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=tl(a)}catch(C){throw C===Xo?$s:C}else u=a;a=jt();var p=a.queue,x=p.dispatch;return o!==a.memoizedState&&(He.flags|=2048,Ii(9,Ws(),kA.bind(null,p,o),null)),[u,x,t]}function kA(t,a){t.action=a}function My(t){var a=jt(),o=at;if(o!==null)return _y(a,o,t);jt(),a=a.memoizedState,o=jt();var u=o.queue.dispatch;return o.memoizedState=t,[a,u,!1]}function Ii(t,a,o,u){return t={tag:t,create:o,deps:u,inst:a,next:null},a=He.updateQueue,a===null&&(a=rd(),He.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=t.next=t:(u=o.next,o.next=t,t.next=u,a.lastEffect=t),t}function Ws(){return{destroy:void 0,resource:void 0}}function jy(){return jt().memoizedState}function Js(t,a,o,u){var p=mn();u=u===void 0?null:u,He.flags|=t,p.memoizedState=Ii(1|a,Ws(),o,u)}function nl(t,a,o,u){var p=jt();u=u===void 0?null:u;var x=p.memoizedState.inst;at!==null&&u!==null&&Wf(u,at.memoizedState.deps)?p.memoizedState=Ii(a,x,o,u):(He.flags|=t,p.memoizedState=Ii(1|a,x,o,u))}function Dy(t,a){Js(8390656,8,t,a)}function Oy(t,a){nl(2048,8,t,a)}function Py(t,a){return nl(4,2,t,a)}function Ly(t,a){return nl(4,4,t,a)}function zy(t,a){if(typeof a=="function"){t=t();var o=a(t);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function Iy(t,a,o){o=o!=null?o.concat([t]):null,nl(4,4,zy.bind(null,a,t),o)}function ud(){}function By(t,a){var o=jt();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&Wf(a,u[1])?u[0]:(o.memoizedState=[t,a],t)}function Uy(t,a){var o=jt();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&Wf(a,u[1]))return u[0];if(u=t(),Qa){ke(!0);try{t()}finally{ke(!1)}}return o.memoizedState=[u,a],u}function cd(t,a,o){return o===void 0||(la&1073741824)!==0?t.memoizedState=a:(t.memoizedState=o,t=Vv(),He.lanes|=t,pa|=t,o)}function Hy(t,a,o,u){return An(o,a)?o:Pi.current!==null?(t=cd(t,o,u),An(t,a)||(Ft=!0),t):(la&42)===0?(Ft=!0,t.memoizedState=o):(t=Vv(),He.lanes|=t,pa|=t,a)}function Fy(t,a,o,u,p){var x=Q.p;Q.p=x!==0&&8>x?x:8;var C=z.T,_={};z.T=_,hd(t,!1,a,o);try{var P=p(),q=z.S;if(q!==null&&q(_,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var te=wA(P,u);rl(t,a,te,Mn(t))}else rl(t,a,u,Mn(t))}catch(oe){rl(t,a,{then:function(){},status:"rejected",reason:oe},Mn())}finally{Q.p=x,z.T=C}}function AA(){}function fd(t,a,o,u){if(t.tag!==5)throw Error(i(476));var p=Vy(t).queue;Fy(t,p,a,B,o===null?AA:function(){return qy(t),o(u)})}function Vy(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:B},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function qy(t){var a=Vy(t).next.queue;rl(t,a,{},Mn())}function dd(){return en(wl)}function $y(){return jt().memoizedState}function Gy(){return jt().memoizedState}function TA(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=Mn();t=ia(o);var u=oa(a,t,o);u!==null&&(jn(u,a,o),Zo(u,a,o)),a={cache:Ff()},t.payload=a;return}a=a.return}}function RA(t,a,o){var u=Mn();o={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},eu(t)?Ky(a,o):(o=jf(t,a,o,u),o!==null&&(jn(o,t,u),Xy(o,a,u)))}function Yy(t,a,o){var u=Mn();rl(t,a,o,u)}function rl(t,a,o,u){var p={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(eu(t))Ky(a,p);else{var x=t.alternate;if(t.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var C=a.lastRenderedState,_=x(C,o);if(p.hasEagerState=!0,p.eagerState=_,An(_,C))return zs(t,a,p,0),ct===null&&Ls(),!1}catch{}finally{}if(o=jf(t,a,p,u),o!==null)return jn(o,t,u),Xy(o,a,u),!0}return!1}function hd(t,a,o,u){if(u={lane:2,revertLane:$d(),action:u,hasEagerState:!1,eagerState:null,next:null},eu(t)){if(a)throw Error(i(479))}else a=jf(t,o,u,2),a!==null&&jn(a,t,2)}function eu(t){var a=t.alternate;return t===He||a!==null&&a===He}function Ky(t,a){Li=Ks=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function Xy(t,a,o){if((o&4194048)!==0){var u=a.lanes;u&=t.pendingLanes,o|=u,a.lanes=o,Do(t,o)}}var tu={readContext:en,use:Qs,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt},Qy={readContext:en,use:Qs,useCallback:function(t,a){return mn().memoizedState=[t,a===void 0?null:a],t},useContext:en,useEffect:Dy,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,Js(4194308,4,zy.bind(null,a,t),o)},useLayoutEffect:function(t,a){return Js(4194308,4,t,a)},useInsertionEffect:function(t,a){Js(4,2,t,a)},useMemo:function(t,a){var o=mn();a=a===void 0?null:a;var u=t();if(Qa){ke(!0);try{t()}finally{ke(!1)}}return o.memoizedState=[u,a],u},useReducer:function(t,a,o){var u=mn();if(o!==void 0){var p=o(a);if(Qa){ke(!0);try{o(a)}finally{ke(!1)}}}else p=a;return u.memoizedState=u.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},u.queue=t,t=t.dispatch=RA.bind(null,He,t),[u.memoizedState,t]},useRef:function(t){var a=mn();return t={current:t},a.memoizedState=t},useState:function(t){t=ld(t);var a=t.queue,o=Yy.bind(null,He,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:ud,useDeferredValue:function(t,a){var o=mn();return cd(o,t,a)},useTransition:function(){var t=ld(!1);return t=Fy.bind(null,He,t.queue,!0,!1),mn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,o){var u=He,p=mn();if(tt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),ct===null)throw Error(i(349));(Qe&124)!==0||yy(u,a,o)}p.memoizedState=o;var x={value:o,getSnapshot:a};return p.queue=x,Dy(xy.bind(null,u,x,t),[t]),u.flags|=2048,Ii(9,Ws(),vy.bind(null,u,x,o,a),null),o},useId:function(){var t=mn(),a=ct.identifierPrefix;if(tt){var o=Lr,u=Pr;o=(u&~(1<<32-Ae(u)-1)).toString(32)+o,a="«"+a+"R"+o,o=Xs++,0<o&&(a+="H"+o.toString(32)),a+="»"}else o=SA++,a="«"+a+"r"+o.toString(32)+"»";return t.memoizedState=a},useHostTransitionStatus:dd,useFormState:Ry,useActionState:Ry,useOptimistic:function(t){var a=mn();a.memoizedState=a.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=hd.bind(null,He,!0,o),o.dispatch=a,[t,a]},useMemoCache:ad,useCacheRefresh:function(){return mn().memoizedState=TA.bind(null,He)}},Zy={readContext:en,use:Qs,useCallback:By,useContext:en,useEffect:Oy,useImperativeHandle:Iy,useInsertionEffect:Py,useLayoutEffect:Ly,useMemo:Uy,useReducer:Zs,useRef:jy,useState:function(){return Zs(Br)},useDebugValue:ud,useDeferredValue:function(t,a){var o=jt();return Hy(o,at.memoizedState,t,a)},useTransition:function(){var t=Zs(Br)[0],a=jt().memoizedState;return[typeof t=="boolean"?t:tl(t),a]},useSyncExternalStore:gy,useId:$y,useHostTransitionStatus:dd,useFormState:Ny,useActionState:Ny,useOptimistic:function(t,a){var o=jt();return Sy(o,at,t,a)},useMemoCache:ad,useCacheRefresh:Gy},NA={readContext:en,use:Qs,useCallback:By,useContext:en,useEffect:Oy,useImperativeHandle:Iy,useInsertionEffect:Py,useLayoutEffect:Ly,useMemo:Uy,useReducer:od,useRef:jy,useState:function(){return od(Br)},useDebugValue:ud,useDeferredValue:function(t,a){var o=jt();return at===null?cd(o,t,a):Hy(o,at.memoizedState,t,a)},useTransition:function(){var t=od(Br)[0],a=jt().memoizedState;return[typeof t=="boolean"?t:tl(t),a]},useSyncExternalStore:gy,useId:$y,useHostTransitionStatus:dd,useFormState:My,useActionState:My,useOptimistic:function(t,a){var o=jt();return at!==null?Sy(o,at,t,a):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:ad,useCacheRefresh:Gy},Bi=null,al=0;function nu(t){var a=al;return al+=1,Bi===null&&(Bi=[]),sy(Bi,t,a)}function il(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function ru(t,a){throw a.$$typeof===y?Error(i(525)):(t=Object.prototype.toString.call(a),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Wy(t){var a=t._init;return a(t._payload)}function Jy(t){function a(U,I){if(t){var V=U.deletions;V===null?(U.deletions=[I],U.flags|=16):V.push(I)}}function o(U,I){if(!t)return null;for(;I!==null;)a(U,I),I=I.sibling;return null}function u(U){for(var I=new Map;U!==null;)U.key!==null?I.set(U.key,U):I.set(U.index,U),U=U.sibling;return I}function p(U,I){return U=Or(U,I),U.index=0,U.sibling=null,U}function x(U,I,V){return U.index=V,t?(V=U.alternate,V!==null?(V=V.index,V<I?(U.flags|=67108866,I):V):(U.flags|=67108866,I)):(U.flags|=1048576,I)}function C(U){return t&&U.alternate===null&&(U.flags|=67108866),U}function _(U,I,V,re){return I===null||I.tag!==6?(I=Of(V,U.mode,re),I.return=U,I):(I=p(I,V),I.return=U,I)}function P(U,I,V,re){var xe=V.type;return xe===S?te(U,I,V.props.children,re,V.key):I!==null&&(I.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===$&&Wy(xe)===I.type)?(I=p(I,V.props),il(I,V),I.return=U,I):(I=Bs(V.type,V.key,V.props,null,U.mode,re),il(I,V),I.return=U,I)}function q(U,I,V,re){return I===null||I.tag!==4||I.stateNode.containerInfo!==V.containerInfo||I.stateNode.implementation!==V.implementation?(I=Pf(V,U.mode,re),I.return=U,I):(I=p(I,V.children||[]),I.return=U,I)}function te(U,I,V,re,xe){return I===null||I.tag!==7?(I=Fa(V,U.mode,re,xe),I.return=U,I):(I=p(I,V),I.return=U,I)}function oe(U,I,V){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=Of(""+I,U.mode,V),I.return=U,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case w:return V=Bs(I.type,I.key,I.props,null,U.mode,V),il(V,I),V.return=U,V;case b:return I=Pf(I,U.mode,V),I.return=U,I;case $:var re=I._init;return I=re(I._payload),oe(U,I,V)}if(ae(I)||J(I))return I=Fa(I,U.mode,V,null),I.return=U,I;if(typeof I.then=="function")return oe(U,nu(I),V);if(I.$$typeof===N)return oe(U,Vs(U,I),V);ru(U,I)}return null}function K(U,I,V,re){var xe=I!==null?I.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return xe!==null?null:_(U,I,""+V,re);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case w:return V.key===xe?P(U,I,V,re):null;case b:return V.key===xe?q(U,I,V,re):null;case $:return xe=V._init,V=xe(V._payload),K(U,I,V,re)}if(ae(V)||J(V))return xe!==null?null:te(U,I,V,re,null);if(typeof V.then=="function")return K(U,I,nu(V),re);if(V.$$typeof===N)return K(U,I,Vs(U,V),re);ru(U,V)}return null}function X(U,I,V,re,xe){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return U=U.get(V)||null,_(I,U,""+re,xe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return U=U.get(re.key===null?V:re.key)||null,P(I,U,re,xe);case b:return U=U.get(re.key===null?V:re.key)||null,q(I,U,re,xe);case $:var qe=re._init;return re=qe(re._payload),X(U,I,V,re,xe)}if(ae(re)||J(re))return U=U.get(V)||null,te(I,U,re,xe,null);if(typeof re.then=="function")return X(U,I,V,nu(re),xe);if(re.$$typeof===N)return X(U,I,V,Vs(I,re),xe);ru(I,re)}return null}function Me(U,I,V,re){for(var xe=null,qe=null,Ce=I,Ne=I=0,qt=null;Ce!==null&&Ne<V.length;Ne++){Ce.index>Ne?(qt=Ce,Ce=null):qt=Ce.sibling;var et=K(U,Ce,V[Ne],re);if(et===null){Ce===null&&(Ce=qt);break}t&&Ce&&et.alternate===null&&a(U,Ce),I=x(et,I,Ne),qe===null?xe=et:qe.sibling=et,qe=et,Ce=qt}if(Ne===V.length)return o(U,Ce),tt&&qa(U,Ne),xe;if(Ce===null){for(;Ne<V.length;Ne++)Ce=oe(U,V[Ne],re),Ce!==null&&(I=x(Ce,I,Ne),qe===null?xe=Ce:qe.sibling=Ce,qe=Ce);return tt&&qa(U,Ne),xe}for(Ce=u(Ce);Ne<V.length;Ne++)qt=X(Ce,U,Ne,V[Ne],re),qt!==null&&(t&&qt.alternate!==null&&Ce.delete(qt.key===null?Ne:qt.key),I=x(qt,I,Ne),qe===null?xe=qt:qe.sibling=qt,qe=qt);return t&&Ce.forEach(function(Ea){return a(U,Ea)}),tt&&qa(U,Ne),xe}function Re(U,I,V,re){if(V==null)throw Error(i(151));for(var xe=null,qe=null,Ce=I,Ne=I=0,qt=null,et=V.next();Ce!==null&&!et.done;Ne++,et=V.next()){Ce.index>Ne?(qt=Ce,Ce=null):qt=Ce.sibling;var Ea=K(U,Ce,et.value,re);if(Ea===null){Ce===null&&(Ce=qt);break}t&&Ce&&Ea.alternate===null&&a(U,Ce),I=x(Ea,I,Ne),qe===null?xe=Ea:qe.sibling=Ea,qe=Ea,Ce=qt}if(et.done)return o(U,Ce),tt&&qa(U,Ne),xe;if(Ce===null){for(;!et.done;Ne++,et=V.next())et=oe(U,et.value,re),et!==null&&(I=x(et,I,Ne),qe===null?xe=et:qe.sibling=et,qe=et);return tt&&qa(U,Ne),xe}for(Ce=u(Ce);!et.done;Ne++,et=V.next())et=X(Ce,U,Ne,et.value,re),et!==null&&(t&&et.alternate!==null&&Ce.delete(et.key===null?Ne:et.key),I=x(et,I,Ne),qe===null?xe=et:qe.sibling=et,qe=et);return t&&Ce.forEach(function(_T){return a(U,_T)}),tt&&qa(U,Ne),xe}function ot(U,I,V,re){if(typeof V=="object"&&V!==null&&V.type===S&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case w:e:{for(var xe=V.key;I!==null;){if(I.key===xe){if(xe=V.type,xe===S){if(I.tag===7){o(U,I.sibling),re=p(I,V.props.children),re.return=U,U=re;break e}}else if(I.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===$&&Wy(xe)===I.type){o(U,I.sibling),re=p(I,V.props),il(re,V),re.return=U,U=re;break e}o(U,I);break}else a(U,I);I=I.sibling}V.type===S?(re=Fa(V.props.children,U.mode,re,V.key),re.return=U,U=re):(re=Bs(V.type,V.key,V.props,null,U.mode,re),il(re,V),re.return=U,U=re)}return C(U);case b:e:{for(xe=V.key;I!==null;){if(I.key===xe)if(I.tag===4&&I.stateNode.containerInfo===V.containerInfo&&I.stateNode.implementation===V.implementation){o(U,I.sibling),re=p(I,V.children||[]),re.return=U,U=re;break e}else{o(U,I);break}else a(U,I);I=I.sibling}re=Pf(V,U.mode,re),re.return=U,U=re}return C(U);case $:return xe=V._init,V=xe(V._payload),ot(U,I,V,re)}if(ae(V))return Me(U,I,V,re);if(J(V)){if(xe=J(V),typeof xe!="function")throw Error(i(150));return V=xe.call(V),Re(U,I,V,re)}if(typeof V.then=="function")return ot(U,I,nu(V),re);if(V.$$typeof===N)return ot(U,I,Vs(U,V),re);ru(U,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,I!==null&&I.tag===6?(o(U,I.sibling),re=p(I,V),re.return=U,U=re):(o(U,I),re=Of(V,U.mode,re),re.return=U,U=re),C(U)):o(U,I)}return function(U,I,V,re){try{al=0;var xe=ot(U,I,V,re);return Bi=null,xe}catch(Ce){if(Ce===Xo||Ce===$s)throw Ce;var qe=Tn(29,Ce,null,U.mode);return qe.lanes=re,qe.return=U,qe}finally{}}}var Ui=Jy(!0),ev=Jy(!1),$n=W(null),yr=null;function sa(t){var a=t.alternate;M(Lt,Lt.current&1),M($n,t),yr===null&&(a===null||Pi.current!==null||a.memoizedState!==null)&&(yr=t)}function tv(t){if(t.tag===22){if(M(Lt,Lt.current),M($n,t),yr===null){var a=t.alternate;a!==null&&a.memoizedState!==null&&(yr=t)}}else ua()}function ua(){M(Lt,Lt.current),M($n,$n.current)}function Ur(t){se($n),yr===t&&(yr=null),se(Lt)}var Lt=W(0);function au(t){for(var a=t;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||rh(o)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function pd(t,a,o,u){a=t.memoizedState,o=o(u,a),o=o==null?a:m({},a,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var md={enqueueSetState:function(t,a,o){t=t._reactInternals;var u=Mn(),p=ia(u);p.payload=a,o!=null&&(p.callback=o),a=oa(t,p,u),a!==null&&(jn(a,t,u),Zo(a,t,u))},enqueueReplaceState:function(t,a,o){t=t._reactInternals;var u=Mn(),p=ia(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=oa(t,p,u),a!==null&&(jn(a,t,u),Zo(a,t,u))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var o=Mn(),u=ia(o);u.tag=2,a!=null&&(u.callback=a),a=oa(t,u,o),a!==null&&(jn(a,t,o),Zo(a,t,o))}};function nv(t,a,o,u,p,x,C){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,x,C):a.prototype&&a.prototype.isPureReactComponent?!Ho(o,u)||!Ho(p,x):!0}function rv(t,a,o,u){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==t&&md.enqueueReplaceState(a,a.state,null)}function Za(t,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(t=t.defaultProps){o===a&&(o=m({},o));for(var p in t)o[p]===void 0&&(o[p]=t[p])}return o}var iu=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function av(t){iu(t)}function iv(t){console.error(t)}function ov(t){iu(t)}function ou(t,a){try{var o=t.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function lv(t,a,o){try{var u=t.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function gd(t,a,o){return o=ia(o),o.tag=3,o.payload={element:null},o.callback=function(){ou(t,a)},o}function sv(t){return t=ia(t),t.tag=3,t}function uv(t,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var x=u.value;t.payload=function(){return p(x)},t.callback=function(){lv(a,o,u)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(t.callback=function(){lv(a,o,u),typeof p!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function _A(t,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&Go(a,o,p,!0),o=$n.current,o!==null){switch(o.tag){case 13:return yr===null?Ud():o.alternate===null&&St===0&&(St=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===$f?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Fd(t,u,p)),!1;case 22:return o.flags|=65536,u===$f?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Fd(t,u,p)),!1}throw Error(i(435,o.tag))}return Fd(t,u,p),Ud(),!1}if(tt)return a=$n.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==If&&(t=Error(i(422),{cause:u}),$o(Hn(t,o)))):(u!==If&&(a=Error(i(423),{cause:u}),$o(Hn(a,o))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,u=Hn(u,o),p=gd(t.stateNode,u,p),Kf(t,p),St!==4&&(St=2)),!1;var x=Error(i(520),{cause:u});if(x=Hn(x,o),dl===null?dl=[x]:dl.push(x),St!==4&&(St=2),a===null)return!0;u=Hn(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,t=p&-p,o.lanes|=t,t=gd(o.stateNode,u,t),Kf(o,t),!1;case 1:if(a=o.type,x=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ma===null||!ma.has(x))))return o.flags|=65536,p&=-p,o.lanes|=p,p=sv(p),uv(p,t,o,u),Kf(o,p),!1}o=o.return}while(o!==null);return!1}var cv=Error(i(461)),Ft=!1;function Kt(t,a,o,u){a.child=t===null?ev(a,null,o,u):Ui(a,t.child,o,u)}function fv(t,a,o,u,p){o=o.render;var x=a.ref;if("ref"in u){var C={};for(var _ in u)_!=="ref"&&(C[_]=u[_])}else C=u;return Ka(a),u=Jf(t,a,o,C,x,p),_=ed(),t!==null&&!Ft?(td(t,a,p),Hr(t,a,p)):(tt&&_&&Lf(a),a.flags|=1,Kt(t,a,u,p),a.child)}function dv(t,a,o,u,p){if(t===null){var x=o.type;return typeof x=="function"&&!Df(x)&&x.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=x,hv(t,a,x,u,p)):(t=Bs(o.type,null,u,a,a.mode,p),t.ref=a.ref,t.return=a,a.child=t)}if(x=t.child,!Cd(t,p)){var C=x.memoizedProps;if(o=o.compare,o=o!==null?o:Ho,o(C,u)&&t.ref===a.ref)return Hr(t,a,p)}return a.flags|=1,t=Or(x,u),t.ref=a.ref,t.return=a,a.child=t}function hv(t,a,o,u,p){if(t!==null){var x=t.memoizedProps;if(Ho(x,u)&&t.ref===a.ref)if(Ft=!1,a.pendingProps=u=x,Cd(t,p))(t.flags&131072)!==0&&(Ft=!0);else return a.lanes=t.lanes,Hr(t,a,p)}return yd(t,a,o,u,p)}function pv(t,a,o){var u=a.pendingProps,p=u.children,x=t!==null?t.memoizedState:null;if(u.mode==="hidden"){if((a.flags&128)!==0){if(u=x!==null?x.baseLanes|o:o,t!==null){for(p=a.child=t.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;a.childLanes=x&~u}else a.childLanes=0,a.child=null;return mv(t,a,u,o)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&qs(a,x!==null?x.cachePool:null),x!==null?hy(a,x):Qf(),tv(a);else return a.lanes=a.childLanes=536870912,mv(t,a,x!==null?x.baseLanes|o:o,o)}else x!==null?(qs(a,x.cachePool),hy(a,x),ua(),a.memoizedState=null):(t!==null&&qs(a,null),Qf(),ua());return Kt(t,a,p,o),a.child}function mv(t,a,o,u){var p=qf();return p=p===null?null:{parent:Pt._currentValue,pool:p},a.memoizedState={baseLanes:o,cachePool:p},t!==null&&qs(a,null),Qf(),tv(a),t!==null&&Go(t,a,u,!0),null}function lu(t,a){var o=a.ref;if(o===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(t===null||t.ref!==o)&&(a.flags|=4194816)}}function yd(t,a,o,u,p){return Ka(a),o=Jf(t,a,o,u,void 0,p),u=ed(),t!==null&&!Ft?(td(t,a,p),Hr(t,a,p)):(tt&&u&&Lf(a),a.flags|=1,Kt(t,a,o,p),a.child)}function gv(t,a,o,u,p,x){return Ka(a),a.updateQueue=null,o=my(a,u,o,p),py(t),u=ed(),t!==null&&!Ft?(td(t,a,x),Hr(t,a,x)):(tt&&u&&Lf(a),a.flags|=1,Kt(t,a,o,x),a.child)}function yv(t,a,o,u,p){if(Ka(a),a.stateNode===null){var x=_i,C=o.contextType;typeof C=="object"&&C!==null&&(x=en(C)),x=new o(u,x),a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=md,a.stateNode=x,x._reactInternals=a,x=a.stateNode,x.props=u,x.state=a.memoizedState,x.refs={},Gf(a),C=o.contextType,x.context=typeof C=="object"&&C!==null?en(C):_i,x.state=a.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(pd(a,o,C,u),x.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&md.enqueueReplaceState(x,x.state,null),Jo(a,u,x,p),Wo(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(t===null){x=a.stateNode;var _=a.memoizedProps,P=Za(o,_);x.props=P;var q=x.context,te=o.contextType;C=_i,typeof te=="object"&&te!==null&&(C=en(te));var oe=o.getDerivedStateFromProps;te=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function",_=a.pendingProps!==_,te||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(_||q!==C)&&rv(a,x,u,C),aa=!1;var K=a.memoizedState;x.state=K,Jo(a,u,x,p),Wo(),q=a.memoizedState,_||K!==q||aa?(typeof oe=="function"&&(pd(a,o,oe,u),q=a.memoizedState),(P=aa||nv(a,o,P,u,K,q,C))?(te||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(a.flags|=4194308)):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=q),x.props=u,x.state=q,x.context=C,u=P):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{x=a.stateNode,Yf(t,a),C=a.memoizedProps,te=Za(o,C),x.props=te,oe=a.pendingProps,K=x.context,q=o.contextType,P=_i,typeof q=="object"&&q!==null&&(P=en(q)),_=o.getDerivedStateFromProps,(q=typeof _=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==oe||K!==P)&&rv(a,x,u,P),aa=!1,K=a.memoizedState,x.state=K,Jo(a,u,x,p),Wo();var X=a.memoizedState;C!==oe||K!==X||aa||t!==null&&t.dependencies!==null&&Fs(t.dependencies)?(typeof _=="function"&&(pd(a,o,_,u),X=a.memoizedState),(te=aa||nv(a,o,te,u,K,X,P)||t!==null&&t.dependencies!==null&&Fs(t.dependencies))?(q||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(u,X,P),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(u,X,P)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=X),x.props=u,x.state=X,x.context=P,u=te):(typeof x.componentDidUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===t.memoizedProps&&K===t.memoizedState||(a.flags|=1024),u=!1)}return x=u,lu(t,a),u=(a.flags&128)!==0,x||u?(x=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:x.render(),a.flags|=1,t!==null&&u?(a.child=Ui(a,t.child,null,p),a.child=Ui(a,null,o,p)):Kt(t,a,o,p),a.memoizedState=x.state,t=a.child):t=Hr(t,a,p),t}function vv(t,a,o,u){return qo(),a.flags|=256,Kt(t,a,o,u),a.child}var vd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xd(t){return{baseLanes:t,cachePool:iy()}}function bd(t,a,o){return t=t!==null?t.childLanes&~o:0,a&&(t|=Gn),t}function xv(t,a,o){var u=a.pendingProps,p=!1,x=(a.flags&128)!==0,C;if((C=x)||(C=t!==null&&t.memoizedState===null?!1:(Lt.current&2)!==0),C&&(p=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,t===null){if(tt){if(p?sa(a):ua(),tt){var _=wt,P;if(P=_){e:{for(P=_,_=gr;P.nodeType!==8;){if(!_){_=null;break e}if(P=ir(P.nextSibling),P===null){_=null;break e}}_=P}_!==null?(a.memoizedState={dehydrated:_,treeContext:Va!==null?{id:Pr,overflow:Lr}:null,retryLane:536870912,hydrationErrors:null},P=Tn(18,null,null,0),P.stateNode=_,P.return=a,a.child=P,on=a,wt=null,P=!0):P=!1}P||Ga(a)}if(_=a.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return rh(_)?a.lanes=32:a.lanes=536870912,null;Ur(a)}return _=u.children,u=u.fallback,p?(ua(),p=a.mode,_=su({mode:"hidden",children:_},p),u=Fa(u,p,o,null),_.return=a,u.return=a,_.sibling=u,a.child=_,p=a.child,p.memoizedState=xd(o),p.childLanes=bd(t,C,o),a.memoizedState=vd,u):(sa(a),wd(a,_))}if(P=t.memoizedState,P!==null&&(_=P.dehydrated,_!==null)){if(x)a.flags&256?(sa(a),a.flags&=-257,a=Sd(t,a,o)):a.memoizedState!==null?(ua(),a.child=t.child,a.flags|=128,a=null):(ua(),p=u.fallback,_=a.mode,u=su({mode:"visible",children:u.children},_),p=Fa(p,_,o,null),p.flags|=2,u.return=a,p.return=a,u.sibling=p,a.child=u,Ui(a,t.child,null,o),u=a.child,u.memoizedState=xd(o),u.childLanes=bd(t,C,o),a.memoizedState=vd,a=p);else if(sa(a),rh(_)){if(C=_.nextSibling&&_.nextSibling.dataset,C)var q=C.dgst;C=q,u=Error(i(419)),u.stack="",u.digest=C,$o({value:u,source:null,stack:null}),a=Sd(t,a,o)}else if(Ft||Go(t,a,o,!1),C=(o&t.childLanes)!==0,Ft||C){if(C=ct,C!==null&&(u=o&-o,u=(u&42)!==0?1:pr(u),u=(u&(C.suspendedLanes|o))!==0?0:u,u!==0&&u!==P.retryLane))throw P.retryLane=u,Ni(t,u),jn(C,t,u),cv;_.data==="$?"||Ud(),a=Sd(t,a,o)}else _.data==="$?"?(a.flags|=192,a.child=t.child,a=null):(t=P.treeContext,wt=ir(_.nextSibling),on=a,tt=!0,$a=null,gr=!1,t!==null&&(Vn[qn++]=Pr,Vn[qn++]=Lr,Vn[qn++]=Va,Pr=t.id,Lr=t.overflow,Va=a),a=wd(a,u.children),a.flags|=4096);return a}return p?(ua(),p=u.fallback,_=a.mode,P=t.child,q=P.sibling,u=Or(P,{mode:"hidden",children:u.children}),u.subtreeFlags=P.subtreeFlags&65011712,q!==null?p=Or(q,p):(p=Fa(p,_,o,null),p.flags|=2),p.return=a,u.return=a,u.sibling=p,a.child=u,u=p,p=a.child,_=t.child.memoizedState,_===null?_=xd(o):(P=_.cachePool,P!==null?(q=Pt._currentValue,P=P.parent!==q?{parent:q,pool:q}:P):P=iy(),_={baseLanes:_.baseLanes|o,cachePool:P}),p.memoizedState=_,p.childLanes=bd(t,C,o),a.memoizedState=vd,u):(sa(a),o=t.child,t=o.sibling,o=Or(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,t!==null&&(C=a.deletions,C===null?(a.deletions=[t],a.flags|=16):C.push(t)),a.child=o,a.memoizedState=null,o)}function wd(t,a){return a=su({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function su(t,a){return t=Tn(22,t,null,a),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Sd(t,a,o){return Ui(a,t.child,null,o),t=wd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function bv(t,a,o){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a),Uf(t.return,a,o)}function Ed(t,a,o,u,p){var x=t.memoizedState;x===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=o,x.tailMode=p)}function wv(t,a,o){var u=a.pendingProps,p=u.revealOrder,x=u.tail;if(Kt(t,a,u.children,o),u=Lt.current,(u&2)!==0)u=u&1|2,a.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&bv(t,o,a);else if(t.tag===19)bv(t,o,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}switch(M(Lt,u),p){case"forwards":for(o=a.child,p=null;o!==null;)t=o.alternate,t!==null&&au(t)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Ed(a,!1,p,o,x);break;case"backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(t=p.alternate,t!==null&&au(t)===null){a.child=p;break}t=p.sibling,p.sibling=o,o=p,p=t}Ed(a,!0,o,null,x);break;case"together":Ed(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Hr(t,a,o){if(t!==null&&(a.dependencies=t.dependencies),pa|=a.lanes,(o&a.childLanes)===0)if(t!==null){if(Go(t,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(i(153));if(a.child!==null){for(t=a.child,o=Or(t,t.pendingProps),a.child=o,o.return=a;t.sibling!==null;)t=t.sibling,o=o.sibling=Or(t,t.pendingProps),o.return=a;o.sibling=null}return a.child}function Cd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Fs(t)))}function MA(t,a,o){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),ra(a,Pt,t.memoizedState.cache),qo();break;case 27:case 5:De(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:ra(a,a.type,a.memoizedProps.value);break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(sa(a),a.flags|=128,null):(o&a.child.childLanes)!==0?xv(t,a,o):(sa(a),t=Hr(t,a,o),t!==null?t.sibling:null);sa(a);break;case 19:var p=(t.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(Go(t,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return wv(t,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),M(Lt,Lt.current),u)break;return null;case 22:case 23:return a.lanes=0,pv(t,a,o);case 24:ra(a,Pt,t.memoizedState.cache)}return Hr(t,a,o)}function Sv(t,a,o){if(t!==null)if(t.memoizedProps!==a.pendingProps)Ft=!0;else{if(!Cd(t,o)&&(a.flags&128)===0)return Ft=!1,MA(t,a,o);Ft=(t.flags&131072)!==0}else Ft=!1,tt&&(a.flags&1048576)!==0&&Wg(a,Hs,a.index);switch(a.lanes=0,a.tag){case 16:e:{t=a.pendingProps;var u=a.elementType,p=u._init;if(u=p(u._payload),a.type=u,typeof u=="function")Df(u)?(t=Za(u,t),a.tag=1,a=yv(null,a,u,t,o)):(a.tag=0,a=yd(null,a,u,t,o));else{if(u!=null){if(p=u.$$typeof,p===O){a.tag=11,a=fv(null,a,u,t,o);break e}else if(p===H){a.tag=14,a=dv(null,a,u,t,o);break e}}throw a=G(u)||u,Error(i(306,a,""))}}return a;case 0:return yd(t,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Za(u,a.pendingProps),yv(t,a,u,p,o);case 3:e:{if(ve(a,a.stateNode.containerInfo),t===null)throw Error(i(387));u=a.pendingProps;var x=a.memoizedState;p=x.element,Yf(t,a),Jo(a,u,null,o);var C=a.memoizedState;if(u=C.cache,ra(a,Pt,u),u!==x.cache&&Hf(a,[Pt],o,!0),Wo(),u=C.element,x.isDehydrated)if(x={element:u,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){a=vv(t,a,u,o);break e}else if(u!==p){p=Hn(Error(i(424)),a),$o(p),a=vv(t,a,u,o);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(wt=ir(t.firstChild),on=a,tt=!0,$a=null,gr=!0,o=ev(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(qo(),u===p){a=Hr(t,a,o);break e}Kt(t,a,u,o)}a=a.child}return a;case 26:return lu(t,a),t===null?(o=Ax(a.type,null,a.pendingProps,null))?a.memoizedState=o:tt||(o=a.type,t=a.pendingProps,u=Su(pe.current).createElement(o),u[ge]=a,u[Se]=t,Qt(u,o,t),mt(u),a.stateNode=u):a.memoizedState=Ax(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return De(a),t===null&&tt&&(u=a.stateNode=Ex(a.type,a.pendingProps,pe.current),on=a,gr=!0,p=wt,va(a.type)?(ah=p,wt=ir(u.firstChild)):wt=p),Kt(t,a,a.pendingProps.children,o),lu(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&tt&&((p=u=wt)&&(u=iT(u,a.type,a.pendingProps,gr),u!==null?(a.stateNode=u,on=a,wt=ir(u.firstChild),gr=!1,p=!0):p=!1),p||Ga(a)),De(a),p=a.type,x=a.pendingProps,C=t!==null?t.memoizedProps:null,u=x.children,eh(p,x)?u=null:C!==null&&eh(p,C)&&(a.flags|=32),a.memoizedState!==null&&(p=Jf(t,a,EA,null,null,o),wl._currentValue=p),lu(t,a),Kt(t,a,u,o),a.child;case 6:return t===null&&tt&&((t=o=wt)&&(o=oT(o,a.pendingProps,gr),o!==null?(a.stateNode=o,on=a,wt=null,t=!0):t=!1),t||Ga(a)),null;case 13:return xv(t,a,o);case 4:return ve(a,a.stateNode.containerInfo),u=a.pendingProps,t===null?a.child=Ui(a,null,u,o):Kt(t,a,u,o),a.child;case 11:return fv(t,a,a.type,a.pendingProps,o);case 7:return Kt(t,a,a.pendingProps,o),a.child;case 8:return Kt(t,a,a.pendingProps.children,o),a.child;case 12:return Kt(t,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,ra(a,a.type,u.value),Kt(t,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Ka(a),p=en(p),u=u(p),a.flags|=1,Kt(t,a,u,o),a.child;case 14:return dv(t,a,a.type,a.pendingProps,o);case 15:return hv(t,a,a.type,a.pendingProps,o);case 19:return wv(t,a,o);case 31:return u=a.pendingProps,o=a.mode,u={mode:u.mode,children:u.children},t===null?(o=su(u,o),o.ref=a.ref,a.child=o,o.return=a,a=o):(o=Or(t.child,u),o.ref=a.ref,a.child=o,o.return=a,a=o),a;case 22:return pv(t,a,o);case 24:return Ka(a),u=en(Pt),t===null?(p=qf(),p===null&&(p=ct,x=Ff(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=o),p=x),a.memoizedState={parent:u,cache:p},Gf(a),ra(a,Pt,p)):((t.lanes&o)!==0&&(Yf(t,a),Jo(a,null,null,o),Wo()),p=t.memoizedState,x=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),ra(a,Pt,u)):(u=x.cache,ra(a,Pt,u),u!==p.cache&&Hf(a,[Pt],o,!0))),Kt(t,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Fr(t){t.flags|=4}function Ev(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Mx(a)){if(a=$n.current,a!==null&&((Qe&4194048)===Qe?yr!==null:(Qe&62914560)!==Qe&&(Qe&536870912)===0||a!==yr))throw Qo=$f,oy;t.flags|=8192}}function uu(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?Cs():536870912,t.lanes|=a,qi|=a)}function ol(t,a){if(!tt)switch(t.tailMode){case"hidden":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function yt(t){var a=t.alternate!==null&&t.alternate.child===t.child,o=0,u=0;if(a)for(var p=t.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=o,a}function jA(t,a,o){var u=a.pendingProps;switch(zf(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(a),null;case 1:return yt(a),null;case 3:return o=a.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Ir(Pt),Ve(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(Vo(a)?Fr(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ty())),yt(a),null;case 26:return o=a.memoizedState,t===null?(Fr(a),o!==null?(yt(a),Ev(a,o)):(yt(a),a.flags&=-16777217)):o?o!==t.memoizedState?(Fr(a),yt(a),Ev(a,o)):(yt(a),a.flags&=-16777217):(t.memoizedProps!==u&&Fr(a),yt(a),a.flags&=-16777217),null;case 27:Be(a),o=pe.current;var p=a.type;if(t!==null&&a.stateNode!=null)t.memoizedProps!==u&&Fr(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return yt(a),null}t=ce.current,Vo(a)?Jg(a):(t=Ex(p,u,o),a.stateNode=t,Fr(a))}return yt(a),null;case 5:if(Be(a),o=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==u&&Fr(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return yt(a),null}if(t=ce.current,Vo(a))Jg(a);else{switch(p=Su(pe.current),t){case 1:t=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:t=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":t=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":t=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":t=p.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof u.is=="string"?p.createElement("select",{is:u.is}):p.createElement("select"),u.multiple?t.multiple=!0:u.size&&(t.size=u.size);break;default:t=typeof u.is=="string"?p.createElement(o,{is:u.is}):p.createElement(o)}}t[ge]=a,t[Se]=u;e:for(p=a.child;p!==null;){if(p.tag===5||p.tag===6)t.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===a)break e;for(;p.sibling===null;){if(p.return===null||p.return===a)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}a.stateNode=t;e:switch(Qt(t,o,u),o){case"button":case"input":case"select":case"textarea":t=!!u.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&Fr(a)}}return yt(a),a.flags&=-16777217,null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==u&&Fr(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(t=pe.current,Vo(a)){if(t=a.stateNode,o=a.memoizedProps,u=null,p=on,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}t[ge]=a,t=!!(t.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||gx(t.nodeValue,o)),t||Ga(a)}else t=Su(t).createTextNode(u),t[ge]=a,a.stateNode=t}return yt(a),null;case 13:if(u=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=Vo(a),u!==null&&u.dehydrated!==null){if(t===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[ge]=a}else qo(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;yt(a),p=!1}else p=ty(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Ur(a),a):(Ur(a),null)}if(Ur(a),(a.flags&128)!==0)return a.lanes=o,a;if(o=u!==null,t=t!==null&&t.memoizedState!==null,o){u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool);var x=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(x=u.memoizedState.cachePool.pool),x!==p&&(u.flags|=2048)}return o!==t&&o&&(a.child.flags|=8192),uu(a,a.updateQueue),yt(a),null;case 4:return Ve(),t===null&&Xd(a.stateNode.containerInfo),yt(a),null;case 10:return Ir(a.type),yt(a),null;case 19:if(se(Lt),p=a.memoizedState,p===null)return yt(a),null;if(u=(a.flags&128)!==0,x=p.rendering,x===null)if(u)ol(p,!1);else{if(St!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(x=au(t),x!==null){for(a.flags|=128,ol(p,!1),t=x.updateQueue,a.updateQueue=t,uu(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)Zg(o,t),o=o.sibling;return M(Lt,Lt.current&1|2),a.child}t=t.sibling}p.tail!==null&&Rt()>du&&(a.flags|=128,u=!0,ol(p,!1),a.lanes=4194304)}else{if(!u)if(t=au(x),t!==null){if(a.flags|=128,u=!0,t=t.updateQueue,a.updateQueue=t,uu(a,t),ol(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!tt)return yt(a),null}else 2*Rt()-p.renderingStartTime>du&&o!==536870912&&(a.flags|=128,u=!0,ol(p,!1),a.lanes=4194304);p.isBackwards?(x.sibling=a.child,a.child=x):(t=p.last,t!==null?t.sibling=x:a.child=x,p.last=x)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=Rt(),a.sibling=null,t=Lt.current,M(Lt,u?t&1|2:t&1),a):(yt(a),null);case 22:case 23:return Ur(a),Zf(),u=a.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(yt(a),a.subtreeFlags&6&&(a.flags|=8192)):yt(a),o=a.updateQueue,o!==null&&uu(a,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),t!==null&&se(Xa),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Ir(Pt),yt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function DA(t,a){switch(zf(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return Ir(Pt),Ve(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Be(a),null;case 13:if(Ur(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(i(340));qo()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return se(Lt),null;case 4:return Ve(),null;case 10:return Ir(a.type),null;case 22:case 23:return Ur(a),Zf(),t!==null&&se(Xa),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return Ir(Pt),null;case 25:return null;default:return null}}function Cv(t,a){switch(zf(a),a.tag){case 3:Ir(Pt),Ve();break;case 26:case 27:case 5:Be(a);break;case 4:Ve();break;case 13:Ur(a);break;case 19:se(Lt);break;case 10:Ir(a.type);break;case 22:case 23:Ur(a),Zf(),t!==null&&se(Xa);break;case 24:Ir(Pt)}}function ll(t,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&t)===t){u=void 0;var x=o.create,C=o.inst;u=x(),C.destroy=u}o=o.next}while(o!==p)}}catch(_){st(a,a.return,_)}}function ca(t,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var x=p.next;u=x;do{if((u.tag&t)===t){var C=u.inst,_=C.destroy;if(_!==void 0){C.destroy=void 0,p=a;var P=o,q=_;try{q()}catch(te){st(p,P,te)}}}u=u.next}while(u!==x)}}catch(te){st(a,a.return,te)}}function kv(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{dy(a,o)}catch(u){st(t,t.return,u)}}}function Av(t,a,o){o.props=Za(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(u){st(t,a,u)}}function sl(t,a){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof o=="function"?t.refCleanup=o(u):o.current=u}}catch(p){st(t,a,p)}}function vr(t,a){var o=t.ref,u=t.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){st(t,a,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){st(t,a,p)}else o.current=null}function Tv(t){var a=t.type,o=t.memoizedProps,u=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){st(t,t.return,p)}}function kd(t,a,o){try{var u=t.stateNode;eT(u,t.type,o,a),u[Se]=a}catch(p){st(t,t.return,p)}}function Rv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&va(t.type)||t.tag===4}function Ad(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Rv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&va(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Td(t,a,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(t),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=wu));else if(u!==4&&(u===27&&va(t.type)&&(o=t.stateNode,a=null),t=t.child,t!==null))for(Td(t,a,o),t=t.sibling;t!==null;)Td(t,a,o),t=t.sibling}function cu(t,a,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,a?o.insertBefore(t,a):o.appendChild(t);else if(u!==4&&(u===27&&va(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(cu(t,a,o),t=t.sibling;t!==null;)cu(t,a,o),t=t.sibling}function Nv(t){var a=t.stateNode,o=t.memoizedProps;try{for(var u=t.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Qt(a,u,o),a[ge]=t,a[Se]=o}catch(x){st(t,t.return,x)}}var Vr=!1,At=!1,Rd=!1,_v=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function OA(t,a){if(t=t.containerInfo,Wd=Ru,t=Hg(t),Af(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,x=u.focusNode;u=u.focusOffset;try{o.nodeType,x.nodeType}catch{o=null;break e}var C=0,_=-1,P=-1,q=0,te=0,oe=t,K=null;t:for(;;){for(var X;oe!==o||p!==0&&oe.nodeType!==3||(_=C+p),oe!==x||u!==0&&oe.nodeType!==3||(P=C+u),oe.nodeType===3&&(C+=oe.nodeValue.length),(X=oe.firstChild)!==null;)K=oe,oe=X;for(;;){if(oe===t)break t;if(K===o&&++q===p&&(_=C),K===x&&++te===u&&(P=C),(X=oe.nextSibling)!==null)break;oe=K,K=oe.parentNode}oe=X}o=_===-1||P===-1?null:{start:_,end:P}}else o=null}o=o||{start:0,end:0}}else o=null;for(Jd={focusedElem:t,selectionRange:o},Ru=!1,Vt=a;Vt!==null;)if(a=Vt,t=a.child,(a.subtreeFlags&1024)!==0&&t!==null)t.return=a,Vt=t;else for(;Vt!==null;){switch(a=Vt,x=a.alternate,t=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&x!==null){t=void 0,o=a,p=x.memoizedProps,x=x.memoizedState,u=o.stateNode;try{var Me=Za(o.type,p,o.elementType===o.type);t=u.getSnapshotBeforeUpdate(Me,x),u.__reactInternalSnapshotBeforeUpdate=t}catch(Re){st(o,o.return,Re)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,o=t.nodeType,o===9)nh(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":nh(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=a.sibling,t!==null){t.return=a.return,Vt=t;break}Vt=a.return}}function Mv(t,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:fa(t,o),u&4&&ll(5,o);break;case 1:if(fa(t,o),u&4)if(t=o.stateNode,a===null)try{t.componentDidMount()}catch(C){st(o,o.return,C)}else{var p=Za(o.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(p,a,t.__reactInternalSnapshotBeforeUpdate)}catch(C){st(o,o.return,C)}}u&64&&kv(o),u&512&&sl(o,o.return);break;case 3:if(fa(t,o),u&64&&(t=o.updateQueue,t!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{dy(t,a)}catch(C){st(o,o.return,C)}}break;case 27:a===null&&u&4&&Nv(o);case 26:case 5:fa(t,o),a===null&&u&4&&Tv(o),u&512&&sl(o,o.return);break;case 12:fa(t,o);break;case 13:fa(t,o),u&4&&Ov(t,o),u&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=VA.bind(null,o),lT(t,o))));break;case 22:if(u=o.memoizedState!==null||Vr,!u){a=a!==null&&a.memoizedState!==null||At,p=Vr;var x=At;Vr=u,(At=a)&&!x?da(t,o,(o.subtreeFlags&8772)!==0):fa(t,o),Vr=p,At=x}break;case 30:break;default:fa(t,o)}}function jv(t){var a=t.alternate;a!==null&&(t.alternate=null,jv(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&hn(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var dt=null,gn=!1;function qr(t,a,o){for(o=o.child;o!==null;)Dv(t,a,o),o=o.sibling}function Dv(t,a,o){if(de&&typeof de.onCommitFiberUnmount=="function")try{de.onCommitFiberUnmount(ee,o)}catch{}switch(o.tag){case 26:At||vr(o,a),qr(t,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:At||vr(o,a);var u=dt,p=gn;va(o.type)&&(dt=o.stateNode,gn=!1),qr(t,a,o),yl(o.stateNode),dt=u,gn=p;break;case 5:At||vr(o,a);case 6:if(u=dt,p=gn,dt=null,qr(t,a,o),dt=u,gn=p,dt!==null)if(gn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(o.stateNode)}catch(x){st(o,a,x)}else try{dt.removeChild(o.stateNode)}catch(x){st(o,a,x)}break;case 18:dt!==null&&(gn?(t=dt,wx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),kl(t)):wx(dt,o.stateNode));break;case 4:u=dt,p=gn,dt=o.stateNode.containerInfo,gn=!0,qr(t,a,o),dt=u,gn=p;break;case 0:case 11:case 14:case 15:At||ca(2,o,a),At||ca(4,o,a),qr(t,a,o);break;case 1:At||(vr(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&Av(o,a,u)),qr(t,a,o);break;case 21:qr(t,a,o);break;case 22:At=(u=At)||o.memoizedState!==null,qr(t,a,o),At=u;break;default:qr(t,a,o)}}function Ov(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{kl(t)}catch(o){st(a,a.return,o)}}function PA(t){switch(t.tag){case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new _v),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new _v),a;default:throw Error(i(435,t.tag))}}function Nd(t,a){var o=PA(t);a.forEach(function(u){var p=qA.bind(null,t,u);o.has(u)||(o.add(u),u.then(p,p))})}function Rn(t,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],x=t,C=a,_=C;e:for(;_!==null;){switch(_.tag){case 27:if(va(_.type)){dt=_.stateNode,gn=!1;break e}break;case 5:dt=_.stateNode,gn=!1;break e;case 3:case 4:dt=_.stateNode.containerInfo,gn=!0;break e}_=_.return}if(dt===null)throw Error(i(160));Dv(x,C,p),dt=null,gn=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)Pv(a,t),a=a.sibling}var ar=null;function Pv(t,a){var o=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Rn(a,t),Nn(t),u&4&&(ca(3,t,t.return),ll(3,t),ca(5,t,t.return));break;case 1:Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),u&64&&Vr&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=ar;if(Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),u&4){var x=o!==null?o.memoizedState:null;if(u=t.memoizedState,o===null)if(u===null)if(t.stateNode===null){e:{u=t.type,o=t.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":x=p.getElementsByTagName("title")[0],(!x||x[an]||x[ge]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(u),p.head.insertBefore(x,p.querySelector("head > title"))),Qt(x,u,o),x[ge]=t,mt(x),u=x;break e;case"link":var C=Nx("link","href",p).get(u+(o.href||""));if(C){for(var _=0;_<C.length;_++)if(x=C[_],x.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&x.getAttribute("rel")===(o.rel==null?null:o.rel)&&x.getAttribute("title")===(o.title==null?null:o.title)&&x.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){C.splice(_,1);break t}}x=p.createElement(u),Qt(x,u,o),p.head.appendChild(x);break;case"meta":if(C=Nx("meta","content",p).get(u+(o.content||""))){for(_=0;_<C.length;_++)if(x=C[_],x.getAttribute("content")===(o.content==null?null:""+o.content)&&x.getAttribute("name")===(o.name==null?null:o.name)&&x.getAttribute("property")===(o.property==null?null:o.property)&&x.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&x.getAttribute("charset")===(o.charSet==null?null:o.charSet)){C.splice(_,1);break t}}x=p.createElement(u),Qt(x,u,o),p.head.appendChild(x);break;default:throw Error(i(468,u))}x[ge]=t,mt(x),u=x}t.stateNode=u}else _x(p,t.type,t.stateNode);else t.stateNode=Rx(p,u,t.memoizedProps);else x!==u?(x===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):x.count--,u===null?_x(p,t.type,t.stateNode):Rx(p,u,t.memoizedProps)):u===null&&t.stateNode!==null&&kd(t,t.memoizedProps,o.memoizedProps)}break;case 27:Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),o!==null&&u&4&&kd(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Rn(a,t),Nn(t),u&512&&(At||o===null||vr(o,o.return)),t.flags&32){p=t.stateNode;try{Si(p,"")}catch(X){st(t,t.return,X)}}u&4&&t.stateNode!=null&&(p=t.memoizedProps,kd(t,p,o!==null?o.memoizedProps:p)),u&1024&&(Rd=!0);break;case 6:if(Rn(a,t),Nn(t),u&4){if(t.stateNode===null)throw Error(i(162));u=t.memoizedProps,o=t.stateNode;try{o.nodeValue=u}catch(X){st(t,t.return,X)}}break;case 3:if(ku=null,p=ar,ar=Eu(a.containerInfo),Rn(a,t),ar=p,Nn(t),u&4&&o!==null&&o.memoizedState.isDehydrated)try{kl(a.containerInfo)}catch(X){st(t,t.return,X)}Rd&&(Rd=!1,Lv(t));break;case 4:u=ar,ar=Eu(t.stateNode.containerInfo),Rn(a,t),Nn(t),ar=u;break;case 12:Rn(a,t),Nn(t);break;case 13:Rn(a,t),Nn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Pd=Rt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Nd(t,u)));break;case 22:p=t.memoizedState!==null;var P=o!==null&&o.memoizedState!==null,q=Vr,te=At;if(Vr=q||p,At=te||P,Rn(a,t),At=te,Vr=q,Nn(t),u&8192)e:for(a=t.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||P||Vr||At||Wa(t)),o=null,a=t;;){if(a.tag===5||a.tag===26){if(o===null){P=o=a;try{if(x=P.stateNode,p)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{_=P.stateNode;var oe=P.memoizedProps.style,K=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;_.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(X){st(P,P.return,X)}}}else if(a.tag===6){if(o===null){P=a;try{P.stateNode.nodeValue=p?"":P.memoizedProps}catch(X){st(P,P.return,X)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=t.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Nd(t,o))));break;case 19:Rn(a,t),Nn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Nd(t,u)));break;case 30:break;case 21:break;default:Rn(a,t),Nn(t)}}function Nn(t){var a=t.flags;if(a&2){try{for(var o,u=t.return;u!==null;){if(Rv(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,x=Ad(t);cu(t,x,p);break;case 5:var C=o.stateNode;o.flags&32&&(Si(C,""),o.flags&=-33);var _=Ad(t);cu(t,_,C);break;case 3:case 4:var P=o.stateNode.containerInfo,q=Ad(t);Td(t,q,P);break;default:throw Error(i(161))}}catch(te){st(t,t.return,te)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Lv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Lv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function fa(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Mv(t,a.alternate,a),a=a.sibling}function Wa(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:ca(4,a,a.return),Wa(a);break;case 1:vr(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Av(a,a.return,o),Wa(a);break;case 27:yl(a.stateNode);case 26:case 5:vr(a,a.return),Wa(a);break;case 22:a.memoizedState===null&&Wa(a);break;case 30:Wa(a);break;default:Wa(a)}t=t.sibling}}function da(t,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=t,x=a,C=x.flags;switch(x.tag){case 0:case 11:case 15:da(p,x,o),ll(4,x);break;case 1:if(da(p,x,o),u=x,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(q){st(u,u.return,q)}if(u=x,p=u.updateQueue,p!==null){var _=u.stateNode;try{var P=p.shared.hiddenCallbacks;if(P!==null)for(p.shared.hiddenCallbacks=null,p=0;p<P.length;p++)fy(P[p],_)}catch(q){st(u,u.return,q)}}o&&C&64&&kv(x),sl(x,x.return);break;case 27:Nv(x);case 26:case 5:da(p,x,o),o&&u===null&&C&4&&Tv(x),sl(x,x.return);break;case 12:da(p,x,o);break;case 13:da(p,x,o),o&&C&4&&Ov(p,x);break;case 22:x.memoizedState===null&&da(p,x,o),sl(x,x.return);break;case 30:break;default:da(p,x,o)}a=a.sibling}}function _d(t,a){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Yo(o))}function Md(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Yo(t))}function xr(t,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)zv(t,a,o,u),a=a.sibling}function zv(t,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:xr(t,a,o,u),p&2048&&ll(9,a);break;case 1:xr(t,a,o,u);break;case 3:xr(t,a,o,u),p&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Yo(t)));break;case 12:if(p&2048){xr(t,a,o,u),t=a.stateNode;try{var x=a.memoizedProps,C=x.id,_=x.onPostCommit;typeof _=="function"&&_(C,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(P){st(a,a.return,P)}}else xr(t,a,o,u);break;case 13:xr(t,a,o,u);break;case 23:break;case 22:x=a.stateNode,C=a.alternate,a.memoizedState!==null?x._visibility&2?xr(t,a,o,u):ul(t,a):x._visibility&2?xr(t,a,o,u):(x._visibility|=2,Hi(t,a,o,u,(a.subtreeFlags&10256)!==0)),p&2048&&_d(C,a);break;case 24:xr(t,a,o,u),p&2048&&Md(a.alternate,a);break;default:xr(t,a,o,u)}}function Hi(t,a,o,u,p){for(p=p&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var x=t,C=a,_=o,P=u,q=C.flags;switch(C.tag){case 0:case 11:case 15:Hi(x,C,_,P,p),ll(8,C);break;case 23:break;case 22:var te=C.stateNode;C.memoizedState!==null?te._visibility&2?Hi(x,C,_,P,p):ul(x,C):(te._visibility|=2,Hi(x,C,_,P,p)),p&&q&2048&&_d(C.alternate,C);break;case 24:Hi(x,C,_,P,p),p&&q&2048&&Md(C.alternate,C);break;default:Hi(x,C,_,P,p)}a=a.sibling}}function ul(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=t,u=a,p=u.flags;switch(u.tag){case 22:ul(o,u),p&2048&&_d(u.alternate,u);break;case 24:ul(o,u),p&2048&&Md(u.alternate,u);break;default:ul(o,u)}a=a.sibling}}var cl=8192;function Fi(t){if(t.subtreeFlags&cl)for(t=t.child;t!==null;)Iv(t),t=t.sibling}function Iv(t){switch(t.tag){case 26:Fi(t),t.flags&cl&&t.memoizedState!==null&&bT(ar,t.memoizedState,t.memoizedProps);break;case 5:Fi(t);break;case 3:case 4:var a=ar;ar=Eu(t.stateNode.containerInfo),Fi(t),ar=a;break;case 22:t.memoizedState===null&&(a=t.alternate,a!==null&&a.memoizedState!==null?(a=cl,cl=16777216,Fi(t),cl=a):Fi(t));break;default:Fi(t)}}function Bv(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function fl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];Vt=u,Hv(u,t)}Bv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Uv(t),t=t.sibling}function Uv(t){switch(t.tag){case 0:case 11:case 15:fl(t),t.flags&2048&&ca(9,t,t.return);break;case 3:fl(t);break;case 12:fl(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,fu(t)):fl(t);break;default:fl(t)}}function fu(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];Vt=u,Hv(u,t)}Bv(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:ca(8,a,a.return),fu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,fu(a));break;default:fu(a)}t=t.sibling}}function Hv(t,a){for(;Vt!==null;){var o=Vt;switch(o.tag){case 0:case 11:case 15:ca(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Yo(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,Vt=u;else e:for(o=t;Vt!==null;){u=Vt;var p=u.sibling,x=u.return;if(jv(u),u===o){Vt=null;break e}if(p!==null){p.return=x,Vt=p;break e}Vt=x}}}var LA={getCacheForType:function(t){var a=en(Pt),o=a.data.get(t);return o===void 0&&(o=t(),a.data.set(t,o)),o}},zA=typeof WeakMap=="function"?WeakMap:Map,nt=0,ct=null,$e=null,Qe=0,rt=0,_n=null,ha=!1,Vi=!1,jd=!1,$r=0,St=0,pa=0,Ja=0,Dd=0,Gn=0,qi=0,dl=null,yn=null,Od=!1,Pd=0,du=1/0,hu=null,ma=null,Xt=0,ga=null,$i=null,Gi=0,Ld=0,zd=null,Fv=null,hl=0,Id=null;function Mn(){if((nt&2)!==0&&Qe!==0)return Qe&-Qe;if(z.T!==null){var t=Di;return t!==0?t:$d()}return F()}function Vv(){Gn===0&&(Gn=(Qe&536870912)===0||tt?Es():536870912);var t=$n.current;return t!==null&&(t.flags|=32),Gn}function jn(t,a,o){(t===ct&&(rt===2||rt===9)||t.cancelPendingCommit!==null)&&(Yi(t,0),ya(t,Qe,Gn,!1)),La(t,o),((nt&2)===0||t!==ct)&&(t===ct&&((nt&2)===0&&(Ja|=o),St===4&&ya(t,Qe,Gn,!1)),br(t))}function qv(t,a,o){if((nt&6)!==0)throw Error(i(327));var u=!o&&(a&124)===0&&(a&t.expiredLanes)===0||dn(t,a),p=u?UA(t,a):Hd(t,a,!0),x=u;do{if(p===0){Vi&&!u&&ya(t,a,0,!1);break}else{if(o=t.current.alternate,x&&!IA(o)){p=Hd(t,a,!1),x=!1;continue}if(p===2){if(x=a,t.errorRecoveryDisabledLanes&x)var C=0;else C=t.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){a=C;e:{var _=t;p=dl;var P=_.current.memoizedState.isDehydrated;if(P&&(Yi(_,C).flags|=256),C=Hd(_,C,!1),C!==2){if(jd&&!P){_.errorRecoveryDisabledLanes|=x,Ja|=x,p=4;break e}x=yn,yn=p,x!==null&&(yn===null?yn=x:yn.push.apply(yn,x))}p=C}if(x=!1,p!==2)continue}}if(p===1){Yi(t,0),ya(t,a,0,!0);break}e:{switch(u=t,x=p,x){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ya(u,a,Gn,!ha);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Pd+300-Rt(),10<p)){if(ya(u,a,Gn,!ha),Nt(u,0,!0)!==0)break e;u.timeoutHandle=xx($v.bind(null,u,o,yn,hu,Od,a,Gn,Ja,qi,ha,x,2,-0,0),p);break e}$v(u,o,yn,hu,Od,a,Gn,Ja,qi,ha,x,0,-0,0)}}break}while(!0);br(t)}function $v(t,a,o,u,p,x,C,_,P,q,te,oe,K,X){if(t.timeoutHandle=-1,oe=a.subtreeFlags,(oe&8192||(oe&16785408)===16785408)&&(bl={stylesheets:null,count:0,unsuspend:xT},Iv(a),oe=wT(),oe!==null)){t.cancelPendingCommit=oe(Wv.bind(null,t,a,x,o,u,p,C,_,P,te,1,K,X)),ya(t,x,C,!q);return}Wv(t,a,x,o,u,p,C,_,P)}function IA(t){for(var a=t;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],x=p.getSnapshot;p=p.value;try{if(!An(x(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ya(t,a,o,u){a&=~Dd,a&=~Ja,t.suspendedLanes|=a,t.pingedLanes&=~a,u&&(t.warmLanes|=a),u=t.expirationTimes;for(var p=a;0<p;){var x=31-Ae(p),C=1<<x;u[x]=-1,p&=~C}o!==0&&xi(t,o,a)}function pu(){return(nt&6)===0?(pl(0),!1):!0}function Bd(){if($e!==null){if(rt===0)var t=$e.return;else t=$e,zr=Ya=null,nd(t),Bi=null,al=0,t=$e;for(;t!==null;)Cv(t.alternate,t),t=t.return;$e=null}}function Yi(t,a){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,nT(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),Bd(),ct=t,$e=o=Or(t.current,null),Qe=a,rt=0,_n=null,ha=!1,Vi=dn(t,a),jd=!1,qi=Gn=Dd=Ja=pa=St=0,yn=dl=null,Od=!1,(a&8)!==0&&(a|=a&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=a;0<u;){var p=31-Ae(u),x=1<<p;a|=t[p],u&=~x}return $r=a,Ls(),o}function Gv(t,a){He=null,z.H=tu,a===Xo||a===$s?(a=uy(),rt=3):a===oy?(a=uy(),rt=4):rt=a===cv?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,_n=a,$e===null&&(St=1,ou(t,Hn(a,t.current)))}function Yv(){var t=z.H;return z.H=tu,t===null?tu:t}function Kv(){var t=z.A;return z.A=LA,t}function Ud(){St=4,ha||(Qe&4194048)!==Qe&&$n.current!==null||(Vi=!0),(pa&134217727)===0&&(Ja&134217727)===0||ct===null||ya(ct,Qe,Gn,!1)}function Hd(t,a,o){var u=nt;nt|=2;var p=Yv(),x=Kv();(ct!==t||Qe!==a)&&(hu=null,Yi(t,a)),a=!1;var C=St;e:do try{if(rt!==0&&$e!==null){var _=$e,P=_n;switch(rt){case 8:Bd(),C=6;break e;case 3:case 2:case 9:case 6:$n.current===null&&(a=!0);var q=rt;if(rt=0,_n=null,Ki(t,_,P,q),o&&Vi){C=0;break e}break;default:q=rt,rt=0,_n=null,Ki(t,_,P,q)}}BA(),C=St;break}catch(te){Gv(t,te)}while(!0);return a&&t.shellSuspendCounter++,zr=Ya=null,nt=u,z.H=p,z.A=x,$e===null&&(ct=null,Qe=0,Ls()),C}function BA(){for(;$e!==null;)Xv($e)}function UA(t,a){var o=nt;nt|=2;var u=Yv(),p=Kv();ct!==t||Qe!==a?(hu=null,du=Rt()+500,Yi(t,a)):Vi=dn(t,a);e:do try{if(rt!==0&&$e!==null){a=$e;var x=_n;t:switch(rt){case 1:rt=0,_n=null,Ki(t,a,x,1);break;case 2:case 9:if(ly(x)){rt=0,_n=null,Qv(a);break}a=function(){rt!==2&&rt!==9||ct!==t||(rt=7),br(t)},x.then(a,a);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:ly(x)?(rt=0,_n=null,Qv(a)):(rt=0,_n=null,Ki(t,a,x,7));break;case 5:var C=null;switch($e.tag){case 26:C=$e.memoizedState;case 5:case 27:var _=$e;if(!C||Mx(C)){rt=0,_n=null;var P=_.sibling;if(P!==null)$e=P;else{var q=_.return;q!==null?($e=q,mu(q)):$e=null}break t}}rt=0,_n=null,Ki(t,a,x,5);break;case 6:rt=0,_n=null,Ki(t,a,x,6);break;case 8:Bd(),St=6;break e;default:throw Error(i(462))}}HA();break}catch(te){Gv(t,te)}while(!0);return zr=Ya=null,z.H=u,z.A=p,nt=o,$e!==null?0:(ct=null,Qe=0,Ls(),St)}function HA(){for(;$e!==null&&!zn();)Xv($e)}function Xv(t){var a=Sv(t.alternate,t,$r);t.memoizedProps=t.pendingProps,a===null?mu(t):$e=a}function Qv(t){var a=t,o=a.alternate;switch(a.tag){case 15:case 0:a=gv(o,a,a.pendingProps,a.type,void 0,Qe);break;case 11:a=gv(o,a,a.pendingProps,a.type.render,a.ref,Qe);break;case 5:nd(a);default:Cv(o,a),a=$e=Zg(a,$r),a=Sv(o,a,$r)}t.memoizedProps=t.pendingProps,a===null?mu(t):$e=a}function Ki(t,a,o,u){zr=Ya=null,nd(a),Bi=null,al=0;var p=a.return;try{if(_A(t,p,a,o,Qe)){St=1,ou(t,Hn(o,t.current)),$e=null;return}}catch(x){if(p!==null)throw $e=p,x;St=1,ou(t,Hn(o,t.current)),$e=null;return}a.flags&32768?(tt||u===1?t=!0:Vi||(Qe&536870912)!==0?t=!1:(ha=t=!0,(u===2||u===9||u===3||u===6)&&(u=$n.current,u!==null&&u.tag===13&&(u.flags|=16384))),Zv(a,t)):mu(a)}function mu(t){var a=t;do{if((a.flags&32768)!==0){Zv(a,ha);return}t=a.return;var o=jA(a.alternate,a,$r);if(o!==null){$e=o;return}if(a=a.sibling,a!==null){$e=a;return}$e=a=t}while(a!==null);St===0&&(St=5)}function Zv(t,a){do{var o=DA(t.alternate,t);if(o!==null){o.flags&=32767,$e=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(t=t.sibling,t!==null)){$e=t;return}$e=t=o}while(t!==null);St=6,$e=null}function Wv(t,a,o,u,p,x,C,_,P){t.cancelPendingCommit=null;do gu();while(Xt!==0);if((nt&6)!==0)throw Error(i(327));if(a!==null){if(a===t.current)throw Error(i(177));if(x=a.lanes|a.childLanes,x|=Mf,ks(t,o,x,C,_,P),t===ct&&($e=ct=null,Qe=0),$i=a,ga=t,Gi=o,Ld=x,zd=p,Fv=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,$A(hr,function(){return rx(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=z.T,z.T=null,p=Q.p,Q.p=2,C=nt,nt|=4;try{OA(t,a,o)}finally{nt=C,Q.p=p,z.T=u}}Xt=1,Jv(),ex(),tx()}}function Jv(){if(Xt===1){Xt=0;var t=ga,a=$i,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=z.T,z.T=null;var u=Q.p;Q.p=2;var p=nt;nt|=4;try{Pv(a,t);var x=Jd,C=Hg(t.containerInfo),_=x.focusedElem,P=x.selectionRange;if(C!==_&&_&&_.ownerDocument&&Ug(_.ownerDocument.documentElement,_)){if(P!==null&&Af(_)){var q=P.start,te=P.end;if(te===void 0&&(te=q),"selectionStart"in _)_.selectionStart=q,_.selectionEnd=Math.min(te,_.value.length);else{var oe=_.ownerDocument||document,K=oe&&oe.defaultView||window;if(K.getSelection){var X=K.getSelection(),Me=_.textContent.length,Re=Math.min(P.start,Me),ot=P.end===void 0?Re:Math.min(P.end,Me);!X.extend&&Re>ot&&(C=ot,ot=Re,Re=C);var U=Bg(_,Re),I=Bg(_,ot);if(U&&I&&(X.rangeCount!==1||X.anchorNode!==U.node||X.anchorOffset!==U.offset||X.focusNode!==I.node||X.focusOffset!==I.offset)){var V=oe.createRange();V.setStart(U.node,U.offset),X.removeAllRanges(),Re>ot?(X.addRange(V),X.extend(I.node,I.offset)):(V.setEnd(I.node,I.offset),X.addRange(V))}}}}for(oe=[],X=_;X=X.parentNode;)X.nodeType===1&&oe.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<oe.length;_++){var re=oe[_];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Ru=!!Wd,Jd=Wd=null}finally{nt=p,Q.p=u,z.T=o}}t.current=a,Xt=2}}function ex(){if(Xt===2){Xt=0;var t=ga,a=$i,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=z.T,z.T=null;var u=Q.p;Q.p=2;var p=nt;nt|=4;try{Mv(t,a.alternate,a)}finally{nt=p,Q.p=u,z.T=o}}Xt=3}}function tx(){if(Xt===4||Xt===3){Xt=0,tr();var t=ga,a=$i,o=Gi,u=Fv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Xt=5:(Xt=0,$i=ga=null,nx(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(ma=null),za(o),a=a.stateNode,de&&typeof de.onCommitFiberRoot=="function")try{de.onCommitFiberRoot(ee,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=z.T,p=Q.p,Q.p=2,z.T=null;try{for(var x=t.onRecoverableError,C=0;C<u.length;C++){var _=u[C];x(_.value,{componentStack:_.stack})}}finally{z.T=a,Q.p=p}}(Gi&3)!==0&&gu(),br(t),p=t.pendingLanes,(o&4194090)!==0&&(p&42)!==0?t===Id?hl++:(hl=0,Id=t):hl=0,pl(0)}}function nx(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,Yo(a)))}function gu(t){return Jv(),ex(),tx(),rx()}function rx(){if(Xt!==5)return!1;var t=ga,a=Ld;Ld=0;var o=za(Gi),u=z.T,p=Q.p;try{Q.p=32>o?32:o,z.T=null,o=zd,zd=null;var x=ga,C=Gi;if(Xt=0,$i=ga=null,Gi=0,(nt&6)!==0)throw Error(i(331));var _=nt;if(nt|=4,Uv(x.current),zv(x,x.current,C,o),nt=_,pl(0,!1),de&&typeof de.onPostCommitFiberRoot=="function")try{de.onPostCommitFiberRoot(ee,x)}catch{}return!0}finally{Q.p=p,z.T=u,nx(t,a)}}function ax(t,a,o){a=Hn(o,a),a=gd(t.stateNode,a,2),t=oa(t,a,2),t!==null&&(La(t,2),br(t))}function st(t,a,o){if(t.tag===3)ax(t,t,o);else for(;a!==null;){if(a.tag===3){ax(a,t,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ma===null||!ma.has(u))){t=Hn(o,t),o=sv(2),u=oa(a,o,2),u!==null&&(uv(o,u,a,t),La(u,2),br(u));break}}a=a.return}}function Fd(t,a,o){var u=t.pingCache;if(u===null){u=t.pingCache=new zA;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||(jd=!0,p.add(o),t=FA.bind(null,t,a,o),a.then(t,t))}function FA(t,a,o){var u=t.pingCache;u!==null&&u.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,ct===t&&(Qe&o)===o&&(St===4||St===3&&(Qe&62914560)===Qe&&300>Rt()-Pd?(nt&2)===0&&Yi(t,0):Dd|=o,qi===Qe&&(qi=0)),br(t)}function ix(t,a){a===0&&(a=Cs()),t=Ni(t,a),t!==null&&(La(t,a),br(t))}function VA(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),ix(t,o)}function qA(t,a){var o=0;switch(t.tag){case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),ix(t,o)}function $A(t,a){return Ke(t,a)}var yu=null,Xi=null,Vd=!1,vu=!1,qd=!1,ei=0;function br(t){t!==Xi&&t.next===null&&(Xi===null?yu=Xi=t:Xi=Xi.next=t),vu=!0,Vd||(Vd=!0,YA())}function pl(t,a){if(!qd&&vu){qd=!0;do for(var o=!1,u=yu;u!==null;){if(t!==0){var p=u.pendingLanes;if(p===0)var x=0;else{var C=u.suspendedLanes,_=u.pingedLanes;x=(1<<31-Ae(42|t)+1)-1,x&=p&~(C&~_),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(o=!0,ux(u,x))}else x=Qe,x=Nt(u,u===ct?x:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(x&3)===0||dn(u,x)||(o=!0,ux(u,x));u=u.next}while(o);qd=!1}}function GA(){ox()}function ox(){vu=Vd=!1;var t=0;ei!==0&&(tT()&&(t=ei),ei=0);for(var a=Rt(),o=null,u=yu;u!==null;){var p=u.next,x=lx(u,a);x===0?(u.next=null,o===null?yu=p:o.next=p,p===null&&(Xi=o)):(o=u,(t!==0||(x&3)!==0)&&(vu=!0)),u=p}pl(t)}function lx(t,a){for(var o=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,x=t.pendingLanes&-62914561;0<x;){var C=31-Ae(x),_=1<<C,P=p[C];P===-1?((_&o)===0||(_&u)!==0)&&(p[C]=En(_,a)):P<=a&&(t.expiredLanes|=_),x&=~_}if(a=ct,o=Qe,o=Nt(t,t===a?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,o===0||t===a&&(rt===2||rt===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&xt(u),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||dn(t,o)){if(a=o&-o,a===t.callbackPriority)return a;switch(u!==null&&xt(u),za(o)){case 2:case 8:o=wn;break;case 32:o=hr;break;case 268435456:o=Sn;break;default:o=hr}return u=sx.bind(null,t),o=Ke(o,u),t.callbackPriority=a,t.callbackNode=o,a}return u!==null&&u!==null&&xt(u),t.callbackPriority=2,t.callbackNode=null,2}function sx(t,a){if(Xt!==0&&Xt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(gu()&&t.callbackNode!==o)return null;var u=Qe;return u=Nt(t,t===ct?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(qv(t,u,a),lx(t,Rt()),t.callbackNode!=null&&t.callbackNode===o?sx.bind(null,t):null)}function ux(t,a){if(gu())return null;qv(t,a,!0)}function YA(){rT(function(){(nt&6)!==0?Ke(bn,GA):ox()})}function $d(){return ei===0&&(ei=Es()),ei}function cx(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ns(""+t)}function fx(t,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,t.id&&o.setAttribute("form",t.id),a.parentNode.insertBefore(o,a),t=new FormData(t),o.parentNode.removeChild(o),t}function KA(t,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var x=cx((p[Se]||null).action),C=u.submitter;C&&(a=(a=C[Se]||null)?cx(a.formAction):C.getAttribute("formAction"),a!==null&&(x=a,C=null));var _=new Ds("action","action",null,u,p);t.push({event:_,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ei!==0){var P=C?fx(p,C):new FormData(p);fd(o,{pending:!0,data:P,method:p.method,action:x},null,P)}}else typeof x=="function"&&(_.preventDefault(),P=C?fx(p,C):new FormData(p),fd(o,{pending:!0,data:P,method:p.method,action:x},x,P))},currentTarget:p}]})}}for(var Gd=0;Gd<_f.length;Gd++){var Yd=_f[Gd],XA=Yd.toLowerCase(),QA=Yd[0].toUpperCase()+Yd.slice(1);rr(XA,"on"+QA)}rr(qg,"onAnimationEnd"),rr($g,"onAnimationIteration"),rr(Gg,"onAnimationStart"),rr("dblclick","onDoubleClick"),rr("focusin","onFocus"),rr("focusout","onBlur"),rr(hA,"onTransitionRun"),rr(pA,"onTransitionStart"),rr(mA,"onTransitionCancel"),rr(Yg,"onTransitionEnd"),Ut("onMouseEnter",["mouseout","mouseover"]),Ut("onMouseLeave",["mouseout","mouseover"]),Ut("onPointerEnter",["pointerout","pointerover"]),Ut("onPointerLeave",["pointerout","pointerover"]),Ot("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ot("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ot("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ot("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ZA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function dx(t,a){a=(a&4)!==0;for(var o=0;o<t.length;o++){var u=t[o],p=u.event;u=u.listeners;e:{var x=void 0;if(a)for(var C=u.length-1;0<=C;C--){var _=u[C],P=_.instance,q=_.currentTarget;if(_=_.listener,P!==x&&p.isPropagationStopped())break e;x=_,p.currentTarget=q;try{x(p)}catch(te){iu(te)}p.currentTarget=null,x=P}else for(C=0;C<u.length;C++){if(_=u[C],P=_.instance,q=_.currentTarget,_=_.listener,P!==x&&p.isPropagationStopped())break e;x=_,p.currentTarget=q;try{x(p)}catch(te){iu(te)}p.currentTarget=null,x=P}}}}function Ge(t,a){var o=a[It];o===void 0&&(o=a[It]=new Set);var u=t+"__bubble";o.has(u)||(hx(a,t,2,!1),o.add(u))}function Kd(t,a,o){var u=0;a&&(u|=4),hx(o,t,u,a)}var xu="_reactListening"+Math.random().toString(36).slice(2);function Xd(t){if(!t[xu]){t[xu]=!0,bi.forEach(function(o){o!=="selectionchange"&&(ZA.has(o)||Kd(o,!1,t),Kd(o,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[xu]||(a[xu]=!0,Kd("selectionchange",!1,a))}}function hx(t,a,o,u){switch(zx(a)){case 2:var p=CT;break;case 8:p=kT;break;default:p=uh}o=p.bind(null,a,o,t),p=void 0,!yf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(a,o,{capture:!0,passive:p}):t.addEventListener(a,o,!0):p!==void 0?t.addEventListener(a,o,{passive:p}):t.addEventListener(a,o,!1)}function Qd(t,a,o,u,p){var x=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var C=u.tag;if(C===3||C===4){var _=u.stateNode.containerInfo;if(_===p)break;if(C===4)for(C=u.return;C!==null;){var P=C.tag;if((P===3||P===4)&&C.stateNode.containerInfo===p)return;C=C.return}for(;_!==null;){if(C=lt(_),C===null)return;if(P=C.tag,P===5||P===6||P===26||P===27){u=x=C;continue e}_=_.parentNode}}u=u.return}bg(function(){var q=x,te=mf(o),oe=[];e:{var K=Kg.get(t);if(K!==void 0){var X=Ds,Me=t;switch(t){case"keypress":if(Ms(o)===0)break e;case"keydown":case"keyup":X=$2;break;case"focusin":Me="focus",X=wf;break;case"focusout":Me="blur",X=wf;break;case"beforeblur":case"afterblur":X=wf;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Eg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=D2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=K2;break;case qg:case $g:case Gg:X=L2;break;case Yg:X=Q2;break;case"scroll":case"scrollend":X=M2;break;case"wheel":X=W2;break;case"copy":case"cut":case"paste":X=I2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=kg;break;case"toggle":case"beforetoggle":X=eA}var Re=(a&4)!==0,ot=!Re&&(t==="scroll"||t==="scrollend"),U=Re?K!==null?K+"Capture":null:K;Re=[];for(var I=q,V;I!==null;){var re=I;if(V=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||V===null||U===null||(re=Oo(I,U),re!=null&&Re.push(gl(I,re,V))),ot)break;I=I.return}0<Re.length&&(K=new X(K,Me,null,o,te),oe.push({event:K,listeners:Re}))}}if((a&7)===0){e:{if(K=t==="mouseover"||t==="pointerover",X=t==="mouseout"||t==="pointerout",K&&o!==pf&&(Me=o.relatedTarget||o.fromElement)&&(lt(Me)||Me[Ue]))break e;if((X||K)&&(K=te.window===te?te:(K=te.ownerDocument)?K.defaultView||K.parentWindow:window,X?(Me=o.relatedTarget||o.toElement,X=q,Me=Me?lt(Me):null,Me!==null&&(ot=s(Me),Re=Me.tag,Me!==ot||Re!==5&&Re!==27&&Re!==6)&&(Me=null)):(X=null,Me=q),X!==Me)){if(Re=Eg,re="onMouseLeave",U="onMouseEnter",I="mouse",(t==="pointerout"||t==="pointerover")&&(Re=kg,re="onPointerLeave",U="onPointerEnter",I="pointer"),ot=X==null?K:Bt(X),V=Me==null?K:Bt(Me),K=new Re(re,I+"leave",X,o,te),K.target=ot,K.relatedTarget=V,re=null,lt(te)===q&&(Re=new Re(U,I+"enter",Me,o,te),Re.target=V,Re.relatedTarget=ot,re=Re),ot=re,X&&Me)t:{for(Re=X,U=Me,I=0,V=Re;V;V=Qi(V))I++;for(V=0,re=U;re;re=Qi(re))V++;for(;0<I-V;)Re=Qi(Re),I--;for(;0<V-I;)U=Qi(U),V--;for(;I--;){if(Re===U||U!==null&&Re===U.alternate)break t;Re=Qi(Re),U=Qi(U)}Re=null}else Re=null;X!==null&&px(oe,K,X,Re,!1),Me!==null&&ot!==null&&px(oe,ot,Me,Re,!0)}}e:{if(K=q?Bt(q):window,X=K.nodeName&&K.nodeName.toLowerCase(),X==="select"||X==="input"&&K.type==="file")var xe=Dg;else if(Mg(K))if(Og)xe=cA;else{xe=sA;var qe=lA}else X=K.nodeName,!X||X.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?q&&hf(q.elementType)&&(xe=Dg):xe=uA;if(xe&&(xe=xe(t,q))){jg(oe,xe,o,te);break e}qe&&qe(t,K,q),t==="focusout"&&q&&K.type==="number"&&q.memoizedProps.value!=null&&df(K,"number",K.value)}switch(qe=q?Bt(q):window,t){case"focusin":(Mg(qe)||qe.contentEditable==="true")&&(Ai=qe,Tf=q,Fo=null);break;case"focusout":Fo=Tf=Ai=null;break;case"mousedown":Rf=!0;break;case"contextmenu":case"mouseup":case"dragend":Rf=!1,Fg(oe,o,te);break;case"selectionchange":if(dA)break;case"keydown":case"keyup":Fg(oe,o,te)}var Ce;if(Ef)e:{switch(t){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else ki?Ng(t,o)&&(Ne="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(Ne="onCompositionStart");Ne&&(Ag&&o.locale!=="ko"&&(ki||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&ki&&(Ce=wg()):(na=te,vf="value"in na?na.value:na.textContent,ki=!0)),qe=bu(q,Ne),0<qe.length&&(Ne=new Cg(Ne,t,null,o,te),oe.push({event:Ne,listeners:qe}),Ce?Ne.data=Ce:(Ce=_g(o),Ce!==null&&(Ne.data=Ce)))),(Ce=nA?rA(t,o):aA(t,o))&&(Ne=bu(q,"onBeforeInput"),0<Ne.length&&(qe=new Cg("onBeforeInput","beforeinput",null,o,te),oe.push({event:qe,listeners:Ne}),qe.data=Ce)),KA(oe,t,q,o,te)}dx(oe,a)})}function gl(t,a,o){return{instance:t,listener:a,currentTarget:o}}function bu(t,a){for(var o=a+"Capture",u=[];t!==null;){var p=t,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=Oo(t,o),p!=null&&u.unshift(gl(t,p,x)),p=Oo(t,a),p!=null&&u.push(gl(t,p,x))),t.tag===3)return u;t=t.return}return[]}function Qi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function px(t,a,o,u,p){for(var x=a._reactName,C=[];o!==null&&o!==u;){var _=o,P=_.alternate,q=_.stateNode;if(_=_.tag,P!==null&&P===u)break;_!==5&&_!==26&&_!==27||q===null||(P=q,p?(q=Oo(o,x),q!=null&&C.unshift(gl(o,q,P))):p||(q=Oo(o,x),q!=null&&C.push(gl(o,q,P)))),o=o.return}C.length!==0&&t.push({event:a,listeners:C})}var WA=/\r\n?/g,JA=/\u0000|\uFFFD/g;function mx(t){return(typeof t=="string"?t:""+t).replace(WA,`
50
+ `).replace(JA,"")}function gx(t,a){return a=mx(a),mx(t)===a}function wu(){}function it(t,a,o,u,p,x){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Si(t,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Si(t,""+u);break;case"className":nr(t,"class",u);break;case"tabIndex":nr(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":nr(t,o,u);break;case"style":vg(t,u,x);break;case"data":if(a!=="object"){nr(t,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=Ns(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(o==="formAction"?(a!=="input"&&it(t,a,"name",p.name,p,null),it(t,a,"formEncType",p.formEncType,p,null),it(t,a,"formMethod",p.formMethod,p,null),it(t,a,"formTarget",p.formTarget,p,null)):(it(t,a,"encType",p.encType,p,null),it(t,a,"method",p.method,p,null),it(t,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=Ns(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=wu);break;case"onScroll":u!=null&&Ge("scroll",t);break;case"onScrollEnd":u!=null&&Ge("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=Ns(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":Ge("beforetoggle",t),Ge("toggle",t),bt(t,"popover",u);break;case"xlinkActuate":Cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Cn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Cn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Cn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Cn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":bt(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=N2.get(o)||o,bt(t,o,u))}}function Zd(t,a,o,u,p,x){switch(o){case"style":vg(t,u,x);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"children":typeof u=="string"?Si(t,u):(typeof u=="number"||typeof u=="bigint")&&Si(t,""+u);break;case"onScroll":u!=null&&Ge("scroll",t);break;case"onScrollEnd":u!=null&&Ge("scrollend",t);break;case"onClick":u!=null&&(t.onclick=wu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!As.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),x=t[Se]||null,x=x!=null?x[o]:null,typeof x=="function"&&t.removeEventListener(a,x,p),typeof u=="function")){typeof x!="function"&&x!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(a,u,p);break e}o in t?t[o]=u:u===!0?t.setAttribute(o,""):bt(t,o,u)}}}function Qt(t,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",t),Ge("load",t);var u=!1,p=!1,x;for(x in o)if(o.hasOwnProperty(x)){var C=o[x];if(C!=null)switch(x){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(t,a,x,C,o,null)}}p&&it(t,a,"srcSet",o.srcSet,o,null),u&&it(t,a,"src",o.src,o,null);return;case"input":Ge("invalid",t);var _=x=C=p=null,P=null,q=null;for(u in o)if(o.hasOwnProperty(u)){var te=o[u];if(te!=null)switch(u){case"name":p=te;break;case"type":C=te;break;case"checked":P=te;break;case"defaultChecked":q=te;break;case"value":x=te;break;case"defaultValue":_=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,a));break;default:it(t,a,u,te,o,null)}}pg(t,x,_,P,q,C,p,!1),Ts(t);return;case"select":Ge("invalid",t),u=C=x=null;for(p in o)if(o.hasOwnProperty(p)&&(_=o[p],_!=null))switch(p){case"value":x=_;break;case"defaultValue":C=_;break;case"multiple":u=_;default:it(t,a,p,_,o,null)}a=x,o=C,t.multiple=!!u,a!=null?wi(t,!!u,a,!1):o!=null&&wi(t,!!u,o,!0);return;case"textarea":Ge("invalid",t),x=p=u=null;for(C in o)if(o.hasOwnProperty(C)&&(_=o[C],_!=null))switch(C){case"value":u=_;break;case"defaultValue":p=_;break;case"children":x=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:it(t,a,C,_,o,null)}gg(t,u,p,x),Ts(t);return;case"option":for(P in o)if(o.hasOwnProperty(P)&&(u=o[P],u!=null))switch(P){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:it(t,a,P,u,o,null)}return;case"dialog":Ge("beforetoggle",t),Ge("toggle",t),Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":Ge("load",t);break;case"video":case"audio":for(u=0;u<ml.length;u++)Ge(ml[u],t);break;case"image":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"embed":case"source":case"link":Ge("error",t),Ge("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in o)if(o.hasOwnProperty(q)&&(u=o[q],u!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(t,a,q,u,o,null)}return;default:if(hf(a)){for(te in o)o.hasOwnProperty(te)&&(u=o[te],u!==void 0&&Zd(t,a,te,u,o,void 0));return}}for(_ in o)o.hasOwnProperty(_)&&(u=o[_],u!=null&&it(t,a,_,u,o,null))}function eT(t,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,C=null,_=null,P=null,q=null,te=null;for(X in o){var oe=o[X];if(o.hasOwnProperty(X)&&oe!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":P=oe;default:u.hasOwnProperty(X)||it(t,a,X,null,u,oe)}}for(var K in u){var X=u[K];if(oe=o[K],u.hasOwnProperty(K)&&(X!=null||oe!=null))switch(K){case"type":x=X;break;case"name":p=X;break;case"checked":q=X;break;case"defaultChecked":te=X;break;case"value":C=X;break;case"defaultValue":_=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,a));break;default:X!==oe&&it(t,a,K,X,u,oe)}}ff(t,C,_,P,q,te,x,p);return;case"select":X=C=_=K=null;for(x in o)if(P=o[x],o.hasOwnProperty(x)&&P!=null)switch(x){case"value":break;case"multiple":X=P;default:u.hasOwnProperty(x)||it(t,a,x,null,u,P)}for(p in u)if(x=u[p],P=o[p],u.hasOwnProperty(p)&&(x!=null||P!=null))switch(p){case"value":K=x;break;case"defaultValue":_=x;break;case"multiple":C=x;default:x!==P&&it(t,a,p,x,u,P)}a=_,o=C,u=X,K!=null?wi(t,!!o,K,!1):!!u!=!!o&&(a!=null?wi(t,!!o,a,!0):wi(t,!!o,o?[]:"",!1));return;case"textarea":X=K=null;for(_ in o)if(p=o[_],o.hasOwnProperty(_)&&p!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:it(t,a,_,null,u,p)}for(C in u)if(p=u[C],x=o[C],u.hasOwnProperty(C)&&(p!=null||x!=null))switch(C){case"value":K=p;break;case"defaultValue":X=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==x&&it(t,a,C,p,u,x)}mg(t,K,X);return;case"option":for(var Me in o)if(K=o[Me],o.hasOwnProperty(Me)&&K!=null&&!u.hasOwnProperty(Me))switch(Me){case"selected":t.selected=!1;break;default:it(t,a,Me,null,u,K)}for(P in u)if(K=u[P],X=o[P],u.hasOwnProperty(P)&&K!==X&&(K!=null||X!=null))switch(P){case"selected":t.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:it(t,a,P,K,u,X)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in o)K=o[Re],o.hasOwnProperty(Re)&&K!=null&&!u.hasOwnProperty(Re)&&it(t,a,Re,null,u,K);for(q in u)if(K=u[q],X=o[q],u.hasOwnProperty(q)&&K!==X&&(K!=null||X!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,a));break;default:it(t,a,q,K,u,X)}return;default:if(hf(a)){for(var ot in o)K=o[ot],o.hasOwnProperty(ot)&&K!==void 0&&!u.hasOwnProperty(ot)&&Zd(t,a,ot,void 0,u,K);for(te in u)K=u[te],X=o[te],!u.hasOwnProperty(te)||K===X||K===void 0&&X===void 0||Zd(t,a,te,K,u,X);return}}for(var U in o)K=o[U],o.hasOwnProperty(U)&&K!=null&&!u.hasOwnProperty(U)&&it(t,a,U,null,u,K);for(oe in u)K=u[oe],X=o[oe],!u.hasOwnProperty(oe)||K===X||K==null&&X==null||it(t,a,oe,K,u,X)}var Wd=null,Jd=null;function Su(t){return t.nodeType===9?t:t.ownerDocument}function yx(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vx(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function eh(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var th=null;function tT(){var t=window.event;return t&&t.type==="popstate"?t===th?!1:(th=t,!0):(th=null,!1)}var xx=typeof setTimeout=="function"?setTimeout:void 0,nT=typeof clearTimeout=="function"?clearTimeout:void 0,bx=typeof Promise=="function"?Promise:void 0,rT=typeof queueMicrotask=="function"?queueMicrotask:typeof bx<"u"?function(t){return bx.resolve(null).then(t).catch(aT)}:xx;function aT(t){setTimeout(function(){throw t})}function va(t){return t==="head"}function wx(t,a){var o=a,u=0,p=0;do{var x=o.nextSibling;if(t.removeChild(o),x&&x.nodeType===8)if(o=x.data,o==="/$"){if(0<u&&8>u){o=u;var C=t.ownerDocument;if(o&1&&yl(C.documentElement),o&2&&yl(C.body),o&4)for(o=C.head,yl(o),C=o.firstChild;C;){var _=C.nextSibling,P=C.nodeName;C[an]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&C.rel.toLowerCase()==="stylesheet"||o.removeChild(C),C=_}}if(p===0){t.removeChild(x),kl(a);return}p--}else o==="$"||o==="$?"||o==="$!"?p++:u=o.charCodeAt(0)-48;else u=0;o=x}while(o);kl(a)}function nh(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":nh(o),hn(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function iT(t,a,o,u){for(;t.nodeType===1;){var p=o;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[an])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(x=t.getAttribute("rel"),x==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(x!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(x=t.getAttribute("src"),(x!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===x)return t}else return t;if(t=ir(t.nextSibling),t===null)break}return null}function oT(t,a,o){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=ir(t.nextSibling),t===null))return null;return t}function rh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function lT(t,a){var o=t.ownerDocument;if(t.data!=="$?"||o.readyState==="complete")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function ir(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return t}var ah=null;function Sx(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(a===0)return t;a--}else o==="/$"&&a++}t=t.previousSibling}return null}function Ex(t,a,o){switch(a=Su(o),t){case"html":if(t=a.documentElement,!t)throw Error(i(452));return t;case"head":if(t=a.head,!t)throw Error(i(453));return t;case"body":if(t=a.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function yl(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);hn(t)}var Yn=new Map,Cx=new Set;function Eu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Gr=Q.d;Q.d={f:sT,r:uT,D:cT,C:fT,L:dT,m:hT,X:mT,S:pT,M:gT};function sT(){var t=Gr.f(),a=pu();return t||a}function uT(t){var a=Yt(t);a!==null&&a.tag===5&&a.type==="form"?qy(a):Gr.r(t)}var Zi=typeof document>"u"?null:document;function kx(t,a,o){var u=Zi;if(u&&typeof a=="string"&&a){var p=Un(a);p='link[rel="'+t+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Cx.has(p)||(Cx.add(p),t={rel:t,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),Qt(a,"link",t),mt(a),u.head.appendChild(a)))}}function cT(t){Gr.D(t),kx("dns-prefetch",t,null)}function fT(t,a){Gr.C(t,a),kx("preconnect",t,a)}function dT(t,a,o){Gr.L(t,a,o);var u=Zi;if(u&&t&&a){var p='link[rel="preload"][as="'+Un(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Un(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Un(o.imageSizes)+'"]')):p+='[href="'+Un(t)+'"]';var x=p;switch(a){case"style":x=Wi(t);break;case"script":x=Ji(t)}Yn.has(x)||(t=m({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),Yn.set(x,t),u.querySelector(p)!==null||a==="style"&&u.querySelector(vl(x))||a==="script"&&u.querySelector(xl(x))||(a=u.createElement("link"),Qt(a,"link",t),mt(a),u.head.appendChild(a)))}}function hT(t,a){Gr.m(t,a);var o=Zi;if(o&&t){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Un(u)+'"][href="'+Un(t)+'"]',x=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Ji(t)}if(!Yn.has(x)&&(t=m({rel:"modulepreload",href:t},a),Yn.set(x,t),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(xl(x)))return}u=o.createElement("link"),Qt(u,"link",t),mt(u),o.head.appendChild(u)}}}function pT(t,a,o){Gr.S(t,a,o);var u=Zi;if(u&&t){var p=mr(u).hoistableStyles,x=Wi(t);a=a||"default";var C=p.get(x);if(!C){var _={loading:0,preload:null};if(C=u.querySelector(vl(x)))_.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":a},o),(o=Yn.get(x))&&ih(t,o);var P=C=u.createElement("link");mt(P),Qt(P,"link",t),P._p=new Promise(function(q,te){P.onload=q,P.onerror=te}),P.addEventListener("load",function(){_.loading|=1}),P.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Cu(C,a,u)}C={type:"stylesheet",instance:C,count:1,state:_},p.set(x,C)}}}function mT(t,a){Gr.X(t,a);var o=Zi;if(o&&t){var u=mr(o).hoistableScripts,p=Ji(t),x=u.get(p);x||(x=o.querySelector(xl(p)),x||(t=m({src:t,async:!0},a),(a=Yn.get(p))&&oh(t,a),x=o.createElement("script"),mt(x),Qt(x,"link",t),o.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},u.set(p,x))}}function gT(t,a){Gr.M(t,a);var o=Zi;if(o&&t){var u=mr(o).hoistableScripts,p=Ji(t),x=u.get(p);x||(x=o.querySelector(xl(p)),x||(t=m({src:t,async:!0,type:"module"},a),(a=Yn.get(p))&&oh(t,a),x=o.createElement("script"),mt(x),Qt(x,"link",t),o.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},u.set(p,x))}}function Ax(t,a,o,u){var p=(p=pe.current)?Eu(p):null;if(!p)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Wi(o.href),o=mr(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=Wi(o.href);var x=mr(p).hoistableStyles,C=x.get(t);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(t,C),(x=p.querySelector(vl(t)))&&!x._p&&(C.instance=x,C.state.loading=5),Yn.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Yn.set(t,o),x||yT(p,t,o,C.state))),a&&u===null)throw Error(i(528,""));return C}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ji(o),o=mr(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function Wi(t){return'href="'+Un(t)+'"'}function vl(t){return'link[rel="stylesheet"]['+t+"]"}function Tx(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function yT(t,a,o,u){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=t.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Qt(a,"link",o),mt(a),t.head.appendChild(a))}function Ji(t){return'[src="'+Un(t)+'"]'}function xl(t){return"script[async]"+t}function Rx(t,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=t.querySelector('style[data-href~="'+Un(o.href)+'"]');if(u)return a.instance=u,mt(u),u;var p=m({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),mt(u),Qt(u,"style",p),Cu(u,o.precedence,t),a.instance=u;case"stylesheet":p=Wi(o.href);var x=t.querySelector(vl(p));if(x)return a.state.loading|=4,a.instance=x,mt(x),x;u=Tx(o),(p=Yn.get(p))&&ih(u,p),x=(t.ownerDocument||t).createElement("link"),mt(x);var C=x;return C._p=new Promise(function(_,P){C.onload=_,C.onerror=P}),Qt(x,"link",u),a.state.loading|=4,Cu(x,o.precedence,t),a.instance=x;case"script":return x=Ji(o.src),(p=t.querySelector(xl(x)))?(a.instance=p,mt(p),p):(u=o,(p=Yn.get(x))&&(u=m({},o),oh(u,p)),t=t.ownerDocument||t,p=t.createElement("script"),mt(p),Qt(p,"link",u),t.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Cu(u,o.precedence,t));return a.instance}function Cu(t,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,x=p,C=0;C<u.length;C++){var _=u[C];if(_.dataset.precedence===a)x=_;else if(x!==p)break}x?x.parentNode.insertBefore(t,x.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(t,a.firstChild))}function ih(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function oh(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var ku=null;function Nx(t,a,o){if(ku===null){var u=new Map,p=ku=new Map;p.set(o,u)}else p=ku,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(t))return u;for(u.set(t,null),o=o.getElementsByTagName(t),p=0;p<o.length;p++){var x=o[p];if(!(x[an]||x[ge]||t==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(a)||"";C=t+C;var _=u.get(C);_?_.push(x):u.set(C,[x])}}return u}function _x(t,a,o){t=t.ownerDocument||t,t.head.insertBefore(o,a==="title"?t.querySelector("head > title"):null)}function vT(t,a,o){if(o===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Mx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var bl=null;function xT(){}function bT(t,a,o){if(bl===null)throw Error(i(475));var u=bl;if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Wi(o.href),x=t.querySelector(vl(p));if(x){t=x._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(u.count++,u=Au.bind(u),t.then(u,u)),a.state.loading|=4,a.instance=x,mt(x);return}x=t.ownerDocument||t,o=Tx(o),(p=Yn.get(p))&&ih(o,p),x=x.createElement("link"),mt(x);var C=x;C._p=new Promise(function(_,P){C.onload=_,C.onerror=P}),Qt(x,"link",o),a.instance=x}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(u.count++,a=Au.bind(u),t.addEventListener("load",a),t.addEventListener("error",a))}}function wT(){if(bl===null)throw Error(i(475));var t=bl;return t.stylesheets&&t.count===0&&lh(t,t.stylesheets),0<t.count?function(a){var o=setTimeout(function(){if(t.stylesheets&&lh(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o)}}:null}function Au(){if(this.count--,this.count===0){if(this.stylesheets)lh(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Tu=null;function lh(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Tu=new Map,a.forEach(ST,t),Tu=null,Au.call(t))}function ST(t,a){if(!(a.state.loading&4)){var o=Tu.get(t);if(o)var u=o.get(null);else{o=new Map,Tu.set(t,o);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var C=p[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(o.set(C.dataset.precedence,C),u=C)}u&&o.set(null,u)}p=a.instance,C=p.getAttribute("data-precedence"),x=o.get(C)||u,x===u&&o.set(null,p),o.set(C,p),this.count++,u=Au.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),x?x.parentNode.insertBefore(p,x.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),a.state.loading|=4}}var wl={$$typeof:N,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function ET(t,a,o,u,p,x,C,_){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=jo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jo(0),this.hiddenUpdates=jo(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function jx(t,a,o,u,p,x,C,_,P,q,te,oe){return t=new ET(t,a,o,C,_,P,q,oe),a=1,x===!0&&(a|=24),x=Tn(3,null,null,a),t.current=x,x.stateNode=t,a=Ff(),a.refCount++,t.pooledCache=a,a.refCount++,x.memoizedState={element:u,isDehydrated:o,cache:a},Gf(x),t}function Dx(t){return t?(t=_i,t):_i}function Ox(t,a,o,u,p,x){p=Dx(p),u.context===null?u.context=p:u.pendingContext=p,u=ia(a),u.payload={element:o},x=x===void 0?null:x,x!==null&&(u.callback=x),o=oa(t,u,a),o!==null&&(jn(o,t,a),Zo(o,t,a))}function Px(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<a?o:a}}function sh(t,a){Px(t,a),(t=t.alternate)&&Px(t,a)}function Lx(t){if(t.tag===13){var a=Ni(t,67108864);a!==null&&jn(a,t,67108864),sh(t,67108864)}}var Ru=!0;function CT(t,a,o,u){var p=z.T;z.T=null;var x=Q.p;try{Q.p=2,uh(t,a,o,u)}finally{Q.p=x,z.T=p}}function kT(t,a,o,u){var p=z.T;z.T=null;var x=Q.p;try{Q.p=8,uh(t,a,o,u)}finally{Q.p=x,z.T=p}}function uh(t,a,o,u){if(Ru){var p=ch(u);if(p===null)Qd(t,a,u,Nu,o),Ix(t,u);else if(TT(p,t,a,o,u))u.stopPropagation();else if(Ix(t,u),a&4&&-1<AT.indexOf(t)){for(;p!==null;){var x=Yt(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=Jt(x.pendingLanes);if(C!==0){var _=x;for(_.pendingLanes|=2,_.entangledLanes|=2;C;){var P=1<<31-Ae(C);_.entanglements[1]|=P,C&=~P}br(x),(nt&6)===0&&(du=Rt()+500,pl(0))}}break;case 13:_=Ni(x,2),_!==null&&jn(_,x,2),pu(),sh(x,2)}if(x=ch(u),x===null&&Qd(t,a,u,Nu,o),x===p)break;p=x}p!==null&&u.stopPropagation()}else Qd(t,a,u,null,o)}}function ch(t){return t=mf(t),fh(t)}var Nu=null;function fh(t){if(Nu=null,t=lt(t),t!==null){var a=s(t);if(a===null)t=null;else{var o=a.tag;if(o===13){if(t=c(a),t!==null)return t;t=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return Nu=t,null}function zx(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(yi()){case bn:return 2;case wn:return 8;case hr:case ea:return 32;case Sn:return 268435456;default:return 32}default:return 32}}var dh=!1,xa=null,ba=null,wa=null,Sl=new Map,El=new Map,Sa=[],AT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ix(t,a){switch(t){case"focusin":case"focusout":xa=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":wa=null;break;case"pointerover":case"pointerout":Sl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":El.delete(a.pointerId)}}function Cl(t,a,o,u,p,x){return t===null||t.nativeEvent!==x?(t={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:x,targetContainers:[p]},a!==null&&(a=Yt(a),a!==null&&Lx(a)),t):(t.eventSystemFlags|=u,a=t.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),t)}function TT(t,a,o,u,p){switch(a){case"focusin":return xa=Cl(xa,t,a,o,u,p),!0;case"dragenter":return ba=Cl(ba,t,a,o,u,p),!0;case"mouseover":return wa=Cl(wa,t,a,o,u,p),!0;case"pointerover":var x=p.pointerId;return Sl.set(x,Cl(Sl.get(x)||null,t,a,o,u,p)),!0;case"gotpointercapture":return x=p.pointerId,El.set(x,Cl(El.get(x)||null,t,a,o,u,p)),!0}return!1}function Bx(t){var a=lt(t.target);if(a!==null){var o=s(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){t.blockedOn=a,fe(t.priority,function(){if(o.tag===13){var u=Mn();u=pr(u);var p=Ni(o,u);p!==null&&jn(p,o,u),sh(o,u)}});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function _u(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var o=ch(t.nativeEvent);if(o===null){o=t.nativeEvent;var u=new o.constructor(o.type,o);pf=u,o.target.dispatchEvent(u),pf=null}else return a=Yt(o),a!==null&&Lx(a),t.blockedOn=o,!1;a.shift()}return!0}function Ux(t,a,o){_u(t)&&o.delete(a)}function RT(){dh=!1,xa!==null&&_u(xa)&&(xa=null),ba!==null&&_u(ba)&&(ba=null),wa!==null&&_u(wa)&&(wa=null),Sl.forEach(Ux),El.forEach(Ux)}function Mu(t,a){t.blockedOn===a&&(t.blockedOn=null,dh||(dh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,RT)))}var ju=null;function Hx(t){ju!==t&&(ju=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ju===t&&(ju=null);for(var a=0;a<t.length;a+=3){var o=t[a],u=t[a+1],p=t[a+2];if(typeof u!="function"){if(fh(u||o)===null)continue;break}var x=Yt(o);x!==null&&(t.splice(a,3),a-=3,fd(x,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function kl(t){function a(P){return Mu(P,t)}xa!==null&&Mu(xa,t),ba!==null&&Mu(ba,t),wa!==null&&Mu(wa,t),Sl.forEach(a),El.forEach(a);for(var o=0;o<Sa.length;o++){var u=Sa[o];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Sa.length&&(o=Sa[0],o.blockedOn===null);)Bx(o),o.blockedOn===null&&Sa.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],x=o[u+1],C=p[Se]||null;if(typeof x=="function")C||Hx(o);else if(C){var _=null;if(x&&x.hasAttribute("formAction")){if(p=x,C=x[Se]||null)_=C.formAction;else if(fh(p)!==null)continue}else _=C.action;typeof _=="function"?o[u+1]=_:(o.splice(u,3),u-=3),Hx(o)}}}function hh(t){this._internalRoot=t}Du.prototype.render=hh.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=Mn();Ox(o,u,t,a,null,null)},Du.prototype.unmount=hh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Ox(t.current,2,null,t,null,null),pu(),a[Ue]=null}};function Du(t){this._internalRoot=t}Du.prototype.unstable_scheduleHydration=function(t){if(t){var a=F();t={blockedOn:null,target:t,priority:a};for(var o=0;o<Sa.length&&a!==0&&a<Sa[o].priority;o++);Sa.splice(o,0,t),o===0&&Bx(t)}};var Fx=n.version;if(Fx!=="19.1.1")throw Error(i(527,Fx,"19.1.1"));Q.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=d(a),t=t!==null?h(t):null,t=t===null?null:t.stateNode,t};var NT={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ou.isDisabled&&Ou.supportsFiber)try{ee=Ou.inject(NT),de=Ou}catch{}}return Tl.createRoot=function(t,a){if(!l(t))throw Error(i(299));var o=!1,u="",p=av,x=iv,C=ov,_=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(_=a.unstable_transitionCallbacks)),a=jx(t,1,!1,null,null,o,u,p,x,C,_,null),t[Ue]=a.current,Xd(t),new hh(a)},Tl.hydrateRoot=function(t,a,o){if(!l(t))throw Error(i(299));var u=!1,p="",x=av,C=iv,_=ov,P=null,q=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(C=o.onCaughtError),o.onRecoverableError!==void 0&&(_=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(P=o.unstable_transitionCallbacks),o.formState!==void 0&&(q=o.formState)),a=jx(t,1,!0,a,o??null,u,p,x,C,_,P,q),a.context=Dx(null),o=a.current,u=Mn(),u=pr(u),p=ia(u),p.callback=null,oa(o,p,u),o=u,a.current.lanes=o,La(a,o),br(a),t[Ue]=a.current,Xd(t),new Du(a)},Tl.version="19.1.1",Tl}var Wx;function BT(){if(Wx)return gh.exports;Wx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),gh.exports=IT(),gh.exports}var UT=BT();const HT="modulepreload",FT=function(e){return"/"+e},Jx={},Ie=function(n,r,i){let l=Promise.resolve();if(r&&r.length>0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");l=d(r.map(h=>{if(h=FT(h),h in Jx)return;Jx[h]=!0;const m=h.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":HT,m||(w.as="script"),w.crossOrigin="",w.href=h,f&&w.setAttribute("nonce",f),document.head.appendChild(w),m)return new Promise((b,S)=>{w.addEventListener("load",b),w.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&s(f.reason);return n().catch(s)})};/**
51
51
  * react-router v7.8.2
52
52
  *
53
53
  * Copyright (c) Remix Software Inc.
@@ -56,9 +56,9 @@ Error generating stack: `+o.message+`
56
56
  * LICENSE.md file in the root directory of this source tree.
57
57
  *
58
58
  * @license MIT
59
- */var eb="popstate";function VT(e={}){function n(i,l){let{pathname:s,search:c,hash:f}=i.location;return np("",{pathname:s,search:c,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function r(i,l){return typeof l=="string"?l:$l(l)}return $T(n,r,null,e)}function ht(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Qn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function qT(){return Math.random().toString(36).substring(2,10)}function tb(e,n){return{usr:e.state,key:e.key,idx:n}}function np(e,n,r=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?vo(n):n,state:r,key:n&&n.key||i||qT()}}function $l({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function vo(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function $T(e,n,r,i={}){let{window:l=document.defaultView,v5Compat:s=!1}=i,c=l.history,f="POP",d=null,h=m();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function m(){return(c.state||{idx:null}).idx}function y(){f="POP";let T=m(),A=T==null?null:T-h;h=T,d&&d({action:f,location:E.location,delta:A})}function w(T,A){f="PUSH";let R=np(E.location,T,A);h=m()+1;let N=tb(R,h),O=E.createHref(R);try{c.pushState(N,"",O)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(O)}s&&d&&d({action:f,location:E.location,delta:1})}function b(T,A){f="REPLACE";let R=np(E.location,T,A);h=m();let N=tb(R,h),O=E.createHref(R);c.replaceState(N,"",O),s&&d&&d({action:f,location:E.location,delta:0})}function S(T){return GT(T)}let E={get action(){return f},get location(){return e(l,c)},listen(T){if(d)throw new Error("A history only accepts one active listener");return l.addEventListener(eb,y),d=T,()=>{l.removeEventListener(eb,y),d=null}},createHref(T){return n(l,T)},createURL:S,encodeLocation(T){let A=S(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:w,replace:b,go(T){return c.go(T)}};return E}function GT(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ht(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:$l(e);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function Y0(e,n,r="/"){return YT(e,n,r,!1)}function YT(e,n,r,i){let l=typeof n=="string"?vo(n):n,s=Xr(l.pathname||"/",r);if(s==null)return null;let c=K0(e);KT(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=iR(s);f=rR(c[d],h,i)}return f}function K0(e,n=[],r=[],i="",l=!1){let s=(c,f,d=l,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(i)&&d)return;ht(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length)}let y=Kr([i,m.relativePath]),w=r.concat(m);c.children&&c.children.length>0&&(ht(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),K0(c.children,n,w,y,d)),!(c.path==null&&!c.index)&&n.push({path:y,score:tR(y,c.index),routesMeta:w})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))s(c,f);else for(let d of X0(c.path))s(c,f,!0,d)}),n}function X0(e){let n=e.split("/");if(n.length===0)return[];let[r,...i]=n,l=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return l?[s,""]:[s];let c=X0(i.join("/")),f=[];return f.push(...c.map(d=>d===""?s:[s,d].join("/"))),l&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function KT(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:nR(n.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var XT=/^:[\w-]+$/,QT=3,ZT=2,WT=1,JT=10,eR=-2,nb=e=>e==="*";function tR(e,n){let r=e.split("/"),i=r.length;return r.some(nb)&&(i+=eR),n&&(i+=ZT),r.filter(l=>!nb(l)).reduce((l,s)=>l+(XT.test(s)?QT:s===""?WT:JT),i)}function nR(e,n){return e.length===n.length&&e.slice(0,-1).every((i,l)=>i===n[l])?e[e.length-1]-n[n.length-1]:0}function rR(e,n,r=!1){let{routesMeta:i}=e,l={},s="/",c=[];for(let f=0;f<i.length;++f){let d=i[f],h=f===i.length-1,m=s==="/"?n:n.slice(s.length)||"/",y=lc({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),w=d.route;if(!y&&h&&r&&!i[i.length-1].route.index&&(y=lc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!y)return null;Object.assign(l,y.params),c.push({params:l,pathname:Kr([s,y.pathname]),pathnameBase:uR(Kr([s,y.pathnameBase])),route:w}),y.pathnameBase!=="/"&&(s=Kr([s,y.pathnameBase]))}return c}function lc(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=aR(e.path,e.caseSensitive,e.end),l=n.match(r);if(!l)return null;let s=l[0],c=s.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:i.reduce((h,{paramName:m,isOptional:y},w)=>{if(m==="*"){let S=f[w]||"";c=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const b=f[w];return y&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:c,pattern:e}}function aR(e,n=!1,r=!0){Qn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d)=>(i.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),i]}function iR(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Qn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Xr(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function oR(e,n="/"){let{pathname:r,search:i="",hash:l=""}=typeof e=="string"?vo(e):e;return{pathname:r?r.startsWith("/")?r:lR(r,n):n,search:cR(i),hash:fR(l)}}function lR(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function bh(e,n,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function sR(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Kp(e){let n=sR(e);return n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase)}function Xp(e,n,r,i=!1){let l;typeof e=="string"?l=vo(e):(l={...e},ht(!l.pathname||!l.pathname.includes("?"),bh("?","pathname","search",l)),ht(!l.pathname||!l.pathname.includes("#"),bh("#","pathname","hash",l)),ht(!l.search||!l.search.includes("#"),bh("#","search","hash",l)));let s=e===""||l.pathname==="",c=s?"/":l.pathname,f;if(c==null)f=r;else{let y=n.length-1;if(!i&&c.startsWith("..")){let w=c.split("/");for(;w[0]==="..";)w.shift(),y-=1;l.pathname=w.join("/")}f=y>=0?n[y]:"/"}let d=oR(l,f),h=c&&c!=="/"&&c.endsWith("/"),m=(s||c===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var Kr=e=>e.join("/").replace(/\/\/+/g,"/"),uR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function dR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Q0=["POST","PUT","PATCH","DELETE"];new Set(Q0);var hR=["GET",...Q0];new Set(hR);var xo=v.createContext(null);xo.displayName="DataRouter";var kc=v.createContext(null);kc.displayName="DataRouterState";v.createContext(!1);var Z0=v.createContext({isTransitioning:!1});Z0.displayName="ViewTransition";var pR=v.createContext(new Map);pR.displayName="Fetchers";var mR=v.createContext(null);mR.displayName="Await";var fr=v.createContext(null);fr.displayName="Navigation";var rs=v.createContext(null);rs.displayName="Location";var Zn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Zn.displayName="Route";var Qp=v.createContext(null);Qp.displayName="RouteError";function gR(e,{relative:n}={}){ht(bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=v.useContext(fr),{hash:l,pathname:s,search:c}=is(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:Kr([r,s])),i.createHref({pathname:f,search:c,hash:l})}function bo(){return v.useContext(rs)!=null}function Wn(){return ht(bo(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(rs).location}var W0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function J0(e){v.useContext(fr).static||v.useLayoutEffect(e)}function as(){let{isDataRoute:e}=v.useContext(Zn);return e?MR():yR()}function yR(){ht(bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(xo),{basename:n,navigator:r}=v.useContext(fr),{matches:i}=v.useContext(Zn),{pathname:l}=Wn(),s=JSON.stringify(Kp(i)),c=v.useRef(!1);return J0(()=>{c.current=!0}),v.useCallback((d,h={})=>{if(Qn(c.current,W0),!c.current)return;if(typeof d=="number"){r.go(d);return}let m=Xp(d,JSON.parse(s),l,h.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:Kr([n,m.pathname])),(h.replace?r.replace:r.push)(m,h.state,h)},[n,r,s,l,e])}var vR=v.createContext(null);function xR(e){let n=v.useContext(Zn).outlet;return n&&v.createElement(vR.Provider,{value:e},n)}function XU(){let{matches:e}=v.useContext(Zn),n=e[e.length-1];return n?n.params:{}}function is(e,{relative:n}={}){let{matches:r}=v.useContext(Zn),{pathname:i}=Wn(),l=JSON.stringify(Kp(r));return v.useMemo(()=>Xp(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function bR(e,n){return ew(e,n)}function ew(e,n,r,i,l){ht(bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(fr),{matches:c}=v.useContext(Zn),f=c[c.length-1],d=f?f.params:{},h=f?f.pathname:"/",m=f?f.pathnameBase:"/",y=f&&f.route;{let R=y&&y.path||"";tw(h,!y||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+ */var eb="popstate";function VT(e={}){function n(i,l){let{pathname:s,search:c,hash:f}=i.location;return np("",{pathname:s,search:c,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function r(i,l){return typeof l=="string"?l:ql(l)}return $T(n,r,null,e)}function ht(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Qn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function qT(){return Math.random().toString(36).substring(2,10)}function tb(e,n){return{usr:e.state,key:e.key,idx:n}}function np(e,n,r=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?vo(n):n,state:r,key:n&&n.key||i||qT()}}function ql({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function vo(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function $T(e,n,r,i={}){let{window:l=document.defaultView,v5Compat:s=!1}=i,c=l.history,f="POP",d=null,h=m();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function m(){return(c.state||{idx:null}).idx}function y(){f="POP";let T=m(),A=T==null?null:T-h;h=T,d&&d({action:f,location:E.location,delta:A})}function w(T,A){f="PUSH";let R=np(E.location,T,A);h=m()+1;let N=tb(R,h),O=E.createHref(R);try{c.pushState(N,"",O)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(O)}s&&d&&d({action:f,location:E.location,delta:1})}function b(T,A){f="REPLACE";let R=np(E.location,T,A);h=m();let N=tb(R,h),O=E.createHref(R);c.replaceState(N,"",O),s&&d&&d({action:f,location:E.location,delta:0})}function S(T){return GT(T)}let E={get action(){return f},get location(){return e(l,c)},listen(T){if(d)throw new Error("A history only accepts one active listener");return l.addEventListener(eb,y),d=T,()=>{l.removeEventListener(eb,y),d=null}},createHref(T){return n(l,T)},createURL:S,encodeLocation(T){let A=S(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:w,replace:b,go(T){return c.go(T)}};return E}function GT(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ht(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:ql(e);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function Y0(e,n,r="/"){return YT(e,n,r,!1)}function YT(e,n,r,i){let l=typeof n=="string"?vo(n):n,s=Xr(l.pathname||"/",r);if(s==null)return null;let c=K0(e);KT(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=iR(s);f=rR(c[d],h,i)}return f}function K0(e,n=[],r=[],i="",l=!1){let s=(c,f,d=l,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(i)&&d)return;ht(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length)}let y=Kr([i,m.relativePath]),w=r.concat(m);c.children&&c.children.length>0&&(ht(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),K0(c.children,n,w,y,d)),!(c.path==null&&!c.index)&&n.push({path:y,score:tR(y,c.index),routesMeta:w})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))s(c,f);else for(let d of X0(c.path))s(c,f,!0,d)}),n}function X0(e){let n=e.split("/");if(n.length===0)return[];let[r,...i]=n,l=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return l?[s,""]:[s];let c=X0(i.join("/")),f=[];return f.push(...c.map(d=>d===""?s:[s,d].join("/"))),l&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function KT(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:nR(n.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var XT=/^:[\w-]+$/,QT=3,ZT=2,WT=1,JT=10,eR=-2,nb=e=>e==="*";function tR(e,n){let r=e.split("/"),i=r.length;return r.some(nb)&&(i+=eR),n&&(i+=ZT),r.filter(l=>!nb(l)).reduce((l,s)=>l+(XT.test(s)?QT:s===""?WT:JT),i)}function nR(e,n){return e.length===n.length&&e.slice(0,-1).every((i,l)=>i===n[l])?e[e.length-1]-n[n.length-1]:0}function rR(e,n,r=!1){let{routesMeta:i}=e,l={},s="/",c=[];for(let f=0;f<i.length;++f){let d=i[f],h=f===i.length-1,m=s==="/"?n:n.slice(s.length)||"/",y=lc({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),w=d.route;if(!y&&h&&r&&!i[i.length-1].route.index&&(y=lc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!y)return null;Object.assign(l,y.params),c.push({params:l,pathname:Kr([s,y.pathname]),pathnameBase:uR(Kr([s,y.pathnameBase])),route:w}),y.pathnameBase!=="/"&&(s=Kr([s,y.pathnameBase]))}return c}function lc(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=aR(e.path,e.caseSensitive,e.end),l=n.match(r);if(!l)return null;let s=l[0],c=s.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:i.reduce((h,{paramName:m,isOptional:y},w)=>{if(m==="*"){let S=f[w]||"";c=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const b=f[w];return y&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:c,pattern:e}}function aR(e,n=!1,r=!0){Qn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d)=>(i.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),i]}function iR(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Qn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Xr(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function oR(e,n="/"){let{pathname:r,search:i="",hash:l=""}=typeof e=="string"?vo(e):e;return{pathname:r?r.startsWith("/")?r:lR(r,n):n,search:cR(i),hash:fR(l)}}function lR(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function bh(e,n,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function sR(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Kp(e){let n=sR(e);return n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase)}function Xp(e,n,r,i=!1){let l;typeof e=="string"?l=vo(e):(l={...e},ht(!l.pathname||!l.pathname.includes("?"),bh("?","pathname","search",l)),ht(!l.pathname||!l.pathname.includes("#"),bh("#","pathname","hash",l)),ht(!l.search||!l.search.includes("#"),bh("#","search","hash",l)));let s=e===""||l.pathname==="",c=s?"/":l.pathname,f;if(c==null)f=r;else{let y=n.length-1;if(!i&&c.startsWith("..")){let w=c.split("/");for(;w[0]==="..";)w.shift(),y-=1;l.pathname=w.join("/")}f=y>=0?n[y]:"/"}let d=oR(l,f),h=c&&c!=="/"&&c.endsWith("/"),m=(s||c===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var Kr=e=>e.join("/").replace(/\/\/+/g,"/"),uR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function dR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Q0=["POST","PUT","PATCH","DELETE"];new Set(Q0);var hR=["GET",...Q0];new Set(hR);var xo=v.createContext(null);xo.displayName="DataRouter";var kc=v.createContext(null);kc.displayName="DataRouterState";v.createContext(!1);var Z0=v.createContext({isTransitioning:!1});Z0.displayName="ViewTransition";var pR=v.createContext(new Map);pR.displayName="Fetchers";var mR=v.createContext(null);mR.displayName="Await";var fr=v.createContext(null);fr.displayName="Navigation";var ns=v.createContext(null);ns.displayName="Location";var Zn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Zn.displayName="Route";var Qp=v.createContext(null);Qp.displayName="RouteError";function gR(e,{relative:n}={}){ht(bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=v.useContext(fr),{hash:l,pathname:s,search:c}=as(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:Kr([r,s])),i.createHref({pathname:f,search:c,hash:l})}function bo(){return v.useContext(ns)!=null}function Wn(){return ht(bo(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(ns).location}var W0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function J0(e){v.useContext(fr).static||v.useLayoutEffect(e)}function rs(){let{isDataRoute:e}=v.useContext(Zn);return e?MR():yR()}function yR(){ht(bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(xo),{basename:n,navigator:r}=v.useContext(fr),{matches:i}=v.useContext(Zn),{pathname:l}=Wn(),s=JSON.stringify(Kp(i)),c=v.useRef(!1);return J0(()=>{c.current=!0}),v.useCallback((d,h={})=>{if(Qn(c.current,W0),!c.current)return;if(typeof d=="number"){r.go(d);return}let m=Xp(d,JSON.parse(s),l,h.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:Kr([n,m.pathname])),(h.replace?r.replace:r.push)(m,h.state,h)},[n,r,s,l,e])}var vR=v.createContext(null);function xR(e){let n=v.useContext(Zn).outlet;return n&&v.createElement(vR.Provider,{value:e},n)}function XU(){let{matches:e}=v.useContext(Zn),n=e[e.length-1];return n?n.params:{}}function as(e,{relative:n}={}){let{matches:r}=v.useContext(Zn),{pathname:i}=Wn(),l=JSON.stringify(Kp(r));return v.useMemo(()=>Xp(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function bR(e,n){return ew(e,n)}function ew(e,n,r,i,l){ht(bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(fr),{matches:c}=v.useContext(Zn),f=c[c.length-1],d=f?f.params:{},h=f?f.pathname:"/",m=f?f.pathnameBase:"/",y=f&&f.route;{let R=y&&y.path||"";tw(h,!y||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
60
 
61
- Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let w=Wn(),b;if(n){let R=typeof n=="string"?vo(n):n;ht(m==="/"||R.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${R.pathname}" was given in the \`location\` prop.`),b=R}else b=w;let S=b.pathname||"/",E=S;if(m!=="/"){let R=m.replace(/^\//,"").split("/");E="/"+S.replace(/^\//,"").split("/").slice(R.length).join("/")}let T=Y0(e,{pathname:E});Qn(y||T!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Qn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=kR(T&&T.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Kr([m,s.encodeLocation?s.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:Kr([m,s.encodeLocation?s.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),c,r,i,l);return n&&A?v.createElement(rs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},A):A}function wR(){let e=_R(),n=dR(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:s},"ErrorBoundary")," or"," ",v.createElement("code",{style:s},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),r?v.createElement("pre",{style:l},r):null,c)}var SR=v.createElement(wR,null),ER=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.unstable_onError?this.props.unstable_onError(e,n):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?v.createElement(Zn.Provider,{value:this.props.routeContext},v.createElement(Qp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function CR({routeContext:e,match:n,children:r}){let i=v.useContext(xo);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Zn.Provider,{value:e},r)}function kR(e,n=[],r=null,i=null,l=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,c=r?.errors;if(c!=null){let h=s.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);ht(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,h+1))}let f=!1,d=-1;if(r)for(let h=0;h<s.length;h++){let m=s[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=h),m.route.id){let{loaderData:y,errors:w}=r,b=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!w||w[m.route.id]===void 0);if(m.route.lazy||b){f=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((h,m,y)=>{let w,b=!1,S=null,E=null;r&&(w=c&&m.route.id?c[m.route.id]:void 0,S=m.route.errorElement||SR,f&&(d<0&&y===0?(tw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,E=null):d===y&&(b=!0,E=m.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,y+1)),A=()=>{let R;return w?R=S:b?R=E:m.route.Component?R=v.createElement(m.route.Component,null):m.route.element?R=m.route.element:R=h,v.createElement(CR,{match:m,routeContext:{outlet:h,matches:T,isDataRoute:r!=null},children:R})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?v.createElement(ER,{location:r.location,revalidation:r.revalidation,component:S,error:w,children:A(),routeContext:{outlet:null,matches:T,isDataRoute:!0},unstable_onError:i}):A()},null)}function Zp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function AR(e){let n=v.useContext(xo);return ht(n,Zp(e)),n}function TR(e){let n=v.useContext(kc);return ht(n,Zp(e)),n}function RR(e){let n=v.useContext(Zn);return ht(n,Zp(e)),n}function Wp(e){let n=RR(e),r=n.matches[n.matches.length-1];return ht(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function NR(){return Wp("useRouteId")}function _R(){let e=v.useContext(Qp),n=TR("useRouteError"),r=Wp("useRouteError");return e!==void 0?e:n.errors?.[r]}function MR(){let{router:e}=AR("useNavigate"),n=Wp("useNavigate"),r=v.useRef(!1);return J0(()=>{r.current=!0}),v.useCallback(async(l,s={})=>{Qn(r.current,W0),r.current&&(typeof l=="number"?e.navigate(l):await e.navigate(l,{fromRouteId:n,...s}))},[e,n])}var rb={};function tw(e,n,r){!n&&!rb[e]&&(rb[e]=!0,Qn(!1,r))}v.memo(jR);function jR({routes:e,future:n,state:r,unstable_onError:i}){return ew(e,void 0,r,i,n)}function DR({to:e,replace:n,state:r,relative:i}){ht(bo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=v.useContext(fr);Qn(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=v.useContext(Zn),{pathname:c}=Wn(),f=as(),d=Xp(e,Kp(s),c,i==="path"),h=JSON.stringify(d);return v.useEffect(()=>{f(JSON.parse(h),{replace:n,state:r,relative:i})},[f,h,i,n,r]),null}function nw(e){return xR(e.context)}function Oe(e){ht(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function OR({basename:e="/",children:n=null,location:r,navigationType:i="POP",navigator:l,static:s=!1}){ht(!bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:c,navigator:l,static:s,future:{}}),[c,l,s]);typeof r=="string"&&(r=vo(r));let{pathname:d="/",search:h="",hash:m="",state:y=null,key:w="default"}=r,b=v.useMemo(()=>{let S=Xr(d,c);return S==null?null:{location:{pathname:S,search:h,hash:m,state:y,key:w},navigationType:i}},[c,d,h,m,y,w,i]);return Qn(b!=null,`<Router basename="${c}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:v.createElement(fr.Provider,{value:f},v.createElement(rs.Provider,{children:n,value:b}))}function PR({children:e,location:n}){return bR(rp(e),n)}function rp(e,n=[]){let r=[];return v.Children.forEach(e,(i,l)=>{if(!v.isValidElement(i))return;let s=[...n,l];if(i.type===v.Fragment){r.push.apply(r,rp(i.props.children,s));return}ht(i.type===Oe,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ht(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=rp(i.props.children,s)),r.push(c)}),r}var Zu="get",Wu="application/x-www-form-urlencoded";function Ac(e){return e!=null&&typeof e.tagName=="string"}function LR(e){return Ac(e)&&e.tagName.toLowerCase()==="button"}function zR(e){return Ac(e)&&e.tagName.toLowerCase()==="form"}function IR(e){return Ac(e)&&e.tagName.toLowerCase()==="input"}function BR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function UR(e,n){return e.button===0&&(!n||n==="_self")&&!BR(e)}function ap(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,r)=>{let i=e[r];return n.concat(Array.isArray(i)?i.map(l=>[r,l]):[[r,i]])},[]))}function HR(e,n){let r=ap(e);return n&&n.forEach((i,l)=>{r.has(l)||n.getAll(l).forEach(s=>{r.append(l,s)})}),r}var Lu=null;function FR(){if(Lu===null)try{new FormData(document.createElement("form"),0),Lu=!1}catch{Lu=!0}return Lu}var VR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wh(e){return e!=null&&!VR.has(e)?(Qn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wu}"`),null):e}function qR(e,n){let r,i,l,s,c;if(zR(e)){let f=e.getAttribute("action");i=f?Xr(f,n):null,r=e.getAttribute("method")||Zu,l=wh(e.getAttribute("enctype"))||Wu,s=new FormData(e)}else if(LR(e)||IR(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(i=d?Xr(d,n):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||Zu,l=wh(e.getAttribute("formenctype"))||wh(f.getAttribute("enctype"))||Wu,s=new FormData(f,e),!FR()){let{name:h,type:m,value:y}=e;if(m==="image"){let w=h?`${h}.`:"";s.append(`${w}x`,"0"),s.append(`${w}y`,"0")}else h&&s.append(h,y)}}else{if(Ac(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Zu,i=null,l=Wu,c=e}return s&&l==="text/plain"&&(c=s,s=void 0),{action:i,method:r.toLowerCase(),encType:l,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jp(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function $R(e,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${r}`:n&&Xr(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function GR(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function YR(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function KR(e,n,r){let i=await Promise.all(e.map(async l=>{let s=n.routes[l.route.id];if(s){let c=await GR(s,r);return c.links?c.links():[]}return[]}));return WR(i.flat(1).filter(YR).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function ab(e,n,r,i,l,s){let c=(d,h)=>r[h]?d.route.id!==r[h].route.id:!0,f=(d,h)=>r[h].pathname!==d.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==d.params["*"];return s==="assets"?n.filter((d,h)=>c(d,h)||f(d,h)):s==="data"?n.filter((d,h)=>{let m=i.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function XR(e,n,{includeHydrateFallback:r}={}){return QR(e.map(i=>{let l=n.routes[i.route.id];if(!l)return[];let s=[l.module];return l.clientActionModule&&(s=s.concat(l.clientActionModule)),l.clientLoaderModule&&(s=s.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(s=s.concat(l.hydrateFallbackModule)),l.imports&&(s=s.concat(l.imports)),s}).flat(1))}function QR(e){return[...new Set(e)]}function ZR(e){let n={},r=Object.keys(e).sort();for(let i of r)n[i]=e[i];return n}function WR(e,n){let r=new Set;return new Set(n),e.reduce((i,l)=>{let s=JSON.stringify(ZR(l));return r.has(s)||(r.add(s),i.push({key:s,link:l})),i},[])}function rw(){let e=v.useContext(xo);return Jp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function JR(){let e=v.useContext(kc);return Jp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var em=v.createContext(void 0);em.displayName="FrameworkContext";function aw(){let e=v.useContext(em);return Jp(e,"You must render this element inside a <HydratedRouter> element"),e}function eN(e,n){let r=v.useContext(em),[i,l]=v.useState(!1),[s,c]=v.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=n,w=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let E=A=>{A.forEach(R=>{c(R.isIntersecting)})},T=new IntersectionObserver(E,{threshold:.5});return w.current&&T.observe(w.current),()=>{T.disconnect()}}},[e]),v.useEffect(()=>{if(i){let E=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(E)}}},[i]);let b=()=>{l(!0)},S=()=>{l(!1),c(!1)};return r?e!=="intent"?[s,w,{}]:[s,w,{onFocus:Rl(f,b),onBlur:Rl(d,S),onMouseEnter:Rl(h,b),onMouseLeave:Rl(m,S),onTouchStart:Rl(y,b)}]:[!1,w,{}]}function Rl(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function tN({page:e,...n}){let{router:r}=rw(),i=v.useMemo(()=>Y0(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?v.createElement(rN,{page:e,matches:i,...n}):null}function nN(e){let{manifest:n,routeModules:r}=aw(),[i,l]=v.useState([]);return v.useEffect(()=>{let s=!1;return KR(e,n,r).then(c=>{s||l(c)}),()=>{s=!0}},[e,n,r]),i}function rN({page:e,matches:n,...r}){let i=Wn(),{manifest:l,routeModules:s}=aw(),{basename:c}=rw(),{loaderData:f,matches:d}=JR(),h=v.useMemo(()=>ab(e,n,d,l,i,"data"),[e,n,d,l,i]),m=v.useMemo(()=>ab(e,n,d,l,i,"assets"),[e,n,d,l,i]),y=v.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let S=new Set,E=!1;if(n.forEach(A=>{let R=l.routes[A.route.id];!R||!R.hasLoader||(!h.some(N=>N.route.id===A.route.id)&&A.route.id in f&&s[A.route.id]?.shouldRevalidate||R.hasClientLoader?E=!0:S.add(A.route.id))}),S.size===0)return[];let T=$R(e,c,"data");return E&&S.size>0&&T.searchParams.set("_routes",n.filter(A=>S.has(A.route.id)).map(A=>A.route.id).join(",")),[T.pathname+T.search]},[c,f,i,l,h,n,e,s]),w=v.useMemo(()=>XR(m,l),[m,l]),b=nN(m);return v.createElement(v.Fragment,null,y.map(S=>v.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),w.map(S=>v.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),b.map(({key:S,link:E})=>v.createElement("link",{key:S,nonce:r.nonce,...E})))}function aN(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var iw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{iw&&(window.__reactRouterVersion="7.8.2")}catch{}function iN({basename:e,children:n,window:r}){let i=v.useRef();i.current==null&&(i.current=VT({window:r,v5Compat:!0}));let l=i.current,[s,c]=v.useState({action:l.action,location:l.location}),f=v.useCallback(d=>{v.startTransition(()=>c(d))},[c]);return v.useLayoutEffect(()=>l.listen(f),[l,f]),v.createElement(OR,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:l})}var ow=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sr=v.forwardRef(function({onClick:n,discover:r="render",prefetch:i="none",relative:l,reloadDocument:s,replace:c,state:f,target:d,to:h,preventScrollReset:m,viewTransition:y,...w},b){let{basename:S}=v.useContext(fr),E=typeof h=="string"&&ow.test(h),T,A=!1;if(typeof h=="string"&&E&&(T=h,iw))try{let Y=new URL(window.location.href),D=h.startsWith("//")?new URL(Y.protocol+h):new URL(h),Z=Xr(D.pathname,S);D.origin===Y.origin&&Z!=null?h=Z+D.search+D.hash:A=!0}catch{Qn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let R=gR(h,{relative:l}),[N,O,L]=eN(i,w),j=uN(h,{replace:c,state:f,target:d,preventScrollReset:m,relative:l,viewTransition:y});function H(Y){n&&n(Y),Y.defaultPrevented||j(Y)}let $=v.createElement("a",{...w,...L,href:T||R,onClick:A||s?n:H,ref:aN(b,O),target:d,"data-discover":!E&&r==="render"?"true":void 0});return N&&!E?v.createElement(v.Fragment,null,$,v.createElement(tN,{page:R})):$});Sr.displayName="Link";var oN=v.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:i="",end:l=!1,style:s,to:c,viewTransition:f,children:d,...h},m){let y=is(c,{relative:h.relative}),w=Wn(),b=v.useContext(kc),{navigator:S,basename:E}=v.useContext(fr),T=b!=null&&pN(y)&&f===!0,A=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,R=w.pathname,N=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(R=R.toLowerCase(),N=N?N.toLowerCase():null,A=A.toLowerCase()),N&&E&&(N=Xr(N,E)||N);const O=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let L=R===A||!l&&R.startsWith(A)&&R.charAt(O)==="/",j=N!=null&&(N===A||!l&&N.startsWith(A)&&N.charAt(A.length)==="/"),H={isActive:L,isPending:j,isTransitioning:T},$=L?n:void 0,Y;typeof i=="function"?Y=i(H):Y=[i,L?"active":null,j?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let D=typeof s=="function"?s(H):s;return v.createElement(Sr,{...h,"aria-current":$,className:Y,ref:m,style:D,to:c,viewTransition:f},typeof d=="function"?d(H):d)});oN.displayName="NavLink";var lN=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:l,state:s,method:c=Zu,action:f,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:y,...w},b)=>{let S=dN(),E=hN(f,{relative:h}),T=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&ow.test(f),R=N=>{if(d&&d(N),N.defaultPrevented)return;N.preventDefault();let O=N.nativeEvent.submitter,L=O?.getAttribute("formmethod")||c;S(O||N.currentTarget,{fetcherKey:n,method:L,navigate:r,replace:l,state:s,relative:h,preventScrollReset:m,viewTransition:y})};return v.createElement("form",{ref:b,method:T,action:E,onSubmit:i?d:R,...w,"data-discover":!A&&e==="render"?"true":void 0})});lN.displayName="Form";function sN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lw(e){let n=v.useContext(xo);return ht(n,sN(e)),n}function uN(e,{target:n,replace:r,state:i,preventScrollReset:l,relative:s,viewTransition:c}={}){let f=as(),d=Wn(),h=is(e,{relative:s});return v.useCallback(m=>{if(UR(m,n)){m.preventDefault();let y=r!==void 0?r:$l(d)===$l(h);f(e,{replace:y,state:i,preventScrollReset:l,relative:s,viewTransition:c})}},[d,f,h,r,i,n,e,l,s,c])}function QU(e){Qn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=v.useRef(ap(e)),r=v.useRef(!1),i=Wn(),l=v.useMemo(()=>HR(i.search,r.current?null:n.current),[i.search]),s=as(),c=v.useCallback((f,d)=>{const h=ap(typeof f=="function"?f(new URLSearchParams(l)):f);r.current=!0,s("?"+h,d)},[s,l]);return[l,c]}var cN=0,fN=()=>`__${String(++cN)}__`;function dN(){let{router:e}=lw("useSubmit"),{basename:n}=v.useContext(fr),r=NR();return v.useCallback(async(i,l={})=>{let{action:s,method:c,encType:f,formData:d,body:h}=qR(i,n);if(l.navigate===!1){let m=l.fetcherKey||fN();await e.fetch(m,r,l.action||s,{preventScrollReset:l.preventScrollReset,formData:d,body:h,formMethod:l.method||c,formEncType:l.encType||f,flushSync:l.flushSync})}else await e.navigate(l.action||s,{preventScrollReset:l.preventScrollReset,formData:d,body:h,formMethod:l.method||c,formEncType:l.encType||f,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[e,n,r])}function hN(e,{relative:n}={}){let{basename:r}=v.useContext(fr),i=v.useContext(Zn);ht(i,"useFormAction must be used inside a RouteContext");let[l]=i.matches.slice(-1),s={...is(e||".",{relative:n})},c=Wn();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search),d=f.getAll("index");if(d.some(m=>m==="")){f.delete("index"),d.filter(y=>y).forEach(y=>f.append("index",y));let m=f.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&l.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Kr([r,s.pathname])),$l(s)}function pN(e,{relative:n}={}){let r=v.useContext(Z0);ht(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=lw("useViewTransitionState"),l=is(e,{relative:n});if(!r.isTransitioning)return!1;let s=Xr(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=Xr(r.nextLocation.pathname,i)||r.nextLocation.pathname;return lc(l.pathname,c)!=null||lc(l.pathname,s)!=null}var wo=G0();const mN=Cc(wo);var Tc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rc=typeof window>"u"||"Deno"in globalThis;function lr(){}function gN(e,n){return typeof e=="function"?e(n):e}function yN(e){return typeof e=="number"&&e>=0&&e!==1/0}function vN(e,n){return Math.max(e+(n||0)-Date.now(),0)}function ip(e,n){return typeof e=="function"?e(n):e}function xN(e,n){return typeof e=="function"?e(n):e}function ib(e,n){const{type:r="all",exact:i,fetchStatus:l,predicate:s,queryKey:c,stale:f}=e;if(c){if(i){if(n.queryHash!==tm(c,n.options))return!1}else if(!Yl(n.queryKey,c))return!1}if(r!=="all"){const d=n.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||l&&l!==n.state.fetchStatus||s&&!s(n))}function ob(e,n){const{exact:r,status:i,predicate:l,mutationKey:s}=e;if(s){if(!n.options.mutationKey)return!1;if(r){if(Gl(n.options.mutationKey)!==Gl(s))return!1}else if(!Yl(n.options.mutationKey,s))return!1}return!(i&&n.state.status!==i||l&&!l(n))}function tm(e,n){return(n?.queryKeyHashFn||Gl)(e)}function Gl(e){return JSON.stringify(e,(n,r)=>op(r)?Object.keys(r).sort().reduce((i,l)=>(i[l]=r[l],i),{}):r)}function Yl(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>Yl(e[r],n[r])):!1}function sw(e,n){if(e===n)return e;const r=lb(e)&&lb(n);if(r||op(e)&&op(n)){const i=r?e:Object.keys(e),l=i.length,s=r?n:Object.keys(n),c=s.length,f=r?[]:{},d=new Set(i);let h=0;for(let m=0;m<c;m++){const y=r?m:s[m];(!r&&d.has(y)||r)&&e[y]===void 0&&n[y]===void 0?(f[y]=void 0,h++):(f[y]=sw(e[y],n[y]),f[y]===e[y]&&e[y]!==void 0&&h++)}return l===c&&h===l?e:f}return n}function lb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function op(e){if(!sb(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!sb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sb(e){return Object.prototype.toString.call(e)==="[object Object]"}function bN(e){return new Promise(n=>{setTimeout(n,e)})}function wN(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?sw(e,n):n}function SN(e,n,r=0){const i=[...e,n];return r&&i.length>r?i.slice(1):i}function EN(e,n,r=0){const i=[n,...e];return r&&i.length>r?i.slice(0,-1):i}var nm=Symbol();function uw(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===nm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var CN=class extends Tc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Rc&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},cw=new CN,kN=class extends Tc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Rc&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},sc=new kN;function AN(){let e,n;const r=new Promise((l,s)=>{e=l,n=s});r.status="pending",r.catch(()=>{});function i(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{i({status:"fulfilled",value:l}),e(l)},r.reject=l=>{i({status:"rejected",reason:l}),n(l)},r}function TN(e){return Math.min(1e3*2**e,3e4)}function fw(e){return(e??"online")==="online"?sc.isOnline():!0}var dw=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function hw(e){let n=!1,r=0,i;const l=AN(),s=()=>l.status!=="pending",c=E=>{s()||(w(new dw(E)),e.abort?.())},f=()=>{n=!0},d=()=>{n=!1},h=()=>cw.isFocused()&&(e.networkMode==="always"||sc.isOnline())&&e.canRun(),m=()=>fw(e.networkMode)&&e.canRun(),y=E=>{s()||(i?.(),l.resolve(E))},w=E=>{s()||(i?.(),l.reject(E))},b=()=>new Promise(E=>{i=T=>{(s()||h())&&E(T)},e.onPause?.()}).then(()=>{i=void 0,s()||e.onContinue?.()}),S=()=>{if(s())return;let E;const T=r===0?e.initialPromise:void 0;try{E=T??e.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(y).catch(A=>{if(s())return;const R=e.retry??(Rc?0:3),N=e.retryDelay??TN,O=typeof N=="function"?N(r,A):N,L=R===!0||typeof R=="number"&&r<R||typeof R=="function"&&R(r,A);if(n||!L){w(A);return}r++,e.onFail?.(r,A),bN(O).then(()=>h()?void 0:b()).then(()=>{n?w(A):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(i?.(),l),cancelRetry:f,continueRetry:d,canStart:m,start:()=>(m()?S():b().then(S),l)}}var RN=e=>setTimeout(e,0);function NN(){let e=[],n=0,r=f=>{f()},i=f=>{f()},l=RN;const s=f=>{n?e.push(f):l(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{i(()=>{f.forEach(d=>{r(d)})})})};return{batch:f=>{let d;n++;try{d=f()}finally{n--,n||c()}return d},batchCalls:f=>(...d)=>{s(()=>{f(...d)})},schedule:s,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{l=f}}}var ln=NN(),pw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yN(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rc?1/0:300*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},_N=class extends pw{#e;#t;#n;#a;#r;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=jN(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=wN(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#i({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(lr).catch(lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>xN(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ip(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!vN(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},l=()=>{const f=uw(this.options,n),h=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#l=!1,this.options.persister?this.options.persister(f,h,this):f(h)},c=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:l};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=hw({initialPromise:n?.initialPromise,fn:c.fetchFn,abort:r.abort.bind(r),onFail:(f,d)=>{this.#i({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof dw){if(f.silent)return this.#r.promise;if(f.revert){if(this.setState({...this.#t,fetchStatus:"idle"}),this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...MN(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),ln.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function MN(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fw(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jN(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var DN=class extends Tc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const i=n.queryKey,l=n.queryHash??tm(i,n);let s=this.get(l);return s||(s=new _N({client:e,queryKey:i,queryHash:l,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ln.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>ib(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>ib(e,r)):n}notify(e){ln.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){ln.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ln.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ON=class extends pw{#e;#t;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||PN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(n=>n!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#a({type:"continue"})};this.#n=hw({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(l,s)=>{this.#a({type:"failed",failureCount:l,error:s})},onPause:()=>{this.#a({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#n.canStart();try{if(r)n();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#t.config.onMutate?.(e,this);const s=await this.options.onMutate?.(e);s!==this.state.context&&this.#a({type:"pending",context:s,variables:e,isPaused:i})}const l=await this.#n.start();return await this.#t.config.onSuccess?.(l,e,this.state.context,this),await this.options.onSuccess?.(l,e,this.state.context),await this.#t.config.onSettled?.(l,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(l,null,e,this.state.context),this.#a({type:"success",data:l}),l}catch(l){try{throw await this.#t.config.onError?.(l,e,this.state.context,this),await this.options.onError?.(l,e,this.state.context),await this.#t.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,l,e,this.state.context),l}finally{this.#a({type:"error",error:l})}}finally{this.#t.runNext(this)}}#a(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ln.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function PN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var LN=class extends Tc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const i=new ON({mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){this.#e.add(e);const n=zu(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=zu(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=zu(e);if(typeof n=="string"){const i=this.#t.get(n)?.find(l=>l.state.status==="pending");return!i||i===e}else return!0}runNext(e){const n=zu(e);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ln.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>ob(n,r))}findAll(e={}){return this.getAll().filter(n=>ob(e,n))}notify(e){ln.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ln.batch(()=>Promise.all(e.map(n=>n.continue().catch(lr))))}};function zu(e){return e.options.scope?.id}function ub(e){return{onFetch:(n,r)=>{const i=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,s=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let m=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(n.signal.aborted?m=!0:n.signal.addEventListener("abort",()=>{m=!0}),n.signal)})},w=uw(n.options,n.fetchOptions),b=async(S,E,T)=>{if(m)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const R=(()=>{const j={client:n.client,queryKey:n.queryKey,pageParam:E,direction:T?"backward":"forward",meta:n.options.meta};return y(j),j})(),N=await w(R),{maxPages:O}=n.options,L=T?EN:SN;return{pages:L(S.pages,N,O),pageParams:L(S.pageParams,E,O)}};if(l&&s.length){const S=l==="backward",E=S?zN:cb,T={pages:s,pageParams:c},A=E(i,T);f=await b(T,A,S)}else{const S=e??s.length;do{const E=d===0?c[0]??i.initialPageParam:cb(i,f);if(d>0&&E==null)break;f=await b(f,E),d++}while(d<S)}return f};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=h}}}function cb(e,{pages:n,pageParams:r}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,r[i],r):void 0}function zN(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var IN=class{#e;#t;#n;#a;#r;#o;#l;#i;constructor(e={}){this.#e=e.queryCache||new DN,this.#t=e.mutationCache||new LN,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#l=cw.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=sc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#l?.(),this.#l=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ip(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(e,n,r){const i=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(i.queryHash)?.state.data,c=gN(n,s);if(c!==void 0)return this.#e.build(this,i).setData(c,{...r,manual:!0})}setQueriesData(e,n,r){return ln.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;ln.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return ln.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},i=ln.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(i).then(lr).catch(lr)}invalidateQueries(e,n={}){return ln.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=ln.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let s=l.fetch(void 0,r);return r.throwOnError||(s=s.catch(lr)),l.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(lr)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(ip(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lr).catch(lr)}fetchInfiniteQuery(e){return e.behavior=ub(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(lr).catch(lr)}ensureInfiniteQueryData(e){return e.behavior=ub(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return sc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#a.set(Gl(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(i=>{Yl(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(Gl(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(i=>{Yl(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=tm(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===nm&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},BN=v.createContext(void 0),UN=({client:e,children:n})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(BN.Provider,{value:e,children:n}));const HN={theme:"system",setTheme:()=>null},mw=v.createContext(HN);function FN({children:e,defaultTheme:n="system",storageKey:r="ui-theme",...i}){const[l,s]=v.useState(n);v.useEffect(()=>{const f=localStorage?.getItem(r);f&&s(f)},[r]),v.useEffect(()=>{const f=window.document.documentElement;if(f.classList.remove("light","dark","coconut"),l==="system"){const d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";f.classList.add(d);return}f.classList.add(l)},[l]);const c={theme:l,setTheme:f=>{localStorage?.setItem(r,f),s(f)}};return g.jsx(mw.Provider,{...i,value:c,children:e})}const ZU=()=>{const e=v.useContext(mw);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Et="",WU="https://app.coconut.dev";async function eo(e,n={}){const r=`${Et}${e}`,i={headers:{"Content-Type":"application/json",...n.headers},...n},l=await fetch(r,i);if(!l.ok)throw new Error(`API request failed: ${l.status} ${l.statusText}`);return l.json()}const JU=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`,gw=v.createContext(void 0);function VN({children:e}){const[n,r]=v.useState({user:null,isAuthenticated:!1,isLoading:!0,authEnabled:!1}),i=v.useCallback(async()=>{try{const d=await eo("/api/v1/auth/status");if(!d.success){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}if(!(d.data?.enabled||!1)){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}try{const m=await eo("/api/v1/auth/me");m.success&&m.data?.user?r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0}):r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}catch{r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}}catch(d){console.error("Failed to check auth status:",d),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1})}},[]);v.useEffect(()=>{i()},[i]);const l=v.useCallback(async(d,h)=>{const m=await eo("/api/v1/auth/login",{method:"POST",body:JSON.stringify({email:d,password:h})});if(!m.success)throw new Error(m.error||"Login failed");r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),s=v.useCallback(async(d,h,m)=>{const y=await eo("/api/v1/auth/register",{method:"POST",body:JSON.stringify({email:d,password:h,name:m})});if(!y.success)throw new Error(y.error||"Registration failed");r({user:y.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),c=v.useCallback(async()=>{await eo("/api/v1/auth/logout",{method:"POST"}),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})},[]),f=v.useCallback(async()=>{try{const d=await eo("/api/v1/auth/me");d.success&&d.data?.user&&r(h=>({...h,user:d.data.user,isAuthenticated:!0}))}catch(d){console.error("Failed to refresh user:",d)}},[]);return g.jsx(gw.Provider,{value:{...n,login:l,register:s,logout:c,refreshUser:f,checkAuthStatus:i},children:e})}function yw(){const e=v.useContext(gw);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const vw=v.createContext(null);function qN(){const e=v.useContext(vw);if(!e)throw new Error("useSidebarBadges must be used within SidebarBadgeProvider");return e}function $N({children:e,pollInterval:n=1e4}){const[r,i]=v.useState({codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0}),[l,s]=v.useState(!0),c=v.useCallback(async()=>{try{const[d,h,m]=await Promise.allSettled([fetch(`${Et}/api/v1/terminal/sessions`).then(w=>w.json()),fetch(`${Et}/api/v1/git/status`).then(w=>w.json()),fetch(`${Et}/api/v1/jobs`).then(w=>w.json())]),y={codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0};if(d.status==="fulfilled"&&d.value?.sessions){const w=d.value.sessions;y.codeSessions=w.filter(b=>b.proposalId?.startsWith("cp-")||b.proposalId?.startsWith("ag-")).length,y.terminalSessions=w.filter(b=>!b.proposalId?.startsWith("cp-")&&!b.proposalId?.startsWith("ag-")).length}if(h.status==="fulfilled"&&h.value?.success&&h.value?.data?.changes&&(y.gitChanges=h.value.data.changes.length),m.status==="fulfilled"&&m.value?.success&&m.value?.data){const w=Array.isArray(m.value.data)?m.value.data:[],b=w.filter(S=>{if(!S.runs||!Array.isArray(S.runs)||S.runs.length===0)return!1;const E=S.runs[0],T=E&&E.status==="running";return T&&console.log("[SidebarBadge] Running job detected:",{name:S.name,status:E.status,startedAt:E.startedAt,finishedAt:E.finishedAt}),T});y.runningScheduledJobs=b.length,(b.length>0||w.length>0)&&console.log("[SidebarBadge] Jobs summary:",{total:w.length,running:b.length,runningJobNames:b.map(S=>S.name)})}i(y)}catch(d){console.error("Failed to fetch sidebar badges:",d)}finally{s(!1)}},[]);v.useEffect(()=>{c()},[c]),v.useEffect(()=>{const d=setInterval(c,n);return()=>clearInterval(d)},[c,n]),v.useEffect(()=>{const d=()=>{console.log("[SidebarBadge] Tab focused, refreshing badges..."),c()};return window.addEventListener("focus",d),()=>window.removeEventListener("focus",d)},[c]);const f={badges:r,loading:l,refresh:c};return g.jsx(vw.Provider,{value:f,children:e})}function GN({children:e}){const[n]=v.useState(()=>new IN({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}}));return g.jsx(UN,{client:n,children:g.jsx(FN,{defaultTheme:"system",storageKey:"coconut-ui-theme",children:g.jsx(VN,{children:g.jsx($N,{children:e})})})})}const YN=1,KN=1e6;let Sh=0;function XN(){return Sh=(Sh+1)%Number.MAX_SAFE_INTEGER,Sh.toString()}const Eh=new Map,fb=e=>{if(Eh.has(e))return;const n=setTimeout(()=>{Eh.delete(e),Ul({type:"REMOVE_TOAST",toastId:e})},KN);Eh.set(e,n)},QN=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,YN)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===n.toast.id?{...r,...n.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=n;return r?fb(r):e.toasts.forEach(i=>{fb(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==n.toastId)}}},Ju=[];let ec={toasts:[]};function Ul(e){ec=QN(ec,e),Ju.forEach(n=>{n(ec)})}function lp({...e}){const n=XN(),r=l=>Ul({type:"UPDATE_TOAST",toast:{...l,id:n}}),i=()=>Ul({type:"DISMISS_TOAST",toastId:n});return Ul({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:l=>{l||i()}}}),{id:n,dismiss:i,update:r}}function ZN(){const[e,n]=v.useState(ec);return v.useEffect(()=>(Ju.push(n),()=>{const r=Ju.indexOf(n);r>-1&&Ju.splice(r,1)}),[e]),{...e,toast:lp,dismiss:r=>Ul({type:"DISMISS_TOAST",toastId:r})}}function me(e,n,{checkForDefaultPrevented:r=!0}={}){return function(l){if(e?.(l),r===!1||!l.defaultPrevented)return n?.(l)}}function db(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Nc(...e){return n=>{let r=!1;const i=e.map(l=>{const s=db(l,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let l=0;l<i.length;l++){const s=i[l];typeof s=="function"?s():db(e[l],null)}}}}function ze(...e){return v.useCallback(Nc(...e),e)}function WN(e,n){const r=v.createContext(n),i=s=>{const{children:c,...f}=s,d=v.useMemo(()=>f,Object.values(f));return g.jsx(r.Provider,{value:d,children:c})};i.displayName=e+"Provider";function l(s){const c=v.useContext(r);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[i,l]}function Jn(e,n=[]){let r=[];function i(s,c){const f=v.createContext(c),d=r.length;r=[...r,c];const h=y=>{const{scope:w,children:b,...S}=y,E=w?.[e]?.[d]||f,T=v.useMemo(()=>S,Object.values(S));return g.jsx(E.Provider,{value:T,children:b})};h.displayName=s+"Provider";function m(y,w){const b=w?.[e]?.[d]||f,S=v.useContext(b);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[h,m]}const l=()=>{const s=r.map(c=>v.createContext(c));return function(f){const d=f?.[e]||s;return v.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return l.scopeName=e,[i,JN(l,...n)]}function JN(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const i=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(s){const c=i.reduce((f,{useScope:d,scopeName:h})=>{const y=d(s)[`__scope${h}`];return{...f,...y}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return r.scopeName=n.scopeName,r}function si(e){const n=e_(e),r=v.forwardRef((i,l)=>{const{children:s,...c}=i,f=v.Children.toArray(s),d=f.find(t_);if(d){const h=d.props.children,m=f.map(y=>y===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:y);return g.jsx(n,{...c,ref:l,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return g.jsx(n,{...c,ref:l,children:s})});return r.displayName=`${e}.Slot`,r}var So=si("Slot");function e_(e){const n=v.forwardRef((r,i)=>{const{children:l,...s}=r;if(v.isValidElement(l)){const c=r_(l),f=n_(s,l.props);return l.type!==v.Fragment&&(f.ref=i?Nc(i,c):c),v.cloneElement(l,f)}return v.Children.count(l)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var xw=Symbol("radix.slottable");function bw(e){const n=({children:r})=>g.jsx(g.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=xw,n}function t_(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xw}function n_(e,n){const r={...n};for(const i in n){const l=e[i],s=n[i];/^on[A-Z]/.test(i)?l&&s?r[i]=(...f)=>{const d=s(...f);return l(...f),d}:l&&(r[i]=l):i==="style"?r[i]={...l,...s}:i==="className"&&(r[i]=[l,s].filter(Boolean).join(" "))}return{...e,...r}}function r_(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function _c(e){const n=e+"CollectionProvider",[r,i]=Jn(n),[l,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),c=E=>{const{scope:T,children:A}=E,R=Aa.useRef(null),N=Aa.useRef(new Map).current;return g.jsx(l,{scope:T,itemMap:N,collectionRef:R,children:A})};c.displayName=n;const f=e+"CollectionSlot",d=si(f),h=Aa.forwardRef((E,T)=>{const{scope:A,children:R}=E,N=s(f,A),O=ze(T,N.collectionRef);return g.jsx(d,{ref:O,children:R})});h.displayName=f;const m=e+"CollectionItemSlot",y="data-radix-collection-item",w=si(m),b=Aa.forwardRef((E,T)=>{const{scope:A,children:R,...N}=E,O=Aa.useRef(null),L=ze(T,O),j=s(m,A);return Aa.useEffect(()=>(j.itemMap.set(O,{ref:O,...N}),()=>void j.itemMap.delete(O))),g.jsx(w,{[y]:"",ref:L,children:R})});b.displayName=m;function S(E){const T=s(e+"CollectionConsumer",E);return Aa.useCallback(()=>{const R=T.collectionRef.current;if(!R)return[];const N=Array.from(R.querySelectorAll(`[${y}]`));return Array.from(T.itemMap.values()).sort((j,H)=>N.indexOf(j.ref.current)-N.indexOf(H.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:c,Slot:h,ItemSlot:b},S,i]}var a_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=a_.reduce((e,n)=>{const r=si(`Primitive.${n}`),i=v.forwardRef((l,s)=>{const{asChild:c,...f}=l,d=c?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...f,ref:s})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function rm(e,n){e&&wo.flushSync(()=>e.dispatchEvent(n))}function Tt(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...r)=>n.current?.(...r),[])}function i_(e,n=globalThis?.document){const r=Tt(e);v.useEffect(()=>{const i=l=>{l.key==="Escape"&&r(l)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[r,n])}var o_="DismissableLayer",sp="dismissableLayer.update",l_="dismissableLayer.pointerDownOutside",s_="dismissableLayer.focusOutside",hb,ww=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Eo=v.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:c,onDismiss:f,...d}=e,h=v.useContext(ww),[m,y]=v.useState(null),w=m?.ownerDocument??globalThis?.document,[,b]=v.useState({}),S=ze(n,H=>y(H)),E=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),A=E.indexOf(T),R=m?E.indexOf(m):-1,N=h.layersWithOutsidePointerEventsDisabled.size>0,O=R>=A,L=c_(H=>{const $=H.target,Y=[...h.branches].some(D=>D.contains($));!O||Y||(l?.(H),c?.(H),H.defaultPrevented||f?.())},w),j=f_(H=>{const $=H.target;[...h.branches].some(D=>D.contains($))||(s?.(H),c?.(H),H.defaultPrevented||f?.())},w);return i_(H=>{R===h.layers.size-1&&(i?.(H),!H.defaultPrevented&&f&&(H.preventDefault(),f()))},w),v.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(hb=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),pb(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=hb)}},[m,w,r,h]),v.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),pb())},[m,h]),v.useEffect(()=>{const H=()=>b({});return document.addEventListener(sp,H),()=>document.removeEventListener(sp,H)},[]),g.jsx(_e.div,{...d,ref:S,style:{pointerEvents:N?O?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,j.onFocusCapture),onBlurCapture:me(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,L.onPointerDownCapture)})});Eo.displayName=o_;var u_="DismissableLayerBranch",Sw=v.forwardRef((e,n)=>{const r=v.useContext(ww),i=v.useRef(null),l=ze(n,i);return v.useEffect(()=>{const s=i.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(_e.div,{...e,ref:l})});Sw.displayName=u_;function c_(e,n=globalThis?.document){const r=Tt(e),i=v.useRef(!1),l=v.useRef(()=>{});return v.useEffect(()=>{const s=f=>{if(f.target&&!i.current){let d=function(){Ew(l_,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",l.current),l.current=d,n.addEventListener("click",l.current,{once:!0})):d()}else n.removeEventListener("click",l.current);i.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",s),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function f_(e,n=globalThis?.document){const r=Tt(e),i=v.useRef(!1);return v.useEffect(()=>{const l=s=>{s.target&&!i.current&&Ew(s_,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",l),()=>n.removeEventListener("focusin",l)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function pb(){const e=new CustomEvent(sp);document.dispatchEvent(e)}function Ew(e,n,r,{discrete:i}){const l=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&l.addEventListener(e,n,{once:!0}),i?rm(l,s):l.dispatchEvent(s)}var d_=Eo,h_=Sw,$t=globalThis?.document?v.useLayoutEffect:()=>{},p_="Portal",os=v.forwardRef((e,n)=>{const{container:r,...i}=e,[l,s]=v.useState(!1);$t(()=>s(!0),[]);const c=r||l&&globalThis?.document?.body;return c?mN.createPortal(g.jsx(_e.div,{...i,ref:n}),c):null});os.displayName=p_;function m_(e,n){return v.useReducer((r,i)=>n[r][i]??r,e)}var un=e=>{const{present:n,children:r}=e,i=g_(n),l=typeof r=="function"?r({present:i.isPresent}):v.Children.only(r),s=ze(i.ref,y_(l));return typeof r=="function"||i.isPresent?v.cloneElement(l,{ref:s}):null};un.displayName="Presence";function g_(e){const[n,r]=v.useState(),i=v.useRef(null),l=v.useRef(e),s=v.useRef("none"),c=e?"mounted":"unmounted",[f,d]=m_(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Iu(i.current);s.current=f==="mounted"?h:"none"},[f]),$t(()=>{const h=i.current,m=l.current;if(m!==e){const w=s.current,b=Iu(h);e?d("MOUNT"):b==="none"||h?.display==="none"?d("UNMOUNT"):d(m&&w!==b?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,d]),$t(()=>{if(n){let h;const m=n.ownerDocument.defaultView??window,y=b=>{const E=Iu(i.current).includes(CSS.escape(b.animationName));if(b.target===n&&E&&(d("ANIMATION_END"),!l.current)){const T=n.style.animationFillMode;n.style.animationFillMode="forwards",h=m.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=T)})}},w=b=>{b.target===n&&(s.current=Iu(i.current))};return n.addEventListener("animationstart",w),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{m.clearTimeout(h),n.removeEventListener("animationstart",w),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v.useCallback(h=>{i.current=h?getComputedStyle(h):null,r(h)},[])}}function Iu(e){return e?.animationName||"none"}function y_(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var v_=$0[" useInsertionEffect ".trim().toString()]||$t;function _a({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){const[l,s,c]=x_({defaultProp:n,onChange:r}),f=e!==void 0,d=f?e:l;{const m=v.useRef(e!==void 0);v.useEffect(()=>{const y=m.current;y!==f&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=f},[f,i])}const h=v.useCallback(m=>{if(f){const y=b_(m)?m(e):m;y!==e&&c.current?.(y)}else s(m)},[f,e,s,c]);return[d,h]}function x_({defaultProp:e,onChange:n}){const[r,i]=v.useState(e),l=v.useRef(r),s=v.useRef(n);return v_(()=>{s.current=n},[n]),v.useEffect(()=>{l.current!==r&&(s.current?.(r),l.current=r)},[r,l]),[r,i,s]}function b_(e){return typeof e=="function"}var Cw=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),w_="VisuallyHidden",Mc=v.forwardRef((e,n)=>g.jsx(_e.span,{...e,ref:n,style:{...Cw,...e.style}}));Mc.displayName=w_;var S_=Mc,am="ToastProvider",[im,E_,C_]=_c("Toast"),[kw,eH]=Jn("Toast",[C_]),[k_,jc]=kw(am),Aw=e=>{const{__scopeToast:n,label:r="Notification",duration:i=5e3,swipeDirection:l="right",swipeThreshold:s=50,children:c}=e,[f,d]=v.useState(null),[h,m]=v.useState(0),y=v.useRef(!1),w=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${am}\`. Expected non-empty \`string\`.`),g.jsx(im.Provider,{scope:n,children:g.jsx(k_,{scope:n,label:r,duration:i,swipeDirection:l,swipeThreshold:s,toastCount:h,viewport:f,onViewportChange:d,onToastAdd:v.useCallback(()=>m(b=>b+1),[]),onToastRemove:v.useCallback(()=>m(b=>b-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:w,children:c})})};Aw.displayName=am;var Tw="ToastViewport",A_=["F8"],up="toast.viewportPause",cp="toast.viewportResume",Rw=v.forwardRef((e,n)=>{const{__scopeToast:r,hotkey:i=A_,label:l="Notifications ({hotkey})",...s}=e,c=jc(Tw,r),f=E_(r),d=v.useRef(null),h=v.useRef(null),m=v.useRef(null),y=v.useRef(null),w=ze(n,y,c.onViewportChange),b=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=c.toastCount>0;v.useEffect(()=>{const T=A=>{i.length!==0&&i.every(N=>A[N]||A.code===N)&&y.current?.focus()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[i]),v.useEffect(()=>{const T=d.current,A=y.current;if(S&&T&&A){const R=()=>{if(!c.isClosePausedRef.current){const j=new CustomEvent(up);A.dispatchEvent(j),c.isClosePausedRef.current=!0}},N=()=>{if(c.isClosePausedRef.current){const j=new CustomEvent(cp);A.dispatchEvent(j),c.isClosePausedRef.current=!1}},O=j=>{!T.contains(j.relatedTarget)&&N()},L=()=>{T.contains(document.activeElement)||N()};return T.addEventListener("focusin",R),T.addEventListener("focusout",O),T.addEventListener("pointermove",R),T.addEventListener("pointerleave",L),window.addEventListener("blur",R),window.addEventListener("focus",N),()=>{T.removeEventListener("focusin",R),T.removeEventListener("focusout",O),T.removeEventListener("pointermove",R),T.removeEventListener("pointerleave",L),window.removeEventListener("blur",R),window.removeEventListener("focus",N)}}},[S,c.isClosePausedRef]);const E=v.useCallback(({tabbingDirection:T})=>{const R=f().map(N=>{const O=N.ref.current,L=[O,...B_(O)];return T==="forwards"?L:L.reverse()});return(T==="forwards"?R.reverse():R).flat()},[f]);return v.useEffect(()=>{const T=y.current;if(T){const A=R=>{const N=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!N){const L=document.activeElement,j=R.shiftKey;if(R.target===T&&j){h.current?.focus();return}const Y=E({tabbingDirection:j?"backwards":"forwards"}),D=Y.findIndex(Z=>Z===L);Ch(Y.slice(D+1))?R.preventDefault():j?h.current?.focus():m.current?.focus()}};return T.addEventListener("keydown",A),()=>T.removeEventListener("keydown",A)}},[f,E]),g.jsxs(h_,{ref:d,role:"region","aria-label":l.replace("{hotkey}",b),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&g.jsx(fp,{ref:h,onFocusFromOutsideViewport:()=>{const T=E({tabbingDirection:"forwards"});Ch(T)}}),g.jsx(im.Slot,{scope:r,children:g.jsx(_e.ol,{tabIndex:-1,...s,ref:w})}),S&&g.jsx(fp,{ref:m,onFocusFromOutsideViewport:()=>{const T=E({tabbingDirection:"backwards"});Ch(T)}})]})});Rw.displayName=Tw;var Nw="ToastFocusProxy",fp=v.forwardRef((e,n)=>{const{__scopeToast:r,onFocusFromOutsideViewport:i,...l}=e,s=jc(Nw,r);return g.jsx(Mc,{tabIndex:0,...l,ref:n,style:{position:"fixed"},onFocus:c=>{const f=c.relatedTarget;!s.viewport?.contains(f)&&i()}})});fp.displayName=Nw;var ls="Toast",T_="toast.swipeStart",R_="toast.swipeMove",N_="toast.swipeCancel",__="toast.swipeEnd",_w=v.forwardRef((e,n)=>{const{forceMount:r,open:i,defaultOpen:l,onOpenChange:s,...c}=e,[f,d]=_a({prop:i,defaultProp:l??!0,onChange:s,caller:ls});return g.jsx(un,{present:r||f,children:g.jsx(D_,{open:f,...c,ref:n,onClose:()=>d(!1),onPause:Tt(e.onPause),onResume:Tt(e.onResume),onSwipeStart:me(e.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:me(e.onSwipeMove,h=>{const{x:m,y}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:me(e.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:me(e.onSwipeEnd,h=>{const{x:m,y}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),d(!1)})})})});_w.displayName=ls;var[M_,j_]=kw(ls,{onClose(){}}),D_=v.forwardRef((e,n)=>{const{__scopeToast:r,type:i="foreground",duration:l,open:s,onClose:c,onEscapeKeyDown:f,onPause:d,onResume:h,onSwipeStart:m,onSwipeMove:y,onSwipeCancel:w,onSwipeEnd:b,...S}=e,E=jc(ls,r),[T,A]=v.useState(null),R=ze(n,G=>A(G)),N=v.useRef(null),O=v.useRef(null),L=l||E.duration,j=v.useRef(0),H=v.useRef(L),$=v.useRef(0),{onToastAdd:Y,onToastRemove:D}=E,Z=Tt(()=>{T?.contains(document.activeElement)&&E.viewport?.focus(),c()}),J=v.useCallback(G=>{!G||G===1/0||(window.clearTimeout($.current),j.current=new Date().getTime(),$.current=window.setTimeout(Z,G))},[Z]);v.useEffect(()=>{const G=E.viewport;if(G){const ae=()=>{J(H.current),h?.()},z=()=>{const Q=new Date().getTime()-j.current;H.current=H.current-Q,window.clearTimeout($.current),d?.()};return G.addEventListener(up,z),G.addEventListener(cp,ae),()=>{G.removeEventListener(up,z),G.removeEventListener(cp,ae)}}},[E.viewport,L,d,h,J]),v.useEffect(()=>{s&&!E.isClosePausedRef.current&&J(L)},[s,L,E.isClosePausedRef,J]),v.useEffect(()=>(Y(),()=>D()),[Y,D]);const ne=v.useMemo(()=>T?zw(T):null,[T]);return E.viewport?g.jsxs(g.Fragment,{children:[ne&&g.jsx(O_,{__scopeToast:r,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:ne}),g.jsx(M_,{scope:r,onClose:Z,children:wo.createPortal(g.jsx(im.ItemSlot,{scope:r,children:g.jsx(d_,{asChild:!0,onEscapeKeyDown:me(f,()=>{E.isFocusedToastEscapeKeyDownRef.current||Z(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(_e.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":E.swipeDirection,...S,ref:R,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:me(e.onKeyDown,G=>{G.key==="Escape"&&(f?.(G.nativeEvent),G.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:me(e.onPointerDown,G=>{G.button===0&&(N.current={x:G.clientX,y:G.clientY})}),onPointerMove:me(e.onPointerMove,G=>{if(!N.current)return;const ae=G.clientX-N.current.x,z=G.clientY-N.current.y,Q=!!O.current,B=["left","right"].includes(E.swipeDirection),ie=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,k=B?ie(0,ae):0,W=B?0:ie(0,z),se=G.pointerType==="touch"?10:2,M={x:k,y:W},ce={originalEvent:G,delta:M};Q?(O.current=M,Bu(R_,y,ce,{discrete:!1})):mb(M,E.swipeDirection,se)?(O.current=M,Bu(T_,m,ce,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(ae)>se||Math.abs(z)>se)&&(N.current=null)}),onPointerUp:me(e.onPointerUp,G=>{const ae=O.current,z=G.target;if(z.hasPointerCapture(G.pointerId)&&z.releasePointerCapture(G.pointerId),O.current=null,N.current=null,ae){const Q=G.currentTarget,B={originalEvent:G,delta:ae};mb(ae,E.swipeDirection,E.swipeThreshold)?Bu(__,b,B,{discrete:!0}):Bu(N_,w,B,{discrete:!0}),Q.addEventListener("click",ie=>ie.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),O_=e=>{const{__scopeToast:n,children:r,...i}=e,l=jc(ls,n),[s,c]=v.useState(!1),[f,d]=v.useState(!1);return z_(()=>c(!0)),v.useEffect(()=>{const h=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(h)},[]),f?null:g.jsx(os,{asChild:!0,children:g.jsx(Mc,{...i,children:s&&g.jsxs(g.Fragment,{children:[l.label," ",r]})})})},P_="ToastTitle",Mw=v.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(_e.div,{...i,ref:n})});Mw.displayName=P_;var L_="ToastDescription",jw=v.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(_e.div,{...i,ref:n})});jw.displayName=L_;var Dw="ToastAction",Ow=v.forwardRef((e,n)=>{const{altText:r,...i}=e;return r.trim()?g.jsx(Lw,{altText:r,asChild:!0,children:g.jsx(om,{...i,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dw}\`. Expected non-empty \`string\`.`),null)});Ow.displayName=Dw;var Pw="ToastClose",om=v.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e,l=j_(Pw,r);return g.jsx(Lw,{asChild:!0,children:g.jsx(_e.button,{type:"button",...i,ref:n,onClick:me(e.onClick,l.onClose)})})});om.displayName=Pw;var Lw=v.forwardRef((e,n)=>{const{__scopeToast:r,altText:i,...l}=e;return g.jsx(_e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...l,ref:n})});function zw(e){const n=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&n.push(i.textContent),I_(i)){const l=i.ariaHidden||i.hidden||i.style.display==="none",s=i.dataset.radixToastAnnounceExclude==="";if(!l)if(s){const c=i.dataset.radixToastAnnounceAlt;c&&n.push(c)}else n.push(...zw(i))}}),n}function Bu(e,n,r,{discrete:i}){const l=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});n&&l.addEventListener(e,n,{once:!0}),i?rm(l,s):l.dispatchEvent(s)}var mb=(e,n,r=0)=>{const i=Math.abs(e.x),l=Math.abs(e.y),s=i>l;return n==="left"||n==="right"?s&&i>r:!s&&l>r};function z_(e=()=>{}){const n=Tt(e);$t(()=>{let r=0,i=0;return r=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(i)}},[n])}function I_(e){return e.nodeType===e.ELEMENT_NODE}function B_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Ch(e){const n=document.activeElement;return e.some(r=>r===n?!0:(r.focus(),document.activeElement!==n))}var U_=Aw,Iw=Rw,Bw=_w,Uw=Mw,Hw=jw,Fw=Ow,Vw=om;function qw(e){var n,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(n=0;n<l;n++)e[n]&&(r=qw(e[n]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function $w(){for(var e,n,r=0,i="",l=arguments.length;r<l;r++)(e=arguments[r])&&(n=qw(e))&&(i&&(i+=" "),i+=n);return i}const gb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yb=$w,Dc=(e,n)=>r=>{var i;if(n?.variants==null)return yb(e,r?.class,r?.className);const{variants:l,defaultVariants:s}=n,c=Object.keys(l).map(h=>{const m=r?.[h],y=s?.[h];if(m===null)return null;const w=gb(m)||gb(y);return l[h][w]}),f=r&&Object.entries(r).reduce((h,m)=>{let[y,w]=m;return w===void 0||(h[y]=w),h},{}),d=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:y,className:w,...b}=m;return Object.entries(b).every(S=>{let[E,T]=S;return Array.isArray(T)?T.includes({...s,...f}[E]):{...s,...f}[E]===T})?[...h,y,w]:h},[]);return yb(e,c,d,r?.class,r?.className)};/**
61
+ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let w=Wn(),b;if(n){let R=typeof n=="string"?vo(n):n;ht(m==="/"||R.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${R.pathname}" was given in the \`location\` prop.`),b=R}else b=w;let S=b.pathname||"/",E=S;if(m!=="/"){let R=m.replace(/^\//,"").split("/");E="/"+S.replace(/^\//,"").split("/").slice(R.length).join("/")}let T=Y0(e,{pathname:E});Qn(y||T!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Qn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=kR(T&&T.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Kr([m,s.encodeLocation?s.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:Kr([m,s.encodeLocation?s.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),c,r,i,l);return n&&A?v.createElement(ns.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},A):A}function wR(){let e=_R(),n=dR(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:s},"ErrorBoundary")," or"," ",v.createElement("code",{style:s},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),r?v.createElement("pre",{style:l},r):null,c)}var SR=v.createElement(wR,null),ER=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.unstable_onError?this.props.unstable_onError(e,n):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?v.createElement(Zn.Provider,{value:this.props.routeContext},v.createElement(Qp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function CR({routeContext:e,match:n,children:r}){let i=v.useContext(xo);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Zn.Provider,{value:e},r)}function kR(e,n=[],r=null,i=null,l=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,c=r?.errors;if(c!=null){let h=s.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);ht(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,h+1))}let f=!1,d=-1;if(r)for(let h=0;h<s.length;h++){let m=s[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=h),m.route.id){let{loaderData:y,errors:w}=r,b=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!w||w[m.route.id]===void 0);if(m.route.lazy||b){f=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((h,m,y)=>{let w,b=!1,S=null,E=null;r&&(w=c&&m.route.id?c[m.route.id]:void 0,S=m.route.errorElement||SR,f&&(d<0&&y===0?(tw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,E=null):d===y&&(b=!0,E=m.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,y+1)),A=()=>{let R;return w?R=S:b?R=E:m.route.Component?R=v.createElement(m.route.Component,null):m.route.element?R=m.route.element:R=h,v.createElement(CR,{match:m,routeContext:{outlet:h,matches:T,isDataRoute:r!=null},children:R})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?v.createElement(ER,{location:r.location,revalidation:r.revalidation,component:S,error:w,children:A(),routeContext:{outlet:null,matches:T,isDataRoute:!0},unstable_onError:i}):A()},null)}function Zp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function AR(e){let n=v.useContext(xo);return ht(n,Zp(e)),n}function TR(e){let n=v.useContext(kc);return ht(n,Zp(e)),n}function RR(e){let n=v.useContext(Zn);return ht(n,Zp(e)),n}function Wp(e){let n=RR(e),r=n.matches[n.matches.length-1];return ht(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function NR(){return Wp("useRouteId")}function _R(){let e=v.useContext(Qp),n=TR("useRouteError"),r=Wp("useRouteError");return e!==void 0?e:n.errors?.[r]}function MR(){let{router:e}=AR("useNavigate"),n=Wp("useNavigate"),r=v.useRef(!1);return J0(()=>{r.current=!0}),v.useCallback(async(l,s={})=>{Qn(r.current,W0),r.current&&(typeof l=="number"?e.navigate(l):await e.navigate(l,{fromRouteId:n,...s}))},[e,n])}var rb={};function tw(e,n,r){!n&&!rb[e]&&(rb[e]=!0,Qn(!1,r))}v.memo(jR);function jR({routes:e,future:n,state:r,unstable_onError:i}){return ew(e,void 0,r,i,n)}function DR({to:e,replace:n,state:r,relative:i}){ht(bo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=v.useContext(fr);Qn(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=v.useContext(Zn),{pathname:c}=Wn(),f=rs(),d=Xp(e,Kp(s),c,i==="path"),h=JSON.stringify(d);return v.useEffect(()=>{f(JSON.parse(h),{replace:n,state:r,relative:i})},[f,h,i,n,r]),null}function nw(e){return xR(e.context)}function Oe(e){ht(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function OR({basename:e="/",children:n=null,location:r,navigationType:i="POP",navigator:l,static:s=!1}){ht(!bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:c,navigator:l,static:s,future:{}}),[c,l,s]);typeof r=="string"&&(r=vo(r));let{pathname:d="/",search:h="",hash:m="",state:y=null,key:w="default"}=r,b=v.useMemo(()=>{let S=Xr(d,c);return S==null?null:{location:{pathname:S,search:h,hash:m,state:y,key:w},navigationType:i}},[c,d,h,m,y,w,i]);return Qn(b!=null,`<Router basename="${c}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:v.createElement(fr.Provider,{value:f},v.createElement(ns.Provider,{children:n,value:b}))}function PR({children:e,location:n}){return bR(rp(e),n)}function rp(e,n=[]){let r=[];return v.Children.forEach(e,(i,l)=>{if(!v.isValidElement(i))return;let s=[...n,l];if(i.type===v.Fragment){r.push.apply(r,rp(i.props.children,s));return}ht(i.type===Oe,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ht(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=rp(i.props.children,s)),r.push(c)}),r}var Qu="get",Zu="application/x-www-form-urlencoded";function Ac(e){return e!=null&&typeof e.tagName=="string"}function LR(e){return Ac(e)&&e.tagName.toLowerCase()==="button"}function zR(e){return Ac(e)&&e.tagName.toLowerCase()==="form"}function IR(e){return Ac(e)&&e.tagName.toLowerCase()==="input"}function BR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function UR(e,n){return e.button===0&&(!n||n==="_self")&&!BR(e)}function ap(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,r)=>{let i=e[r];return n.concat(Array.isArray(i)?i.map(l=>[r,l]):[[r,i]])},[]))}function HR(e,n){let r=ap(e);return n&&n.forEach((i,l)=>{r.has(l)||n.getAll(l).forEach(s=>{r.append(l,s)})}),r}var Pu=null;function FR(){if(Pu===null)try{new FormData(document.createElement("form"),0),Pu=!1}catch{Pu=!0}return Pu}var VR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wh(e){return e!=null&&!VR.has(e)?(Qn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Zu}"`),null):e}function qR(e,n){let r,i,l,s,c;if(zR(e)){let f=e.getAttribute("action");i=f?Xr(f,n):null,r=e.getAttribute("method")||Qu,l=wh(e.getAttribute("enctype"))||Zu,s=new FormData(e)}else if(LR(e)||IR(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(i=d?Xr(d,n):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||Qu,l=wh(e.getAttribute("formenctype"))||wh(f.getAttribute("enctype"))||Zu,s=new FormData(f,e),!FR()){let{name:h,type:m,value:y}=e;if(m==="image"){let w=h?`${h}.`:"";s.append(`${w}x`,"0"),s.append(`${w}y`,"0")}else h&&s.append(h,y)}}else{if(Ac(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Qu,i=null,l=Zu,c=e}return s&&l==="text/plain"&&(c=s,s=void 0),{action:i,method:r.toLowerCase(),encType:l,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jp(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function $R(e,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${r}`:n&&Xr(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function GR(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function YR(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function KR(e,n,r){let i=await Promise.all(e.map(async l=>{let s=n.routes[l.route.id];if(s){let c=await GR(s,r);return c.links?c.links():[]}return[]}));return WR(i.flat(1).filter(YR).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function ab(e,n,r,i,l,s){let c=(d,h)=>r[h]?d.route.id!==r[h].route.id:!0,f=(d,h)=>r[h].pathname!==d.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==d.params["*"];return s==="assets"?n.filter((d,h)=>c(d,h)||f(d,h)):s==="data"?n.filter((d,h)=>{let m=i.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function XR(e,n,{includeHydrateFallback:r}={}){return QR(e.map(i=>{let l=n.routes[i.route.id];if(!l)return[];let s=[l.module];return l.clientActionModule&&(s=s.concat(l.clientActionModule)),l.clientLoaderModule&&(s=s.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(s=s.concat(l.hydrateFallbackModule)),l.imports&&(s=s.concat(l.imports)),s}).flat(1))}function QR(e){return[...new Set(e)]}function ZR(e){let n={},r=Object.keys(e).sort();for(let i of r)n[i]=e[i];return n}function WR(e,n){let r=new Set;return new Set(n),e.reduce((i,l)=>{let s=JSON.stringify(ZR(l));return r.has(s)||(r.add(s),i.push({key:s,link:l})),i},[])}function rw(){let e=v.useContext(xo);return Jp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function JR(){let e=v.useContext(kc);return Jp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var em=v.createContext(void 0);em.displayName="FrameworkContext";function aw(){let e=v.useContext(em);return Jp(e,"You must render this element inside a <HydratedRouter> element"),e}function eN(e,n){let r=v.useContext(em),[i,l]=v.useState(!1),[s,c]=v.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=n,w=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let E=A=>{A.forEach(R=>{c(R.isIntersecting)})},T=new IntersectionObserver(E,{threshold:.5});return w.current&&T.observe(w.current),()=>{T.disconnect()}}},[e]),v.useEffect(()=>{if(i){let E=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(E)}}},[i]);let b=()=>{l(!0)},S=()=>{l(!1),c(!1)};return r?e!=="intent"?[s,w,{}]:[s,w,{onFocus:Rl(f,b),onBlur:Rl(d,S),onMouseEnter:Rl(h,b),onMouseLeave:Rl(m,S),onTouchStart:Rl(y,b)}]:[!1,w,{}]}function Rl(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function tN({page:e,...n}){let{router:r}=rw(),i=v.useMemo(()=>Y0(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?v.createElement(rN,{page:e,matches:i,...n}):null}function nN(e){let{manifest:n,routeModules:r}=aw(),[i,l]=v.useState([]);return v.useEffect(()=>{let s=!1;return KR(e,n,r).then(c=>{s||l(c)}),()=>{s=!0}},[e,n,r]),i}function rN({page:e,matches:n,...r}){let i=Wn(),{manifest:l,routeModules:s}=aw(),{basename:c}=rw(),{loaderData:f,matches:d}=JR(),h=v.useMemo(()=>ab(e,n,d,l,i,"data"),[e,n,d,l,i]),m=v.useMemo(()=>ab(e,n,d,l,i,"assets"),[e,n,d,l,i]),y=v.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let S=new Set,E=!1;if(n.forEach(A=>{let R=l.routes[A.route.id];!R||!R.hasLoader||(!h.some(N=>N.route.id===A.route.id)&&A.route.id in f&&s[A.route.id]?.shouldRevalidate||R.hasClientLoader?E=!0:S.add(A.route.id))}),S.size===0)return[];let T=$R(e,c,"data");return E&&S.size>0&&T.searchParams.set("_routes",n.filter(A=>S.has(A.route.id)).map(A=>A.route.id).join(",")),[T.pathname+T.search]},[c,f,i,l,h,n,e,s]),w=v.useMemo(()=>XR(m,l),[m,l]),b=nN(m);return v.createElement(v.Fragment,null,y.map(S=>v.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),w.map(S=>v.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),b.map(({key:S,link:E})=>v.createElement("link",{key:S,nonce:r.nonce,...E})))}function aN(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var iw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{iw&&(window.__reactRouterVersion="7.8.2")}catch{}function iN({basename:e,children:n,window:r}){let i=v.useRef();i.current==null&&(i.current=VT({window:r,v5Compat:!0}));let l=i.current,[s,c]=v.useState({action:l.action,location:l.location}),f=v.useCallback(d=>{v.startTransition(()=>c(d))},[c]);return v.useLayoutEffect(()=>l.listen(f),[l,f]),v.createElement(OR,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:l})}var ow=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sr=v.forwardRef(function({onClick:n,discover:r="render",prefetch:i="none",relative:l,reloadDocument:s,replace:c,state:f,target:d,to:h,preventScrollReset:m,viewTransition:y,...w},b){let{basename:S}=v.useContext(fr),E=typeof h=="string"&&ow.test(h),T,A=!1;if(typeof h=="string"&&E&&(T=h,iw))try{let Y=new URL(window.location.href),D=h.startsWith("//")?new URL(Y.protocol+h):new URL(h),Z=Xr(D.pathname,S);D.origin===Y.origin&&Z!=null?h=Z+D.search+D.hash:A=!0}catch{Qn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let R=gR(h,{relative:l}),[N,O,L]=eN(i,w),j=uN(h,{replace:c,state:f,target:d,preventScrollReset:m,relative:l,viewTransition:y});function H(Y){n&&n(Y),Y.defaultPrevented||j(Y)}let $=v.createElement("a",{...w,...L,href:T||R,onClick:A||s?n:H,ref:aN(b,O),target:d,"data-discover":!E&&r==="render"?"true":void 0});return N&&!E?v.createElement(v.Fragment,null,$,v.createElement(tN,{page:R})):$});Sr.displayName="Link";var oN=v.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:i="",end:l=!1,style:s,to:c,viewTransition:f,children:d,...h},m){let y=as(c,{relative:h.relative}),w=Wn(),b=v.useContext(kc),{navigator:S,basename:E}=v.useContext(fr),T=b!=null&&pN(y)&&f===!0,A=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,R=w.pathname,N=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(R=R.toLowerCase(),N=N?N.toLowerCase():null,A=A.toLowerCase()),N&&E&&(N=Xr(N,E)||N);const O=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let L=R===A||!l&&R.startsWith(A)&&R.charAt(O)==="/",j=N!=null&&(N===A||!l&&N.startsWith(A)&&N.charAt(A.length)==="/"),H={isActive:L,isPending:j,isTransitioning:T},$=L?n:void 0,Y;typeof i=="function"?Y=i(H):Y=[i,L?"active":null,j?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let D=typeof s=="function"?s(H):s;return v.createElement(Sr,{...h,"aria-current":$,className:Y,ref:m,style:D,to:c,viewTransition:f},typeof d=="function"?d(H):d)});oN.displayName="NavLink";var lN=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:l,state:s,method:c=Qu,action:f,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:y,...w},b)=>{let S=dN(),E=hN(f,{relative:h}),T=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&ow.test(f),R=N=>{if(d&&d(N),N.defaultPrevented)return;N.preventDefault();let O=N.nativeEvent.submitter,L=O?.getAttribute("formmethod")||c;S(O||N.currentTarget,{fetcherKey:n,method:L,navigate:r,replace:l,state:s,relative:h,preventScrollReset:m,viewTransition:y})};return v.createElement("form",{ref:b,method:T,action:E,onSubmit:i?d:R,...w,"data-discover":!A&&e==="render"?"true":void 0})});lN.displayName="Form";function sN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lw(e){let n=v.useContext(xo);return ht(n,sN(e)),n}function uN(e,{target:n,replace:r,state:i,preventScrollReset:l,relative:s,viewTransition:c}={}){let f=rs(),d=Wn(),h=as(e,{relative:s});return v.useCallback(m=>{if(UR(m,n)){m.preventDefault();let y=r!==void 0?r:ql(d)===ql(h);f(e,{replace:y,state:i,preventScrollReset:l,relative:s,viewTransition:c})}},[d,f,h,r,i,n,e,l,s,c])}function QU(e){Qn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=v.useRef(ap(e)),r=v.useRef(!1),i=Wn(),l=v.useMemo(()=>HR(i.search,r.current?null:n.current),[i.search]),s=rs(),c=v.useCallback((f,d)=>{const h=ap(typeof f=="function"?f(new URLSearchParams(l)):f);r.current=!0,s("?"+h,d)},[s,l]);return[l,c]}var cN=0,fN=()=>`__${String(++cN)}__`;function dN(){let{router:e}=lw("useSubmit"),{basename:n}=v.useContext(fr),r=NR();return v.useCallback(async(i,l={})=>{let{action:s,method:c,encType:f,formData:d,body:h}=qR(i,n);if(l.navigate===!1){let m=l.fetcherKey||fN();await e.fetch(m,r,l.action||s,{preventScrollReset:l.preventScrollReset,formData:d,body:h,formMethod:l.method||c,formEncType:l.encType||f,flushSync:l.flushSync})}else await e.navigate(l.action||s,{preventScrollReset:l.preventScrollReset,formData:d,body:h,formMethod:l.method||c,formEncType:l.encType||f,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[e,n,r])}function hN(e,{relative:n}={}){let{basename:r}=v.useContext(fr),i=v.useContext(Zn);ht(i,"useFormAction must be used inside a RouteContext");let[l]=i.matches.slice(-1),s={...as(e||".",{relative:n})},c=Wn();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search),d=f.getAll("index");if(d.some(m=>m==="")){f.delete("index"),d.filter(y=>y).forEach(y=>f.append("index",y));let m=f.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&l.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Kr([r,s.pathname])),ql(s)}function pN(e,{relative:n}={}){let r=v.useContext(Z0);ht(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=lw("useViewTransitionState"),l=as(e,{relative:n});if(!r.isTransitioning)return!1;let s=Xr(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=Xr(r.nextLocation.pathname,i)||r.nextLocation.pathname;return lc(l.pathname,c)!=null||lc(l.pathname,s)!=null}var wo=G0();const mN=Cc(wo);var Tc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rc=typeof window>"u"||"Deno"in globalThis;function lr(){}function gN(e,n){return typeof e=="function"?e(n):e}function yN(e){return typeof e=="number"&&e>=0&&e!==1/0}function vN(e,n){return Math.max(e+(n||0)-Date.now(),0)}function ip(e,n){return typeof e=="function"?e(n):e}function xN(e,n){return typeof e=="function"?e(n):e}function ib(e,n){const{type:r="all",exact:i,fetchStatus:l,predicate:s,queryKey:c,stale:f}=e;if(c){if(i){if(n.queryHash!==tm(c,n.options))return!1}else if(!Gl(n.queryKey,c))return!1}if(r!=="all"){const d=n.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||l&&l!==n.state.fetchStatus||s&&!s(n))}function ob(e,n){const{exact:r,status:i,predicate:l,mutationKey:s}=e;if(s){if(!n.options.mutationKey)return!1;if(r){if($l(n.options.mutationKey)!==$l(s))return!1}else if(!Gl(n.options.mutationKey,s))return!1}return!(i&&n.state.status!==i||l&&!l(n))}function tm(e,n){return(n?.queryKeyHashFn||$l)(e)}function $l(e){return JSON.stringify(e,(n,r)=>op(r)?Object.keys(r).sort().reduce((i,l)=>(i[l]=r[l],i),{}):r)}function Gl(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>Gl(e[r],n[r])):!1}function sw(e,n){if(e===n)return e;const r=lb(e)&&lb(n);if(r||op(e)&&op(n)){const i=r?e:Object.keys(e),l=i.length,s=r?n:Object.keys(n),c=s.length,f=r?[]:{},d=new Set(i);let h=0;for(let m=0;m<c;m++){const y=r?m:s[m];(!r&&d.has(y)||r)&&e[y]===void 0&&n[y]===void 0?(f[y]=void 0,h++):(f[y]=sw(e[y],n[y]),f[y]===e[y]&&e[y]!==void 0&&h++)}return l===c&&h===l?e:f}return n}function lb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function op(e){if(!sb(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!sb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sb(e){return Object.prototype.toString.call(e)==="[object Object]"}function bN(e){return new Promise(n=>{setTimeout(n,e)})}function wN(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?sw(e,n):n}function SN(e,n,r=0){const i=[...e,n];return r&&i.length>r?i.slice(1):i}function EN(e,n,r=0){const i=[n,...e];return r&&i.length>r?i.slice(0,-1):i}var nm=Symbol();function uw(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===nm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var CN=class extends Tc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Rc&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},cw=new CN,kN=class extends Tc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Rc&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},sc=new kN;function AN(){let e,n;const r=new Promise((l,s)=>{e=l,n=s});r.status="pending",r.catch(()=>{});function i(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{i({status:"fulfilled",value:l}),e(l)},r.reject=l=>{i({status:"rejected",reason:l}),n(l)},r}function TN(e){return Math.min(1e3*2**e,3e4)}function fw(e){return(e??"online")==="online"?sc.isOnline():!0}var dw=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function hw(e){let n=!1,r=0,i;const l=AN(),s=()=>l.status!=="pending",c=E=>{s()||(w(new dw(E)),e.abort?.())},f=()=>{n=!0},d=()=>{n=!1},h=()=>cw.isFocused()&&(e.networkMode==="always"||sc.isOnline())&&e.canRun(),m=()=>fw(e.networkMode)&&e.canRun(),y=E=>{s()||(i?.(),l.resolve(E))},w=E=>{s()||(i?.(),l.reject(E))},b=()=>new Promise(E=>{i=T=>{(s()||h())&&E(T)},e.onPause?.()}).then(()=>{i=void 0,s()||e.onContinue?.()}),S=()=>{if(s())return;let E;const T=r===0?e.initialPromise:void 0;try{E=T??e.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(y).catch(A=>{if(s())return;const R=e.retry??(Rc?0:3),N=e.retryDelay??TN,O=typeof N=="function"?N(r,A):N,L=R===!0||typeof R=="number"&&r<R||typeof R=="function"&&R(r,A);if(n||!L){w(A);return}r++,e.onFail?.(r,A),bN(O).then(()=>h()?void 0:b()).then(()=>{n?w(A):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(i?.(),l),cancelRetry:f,continueRetry:d,canStart:m,start:()=>(m()?S():b().then(S),l)}}var RN=e=>setTimeout(e,0);function NN(){let e=[],n=0,r=f=>{f()},i=f=>{f()},l=RN;const s=f=>{n?e.push(f):l(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{i(()=>{f.forEach(d=>{r(d)})})})};return{batch:f=>{let d;n++;try{d=f()}finally{n--,n||c()}return d},batchCalls:f=>(...d)=>{s(()=>{f(...d)})},schedule:s,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{l=f}}}var ln=NN(),pw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yN(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rc?1/0:300*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},_N=class extends pw{#e;#t;#n;#a;#r;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=jN(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=wN(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#i({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(lr).catch(lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>xN(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ip(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!vN(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},l=()=>{const f=uw(this.options,n),h=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#l=!1,this.options.persister?this.options.persister(f,h,this):f(h)},c=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:l};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=hw({initialPromise:n?.initialPromise,fn:c.fetchFn,abort:r.abort.bind(r),onFail:(f,d)=>{this.#i({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof dw){if(f.silent)return this.#r.promise;if(f.revert){if(this.setState({...this.#t,fetchStatus:"idle"}),this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...MN(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),ln.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function MN(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fw(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jN(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var DN=class extends Tc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const i=n.queryKey,l=n.queryHash??tm(i,n);let s=this.get(l);return s||(s=new _N({client:e,queryKey:i,queryHash:l,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ln.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>ib(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>ib(e,r)):n}notify(e){ln.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){ln.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ln.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ON=class extends pw{#e;#t;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||PN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(n=>n!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#a({type:"continue"})};this.#n=hw({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(l,s)=>{this.#a({type:"failed",failureCount:l,error:s})},onPause:()=>{this.#a({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#n.canStart();try{if(r)n();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#t.config.onMutate?.(e,this);const s=await this.options.onMutate?.(e);s!==this.state.context&&this.#a({type:"pending",context:s,variables:e,isPaused:i})}const l=await this.#n.start();return await this.#t.config.onSuccess?.(l,e,this.state.context,this),await this.options.onSuccess?.(l,e,this.state.context),await this.#t.config.onSettled?.(l,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(l,null,e,this.state.context),this.#a({type:"success",data:l}),l}catch(l){try{throw await this.#t.config.onError?.(l,e,this.state.context,this),await this.options.onError?.(l,e,this.state.context),await this.#t.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,l,e,this.state.context),l}finally{this.#a({type:"error",error:l})}}finally{this.#t.runNext(this)}}#a(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ln.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function PN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var LN=class extends Tc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const i=new ON({mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){this.#e.add(e);const n=Lu(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=Lu(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Lu(e);if(typeof n=="string"){const i=this.#t.get(n)?.find(l=>l.state.status==="pending");return!i||i===e}else return!0}runNext(e){const n=Lu(e);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ln.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>ob(n,r))}findAll(e={}){return this.getAll().filter(n=>ob(e,n))}notify(e){ln.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ln.batch(()=>Promise.all(e.map(n=>n.continue().catch(lr))))}};function Lu(e){return e.options.scope?.id}function ub(e){return{onFetch:(n,r)=>{const i=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,s=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let m=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(n.signal.aborted?m=!0:n.signal.addEventListener("abort",()=>{m=!0}),n.signal)})},w=uw(n.options,n.fetchOptions),b=async(S,E,T)=>{if(m)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const R=(()=>{const j={client:n.client,queryKey:n.queryKey,pageParam:E,direction:T?"backward":"forward",meta:n.options.meta};return y(j),j})(),N=await w(R),{maxPages:O}=n.options,L=T?EN:SN;return{pages:L(S.pages,N,O),pageParams:L(S.pageParams,E,O)}};if(l&&s.length){const S=l==="backward",E=S?zN:cb,T={pages:s,pageParams:c},A=E(i,T);f=await b(T,A,S)}else{const S=e??s.length;do{const E=d===0?c[0]??i.initialPageParam:cb(i,f);if(d>0&&E==null)break;f=await b(f,E),d++}while(d<S)}return f};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=h}}}function cb(e,{pages:n,pageParams:r}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,r[i],r):void 0}function zN(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var IN=class{#e;#t;#n;#a;#r;#o;#l;#i;constructor(e={}){this.#e=e.queryCache||new DN,this.#t=e.mutationCache||new LN,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#l=cw.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=sc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#l?.(),this.#l=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ip(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(e,n,r){const i=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(i.queryHash)?.state.data,c=gN(n,s);if(c!==void 0)return this.#e.build(this,i).setData(c,{...r,manual:!0})}setQueriesData(e,n,r){return ln.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;ln.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return ln.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},i=ln.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(i).then(lr).catch(lr)}invalidateQueries(e,n={}){return ln.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=ln.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let s=l.fetch(void 0,r);return r.throwOnError||(s=s.catch(lr)),l.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(lr)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(ip(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lr).catch(lr)}fetchInfiniteQuery(e){return e.behavior=ub(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(lr).catch(lr)}ensureInfiniteQueryData(e){return e.behavior=ub(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return sc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#a.set($l(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(i=>{Gl(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set($l(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(i=>{Gl(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=tm(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===nm&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},BN=v.createContext(void 0),UN=({client:e,children:n})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(BN.Provider,{value:e,children:n}));const HN={theme:"system",setTheme:()=>null},mw=v.createContext(HN);function FN({children:e,defaultTheme:n="system",storageKey:r="ui-theme",...i}){const[l,s]=v.useState(n);v.useEffect(()=>{const f=localStorage?.getItem(r);f&&s(f)},[r]),v.useEffect(()=>{const f=window.document.documentElement;if(f.classList.remove("light","dark","coconut"),l==="system"){const d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";f.classList.add(d);return}f.classList.add(l)},[l]);const c={theme:l,setTheme:f=>{localStorage?.setItem(r,f),s(f)}};return g.jsx(mw.Provider,{...i,value:c,children:e})}const ZU=()=>{const e=v.useContext(mw);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Et="",WU="https://app.coconut.dev";async function eo(e,n={}){const r=`${Et}${e}`,i={headers:{"Content-Type":"application/json",...n.headers},...n},l=await fetch(r,i);if(!l.ok)throw new Error(`API request failed: ${l.status} ${l.statusText}`);return l.json()}const JU=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`,gw=v.createContext(void 0);function VN({children:e}){const[n,r]=v.useState({user:null,isAuthenticated:!1,isLoading:!0,authEnabled:!1}),i=v.useCallback(async()=>{try{const d=await eo("/api/v1/auth/status");if(!d.success){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}if(!(d.data?.enabled||!1)){r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1});return}try{const m=await eo("/api/v1/auth/me");m.success&&m.data?.user?r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0}):r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}catch{r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})}}catch(d){console.error("Failed to check auth status:",d),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!1})}},[]);v.useEffect(()=>{i()},[i]);const l=v.useCallback(async(d,h)=>{const m=await eo("/api/v1/auth/login",{method:"POST",body:JSON.stringify({email:d,password:h})});if(!m.success)throw new Error(m.error||"Login failed");r({user:m.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),s=v.useCallback(async(d,h,m)=>{const y=await eo("/api/v1/auth/register",{method:"POST",body:JSON.stringify({email:d,password:h,name:m})});if(!y.success)throw new Error(y.error||"Registration failed");r({user:y.data.user,isAuthenticated:!0,isLoading:!1,authEnabled:!0})},[]),c=v.useCallback(async()=>{await eo("/api/v1/auth/logout",{method:"POST"}),r({user:null,isAuthenticated:!1,isLoading:!1,authEnabled:!0})},[]),f=v.useCallback(async()=>{try{const d=await eo("/api/v1/auth/me");d.success&&d.data?.user&&r(h=>({...h,user:d.data.user,isAuthenticated:!0}))}catch(d){console.error("Failed to refresh user:",d)}},[]);return g.jsx(gw.Provider,{value:{...n,login:l,register:s,logout:c,refreshUser:f,checkAuthStatus:i},children:e})}function yw(){const e=v.useContext(gw);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const vw=v.createContext(null);function qN(){const e=v.useContext(vw);if(!e)throw new Error("useSidebarBadges must be used within SidebarBadgeProvider");return e}function $N({children:e,pollInterval:n=1e4}){const[r,i]=v.useState({codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0}),[l,s]=v.useState(!0),c=v.useCallback(async()=>{try{const[d,h,m]=await Promise.allSettled([fetch(`${Et}/api/v1/terminal/sessions`).then(w=>w.json()),fetch(`${Et}/api/v1/git/status`).then(w=>w.json()),fetch(`${Et}/api/v1/jobs`).then(w=>w.json())]),y={codeSessions:0,gitChanges:0,terminalSessions:0,runningScheduledJobs:0};if(d.status==="fulfilled"&&d.value?.sessions){const w=d.value.sessions;y.codeSessions=w.filter(b=>b.proposalId?.startsWith("cp-")||b.proposalId?.startsWith("ag-")).length,y.terminalSessions=w.filter(b=>!b.proposalId?.startsWith("cp-")&&!b.proposalId?.startsWith("ag-")).length}if(h.status==="fulfilled"&&h.value?.success&&h.value?.data?.changes&&(y.gitChanges=h.value.data.changes.length),m.status==="fulfilled"&&m.value?.success&&m.value?.data){const w=Array.isArray(m.value.data)?m.value.data:[],b=w.filter(S=>{if(!S.runs||!Array.isArray(S.runs)||S.runs.length===0)return!1;const E=S.runs[0],T=E&&E.status==="running";return T&&console.log("[SidebarBadge] Running job detected:",{name:S.name,status:E.status,startedAt:E.startedAt,finishedAt:E.finishedAt}),T});y.runningScheduledJobs=b.length,(b.length>0||w.length>0)&&console.log("[SidebarBadge] Jobs summary:",{total:w.length,running:b.length,runningJobNames:b.map(S=>S.name)})}i(y)}catch(d){console.error("Failed to fetch sidebar badges:",d)}finally{s(!1)}},[]);v.useEffect(()=>{c()},[c]),v.useEffect(()=>{const d=setInterval(c,n);return()=>clearInterval(d)},[c,n]),v.useEffect(()=>{const d=()=>{console.log("[SidebarBadge] Tab focused, refreshing badges..."),c()};return window.addEventListener("focus",d),()=>window.removeEventListener("focus",d)},[c]);const f={badges:r,loading:l,refresh:c};return g.jsx(vw.Provider,{value:f,children:e})}function GN({children:e}){const[n]=v.useState(()=>new IN({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}}));return g.jsx(UN,{client:n,children:g.jsx(FN,{defaultTheme:"system",storageKey:"coconut-ui-theme",children:g.jsx(VN,{children:g.jsx($N,{children:e})})})})}const YN=1,KN=1e6;let Sh=0;function XN(){return Sh=(Sh+1)%Number.MAX_SAFE_INTEGER,Sh.toString()}const Eh=new Map,fb=e=>{if(Eh.has(e))return;const n=setTimeout(()=>{Eh.delete(e),Bl({type:"REMOVE_TOAST",toastId:e})},KN);Eh.set(e,n)},QN=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,YN)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===n.toast.id?{...r,...n.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=n;return r?fb(r):e.toasts.forEach(i=>{fb(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==n.toastId)}}},Wu=[];let Ju={toasts:[]};function Bl(e){Ju=QN(Ju,e),Wu.forEach(n=>{n(Ju)})}function lp({...e}){const n=XN(),r=l=>Bl({type:"UPDATE_TOAST",toast:{...l,id:n}}),i=()=>Bl({type:"DISMISS_TOAST",toastId:n});return Bl({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:l=>{l||i()}}}),{id:n,dismiss:i,update:r}}function ZN(){const[e,n]=v.useState(Ju);return v.useEffect(()=>(Wu.push(n),()=>{const r=Wu.indexOf(n);r>-1&&Wu.splice(r,1)}),[e]),{...e,toast:lp,dismiss:r=>Bl({type:"DISMISS_TOAST",toastId:r})}}function me(e,n,{checkForDefaultPrevented:r=!0}={}){return function(l){if(e?.(l),r===!1||!l.defaultPrevented)return n?.(l)}}function db(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Nc(...e){return n=>{let r=!1;const i=e.map(l=>{const s=db(l,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let l=0;l<i.length;l++){const s=i[l];typeof s=="function"?s():db(e[l],null)}}}}function ze(...e){return v.useCallback(Nc(...e),e)}function WN(e,n){const r=v.createContext(n),i=s=>{const{children:c,...f}=s,d=v.useMemo(()=>f,Object.values(f));return g.jsx(r.Provider,{value:d,children:c})};i.displayName=e+"Provider";function l(s){const c=v.useContext(r);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[i,l]}function Jn(e,n=[]){let r=[];function i(s,c){const f=v.createContext(c),d=r.length;r=[...r,c];const h=y=>{const{scope:w,children:b,...S}=y,E=w?.[e]?.[d]||f,T=v.useMemo(()=>S,Object.values(S));return g.jsx(E.Provider,{value:T,children:b})};h.displayName=s+"Provider";function m(y,w){const b=w?.[e]?.[d]||f,S=v.useContext(b);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[h,m]}const l=()=>{const s=r.map(c=>v.createContext(c));return function(f){const d=f?.[e]||s;return v.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return l.scopeName=e,[i,JN(l,...n)]}function JN(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const i=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(s){const c=i.reduce((f,{useScope:d,scopeName:h})=>{const y=d(s)[`__scope${h}`];return{...f,...y}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return r.scopeName=n.scopeName,r}function si(e){const n=e_(e),r=v.forwardRef((i,l)=>{const{children:s,...c}=i,f=v.Children.toArray(s),d=f.find(t_);if(d){const h=d.props.children,m=f.map(y=>y===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:y);return g.jsx(n,{...c,ref:l,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return g.jsx(n,{...c,ref:l,children:s})});return r.displayName=`${e}.Slot`,r}var So=si("Slot");function e_(e){const n=v.forwardRef((r,i)=>{const{children:l,...s}=r;if(v.isValidElement(l)){const c=r_(l),f=n_(s,l.props);return l.type!==v.Fragment&&(f.ref=i?Nc(i,c):c),v.cloneElement(l,f)}return v.Children.count(l)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var xw=Symbol("radix.slottable");function bw(e){const n=({children:r})=>g.jsx(g.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=xw,n}function t_(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xw}function n_(e,n){const r={...n};for(const i in n){const l=e[i],s=n[i];/^on[A-Z]/.test(i)?l&&s?r[i]=(...f)=>{const d=s(...f);return l(...f),d}:l&&(r[i]=l):i==="style"?r[i]={...l,...s}:i==="className"&&(r[i]=[l,s].filter(Boolean).join(" "))}return{...e,...r}}function r_(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function _c(e){const n=e+"CollectionProvider",[r,i]=Jn(n),[l,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),c=E=>{const{scope:T,children:A}=E,R=Aa.useRef(null),N=Aa.useRef(new Map).current;return g.jsx(l,{scope:T,itemMap:N,collectionRef:R,children:A})};c.displayName=n;const f=e+"CollectionSlot",d=si(f),h=Aa.forwardRef((E,T)=>{const{scope:A,children:R}=E,N=s(f,A),O=ze(T,N.collectionRef);return g.jsx(d,{ref:O,children:R})});h.displayName=f;const m=e+"CollectionItemSlot",y="data-radix-collection-item",w=si(m),b=Aa.forwardRef((E,T)=>{const{scope:A,children:R,...N}=E,O=Aa.useRef(null),L=ze(T,O),j=s(m,A);return Aa.useEffect(()=>(j.itemMap.set(O,{ref:O,...N}),()=>void j.itemMap.delete(O))),g.jsx(w,{[y]:"",ref:L,children:R})});b.displayName=m;function S(E){const T=s(e+"CollectionConsumer",E);return Aa.useCallback(()=>{const R=T.collectionRef.current;if(!R)return[];const N=Array.from(R.querySelectorAll(`[${y}]`));return Array.from(T.itemMap.values()).sort((j,H)=>N.indexOf(j.ref.current)-N.indexOf(H.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:c,Slot:h,ItemSlot:b},S,i]}var a_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=a_.reduce((e,n)=>{const r=si(`Primitive.${n}`),i=v.forwardRef((l,s)=>{const{asChild:c,...f}=l,d=c?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...f,ref:s})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function rm(e,n){e&&wo.flushSync(()=>e.dispatchEvent(n))}function Tt(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...r)=>n.current?.(...r),[])}function i_(e,n=globalThis?.document){const r=Tt(e);v.useEffect(()=>{const i=l=>{l.key==="Escape"&&r(l)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[r,n])}var o_="DismissableLayer",sp="dismissableLayer.update",l_="dismissableLayer.pointerDownOutside",s_="dismissableLayer.focusOutside",hb,ww=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Eo=v.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:c,onDismiss:f,...d}=e,h=v.useContext(ww),[m,y]=v.useState(null),w=m?.ownerDocument??globalThis?.document,[,b]=v.useState({}),S=ze(n,H=>y(H)),E=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),A=E.indexOf(T),R=m?E.indexOf(m):-1,N=h.layersWithOutsidePointerEventsDisabled.size>0,O=R>=A,L=c_(H=>{const $=H.target,Y=[...h.branches].some(D=>D.contains($));!O||Y||(l?.(H),c?.(H),H.defaultPrevented||f?.())},w),j=f_(H=>{const $=H.target;[...h.branches].some(D=>D.contains($))||(s?.(H),c?.(H),H.defaultPrevented||f?.())},w);return i_(H=>{R===h.layers.size-1&&(i?.(H),!H.defaultPrevented&&f&&(H.preventDefault(),f()))},w),v.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(hb=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),pb(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=hb)}},[m,w,r,h]),v.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),pb())},[m,h]),v.useEffect(()=>{const H=()=>b({});return document.addEventListener(sp,H),()=>document.removeEventListener(sp,H)},[]),g.jsx(_e.div,{...d,ref:S,style:{pointerEvents:N?O?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,j.onFocusCapture),onBlurCapture:me(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,L.onPointerDownCapture)})});Eo.displayName=o_;var u_="DismissableLayerBranch",Sw=v.forwardRef((e,n)=>{const r=v.useContext(ww),i=v.useRef(null),l=ze(n,i);return v.useEffect(()=>{const s=i.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(_e.div,{...e,ref:l})});Sw.displayName=u_;function c_(e,n=globalThis?.document){const r=Tt(e),i=v.useRef(!1),l=v.useRef(()=>{});return v.useEffect(()=>{const s=f=>{if(f.target&&!i.current){let d=function(){Ew(l_,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",l.current),l.current=d,n.addEventListener("click",l.current,{once:!0})):d()}else n.removeEventListener("click",l.current);i.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",s),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function f_(e,n=globalThis?.document){const r=Tt(e),i=v.useRef(!1);return v.useEffect(()=>{const l=s=>{s.target&&!i.current&&Ew(s_,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",l),()=>n.removeEventListener("focusin",l)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function pb(){const e=new CustomEvent(sp);document.dispatchEvent(e)}function Ew(e,n,r,{discrete:i}){const l=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&l.addEventListener(e,n,{once:!0}),i?rm(l,s):l.dispatchEvent(s)}var d_=Eo,h_=Sw,$t=globalThis?.document?v.useLayoutEffect:()=>{},p_="Portal",is=v.forwardRef((e,n)=>{const{container:r,...i}=e,[l,s]=v.useState(!1);$t(()=>s(!0),[]);const c=r||l&&globalThis?.document?.body;return c?mN.createPortal(g.jsx(_e.div,{...i,ref:n}),c):null});is.displayName=p_;function m_(e,n){return v.useReducer((r,i)=>n[r][i]??r,e)}var un=e=>{const{present:n,children:r}=e,i=g_(n),l=typeof r=="function"?r({present:i.isPresent}):v.Children.only(r),s=ze(i.ref,y_(l));return typeof r=="function"||i.isPresent?v.cloneElement(l,{ref:s}):null};un.displayName="Presence";function g_(e){const[n,r]=v.useState(),i=v.useRef(null),l=v.useRef(e),s=v.useRef("none"),c=e?"mounted":"unmounted",[f,d]=m_(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=zu(i.current);s.current=f==="mounted"?h:"none"},[f]),$t(()=>{const h=i.current,m=l.current;if(m!==e){const w=s.current,b=zu(h);e?d("MOUNT"):b==="none"||h?.display==="none"?d("UNMOUNT"):d(m&&w!==b?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,d]),$t(()=>{if(n){let h;const m=n.ownerDocument.defaultView??window,y=b=>{const E=zu(i.current).includes(CSS.escape(b.animationName));if(b.target===n&&E&&(d("ANIMATION_END"),!l.current)){const T=n.style.animationFillMode;n.style.animationFillMode="forwards",h=m.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=T)})}},w=b=>{b.target===n&&(s.current=zu(i.current))};return n.addEventListener("animationstart",w),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{m.clearTimeout(h),n.removeEventListener("animationstart",w),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v.useCallback(h=>{i.current=h?getComputedStyle(h):null,r(h)},[])}}function zu(e){return e?.animationName||"none"}function y_(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var v_=$0[" useInsertionEffect ".trim().toString()]||$t;function _a({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){const[l,s,c]=x_({defaultProp:n,onChange:r}),f=e!==void 0,d=f?e:l;{const m=v.useRef(e!==void 0);v.useEffect(()=>{const y=m.current;y!==f&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=f},[f,i])}const h=v.useCallback(m=>{if(f){const y=b_(m)?m(e):m;y!==e&&c.current?.(y)}else s(m)},[f,e,s,c]);return[d,h]}function x_({defaultProp:e,onChange:n}){const[r,i]=v.useState(e),l=v.useRef(r),s=v.useRef(n);return v_(()=>{s.current=n},[n]),v.useEffect(()=>{l.current!==r&&(s.current?.(r),l.current=r)},[r,l]),[r,i,s]}function b_(e){return typeof e=="function"}var Cw=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),w_="VisuallyHidden",Mc=v.forwardRef((e,n)=>g.jsx(_e.span,{...e,ref:n,style:{...Cw,...e.style}}));Mc.displayName=w_;var S_=Mc,am="ToastProvider",[im,E_,C_]=_c("Toast"),[kw,eH]=Jn("Toast",[C_]),[k_,jc]=kw(am),Aw=e=>{const{__scopeToast:n,label:r="Notification",duration:i=5e3,swipeDirection:l="right",swipeThreshold:s=50,children:c}=e,[f,d]=v.useState(null),[h,m]=v.useState(0),y=v.useRef(!1),w=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${am}\`. Expected non-empty \`string\`.`),g.jsx(im.Provider,{scope:n,children:g.jsx(k_,{scope:n,label:r,duration:i,swipeDirection:l,swipeThreshold:s,toastCount:h,viewport:f,onViewportChange:d,onToastAdd:v.useCallback(()=>m(b=>b+1),[]),onToastRemove:v.useCallback(()=>m(b=>b-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:w,children:c})})};Aw.displayName=am;var Tw="ToastViewport",A_=["F8"],up="toast.viewportPause",cp="toast.viewportResume",Rw=v.forwardRef((e,n)=>{const{__scopeToast:r,hotkey:i=A_,label:l="Notifications ({hotkey})",...s}=e,c=jc(Tw,r),f=E_(r),d=v.useRef(null),h=v.useRef(null),m=v.useRef(null),y=v.useRef(null),w=ze(n,y,c.onViewportChange),b=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=c.toastCount>0;v.useEffect(()=>{const T=A=>{i.length!==0&&i.every(N=>A[N]||A.code===N)&&y.current?.focus()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[i]),v.useEffect(()=>{const T=d.current,A=y.current;if(S&&T&&A){const R=()=>{if(!c.isClosePausedRef.current){const j=new CustomEvent(up);A.dispatchEvent(j),c.isClosePausedRef.current=!0}},N=()=>{if(c.isClosePausedRef.current){const j=new CustomEvent(cp);A.dispatchEvent(j),c.isClosePausedRef.current=!1}},O=j=>{!T.contains(j.relatedTarget)&&N()},L=()=>{T.contains(document.activeElement)||N()};return T.addEventListener("focusin",R),T.addEventListener("focusout",O),T.addEventListener("pointermove",R),T.addEventListener("pointerleave",L),window.addEventListener("blur",R),window.addEventListener("focus",N),()=>{T.removeEventListener("focusin",R),T.removeEventListener("focusout",O),T.removeEventListener("pointermove",R),T.removeEventListener("pointerleave",L),window.removeEventListener("blur",R),window.removeEventListener("focus",N)}}},[S,c.isClosePausedRef]);const E=v.useCallback(({tabbingDirection:T})=>{const R=f().map(N=>{const O=N.ref.current,L=[O,...B_(O)];return T==="forwards"?L:L.reverse()});return(T==="forwards"?R.reverse():R).flat()},[f]);return v.useEffect(()=>{const T=y.current;if(T){const A=R=>{const N=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!N){const L=document.activeElement,j=R.shiftKey;if(R.target===T&&j){h.current?.focus();return}const Y=E({tabbingDirection:j?"backwards":"forwards"}),D=Y.findIndex(Z=>Z===L);Ch(Y.slice(D+1))?R.preventDefault():j?h.current?.focus():m.current?.focus()}};return T.addEventListener("keydown",A),()=>T.removeEventListener("keydown",A)}},[f,E]),g.jsxs(h_,{ref:d,role:"region","aria-label":l.replace("{hotkey}",b),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&g.jsx(fp,{ref:h,onFocusFromOutsideViewport:()=>{const T=E({tabbingDirection:"forwards"});Ch(T)}}),g.jsx(im.Slot,{scope:r,children:g.jsx(_e.ol,{tabIndex:-1,...s,ref:w})}),S&&g.jsx(fp,{ref:m,onFocusFromOutsideViewport:()=>{const T=E({tabbingDirection:"backwards"});Ch(T)}})]})});Rw.displayName=Tw;var Nw="ToastFocusProxy",fp=v.forwardRef((e,n)=>{const{__scopeToast:r,onFocusFromOutsideViewport:i,...l}=e,s=jc(Nw,r);return g.jsx(Mc,{tabIndex:0,...l,ref:n,style:{position:"fixed"},onFocus:c=>{const f=c.relatedTarget;!s.viewport?.contains(f)&&i()}})});fp.displayName=Nw;var os="Toast",T_="toast.swipeStart",R_="toast.swipeMove",N_="toast.swipeCancel",__="toast.swipeEnd",_w=v.forwardRef((e,n)=>{const{forceMount:r,open:i,defaultOpen:l,onOpenChange:s,...c}=e,[f,d]=_a({prop:i,defaultProp:l??!0,onChange:s,caller:os});return g.jsx(un,{present:r||f,children:g.jsx(D_,{open:f,...c,ref:n,onClose:()=>d(!1),onPause:Tt(e.onPause),onResume:Tt(e.onResume),onSwipeStart:me(e.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:me(e.onSwipeMove,h=>{const{x:m,y}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:me(e.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:me(e.onSwipeEnd,h=>{const{x:m,y}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),d(!1)})})})});_w.displayName=os;var[M_,j_]=kw(os,{onClose(){}}),D_=v.forwardRef((e,n)=>{const{__scopeToast:r,type:i="foreground",duration:l,open:s,onClose:c,onEscapeKeyDown:f,onPause:d,onResume:h,onSwipeStart:m,onSwipeMove:y,onSwipeCancel:w,onSwipeEnd:b,...S}=e,E=jc(os,r),[T,A]=v.useState(null),R=ze(n,G=>A(G)),N=v.useRef(null),O=v.useRef(null),L=l||E.duration,j=v.useRef(0),H=v.useRef(L),$=v.useRef(0),{onToastAdd:Y,onToastRemove:D}=E,Z=Tt(()=>{T?.contains(document.activeElement)&&E.viewport?.focus(),c()}),J=v.useCallback(G=>{!G||G===1/0||(window.clearTimeout($.current),j.current=new Date().getTime(),$.current=window.setTimeout(Z,G))},[Z]);v.useEffect(()=>{const G=E.viewport;if(G){const ae=()=>{J(H.current),h?.()},z=()=>{const Q=new Date().getTime()-j.current;H.current=H.current-Q,window.clearTimeout($.current),d?.()};return G.addEventListener(up,z),G.addEventListener(cp,ae),()=>{G.removeEventListener(up,z),G.removeEventListener(cp,ae)}}},[E.viewport,L,d,h,J]),v.useEffect(()=>{s&&!E.isClosePausedRef.current&&J(L)},[s,L,E.isClosePausedRef,J]),v.useEffect(()=>(Y(),()=>D()),[Y,D]);const ne=v.useMemo(()=>T?zw(T):null,[T]);return E.viewport?g.jsxs(g.Fragment,{children:[ne&&g.jsx(O_,{__scopeToast:r,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:ne}),g.jsx(M_,{scope:r,onClose:Z,children:wo.createPortal(g.jsx(im.ItemSlot,{scope:r,children:g.jsx(d_,{asChild:!0,onEscapeKeyDown:me(f,()=>{E.isFocusedToastEscapeKeyDownRef.current||Z(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(_e.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":E.swipeDirection,...S,ref:R,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:me(e.onKeyDown,G=>{G.key==="Escape"&&(f?.(G.nativeEvent),G.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:me(e.onPointerDown,G=>{G.button===0&&(N.current={x:G.clientX,y:G.clientY})}),onPointerMove:me(e.onPointerMove,G=>{if(!N.current)return;const ae=G.clientX-N.current.x,z=G.clientY-N.current.y,Q=!!O.current,B=["left","right"].includes(E.swipeDirection),ie=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,k=B?ie(0,ae):0,W=B?0:ie(0,z),se=G.pointerType==="touch"?10:2,M={x:k,y:W},ce={originalEvent:G,delta:M};Q?(O.current=M,Iu(R_,y,ce,{discrete:!1})):mb(M,E.swipeDirection,se)?(O.current=M,Iu(T_,m,ce,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(ae)>se||Math.abs(z)>se)&&(N.current=null)}),onPointerUp:me(e.onPointerUp,G=>{const ae=O.current,z=G.target;if(z.hasPointerCapture(G.pointerId)&&z.releasePointerCapture(G.pointerId),O.current=null,N.current=null,ae){const Q=G.currentTarget,B={originalEvent:G,delta:ae};mb(ae,E.swipeDirection,E.swipeThreshold)?Iu(__,b,B,{discrete:!0}):Iu(N_,w,B,{discrete:!0}),Q.addEventListener("click",ie=>ie.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),O_=e=>{const{__scopeToast:n,children:r,...i}=e,l=jc(os,n),[s,c]=v.useState(!1),[f,d]=v.useState(!1);return z_(()=>c(!0)),v.useEffect(()=>{const h=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(h)},[]),f?null:g.jsx(is,{asChild:!0,children:g.jsx(Mc,{...i,children:s&&g.jsxs(g.Fragment,{children:[l.label," ",r]})})})},P_="ToastTitle",Mw=v.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(_e.div,{...i,ref:n})});Mw.displayName=P_;var L_="ToastDescription",jw=v.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e;return g.jsx(_e.div,{...i,ref:n})});jw.displayName=L_;var Dw="ToastAction",Ow=v.forwardRef((e,n)=>{const{altText:r,...i}=e;return r.trim()?g.jsx(Lw,{altText:r,asChild:!0,children:g.jsx(om,{...i,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dw}\`. Expected non-empty \`string\`.`),null)});Ow.displayName=Dw;var Pw="ToastClose",om=v.forwardRef((e,n)=>{const{__scopeToast:r,...i}=e,l=j_(Pw,r);return g.jsx(Lw,{asChild:!0,children:g.jsx(_e.button,{type:"button",...i,ref:n,onClick:me(e.onClick,l.onClose)})})});om.displayName=Pw;var Lw=v.forwardRef((e,n)=>{const{__scopeToast:r,altText:i,...l}=e;return g.jsx(_e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...l,ref:n})});function zw(e){const n=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&n.push(i.textContent),I_(i)){const l=i.ariaHidden||i.hidden||i.style.display==="none",s=i.dataset.radixToastAnnounceExclude==="";if(!l)if(s){const c=i.dataset.radixToastAnnounceAlt;c&&n.push(c)}else n.push(...zw(i))}}),n}function Iu(e,n,r,{discrete:i}){const l=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});n&&l.addEventListener(e,n,{once:!0}),i?rm(l,s):l.dispatchEvent(s)}var mb=(e,n,r=0)=>{const i=Math.abs(e.x),l=Math.abs(e.y),s=i>l;return n==="left"||n==="right"?s&&i>r:!s&&l>r};function z_(e=()=>{}){const n=Tt(e);$t(()=>{let r=0,i=0;return r=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(i)}},[n])}function I_(e){return e.nodeType===e.ELEMENT_NODE}function B_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Ch(e){const n=document.activeElement;return e.some(r=>r===n?!0:(r.focus(),document.activeElement!==n))}var U_=Aw,Iw=Rw,Bw=_w,Uw=Mw,Hw=jw,Fw=Ow,Vw=om;function qw(e){var n,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(n=0;n<l;n++)e[n]&&(r=qw(e[n]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function $w(){for(var e,n,r=0,i="",l=arguments.length;r<l;r++)(e=arguments[r])&&(n=qw(e))&&(i&&(i+=" "),i+=n);return i}const gb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yb=$w,Dc=(e,n)=>r=>{var i;if(n?.variants==null)return yb(e,r?.class,r?.className);const{variants:l,defaultVariants:s}=n,c=Object.keys(l).map(h=>{const m=r?.[h],y=s?.[h];if(m===null)return null;const w=gb(m)||gb(y);return l[h][w]}),f=r&&Object.entries(r).reduce((h,m)=>{let[y,w]=m;return w===void 0||(h[y]=w),h},{}),d=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:y,className:w,...b}=m;return Object.entries(b).every(S=>{let[E,T]=S;return Array.isArray(T)?T.includes({...s,...f}[E]):{...s,...f}[E]===T})?[...h,y,w]:h},[]);return yb(e,c,d,r?.class,r?.className)};/**
62
62
  * @license lucide-react v0.542.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
@@ -88,7 +88,7 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const K_=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Hl=je("bot",K_);/**
91
+ */const K_=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Ul=je("bot",K_);/**
92
92
  * @license lucide-react v0.542.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
@@ -173,7 +173,7 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const SM=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],tc=je("folder",SM);/**
176
+ */const SM=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ec=je("folder",SM);/**
177
177
  * @license lucide-react v0.542.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
@@ -318,7 +318,7 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
318
318
  *
319
319
  * This source code is licensed under the ISC license.
320
320
  * See the LICENSE file in the root directory of this source tree.
321
- */const Sj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],so=je("x",Sj),lm="-",Ej=e=>{const n=kj(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{const f=c.split(lm);return f[0]===""&&f.length!==1&&f.shift(),Qw(f,n)||Cj(c)},getConflictingClassGroupIds:(c,f)=>{const d=r[c]||[];return f&&i[c]?[...d,...i[c]]:d}}},Qw=(e,n)=>{if(e.length===0)return n.classGroupId;const r=e[0],i=n.nextPart.get(r),l=i?Qw(e.slice(1),i):void 0;if(l)return l;if(n.validators.length===0)return;const s=e.join(lm);return n.validators.find(({validator:c})=>c(s))?.classGroupId},bb=/^\[(.+)\]$/,Cj=e=>{if(bb.test(e)){const n=bb.exec(e)[1],r=n?.substring(0,n.indexOf(":"));if(r)return"arbitrary.."+r}},kj=e=>{const{theme:n,classGroups:r}=e,i={nextPart:new Map,validators:[]};for(const l in r)hp(r[l],i,l,n);return i},hp=(e,n,r,i)=>{e.forEach(l=>{if(typeof l=="string"){const s=l===""?n:wb(n,l);s.classGroupId=r;return}if(typeof l=="function"){if(Aj(l)){hp(l(i),n,r,i);return}n.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([s,c])=>{hp(c,wb(n,s),r,i)})})},wb=(e,n)=>{let r=e;return n.split(lm).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},Aj=e=>e.isThemeGetter,Tj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=new Map,i=new Map;const l=(s,c)=>{r.set(s,c),n++,n>e&&(n=0,i=r,r=new Map)};return{get(s){let c=r.get(s);if(c!==void 0)return c;if((c=i.get(s))!==void 0)return l(s,c),c},set(s,c){r.has(s)?r.set(s,c):l(s,c)}}},pp="!",mp=":",Rj=mp.length,Nj=e=>{const{prefix:n,experimentalParseClassName:r}=e;let i=l=>{const s=[];let c=0,f=0,d=0,h;for(let S=0;S<l.length;S++){let E=l[S];if(c===0&&f===0){if(E===mp){s.push(l.slice(d,S)),d=S+Rj;continue}if(E==="/"){h=S;continue}}E==="["?c++:E==="]"?c--:E==="("?f++:E===")"&&f--}const m=s.length===0?l:l.substring(d),y=_j(m),w=y!==m,b=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:b}};if(n){const l=n+mp,s=i;i=c=>c.startsWith(l)?s(c.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(r){const l=i;i=s=>r({className:s,parseClassName:l})}return i},_j=e=>e.endsWith(pp)?e.substring(0,e.length-1):e.startsWith(pp)?e.substring(1):e,Mj=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const l=[];let s=[];return i.forEach(c=>{c[0]==="["||n[c]?(l.push(...s.sort(),c),s=[]):s.push(c)}),l.push(...s.sort()),l}},jj=e=>({cache:Tj(e.cacheSize),parseClassName:Nj(e),sortModifiers:Mj(e),...Ej(e)}),Dj=/\s+/,Oj=(e,n)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:s}=n,c=[],f=e.trim().split(Dj);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:y,modifiers:w,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:E}=r(m);if(y){d=m+(d.length>0?" "+d:d);continue}let T=!!E,A=i(T?S.substring(0,E):S);if(!A){if(!T){d=m+(d.length>0?" "+d:d);continue}if(A=i(S),!A){d=m+(d.length>0?" "+d:d);continue}T=!1}const R=s(w).join(":"),N=b?R+pp:R,O=N+A;if(c.includes(O))continue;c.push(O);const L=l(A,T);for(let j=0;j<L.length;++j){const H=L[j];c.push(N+H)}d=m+(d.length>0?" "+d:d)}return d};function Pj(){let e=0,n,r,i="";for(;e<arguments.length;)(n=arguments[e++])&&(r=Zw(n))&&(i&&(i+=" "),i+=r);return i}const Zw=e=>{if(typeof e=="string")return e;let n,r="";for(let i=0;i<e.length;i++)e[i]&&(n=Zw(e[i]))&&(r&&(r+=" "),r+=n);return r};function Lj(e,...n){let r,i,l,s=c;function c(d){const h=n.reduce((m,y)=>y(m),e());return r=jj(h),i=r.cache.get,l=r.cache.set,s=f,f(d)}function f(d){const h=i(d);if(h)return h;const m=Oj(d,r);return l(d,m),m}return function(){return s(Pj.apply(null,arguments))}}const zt=e=>{const n=r=>r[e]||[];return n.isThemeGetter=!0,n},Ww=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zj=/^\d+\/\d+$/,Ij=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Uj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,to=e=>zj.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Yr=e=>Ij.test(e),Vj=()=>!0,qj=e=>Bj.test(e)&&!Uj.test(e),e1=()=>!1,$j=e=>Hj.test(e),Gj=e=>Fj.test(e),Yj=e=>!be(e)&&!we(e),Kj=e=>Co(e,r1,e1),be=e=>Ww.test(e),ti=e=>Co(e,a1,qj),Ah=e=>Co(e,Jj,Fe),Sb=e=>Co(e,t1,e1),Xj=e=>Co(e,n1,Gj),Uu=e=>Co(e,i1,$j),we=e=>Jw.test(e),Nl=e=>ko(e,a1),Qj=e=>ko(e,eD),Eb=e=>ko(e,t1),Zj=e=>ko(e,r1),Wj=e=>ko(e,n1),Hu=e=>ko(e,i1,!0),Co=(e,n,r)=>{const i=Ww.exec(e);return i?i[1]?n(i[1]):r(i[2]):!1},ko=(e,n,r=!1)=>{const i=Jw.exec(e);return i?i[1]?n(i[1]):r:!1},t1=e=>e==="position"||e==="percentage",n1=e=>e==="image"||e==="url",r1=e=>e==="length"||e==="size"||e==="bg-size",a1=e=>e==="length",Jj=e=>e==="number",eD=e=>e==="family-name",i1=e=>e==="shadow",tD=()=>{const e=zt("color"),n=zt("font"),r=zt("text"),i=zt("font-weight"),l=zt("tracking"),s=zt("leading"),c=zt("breakpoint"),f=zt("container"),d=zt("spacing"),h=zt("radius"),m=zt("shadow"),y=zt("inset-shadow"),w=zt("text-shadow"),b=zt("drop-shadow"),S=zt("blur"),E=zt("perspective"),T=zt("aspect"),A=zt("ease"),R=zt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...O(),we,be],j=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],$=()=>[we,be,d],Y=()=>[to,"full","auto",...$()],D=()=>[Ca,"none","subgrid",we,be],Z=()=>["auto",{span:["full",Ca,we,be]},Ca,we,be],J=()=>[Ca,"auto",we,be],ne=()=>["auto","min","max","fr",we,be],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...$()],Q=()=>[to,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],B=()=>[e,we,be],ie=()=>[...O(),Eb,Sb,{position:[we,be]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",Zj,Kj,{size:[we,be]}],se=()=>[kh,Nl,ti],M=()=>["","none","full",h,we,be],ce=()=>["",Fe,Nl,ti],Ee=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[Fe,kh,Eb,Sb],ve=()=>["","none",S,we,be],Ve=()=>["none",Fe,we,be],De=()=>["none",Fe,we,be],Be=()=>[Fe,we,be],We=()=>[to,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yr],breakpoint:[Yr],color:[Vj],container:[Yr],"drop-shadow":[Yr],ease:["in","out","in-out"],font:[Yj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yr],shadow:[Yr],spacing:["px",Fe],text:[Yr],"text-shadow":[Yr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",to,be,we,T]}],container:["container"],columns:[{columns:[Fe,be,we,f]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Ca,"auto",we,be]}],basis:[{basis:[to,"full","auto",f,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,to,"auto","initial","none",be]}],grow:[{grow:["",Fe,we,be]}],shrink:[{shrink:["",Fe,we,be]}],order:[{order:[Ca,"first","last","none",we,be]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[f,"screen",...Q()]}],"min-w":[{"min-w":[f,"screen","none",...Q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,Nl,ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,we,Ah]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kh,be]}],"font-family":[{font:[Qj,be,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,we,be]}],"line-clamp":[{"line-clamp":[Fe,"none",we,Ah]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",we,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",we,ti]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Fe,"auto",we,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ca,we,be],radial:["",we,be],conic:[Ca,we,be]},Wj,Xj]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,we,be]}],"outline-w":[{outline:["",Fe,Nl,ti]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",m,Hu,Uu]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",y,Hu,Uu]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Fe,ti]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",w,Hu,Uu]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Fe,we,be]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[we,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,be]}],filter:[{filter:["","none",we,be]}],blur:[{blur:ve()}],brightness:[{brightness:[Fe,we,be]}],contrast:[{contrast:[Fe,we,be]}],"drop-shadow":[{"drop-shadow":["","none",b,Hu,Uu]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Fe,we,be]}],"hue-rotate":[{"hue-rotate":[Fe,we,be]}],invert:[{invert:["",Fe,we,be]}],saturate:[{saturate:[Fe,we,be]}],sepia:[{sepia:["",Fe,we,be]}],"backdrop-filter":[{"backdrop-filter":["","none",we,be]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,we,be]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,we,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,we,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,we,be]}],"backdrop-invert":[{"backdrop-invert":["",Fe,we,be]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,we,be]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,we,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,we,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",we,be]}],ease:[{ease:["linear","initial",A,we,be]}],delay:[{delay:[Fe,we,be]}],animate:[{animate:["none",R,we,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,we,be]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Ve()}],"rotate-x":[{"rotate-x":Ve()}],"rotate-y":[{"rotate-y":Ve()}],"rotate-z":[{"rotate-z":Ve()}],scale:[{scale:De()}],"scale-x":[{"scale-x":De()}],"scale-y":[{"scale-y":De()}],"scale-z":[{"scale-z":De()}],"scale-3d":["scale-3d"],skew:[{skew:Be()}],"skew-x":[{"skew-x":Be()}],"skew-y":[{"skew-y":Be()}],transform:[{transform:[we,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,be]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Fe,Nl,ti,Ah]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},nD=Lj(tD);function ue(...e){return nD($w(e))}const rD=U_,o1=v.forwardRef(({className:e,...n},r)=>g.jsx(Iw,{ref:r,className:ue("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...n}));o1.displayName=Iw.displayName;const aD=Dc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),l1=v.forwardRef(({className:e,variant:n,...r},i)=>g.jsx(Bw,{ref:i,className:ue(aD({variant:n}),e),...r}));l1.displayName=Bw.displayName;const iD=v.forwardRef(({className:e,...n},r)=>g.jsx(Fw,{ref:r,className:ue("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}));iD.displayName=Fw.displayName;const s1=v.forwardRef(({className:e,...n},r)=>g.jsx(Vw,{ref:r,className:ue("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...n,children:g.jsx(so,{className:"h-4 w-4"})}));s1.displayName=Vw.displayName;const u1=v.forwardRef(({className:e,...n},r)=>g.jsx(Uw,{ref:r,className:ue("text-sm font-semibold",e),...n}));u1.displayName=Uw.displayName;const c1=v.forwardRef(({className:e,...n},r)=>g.jsx(Hw,{ref:r,className:ue("text-sm opacity-90",e),...n}));c1.displayName=Hw.displayName;function oD(){const{toasts:e}=ZN();return g.jsxs(rD,{children:[e.map(function({id:n,title:r,description:i,action:l,...s}){return g.jsxs(l1,{...s,children:[g.jsxs("div",{className:"grid gap-1",children:[r&&g.jsx(u1,{children:r}),i&&g.jsx(c1,{children:i})]}),l,g.jsx(s1,{})]},n)}),g.jsx(o1,{})]})}function lD({children:e}){const{isAuthenticated:n,authEnabled:r,isLoading:i}=yw(),l=Wn();return i?g.jsx("div",{className:"min-h-screen flex items-center justify-center",children:g.jsx(cc,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r?n?g.jsx(g.Fragment,{children:e}):g.jsx(DR,{to:"/login",state:{from:l},replace:!0}):g.jsx(g.Fragment,{children:e})}function sD(){return g.jsx("div",{className:"flex items-center justify-center min-h-screen",children:g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[g.jsx(cc,{className:"h-8 w-8 animate-spin text-primary"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})}const Th=768;function f1(){const[e,n]=v.useState(void 0);return v.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Th-1}px)`),i=()=>{n(window.innerWidth<Th)};return r.addEventListener("change",i),n(window.innerWidth<Th),()=>r.removeEventListener("change",i)},[]),!!e}const sm=Dc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),vt=v.forwardRef(({className:e,variant:n,size:r,asChild:i=!1,...l},s)=>{const c=i?So:"button";return g.jsx(c,{className:ue(sm({variant:n,size:r,className:e})),ref:s,...l})});vt.displayName="Button";const d1=v.forwardRef(({className:e,type:n,...r},i)=>g.jsx("input",{type:n,className:ue("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...r}));d1.displayName="Input";var uD="Separator",Cb="horizontal",cD=["horizontal","vertical"],h1=v.forwardRef((e,n)=>{const{decorative:r,orientation:i=Cb,...l}=e,s=fD(i)?i:Cb,f=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return g.jsx(_e.div,{"data-orientation":s,...f,...l,ref:n})});h1.displayName=uD;function fD(e){return cD.includes(e)}var p1=h1;const m1=v.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...i},l)=>g.jsx(p1,{ref:l,decorative:r,orientation:n,className:ue("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));m1.displayName=p1.displayName;var dD=$0[" useId ".trim().toString()]||(()=>{}),hD=0;function kr(e){const[n,r]=v.useState(dD());return $t(()=>{r(i=>i??String(hD++))},[e]),e||(n?`radix-${n}`:"")}var Rh="focusScope.autoFocusOnMount",Nh="focusScope.autoFocusOnUnmount",kb={bubbles:!1,cancelable:!0},pD="FocusScope",Pc=v.forwardRef((e,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:s,...c}=e,[f,d]=v.useState(null),h=Tt(l),m=Tt(s),y=v.useRef(null),w=ze(n,E=>d(E)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let E=function(N){if(b.paused||!f)return;const O=N.target;f.contains(O)?y.current=O:Ta(y.current,{select:!0})},T=function(N){if(b.paused||!f)return;const O=N.relatedTarget;O!==null&&(f.contains(O)||Ta(y.current,{select:!0}))},A=function(N){if(document.activeElement===document.body)for(const L of N)L.removedNodes.length>0&&Ta(f)};document.addEventListener("focusin",E),document.addEventListener("focusout",T);const R=new MutationObserver(A);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",T),R.disconnect()}}},[i,f,b.paused]),v.useEffect(()=>{if(f){Tb.add(b);const E=document.activeElement;if(!f.contains(E)){const A=new CustomEvent(Rh,kb);f.addEventListener(Rh,h),f.dispatchEvent(A),A.defaultPrevented||(mD(bD(g1(f)),{select:!0}),document.activeElement===E&&Ta(f))}return()=>{f.removeEventListener(Rh,h),setTimeout(()=>{const A=new CustomEvent(Nh,kb);f.addEventListener(Nh,m),f.dispatchEvent(A),A.defaultPrevented||Ta(E??document.body,{select:!0}),f.removeEventListener(Nh,m),Tb.remove(b)},0)}}},[f,h,m,b]);const S=v.useCallback(E=>{if(!r&&!i||b.paused)return;const T=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,A=document.activeElement;if(T&&A){const R=E.currentTarget,[N,O]=gD(R);N&&O?!E.shiftKey&&A===O?(E.preventDefault(),r&&Ta(N,{select:!0})):E.shiftKey&&A===N&&(E.preventDefault(),r&&Ta(O,{select:!0})):A===R&&E.preventDefault()}},[r,i,b.paused]);return g.jsx(_e.div,{tabIndex:-1,...c,ref:w,onKeyDown:S})});Pc.displayName=pD;function mD(e,{select:n=!1}={}){const r=document.activeElement;for(const i of e)if(Ta(i,{select:n}),document.activeElement!==r)return}function gD(e){const n=g1(e),r=Ab(n,e),i=Ab(n.reverse(),e);return[r,i]}function g1(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Ab(e,n){for(const r of e)if(!yD(r,{upTo:n}))return r}function yD(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function vD(e){return e instanceof HTMLInputElement&&"select"in e}function Ta(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&vD(e)&&n&&e.select()}}var Tb=xD();function xD(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=Rb(e,n),e.unshift(n)},remove(n){e=Rb(e,n),e[0]?.resume()}}}function Rb(e,n){const r=[...e],i=r.indexOf(n);return i!==-1&&r.splice(i,1),r}function bD(e){return e.filter(n=>n.tagName!=="A")}var _h=0;function um(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nb()),document.body.insertAdjacentElement("beforeend",e[1]??Nb()),_h++,()=>{_h===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),_h--}},[])}function Nb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Er=function(){return Er=Object.assign||function(n){for(var r,i=1,l=arguments.length;i<l;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Er.apply(this,arguments)};function y1(e,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(r[i[l]]=e[i[l]]);return r}function wD(e,n,r){if(r||arguments.length===2)for(var i=0,l=n.length,s;i<l;i++)(s||!(i in n))&&(s||(s=Array.prototype.slice.call(n,0,i)),s[i]=n[i]);return e.concat(s||Array.prototype.slice.call(n))}var nc="right-scroll-bar-position",rc="width-before-scroll-bar",SD="with-scroll-bars-hidden",ED="--removed-body-scroll-bar-size";function Mh(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function CD(e,n){var r=v.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(i){var l=r.value;l!==i&&(r.value=i,r.callback(i,l))}}}})[0];return r.callback=n,r.facade}var kD=typeof window<"u"?v.useLayoutEffect:v.useEffect,_b=new WeakMap;function AD(e,n){var r=CD(null,function(i){return e.forEach(function(l){return Mh(l,i)})});return kD(function(){var i=_b.get(r);if(i){var l=new Set(i),s=new Set(e),c=r.current;l.forEach(function(f){s.has(f)||Mh(f,null)}),s.forEach(function(f){l.has(f)||Mh(f,c)})}_b.set(r,e)},[e]),r}function TD(e){return e}function RD(e,n){n===void 0&&(n=TD);var r=[],i=!1,l={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var c=n(s,i);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(s){for(i=!0;r.length;){var c=r;r=[],c.forEach(s)}r={push:function(f){return s(f)},filter:function(){return r}}},assignMedium:function(s){i=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(s),c=r}var d=function(){var m=c;c=[],m.forEach(s)},h=function(){return Promise.resolve().then(d)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return l}function ND(e){e===void 0&&(e={});var n=RD(null);return n.options=Er({async:!0,ssr:!1},e),n}var v1=function(e){var n=e.sideCar,r=y1(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return v.createElement(i,Er({},r))};v1.isSideCarExport=!0;function _D(e,n){return e.useMedium(n),v1}var x1=ND(),jh=function(){},Lc=v.forwardRef(function(e,n){var r=v.useRef(null),i=v.useState({onScrollCapture:jh,onWheelCapture:jh,onTouchMoveCapture:jh}),l=i[0],s=i[1],c=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,y=e.shards,w=e.sideCar,b=e.noRelative,S=e.noIsolation,E=e.inert,T=e.allowPinchZoom,A=e.as,R=A===void 0?"div":A,N=e.gapMode,O=y1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=w,j=AD([r,n]),H=Er(Er({},O),l);return v.createElement(v.Fragment,null,m&&v.createElement(L,{sideCar:x1,removeScrollBar:h,shards:y,noRelative:b,noIsolation:S,inert:E,setCallbacks:s,allowPinchZoom:!!T,lockRef:r,gapMode:N}),c?v.cloneElement(v.Children.only(f),Er(Er({},H),{ref:j})):v.createElement(R,Er({},H,{className:d,ref:j}),f))});Lc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lc.classNames={fullWidth:rc,zeroRight:nc};var MD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=MD();return n&&e.setAttribute("nonce",n),e}function DD(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function OD(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var PD=function(){var e=0,n=null;return{add:function(r){e==0&&(n=jD())&&(DD(n,r),OD(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},LD=function(){var e=PD();return function(n,r){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},b1=function(){var e=LD(),n=function(r){var i=r.styles,l=r.dynamic;return e(i,l),null};return n},zD={left:0,top:0,right:0,gap:0},Dh=function(e){return parseInt(e||"",10)||0},ID=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],l=n[e==="padding"?"paddingRight":"marginRight"];return[Dh(r),Dh(i),Dh(l)]},BD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zD;var n=ID(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-r+n[2]-n[0])}},UD=b1(),uo="data-scroll-locked",HD=function(e,n,r,i){var l=e.left,s=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
321
+ */const Sj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],so=je("x",Sj),lm="-",Ej=e=>{const n=kj(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{const f=c.split(lm);return f[0]===""&&f.length!==1&&f.shift(),Qw(f,n)||Cj(c)},getConflictingClassGroupIds:(c,f)=>{const d=r[c]||[];return f&&i[c]?[...d,...i[c]]:d}}},Qw=(e,n)=>{if(e.length===0)return n.classGroupId;const r=e[0],i=n.nextPart.get(r),l=i?Qw(e.slice(1),i):void 0;if(l)return l;if(n.validators.length===0)return;const s=e.join(lm);return n.validators.find(({validator:c})=>c(s))?.classGroupId},bb=/^\[(.+)\]$/,Cj=e=>{if(bb.test(e)){const n=bb.exec(e)[1],r=n?.substring(0,n.indexOf(":"));if(r)return"arbitrary.."+r}},kj=e=>{const{theme:n,classGroups:r}=e,i={nextPart:new Map,validators:[]};for(const l in r)hp(r[l],i,l,n);return i},hp=(e,n,r,i)=>{e.forEach(l=>{if(typeof l=="string"){const s=l===""?n:wb(n,l);s.classGroupId=r;return}if(typeof l=="function"){if(Aj(l)){hp(l(i),n,r,i);return}n.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([s,c])=>{hp(c,wb(n,s),r,i)})})},wb=(e,n)=>{let r=e;return n.split(lm).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},Aj=e=>e.isThemeGetter,Tj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=new Map,i=new Map;const l=(s,c)=>{r.set(s,c),n++,n>e&&(n=0,i=r,r=new Map)};return{get(s){let c=r.get(s);if(c!==void 0)return c;if((c=i.get(s))!==void 0)return l(s,c),c},set(s,c){r.has(s)?r.set(s,c):l(s,c)}}},pp="!",mp=":",Rj=mp.length,Nj=e=>{const{prefix:n,experimentalParseClassName:r}=e;let i=l=>{const s=[];let c=0,f=0,d=0,h;for(let S=0;S<l.length;S++){let E=l[S];if(c===0&&f===0){if(E===mp){s.push(l.slice(d,S)),d=S+Rj;continue}if(E==="/"){h=S;continue}}E==="["?c++:E==="]"?c--:E==="("?f++:E===")"&&f--}const m=s.length===0?l:l.substring(d),y=_j(m),w=y!==m,b=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:b}};if(n){const l=n+mp,s=i;i=c=>c.startsWith(l)?s(c.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(r){const l=i;i=s=>r({className:s,parseClassName:l})}return i},_j=e=>e.endsWith(pp)?e.substring(0,e.length-1):e.startsWith(pp)?e.substring(1):e,Mj=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const l=[];let s=[];return i.forEach(c=>{c[0]==="["||n[c]?(l.push(...s.sort(),c),s=[]):s.push(c)}),l.push(...s.sort()),l}},jj=e=>({cache:Tj(e.cacheSize),parseClassName:Nj(e),sortModifiers:Mj(e),...Ej(e)}),Dj=/\s+/,Oj=(e,n)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:s}=n,c=[],f=e.trim().split(Dj);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:y,modifiers:w,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:E}=r(m);if(y){d=m+(d.length>0?" "+d:d);continue}let T=!!E,A=i(T?S.substring(0,E):S);if(!A){if(!T){d=m+(d.length>0?" "+d:d);continue}if(A=i(S),!A){d=m+(d.length>0?" "+d:d);continue}T=!1}const R=s(w).join(":"),N=b?R+pp:R,O=N+A;if(c.includes(O))continue;c.push(O);const L=l(A,T);for(let j=0;j<L.length;++j){const H=L[j];c.push(N+H)}d=m+(d.length>0?" "+d:d)}return d};function Pj(){let e=0,n,r,i="";for(;e<arguments.length;)(n=arguments[e++])&&(r=Zw(n))&&(i&&(i+=" "),i+=r);return i}const Zw=e=>{if(typeof e=="string")return e;let n,r="";for(let i=0;i<e.length;i++)e[i]&&(n=Zw(e[i]))&&(r&&(r+=" "),r+=n);return r};function Lj(e,...n){let r,i,l,s=c;function c(d){const h=n.reduce((m,y)=>y(m),e());return r=jj(h),i=r.cache.get,l=r.cache.set,s=f,f(d)}function f(d){const h=i(d);if(h)return h;const m=Oj(d,r);return l(d,m),m}return function(){return s(Pj.apply(null,arguments))}}const zt=e=>{const n=r=>r[e]||[];return n.isThemeGetter=!0,n},Ww=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zj=/^\d+\/\d+$/,Ij=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Uj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,to=e=>zj.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Yr=e=>Ij.test(e),Vj=()=>!0,qj=e=>Bj.test(e)&&!Uj.test(e),e1=()=>!1,$j=e=>Hj.test(e),Gj=e=>Fj.test(e),Yj=e=>!be(e)&&!we(e),Kj=e=>Co(e,r1,e1),be=e=>Ww.test(e),ti=e=>Co(e,a1,qj),Ah=e=>Co(e,Jj,Fe),Sb=e=>Co(e,t1,e1),Xj=e=>Co(e,n1,Gj),Bu=e=>Co(e,i1,$j),we=e=>Jw.test(e),Nl=e=>ko(e,a1),Qj=e=>ko(e,eD),Eb=e=>ko(e,t1),Zj=e=>ko(e,r1),Wj=e=>ko(e,n1),Uu=e=>ko(e,i1,!0),Co=(e,n,r)=>{const i=Ww.exec(e);return i?i[1]?n(i[1]):r(i[2]):!1},ko=(e,n,r=!1)=>{const i=Jw.exec(e);return i?i[1]?n(i[1]):r:!1},t1=e=>e==="position"||e==="percentage",n1=e=>e==="image"||e==="url",r1=e=>e==="length"||e==="size"||e==="bg-size",a1=e=>e==="length",Jj=e=>e==="number",eD=e=>e==="family-name",i1=e=>e==="shadow",tD=()=>{const e=zt("color"),n=zt("font"),r=zt("text"),i=zt("font-weight"),l=zt("tracking"),s=zt("leading"),c=zt("breakpoint"),f=zt("container"),d=zt("spacing"),h=zt("radius"),m=zt("shadow"),y=zt("inset-shadow"),w=zt("text-shadow"),b=zt("drop-shadow"),S=zt("blur"),E=zt("perspective"),T=zt("aspect"),A=zt("ease"),R=zt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...O(),we,be],j=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],$=()=>[we,be,d],Y=()=>[to,"full","auto",...$()],D=()=>[Ca,"none","subgrid",we,be],Z=()=>["auto",{span:["full",Ca,we,be]},Ca,we,be],J=()=>[Ca,"auto",we,be],ne=()=>["auto","min","max","fr",we,be],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...$()],Q=()=>[to,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],B=()=>[e,we,be],ie=()=>[...O(),Eb,Sb,{position:[we,be]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",Zj,Kj,{size:[we,be]}],se=()=>[kh,Nl,ti],M=()=>["","none","full",h,we,be],ce=()=>["",Fe,Nl,ti],Ee=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[Fe,kh,Eb,Sb],ve=()=>["","none",S,we,be],Ve=()=>["none",Fe,we,be],De=()=>["none",Fe,we,be],Be=()=>[Fe,we,be],We=()=>[to,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yr],breakpoint:[Yr],color:[Vj],container:[Yr],"drop-shadow":[Yr],ease:["in","out","in-out"],font:[Yj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yr],shadow:[Yr],spacing:["px",Fe],text:[Yr],"text-shadow":[Yr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",to,be,we,T]}],container:["container"],columns:[{columns:[Fe,be,we,f]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Ca,"auto",we,be]}],basis:[{basis:[to,"full","auto",f,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,to,"auto","initial","none",be]}],grow:[{grow:["",Fe,we,be]}],shrink:[{shrink:["",Fe,we,be]}],order:[{order:[Ca,"first","last","none",we,be]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[f,"screen",...Q()]}],"min-w":[{"min-w":[f,"screen","none",...Q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,Nl,ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,we,Ah]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kh,be]}],"font-family":[{font:[Qj,be,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,we,be]}],"line-clamp":[{"line-clamp":[Fe,"none",we,Ah]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",we,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",we,ti]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Fe,"auto",we,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ca,we,be],radial:["",we,be],conic:[Ca,we,be]},Wj,Xj]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,we,be]}],"outline-w":[{outline:["",Fe,Nl,ti]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",m,Uu,Bu]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",y,Uu,Bu]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Fe,ti]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",w,Uu,Bu]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Fe,we,be]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[we,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,be]}],filter:[{filter:["","none",we,be]}],blur:[{blur:ve()}],brightness:[{brightness:[Fe,we,be]}],contrast:[{contrast:[Fe,we,be]}],"drop-shadow":[{"drop-shadow":["","none",b,Uu,Bu]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Fe,we,be]}],"hue-rotate":[{"hue-rotate":[Fe,we,be]}],invert:[{invert:["",Fe,we,be]}],saturate:[{saturate:[Fe,we,be]}],sepia:[{sepia:["",Fe,we,be]}],"backdrop-filter":[{"backdrop-filter":["","none",we,be]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,we,be]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,we,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,we,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,we,be]}],"backdrop-invert":[{"backdrop-invert":["",Fe,we,be]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,we,be]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,we,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,we,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",we,be]}],ease:[{ease:["linear","initial",A,we,be]}],delay:[{delay:[Fe,we,be]}],animate:[{animate:["none",R,we,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,we,be]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Ve()}],"rotate-x":[{"rotate-x":Ve()}],"rotate-y":[{"rotate-y":Ve()}],"rotate-z":[{"rotate-z":Ve()}],scale:[{scale:De()}],"scale-x":[{"scale-x":De()}],"scale-y":[{"scale-y":De()}],"scale-z":[{"scale-z":De()}],"scale-3d":["scale-3d"],skew:[{skew:Be()}],"skew-x":[{"skew-x":Be()}],"skew-y":[{"skew-y":Be()}],transform:[{transform:[we,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,be]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Fe,Nl,ti,Ah]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},nD=Lj(tD);function ue(...e){return nD($w(e))}const rD=U_,o1=v.forwardRef(({className:e,...n},r)=>g.jsx(Iw,{ref:r,className:ue("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...n}));o1.displayName=Iw.displayName;const aD=Dc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),l1=v.forwardRef(({className:e,variant:n,...r},i)=>g.jsx(Bw,{ref:i,className:ue(aD({variant:n}),e),...r}));l1.displayName=Bw.displayName;const iD=v.forwardRef(({className:e,...n},r)=>g.jsx(Fw,{ref:r,className:ue("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}));iD.displayName=Fw.displayName;const s1=v.forwardRef(({className:e,...n},r)=>g.jsx(Vw,{ref:r,className:ue("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...n,children:g.jsx(so,{className:"h-4 w-4"})}));s1.displayName=Vw.displayName;const u1=v.forwardRef(({className:e,...n},r)=>g.jsx(Uw,{ref:r,className:ue("text-sm font-semibold",e),...n}));u1.displayName=Uw.displayName;const c1=v.forwardRef(({className:e,...n},r)=>g.jsx(Hw,{ref:r,className:ue("text-sm opacity-90",e),...n}));c1.displayName=Hw.displayName;function oD(){const{toasts:e}=ZN();return g.jsxs(rD,{children:[e.map(function({id:n,title:r,description:i,action:l,...s}){return g.jsxs(l1,{...s,children:[g.jsxs("div",{className:"grid gap-1",children:[r&&g.jsx(u1,{children:r}),i&&g.jsx(c1,{children:i})]}),l,g.jsx(s1,{})]},n)}),g.jsx(o1,{})]})}function lD({children:e}){const{isAuthenticated:n,authEnabled:r,isLoading:i}=yw(),l=Wn();return i?g.jsx("div",{className:"min-h-screen flex items-center justify-center",children:g.jsx(cc,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r?n?g.jsx(g.Fragment,{children:e}):g.jsx(DR,{to:"/login",state:{from:l},replace:!0}):g.jsx(g.Fragment,{children:e})}function sD(){return g.jsx("div",{className:"flex items-center justify-center min-h-screen",children:g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[g.jsx(cc,{className:"h-8 w-8 animate-spin text-primary"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})}const Th=768;function f1(){const[e,n]=v.useState(void 0);return v.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Th-1}px)`),i=()=>{n(window.innerWidth<Th)};return r.addEventListener("change",i),n(window.innerWidth<Th),()=>r.removeEventListener("change",i)},[]),!!e}const sm=Dc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),vt=v.forwardRef(({className:e,variant:n,size:r,asChild:i=!1,...l},s)=>{const c=i?So:"button";return g.jsx(c,{className:ue(sm({variant:n,size:r,className:e})),ref:s,...l})});vt.displayName="Button";const d1=v.forwardRef(({className:e,type:n,...r},i)=>g.jsx("input",{type:n,className:ue("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...r}));d1.displayName="Input";var uD="Separator",Cb="horizontal",cD=["horizontal","vertical"],h1=v.forwardRef((e,n)=>{const{decorative:r,orientation:i=Cb,...l}=e,s=fD(i)?i:Cb,f=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return g.jsx(_e.div,{"data-orientation":s,...f,...l,ref:n})});h1.displayName=uD;function fD(e){return cD.includes(e)}var p1=h1;const m1=v.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...i},l)=>g.jsx(p1,{ref:l,decorative:r,orientation:n,className:ue("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));m1.displayName=p1.displayName;var dD=$0[" useId ".trim().toString()]||(()=>{}),hD=0;function kr(e){const[n,r]=v.useState(dD());return $t(()=>{r(i=>i??String(hD++))},[e]),e||(n?`radix-${n}`:"")}var Rh="focusScope.autoFocusOnMount",Nh="focusScope.autoFocusOnUnmount",kb={bubbles:!1,cancelable:!0},pD="FocusScope",Pc=v.forwardRef((e,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:s,...c}=e,[f,d]=v.useState(null),h=Tt(l),m=Tt(s),y=v.useRef(null),w=ze(n,E=>d(E)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let E=function(N){if(b.paused||!f)return;const O=N.target;f.contains(O)?y.current=O:Ta(y.current,{select:!0})},T=function(N){if(b.paused||!f)return;const O=N.relatedTarget;O!==null&&(f.contains(O)||Ta(y.current,{select:!0}))},A=function(N){if(document.activeElement===document.body)for(const L of N)L.removedNodes.length>0&&Ta(f)};document.addEventListener("focusin",E),document.addEventListener("focusout",T);const R=new MutationObserver(A);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",T),R.disconnect()}}},[i,f,b.paused]),v.useEffect(()=>{if(f){Tb.add(b);const E=document.activeElement;if(!f.contains(E)){const A=new CustomEvent(Rh,kb);f.addEventListener(Rh,h),f.dispatchEvent(A),A.defaultPrevented||(mD(bD(g1(f)),{select:!0}),document.activeElement===E&&Ta(f))}return()=>{f.removeEventListener(Rh,h),setTimeout(()=>{const A=new CustomEvent(Nh,kb);f.addEventListener(Nh,m),f.dispatchEvent(A),A.defaultPrevented||Ta(E??document.body,{select:!0}),f.removeEventListener(Nh,m),Tb.remove(b)},0)}}},[f,h,m,b]);const S=v.useCallback(E=>{if(!r&&!i||b.paused)return;const T=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,A=document.activeElement;if(T&&A){const R=E.currentTarget,[N,O]=gD(R);N&&O?!E.shiftKey&&A===O?(E.preventDefault(),r&&Ta(N,{select:!0})):E.shiftKey&&A===N&&(E.preventDefault(),r&&Ta(O,{select:!0})):A===R&&E.preventDefault()}},[r,i,b.paused]);return g.jsx(_e.div,{tabIndex:-1,...c,ref:w,onKeyDown:S})});Pc.displayName=pD;function mD(e,{select:n=!1}={}){const r=document.activeElement;for(const i of e)if(Ta(i,{select:n}),document.activeElement!==r)return}function gD(e){const n=g1(e),r=Ab(n,e),i=Ab(n.reverse(),e);return[r,i]}function g1(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Ab(e,n){for(const r of e)if(!yD(r,{upTo:n}))return r}function yD(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function vD(e){return e instanceof HTMLInputElement&&"select"in e}function Ta(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&vD(e)&&n&&e.select()}}var Tb=xD();function xD(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=Rb(e,n),e.unshift(n)},remove(n){e=Rb(e,n),e[0]?.resume()}}}function Rb(e,n){const r=[...e],i=r.indexOf(n);return i!==-1&&r.splice(i,1),r}function bD(e){return e.filter(n=>n.tagName!=="A")}var _h=0;function um(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nb()),document.body.insertAdjacentElement("beforeend",e[1]??Nb()),_h++,()=>{_h===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),_h--}},[])}function Nb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Er=function(){return Er=Object.assign||function(n){for(var r,i=1,l=arguments.length;i<l;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Er.apply(this,arguments)};function y1(e,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(r[i[l]]=e[i[l]]);return r}function wD(e,n,r){if(r||arguments.length===2)for(var i=0,l=n.length,s;i<l;i++)(s||!(i in n))&&(s||(s=Array.prototype.slice.call(n,0,i)),s[i]=n[i]);return e.concat(s||Array.prototype.slice.call(n))}var tc="right-scroll-bar-position",nc="width-before-scroll-bar",SD="with-scroll-bars-hidden",ED="--removed-body-scroll-bar-size";function Mh(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function CD(e,n){var r=v.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(i){var l=r.value;l!==i&&(r.value=i,r.callback(i,l))}}}})[0];return r.callback=n,r.facade}var kD=typeof window<"u"?v.useLayoutEffect:v.useEffect,_b=new WeakMap;function AD(e,n){var r=CD(null,function(i){return e.forEach(function(l){return Mh(l,i)})});return kD(function(){var i=_b.get(r);if(i){var l=new Set(i),s=new Set(e),c=r.current;l.forEach(function(f){s.has(f)||Mh(f,null)}),s.forEach(function(f){l.has(f)||Mh(f,c)})}_b.set(r,e)},[e]),r}function TD(e){return e}function RD(e,n){n===void 0&&(n=TD);var r=[],i=!1,l={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var c=n(s,i);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(s){for(i=!0;r.length;){var c=r;r=[],c.forEach(s)}r={push:function(f){return s(f)},filter:function(){return r}}},assignMedium:function(s){i=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(s),c=r}var d=function(){var m=c;c=[],m.forEach(s)},h=function(){return Promise.resolve().then(d)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return l}function ND(e){e===void 0&&(e={});var n=RD(null);return n.options=Er({async:!0,ssr:!1},e),n}var v1=function(e){var n=e.sideCar,r=y1(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return v.createElement(i,Er({},r))};v1.isSideCarExport=!0;function _D(e,n){return e.useMedium(n),v1}var x1=ND(),jh=function(){},Lc=v.forwardRef(function(e,n){var r=v.useRef(null),i=v.useState({onScrollCapture:jh,onWheelCapture:jh,onTouchMoveCapture:jh}),l=i[0],s=i[1],c=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,y=e.shards,w=e.sideCar,b=e.noRelative,S=e.noIsolation,E=e.inert,T=e.allowPinchZoom,A=e.as,R=A===void 0?"div":A,N=e.gapMode,O=y1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=w,j=AD([r,n]),H=Er(Er({},O),l);return v.createElement(v.Fragment,null,m&&v.createElement(L,{sideCar:x1,removeScrollBar:h,shards:y,noRelative:b,noIsolation:S,inert:E,setCallbacks:s,allowPinchZoom:!!T,lockRef:r,gapMode:N}),c?v.cloneElement(v.Children.only(f),Er(Er({},H),{ref:j})):v.createElement(R,Er({},H,{className:d,ref:j}),f))});Lc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lc.classNames={fullWidth:nc,zeroRight:tc};var MD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=MD();return n&&e.setAttribute("nonce",n),e}function DD(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function OD(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var PD=function(){var e=0,n=null;return{add:function(r){e==0&&(n=jD())&&(DD(n,r),OD(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},LD=function(){var e=PD();return function(n,r){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},b1=function(){var e=LD(),n=function(r){var i=r.styles,l=r.dynamic;return e(i,l),null};return n},zD={left:0,top:0,right:0,gap:0},Dh=function(e){return parseInt(e||"",10)||0},ID=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],l=n[e==="padding"?"paddingRight":"marginRight"];return[Dh(r),Dh(i),Dh(l)]},BD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zD;var n=ID(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-r+n[2]-n[0])}},UD=b1(),uo="data-scroll-locked",HD=function(e,n,r,i){var l=e.left,s=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
322
322
  .`.concat(SD,` {
323
323
  overflow: hidden `).concat(i,`;
324
324
  padding-right: `).concat(f,"px ").concat(i,`;
@@ -336,46 +336,46 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
336
336
  `),r==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
337
337
  }
338
338
 
339
- .`).concat(nc,` {
339
+ .`).concat(tc,` {
340
340
  right: `).concat(f,"px ").concat(i,`;
341
341
  }
342
342
 
343
- .`).concat(rc,` {
343
+ .`).concat(nc,` {
344
344
  margin-right: `).concat(f,"px ").concat(i,`;
345
345
  }
346
346
 
347
- .`).concat(nc," .").concat(nc,` {
347
+ .`).concat(tc," .").concat(tc,` {
348
348
  right: 0 `).concat(i,`;
349
349
  }
350
350
 
351
- .`).concat(rc," .").concat(rc,` {
351
+ .`).concat(nc," .").concat(nc,` {
352
352
  margin-right: 0 `).concat(i,`;
353
353
  }
354
354
 
355
355
  body[`).concat(uo,`] {
356
356
  `).concat(ED,": ").concat(f,`px;
357
357
  }
358
- `)},Mb=function(){var e=parseInt(document.body.getAttribute(uo)||"0",10);return isFinite(e)?e:0},FD=function(){v.useEffect(function(){return document.body.setAttribute(uo,(Mb()+1).toString()),function(){var e=Mb()-1;e<=0?document.body.removeAttribute(uo):document.body.setAttribute(uo,e.toString())}},[])},VD=function(e){var n=e.noRelative,r=e.noImportant,i=e.gapMode,l=i===void 0?"margin":i;FD();var s=v.useMemo(function(){return BD(l)},[l]);return v.createElement(UD,{styles:HD(s,!n,l,r?"":"!important")})},gp=!1;if(typeof window<"u")try{var Fu=Object.defineProperty({},"passive",{get:function(){return gp=!0,!0}});window.addEventListener("test",Fu,Fu),window.removeEventListener("test",Fu,Fu)}catch{gp=!1}var no=gp?{passive:!1}:!1,qD=function(e){return e.tagName==="TEXTAREA"},w1=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!qD(e)&&r[n]==="visible")},$D=function(e){return w1(e,"overflowY")},GD=function(e){return w1(e,"overflowX")},jb=function(e,n){var r=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var l=S1(e,i);if(l){var s=E1(e,i),c=s[1],f=s[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},YD=function(e){var n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[n,r,i]},KD=function(e){var n=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[n,r,i]},S1=function(e,n){return e==="v"?$D(n):GD(n)},E1=function(e,n){return e==="v"?YD(n):KD(n)},XD=function(e,n){return e==="h"&&n==="rtl"?-1:1},QD=function(e,n,r,i,l){var s=XD(e,window.getComputedStyle(n).direction),c=s*i,f=r.target,d=n.contains(f),h=!1,m=c>0,y=0,w=0;do{if(!f)break;var b=E1(e,f),S=b[0],E=b[1],T=b[2],A=E-T-s*S;(S||A)&&S1(e,f)&&(y+=A,w+=S);var R=f.parentNode;f=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!d&&f!==document.body||d&&(n.contains(f)||n===f));return(m&&Math.abs(y)<1||!m&&Math.abs(w)<1)&&(h=!0),h},Vu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Db=function(e){return[e.deltaX,e.deltaY]},Ob=function(e){return e&&"current"in e?e.current:e},ZD=function(e,n){return e[0]===n[0]&&e[1]===n[1]},WD=function(e){return`
358
+ `)},Mb=function(){var e=parseInt(document.body.getAttribute(uo)||"0",10);return isFinite(e)?e:0},FD=function(){v.useEffect(function(){return document.body.setAttribute(uo,(Mb()+1).toString()),function(){var e=Mb()-1;e<=0?document.body.removeAttribute(uo):document.body.setAttribute(uo,e.toString())}},[])},VD=function(e){var n=e.noRelative,r=e.noImportant,i=e.gapMode,l=i===void 0?"margin":i;FD();var s=v.useMemo(function(){return BD(l)},[l]);return v.createElement(UD,{styles:HD(s,!n,l,r?"":"!important")})},gp=!1;if(typeof window<"u")try{var Hu=Object.defineProperty({},"passive",{get:function(){return gp=!0,!0}});window.addEventListener("test",Hu,Hu),window.removeEventListener("test",Hu,Hu)}catch{gp=!1}var no=gp?{passive:!1}:!1,qD=function(e){return e.tagName==="TEXTAREA"},w1=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!qD(e)&&r[n]==="visible")},$D=function(e){return w1(e,"overflowY")},GD=function(e){return w1(e,"overflowX")},jb=function(e,n){var r=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var l=S1(e,i);if(l){var s=E1(e,i),c=s[1],f=s[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},YD=function(e){var n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[n,r,i]},KD=function(e){var n=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[n,r,i]},S1=function(e,n){return e==="v"?$D(n):GD(n)},E1=function(e,n){return e==="v"?YD(n):KD(n)},XD=function(e,n){return e==="h"&&n==="rtl"?-1:1},QD=function(e,n,r,i,l){var s=XD(e,window.getComputedStyle(n).direction),c=s*i,f=r.target,d=n.contains(f),h=!1,m=c>0,y=0,w=0;do{if(!f)break;var b=E1(e,f),S=b[0],E=b[1],T=b[2],A=E-T-s*S;(S||A)&&S1(e,f)&&(y+=A,w+=S);var R=f.parentNode;f=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!d&&f!==document.body||d&&(n.contains(f)||n===f));return(m&&Math.abs(y)<1||!m&&Math.abs(w)<1)&&(h=!0),h},Fu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Db=function(e){return[e.deltaX,e.deltaY]},Ob=function(e){return e&&"current"in e?e.current:e},ZD=function(e,n){return e[0]===n[0]&&e[1]===n[1]},WD=function(e){return`
359
359
  .block-interactivity-`.concat(e,` {pointer-events: none;}
360
360
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
361
- `)},JD=0,ro=[];function eO(e){var n=v.useRef([]),r=v.useRef([0,0]),i=v.useRef(),l=v.useState(JD++)[0],s=v.useState(b1)[0],c=v.useRef(e);v.useEffect(function(){c.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var E=wD([e.lockRef.current],(e.shards||[]).map(Ob),!0).filter(Boolean);return E.forEach(function(T){return T.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),E.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(E,T){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!c.current.allowPinchZoom;var A=Vu(E),R=r.current,N="deltaX"in E?E.deltaX:R[0]-A[0],O="deltaY"in E?E.deltaY:R[1]-A[1],L,j=E.target,H=Math.abs(N)>Math.abs(O)?"h":"v";if("touches"in E&&H==="h"&&j.type==="range")return!1;var $=jb(H,j);if(!$)return!0;if($?L=H:(L=H==="v"?"h":"v",$=jb(H,j)),!$)return!1;if(!i.current&&"changedTouches"in E&&(N||O)&&(i.current=L),!L)return!0;var Y=i.current||L;return QD(Y,T,E,Y==="h"?N:O)},[]),d=v.useCallback(function(E){var T=E;if(!(!ro.length||ro[ro.length-1]!==s)){var A="deltaY"in T?Db(T):Vu(T),R=n.current.filter(function(L){return L.name===T.type&&(L.target===T.target||T.target===L.shadowParent)&&ZD(L.delta,A)})[0];if(R&&R.should){T.cancelable&&T.preventDefault();return}if(!R){var N=(c.current.shards||[]).map(Ob).filter(Boolean).filter(function(L){return L.contains(T.target)}),O=N.length>0?f(T,N[0]):!c.current.noIsolation;O&&T.cancelable&&T.preventDefault()}}},[]),h=v.useCallback(function(E,T,A,R){var N={name:E,delta:T,target:A,should:R,shadowParent:tO(A)};n.current.push(N),setTimeout(function(){n.current=n.current.filter(function(O){return O!==N})},1)},[]),m=v.useCallback(function(E){r.current=Vu(E),i.current=void 0},[]),y=v.useCallback(function(E){h(E.type,Db(E),E.target,f(E,e.lockRef.current))},[]),w=v.useCallback(function(E){h(E.type,Vu(E),E.target,f(E,e.lockRef.current))},[]);v.useEffect(function(){return ro.push(s),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:w}),document.addEventListener("wheel",d,no),document.addEventListener("touchmove",d,no),document.addEventListener("touchstart",m,no),function(){ro=ro.filter(function(E){return E!==s}),document.removeEventListener("wheel",d,no),document.removeEventListener("touchmove",d,no),document.removeEventListener("touchstart",m,no)}},[]);var b=e.removeScrollBar,S=e.inert;return v.createElement(v.Fragment,null,S?v.createElement(s,{styles:WD(l)}):null,b?v.createElement(VD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tO(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const nO=_D(x1,eO);var zc=v.forwardRef(function(e,n){return v.createElement(Lc,Er({},e,{ref:n,sideCar:nO}))});zc.classNames=Lc.classNames;var rO=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ao=new WeakMap,qu=new WeakMap,$u={},Oh=0,C1=function(e){return e&&(e.host||C1(e.parentNode))},aO=function(e,n){return n.map(function(r){if(e.contains(r))return r;var i=C1(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},iO=function(e,n,r,i){var l=aO(n,Array.isArray(e)?e:[e]);$u[r]||($u[r]=new WeakMap);var s=$u[r],c=[],f=new Set,d=new Set(l),h=function(y){!y||f.has(y)||(f.add(y),h(y.parentNode))};l.forEach(h);var m=function(y){!y||d.has(y)||Array.prototype.forEach.call(y.children,function(w){if(f.has(w))m(w);else try{var b=w.getAttribute(i),S=b!==null&&b!=="false",E=(ao.get(w)||0)+1,T=(s.get(w)||0)+1;ao.set(w,E),s.set(w,T),c.push(w),E===1&&S&&qu.set(w,!0),T===1&&w.setAttribute(r,"true"),S||w.setAttribute(i,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return m(n),f.clear(),Oh++,function(){c.forEach(function(y){var w=ao.get(y)-1,b=s.get(y)-1;ao.set(y,w),s.set(y,b),w||(qu.has(y)||y.removeAttribute(i),qu.delete(y)),b||y.removeAttribute(r)}),Oh--,Oh||(ao=new WeakMap,ao=new WeakMap,qu=new WeakMap,$u={})}},cm=function(e,n,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),l=rO(e);return l?(i.push.apply(i,Array.from(l.querySelectorAll("[aria-live], script"))),iO(i,l,r,"aria-hidden")):function(){return null}},Ic="Dialog",[k1,A1]=Jn(Ic),[oO,dr]=k1(Ic),T1=e=>{const{__scopeDialog:n,children:r,open:i,defaultOpen:l,onOpenChange:s,modal:c=!0}=e,f=v.useRef(null),d=v.useRef(null),[h,m]=_a({prop:i,defaultProp:l??!1,onChange:s,caller:Ic});return g.jsx(oO,{scope:n,triggerRef:f,contentRef:d,contentId:kr(),titleId:kr(),descriptionId:kr(),open:h,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(y=>!y),[m]),modal:c,children:r})};T1.displayName=Ic;var R1="DialogTrigger",N1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(R1,r),s=ze(n,l.triggerRef);return g.jsx(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":hm(l.open),...i,ref:s,onClick:me(e.onClick,l.onOpenToggle)})});N1.displayName=R1;var fm="DialogPortal",[lO,_1]=k1(fm,{forceMount:void 0}),M1=e=>{const{__scopeDialog:n,forceMount:r,children:i,container:l}=e,s=dr(fm,n);return g.jsx(lO,{scope:n,forceMount:r,children:v.Children.map(i,c=>g.jsx(un,{present:r||s.open,children:g.jsx(os,{asChild:!0,container:l,children:c})}))})};M1.displayName=fm;var fc="DialogOverlay",j1=v.forwardRef((e,n)=>{const r=_1(fc,e.__scopeDialog),{forceMount:i=r.forceMount,...l}=e,s=dr(fc,e.__scopeDialog);return s.modal?g.jsx(un,{present:i||s.open,children:g.jsx(uO,{...l,ref:n})}):null});j1.displayName=fc;var sO=si("DialogOverlay.RemoveScroll"),uO=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(fc,r);return g.jsx(zc,{as:sO,allowPinchZoom:!0,shards:[l.contentRef],children:g.jsx(_e.div,{"data-state":hm(l.open),...i,ref:n,style:{pointerEvents:"auto",...i.style}})})}),ui="DialogContent",D1=v.forwardRef((e,n)=>{const r=_1(ui,e.__scopeDialog),{forceMount:i=r.forceMount,...l}=e,s=dr(ui,e.__scopeDialog);return g.jsx(un,{present:i||s.open,children:s.modal?g.jsx(cO,{...l,ref:n}):g.jsx(fO,{...l,ref:n})})});D1.displayName=ui;var cO=v.forwardRef((e,n)=>{const r=dr(ui,e.__scopeDialog),i=v.useRef(null),l=ze(n,r.contentRef,i);return v.useEffect(()=>{const s=i.current;if(s)return cm(s)},[]),g.jsx(O1,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&s.preventDefault()}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault())})}),fO=v.forwardRef((e,n)=>{const r=dr(ui,e.__scopeDialog),i=v.useRef(!1),l=v.useRef(!1);return g.jsx(O1,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||r.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const c=s.target;r.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&l.current&&s.preventDefault()}})}),O1=v.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:s,...c}=e,f=dr(ui,r),d=v.useRef(null),h=ze(n,d);return um(),g.jsxs(g.Fragment,{children:[g.jsx(Pc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:s,children:g.jsx(Eo,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":hm(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(hO,{titleId:f.titleId}),g.jsx(mO,{contentRef:d,descriptionId:f.descriptionId})]})]})}),dm="DialogTitle",P1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(dm,r);return g.jsx(_e.h2,{id:l.titleId,...i,ref:n})});P1.displayName=dm;var L1="DialogDescription",z1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(L1,r);return g.jsx(_e.p,{id:l.descriptionId,...i,ref:n})});z1.displayName=L1;var I1="DialogClose",B1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(I1,r);return g.jsx(_e.button,{type:"button",...i,ref:n,onClick:me(e.onClick,()=>l.onOpenChange(!1))})});B1.displayName=I1;function hm(e){return e?"open":"closed"}var U1="DialogTitleWarning",[dO,H1]=WN(U1,{contentName:ui,titleName:dm,docsSlug:"dialog"}),hO=({titleId:e})=>{const n=H1(U1),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
361
+ `)},JD=0,ro=[];function eO(e){var n=v.useRef([]),r=v.useRef([0,0]),i=v.useRef(),l=v.useState(JD++)[0],s=v.useState(b1)[0],c=v.useRef(e);v.useEffect(function(){c.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var E=wD([e.lockRef.current],(e.shards||[]).map(Ob),!0).filter(Boolean);return E.forEach(function(T){return T.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),E.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(E,T){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!c.current.allowPinchZoom;var A=Fu(E),R=r.current,N="deltaX"in E?E.deltaX:R[0]-A[0],O="deltaY"in E?E.deltaY:R[1]-A[1],L,j=E.target,H=Math.abs(N)>Math.abs(O)?"h":"v";if("touches"in E&&H==="h"&&j.type==="range")return!1;var $=jb(H,j);if(!$)return!0;if($?L=H:(L=H==="v"?"h":"v",$=jb(H,j)),!$)return!1;if(!i.current&&"changedTouches"in E&&(N||O)&&(i.current=L),!L)return!0;var Y=i.current||L;return QD(Y,T,E,Y==="h"?N:O)},[]),d=v.useCallback(function(E){var T=E;if(!(!ro.length||ro[ro.length-1]!==s)){var A="deltaY"in T?Db(T):Fu(T),R=n.current.filter(function(L){return L.name===T.type&&(L.target===T.target||T.target===L.shadowParent)&&ZD(L.delta,A)})[0];if(R&&R.should){T.cancelable&&T.preventDefault();return}if(!R){var N=(c.current.shards||[]).map(Ob).filter(Boolean).filter(function(L){return L.contains(T.target)}),O=N.length>0?f(T,N[0]):!c.current.noIsolation;O&&T.cancelable&&T.preventDefault()}}},[]),h=v.useCallback(function(E,T,A,R){var N={name:E,delta:T,target:A,should:R,shadowParent:tO(A)};n.current.push(N),setTimeout(function(){n.current=n.current.filter(function(O){return O!==N})},1)},[]),m=v.useCallback(function(E){r.current=Fu(E),i.current=void 0},[]),y=v.useCallback(function(E){h(E.type,Db(E),E.target,f(E,e.lockRef.current))},[]),w=v.useCallback(function(E){h(E.type,Fu(E),E.target,f(E,e.lockRef.current))},[]);v.useEffect(function(){return ro.push(s),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:w}),document.addEventListener("wheel",d,no),document.addEventListener("touchmove",d,no),document.addEventListener("touchstart",m,no),function(){ro=ro.filter(function(E){return E!==s}),document.removeEventListener("wheel",d,no),document.removeEventListener("touchmove",d,no),document.removeEventListener("touchstart",m,no)}},[]);var b=e.removeScrollBar,S=e.inert;return v.createElement(v.Fragment,null,S?v.createElement(s,{styles:WD(l)}):null,b?v.createElement(VD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tO(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const nO=_D(x1,eO);var zc=v.forwardRef(function(e,n){return v.createElement(Lc,Er({},e,{ref:n,sideCar:nO}))});zc.classNames=Lc.classNames;var rO=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ao=new WeakMap,Vu=new WeakMap,qu={},Oh=0,C1=function(e){return e&&(e.host||C1(e.parentNode))},aO=function(e,n){return n.map(function(r){if(e.contains(r))return r;var i=C1(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},iO=function(e,n,r,i){var l=aO(n,Array.isArray(e)?e:[e]);qu[r]||(qu[r]=new WeakMap);var s=qu[r],c=[],f=new Set,d=new Set(l),h=function(y){!y||f.has(y)||(f.add(y),h(y.parentNode))};l.forEach(h);var m=function(y){!y||d.has(y)||Array.prototype.forEach.call(y.children,function(w){if(f.has(w))m(w);else try{var b=w.getAttribute(i),S=b!==null&&b!=="false",E=(ao.get(w)||0)+1,T=(s.get(w)||0)+1;ao.set(w,E),s.set(w,T),c.push(w),E===1&&S&&Vu.set(w,!0),T===1&&w.setAttribute(r,"true"),S||w.setAttribute(i,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return m(n),f.clear(),Oh++,function(){c.forEach(function(y){var w=ao.get(y)-1,b=s.get(y)-1;ao.set(y,w),s.set(y,b),w||(Vu.has(y)||y.removeAttribute(i),Vu.delete(y)),b||y.removeAttribute(r)}),Oh--,Oh||(ao=new WeakMap,ao=new WeakMap,Vu=new WeakMap,qu={})}},cm=function(e,n,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),l=rO(e);return l?(i.push.apply(i,Array.from(l.querySelectorAll("[aria-live], script"))),iO(i,l,r,"aria-hidden")):function(){return null}},Ic="Dialog",[k1,A1]=Jn(Ic),[oO,dr]=k1(Ic),T1=e=>{const{__scopeDialog:n,children:r,open:i,defaultOpen:l,onOpenChange:s,modal:c=!0}=e,f=v.useRef(null),d=v.useRef(null),[h,m]=_a({prop:i,defaultProp:l??!1,onChange:s,caller:Ic});return g.jsx(oO,{scope:n,triggerRef:f,contentRef:d,contentId:kr(),titleId:kr(),descriptionId:kr(),open:h,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(y=>!y),[m]),modal:c,children:r})};T1.displayName=Ic;var R1="DialogTrigger",N1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(R1,r),s=ze(n,l.triggerRef);return g.jsx(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":hm(l.open),...i,ref:s,onClick:me(e.onClick,l.onOpenToggle)})});N1.displayName=R1;var fm="DialogPortal",[lO,_1]=k1(fm,{forceMount:void 0}),M1=e=>{const{__scopeDialog:n,forceMount:r,children:i,container:l}=e,s=dr(fm,n);return g.jsx(lO,{scope:n,forceMount:r,children:v.Children.map(i,c=>g.jsx(un,{present:r||s.open,children:g.jsx(is,{asChild:!0,container:l,children:c})}))})};M1.displayName=fm;var fc="DialogOverlay",j1=v.forwardRef((e,n)=>{const r=_1(fc,e.__scopeDialog),{forceMount:i=r.forceMount,...l}=e,s=dr(fc,e.__scopeDialog);return s.modal?g.jsx(un,{present:i||s.open,children:g.jsx(uO,{...l,ref:n})}):null});j1.displayName=fc;var sO=si("DialogOverlay.RemoveScroll"),uO=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(fc,r);return g.jsx(zc,{as:sO,allowPinchZoom:!0,shards:[l.contentRef],children:g.jsx(_e.div,{"data-state":hm(l.open),...i,ref:n,style:{pointerEvents:"auto",...i.style}})})}),ui="DialogContent",D1=v.forwardRef((e,n)=>{const r=_1(ui,e.__scopeDialog),{forceMount:i=r.forceMount,...l}=e,s=dr(ui,e.__scopeDialog);return g.jsx(un,{present:i||s.open,children:s.modal?g.jsx(cO,{...l,ref:n}):g.jsx(fO,{...l,ref:n})})});D1.displayName=ui;var cO=v.forwardRef((e,n)=>{const r=dr(ui,e.__scopeDialog),i=v.useRef(null),l=ze(n,r.contentRef,i);return v.useEffect(()=>{const s=i.current;if(s)return cm(s)},[]),g.jsx(O1,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&s.preventDefault()}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault())})}),fO=v.forwardRef((e,n)=>{const r=dr(ui,e.__scopeDialog),i=v.useRef(!1),l=v.useRef(!1);return g.jsx(O1,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||r.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const c=s.target;r.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&l.current&&s.preventDefault()}})}),O1=v.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:s,...c}=e,f=dr(ui,r),d=v.useRef(null),h=ze(n,d);return um(),g.jsxs(g.Fragment,{children:[g.jsx(Pc,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:s,children:g.jsx(Eo,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":hm(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(hO,{titleId:f.titleId}),g.jsx(mO,{contentRef:d,descriptionId:f.descriptionId})]})]})}),dm="DialogTitle",P1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(dm,r);return g.jsx(_e.h2,{id:l.titleId,...i,ref:n})});P1.displayName=dm;var L1="DialogDescription",z1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(L1,r);return g.jsx(_e.p,{id:l.descriptionId,...i,ref:n})});z1.displayName=L1;var I1="DialogClose",B1=v.forwardRef((e,n)=>{const{__scopeDialog:r,...i}=e,l=dr(I1,r);return g.jsx(_e.button,{type:"button",...i,ref:n,onClick:me(e.onClick,()=>l.onOpenChange(!1))})});B1.displayName=I1;function hm(e){return e?"open":"closed"}var U1="DialogTitleWarning",[dO,H1]=WN(U1,{contentName:ui,titleName:dm,docsSlug:"dialog"}),hO=({titleId:e})=>{const n=H1(U1),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
362
362
 
363
363
  If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
364
364
 
365
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},pO="DialogDescriptionWarning",mO=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H1(pO).contentName}}.`;return v.useEffect(()=>{const l=e.current?.getAttribute("aria-describedby");n&&l&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},pm=T1,F1=N1,mm=M1,ss=j1,us=D1,cs=P1,fs=z1,Bc=B1;const V1=pm,gO=mm,q1=v.forwardRef(({className:e,...n},r)=>g.jsx(ss,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));q1.displayName=ss.displayName;const yO=Dc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),gm=v.forwardRef(({side:e="right",className:n,children:r,...i},l)=>g.jsxs(gO,{children:[g.jsx(q1,{}),g.jsxs(us,{ref:l,className:ue(yO({side:e}),n),...i,children:[r,g.jsxs(Bc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(so,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gm.displayName=us.displayName;const ym=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...n});ym.displayName="SheetHeader";const vm=v.forwardRef(({className:e,...n},r)=>g.jsx(cs,{ref:r,className:ue("text-lg font-semibold text-foreground",e),...n}));vm.displayName=cs.displayName;const $1=v.forwardRef(({className:e,...n},r)=>g.jsx(fs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));$1.displayName=fs.displayName;function Pb({className:e,...n}){return g.jsx("div",{className:ue("animate-pulse rounded-md bg-muted",e),...n})}const vO=["top","right","bottom","left"],Ma=Math.min,On=Math.max,dc=Math.round,Gu=Math.floor,Ar=e=>({x:e,y:e}),xO={left:"right",right:"left",bottom:"top",top:"bottom"},bO={start:"end",end:"start"};function yp(e,n,r){return On(e,Ma(n,r))}function Qr(e,n){return typeof e=="function"?e(n):e}function Zr(e){return e.split("-")[0]}function Ao(e){return e.split("-")[1]}function xm(e){return e==="x"?"y":"x"}function bm(e){return e==="y"?"height":"width"}const wO=new Set(["top","bottom"]);function Cr(e){return wO.has(Zr(e))?"y":"x"}function wm(e){return xm(Cr(e))}function SO(e,n,r){r===void 0&&(r=!1);const i=Ao(e),l=wm(e),s=bm(l);let c=l==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=hc(c)),[c,hc(c)]}function EO(e){const n=hc(e);return[vp(e),n,vp(n)]}function vp(e){return e.replace(/start|end/g,n=>bO[n])}const Lb=["left","right"],zb=["right","left"],CO=["top","bottom"],kO=["bottom","top"];function AO(e,n,r){switch(e){case"top":case"bottom":return r?n?zb:Lb:n?Lb:zb;case"left":case"right":return n?CO:kO;default:return[]}}function TO(e,n,r,i){const l=Ao(e);let s=AO(Zr(e),r==="start",i);return l&&(s=s.map(c=>c+"-"+l),n&&(s=s.concat(s.map(vp)))),s}function hc(e){return e.replace(/left|right|bottom|top/g,n=>xO[n])}function RO(e){return{top:0,right:0,bottom:0,left:0,...e}}function G1(e){return typeof e!="number"?RO(e):{top:e,right:e,bottom:e,left:e}}function pc(e){const{x:n,y:r,width:i,height:l}=e;return{width:i,height:l,top:r,left:n,right:n+i,bottom:r+l,x:n,y:r}}function Ib(e,n,r){let{reference:i,floating:l}=e;const s=Cr(n),c=wm(n),f=bm(c),d=Zr(n),h=s==="y",m=i.x+i.width/2-l.width/2,y=i.y+i.height/2-l.height/2,w=i[f]/2-l[f]/2;let b;switch(d){case"top":b={x:m,y:i.y-l.height};break;case"bottom":b={x:m,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y};break;case"left":b={x:i.x-l.width,y};break;default:b={x:i.x,y:i.y}}switch(Ao(n)){case"start":b[c]-=w*(r&&h?-1:1);break;case"end":b[c]+=w*(r&&h?-1:1);break}return b}const NO=async(e,n,r)=>{const{placement:i="bottom",strategy:l="absolute",middleware:s=[],platform:c}=r,f=s.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(n));let h=await c.getElementRects({reference:e,floating:n,strategy:l}),{x:m,y}=Ib(h,i,d),w=i,b={},S=0;for(let E=0;E<f.length;E++){const{name:T,fn:A}=f[E],{x:R,y:N,data:O,reset:L}=await A({x:m,y,initialPlacement:i,placement:w,strategy:l,middlewareData:b,rects:h,platform:c,elements:{reference:e,floating:n}});m=R??m,y=N??y,b={...b,[T]:{...b[T],...O}},L&&S<=50&&(S++,typeof L=="object"&&(L.placement&&(w=L.placement),L.rects&&(h=L.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:l}):L.rects),{x:m,y}=Ib(h,w,d)),E=-1)}return{x:m,y,placement:w,strategy:l,middlewareData:b}};async function Kl(e,n){var r;n===void 0&&(n={});const{x:i,y:l,platform:s,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:w=!1,padding:b=0}=Qr(n,e),S=G1(b),T=f[w?y==="floating"?"reference":"floating":y],A=pc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(T)))==null||r?T:T.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),R=y==="floating"?{x:i,y:l,width:c.floating.width,height:c.floating.height}:c.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),O=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},L=pc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:R,offsetParent:N,strategy:d}):R);return{top:(A.top-L.top+S.top)/O.y,bottom:(L.bottom-A.bottom+S.bottom)/O.y,left:(A.left-L.left+S.left)/O.x,right:(L.right-A.right+S.right)/O.x}}const _O=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:i,placement:l,rects:s,platform:c,elements:f,middlewareData:d}=n,{element:h,padding:m=0}=Qr(e,n)||{};if(h==null)return{};const y=G1(m),w={x:r,y:i},b=wm(l),S=bm(b),E=await c.getDimensions(h),T=b==="y",A=T?"top":"left",R=T?"bottom":"right",N=T?"clientHeight":"clientWidth",O=s.reference[S]+s.reference[b]-w[b]-s.floating[S],L=w[b]-s.reference[b],j=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let H=j?j[N]:0;(!H||!await(c.isElement==null?void 0:c.isElement(j)))&&(H=f.floating[N]||s.floating[S]);const $=O/2-L/2,Y=H/2-E[S]/2-1,D=Ma(y[A],Y),Z=Ma(y[R],Y),J=D,ne=H-E[S]-Z,G=H/2-E[S]/2+$,ae=yp(J,G,ne),z=!d.arrow&&Ao(l)!=null&&G!==ae&&s.reference[S]/2-(G<J?D:Z)-E[S]/2<0,Q=z?G<J?G-J:G-ne:0;return{[b]:w[b]+Q,data:{[b]:ae,centerOffset:G-ae-Q,...z&&{alignmentOffset:Q}},reset:z}}}),MO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,i;const{placement:l,middlewareData:s,rects:c,initialPlacement:f,platform:d,elements:h}=n,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...T}=Qr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const A=Zr(l),R=Cr(f),N=Zr(f)===f,O=await(d.isRTL==null?void 0:d.isRTL(h.floating)),L=w||(N||!E?[hc(f)]:EO(f)),j=S!=="none";!w&&j&&L.push(...TO(f,E,S,O));const H=[f,...L],$=await Kl(n,T),Y=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(m&&Y.push($[A]),y){const G=SO(l,c,O);Y.push($[G[0]],$[G[1]])}if(D=[...D,{placement:l,overflows:Y}],!Y.every(G=>G<=0)){var Z,J;const G=(((Z=s.flip)==null?void 0:Z.index)||0)+1,ae=H[G];if(ae&&(!(y==="alignment"?R!==Cr(ae):!1)||D.every(B=>Cr(B.placement)===R?B.overflows[0]>0:!0)))return{data:{index:G,overflows:D},reset:{placement:ae}};let z=(J=D.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:J.placement;if(!z)switch(b){case"bestFit":{var ne;const Q=(ne=D.filter(B=>{if(j){const ie=Cr(B.placement);return ie===R||ie==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(ie=>ie>0).reduce((ie,k)=>ie+k,0)]).sort((B,ie)=>B[1]-ie[1])[0])==null?void 0:ne[0];Q&&(z=Q);break}case"initialPlacement":z=f;break}if(l!==z)return{reset:{placement:z}}}return{}}}};function Bb(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Ub(e){return vO.some(n=>e[n]>=0)}const jO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:i="referenceHidden",...l}=Qr(e,n);switch(i){case"referenceHidden":{const s=await Kl(n,{...l,elementContext:"reference"}),c=Bb(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ub(c)}}}case"escaped":{const s=await Kl(n,{...l,altBoundary:!0}),c=Bb(s,r.floating);return{data:{escapedOffsets:c,escaped:Ub(c)}}}default:return{}}}}},Y1=new Set(["left","top"]);async function DO(e,n){const{placement:r,platform:i,elements:l}=e,s=await(i.isRTL==null?void 0:i.isRTL(l.floating)),c=Zr(r),f=Ao(r),d=Cr(r)==="y",h=Y1.has(c)?-1:1,m=s&&d?-1:1,y=Qr(n,e);let{mainAxis:w,crossAxis:b,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof S=="number"&&(b=f==="end"?S*-1:S),d?{x:b*m,y:w*h}:{x:w*h,y:b*m}}const OO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,i;const{x:l,y:s,placement:c,middlewareData:f}=n,d=await DO(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:l+d.x,y:s+d.y,data:{...d,placement:c}}}}},PO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:i,placement:l}=n,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:T=>{let{x:A,y:R}=T;return{x:A,y:R}}},...d}=Qr(e,n),h={x:r,y:i},m=await Kl(n,d),y=Cr(Zr(l)),w=xm(y);let b=h[w],S=h[y];if(s){const T=w==="y"?"top":"left",A=w==="y"?"bottom":"right",R=b+m[T],N=b-m[A];b=yp(R,b,N)}if(c){const T=y==="y"?"top":"left",A=y==="y"?"bottom":"right",R=S+m[T],N=S-m[A];S=yp(R,S,N)}const E=f.fn({...n,[w]:b,[y]:S});return{...E,data:{x:E.x-r,y:E.y-i,enabled:{[w]:s,[y]:c}}}}}},LO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:i,placement:l,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Qr(e,n),m={x:r,y:i},y=Cr(l),w=xm(y);let b=m[w],S=m[y];const E=Qr(f,n),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(d){const N=w==="y"?"height":"width",O=s.reference[w]-s.floating[N]+T.mainAxis,L=s.reference[w]+s.reference[N]-T.mainAxis;b<O?b=O:b>L&&(b=L)}if(h){var A,R;const N=w==="y"?"width":"height",O=Y1.has(Zr(l)),L=s.reference[y]-s.floating[N]+(O&&((A=c.offset)==null?void 0:A[y])||0)+(O?0:T.crossAxis),j=s.reference[y]+s.reference[N]+(O?0:((R=c.offset)==null?void 0:R[y])||0)-(O?T.crossAxis:0);S<L?S=L:S>j&&(S=j)}return{[w]:b,[y]:S}}}},zO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,i;const{placement:l,rects:s,platform:c,elements:f}=n,{apply:d=()=>{},...h}=Qr(e,n),m=await Kl(n,h),y=Zr(l),w=Ao(l),b=Cr(l)==="y",{width:S,height:E}=s.floating;let T,A;y==="top"||y==="bottom"?(T=y,A=w===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(A=y,T=w==="end"?"top":"bottom");const R=E-m.top-m.bottom,N=S-m.left-m.right,O=Ma(E-m[T],R),L=Ma(S-m[A],N),j=!n.middlewareData.shift;let H=O,$=L;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&($=N),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(H=R),j&&!w){const D=On(m.left,0),Z=On(m.right,0),J=On(m.top,0),ne=On(m.bottom,0);b?$=S-2*(D!==0||Z!==0?D+Z:On(m.left,m.right)):H=E-2*(J!==0||ne!==0?J+ne:On(m.top,m.bottom))}await d({...n,availableWidth:$,availableHeight:H});const Y=await c.getDimensions(f.floating);return S!==Y.width||E!==Y.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function To(e){return K1(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Rr(e){var n;return(n=(K1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function K1(e){return Uc()?e instanceof Node||e instanceof Pn(e).Node:!1}function ur(e){return Uc()?e instanceof Element||e instanceof Pn(e).Element:!1}function Tr(e){return Uc()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function Hb(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}const IO=new Set(["inline","contents"]);function ds(e){const{overflow:n,overflowX:r,overflowY:i,display:l}=cr(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!IO.has(l)}const BO=new Set(["table","td","th"]);function UO(e){return BO.has(To(e))}const HO=[":popover-open",":modal"];function Hc(e){return HO.some(n=>{try{return e.matches(n)}catch{return!1}})}const FO=["transform","translate","scale","rotate","perspective"],VO=["transform","translate","scale","rotate","perspective","filter"],qO=["paint","layout","strict","content"];function Sm(e){const n=Em(),r=ur(e)?cr(e):e;return FO.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||VO.some(i=>(r.willChange||"").includes(i))||qO.some(i=>(r.contain||"").includes(i))}function $O(e){let n=ja(e);for(;Tr(n)&&!po(n);){if(Sm(n))return n;if(Hc(n))return null;n=ja(n)}return null}function Em(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const GO=new Set(["html","body","#document"]);function po(e){return GO.has(To(e))}function cr(e){return Pn(e).getComputedStyle(e)}function Fc(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ja(e){if(To(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Hb(e)&&e.host||Rr(e);return Hb(n)?n.host:n}function X1(e){const n=ja(e);return po(n)?e.ownerDocument?e.ownerDocument.body:e.body:Tr(n)&&ds(n)?n:X1(n)}function Xl(e,n,r){var i;n===void 0&&(n=[]),r===void 0&&(r=!0);const l=X1(e),s=l===((i=e.ownerDocument)==null?void 0:i.body),c=Pn(l);if(s){const f=xp(c);return n.concat(c,c.visualViewport||[],ds(l)?l:[],f&&r?Xl(f):[])}return n.concat(l,Xl(l,[],r))}function xp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q1(e){const n=cr(e);let r=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const l=Tr(e),s=l?e.offsetWidth:r,c=l?e.offsetHeight:i,f=dc(r)!==s||dc(i)!==c;return f&&(r=s,i=c),{width:r,height:i,$:f}}function Cm(e){return ur(e)?e:e.contextElement}function co(e){const n=Cm(e);if(!Tr(n))return Ar(1);const r=n.getBoundingClientRect(),{width:i,height:l,$:s}=Q1(n);let c=(s?dc(r.width):r.width)/i,f=(s?dc(r.height):r.height)/l;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const YO=Ar(0);function Z1(e){const n=Pn(e);return!Em()||!n.visualViewport?YO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function KO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Pn(e)?!1:n}function ci(e,n,r,i){n===void 0&&(n=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),s=Cm(e);let c=Ar(1);n&&(i?ur(i)&&(c=co(i)):c=co(e));const f=KO(s,r,i)?Z1(s):Ar(0);let d=(l.left+f.x)/c.x,h=(l.top+f.y)/c.y,m=l.width/c.x,y=l.height/c.y;if(s){const w=Pn(s),b=i&&ur(i)?Pn(i):i;let S=w,E=xp(S);for(;E&&i&&b!==S;){const T=co(E),A=E.getBoundingClientRect(),R=cr(E),N=A.left+(E.clientLeft+parseFloat(R.paddingLeft))*T.x,O=A.top+(E.clientTop+parseFloat(R.paddingTop))*T.y;d*=T.x,h*=T.y,m*=T.x,y*=T.y,d+=N,h+=O,S=Pn(E),E=xp(S)}}return pc({width:m,height:y,x:d,y:h})}function km(e,n){const r=Fc(e).scrollLeft;return n?n.left+r:ci(Rr(e)).left+r}function W1(e,n,r){r===void 0&&(r=!1);const i=e.getBoundingClientRect(),l=i.left+n.scrollLeft-(r?0:km(e,i)),s=i.top+n.scrollTop;return{x:l,y:s}}function XO(e){let{elements:n,rect:r,offsetParent:i,strategy:l}=e;const s=l==="fixed",c=Rr(i),f=n?Hc(n.floating):!1;if(i===c||f&&s)return r;let d={scrollLeft:0,scrollTop:0},h=Ar(1);const m=Ar(0),y=Tr(i);if((y||!y&&!s)&&((To(i)!=="body"||ds(c))&&(d=Fc(i)),Tr(i))){const b=ci(i);h=co(i),m.x=b.x+i.clientLeft,m.y=b.y+i.clientTop}const w=c&&!y&&!s?W1(c,d,!0):Ar(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+m.x+w.x,y:r.y*h.y-d.scrollTop*h.y+m.y+w.y}}function QO(e){return Array.from(e.getClientRects())}function ZO(e){const n=Rr(e),r=Fc(e),i=e.ownerDocument.body,l=On(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=On(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+km(e);const f=-r.scrollTop;return cr(i).direction==="rtl"&&(c+=On(n.clientWidth,i.clientWidth)-l),{width:l,height:s,x:c,y:f}}function WO(e,n){const r=Pn(e),i=Rr(e),l=r.visualViewport;let s=i.clientWidth,c=i.clientHeight,f=0,d=0;if(l){s=l.width,c=l.height;const h=Em();(!h||h&&n==="fixed")&&(f=l.offsetLeft,d=l.offsetTop)}return{width:s,height:c,x:f,y:d}}const JO=new Set(["absolute","fixed"]);function e4(e,n){const r=ci(e,!0,n==="fixed"),i=r.top+e.clientTop,l=r.left+e.clientLeft,s=Tr(e)?co(e):Ar(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,d=l*s.x,h=i*s.y;return{width:c,height:f,x:d,y:h}}function Fb(e,n,r){let i;if(n==="viewport")i=WO(e,r);else if(n==="document")i=ZO(Rr(e));else if(ur(n))i=e4(n,r);else{const l=Z1(e);i={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return pc(i)}function J1(e,n){const r=ja(e);return r===n||!ur(r)||po(r)?!1:cr(r).position==="fixed"||J1(r,n)}function t4(e,n){const r=n.get(e);if(r)return r;let i=Xl(e,[],!1).filter(f=>ur(f)&&To(f)!=="body"),l=null;const s=cr(e).position==="fixed";let c=s?ja(e):e;for(;ur(c)&&!po(c);){const f=cr(c),d=Sm(c);!d&&f.position==="fixed"&&(l=null),(s?!d&&!l:!d&&f.position==="static"&&!!l&&JO.has(l.position)||ds(c)&&!d&&J1(e,c))?i=i.filter(m=>m!==c):l=f,c=ja(c)}return n.set(e,i),i}function n4(e){let{element:n,boundary:r,rootBoundary:i,strategy:l}=e;const c=[...r==="clippingAncestors"?Hc(n)?[]:t4(n,this._c):[].concat(r),i],f=c[0],d=c.reduce((h,m)=>{const y=Fb(n,m,l);return h.top=On(y.top,h.top),h.right=Ma(y.right,h.right),h.bottom=Ma(y.bottom,h.bottom),h.left=On(y.left,h.left),h},Fb(n,f,l));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function r4(e){const{width:n,height:r}=Q1(e);return{width:n,height:r}}function a4(e,n,r){const i=Tr(n),l=Rr(n),s=r==="fixed",c=ci(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const d=Ar(0);function h(){d.x=km(l)}if(i||!i&&!s)if((To(n)!=="body"||ds(l))&&(f=Fc(n)),i){const b=ci(n,!0,s,n);d.x=b.x+n.clientLeft,d.y=b.y+n.clientTop}else l&&h();s&&!i&&l&&h();const m=l&&!i&&!s?W1(l,f):Ar(0),y=c.left+f.scrollLeft-d.x-m.x,w=c.top+f.scrollTop-d.y-m.y;return{x:y,y:w,width:c.width,height:c.height}}function Ph(e){return cr(e).position==="static"}function Vb(e,n){if(!Tr(e)||cr(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return Rr(e)===r&&(r=r.ownerDocument.body),r}function eS(e,n){const r=Pn(e);if(Hc(e))return r;if(!Tr(e)){let l=ja(e);for(;l&&!po(l);){if(ur(l)&&!Ph(l))return l;l=ja(l)}return r}let i=Vb(e,n);for(;i&&UO(i)&&Ph(i);)i=Vb(i,n);return i&&po(i)&&Ph(i)&&!Sm(i)?r:i||$O(e)||r}const i4=async function(e){const n=this.getOffsetParent||eS,r=this.getDimensions,i=await r(e.floating);return{reference:a4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function o4(e){return cr(e).direction==="rtl"}const l4={convertOffsetParentRelativeRectToViewportRelativeRect:XO,getDocumentElement:Rr,getClippingRect:n4,getOffsetParent:eS,getElementRects:i4,getClientRects:QO,getDimensions:r4,getScale:co,isElement:ur,isRTL:o4};function tS(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function s4(e,n){let r=null,i;const l=Rr(e);function s(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:m,top:y,width:w,height:b}=h;if(f||n(),!w||!b)return;const S=Gu(y),E=Gu(l.clientWidth-(m+w)),T=Gu(l.clientHeight-(y+b)),A=Gu(m),N={rootMargin:-S+"px "+-E+"px "+-T+"px "+-A+"px",threshold:On(0,Ma(1,d))||1};let O=!0;function L(j){const H=j[0].intersectionRatio;if(H!==d){if(!O)return c();H?c(!1,H):i=setTimeout(()=>{c(!1,1e-7)},1e3)}H===1&&!tS(h,e.getBoundingClientRect())&&c(),O=!1}try{r=new IntersectionObserver(L,{...N,root:l.ownerDocument})}catch{r=new IntersectionObserver(L,N)}r.observe(e)}return c(!0),s}function u4(e,n,r,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=Cm(e),m=l||s?[...h?Xl(h):[],...Xl(n)]:[];m.forEach(A=>{l&&A.addEventListener("scroll",r,{passive:!0}),s&&A.addEventListener("resize",r)});const y=h&&f?s4(h,r):null;let w=-1,b=null;c&&(b=new ResizeObserver(A=>{let[R]=A;R&&R.target===h&&b&&(b.unobserve(n),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var N;(N=b)==null||N.observe(n)})),r()}),h&&!d&&b.observe(h),b.observe(n));let S,E=d?ci(e):null;d&&T();function T(){const A=ci(e);E&&!tS(E,A)&&r(),E=A,S=requestAnimationFrame(T)}return r(),()=>{var A;m.forEach(R=>{l&&R.removeEventListener("scroll",r),s&&R.removeEventListener("resize",r)}),y?.(),(A=b)==null||A.disconnect(),b=null,d&&cancelAnimationFrame(S)}}const c4=OO,f4=PO,d4=MO,h4=zO,p4=jO,qb=_O,m4=LO,g4=(e,n,r)=>{const i=new Map,l={platform:l4,...r},s={...l.platform,_c:i};return NO(e,n,{...l,platform:s})};var y4=typeof document<"u",v4=function(){},ac=y4?v.useLayoutEffect:v4;function mc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,i,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(i=r;i--!==0;)if(!mc(e[i],n[i]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(n,l[i]))return!1;for(i=r;i--!==0;){const s=l[i];if(!(s==="_owner"&&e.$$typeof)&&!mc(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function nS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $b(e,n){const r=nS(e);return Math.round(n*r)/r}function Lh(e){const n=v.useRef(e);return ac(()=>{n.current=e}),n}function x4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:l,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,y]=v.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[w,b]=v.useState(i);mc(w,i)||b(i);const[S,E]=v.useState(null),[T,A]=v.useState(null),R=v.useCallback(B=>{B!==j.current&&(j.current=B,E(B))},[]),N=v.useCallback(B=>{B!==H.current&&(H.current=B,A(B))},[]),O=s||S,L=c||T,j=v.useRef(null),H=v.useRef(null),$=v.useRef(m),Y=d!=null,D=Lh(d),Z=Lh(l),J=Lh(h),ne=v.useCallback(()=>{if(!j.current||!H.current)return;const B={placement:n,strategy:r,middleware:w};Z.current&&(B.platform=Z.current),g4(j.current,H.current,B).then(ie=>{const k={...ie,isPositioned:J.current!==!1};G.current&&!mc($.current,k)&&($.current=k,wo.flushSync(()=>{y(k)}))})},[w,n,r,Z,J]);ac(()=>{h===!1&&$.current.isPositioned&&($.current.isPositioned=!1,y(B=>({...B,isPositioned:!1})))},[h]);const G=v.useRef(!1);ac(()=>(G.current=!0,()=>{G.current=!1}),[]),ac(()=>{if(O&&(j.current=O),L&&(H.current=L),O&&L){if(D.current)return D.current(O,L,ne);ne()}},[O,L,ne,D,Y]);const ae=v.useMemo(()=>({reference:j,floating:H,setReference:R,setFloating:N}),[R,N]),z=v.useMemo(()=>({reference:O,floating:L}),[O,L]),Q=v.useMemo(()=>{const B={position:r,left:0,top:0};if(!z.floating)return B;const ie=$b(z.floating,m.x),k=$b(z.floating,m.y);return f?{...B,transform:"translate("+ie+"px, "+k+"px)",...nS(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ie,top:k}},[r,f,z.floating,m.x,m.y]);return v.useMemo(()=>({...m,update:ne,refs:ae,elements:z,floatingStyles:Q}),[m,ne,ae,z,Q])}const b4=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:l}=typeof e=="function"?e(r):e;return i&&n(i)?i.current!=null?qb({element:i.current,padding:l}).fn(r):{}:i?qb({element:i,padding:l}).fn(r):{}}}},w4=(e,n)=>({...c4(e),options:[e,n]}),S4=(e,n)=>({...f4(e),options:[e,n]}),E4=(e,n)=>({...m4(e),options:[e,n]}),C4=(e,n)=>({...d4(e),options:[e,n]}),k4=(e,n)=>({...h4(e),options:[e,n]}),A4=(e,n)=>({...p4(e),options:[e,n]}),T4=(e,n)=>({...b4(e),options:[e,n]});var R4="Arrow",rS=v.forwardRef((e,n)=>{const{children:r,width:i=10,height:l=5,...s}=e;return g.jsx(_e.svg,{...s,ref:n,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});rS.displayName=R4;var N4=rS;function aS(e){const[n,r]=v.useState(void 0);return $t(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let c,f;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),n}var Am="Popper",[iS,Ro]=Jn(Am),[_4,oS]=iS(Am),lS=e=>{const{__scopePopper:n,children:r}=e,[i,l]=v.useState(null);return g.jsx(_4,{scope:n,anchor:i,onAnchorChange:l,children:r})};lS.displayName=Am;var sS="PopperAnchor",uS=v.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:i,...l}=e,s=oS(sS,r),c=v.useRef(null),f=ze(n,c),d=v.useRef(null);return v.useEffect(()=>{const h=d.current;d.current=i?.current||c.current,h!==d.current&&s.onAnchorChange(d.current)}),i?null:g.jsx(_e.div,{...l,ref:f})});uS.displayName=sS;var Tm="PopperContent",[M4,j4]=iS(Tm),cS=v.forwardRef((e,n)=>{const{__scopePopper:r,side:i="bottom",sideOffset:l=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:w=!1,updatePositionStrategy:b="optimized",onPlaced:S,...E}=e,T=oS(Tm,r),[A,R]=v.useState(null),N=ze(n,le=>R(le)),[O,L]=v.useState(null),j=aS(O),H=j?.width??0,$=j?.height??0,Y=i+(s!=="center"?"-"+s:""),D=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Z=Array.isArray(h)?h:[h],J=Z.length>0,ne={padding:D,boundary:Z.filter(O4),altBoundary:J},{refs:G,floatingStyles:ae,placement:z,isPositioned:Q,middlewareData:B}=x4({strategy:"fixed",placement:Y,whileElementsMounted:(...le)=>u4(...le,{animationFrame:b==="always"}),elements:{reference:T.anchor},middleware:[w4({mainAxis:l+$,alignmentAxis:c}),d&&S4({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?E4():void 0,...ne}),d&&C4({...ne}),k4({...ne,apply:({elements:le,rects:ve,availableWidth:Ve,availableHeight:De})=>{const{width:Be,height:We}=ve.reference,Ke=le.floating.style;Ke.setProperty("--radix-popper-available-width",`${Ve}px`),Ke.setProperty("--radix-popper-available-height",`${De}px`),Ke.setProperty("--radix-popper-anchor-width",`${Be}px`),Ke.setProperty("--radix-popper-anchor-height",`${We}px`)}}),O&&T4({element:O,padding:f}),P4({arrowWidth:H,arrowHeight:$}),w&&A4({strategy:"referenceHidden",...ne})]}),[ie,k]=hS(z),W=Tt(S);$t(()=>{Q&&W?.()},[Q,W]);const se=B.arrow?.x,M=B.arrow?.y,ce=B.arrow?.centerOffset!==0,[Ee,pe]=v.useState();return $t(()=>{A&&pe(window.getComputedStyle(A).zIndex)},[A]),g.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:Q?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(M4,{scope:r,placedSide:ie,onArrowChange:L,arrowX:se,arrowY:M,shouldHideArrow:ce,children:g.jsx(_e.div,{"data-side":ie,"data-align":k,...E,ref:N,style:{...E.style,animation:Q?void 0:"none"}})})})});cS.displayName=Tm;var fS="PopperArrow",D4={top:"bottom",right:"left",bottom:"top",left:"right"},dS=v.forwardRef(function(n,r){const{__scopePopper:i,...l}=n,s=j4(fS,i),c=D4[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(N4,{...l,ref:r,style:{...l.style,display:"block"}})})});dS.displayName=fS;function O4(e){return e!==null}var P4=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:i,middlewareData:l}=n,c=l.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[h,m]=hS(r),y={start:"0%",center:"50%",end:"100%"}[m],w=(l.arrow?.x??0)+f/2,b=(l.arrow?.y??0)+d/2;let S="",E="";return h==="bottom"?(S=c?y:`${w}px`,E=`${-d}px`):h==="top"?(S=c?y:`${w}px`,E=`${i.floating.height+d}px`):h==="right"?(S=`${-d}px`,E=c?y:`${b}px`):h==="left"&&(S=`${i.floating.width+d}px`,E=c?y:`${b}px`),{data:{x:S,y:E}}}});function hS(e){const[n,r="center"]=e.split("-");return[n,r]}var Rm=lS,Nm=uS,_m=cS,Mm=dS,[Vc,tH]=Jn("Tooltip",[Ro]),qc=Ro(),pS="TooltipProvider",L4=700,bp="tooltip.open",[z4,jm]=Vc(pS),mS=e=>{const{__scopeTooltip:n,delayDuration:r=L4,skipDelayDuration:i=300,disableHoverableContent:l=!1,children:s}=e,c=v.useRef(!0),f=v.useRef(!1),d=v.useRef(0);return v.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),g.jsx(z4,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:v.useCallback(h=>{f.current=h},[]),disableHoverableContent:l,children:s})};mS.displayName=pS;var Ql="Tooltip",[I4,$c]=Vc(Ql),gS=e=>{const{__scopeTooltip:n,children:r,open:i,defaultOpen:l,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,d=jm(Ql,e.__scopeTooltip),h=qc(n),[m,y]=v.useState(null),w=kr(),b=v.useRef(0),S=c??d.disableHoverableContent,E=f??d.delayDuration,T=v.useRef(!1),[A,R]=_a({prop:i,defaultProp:l??!1,onChange:H=>{H?(d.onOpen(),document.dispatchEvent(new CustomEvent(bp))):d.onClose(),s?.(H)},caller:Ql}),N=v.useMemo(()=>A?T.current?"delayed-open":"instant-open":"closed",[A]),O=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T.current=!1,R(!0)},[R]),L=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,R(!1)},[R]),j=v.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{T.current=!0,R(!0),b.current=0},E)},[E,R]);return v.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),g.jsx(Rm,{...h,children:g.jsx(I4,{scope:n,contentId:w,open:A,stateAttribute:N,trigger:m,onTriggerChange:y,onTriggerEnter:v.useCallback(()=>{d.isOpenDelayedRef.current?j():O()},[d.isOpenDelayedRef,j,O]),onTriggerLeave:v.useCallback(()=>{S?L():(window.clearTimeout(b.current),b.current=0)},[L,S]),onOpen:O,onClose:L,disableHoverableContent:S,children:r})})};gS.displayName=Ql;var wp="TooltipTrigger",yS=v.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=$c(wp,r),s=jm(wp,r),c=qc(r),f=v.useRef(null),d=ze(n,f,l.onTriggerChange),h=v.useRef(!1),m=v.useRef(!1),y=v.useCallback(()=>h.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(Nm,{asChild:!0,...c,children:g.jsx(_e.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:d,onPointerMove:me(e.onPointerMove,w=>{w.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:me(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:me(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:me(e.onBlur,l.onClose),onClick:me(e.onClick,l.onClose)})})});yS.displayName=wp;var B4="TooltipPortal",[nH,U4]=Vc(B4,{forceMount:void 0}),mo="TooltipContent",vS=v.forwardRef((e,n)=>{const r=U4(mo,e.__scopeTooltip),{forceMount:i=r.forceMount,side:l="top",...s}=e,c=$c(mo,e.__scopeTooltip);return g.jsx(un,{present:i||c.open,children:c.disableHoverableContent?g.jsx(xS,{side:l,...s,ref:n}):g.jsx(H4,{side:l,...s,ref:n})})}),H4=v.forwardRef((e,n)=>{const r=$c(mo,e.__scopeTooltip),i=jm(mo,e.__scopeTooltip),l=v.useRef(null),s=ze(n,l),[c,f]=v.useState(null),{trigger:d,onClose:h}=r,m=l.current,{onPointerInTransitChange:y}=i,w=v.useCallback(()=>{f(null),y(!1)},[y]),b=v.useCallback((S,E)=>{const T=S.currentTarget,A={x:S.clientX,y:S.clientY},R=G4(A,T.getBoundingClientRect()),N=Y4(A,R),O=K4(E.getBoundingClientRect()),L=Q4([...N,...O]);f(L),y(!0)},[y]);return v.useEffect(()=>()=>w(),[w]),v.useEffect(()=>{if(d&&m){const S=T=>b(T,m),E=T=>b(T,d);return d.addEventListener("pointerleave",S),m.addEventListener("pointerleave",E),()=>{d.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",E)}}},[d,m,b,w]),v.useEffect(()=>{if(c){const S=E=>{const T=E.target,A={x:E.clientX,y:E.clientY},R=d?.contains(T)||m?.contains(T),N=!X4(A,c);R?w():N&&(w(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,m,c,h,w]),g.jsx(xS,{...e,ref:s})}),[F4,V4]=Vc(Ql,{isInside:!1}),q4=bw("TooltipContent"),xS=v.forwardRef((e,n)=>{const{__scopeTooltip:r,children:i,"aria-label":l,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,d=$c(mo,r),h=qc(r),{onClose:m}=d;return v.useEffect(()=>(document.addEventListener(bp,m),()=>document.removeEventListener(bp,m)),[m]),v.useEffect(()=>{if(d.trigger){const y=w=>{w.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[d.trigger,m]),g.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:m,children:g.jsxs(_m,{"data-state":d.stateAttribute,...h,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(q4,{children:i}),g.jsx(F4,{scope:r,isInside:!0,children:g.jsx(S_,{id:d.contentId,role:"tooltip",children:l||i})})]})})});vS.displayName=mo;var bS="TooltipArrow",$4=v.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=qc(r);return V4(bS,r).isInside?null:g.jsx(Mm,{...l,...i,ref:n})});$4.displayName=bS;function G4(e,n){const r=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),l=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,i,l,s)){case s:return"left";case l:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function Y4(e,n,r=5){const i=[];switch(n){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return i}function K4(e){const{top:n,right:r,bottom:i,left:l}=e;return[{x:l,y:n},{x:r,y:n},{x:r,y:i},{x:l,y:i}]}function X4(e,n){const{x:r,y:i}=e;let l=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,m=f.y,y=d.x,w=d.y;m>i!=w>i&&r<(y-h)*(i-m)/(w-m)+h&&(l=!l)}return l}function Q4(e){const n=e.slice();return n.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),Z4(n)}function Z4(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const l=e[i];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))n.pop();else break}n.push(l)}n.pop();const r=[];for(let i=e.length-1;i>=0;i--){const l=e[i];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))r.pop();else break}r.push(l)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var W4=mS,J4=gS,eP=yS,wS=vS;const tP=W4,nP=J4,rP=eP,SS=v.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(wS,{ref:i,sideOffset:n,className:ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));SS.displayName=wS.displayName;const aP="sidebar_state",iP=3600*24*7,oP="16rem",lP="18rem",sP="3rem",uP="b",ES=v.createContext(null);function Gc(){const e=v.useContext(ES);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const CS=v.forwardRef(({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:l,children:s,...c},f)=>{const d=f1(),[h,m]=v.useState(!1),[y,w]=v.useState(e),b=n??y,S=v.useCallback(R=>{const N=typeof R=="function"?R(b):R;r?r(N):w(N),document.cookie=`${aP}=${N}; path=/; max-age=${iP}`},[r,b]),E=v.useCallback(()=>d?m(R=>!R):S(R=>!R),[d,S,m]);v.useEffect(()=>{const R=N=>{N.key===uP&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),E())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[E]);const T=b?"expanded":"collapsed",A=v.useMemo(()=>({state:T,open:b,setOpen:S,isMobile:d,openMobile:h,setOpenMobile:m,toggleSidebar:E}),[T,b,S,d,h,m,E]);return g.jsx(ES.Provider,{value:A,children:g.jsx(tP,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":oP,"--sidebar-width-icon":sP,...l},className:ue("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:f,...c,children:s})})})});CS.displayName="SidebarProvider";const kS=v.forwardRef(({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:i,children:l,...s},c)=>{const{isMobile:f,state:d,openMobile:h,setOpenMobile:m}=Gc();return r==="none"?g.jsx("div",{className:ue("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:c,...s,children:l}):f?g.jsx(V1,{open:h,onOpenChange:m,...s,children:g.jsxs(gm,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":lP},side:e,children:[g.jsxs(ym,{className:"sr-only",children:[g.jsx(vm,{children:"Sidebar"}),g.jsx($1,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:l})]})}):g.jsxs("div",{ref:c,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?r:"","data-variant":n,"data-side":e,children:[g.jsx("div",{className:ue("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),g.jsx("div",{className:ue("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:l})})]})});kS.displayName="Sidebar";const AS=v.forwardRef(({className:e,onClick:n,...r},i)=>{const{toggleSidebar:l}=Gc();return g.jsxs(vt,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:ue("h-7 w-7",e),onClick:s=>{n?.(s),l()},...r,children:[g.jsx(qM,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});AS.displayName="SidebarTrigger";const cP=v.forwardRef(({className:e,...n},r)=>{const{toggleSidebar:i}=Gc();return g.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:ue("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})});cP.displayName="SidebarRail";const TS=v.forwardRef(({className:e,...n},r)=>g.jsx("main",{ref:r,className:ue("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...n}));TS.displayName="SidebarInset";const fP=v.forwardRef(({className:e,...n},r)=>g.jsx(d1,{ref:r,"data-sidebar":"input",className:ue("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...n}));fP.displayName="SidebarInput";const RS=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"header",className:ue("flex flex-col gap-2 p-2",e),...n}));RS.displayName="SidebarHeader";const NS=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"footer",className:ue("flex flex-col gap-2 p-2",e),...n}));NS.displayName="SidebarFooter";const dP=v.forwardRef(({className:e,...n},r)=>g.jsx(m1,{ref:r,"data-sidebar":"separator",className:ue("mx-2 w-auto bg-sidebar-border",e),...n}));dP.displayName="SidebarSeparator";const _S=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"content",className:ue("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n}));_S.displayName="SidebarContent";const Ol=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group",className:ue("relative flex w-full min-w-0 flex-col p-2",e),...n}));Ol.displayName="SidebarGroup";const Pl=v.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?So:"div";return g.jsx(l,{ref:i,"data-sidebar":"group-label",className:ue("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Pl.displayName="SidebarGroupLabel";const hP=v.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?So:"button";return g.jsx(l,{ref:i,"data-sidebar":"group-action",className:ue("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});hP.displayName="SidebarGroupAction";const Ll=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group-content",className:ue("w-full text-sm",e),...n}));Ll.displayName="SidebarGroupContent";const ai=v.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu",className:ue("flex w-full min-w-0 flex-col gap-1",e),...n}));ai.displayName="SidebarMenu";const ii=v.forwardRef(({className:e,...n},r)=>g.jsx("li",{ref:r,"data-sidebar":"menu-item",className:ue("group/menu-item relative",e),...n}));ii.displayName="SidebarMenuItem";const pP=Dc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),oi=v.forwardRef(({asChild:e=!1,isActive:n=!1,variant:r="default",size:i="default",tooltip:l,className:s,...c},f)=>{const d=e?So:"button",{isMobile:h,state:m}=Gc(),y=g.jsx(d,{ref:f,"data-sidebar":"menu-button","data-size":i,"data-active":n,className:ue(pP({variant:r,size:i}),s),...c});return l?(typeof l=="string"&&(l={children:l}),g.jsxs(nP,{children:[g.jsx(rP,{asChild:!0,children:y}),g.jsx(SS,{side:"right",align:"center",hidden:m!=="collapsed"||h,...l})]})):y});oi.displayName="SidebarMenuButton";const mP=v.forwardRef(({className:e,asChild:n=!1,showOnHover:r=!1,...i},l)=>{const s=n?So:"button";return g.jsx(s,{ref:l,"data-sidebar":"menu-action",className:ue("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});mP.displayName="SidebarMenuAction";const Sp=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:ue("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...n}));Sp.displayName="SidebarMenuBadge";const gP=v.forwardRef(({className:e,showIcon:n=!1,...r},i)=>{const l=v.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:ue("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[n&&g.jsx(Pb,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(Pb,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":l}})]})});gP.displayName="SidebarMenuSkeleton";const yP=v.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:ue("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...n}));yP.displayName="SidebarMenuSub";const vP=v.forwardRef(({...e},n)=>g.jsx("li",{ref:n,...e}));vP.displayName="SidebarMenuSubItem";const xP=v.forwardRef(({asChild:e=!1,size:n="md",isActive:r,className:i,...l},s)=>{const c=e?So:"a";return g.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:ue("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...l})});xP.displayName="SidebarMenuSubButton";const bP="1.0.73",wP={version:bP};function SP({className:e}){return g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[g.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),g.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),g.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),g.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const EP=[{title:"Home",url:"/",icon:TM},{title:"Role",url:"/context/role",icon:yj},{title:"Skills",url:"/agents",icon:Hl}],CP=[{title:"Tasks",url:"/proposals",icon:Kw},{title:"Code",url:"/code",icon:sM},{title:"Utilities",url:"/utilities",icon:wj},{title:"Schedule",url:"/schedule",icon:W_},{title:"Activity",url:"/activity",icon:Y_}],kP=[{title:"Overview",url:"/context/project",icon:uc},{title:"Architecture",url:"/context/architecture",icon:WM},{title:"Knowledge",url:"/context/knowledge",icon:Q_},{title:"Resources",url:"/resources",icon:wM}],AP=[{title:"Source Control",url:"/git",icon:Xw},{title:"Terminal",url:"/terminal",icon:fj},{title:"Identity",url:"/identity",icon:NM}],TP=[{title:"Documentation",url:"https://docs.coconut.dev/studio",icon:FM,external:!0},{title:"Settings",url:"/settings/user",icon:ej}];function RP(){const{badges:e}=qN();return g.jsxs(kS,{className:"bg-sidebar border-r border-sidebar-border",children:[g.jsx(RS,{children:g.jsx(ai,{children:g.jsx(ii,{children:g.jsx(oi,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:g.jsxs(Sr,{to:"/",children:[g.jsx(SP,{className:"size-8"}),g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs("span",{className:"font-semibold",children:[g.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),g.jsx("span",{children:" Studio"})]}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",wP.version]})]})]})})})})}),g.jsxs(_S,{children:[g.jsxs(Ol,{children:[g.jsx(Pl,{children:"Agent"}),g.jsx(Ll,{children:g.jsx(ai,{children:EP.map(n=>g.jsx(ii,{children:g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]}),g.jsxs(Ol,{children:[g.jsx(Pl,{children:"Work"}),g.jsx(Ll,{children:g.jsx(ai,{children:CP.map(n=>{let r=0;return n.title==="Code"&&e.codeSessions>0?r=e.codeSessions:n.title==="Schedule"&&e.runningScheduledJobs>0&&(r=e.runningScheduledJobs),g.jsxs(ii,{children:[g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),r>0&&g.jsx(Sp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:r})]},n.title)})})})]}),g.jsxs(Ol,{children:[g.jsx(Pl,{children:"Assets"}),g.jsx(Ll,{children:g.jsx(ai,{children:kP.map(n=>g.jsx(ii,{children:g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]}),g.jsxs(Ol,{children:[g.jsx(Pl,{children:"System"}),g.jsx(Ll,{children:g.jsx(ai,{children:AP.map(n=>{let r=0;return n.title==="Source Control"&&e.gitChanges>0?r=e.gitChanges:n.title==="Terminal"&&e.terminalSessions>0&&(r=e.terminalSessions),g.jsxs(ii,{children:[g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),r>0&&g.jsx(Sp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:r})]},n.title)})})})]})]}),g.jsx(NS,{children:g.jsx(ai,{children:TP.map(n=>g.jsx(ii,{children:g.jsx(oi,{asChild:!0,children:n.external?g.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]}):g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]})}function Ep(e,[n,r]){return Math.min(r,Math.max(n,e))}var NP=v.createContext(void 0);function Yc(e){const n=v.useContext(NP);return e||n||"ltr"}function MS(e){const n=v.useRef({value:e,previous:e});return v.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var _P=[" ","Enter","ArrowUp","ArrowDown"],MP=[" ","Enter"],fi="Select",[Kc,Xc,jP]=_c(fi),[No,rH]=Jn(fi,[jP,Ro]),Qc=Ro(),[DP,Da]=No(fi),[OP,PP]=No(fi),jS=e=>{const{__scopeSelect:n,children:r,open:i,defaultOpen:l,onOpenChange:s,value:c,defaultValue:f,onValueChange:d,dir:h,name:m,autoComplete:y,disabled:w,required:b,form:S}=e,E=Qc(n),[T,A]=v.useState(null),[R,N]=v.useState(null),[O,L]=v.useState(!1),j=Yc(h),[H,$]=_a({prop:i,defaultProp:l??!1,onChange:s,caller:fi}),[Y,D]=_a({prop:c,defaultProp:f,onChange:d,caller:fi}),Z=v.useRef(null),J=T?S||!!T.closest("form"):!0,[ne,G]=v.useState(new Set),ae=Array.from(ne).map(z=>z.props.value).join(";");return g.jsx(Rm,{...E,children:g.jsxs(DP,{required:b,scope:n,trigger:T,onTriggerChange:A,valueNode:R,onValueNodeChange:N,valueNodeHasChildren:O,onValueNodeHasChildrenChange:L,contentId:kr(),value:Y,onValueChange:D,open:H,onOpenChange:$,dir:j,triggerPointerDownPosRef:Z,disabled:w,children:[g.jsx(Kc.Provider,{scope:n,children:g.jsx(OP,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(z=>{G(Q=>new Set(Q).add(z))},[]),onNativeOptionRemove:v.useCallback(z=>{G(Q=>{const B=new Set(Q);return B.delete(z),B})},[]),children:r})}),J?g.jsxs(nE,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:y,value:Y,onChange:z=>D(z.target.value),disabled:w,form:S,children:[Y===void 0?g.jsx("option",{value:""}):null,Array.from(ne)]},ae):null]})})};jS.displayName=fi;var DS="SelectTrigger",OS=v.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:i=!1,...l}=e,s=Qc(r),c=Da(DS,r),f=c.disabled||i,d=ze(n,c.onTriggerChange),h=Xc(r),m=v.useRef("touch"),[y,w,b]=aE(E=>{const T=h().filter(N=>!N.disabled),A=T.find(N=>N.value===c.value),R=iE(T,E,A);R!==void 0&&c.onValueChange(R.value)}),S=E=>{f||(c.onOpenChange(!0),b()),E&&(c.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return g.jsx(Nm,{asChild:!0,...s,children:g.jsx(_e.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":rE(c.value)?"":void 0,...l,ref:d,onClick:me(l.onClick,E=>{E.currentTarget.focus(),m.current!=="mouse"&&S(E)}),onPointerDown:me(l.onPointerDown,E=>{m.current=E.pointerType;const T=E.target;T.hasPointerCapture(E.pointerId)&&T.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(S(E),E.preventDefault())}),onKeyDown:me(l.onKeyDown,E=>{const T=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&w(E.key),!(T&&E.key===" ")&&_P.includes(E.key)&&(S(),E.preventDefault())})})})});OS.displayName=DS;var PS="SelectValue",LS=v.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,children:s,placeholder:c="",...f}=e,d=Da(PS,r),{onValueNodeHasChildrenChange:h}=d,m=s!==void 0,y=ze(n,d.onValueNodeChange);return $t(()=>{h(m)},[h,m]),g.jsx(_e.span,{...f,ref:y,style:{pointerEvents:"none"},children:rE(d.value)?g.jsx(g.Fragment,{children:c}):s})});LS.displayName=PS;var LP="SelectIcon",zS=v.forwardRef((e,n)=>{const{__scopeSelect:r,children:i,...l}=e;return g.jsx(_e.span,{"aria-hidden":!0,...l,ref:n,children:i||"▼"})});zS.displayName=LP;var zP="SelectPortal",IS=e=>g.jsx(os,{asChild:!0,...e});IS.displayName=zP;var di="SelectContent",BS=v.forwardRef((e,n)=>{const r=Da(di,e.__scopeSelect),[i,l]=v.useState();if($t(()=>{l(new DocumentFragment)},[]),!r.open){const s=i;return s?wo.createPortal(g.jsx(US,{scope:e.__scopeSelect,children:g.jsx(Kc.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(HS,{...e,ref:n})});BS.displayName=di;var or=10,[US,Oa]=No(di),IP="SelectContentImpl",BP=si("SelectContent.RemoveScroll"),HS=v.forwardRef((e,n)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:s,onPointerDownOutside:c,side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:S,hideWhenDetached:E,avoidCollisions:T,...A}=e,R=Da(di,r),[N,O]=v.useState(null),[L,j]=v.useState(null),H=ze(n,le=>O(le)),[$,Y]=v.useState(null),[D,Z]=v.useState(null),J=Xc(r),[ne,G]=v.useState(!1),ae=v.useRef(!1);v.useEffect(()=>{if(N)return cm(N)},[N]),um();const z=v.useCallback(le=>{const[ve,...Ve]=J().map(We=>We.ref.current),[De]=Ve.slice(-1),Be=document.activeElement;for(const We of le)if(We===Be||(We?.scrollIntoView({block:"nearest"}),We===ve&&L&&(L.scrollTop=0),We===De&&L&&(L.scrollTop=L.scrollHeight),We?.focus(),document.activeElement!==Be))return},[J,L]),Q=v.useCallback(()=>z([$,N]),[z,$,N]);v.useEffect(()=>{ne&&Q()},[ne,Q]);const{onOpenChange:B,triggerPointerDownPosRef:ie}=R;v.useEffect(()=>{if(N){let le={x:0,y:0};const ve=De=>{le={x:Math.abs(Math.round(De.pageX)-(ie.current?.x??0)),y:Math.abs(Math.round(De.pageY)-(ie.current?.y??0))}},Ve=De=>{le.x<=10&&le.y<=10?De.preventDefault():N.contains(De.target)||B(!1),document.removeEventListener("pointermove",ve),ie.current=null};return ie.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",Ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",Ve,{capture:!0})}}},[N,B,ie]),v.useEffect(()=>{const le=()=>B(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[B]);const[k,W]=aE(le=>{const ve=J().filter(Be=>!Be.disabled),Ve=ve.find(Be=>Be.ref.current===document.activeElement),De=iE(ve,le,Ve);De&&setTimeout(()=>De.ref.current.focus())}),se=v.useCallback((le,ve,Ve)=>{const De=!ae.current&&!Ve;(R.value!==void 0&&R.value===ve||De)&&(Y(le),De&&(ae.current=!0))},[R.value]),M=v.useCallback(()=>N?.focus(),[N]),ce=v.useCallback((le,ve,Ve)=>{const De=!ae.current&&!Ve;(R.value!==void 0&&R.value===ve||De)&&Z(le)},[R.value]),Ee=i==="popper"?Cp:FS,pe=Ee===Cp?{side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:S,hideWhenDetached:E,avoidCollisions:T}:{};return g.jsx(US,{scope:r,content:N,viewport:L,onViewportChange:j,itemRefCallback:se,selectedItem:$,onItemLeave:M,itemTextRefCallback:ce,focusSelectedItem:Q,selectedItemText:D,position:i,isPositioned:ne,searchRef:k,children:g.jsx(zc,{as:BP,allowPinchZoom:!0,children:g.jsx(Pc,{asChild:!0,trapped:R.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:me(l,le=>{R.trigger?.focus({preventScroll:!0}),le.preventDefault()}),children:g.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:g.jsx(Ee,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:le=>le.preventDefault(),...A,...pe,onPlaced:()=>G(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:me(A.onKeyDown,le=>{const ve=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!ve&&le.key.length===1&&W(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let De=J().filter(Be=>!Be.disabled).map(Be=>Be.ref.current);if(["ArrowUp","End"].includes(le.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Be=le.target,We=De.indexOf(Be);De=De.slice(We+1)}setTimeout(()=>z(De)),le.preventDefault()}})})})})})})});HS.displayName=IP;var UP="SelectItemAlignedPosition",FS=v.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:i,...l}=e,s=Da(di,r),c=Oa(di,r),[f,d]=v.useState(null),[h,m]=v.useState(null),y=ze(n,H=>m(H)),w=Xc(r),b=v.useRef(!1),S=v.useRef(!0),{viewport:E,selectedItem:T,selectedItemText:A,focusSelectedItem:R}=c,N=v.useCallback(()=>{if(s.trigger&&s.valueNode&&f&&h&&E&&T&&A){const H=s.trigger.getBoundingClientRect(),$=h.getBoundingClientRect(),Y=s.valueNode.getBoundingClientRect(),D=A.getBoundingClientRect();if(s.dir!=="rtl"){const Be=D.left-$.left,We=Y.left-Be,Ke=H.left-We,xt=H.width+Ke,zn=Math.max(xt,$.width),tr=window.innerWidth-or,Rt=Ep(We,[or,Math.max(or,tr-zn)]);f.style.minWidth=xt+"px",f.style.left=Rt+"px"}else{const Be=$.right-D.right,We=window.innerWidth-Y.right-Be,Ke=window.innerWidth-H.right-We,xt=H.width+Ke,zn=Math.max(xt,$.width),tr=window.innerWidth-or,Rt=Ep(We,[or,Math.max(or,tr-zn)]);f.style.minWidth=xt+"px",f.style.right=Rt+"px"}const Z=w(),J=window.innerHeight-or*2,ne=E.scrollHeight,G=window.getComputedStyle(h),ae=parseInt(G.borderTopWidth,10),z=parseInt(G.paddingTop,10),Q=parseInt(G.borderBottomWidth,10),B=parseInt(G.paddingBottom,10),ie=ae+z+ne+B+Q,k=Math.min(T.offsetHeight*5,ie),W=window.getComputedStyle(E),se=parseInt(W.paddingTop,10),M=parseInt(W.paddingBottom,10),ce=H.top+H.height/2-or,Ee=J-ce,pe=T.offsetHeight/2,le=T.offsetTop+pe,ve=ae+z+le,Ve=ie-ve;if(ve<=ce){const Be=Z.length>0&&T===Z[Z.length-1].ref.current;f.style.bottom="0px";const We=h.clientHeight-E.offsetTop-E.offsetHeight,Ke=Math.max(Ee,pe+(Be?M:0)+We+Q),xt=ve+Ke;f.style.height=xt+"px"}else{const Be=Z.length>0&&T===Z[0].ref.current;f.style.top="0px";const Ke=Math.max(ce,ae+E.offsetTop+(Be?se:0)+pe)+Ve;f.style.height=Ke+"px",E.scrollTop=ve-ce+E.offsetTop}f.style.margin=`${or}px 0`,f.style.minHeight=k+"px",f.style.maxHeight=J+"px",i?.(),requestAnimationFrame(()=>b.current=!0)}},[w,s.trigger,s.valueNode,f,h,E,T,A,s.dir,i]);$t(()=>N(),[N]);const[O,L]=v.useState();$t(()=>{h&&L(window.getComputedStyle(h).zIndex)},[h]);const j=v.useCallback(H=>{H&&S.current===!0&&(N(),R?.(),S.current=!1)},[N,R]);return g.jsx(FP,{scope:r,contentWrapper:f,shouldExpandOnScrollRef:b,onScrollButtonChange:j,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:g.jsx(_e.div,{...l,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});FS.displayName=UP;var HP="SelectPopperPosition",Cp=v.forwardRef((e,n)=>{const{__scopeSelect:r,align:i="start",collisionPadding:l=or,...s}=e,c=Qc(r);return g.jsx(_m,{...c,...s,ref:n,align:i,collisionPadding:l,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Cp.displayName=HP;var[FP,Dm]=No(di,{}),kp="SelectViewport",VS=v.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:i,...l}=e,s=Oa(kp,r),c=Dm(kp,r),f=ze(n,s.onViewportChange),d=v.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(Kc.Slot,{scope:r,children:g.jsx(_e.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:me(l.onScroll,h=>{const m=h.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:w}=c;if(w?.current&&y){const b=Math.abs(d.current-m.scrollTop);if(b>0){const S=window.innerHeight-or*2,E=parseFloat(y.style.minHeight),T=parseFloat(y.style.height),A=Math.max(E,T);if(A<S){const R=A+b,N=Math.min(S,R),O=R-N;y.style.height=N+"px",y.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,y.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});VS.displayName=kp;var qS="SelectGroup",[VP,qP]=No(qS),$P=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=kr();return g.jsx(VP,{scope:r,id:l,children:g.jsx(_e.div,{role:"group","aria-labelledby":l,...i,ref:n})})});$P.displayName=qS;var $S="SelectLabel",GS=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=qP($S,r);return g.jsx(_e.div,{id:l.id,...i,ref:n})});GS.displayName=$S;var gc="SelectItem",[GP,YS]=No(gc),KS=v.forwardRef((e,n)=>{const{__scopeSelect:r,value:i,disabled:l=!1,textValue:s,...c}=e,f=Da(gc,r),d=Oa(gc,r),h=f.value===i,[m,y]=v.useState(s??""),[w,b]=v.useState(!1),S=ze(n,R=>d.itemRefCallback?.(R,i,l)),E=kr(),T=v.useRef("touch"),A=()=>{l||(f.onValueChange(i),f.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(GP,{scope:r,value:i,disabled:l,textId:E,isSelected:h,onItemTextChange:v.useCallback(R=>{y(N=>N||(R?.textContent??"").trim())},[]),children:g.jsx(Kc.ItemSlot,{scope:r,value:i,disabled:l,textValue:m,children:g.jsx(_e.div,{role:"option","aria-labelledby":E,"data-highlighted":w?"":void 0,"aria-selected":h&&w,"data-state":h?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...c,ref:S,onFocus:me(c.onFocus,()=>b(!0)),onBlur:me(c.onBlur,()=>b(!1)),onClick:me(c.onClick,()=>{T.current!=="mouse"&&A()}),onPointerUp:me(c.onPointerUp,()=>{T.current==="mouse"&&A()}),onPointerDown:me(c.onPointerDown,R=>{T.current=R.pointerType}),onPointerMove:me(c.onPointerMove,R=>{T.current=R.pointerType,l?d.onItemLeave?.():T.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(c.onPointerLeave,R=>{R.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:me(c.onKeyDown,R=>{d.searchRef?.current!==""&&R.key===" "||(MP.includes(R.key)&&A(),R.key===" "&&R.preventDefault())})})})})});KS.displayName=gc;var zl="SelectItemText",XS=v.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,...s}=e,c=Da(zl,r),f=Oa(zl,r),d=YS(zl,r),h=PP(zl,r),[m,y]=v.useState(null),w=ze(n,A=>y(A),d.onItemTextChange,A=>f.itemTextRefCallback?.(A,d.value,d.disabled)),b=m?.textContent,S=v.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:E,onNativeOptionRemove:T}=h;return $t(()=>(E(S),()=>T(S)),[E,T,S]),g.jsxs(g.Fragment,{children:[g.jsx(_e.span,{id:d.textId,...s,ref:w}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?wo.createPortal(s.children,c.valueNode):null]})});XS.displayName=zl;var QS="SelectItemIndicator",ZS=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return YS(QS,r).isSelected?g.jsx(_e.span,{"aria-hidden":!0,...i,ref:n}):null});ZS.displayName=QS;var Ap="SelectScrollUpButton",WS=v.forwardRef((e,n)=>{const r=Oa(Ap,e.__scopeSelect),i=Dm(Ap,e.__scopeSelect),[l,s]=v.useState(!1),c=ze(n,i.onScrollButtonChange);return $t(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollTop>0;s(h)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(eE,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop-d.offsetHeight)}}):null});WS.displayName=Ap;var Tp="SelectScrollDownButton",JS=v.forwardRef((e,n)=>{const r=Oa(Tp,e.__scopeSelect),i=Dm(Tp,e.__scopeSelect),[l,s]=v.useState(!1),c=ze(n,i.onScrollButtonChange);return $t(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;s(m)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(eE,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop+d.offsetHeight)}}):null});JS.displayName=Tp;var eE=v.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:i,...l}=e,s=Oa("SelectScrollButton",r),c=v.useRef(null),f=Xc(r),d=v.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return v.useEffect(()=>()=>d(),[d]),$t(()=>{f().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),g.jsx(_e.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:me(l.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(i,50))}),onPointerMove:me(l.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(i,50))}),onPointerLeave:me(l.onPointerLeave,()=>{d()})})}),YP="SelectSeparator",tE=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return g.jsx(_e.div,{"aria-hidden":!0,...i,ref:n})});tE.displayName=YP;var Rp="SelectArrow",KP=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=Qc(r),s=Da(Rp,r),c=Oa(Rp,r);return s.open&&c.position==="popper"?g.jsx(Mm,{...l,...i,ref:n}):null});KP.displayName=Rp;var XP="SelectBubbleInput",nE=v.forwardRef(({__scopeSelect:e,value:n,...r},i)=>{const l=v.useRef(null),s=ze(i,l),c=MS(n);return v.useEffect(()=>{const f=l.current;if(!f)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(c!==n&&m){const y=new Event("change",{bubbles:!0});m.call(f,n),f.dispatchEvent(y)}},[c,n]),g.jsx(_e.select,{...r,style:{...Cw,...r.style},ref:s,defaultValue:n})});nE.displayName=XP;function rE(e){return e===""||e===void 0}function aE(e){const n=Tt(e),r=v.useRef(""),i=v.useRef(0),l=v.useCallback(c=>{const f=r.current+c;n(f),(function d(h){r.current=h,window.clearTimeout(i.current),h!==""&&(i.current=window.setTimeout(()=>d(""),1e3))})(f)},[n]),s=v.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,l,s]}function iE(e,n,r){const l=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=QP(e,Math.max(s,0));l.length===1&&(c=c.filter(h=>h!==r));const d=c.find(h=>h.textValue.toLowerCase().startsWith(l.toLowerCase()));return d!==r?d:void 0}function QP(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var ZP=jS,oE=OS,WP=LS,JP=zS,eL=IS,lE=BS,tL=VS,sE=GS,uE=KS,nL=XS,rL=ZS,cE=WS,fE=JS,dE=tE;const Gb=ZP,Yb=WP,Np=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(oE,{ref:i,className:ue("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,g.jsx(JP,{asChild:!0,children:g.jsx(Yw,{className:"h-4 w-4 opacity-50"})})]}));Np.displayName=oE.displayName;const hE=v.forwardRef(({className:e,...n},r)=>g.jsx(cE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(aM,{className:"h-4 w-4"})}));hE.displayName=cE.displayName;const pE=v.forwardRef(({className:e,...n},r)=>g.jsx(fE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(Yw,{className:"h-4 w-4"})}));pE.displayName=fE.displayName;const _p=v.forwardRef(({className:e,children:n,position:r="popper",...i},l)=>g.jsx(eL,{children:g.jsxs(lE,{ref:l,className:ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[g.jsx(hE,{}),g.jsx(tL,{className:ue("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),g.jsx(pE,{})]})}));_p.displayName=lE.displayName;const aL=v.forwardRef(({className:e,...n},r)=>g.jsx(sE,{ref:r,className:ue("px-2 py-1.5 text-sm font-semibold",e),...n}));aL.displayName=sE.displayName;const li=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(uE,{ref:i,className:ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(rL,{children:g.jsx(Oc,{className:"h-4 w-4"})})}),g.jsx(nL,{children:n})]}));li.displayName=uE.displayName;const iL=v.forwardRef(({className:e,...n},r)=>g.jsx(dE,{ref:r,className:ue("-mx-1 my-1 h-px bg-muted",e),...n}));iL.displayName=dE.displayName;const Zc=pm,aH=F1,oL=mm,mE=v.forwardRef(({className:e,...n},r)=>g.jsx(ss,{ref:r,className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));mE.displayName=ss.displayName;const hs=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(oL,{children:[g.jsx(mE,{}),g.jsxs(us,{ref:i,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,g.jsxs(Bc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(so,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));hs.displayName=us.displayName;const ps=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});ps.displayName="DialogHeader";const gE=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});gE.displayName="DialogFooter";const ms=v.forwardRef(({className:e,...n},r)=>g.jsx(cs,{ref:r,className:ue("text-lg font-semibold leading-none tracking-tight",e),...n}));ms.displayName=cs.displayName;const Il=v.forwardRef(({className:e,...n},r)=>g.jsx(fs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));Il.displayName=fs.displayName;function zh({className:e,...n}){return g.jsx("kbd",{"data-slot":"kbd",className:ue("inline-flex h-5 items-center justify-center rounded border border-muted-foreground/30 bg-muted/50 px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-sm",e),...n})}function iH({className:e,...n}){return g.jsx("span",{"data-slot":"kbd-group",className:ue("inline-flex items-center gap-0.5",e),...n})}function oH(){}function lH(){}function sH(e){const n=[],r=String(e||"");let i=r.indexOf(","),l=0,s=!1;for(;!s;){i===-1&&(i=r.length,s=!0);const c=r.slice(l,i).trim();(c||!s)&&n.push(c),l=i+1,i=r.indexOf(",",l)}return n}function lL(e,n){const r=n||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const sL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cL={};function Kb(e,n){return(cL.jsx?uL:sL).test(e)}const fL=/[ \t\n\f\r]/g;function dL(e){return typeof e=="object"?e.type==="text"?Xb(e.value):!1:Xb(e)}function Xb(e){return e.replace(fL,"")===""}class gs{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}gs.prototype.normal={};gs.prototype.property={};gs.prototype.space=void 0;function yE(e,n){const r={},i={};for(const l of e)Object.assign(r,l.property),Object.assign(i,l.normal);return new gs(r,i,n)}function Mp(e){return e.toLowerCase()}class xn{constructor(n,r){this.attribute=r,this.property=n}}xn.prototype.attribute="";xn.prototype.booleanish=!1;xn.prototype.boolean=!1;xn.prototype.commaOrSpaceSeparated=!1;xn.prototype.commaSeparated=!1;xn.prototype.defined=!1;xn.prototype.mustUseProperty=!1;xn.prototype.number=!1;xn.prototype.overloadedBoolean=!1;xn.prototype.property="";xn.prototype.spaceSeparated=!1;xn.prototype.space=void 0;let hL=0;const Le=pi(),Dt=pi(),jp=pi(),he=pi(),ft=pi(),fo=pi(),Dn=pi();function pi(){return 2**++hL}const Dp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Dt,commaOrSpaceSeparated:Dn,commaSeparated:fo,number:he,overloadedBoolean:jp,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Ih=Object.keys(Dp);class Om extends xn{constructor(n,r,i,l){let s=-1;if(super(n,r),Qb(this,"space",l),typeof i=="number")for(;++s<Ih.length;){const c=Ih[s];Qb(this,Ih[s],(i&Dp[c])===Dp[c])}}}Om.prototype.defined=!0;function Qb(e,n,r){r&&(e[n]=r)}function _o(e){const n={},r={};for(const[i,l]of Object.entries(e.properties)){const s=new Om(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[Mp(i)]=i,r[Mp(s.attribute)]=i}return new gs(n,r,e.space)}const vE=_o({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:ft,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:he,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:ft,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Dt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function xE(e,n){return n in e?e[n]:n}function bE(e,n){return xE(e,n.toLowerCase())}const pL=_o({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fo,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:ft,autoFocus:Le,autoPlay:Le,blocking:ft,capture:null,charSet:null,checked:Le,cite:null,className:ft,cols:he,colSpan:null,content:null,contentEditable:Dt,controls:Le,controlsList:ft,coords:he|fo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:jp,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:ft,height:he,hidden:jp,high:he,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:ft,itemRef:ft,itemScope:Le,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Le,optimum:he,pattern:null,ping:ft,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:ft,required:Le,reversed:Le,rows:he,rowSpan:he,sandbox:ft,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:Dt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:bE}),mL=_o({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Dn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fo,g2:fo,glyphName:fo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Dn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dn,rev:Dn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dn,requiredFeatures:Dn,requiredFonts:Dn,requiredFormats:Dn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Dn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xE}),wE=_o({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),SE=_o({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bE}),EE=_o({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),gL={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},yL=/[A-Z]/g,Zb=/-[a-z]/g,vL=/^data[-\w.:]+$/i;function xL(e,n){const r=Mp(n);let i=n,l=xn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&vL.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(Zb,wL);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!Zb.test(s)){let c=s.replace(yL,bL);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}l=Om}return new l(i,n)}function bL(e){return"-"+e.toLowerCase()}function wL(e){return e.charAt(1).toUpperCase()}const SL=yE([vE,pL,wE,SE,EE],"html"),Pm=yE([vE,mL,wE,SE,EE],"svg");function uH(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function EL(e){return e.join(" ").trim()}var io={},Bh,Wb;function CL(){if(Wb)return Bh;Wb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
366
- `,h="/",m="*",y="",w="comment",b="declaration";Bh=function(E,T){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];T=T||{};var A=1,R=1;function N(ne){var G=ne.match(n);G&&(A+=G.length);var ae=ne.lastIndexOf(d);R=~ae?ne.length-ae:R+ne.length}function O(){var ne={line:A,column:R};return function(G){return G.position=new L(ne),$(),G}}function L(ne){this.start=ne,this.end={line:A,column:R},this.source=T.source}L.prototype.content=E;function j(ne){var G=new Error(T.source+":"+A+":"+R+": "+ne);if(G.reason=ne,G.filename=T.source,G.line=A,G.column=R,G.source=E,!T.silent)throw G}function H(ne){var G=ne.exec(E);if(G){var ae=G[0];return N(ae),E=E.slice(ae.length),G}}function $(){H(r)}function Y(ne){var G;for(ne=ne||[];G=D();)G!==!1&&ne.push(G);return ne}function D(){var ne=O();if(!(h!=E.charAt(0)||m!=E.charAt(1))){for(var G=2;y!=E.charAt(G)&&(m!=E.charAt(G)||h!=E.charAt(G+1));)++G;if(G+=2,y===E.charAt(G-1))return j("End of comment missing");var ae=E.slice(2,G-2);return R+=2,N(ae),E=E.slice(G),R+=2,ne({type:w,comment:ae})}}function Z(){var ne=O(),G=H(i);if(G){if(D(),!H(l))return j("property missing ':'");var ae=H(s),z=ne({type:b,property:S(G[0].replace(e,y)),value:ae?S(ae[0].replace(e,y)):y});return H(c),z}}function J(){var ne=[];Y(ne);for(var G;G=Z();)G!==!1&&(ne.push(G),Y(ne));return ne}return $(),J()};function S(E){return E?E.replace(f,y):y}return Bh}var Jb;function kL(){if(Jb)return io;Jb=1;var e=io&&io.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(io,"__esModule",{value:!0}),io.default=r;var n=e(CL());function r(i,l){var s=null;if(!i||typeof i!="string")return s;var c=(0,n.default)(i),f=typeof l=="function";return c.forEach(function(d){if(d.type==="declaration"){var h=d.property,m=d.value;f?l(h,m,d):m&&(s=s||{},s[h]=m)}}),s}return io}var _l={},e0;function AL(){if(e0)return _l;e0=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(h){return!h||r.test(h)||e.test(h)},c=function(h,m){return m.toUpperCase()},f=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),s(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(l,f):h=h.replace(i,f),h.replace(n,c))};return _l.camelCase=d,_l}var Ml,t0;function TL(){if(t0)return Ml;t0=1;var e=Ml&&Ml.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=e(kL()),r=AL();function i(l,s){var c={};return!l||typeof l!="string"||(0,n.default)(l,function(f,d){f&&d&&(c[(0,r.camelCase)(f,s)]=d)}),c}return i.default=i,Ml=i,Ml}var RL=TL();const NL=Cc(RL),CE=kE("end"),Lm=kE("start");function kE(e){return n;function n(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function AE(e){const n=Lm(e),r=CE(e);if(n&&r)return{start:n,end:r}}function Fl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?n0(e.position):"start"in e||"end"in e?n0(e):"line"in e||"column"in e?Op(e):""}function Op(e){return r0(e&&e.line)+":"+r0(e&&e.column)}function n0(e){return Op(e&&e.start)+"-"+Op(e&&e.end)}function r0(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(n,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let l="",s={},c=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof n=="string"?l=n:!s.cause&&n&&(c=!0,l=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?s.ruleId=i:(s.source=i.slice(0,d),s.ruleId=i.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=Fl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rn.prototype.file="";rn.prototype.name="";rn.prototype.reason="";rn.prototype.message="";rn.prototype.stack="";rn.prototype.column=void 0;rn.prototype.line=void 0;rn.prototype.ancestors=void 0;rn.prototype.cause=void 0;rn.prototype.fatal=void 0;rn.prototype.place=void 0;rn.prototype.ruleId=void 0;rn.prototype.source=void 0;const zm={}.hasOwnProperty,_L=new Map,ML=/[A-Z]/g,jL=new Set(["table","tbody","thead","tfoot","tr"]),DL=new Set(["td","th"]),TE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OL(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=FL(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=HL(r,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Pm:SL,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=RE(l,e,void 0);return s&&typeof s!="string"?s:l.create(e,l.Fragment,{children:s||void 0},void 0)}function RE(e,n,r){if(n.type==="element")return PL(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return LL(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return IL(e,n,r);if(n.type==="mdxjsEsm")return zL(e,n);if(n.type==="root")return BL(e,n,r);if(n.type==="text")return UL(e,n)}function PL(e,n,r){const i=e.schema;let l=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=Pm,e.schema=l),e.ancestors.push(n);const s=_E(e,n.tagName,!1),c=VL(e,n);let f=Bm(e,n);return jL.has(n.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!dL(d):!0})),NE(e,c,s,n),Im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function LL(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Zl(e,n.position)}function zL(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Zl(e,n.position)}function IL(e,n,r){const i=e.schema;let l=i;n.name==="svg"&&i.space==="html"&&(l=Pm,e.schema=l),e.ancestors.push(n);const s=n.name===null?e.Fragment:_E(e,n.name,!0),c=qL(e,n),f=Bm(e,n);return NE(e,c,s,n),Im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function BL(e,n,r){const i={};return Im(i,Bm(e,n)),e.create(n,e.Fragment,i,r)}function UL(e,n){return n.value}function NE(e,n,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=i)}function Im(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function HL(e,n,r){return i;function i(l,s,c,f){const h=Array.isArray(c.children)?r:n;return f?h(s,c,f):h(s,c)}}function FL(e,n){return r;function r(i,l,s,c){const f=Array.isArray(s.children),d=Lm(i);return n(l,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function VL(e,n){const r={};let i,l;for(l in n.properties)if(l!=="children"&&zm.call(n.properties,l)){const s=$L(e,l,n.properties[l]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&DL.has(n.tagName)?i=f:r[c]=f}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function qL(e,n){const r={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Zl(e,n.position);else{const l=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Zl(e,n.position);else s=i.value===null?!0:i.value;r[l]=s}return r}function Bm(e,n){const r=[];let i=-1;const l=e.passKeys?new Map:_L;for(;++i<n.children.length;){const s=n.children[i];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=l.get(d)||0;c=d+"-"+h,l.set(d,h+1)}}const f=RE(e,s,c);f!==void 0&&r.push(f)}return r}function $L(e,n,r){const i=xL(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?lL(r):EL(r)),i.property==="style"){let l=typeof r=="object"?r:GL(e,String(r));return e.stylePropertyNameCase==="css"&&(l=YL(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?gL[i.property]||i.property:i.attribute,r]}}function GL(e,n){try{return NL(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=TE+"#cannot-parse-style-attribute",l}}function _E(e,n,r){let i;if(!r)i={type:"Literal",value:n};else if(n.includes(".")){const l=n.split(".");let s=-1,c;for(;++s<l.length;){const f=Kb(l[s])?{type:"Identifier",name:l[s]}:{type:"Literal",value:l[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}i=c}else i=Kb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const l=i.value;return zm.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);Zl(e)}function Zl(e,n){const r=new rn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=TE+"#cannot-handle-mdx-estrees-without-createevaluater",r}function YL(e){const n={};let r;for(r in e)zm.call(e,r)&&(n[KL(r)]=e[r]);return n}function KL(e){let n=e.replace(ML,XL);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function XL(e){return"-"+e.toLowerCase()}const Uh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},QL={};function Um(e,n){const r=QL,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return ME(e,i,l)}function ME(e,n,r){if(ZL(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return a0(e.children,n,r)}return Array.isArray(e)?a0(e,n,r):""}function a0(e,n,r){const i=[];let l=-1;for(;++l<e.length;)i[l]=ME(e[l],n,r);return i.join("")}function ZL(e){return!!(e&&typeof e=="object")}const i0=document.createElement("i");function Hm(e){const n="&"+e+";";i0.innerHTML=n;const r=i0.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function Ln(e,n,r,i){const l=e.length;let s=0,c;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(n,r),e.splice(...c);else for(r&&e.splice(n,r);s<i.length;)c=i.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function Kn(e,n){return e.length>0?(Ln(e,e.length,0,n),e):n}const o0={}.hasOwnProperty;function jE(e){const n={};let r=-1;for(;++r<e.length;)WL(n,e[r]);return n}function WL(e,n){let r;for(r in n){const l=(o0.call(e,r)?e[r]:void 0)||(e[r]={}),s=n[r];let c;if(s)for(c in s){o0.call(l,c)||(l[c]=[]);const f=s[c];JL(l[c],Array.isArray(f)?f:f?[f]:[])}}}function JL(e,n){let r=-1;const i=[];for(;++r<n.length;)(n[r].add==="after"?e:i).push(n[r]);Ln(e,0,0,i)}function DE(e,n){const r=Number.parseInt(e,n);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const sn=Pa(/[A-Za-z]/),nn=Pa(/[\dA-Za-z]/),ez=Pa(/[#-'*+\--9=?A-Z^-~]/);function yc(e){return e!==null&&(e<32||e===127)}const Pp=Pa(/\d/),tz=Pa(/[\dA-Fa-f]/),nz=Pa(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function ut(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Wc=Pa(new RegExp("\\p{P}|\\p{S}","u")),hi=Pa(/\s/);function Pa(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Mo(e){const n=[];let r=-1,i=0,l=0;for(;++r<e.length;){const s=e.charCodeAt(r);let c="";if(s===37&&nn(e.charCodeAt(r+1))&&nn(e.charCodeAt(r+2)))l=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),l=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(i,r),encodeURIComponent(c)),i=r+l+1,c=""),l&&(r+=l,l=0)}return n.join("")+e.slice(i)}function Ze(e,n,r,i){const l=i?i-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Ye(d)?(e.enter(r),f(d)):n(d)}function f(d){return Ye(d)&&s++<l?(e.consume(d),f):(e.exit(r),n(d))}}const rz={tokenize:az};function az(e){const n=e.attempt(this.parser.constructs.contentInitial,i,l);let r;return n;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ze(e,n,"linePrefix")}function l(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Te(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const iz={tokenize:oz},l0={tokenize:lz};function oz(e){const n=this,r=[];let i=0,l,s,c;return f;function f(N){if(i<r.length){const O=r[i];return n.containerState=O[1],e.attempt(O[0].continuation,d,h)(N)}return h(N)}function d(N){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&R();const O=n.events.length;let L=O,j;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){j=n.events[L][1].end;break}A(i);let H=O;for(;H<n.events.length;)n.events[H][1].end={...j},H++;return Ln(n.events,L+1,0,n.events.slice(O)),n.events.length=H,h(N)}return f(N)}function h(N){if(i===r.length){if(!l)return w(N);if(l.currentConstruct&&l.currentConstruct.concrete)return S(N);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(l0,m,y)(N)}function m(N){return l&&R(),A(i),w(N)}function y(N){return n.parser.lazy[n.now().line]=i!==r.length,c=n.now().offset,S(N)}function w(N){return n.containerState={},e.attempt(l0,b,S)(N)}function b(N){return i++,r.push([n.currentConstruct,n.containerState]),w(N)}function S(N){if(N===null){l&&R(),A(0),e.consume(N);return}return l=l||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:s}),E(N)}function E(N){if(N===null){T(e.exit("chunkFlow"),!0),A(0),e.consume(N);return}return Te(N)?(e.consume(N),T(e.exit("chunkFlow")),i=0,n.interrupt=void 0,f):(e.consume(N),E)}function T(N,O){const L=n.sliceStream(N);if(O&&L.push(null),N.previous=s,s&&(s.next=N),s=N,l.defineSkip(N.start),l.write(L),n.parser.lazy[N.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<c&&(!l.events[j][1].end||l.events[j][1].end.offset>c))return;const H=n.events.length;let $=H,Y,D;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(Y){D=n.events[$][1].end;break}Y=!0}for(A(i),j=H;j<n.events.length;)n.events[j][1].end={...D},j++;Ln(n.events,$+1,0,n.events.slice(H)),n.events.length=j}}function A(N){let O=r.length;for(;O-- >N;){const L=r[O];n.containerState=L[1],L[0].exit.call(n,e)}r.length=N}function R(){l.write([null]),s=void 0,l=void 0,n.containerState._closeFlow=void 0}}function lz(e,n,r){return Ze(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function go(e){if(e===null||ut(e)||hi(e))return 1;if(Wc(e))return 2}function Jc(e,n,r){const i=[];let l=-1;for(;++l<e.length;){const s=e[l].resolveAll;s&&!i.includes(s)&&(n=s(n,r),i.push(s))}return n}const Lp={name:"attention",resolveAll:sz,tokenize:uz};function sz(e,n){let r=-1,i,l,s,c,f,d,h,m;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[i][1].end},w={...e[r][1].start};s0(y,-d),s0(w,d),c={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:w},s={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},l={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[r][1].start={...f.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=Kn(h,[["enter",e[i][1],n],["exit",e[i][1],n]])),h=Kn(h,[["enter",l,n],["enter",c,n],["exit",c,n],["enter",s,n]]),h=Kn(h,Jc(n.parser.constructs.insideSpan.null,e.slice(i+1,r),n)),h=Kn(h,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",l,n]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,h=Kn(h,[["enter",e[r][1],n],["exit",e[r][1],n]])):m=0,Ln(e,i-1,r-i+3,h),r=i+h.length-m-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function uz(e,n){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=go(i);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),m=go(d),y=!m||m===2&&l||r.includes(d),w=!l||l===2&&m||r.includes(i);return h._open=!!(s===42?y:y&&(l||!w)),h._close=!!(s===42?w:w&&(m||!y)),n(d)}}function s0(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const cz={name:"autolink",tokenize:fz};function fz(e,n,r){let i=0;return l;function l(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return sn(b)?(e.consume(b),c):b===64?r(b):h(b)}function c(b){return b===43||b===45||b===46||nn(b)?(i=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),i=0,d):(b===43||b===45||b===46||nn(b))&&i++<32?(e.consume(b),f):(i=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||yc(b)?r(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),m):ez(b)?(e.consume(b),h):r(b)}function m(b){return nn(b)?y(b):r(b)}function y(b){return b===46?(e.consume(b),i=0,m):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):w(b)}function w(b){if((b===45||nn(b))&&i++<63){const S=b===45?w:y;return e.consume(b),S}return r(b)}}const ys={partial:!0,tokenize:dz};function dz(e,n,r){return i;function i(s){return Ye(s)?Ze(e,l,"linePrefix")(s):l(s)}function l(s){return s===null||Te(s)?n(s):r(s)}}const OE={continuation:{tokenize:pz},exit:mz,name:"blockQuote",tokenize:hz};function hz(e,n,r){const i=this;return l;function l(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return r(c)}function s(c){return Ye(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function pz(e,n,r){const i=this;return l;function l(c){return Ye(c)?Ze(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(OE,n,r)(c)}}function mz(e){e.exit("blockQuote")}const PE={name:"characterEscape",tokenize:gz};function gz(e,n,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),l}function l(s){return nz(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(s)}}const LE={name:"characterReference",tokenize:yz};function yz(e,n,r){const i=this;let l=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=nn,m(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=tz,m):(e.enter("characterReferenceValue"),s=7,c=Pp,m(y))}function m(y){if(y===59&&l){const w=e.exit("characterReferenceValue");return c===nn&&!Hm(i.sliceSerialize(w))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&l++<s?(e.consume(y),m):r(y)}}const u0={partial:!0,tokenize:xz},c0={concrete:!0,name:"codeFenced",tokenize:vz};function vz(e,n,r){const i=this,l={partial:!0,tokenize:L};let s=0,c=0,f;return d;function d(j){return h(j)}function h(j){const H=i.events[i.events.length-1];return s=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===f?(c++,e.consume(j),m):c<3?r(j):(e.exit("codeFencedFenceSequence"),Ye(j)?Ze(e,y,"whitespace")(j):y(j))}function y(j){return j===null||Te(j)?(e.exit("codeFencedFence"),i.interrupt?n(j):e.check(u0,E,O)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(j))}function w(j){return j===null||Te(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(j)):Ye(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),w)}function b(j){return j===null||Te(j)?y(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(j))}function S(j){return j===null||Te(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(j)):j===96&&j===f?r(j):(e.consume(j),S)}function E(j){return e.attempt(l,O,T)(j)}function T(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),A}function A(j){return s>0&&Ye(j)?Ze(e,R,"linePrefix",s+1)(j):R(j)}function R(j){return j===null||Te(j)?e.check(u0,E,O)(j):(e.enter("codeFlowValue"),N(j))}function N(j){return j===null||Te(j)?(e.exit("codeFlowValue"),R(j)):(e.consume(j),N)}function O(j){return e.exit("codeFenced"),n(j)}function L(j,H,$){let Y=0;return D;function D(ae){return j.enter("lineEnding"),j.consume(ae),j.exit("lineEnding"),Z}function Z(ae){return j.enter("codeFencedFence"),Ye(ae)?Ze(j,J,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):J(ae)}function J(ae){return ae===f?(j.enter("codeFencedFenceSequence"),ne(ae)):$(ae)}function ne(ae){return ae===f?(Y++,j.consume(ae),ne):Y>=c?(j.exit("codeFencedFenceSequence"),Ye(ae)?Ze(j,G,"whitespace")(ae):G(ae)):$(ae)}function G(ae){return ae===null||Te(ae)?(j.exit("codeFencedFence"),H(ae)):$(ae)}}}function xz(e,n,r){const i=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}const Hh={name:"codeIndented",tokenize:wz},bz={partial:!0,tokenize:Sz};function wz(e,n,r){const i=this;return l;function l(h){return e.enter("codeIndented"),Ze(e,s,"linePrefix",5)(h)}function s(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):r(h)}function c(h){return h===null?d(h):Te(h)?e.attempt(bz,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Te(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),n(h)}}function Sz(e,n,r){const i=this;return l;function l(c){return i.parser.lazy[i.now().line]?r(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):Ze(e,s,"linePrefix",5)(c)}function s(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):Te(c)?l(c):r(c)}}const Ez={name:"codeText",previous:kz,resolve:Cz,tokenize:Az};function Cz(e){let n=e.length-4,r=3,i,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=r;++i<n;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(i=r-1,n++;++i<=n;)l===void 0?i!==n&&e[i][1].type!=="lineEnding"&&(l=i):(i===n||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),n-=i-l-2,i=l+2),l=void 0);return e}function kz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Az(e,n,r){let i=0,l,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),l=0,m(y)):Te(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||Te(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function m(y){return y===96?(e.consume(y),l++,m):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(s.type="codeTextData",h(y))}}class Tz{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,r,i){const l=r||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&jl(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),jl(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),jl(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);jl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);jl(this.left,r.reverse())}}}function jl(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function zE(e){const n={};let r=-1,i,l,s,c,f,d,h;const m=new Tz(e);for(;++r<m.length;){for(;r in n;)r=n[r];if(i=m.get(r),r&&i[1].type==="chunkFlow"&&m.get(r-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,Rz(m,r)),r=n[r],h=!0);else if(i[1]._container){for(s=r,l=void 0;s--;)if(c=m.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(m.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(i[1].end={...m.get(l)[1].start},f=m.slice(l,r),f.unshift(i),m.splice(l,r-l+1,f))}}return Ln(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Rz(e,n){const r=e.get(n)[1],i=e.get(n)[2];let l=n-1;const s=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let m,y,w=-1,b=r,S=0,E=0;const T=[E];for(;b;){for(;e.get(++l)[1]!==b;);s.push(l),b._tokenizer||(m=i.sliceStream(b),b.next||m.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=r;++w<f.length;)f[w][0]==="exit"&&f[w-1][0]==="enter"&&f[w][1].type===f[w-1][1].type&&f[w][1].start.line!==f[w][1].end.line&&(E=w+1,T.push(E),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):T.pop(),w=T.length;w--;){const A=f.slice(T[w],T[w+1]),R=s.pop();d.push([R,R+A.length-1]),e.splice(R,2,A)}for(d.reverse(),w=-1;++w<d.length;)h[S+d[w][0]]=S+d[w][1],S+=d[w][1]-d[w][0]-1;return h}const Nz={resolve:Mz,tokenize:jz},_z={partial:!0,tokenize:Dz};function Mz(e){return zE(e),e}function jz(e,n){let r;return i;function i(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?s(f):Te(f)?e.check(_z,c,s)(f):(e.consume(f),l)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function Dz(e,n,r){const i=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,s,"linePrefix")}function s(c){if(c===null||Te(c))return r(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(i.parser.constructs.flow,r,n)(c)}}function IE(e,n,r,i,l,s,c,f,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return y;function y(A){return A===60?(e.enter(i),e.enter(l),e.enter(s),e.consume(A),e.exit(s),w):A===null||A===32||A===41||yc(A)?r(A):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(A))}function w(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(l),e.exit(i),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(f),w(A)):A===null||A===60||Te(A)?r(A):(e.consume(A),A===92?S:b)}function S(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function E(A){return!m&&(A===null||A===41||ut(A))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),n(A)):m<h&&A===40?(e.consume(A),m++,E):A===41?(e.consume(A),m--,E):A===null||A===32||A===40||yc(A)?r(A):(e.consume(A),A===92?T:E)}function T(A){return A===40||A===41||A===92?(e.consume(A),E):E(A)}}function BE(e,n,r,i,l,s){const c=this;let f=0,d;return h;function h(b){return e.enter(i),e.enter(l),e.consume(b),e.exit(l),e.enter(s),m}function m(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(b):b===93?(e.exit(s),e.enter(l),e.consume(b),e.exit(l),e.exit(i),n):Te(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Te(b)||f++>999?(e.exit("chunkString"),m(b)):(e.consume(b),d||(d=!Ye(b)),b===92?w:y)}function w(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function UE(e,n,r,i,l,s){let c;return f;function f(w){return w===34||w===39||w===40?(e.enter(i),e.enter(l),e.consume(w),e.exit(l),c=w===40?41:w,d):r(w)}function d(w){return w===c?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),n):(e.enter(s),h(w))}function h(w){return w===c?(e.exit(s),d(c)):w===null?r(w):Te(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Ze(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===c||w===null||Te(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?y:m)}function y(w){return w===c||w===92?(e.consume(w),m):m(w)}}function Vl(e,n){let r;return i;function i(l){return Te(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,i):Ye(l)?Ze(e,i,r?"linePrefix":"lineSuffix")(l):n(l)}}const Oz={name:"definition",tokenize:Lz},Pz={partial:!0,tokenize:zz};function Lz(e,n,r){const i=this;let l;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return BE.call(i,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return l=sr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):r(b)}function d(b){return ut(b)?Vl(e,h)(b):h(b)}function h(b){return IE(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(Pz,y,y)(b)}function y(b){return Ye(b)?Ze(e,w,"whitespace")(b):w(b)}function w(b){return b===null||Te(b)?(e.exit("definition"),i.parser.defined.push(l),n(b)):r(b)}}function zz(e,n,r){return i;function i(f){return ut(f)?Vl(e,l)(f):r(f)}function l(f){return UE(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ye(f)?Ze(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?n(f):r(f)}}const Iz={name:"hardBreakEscape",tokenize:Bz};function Bz(e,n,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),l}function l(s){return Te(s)?(e.exit("hardBreakEscape"),n(s)):r(s)}}const Uz={name:"headingAtx",resolve:Hz,tokenize:Fz};function Hz(e,n){let r=e.length-2,i=3,l,s;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},Ln(e,i,r-i+1,[["enter",l,n],["enter",s,n],["exit",s,n],["exit",l,n]])),e}function Fz(e,n,r){let i=0;return l;function l(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||ut(m)?(e.exit("atxHeadingSequence"),f(m)):r(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Te(m)?(e.exit("atxHeading"),n(m)):Ye(m)?Ze(e,f,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),f(m))}function h(m){return m===null||m===35||ut(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),h)}}const Vz=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],f0=["pre","script","style","textarea"],qz={concrete:!0,name:"htmlFlow",resolveTo:Yz,tokenize:Kz},$z={partial:!0,tokenize:Qz},Gz={partial:!0,tokenize:Xz};function Yz(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Kz(e,n,r){const i=this;let l,s,c,f,d;return h;function h(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),y}function y(M){return M===33?(e.consume(M),w):M===47?(e.consume(M),s=!0,E):M===63?(e.consume(M),l=3,i.interrupt?n:k):sn(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function w(M){return M===45?(e.consume(M),l=2,b):M===91?(e.consume(M),l=5,f=0,S):sn(M)?(e.consume(M),l=4,i.interrupt?n:k):r(M)}function b(M){return M===45?(e.consume(M),i.interrupt?n:k):r(M)}function S(M){const ce="CDATA[";return M===ce.charCodeAt(f++)?(e.consume(M),f===ce.length?i.interrupt?n:J:S):r(M)}function E(M){return sn(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function T(M){if(M===null||M===47||M===62||ut(M)){const ce=M===47,Ee=c.toLowerCase();return!ce&&!s&&f0.includes(Ee)?(l=1,i.interrupt?n(M):J(M)):Vz.includes(c.toLowerCase())?(l=6,ce?(e.consume(M),A):i.interrupt?n(M):J(M)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(M):s?R(M):N(M))}return M===45||nn(M)?(e.consume(M),c+=String.fromCharCode(M),T):r(M)}function A(M){return M===62?(e.consume(M),i.interrupt?n:J):r(M)}function R(M){return Ye(M)?(e.consume(M),R):D(M)}function N(M){return M===47?(e.consume(M),D):M===58||M===95||sn(M)?(e.consume(M),O):Ye(M)?(e.consume(M),N):D(M)}function O(M){return M===45||M===46||M===58||M===95||nn(M)?(e.consume(M),O):L(M)}function L(M){return M===61?(e.consume(M),j):Ye(M)?(e.consume(M),L):N(M)}function j(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),d=M,H):Ye(M)?(e.consume(M),j):$(M)}function H(M){return M===d?(e.consume(M),d=null,Y):M===null||Te(M)?r(M):(e.consume(M),H)}function $(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||ut(M)?L(M):(e.consume(M),$)}function Y(M){return M===47||M===62||Ye(M)?N(M):r(M)}function D(M){return M===62?(e.consume(M),Z):r(M)}function Z(M){return M===null||Te(M)?J(M):Ye(M)?(e.consume(M),Z):r(M)}function J(M){return M===45&&l===2?(e.consume(M),z):M===60&&l===1?(e.consume(M),Q):M===62&&l===4?(e.consume(M),W):M===63&&l===3?(e.consume(M),k):M===93&&l===5?(e.consume(M),ie):Te(M)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check($z,se,ne)(M)):M===null||Te(M)?(e.exit("htmlFlowData"),ne(M)):(e.consume(M),J)}function ne(M){return e.check(Gz,G,se)(M)}function G(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),ae}function ae(M){return M===null||Te(M)?ne(M):(e.enter("htmlFlowData"),J(M))}function z(M){return M===45?(e.consume(M),k):J(M)}function Q(M){return M===47?(e.consume(M),c="",B):J(M)}function B(M){if(M===62){const ce=c.toLowerCase();return f0.includes(ce)?(e.consume(M),W):J(M)}return sn(M)&&c.length<8?(e.consume(M),c+=String.fromCharCode(M),B):J(M)}function ie(M){return M===93?(e.consume(M),k):J(M)}function k(M){return M===62?(e.consume(M),W):M===45&&l===2?(e.consume(M),k):J(M)}function W(M){return M===null||Te(M)?(e.exit("htmlFlowData"),se(M)):(e.consume(M),W)}function se(M){return e.exit("htmlFlow"),n(M)}}function Xz(e,n,r){const i=this;return l;function l(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):r(c)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}function Qz(e,n,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(ys,n,r)}}const Zz={name:"htmlText",tokenize:Wz};function Wz(e,n,r){const i=this;let l,s,c;return f;function f(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),L):k===63?(e.consume(k),N):sn(k)?(e.consume(k),$):r(k)}function h(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),s=0,S):sn(k)?(e.consume(k),R):r(k)}function m(k){return k===45?(e.consume(k),b):r(k)}function y(k){return k===null?r(k):k===45?(e.consume(k),w):Te(k)?(c=y,Q(k)):(e.consume(k),y)}function w(k){return k===45?(e.consume(k),b):y(k)}function b(k){return k===62?z(k):k===45?w(k):y(k)}function S(k){const W="CDATA[";return k===W.charCodeAt(s++)?(e.consume(k),s===W.length?E:S):r(k)}function E(k){return k===null?r(k):k===93?(e.consume(k),T):Te(k)?(c=E,Q(k)):(e.consume(k),E)}function T(k){return k===93?(e.consume(k),A):E(k)}function A(k){return k===62?z(k):k===93?(e.consume(k),A):E(k)}function R(k){return k===null||k===62?z(k):Te(k)?(c=R,Q(k)):(e.consume(k),R)}function N(k){return k===null?r(k):k===63?(e.consume(k),O):Te(k)?(c=N,Q(k)):(e.consume(k),N)}function O(k){return k===62?z(k):N(k)}function L(k){return sn(k)?(e.consume(k),j):r(k)}function j(k){return k===45||nn(k)?(e.consume(k),j):H(k)}function H(k){return Te(k)?(c=H,Q(k)):Ye(k)?(e.consume(k),H):z(k)}function $(k){return k===45||nn(k)?(e.consume(k),$):k===47||k===62||ut(k)?Y(k):r(k)}function Y(k){return k===47?(e.consume(k),z):k===58||k===95||sn(k)?(e.consume(k),D):Te(k)?(c=Y,Q(k)):Ye(k)?(e.consume(k),Y):z(k)}function D(k){return k===45||k===46||k===58||k===95||nn(k)?(e.consume(k),D):Z(k)}function Z(k){return k===61?(e.consume(k),J):Te(k)?(c=Z,Q(k)):Ye(k)?(e.consume(k),Z):Y(k)}function J(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),l=k,ne):Te(k)?(c=J,Q(k)):Ye(k)?(e.consume(k),J):(e.consume(k),G)}function ne(k){return k===l?(e.consume(k),l=void 0,ae):k===null?r(k):Te(k)?(c=ne,Q(k)):(e.consume(k),ne)}function G(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||ut(k)?Y(k):(e.consume(k),G)}function ae(k){return k===47||k===62||ut(k)?Y(k):r(k)}function z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),n):r(k)}function Q(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),B}function B(k){return Ye(k)?Ze(e,ie,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),c(k)}}const Fm={name:"labelEnd",resolveAll:n3,resolveTo:r3,tokenize:a3},Jz={tokenize:i3},e3={tokenize:o3},t3={tokenize:l3};function n3(e){let n=-1;const r=[];for(;++n<e.length;){const i=e[n][1];if(r.push(e[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",n+=l}}return e.length!==r.length&&Ln(e,0,e.length,r),e}function r3(e,n){let r=e.length,i=0,l,s,c,f;for(;r--;)if(l=e[r][1],s){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(s=r,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(c=r);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,n],["enter",h,n]],f=Kn(f,e.slice(s+1,s+i+3)),f=Kn(f,[["enter",m,n]]),f=Kn(f,Jc(n.parser.constructs.insideSpan.null,e.slice(s+i+4,c-3),n)),f=Kn(f,[["exit",m,n],e[c-2],e[c-1],["exit",h,n]]),f=Kn(f,e.slice(c+1)),f=Kn(f,[["exit",d,n]]),Ln(e,s,e.length,f),e}function a3(e,n,r){const i=this;let l=i.events.length,s,c;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){s=i.events[l][1];break}return f;function f(w){return s?s._inactive?y(w):(c=i.parser.defined.includes(sr(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),d):r(w)}function d(w){return w===40?e.attempt(Jz,m,c?m:y)(w):w===91?e.attempt(e3,m,c?h:y)(w):c?m(w):y(w)}function h(w){return e.attempt(t3,m,y)(w)}function m(w){return n(w)}function y(w){return s._balanced=!0,r(w)}}function i3(e,n,r){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return ut(y)?Vl(e,s)(y):s(y)}function s(y){return y===41?m(y):IE(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return ut(y)?Vl(e,d)(y):m(y)}function f(y){return r(y)}function d(y){return y===34||y===39||y===40?UE(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):m(y)}function h(y){return ut(y)?Vl(e,m)(y):m(y)}function m(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):r(y)}}function o3(e,n,r){const i=this;return l;function l(f){return BE.call(i,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return i.parser.defined.includes(sr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(f):r(f)}function c(f){return r(f)}}function l3(e,n,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),l}function l(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):r(s)}}const s3={name:"labelStartImage",resolveAll:Fm.resolveAll,tokenize:u3};function u3(e,n,r){const i=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(f):n(f)}}const c3={name:"labelStartLink",resolveAll:Fm.resolveAll,tokenize:f3};function f3(e,n,r){const i=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):n(c)}}const Fh={name:"lineEnding",tokenize:d3};function d3(e,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ze(e,n,"linePrefix")}}const ic={name:"thematicBreak",tokenize:h3};function h3(e,n,r){let i=0,l;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return l=h,f(h)}function f(h){return h===l?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),n(h)):r(h)}function d(h){return h===l?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Ye(h)?Ze(e,f,"whitespace")(h):f(h))}}const vn={continuation:{tokenize:y3},exit:x3,name:"list",tokenize:g3},p3={partial:!0,tokenize:b3},m3={partial:!0,tokenize:v3};function g3(e,n,r){const i=this,l=i.events[i.events.length-1];let s=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(b){const S=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:Pp(b)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ic,r,h)(b):h(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return r(b)}function d(b){return Pp(b)&&++c<10?(e.consume(b),d):(!i.interrupt||c<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):r(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(ys,i.interrupt?r:m,e.attempt(p3,w,y))}function m(b){return i.containerState.initialBlankLine=!0,s++,w(b)}function y(b){return Ye(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),w):r(b)}function w(b){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function y3(e,n,r){const i=this;return i.containerState._closeFlow=void 0,e.check(ys,l,s);function l(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ze(e,n,"listItemIndent",i.containerState.size+1)(f)}function s(f){return i.containerState.furtherBlankLines||!Ye(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(m3,n,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ze(e,e.attempt(vn,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function v3(e,n,r){const i=this;return Ze(e,l,"listItemIndent",i.containerState.size+1);function l(s){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?n(s):r(s)}}function x3(e){e.exit(this.containerState.type)}function b3(e,n,r){const i=this;return Ze(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(s){const c=i.events[i.events.length-1];return!Ye(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):r(s)}}const d0={name:"setextUnderline",resolveTo:w3,tokenize:S3};function w3(e,n){let r=e.length,i,l,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",s?(e.splice(l,0,["enter",c,n]),e.splice(s+1,0,["exit",e[i][1],n]),e[i][1].end={...e[s][1].end}):e[i][1]=c,e.push(["exit",c,n]),e}function S3(e,n,r){const i=this;let l;return s;function s(h){let m=i.events.length,y;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){y=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),l=h,c(h)):r(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===l?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ye(h)?Ze(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),n(h)):r(h)}}const E3={tokenize:C3};function C3(e){const n=this,r=e.attempt(ys,i,e.attempt(this.parser.constructs.flowInitial,l,Ze(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Nz,l)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function l(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const k3={resolveAll:FE()},A3=HE("string"),T3=HE("text");function HE(e){return{resolveAll:FE(e==="text"?R3:void 0),tokenize:n};function n(r){const i=this,l=this.parser.constructs[e],s=r.attempt(l,c,f);return c;function c(m){return h(m)?s(m):f(m)}function f(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),d}function d(m){return h(m)?(r.exit("data"),s(m)):(r.consume(m),d)}function h(m){if(m===null)return!0;const y=l[m];let w=-1;if(y)for(;++w<y.length;){const b=y[w];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function FE(e){return n;function n(r,i){let l=-1,s;for(;++l<=r.length;)s===void 0?r[l]&&r[l][1].type==="data"&&(s=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==s+2&&(r[s][1].end=r[l-1][1].end,r.splice(s+2,l-s-2),l=s+2),s=void 0);return e?e(r,i):r}}function R3(e,n){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=n.sliceStream(i);let s=l.length,c=-1,f=0,d;for(;s--;){const h=l[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(f=0),f){const h={type:r===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:i.start._bufferIndex+c,_index:i.start._index+s,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(r,0,["enter",h,n],["exit",h,n]),r+=2)}r++}return e}const N3={42:vn,43:vn,45:vn,48:vn,49:vn,50:vn,51:vn,52:vn,53:vn,54:vn,55:vn,56:vn,57:vn,62:OE},_3={91:Oz},M3={[-2]:Hh,[-1]:Hh,32:Hh},j3={35:Uz,42:ic,45:[d0,ic],60:qz,61:d0,95:ic,96:c0,126:c0},D3={38:LE,92:PE},O3={[-5]:Fh,[-4]:Fh,[-3]:Fh,33:s3,38:LE,42:Lp,60:[cz,Zz],91:c3,92:[Iz,PE],93:Fm,95:Lp,96:Ez},P3={null:[Lp,k3]},L3={null:[42,95]},z3={null:[]},I3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:L3,contentInitial:_3,disable:z3,document:N3,flow:j3,flowInitial:M3,insideSpan:P3,string:D3,text:O3},Symbol.toStringTag,{value:"Module"}));function B3(e,n,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},s=[];let c=[],f=[];const d={attempt:H(L),check:H(j),consume:R,enter:N,exit:O,interrupt:H(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:S,parser:e,previous:null,sliceSerialize:w,sliceStream:b,write:y};let m=n.tokenize.call(h,d);return n.resolveAll&&s.push(n),h;function y(Z){return c=Kn(c,Z),T(),c[c.length-1]!==null?[]:($(n,0),h.events=Jc(s,h.events,h),h.events)}function w(Z,J){return H3(b(Z),J)}function b(Z){return U3(c,Z)}function S(){const{_bufferIndex:Z,_index:J,line:ne,column:G,offset:ae}=i;return{_bufferIndex:Z,_index:J,line:ne,column:G,offset:ae}}function E(Z){l[Z.line]=Z.column,D()}function T(){let Z;for(;i._index<c.length;){const J=c[i._index];if(typeof J=="string")for(Z=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===Z&&i._bufferIndex<J.length;)A(J.charCodeAt(i._bufferIndex));else A(J)}}function A(Z){m=m(Z)}function R(Z){Te(Z)?(i.line++,i.column=1,i.offset+=Z===-3?2:1,D()):Z!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=Z}function N(Z,J){const ne=J||{};return ne.type=Z,ne.start=S(),h.events.push(["enter",ne,h]),f.push(ne),ne}function O(Z){const J=f.pop();return J.end=S(),h.events.push(["exit",J,h]),J}function L(Z,J){$(Z,J.from)}function j(Z,J){J.restore()}function H(Z,J){return ne;function ne(G,ae,z){let Q,B,ie,k;return Array.isArray(G)?se(G):"tokenize"in G?se([G]):W(G);function W(pe){return le;function le(ve){const Ve=ve!==null&&pe[ve],De=ve!==null&&pe.null,Be=[...Array.isArray(Ve)?Ve:Ve?[Ve]:[],...Array.isArray(De)?De:De?[De]:[]];return se(Be)(ve)}}function se(pe){return Q=pe,B=0,pe.length===0?z:M(pe[B])}function M(pe){return le;function le(ve){return k=Y(),ie=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?Ee():pe.tokenize.call(J?Object.assign(Object.create(h),J):h,d,ce,Ee)(ve)}}function ce(pe){return Z(ie,k),ae}function Ee(pe){return k.restore(),++B<Q.length?M(Q[B]):z}}}function $(Z,J){Z.resolveAll&&!s.includes(Z)&&s.push(Z),Z.resolve&&Ln(h.events,J,h.events.length-J,Z.resolve(h.events.slice(J),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function Y(){const Z=S(),J=h.previous,ne=h.currentConstruct,G=h.events.length,ae=Array.from(f);return{from:G,restore:z};function z(){i=Z,h.previous=J,h.currentConstruct=ne,h.events.length=G,f=ae,D()}}function D(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function U3(e,n){const r=n.start._index,i=n.start._bufferIndex,l=n.end._index,s=n.end._bufferIndex;let c;if(r===l)c=[e[r].slice(i,s)];else{if(c=e.slice(r,l),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}s>0&&c.push(e[l].slice(0,s))}return c}function H3(e,n){let r=-1;const i=[];let l;for(;++r<e.length;){const s=e[r];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
365
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},pO="DialogDescriptionWarning",mO=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H1(pO).contentName}}.`;return v.useEffect(()=>{const l=e.current?.getAttribute("aria-describedby");n&&l&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},pm=T1,F1=N1,mm=M1,ls=j1,ss=D1,us=P1,cs=z1,Bc=B1;const V1=pm,gO=mm,q1=v.forwardRef(({className:e,...n},r)=>g.jsx(ls,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));q1.displayName=ls.displayName;const yO=Dc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),gm=v.forwardRef(({side:e="right",className:n,children:r,...i},l)=>g.jsxs(gO,{children:[g.jsx(q1,{}),g.jsxs(ss,{ref:l,className:ue(yO({side:e}),n),...i,children:[r,g.jsxs(Bc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(so,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gm.displayName=ss.displayName;const ym=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...n});ym.displayName="SheetHeader";const vm=v.forwardRef(({className:e,...n},r)=>g.jsx(us,{ref:r,className:ue("text-lg font-semibold text-foreground",e),...n}));vm.displayName=us.displayName;const $1=v.forwardRef(({className:e,...n},r)=>g.jsx(cs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));$1.displayName=cs.displayName;function Pb({className:e,...n}){return g.jsx("div",{className:ue("animate-pulse rounded-md bg-muted",e),...n})}const vO=["top","right","bottom","left"],Ma=Math.min,On=Math.max,dc=Math.round,$u=Math.floor,Ar=e=>({x:e,y:e}),xO={left:"right",right:"left",bottom:"top",top:"bottom"},bO={start:"end",end:"start"};function yp(e,n,r){return On(e,Ma(n,r))}function Qr(e,n){return typeof e=="function"?e(n):e}function Zr(e){return e.split("-")[0]}function Ao(e){return e.split("-")[1]}function xm(e){return e==="x"?"y":"x"}function bm(e){return e==="y"?"height":"width"}const wO=new Set(["top","bottom"]);function Cr(e){return wO.has(Zr(e))?"y":"x"}function wm(e){return xm(Cr(e))}function SO(e,n,r){r===void 0&&(r=!1);const i=Ao(e),l=wm(e),s=bm(l);let c=l==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=hc(c)),[c,hc(c)]}function EO(e){const n=hc(e);return[vp(e),n,vp(n)]}function vp(e){return e.replace(/start|end/g,n=>bO[n])}const Lb=["left","right"],zb=["right","left"],CO=["top","bottom"],kO=["bottom","top"];function AO(e,n,r){switch(e){case"top":case"bottom":return r?n?zb:Lb:n?Lb:zb;case"left":case"right":return n?CO:kO;default:return[]}}function TO(e,n,r,i){const l=Ao(e);let s=AO(Zr(e),r==="start",i);return l&&(s=s.map(c=>c+"-"+l),n&&(s=s.concat(s.map(vp)))),s}function hc(e){return e.replace(/left|right|bottom|top/g,n=>xO[n])}function RO(e){return{top:0,right:0,bottom:0,left:0,...e}}function G1(e){return typeof e!="number"?RO(e):{top:e,right:e,bottom:e,left:e}}function pc(e){const{x:n,y:r,width:i,height:l}=e;return{width:i,height:l,top:r,left:n,right:n+i,bottom:r+l,x:n,y:r}}function Ib(e,n,r){let{reference:i,floating:l}=e;const s=Cr(n),c=wm(n),f=bm(c),d=Zr(n),h=s==="y",m=i.x+i.width/2-l.width/2,y=i.y+i.height/2-l.height/2,w=i[f]/2-l[f]/2;let b;switch(d){case"top":b={x:m,y:i.y-l.height};break;case"bottom":b={x:m,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y};break;case"left":b={x:i.x-l.width,y};break;default:b={x:i.x,y:i.y}}switch(Ao(n)){case"start":b[c]-=w*(r&&h?-1:1);break;case"end":b[c]+=w*(r&&h?-1:1);break}return b}const NO=async(e,n,r)=>{const{placement:i="bottom",strategy:l="absolute",middleware:s=[],platform:c}=r,f=s.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(n));let h=await c.getElementRects({reference:e,floating:n,strategy:l}),{x:m,y}=Ib(h,i,d),w=i,b={},S=0;for(let E=0;E<f.length;E++){const{name:T,fn:A}=f[E],{x:R,y:N,data:O,reset:L}=await A({x:m,y,initialPlacement:i,placement:w,strategy:l,middlewareData:b,rects:h,platform:c,elements:{reference:e,floating:n}});m=R??m,y=N??y,b={...b,[T]:{...b[T],...O}},L&&S<=50&&(S++,typeof L=="object"&&(L.placement&&(w=L.placement),L.rects&&(h=L.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:l}):L.rects),{x:m,y}=Ib(h,w,d)),E=-1)}return{x:m,y,placement:w,strategy:l,middlewareData:b}};async function Yl(e,n){var r;n===void 0&&(n={});const{x:i,y:l,platform:s,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:w=!1,padding:b=0}=Qr(n,e),S=G1(b),T=f[w?y==="floating"?"reference":"floating":y],A=pc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(T)))==null||r?T:T.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),R=y==="floating"?{x:i,y:l,width:c.floating.width,height:c.floating.height}:c.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),O=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},L=pc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:R,offsetParent:N,strategy:d}):R);return{top:(A.top-L.top+S.top)/O.y,bottom:(L.bottom-A.bottom+S.bottom)/O.y,left:(A.left-L.left+S.left)/O.x,right:(L.right-A.right+S.right)/O.x}}const _O=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:i,placement:l,rects:s,platform:c,elements:f,middlewareData:d}=n,{element:h,padding:m=0}=Qr(e,n)||{};if(h==null)return{};const y=G1(m),w={x:r,y:i},b=wm(l),S=bm(b),E=await c.getDimensions(h),T=b==="y",A=T?"top":"left",R=T?"bottom":"right",N=T?"clientHeight":"clientWidth",O=s.reference[S]+s.reference[b]-w[b]-s.floating[S],L=w[b]-s.reference[b],j=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let H=j?j[N]:0;(!H||!await(c.isElement==null?void 0:c.isElement(j)))&&(H=f.floating[N]||s.floating[S]);const $=O/2-L/2,Y=H/2-E[S]/2-1,D=Ma(y[A],Y),Z=Ma(y[R],Y),J=D,ne=H-E[S]-Z,G=H/2-E[S]/2+$,ae=yp(J,G,ne),z=!d.arrow&&Ao(l)!=null&&G!==ae&&s.reference[S]/2-(G<J?D:Z)-E[S]/2<0,Q=z?G<J?G-J:G-ne:0;return{[b]:w[b]+Q,data:{[b]:ae,centerOffset:G-ae-Q,...z&&{alignmentOffset:Q}},reset:z}}}),MO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,i;const{placement:l,middlewareData:s,rects:c,initialPlacement:f,platform:d,elements:h}=n,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...T}=Qr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const A=Zr(l),R=Cr(f),N=Zr(f)===f,O=await(d.isRTL==null?void 0:d.isRTL(h.floating)),L=w||(N||!E?[hc(f)]:EO(f)),j=S!=="none";!w&&j&&L.push(...TO(f,E,S,O));const H=[f,...L],$=await Yl(n,T),Y=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(m&&Y.push($[A]),y){const G=SO(l,c,O);Y.push($[G[0]],$[G[1]])}if(D=[...D,{placement:l,overflows:Y}],!Y.every(G=>G<=0)){var Z,J;const G=(((Z=s.flip)==null?void 0:Z.index)||0)+1,ae=H[G];if(ae&&(!(y==="alignment"?R!==Cr(ae):!1)||D.every(B=>Cr(B.placement)===R?B.overflows[0]>0:!0)))return{data:{index:G,overflows:D},reset:{placement:ae}};let z=(J=D.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:J.placement;if(!z)switch(b){case"bestFit":{var ne;const Q=(ne=D.filter(B=>{if(j){const ie=Cr(B.placement);return ie===R||ie==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(ie=>ie>0).reduce((ie,k)=>ie+k,0)]).sort((B,ie)=>B[1]-ie[1])[0])==null?void 0:ne[0];Q&&(z=Q);break}case"initialPlacement":z=f;break}if(l!==z)return{reset:{placement:z}}}return{}}}};function Bb(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Ub(e){return vO.some(n=>e[n]>=0)}const jO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:i="referenceHidden",...l}=Qr(e,n);switch(i){case"referenceHidden":{const s=await Yl(n,{...l,elementContext:"reference"}),c=Bb(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ub(c)}}}case"escaped":{const s=await Yl(n,{...l,altBoundary:!0}),c=Bb(s,r.floating);return{data:{escapedOffsets:c,escaped:Ub(c)}}}default:return{}}}}},Y1=new Set(["left","top"]);async function DO(e,n){const{placement:r,platform:i,elements:l}=e,s=await(i.isRTL==null?void 0:i.isRTL(l.floating)),c=Zr(r),f=Ao(r),d=Cr(r)==="y",h=Y1.has(c)?-1:1,m=s&&d?-1:1,y=Qr(n,e);let{mainAxis:w,crossAxis:b,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof S=="number"&&(b=f==="end"?S*-1:S),d?{x:b*m,y:w*h}:{x:w*h,y:b*m}}const OO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,i;const{x:l,y:s,placement:c,middlewareData:f}=n,d=await DO(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:l+d.x,y:s+d.y,data:{...d,placement:c}}}}},PO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:i,placement:l}=n,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:T=>{let{x:A,y:R}=T;return{x:A,y:R}}},...d}=Qr(e,n),h={x:r,y:i},m=await Yl(n,d),y=Cr(Zr(l)),w=xm(y);let b=h[w],S=h[y];if(s){const T=w==="y"?"top":"left",A=w==="y"?"bottom":"right",R=b+m[T],N=b-m[A];b=yp(R,b,N)}if(c){const T=y==="y"?"top":"left",A=y==="y"?"bottom":"right",R=S+m[T],N=S-m[A];S=yp(R,S,N)}const E=f.fn({...n,[w]:b,[y]:S});return{...E,data:{x:E.x-r,y:E.y-i,enabled:{[w]:s,[y]:c}}}}}},LO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:i,placement:l,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Qr(e,n),m={x:r,y:i},y=Cr(l),w=xm(y);let b=m[w],S=m[y];const E=Qr(f,n),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(d){const N=w==="y"?"height":"width",O=s.reference[w]-s.floating[N]+T.mainAxis,L=s.reference[w]+s.reference[N]-T.mainAxis;b<O?b=O:b>L&&(b=L)}if(h){var A,R;const N=w==="y"?"width":"height",O=Y1.has(Zr(l)),L=s.reference[y]-s.floating[N]+(O&&((A=c.offset)==null?void 0:A[y])||0)+(O?0:T.crossAxis),j=s.reference[y]+s.reference[N]+(O?0:((R=c.offset)==null?void 0:R[y])||0)-(O?T.crossAxis:0);S<L?S=L:S>j&&(S=j)}return{[w]:b,[y]:S}}}},zO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,i;const{placement:l,rects:s,platform:c,elements:f}=n,{apply:d=()=>{},...h}=Qr(e,n),m=await Yl(n,h),y=Zr(l),w=Ao(l),b=Cr(l)==="y",{width:S,height:E}=s.floating;let T,A;y==="top"||y==="bottom"?(T=y,A=w===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(A=y,T=w==="end"?"top":"bottom");const R=E-m.top-m.bottom,N=S-m.left-m.right,O=Ma(E-m[T],R),L=Ma(S-m[A],N),j=!n.middlewareData.shift;let H=O,$=L;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&($=N),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(H=R),j&&!w){const D=On(m.left,0),Z=On(m.right,0),J=On(m.top,0),ne=On(m.bottom,0);b?$=S-2*(D!==0||Z!==0?D+Z:On(m.left,m.right)):H=E-2*(J!==0||ne!==0?J+ne:On(m.top,m.bottom))}await d({...n,availableWidth:$,availableHeight:H});const Y=await c.getDimensions(f.floating);return S!==Y.width||E!==Y.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function To(e){return K1(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Rr(e){var n;return(n=(K1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function K1(e){return Uc()?e instanceof Node||e instanceof Pn(e).Node:!1}function ur(e){return Uc()?e instanceof Element||e instanceof Pn(e).Element:!1}function Tr(e){return Uc()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function Hb(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}const IO=new Set(["inline","contents"]);function fs(e){const{overflow:n,overflowX:r,overflowY:i,display:l}=cr(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!IO.has(l)}const BO=new Set(["table","td","th"]);function UO(e){return BO.has(To(e))}const HO=[":popover-open",":modal"];function Hc(e){return HO.some(n=>{try{return e.matches(n)}catch{return!1}})}const FO=["transform","translate","scale","rotate","perspective"],VO=["transform","translate","scale","rotate","perspective","filter"],qO=["paint","layout","strict","content"];function Sm(e){const n=Em(),r=ur(e)?cr(e):e;return FO.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||VO.some(i=>(r.willChange||"").includes(i))||qO.some(i=>(r.contain||"").includes(i))}function $O(e){let n=ja(e);for(;Tr(n)&&!po(n);){if(Sm(n))return n;if(Hc(n))return null;n=ja(n)}return null}function Em(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const GO=new Set(["html","body","#document"]);function po(e){return GO.has(To(e))}function cr(e){return Pn(e).getComputedStyle(e)}function Fc(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ja(e){if(To(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Hb(e)&&e.host||Rr(e);return Hb(n)?n.host:n}function X1(e){const n=ja(e);return po(n)?e.ownerDocument?e.ownerDocument.body:e.body:Tr(n)&&fs(n)?n:X1(n)}function Kl(e,n,r){var i;n===void 0&&(n=[]),r===void 0&&(r=!0);const l=X1(e),s=l===((i=e.ownerDocument)==null?void 0:i.body),c=Pn(l);if(s){const f=xp(c);return n.concat(c,c.visualViewport||[],fs(l)?l:[],f&&r?Kl(f):[])}return n.concat(l,Kl(l,[],r))}function xp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q1(e){const n=cr(e);let r=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const l=Tr(e),s=l?e.offsetWidth:r,c=l?e.offsetHeight:i,f=dc(r)!==s||dc(i)!==c;return f&&(r=s,i=c),{width:r,height:i,$:f}}function Cm(e){return ur(e)?e:e.contextElement}function co(e){const n=Cm(e);if(!Tr(n))return Ar(1);const r=n.getBoundingClientRect(),{width:i,height:l,$:s}=Q1(n);let c=(s?dc(r.width):r.width)/i,f=(s?dc(r.height):r.height)/l;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const YO=Ar(0);function Z1(e){const n=Pn(e);return!Em()||!n.visualViewport?YO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function KO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Pn(e)?!1:n}function ci(e,n,r,i){n===void 0&&(n=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),s=Cm(e);let c=Ar(1);n&&(i?ur(i)&&(c=co(i)):c=co(e));const f=KO(s,r,i)?Z1(s):Ar(0);let d=(l.left+f.x)/c.x,h=(l.top+f.y)/c.y,m=l.width/c.x,y=l.height/c.y;if(s){const w=Pn(s),b=i&&ur(i)?Pn(i):i;let S=w,E=xp(S);for(;E&&i&&b!==S;){const T=co(E),A=E.getBoundingClientRect(),R=cr(E),N=A.left+(E.clientLeft+parseFloat(R.paddingLeft))*T.x,O=A.top+(E.clientTop+parseFloat(R.paddingTop))*T.y;d*=T.x,h*=T.y,m*=T.x,y*=T.y,d+=N,h+=O,S=Pn(E),E=xp(S)}}return pc({width:m,height:y,x:d,y:h})}function km(e,n){const r=Fc(e).scrollLeft;return n?n.left+r:ci(Rr(e)).left+r}function W1(e,n,r){r===void 0&&(r=!1);const i=e.getBoundingClientRect(),l=i.left+n.scrollLeft-(r?0:km(e,i)),s=i.top+n.scrollTop;return{x:l,y:s}}function XO(e){let{elements:n,rect:r,offsetParent:i,strategy:l}=e;const s=l==="fixed",c=Rr(i),f=n?Hc(n.floating):!1;if(i===c||f&&s)return r;let d={scrollLeft:0,scrollTop:0},h=Ar(1);const m=Ar(0),y=Tr(i);if((y||!y&&!s)&&((To(i)!=="body"||fs(c))&&(d=Fc(i)),Tr(i))){const b=ci(i);h=co(i),m.x=b.x+i.clientLeft,m.y=b.y+i.clientTop}const w=c&&!y&&!s?W1(c,d,!0):Ar(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+m.x+w.x,y:r.y*h.y-d.scrollTop*h.y+m.y+w.y}}function QO(e){return Array.from(e.getClientRects())}function ZO(e){const n=Rr(e),r=Fc(e),i=e.ownerDocument.body,l=On(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=On(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+km(e);const f=-r.scrollTop;return cr(i).direction==="rtl"&&(c+=On(n.clientWidth,i.clientWidth)-l),{width:l,height:s,x:c,y:f}}function WO(e,n){const r=Pn(e),i=Rr(e),l=r.visualViewport;let s=i.clientWidth,c=i.clientHeight,f=0,d=0;if(l){s=l.width,c=l.height;const h=Em();(!h||h&&n==="fixed")&&(f=l.offsetLeft,d=l.offsetTop)}return{width:s,height:c,x:f,y:d}}const JO=new Set(["absolute","fixed"]);function e4(e,n){const r=ci(e,!0,n==="fixed"),i=r.top+e.clientTop,l=r.left+e.clientLeft,s=Tr(e)?co(e):Ar(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,d=l*s.x,h=i*s.y;return{width:c,height:f,x:d,y:h}}function Fb(e,n,r){let i;if(n==="viewport")i=WO(e,r);else if(n==="document")i=ZO(Rr(e));else if(ur(n))i=e4(n,r);else{const l=Z1(e);i={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return pc(i)}function J1(e,n){const r=ja(e);return r===n||!ur(r)||po(r)?!1:cr(r).position==="fixed"||J1(r,n)}function t4(e,n){const r=n.get(e);if(r)return r;let i=Kl(e,[],!1).filter(f=>ur(f)&&To(f)!=="body"),l=null;const s=cr(e).position==="fixed";let c=s?ja(e):e;for(;ur(c)&&!po(c);){const f=cr(c),d=Sm(c);!d&&f.position==="fixed"&&(l=null),(s?!d&&!l:!d&&f.position==="static"&&!!l&&JO.has(l.position)||fs(c)&&!d&&J1(e,c))?i=i.filter(m=>m!==c):l=f,c=ja(c)}return n.set(e,i),i}function n4(e){let{element:n,boundary:r,rootBoundary:i,strategy:l}=e;const c=[...r==="clippingAncestors"?Hc(n)?[]:t4(n,this._c):[].concat(r),i],f=c[0],d=c.reduce((h,m)=>{const y=Fb(n,m,l);return h.top=On(y.top,h.top),h.right=Ma(y.right,h.right),h.bottom=Ma(y.bottom,h.bottom),h.left=On(y.left,h.left),h},Fb(n,f,l));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function r4(e){const{width:n,height:r}=Q1(e);return{width:n,height:r}}function a4(e,n,r){const i=Tr(n),l=Rr(n),s=r==="fixed",c=ci(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const d=Ar(0);function h(){d.x=km(l)}if(i||!i&&!s)if((To(n)!=="body"||fs(l))&&(f=Fc(n)),i){const b=ci(n,!0,s,n);d.x=b.x+n.clientLeft,d.y=b.y+n.clientTop}else l&&h();s&&!i&&l&&h();const m=l&&!i&&!s?W1(l,f):Ar(0),y=c.left+f.scrollLeft-d.x-m.x,w=c.top+f.scrollTop-d.y-m.y;return{x:y,y:w,width:c.width,height:c.height}}function Ph(e){return cr(e).position==="static"}function Vb(e,n){if(!Tr(e)||cr(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return Rr(e)===r&&(r=r.ownerDocument.body),r}function eS(e,n){const r=Pn(e);if(Hc(e))return r;if(!Tr(e)){let l=ja(e);for(;l&&!po(l);){if(ur(l)&&!Ph(l))return l;l=ja(l)}return r}let i=Vb(e,n);for(;i&&UO(i)&&Ph(i);)i=Vb(i,n);return i&&po(i)&&Ph(i)&&!Sm(i)?r:i||$O(e)||r}const i4=async function(e){const n=this.getOffsetParent||eS,r=this.getDimensions,i=await r(e.floating);return{reference:a4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function o4(e){return cr(e).direction==="rtl"}const l4={convertOffsetParentRelativeRectToViewportRelativeRect:XO,getDocumentElement:Rr,getClippingRect:n4,getOffsetParent:eS,getElementRects:i4,getClientRects:QO,getDimensions:r4,getScale:co,isElement:ur,isRTL:o4};function tS(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function s4(e,n){let r=null,i;const l=Rr(e);function s(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:m,top:y,width:w,height:b}=h;if(f||n(),!w||!b)return;const S=$u(y),E=$u(l.clientWidth-(m+w)),T=$u(l.clientHeight-(y+b)),A=$u(m),N={rootMargin:-S+"px "+-E+"px "+-T+"px "+-A+"px",threshold:On(0,Ma(1,d))||1};let O=!0;function L(j){const H=j[0].intersectionRatio;if(H!==d){if(!O)return c();H?c(!1,H):i=setTimeout(()=>{c(!1,1e-7)},1e3)}H===1&&!tS(h,e.getBoundingClientRect())&&c(),O=!1}try{r=new IntersectionObserver(L,{...N,root:l.ownerDocument})}catch{r=new IntersectionObserver(L,N)}r.observe(e)}return c(!0),s}function u4(e,n,r,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=Cm(e),m=l||s?[...h?Kl(h):[],...Kl(n)]:[];m.forEach(A=>{l&&A.addEventListener("scroll",r,{passive:!0}),s&&A.addEventListener("resize",r)});const y=h&&f?s4(h,r):null;let w=-1,b=null;c&&(b=new ResizeObserver(A=>{let[R]=A;R&&R.target===h&&b&&(b.unobserve(n),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var N;(N=b)==null||N.observe(n)})),r()}),h&&!d&&b.observe(h),b.observe(n));let S,E=d?ci(e):null;d&&T();function T(){const A=ci(e);E&&!tS(E,A)&&r(),E=A,S=requestAnimationFrame(T)}return r(),()=>{var A;m.forEach(R=>{l&&R.removeEventListener("scroll",r),s&&R.removeEventListener("resize",r)}),y?.(),(A=b)==null||A.disconnect(),b=null,d&&cancelAnimationFrame(S)}}const c4=OO,f4=PO,d4=MO,h4=zO,p4=jO,qb=_O,m4=LO,g4=(e,n,r)=>{const i=new Map,l={platform:l4,...r},s={...l.platform,_c:i};return NO(e,n,{...l,platform:s})};var y4=typeof document<"u",v4=function(){},rc=y4?v.useLayoutEffect:v4;function mc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,i,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(i=r;i--!==0;)if(!mc(e[i],n[i]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(n,l[i]))return!1;for(i=r;i--!==0;){const s=l[i];if(!(s==="_owner"&&e.$$typeof)&&!mc(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function nS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $b(e,n){const r=nS(e);return Math.round(n*r)/r}function Lh(e){const n=v.useRef(e);return rc(()=>{n.current=e}),n}function x4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:l,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,y]=v.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[w,b]=v.useState(i);mc(w,i)||b(i);const[S,E]=v.useState(null),[T,A]=v.useState(null),R=v.useCallback(B=>{B!==j.current&&(j.current=B,E(B))},[]),N=v.useCallback(B=>{B!==H.current&&(H.current=B,A(B))},[]),O=s||S,L=c||T,j=v.useRef(null),H=v.useRef(null),$=v.useRef(m),Y=d!=null,D=Lh(d),Z=Lh(l),J=Lh(h),ne=v.useCallback(()=>{if(!j.current||!H.current)return;const B={placement:n,strategy:r,middleware:w};Z.current&&(B.platform=Z.current),g4(j.current,H.current,B).then(ie=>{const k={...ie,isPositioned:J.current!==!1};G.current&&!mc($.current,k)&&($.current=k,wo.flushSync(()=>{y(k)}))})},[w,n,r,Z,J]);rc(()=>{h===!1&&$.current.isPositioned&&($.current.isPositioned=!1,y(B=>({...B,isPositioned:!1})))},[h]);const G=v.useRef(!1);rc(()=>(G.current=!0,()=>{G.current=!1}),[]),rc(()=>{if(O&&(j.current=O),L&&(H.current=L),O&&L){if(D.current)return D.current(O,L,ne);ne()}},[O,L,ne,D,Y]);const ae=v.useMemo(()=>({reference:j,floating:H,setReference:R,setFloating:N}),[R,N]),z=v.useMemo(()=>({reference:O,floating:L}),[O,L]),Q=v.useMemo(()=>{const B={position:r,left:0,top:0};if(!z.floating)return B;const ie=$b(z.floating,m.x),k=$b(z.floating,m.y);return f?{...B,transform:"translate("+ie+"px, "+k+"px)",...nS(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ie,top:k}},[r,f,z.floating,m.x,m.y]);return v.useMemo(()=>({...m,update:ne,refs:ae,elements:z,floatingStyles:Q}),[m,ne,ae,z,Q])}const b4=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:l}=typeof e=="function"?e(r):e;return i&&n(i)?i.current!=null?qb({element:i.current,padding:l}).fn(r):{}:i?qb({element:i,padding:l}).fn(r):{}}}},w4=(e,n)=>({...c4(e),options:[e,n]}),S4=(e,n)=>({...f4(e),options:[e,n]}),E4=(e,n)=>({...m4(e),options:[e,n]}),C4=(e,n)=>({...d4(e),options:[e,n]}),k4=(e,n)=>({...h4(e),options:[e,n]}),A4=(e,n)=>({...p4(e),options:[e,n]}),T4=(e,n)=>({...b4(e),options:[e,n]});var R4="Arrow",rS=v.forwardRef((e,n)=>{const{children:r,width:i=10,height:l=5,...s}=e;return g.jsx(_e.svg,{...s,ref:n,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});rS.displayName=R4;var N4=rS;function aS(e){const[n,r]=v.useState(void 0);return $t(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let c,f;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),n}var Am="Popper",[iS,Ro]=Jn(Am),[_4,oS]=iS(Am),lS=e=>{const{__scopePopper:n,children:r}=e,[i,l]=v.useState(null);return g.jsx(_4,{scope:n,anchor:i,onAnchorChange:l,children:r})};lS.displayName=Am;var sS="PopperAnchor",uS=v.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:i,...l}=e,s=oS(sS,r),c=v.useRef(null),f=ze(n,c),d=v.useRef(null);return v.useEffect(()=>{const h=d.current;d.current=i?.current||c.current,h!==d.current&&s.onAnchorChange(d.current)}),i?null:g.jsx(_e.div,{...l,ref:f})});uS.displayName=sS;var Tm="PopperContent",[M4,j4]=iS(Tm),cS=v.forwardRef((e,n)=>{const{__scopePopper:r,side:i="bottom",sideOffset:l=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:w=!1,updatePositionStrategy:b="optimized",onPlaced:S,...E}=e,T=oS(Tm,r),[A,R]=v.useState(null),N=ze(n,le=>R(le)),[O,L]=v.useState(null),j=aS(O),H=j?.width??0,$=j?.height??0,Y=i+(s!=="center"?"-"+s:""),D=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Z=Array.isArray(h)?h:[h],J=Z.length>0,ne={padding:D,boundary:Z.filter(O4),altBoundary:J},{refs:G,floatingStyles:ae,placement:z,isPositioned:Q,middlewareData:B}=x4({strategy:"fixed",placement:Y,whileElementsMounted:(...le)=>u4(...le,{animationFrame:b==="always"}),elements:{reference:T.anchor},middleware:[w4({mainAxis:l+$,alignmentAxis:c}),d&&S4({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?E4():void 0,...ne}),d&&C4({...ne}),k4({...ne,apply:({elements:le,rects:ve,availableWidth:Ve,availableHeight:De})=>{const{width:Be,height:We}=ve.reference,Ke=le.floating.style;Ke.setProperty("--radix-popper-available-width",`${Ve}px`),Ke.setProperty("--radix-popper-available-height",`${De}px`),Ke.setProperty("--radix-popper-anchor-width",`${Be}px`),Ke.setProperty("--radix-popper-anchor-height",`${We}px`)}}),O&&T4({element:O,padding:f}),P4({arrowWidth:H,arrowHeight:$}),w&&A4({strategy:"referenceHidden",...ne})]}),[ie,k]=hS(z),W=Tt(S);$t(()=>{Q&&W?.()},[Q,W]);const se=B.arrow?.x,M=B.arrow?.y,ce=B.arrow?.centerOffset!==0,[Ee,pe]=v.useState();return $t(()=>{A&&pe(window.getComputedStyle(A).zIndex)},[A]),g.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:Q?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(M4,{scope:r,placedSide:ie,onArrowChange:L,arrowX:se,arrowY:M,shouldHideArrow:ce,children:g.jsx(_e.div,{"data-side":ie,"data-align":k,...E,ref:N,style:{...E.style,animation:Q?void 0:"none"}})})})});cS.displayName=Tm;var fS="PopperArrow",D4={top:"bottom",right:"left",bottom:"top",left:"right"},dS=v.forwardRef(function(n,r){const{__scopePopper:i,...l}=n,s=j4(fS,i),c=D4[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(N4,{...l,ref:r,style:{...l.style,display:"block"}})})});dS.displayName=fS;function O4(e){return e!==null}var P4=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:i,middlewareData:l}=n,c=l.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[h,m]=hS(r),y={start:"0%",center:"50%",end:"100%"}[m],w=(l.arrow?.x??0)+f/2,b=(l.arrow?.y??0)+d/2;let S="",E="";return h==="bottom"?(S=c?y:`${w}px`,E=`${-d}px`):h==="top"?(S=c?y:`${w}px`,E=`${i.floating.height+d}px`):h==="right"?(S=`${-d}px`,E=c?y:`${b}px`):h==="left"&&(S=`${i.floating.width+d}px`,E=c?y:`${b}px`),{data:{x:S,y:E}}}});function hS(e){const[n,r="center"]=e.split("-");return[n,r]}var Rm=lS,Nm=uS,_m=cS,Mm=dS,[Vc,tH]=Jn("Tooltip",[Ro]),qc=Ro(),pS="TooltipProvider",L4=700,bp="tooltip.open",[z4,jm]=Vc(pS),mS=e=>{const{__scopeTooltip:n,delayDuration:r=L4,skipDelayDuration:i=300,disableHoverableContent:l=!1,children:s}=e,c=v.useRef(!0),f=v.useRef(!1),d=v.useRef(0);return v.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),g.jsx(z4,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:v.useCallback(h=>{f.current=h},[]),disableHoverableContent:l,children:s})};mS.displayName=pS;var Xl="Tooltip",[I4,$c]=Vc(Xl),gS=e=>{const{__scopeTooltip:n,children:r,open:i,defaultOpen:l,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,d=jm(Xl,e.__scopeTooltip),h=qc(n),[m,y]=v.useState(null),w=kr(),b=v.useRef(0),S=c??d.disableHoverableContent,E=f??d.delayDuration,T=v.useRef(!1),[A,R]=_a({prop:i,defaultProp:l??!1,onChange:H=>{H?(d.onOpen(),document.dispatchEvent(new CustomEvent(bp))):d.onClose(),s?.(H)},caller:Xl}),N=v.useMemo(()=>A?T.current?"delayed-open":"instant-open":"closed",[A]),O=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T.current=!1,R(!0)},[R]),L=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,R(!1)},[R]),j=v.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{T.current=!0,R(!0),b.current=0},E)},[E,R]);return v.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),g.jsx(Rm,{...h,children:g.jsx(I4,{scope:n,contentId:w,open:A,stateAttribute:N,trigger:m,onTriggerChange:y,onTriggerEnter:v.useCallback(()=>{d.isOpenDelayedRef.current?j():O()},[d.isOpenDelayedRef,j,O]),onTriggerLeave:v.useCallback(()=>{S?L():(window.clearTimeout(b.current),b.current=0)},[L,S]),onOpen:O,onClose:L,disableHoverableContent:S,children:r})})};gS.displayName=Xl;var wp="TooltipTrigger",yS=v.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=$c(wp,r),s=jm(wp,r),c=qc(r),f=v.useRef(null),d=ze(n,f,l.onTriggerChange),h=v.useRef(!1),m=v.useRef(!1),y=v.useCallback(()=>h.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(Nm,{asChild:!0,...c,children:g.jsx(_e.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:d,onPointerMove:me(e.onPointerMove,w=>{w.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:me(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:me(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:me(e.onBlur,l.onClose),onClick:me(e.onClick,l.onClose)})})});yS.displayName=wp;var B4="TooltipPortal",[nH,U4]=Vc(B4,{forceMount:void 0}),mo="TooltipContent",vS=v.forwardRef((e,n)=>{const r=U4(mo,e.__scopeTooltip),{forceMount:i=r.forceMount,side:l="top",...s}=e,c=$c(mo,e.__scopeTooltip);return g.jsx(un,{present:i||c.open,children:c.disableHoverableContent?g.jsx(xS,{side:l,...s,ref:n}):g.jsx(H4,{side:l,...s,ref:n})})}),H4=v.forwardRef((e,n)=>{const r=$c(mo,e.__scopeTooltip),i=jm(mo,e.__scopeTooltip),l=v.useRef(null),s=ze(n,l),[c,f]=v.useState(null),{trigger:d,onClose:h}=r,m=l.current,{onPointerInTransitChange:y}=i,w=v.useCallback(()=>{f(null),y(!1)},[y]),b=v.useCallback((S,E)=>{const T=S.currentTarget,A={x:S.clientX,y:S.clientY},R=G4(A,T.getBoundingClientRect()),N=Y4(A,R),O=K4(E.getBoundingClientRect()),L=Q4([...N,...O]);f(L),y(!0)},[y]);return v.useEffect(()=>()=>w(),[w]),v.useEffect(()=>{if(d&&m){const S=T=>b(T,m),E=T=>b(T,d);return d.addEventListener("pointerleave",S),m.addEventListener("pointerleave",E),()=>{d.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",E)}}},[d,m,b,w]),v.useEffect(()=>{if(c){const S=E=>{const T=E.target,A={x:E.clientX,y:E.clientY},R=d?.contains(T)||m?.contains(T),N=!X4(A,c);R?w():N&&(w(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,m,c,h,w]),g.jsx(xS,{...e,ref:s})}),[F4,V4]=Vc(Xl,{isInside:!1}),q4=bw("TooltipContent"),xS=v.forwardRef((e,n)=>{const{__scopeTooltip:r,children:i,"aria-label":l,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,d=$c(mo,r),h=qc(r),{onClose:m}=d;return v.useEffect(()=>(document.addEventListener(bp,m),()=>document.removeEventListener(bp,m)),[m]),v.useEffect(()=>{if(d.trigger){const y=w=>{w.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[d.trigger,m]),g.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:m,children:g.jsxs(_m,{"data-state":d.stateAttribute,...h,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(q4,{children:i}),g.jsx(F4,{scope:r,isInside:!0,children:g.jsx(S_,{id:d.contentId,role:"tooltip",children:l||i})})]})})});vS.displayName=mo;var bS="TooltipArrow",$4=v.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=qc(r);return V4(bS,r).isInside?null:g.jsx(Mm,{...l,...i,ref:n})});$4.displayName=bS;function G4(e,n){const r=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),l=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,i,l,s)){case s:return"left";case l:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function Y4(e,n,r=5){const i=[];switch(n){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return i}function K4(e){const{top:n,right:r,bottom:i,left:l}=e;return[{x:l,y:n},{x:r,y:n},{x:r,y:i},{x:l,y:i}]}function X4(e,n){const{x:r,y:i}=e;let l=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,m=f.y,y=d.x,w=d.y;m>i!=w>i&&r<(y-h)*(i-m)/(w-m)+h&&(l=!l)}return l}function Q4(e){const n=e.slice();return n.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),Z4(n)}function Z4(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const l=e[i];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))n.pop();else break}n.push(l)}n.pop();const r=[];for(let i=e.length-1;i>=0;i--){const l=e[i];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))r.pop();else break}r.push(l)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var W4=mS,J4=gS,eP=yS,wS=vS;const tP=W4,nP=J4,rP=eP,SS=v.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(wS,{ref:i,sideOffset:n,className:ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));SS.displayName=wS.displayName;const aP="sidebar_state",iP=3600*24*7,oP="16rem",lP="18rem",sP="3rem",uP="b",ES=v.createContext(null);function Gc(){const e=v.useContext(ES);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const CS=v.forwardRef(({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:l,children:s,...c},f)=>{const d=f1(),[h,m]=v.useState(!1),[y,w]=v.useState(e),b=n??y,S=v.useCallback(R=>{const N=typeof R=="function"?R(b):R;r?r(N):w(N),document.cookie=`${aP}=${N}; path=/; max-age=${iP}`},[r,b]),E=v.useCallback(()=>d?m(R=>!R):S(R=>!R),[d,S,m]);v.useEffect(()=>{const R=N=>{N.key===uP&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),E())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[E]);const T=b?"expanded":"collapsed",A=v.useMemo(()=>({state:T,open:b,setOpen:S,isMobile:d,openMobile:h,setOpenMobile:m,toggleSidebar:E}),[T,b,S,d,h,m,E]);return g.jsx(ES.Provider,{value:A,children:g.jsx(tP,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":oP,"--sidebar-width-icon":sP,...l},className:ue("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:f,...c,children:s})})})});CS.displayName="SidebarProvider";const kS=v.forwardRef(({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:i,children:l,...s},c)=>{const{isMobile:f,state:d,openMobile:h,setOpenMobile:m}=Gc();return r==="none"?g.jsx("div",{className:ue("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:c,...s,children:l}):f?g.jsx(V1,{open:h,onOpenChange:m,...s,children:g.jsxs(gm,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":lP},side:e,children:[g.jsxs(ym,{className:"sr-only",children:[g.jsx(vm,{children:"Sidebar"}),g.jsx($1,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:l})]})}):g.jsxs("div",{ref:c,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?r:"","data-variant":n,"data-side":e,children:[g.jsx("div",{className:ue("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),g.jsx("div",{className:ue("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:l})})]})});kS.displayName="Sidebar";const AS=v.forwardRef(({className:e,onClick:n,...r},i)=>{const{toggleSidebar:l}=Gc();return g.jsxs(vt,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:ue("h-7 w-7",e),onClick:s=>{n?.(s),l()},...r,children:[g.jsx(qM,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});AS.displayName="SidebarTrigger";const cP=v.forwardRef(({className:e,...n},r)=>{const{toggleSidebar:i}=Gc();return g.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:ue("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})});cP.displayName="SidebarRail";const TS=v.forwardRef(({className:e,...n},r)=>g.jsx("main",{ref:r,className:ue("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...n}));TS.displayName="SidebarInset";const fP=v.forwardRef(({className:e,...n},r)=>g.jsx(d1,{ref:r,"data-sidebar":"input",className:ue("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...n}));fP.displayName="SidebarInput";const RS=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"header",className:ue("flex flex-col gap-2 p-2",e),...n}));RS.displayName="SidebarHeader";const NS=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"footer",className:ue("flex flex-col gap-2 p-2",e),...n}));NS.displayName="SidebarFooter";const dP=v.forwardRef(({className:e,...n},r)=>g.jsx(m1,{ref:r,"data-sidebar":"separator",className:ue("mx-2 w-auto bg-sidebar-border",e),...n}));dP.displayName="SidebarSeparator";const _S=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"content",className:ue("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n}));_S.displayName="SidebarContent";const Ol=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group",className:ue("relative flex w-full min-w-0 flex-col p-2",e),...n}));Ol.displayName="SidebarGroup";const ac=v.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?So:"div";return g.jsx(l,{ref:i,"data-sidebar":"group-label",className:ue("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});ac.displayName="SidebarGroupLabel";const hP=v.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?So:"button";return g.jsx(l,{ref:i,"data-sidebar":"group-action",className:ue("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});hP.displayName="SidebarGroupAction";const Pl=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group-content",className:ue("w-full text-sm",e),...n}));Pl.displayName="SidebarGroupContent";const ai=v.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu",className:ue("flex w-full min-w-0 flex-col gap-1",e),...n}));ai.displayName="SidebarMenu";const ii=v.forwardRef(({className:e,...n},r)=>g.jsx("li",{ref:r,"data-sidebar":"menu-item",className:ue("group/menu-item relative",e),...n}));ii.displayName="SidebarMenuItem";const pP=Dc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),oi=v.forwardRef(({asChild:e=!1,isActive:n=!1,variant:r="default",size:i="default",tooltip:l,className:s,...c},f)=>{const d=e?So:"button",{isMobile:h,state:m}=Gc(),y=g.jsx(d,{ref:f,"data-sidebar":"menu-button","data-size":i,"data-active":n,className:ue(pP({variant:r,size:i}),s),...c});return l?(typeof l=="string"&&(l={children:l}),g.jsxs(nP,{children:[g.jsx(rP,{asChild:!0,children:y}),g.jsx(SS,{side:"right",align:"center",hidden:m!=="collapsed"||h,...l})]})):y});oi.displayName="SidebarMenuButton";const mP=v.forwardRef(({className:e,asChild:n=!1,showOnHover:r=!1,...i},l)=>{const s=n?So:"button";return g.jsx(s,{ref:l,"data-sidebar":"menu-action",className:ue("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});mP.displayName="SidebarMenuAction";const Sp=v.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:ue("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...n}));Sp.displayName="SidebarMenuBadge";const gP=v.forwardRef(({className:e,showIcon:n=!1,...r},i)=>{const l=v.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:ue("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[n&&g.jsx(Pb,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(Pb,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":l}})]})});gP.displayName="SidebarMenuSkeleton";const yP=v.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:ue("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...n}));yP.displayName="SidebarMenuSub";const vP=v.forwardRef(({...e},n)=>g.jsx("li",{ref:n,...e}));vP.displayName="SidebarMenuSubItem";const xP=v.forwardRef(({asChild:e=!1,size:n="md",isActive:r,className:i,...l},s)=>{const c=e?So:"a";return g.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:ue("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...l})});xP.displayName="SidebarMenuSubButton";const bP="1.0.74",wP={version:bP};function SP({className:e}){return g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[g.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),g.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),g.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),g.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const EP=[{title:"Home",url:"/",icon:TM},{title:"Role",url:"/context/role",icon:yj},{title:"Skills",url:"/agents",icon:sM}],CP=[{title:"Tasks",url:"/proposals",icon:Kw},{title:"Agents",url:"/code",icon:Ul},{title:"Jobs",url:"/schedule",icon:W_},{title:"Utilities",url:"/utilities",icon:wj}],kP=[{title:"Overview",url:"/context/project",icon:uc},{title:"Architecture",url:"/context/architecture",icon:WM},{title:"Knowledge",url:"/context/knowledge",icon:Q_},{title:"Resources",url:"/resources",icon:wM}],AP=[{title:"Source Control",url:"/git",icon:Xw},{title:"Terminal",url:"/terminal",icon:fj},{title:"Identity",url:"/identity",icon:NM},{title:"Activity",url:"/activity",icon:Y_}],TP=[{title:"Documentation",url:"https://docs.coconut.dev/studio",icon:FM,external:!0},{title:"Settings",url:"/settings/user",icon:ej}];function RP(){const{badges:e}=qN();return g.jsxs(kS,{className:"bg-sidebar border-r border-sidebar-border",children:[g.jsx(RS,{children:g.jsx(ai,{children:g.jsx(ii,{children:g.jsx(oi,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:g.jsxs(Sr,{to:"/",children:[g.jsx(SP,{className:"size-8"}),g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs("span",{className:"font-semibold",children:[g.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),g.jsx("span",{children:" Studio"})]}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",wP.version]})]})]})})})})}),g.jsxs(_S,{children:[g.jsx(Ol,{children:g.jsx(Pl,{children:g.jsx(ai,{children:EP.map(n=>g.jsx(ii,{children:g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})}),g.jsxs(Ol,{children:[g.jsx(ac,{children:"Work"}),g.jsx(Pl,{children:g.jsx(ai,{children:CP.map(n=>{let r=0;return n.title==="Code"&&e.codeSessions>0?r=e.codeSessions:n.title==="Schedule"&&e.runningScheduledJobs>0&&(r=e.runningScheduledJobs),g.jsxs(ii,{children:[g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),r>0&&g.jsx(Sp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:r})]},n.title)})})})]}),g.jsxs(Ol,{children:[g.jsx(ac,{children:"Assets"}),g.jsx(Pl,{children:g.jsx(ai,{children:kP.map(n=>g.jsx(ii,{children:g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]}),g.jsxs(Ol,{children:[g.jsx(ac,{children:"System"}),g.jsx(Pl,{children:g.jsx(ai,{children:AP.map(n=>{let r=0;return n.title==="Source Control"&&e.gitChanges>0?r=e.gitChanges:n.title==="Terminal"&&e.terminalSessions>0&&(r=e.terminalSessions),g.jsxs(ii,{children:[g.jsx(oi,{asChild:!0,children:g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),r>0&&g.jsx(Sp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:r})]},n.title)})})})]})]}),g.jsx(NS,{children:g.jsx(ai,{children:TP.map(n=>g.jsx(ii,{children:g.jsx(oi,{asChild:!0,children:n.external?g.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]}):g.jsxs(Sr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]})}function Ep(e,[n,r]){return Math.min(r,Math.max(n,e))}var NP=v.createContext(void 0);function Yc(e){const n=v.useContext(NP);return e||n||"ltr"}function MS(e){const n=v.useRef({value:e,previous:e});return v.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var _P=[" ","Enter","ArrowUp","ArrowDown"],MP=[" ","Enter"],fi="Select",[Kc,Xc,jP]=_c(fi),[No,rH]=Jn(fi,[jP,Ro]),Qc=Ro(),[DP,Da]=No(fi),[OP,PP]=No(fi),jS=e=>{const{__scopeSelect:n,children:r,open:i,defaultOpen:l,onOpenChange:s,value:c,defaultValue:f,onValueChange:d,dir:h,name:m,autoComplete:y,disabled:w,required:b,form:S}=e,E=Qc(n),[T,A]=v.useState(null),[R,N]=v.useState(null),[O,L]=v.useState(!1),j=Yc(h),[H,$]=_a({prop:i,defaultProp:l??!1,onChange:s,caller:fi}),[Y,D]=_a({prop:c,defaultProp:f,onChange:d,caller:fi}),Z=v.useRef(null),J=T?S||!!T.closest("form"):!0,[ne,G]=v.useState(new Set),ae=Array.from(ne).map(z=>z.props.value).join(";");return g.jsx(Rm,{...E,children:g.jsxs(DP,{required:b,scope:n,trigger:T,onTriggerChange:A,valueNode:R,onValueNodeChange:N,valueNodeHasChildren:O,onValueNodeHasChildrenChange:L,contentId:kr(),value:Y,onValueChange:D,open:H,onOpenChange:$,dir:j,triggerPointerDownPosRef:Z,disabled:w,children:[g.jsx(Kc.Provider,{scope:n,children:g.jsx(OP,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(z=>{G(Q=>new Set(Q).add(z))},[]),onNativeOptionRemove:v.useCallback(z=>{G(Q=>{const B=new Set(Q);return B.delete(z),B})},[]),children:r})}),J?g.jsxs(nE,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:y,value:Y,onChange:z=>D(z.target.value),disabled:w,form:S,children:[Y===void 0?g.jsx("option",{value:""}):null,Array.from(ne)]},ae):null]})})};jS.displayName=fi;var DS="SelectTrigger",OS=v.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:i=!1,...l}=e,s=Qc(r),c=Da(DS,r),f=c.disabled||i,d=ze(n,c.onTriggerChange),h=Xc(r),m=v.useRef("touch"),[y,w,b]=aE(E=>{const T=h().filter(N=>!N.disabled),A=T.find(N=>N.value===c.value),R=iE(T,E,A);R!==void 0&&c.onValueChange(R.value)}),S=E=>{f||(c.onOpenChange(!0),b()),E&&(c.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return g.jsx(Nm,{asChild:!0,...s,children:g.jsx(_e.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":rE(c.value)?"":void 0,...l,ref:d,onClick:me(l.onClick,E=>{E.currentTarget.focus(),m.current!=="mouse"&&S(E)}),onPointerDown:me(l.onPointerDown,E=>{m.current=E.pointerType;const T=E.target;T.hasPointerCapture(E.pointerId)&&T.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(S(E),E.preventDefault())}),onKeyDown:me(l.onKeyDown,E=>{const T=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&w(E.key),!(T&&E.key===" ")&&_P.includes(E.key)&&(S(),E.preventDefault())})})})});OS.displayName=DS;var PS="SelectValue",LS=v.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,children:s,placeholder:c="",...f}=e,d=Da(PS,r),{onValueNodeHasChildrenChange:h}=d,m=s!==void 0,y=ze(n,d.onValueNodeChange);return $t(()=>{h(m)},[h,m]),g.jsx(_e.span,{...f,ref:y,style:{pointerEvents:"none"},children:rE(d.value)?g.jsx(g.Fragment,{children:c}):s})});LS.displayName=PS;var LP="SelectIcon",zS=v.forwardRef((e,n)=>{const{__scopeSelect:r,children:i,...l}=e;return g.jsx(_e.span,{"aria-hidden":!0,...l,ref:n,children:i||"▼"})});zS.displayName=LP;var zP="SelectPortal",IS=e=>g.jsx(is,{asChild:!0,...e});IS.displayName=zP;var di="SelectContent",BS=v.forwardRef((e,n)=>{const r=Da(di,e.__scopeSelect),[i,l]=v.useState();if($t(()=>{l(new DocumentFragment)},[]),!r.open){const s=i;return s?wo.createPortal(g.jsx(US,{scope:e.__scopeSelect,children:g.jsx(Kc.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(HS,{...e,ref:n})});BS.displayName=di;var or=10,[US,Oa]=No(di),IP="SelectContentImpl",BP=si("SelectContent.RemoveScroll"),HS=v.forwardRef((e,n)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:s,onPointerDownOutside:c,side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:S,hideWhenDetached:E,avoidCollisions:T,...A}=e,R=Da(di,r),[N,O]=v.useState(null),[L,j]=v.useState(null),H=ze(n,le=>O(le)),[$,Y]=v.useState(null),[D,Z]=v.useState(null),J=Xc(r),[ne,G]=v.useState(!1),ae=v.useRef(!1);v.useEffect(()=>{if(N)return cm(N)},[N]),um();const z=v.useCallback(le=>{const[ve,...Ve]=J().map(We=>We.ref.current),[De]=Ve.slice(-1),Be=document.activeElement;for(const We of le)if(We===Be||(We?.scrollIntoView({block:"nearest"}),We===ve&&L&&(L.scrollTop=0),We===De&&L&&(L.scrollTop=L.scrollHeight),We?.focus(),document.activeElement!==Be))return},[J,L]),Q=v.useCallback(()=>z([$,N]),[z,$,N]);v.useEffect(()=>{ne&&Q()},[ne,Q]);const{onOpenChange:B,triggerPointerDownPosRef:ie}=R;v.useEffect(()=>{if(N){let le={x:0,y:0};const ve=De=>{le={x:Math.abs(Math.round(De.pageX)-(ie.current?.x??0)),y:Math.abs(Math.round(De.pageY)-(ie.current?.y??0))}},Ve=De=>{le.x<=10&&le.y<=10?De.preventDefault():N.contains(De.target)||B(!1),document.removeEventListener("pointermove",ve),ie.current=null};return ie.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",Ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",Ve,{capture:!0})}}},[N,B,ie]),v.useEffect(()=>{const le=()=>B(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[B]);const[k,W]=aE(le=>{const ve=J().filter(Be=>!Be.disabled),Ve=ve.find(Be=>Be.ref.current===document.activeElement),De=iE(ve,le,Ve);De&&setTimeout(()=>De.ref.current.focus())}),se=v.useCallback((le,ve,Ve)=>{const De=!ae.current&&!Ve;(R.value!==void 0&&R.value===ve||De)&&(Y(le),De&&(ae.current=!0))},[R.value]),M=v.useCallback(()=>N?.focus(),[N]),ce=v.useCallback((le,ve,Ve)=>{const De=!ae.current&&!Ve;(R.value!==void 0&&R.value===ve||De)&&Z(le)},[R.value]),Ee=i==="popper"?Cp:FS,pe=Ee===Cp?{side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:S,hideWhenDetached:E,avoidCollisions:T}:{};return g.jsx(US,{scope:r,content:N,viewport:L,onViewportChange:j,itemRefCallback:se,selectedItem:$,onItemLeave:M,itemTextRefCallback:ce,focusSelectedItem:Q,selectedItemText:D,position:i,isPositioned:ne,searchRef:k,children:g.jsx(zc,{as:BP,allowPinchZoom:!0,children:g.jsx(Pc,{asChild:!0,trapped:R.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:me(l,le=>{R.trigger?.focus({preventScroll:!0}),le.preventDefault()}),children:g.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:g.jsx(Ee,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:le=>le.preventDefault(),...A,...pe,onPlaced:()=>G(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:me(A.onKeyDown,le=>{const ve=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!ve&&le.key.length===1&&W(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let De=J().filter(Be=>!Be.disabled).map(Be=>Be.ref.current);if(["ArrowUp","End"].includes(le.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Be=le.target,We=De.indexOf(Be);De=De.slice(We+1)}setTimeout(()=>z(De)),le.preventDefault()}})})})})})})});HS.displayName=IP;var UP="SelectItemAlignedPosition",FS=v.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:i,...l}=e,s=Da(di,r),c=Oa(di,r),[f,d]=v.useState(null),[h,m]=v.useState(null),y=ze(n,H=>m(H)),w=Xc(r),b=v.useRef(!1),S=v.useRef(!0),{viewport:E,selectedItem:T,selectedItemText:A,focusSelectedItem:R}=c,N=v.useCallback(()=>{if(s.trigger&&s.valueNode&&f&&h&&E&&T&&A){const H=s.trigger.getBoundingClientRect(),$=h.getBoundingClientRect(),Y=s.valueNode.getBoundingClientRect(),D=A.getBoundingClientRect();if(s.dir!=="rtl"){const Be=D.left-$.left,We=Y.left-Be,Ke=H.left-We,xt=H.width+Ke,zn=Math.max(xt,$.width),tr=window.innerWidth-or,Rt=Ep(We,[or,Math.max(or,tr-zn)]);f.style.minWidth=xt+"px",f.style.left=Rt+"px"}else{const Be=$.right-D.right,We=window.innerWidth-Y.right-Be,Ke=window.innerWidth-H.right-We,xt=H.width+Ke,zn=Math.max(xt,$.width),tr=window.innerWidth-or,Rt=Ep(We,[or,Math.max(or,tr-zn)]);f.style.minWidth=xt+"px",f.style.right=Rt+"px"}const Z=w(),J=window.innerHeight-or*2,ne=E.scrollHeight,G=window.getComputedStyle(h),ae=parseInt(G.borderTopWidth,10),z=parseInt(G.paddingTop,10),Q=parseInt(G.borderBottomWidth,10),B=parseInt(G.paddingBottom,10),ie=ae+z+ne+B+Q,k=Math.min(T.offsetHeight*5,ie),W=window.getComputedStyle(E),se=parseInt(W.paddingTop,10),M=parseInt(W.paddingBottom,10),ce=H.top+H.height/2-or,Ee=J-ce,pe=T.offsetHeight/2,le=T.offsetTop+pe,ve=ae+z+le,Ve=ie-ve;if(ve<=ce){const Be=Z.length>0&&T===Z[Z.length-1].ref.current;f.style.bottom="0px";const We=h.clientHeight-E.offsetTop-E.offsetHeight,Ke=Math.max(Ee,pe+(Be?M:0)+We+Q),xt=ve+Ke;f.style.height=xt+"px"}else{const Be=Z.length>0&&T===Z[0].ref.current;f.style.top="0px";const Ke=Math.max(ce,ae+E.offsetTop+(Be?se:0)+pe)+Ve;f.style.height=Ke+"px",E.scrollTop=ve-ce+E.offsetTop}f.style.margin=`${or}px 0`,f.style.minHeight=k+"px",f.style.maxHeight=J+"px",i?.(),requestAnimationFrame(()=>b.current=!0)}},[w,s.trigger,s.valueNode,f,h,E,T,A,s.dir,i]);$t(()=>N(),[N]);const[O,L]=v.useState();$t(()=>{h&&L(window.getComputedStyle(h).zIndex)},[h]);const j=v.useCallback(H=>{H&&S.current===!0&&(N(),R?.(),S.current=!1)},[N,R]);return g.jsx(FP,{scope:r,contentWrapper:f,shouldExpandOnScrollRef:b,onScrollButtonChange:j,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:g.jsx(_e.div,{...l,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});FS.displayName=UP;var HP="SelectPopperPosition",Cp=v.forwardRef((e,n)=>{const{__scopeSelect:r,align:i="start",collisionPadding:l=or,...s}=e,c=Qc(r);return g.jsx(_m,{...c,...s,ref:n,align:i,collisionPadding:l,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Cp.displayName=HP;var[FP,Dm]=No(di,{}),kp="SelectViewport",VS=v.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:i,...l}=e,s=Oa(kp,r),c=Dm(kp,r),f=ze(n,s.onViewportChange),d=v.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(Kc.Slot,{scope:r,children:g.jsx(_e.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:me(l.onScroll,h=>{const m=h.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:w}=c;if(w?.current&&y){const b=Math.abs(d.current-m.scrollTop);if(b>0){const S=window.innerHeight-or*2,E=parseFloat(y.style.minHeight),T=parseFloat(y.style.height),A=Math.max(E,T);if(A<S){const R=A+b,N=Math.min(S,R),O=R-N;y.style.height=N+"px",y.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,y.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});VS.displayName=kp;var qS="SelectGroup",[VP,qP]=No(qS),$P=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=kr();return g.jsx(VP,{scope:r,id:l,children:g.jsx(_e.div,{role:"group","aria-labelledby":l,...i,ref:n})})});$P.displayName=qS;var $S="SelectLabel",GS=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=qP($S,r);return g.jsx(_e.div,{id:l.id,...i,ref:n})});GS.displayName=$S;var gc="SelectItem",[GP,YS]=No(gc),KS=v.forwardRef((e,n)=>{const{__scopeSelect:r,value:i,disabled:l=!1,textValue:s,...c}=e,f=Da(gc,r),d=Oa(gc,r),h=f.value===i,[m,y]=v.useState(s??""),[w,b]=v.useState(!1),S=ze(n,R=>d.itemRefCallback?.(R,i,l)),E=kr(),T=v.useRef("touch"),A=()=>{l||(f.onValueChange(i),f.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(GP,{scope:r,value:i,disabled:l,textId:E,isSelected:h,onItemTextChange:v.useCallback(R=>{y(N=>N||(R?.textContent??"").trim())},[]),children:g.jsx(Kc.ItemSlot,{scope:r,value:i,disabled:l,textValue:m,children:g.jsx(_e.div,{role:"option","aria-labelledby":E,"data-highlighted":w?"":void 0,"aria-selected":h&&w,"data-state":h?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...c,ref:S,onFocus:me(c.onFocus,()=>b(!0)),onBlur:me(c.onBlur,()=>b(!1)),onClick:me(c.onClick,()=>{T.current!=="mouse"&&A()}),onPointerUp:me(c.onPointerUp,()=>{T.current==="mouse"&&A()}),onPointerDown:me(c.onPointerDown,R=>{T.current=R.pointerType}),onPointerMove:me(c.onPointerMove,R=>{T.current=R.pointerType,l?d.onItemLeave?.():T.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(c.onPointerLeave,R=>{R.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:me(c.onKeyDown,R=>{d.searchRef?.current!==""&&R.key===" "||(MP.includes(R.key)&&A(),R.key===" "&&R.preventDefault())})})})})});KS.displayName=gc;var Ll="SelectItemText",XS=v.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,...s}=e,c=Da(Ll,r),f=Oa(Ll,r),d=YS(Ll,r),h=PP(Ll,r),[m,y]=v.useState(null),w=ze(n,A=>y(A),d.onItemTextChange,A=>f.itemTextRefCallback?.(A,d.value,d.disabled)),b=m?.textContent,S=v.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:E,onNativeOptionRemove:T}=h;return $t(()=>(E(S),()=>T(S)),[E,T,S]),g.jsxs(g.Fragment,{children:[g.jsx(_e.span,{id:d.textId,...s,ref:w}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?wo.createPortal(s.children,c.valueNode):null]})});XS.displayName=Ll;var QS="SelectItemIndicator",ZS=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return YS(QS,r).isSelected?g.jsx(_e.span,{"aria-hidden":!0,...i,ref:n}):null});ZS.displayName=QS;var Ap="SelectScrollUpButton",WS=v.forwardRef((e,n)=>{const r=Oa(Ap,e.__scopeSelect),i=Dm(Ap,e.__scopeSelect),[l,s]=v.useState(!1),c=ze(n,i.onScrollButtonChange);return $t(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollTop>0;s(h)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(eE,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop-d.offsetHeight)}}):null});WS.displayName=Ap;var Tp="SelectScrollDownButton",JS=v.forwardRef((e,n)=>{const r=Oa(Tp,e.__scopeSelect),i=Dm(Tp,e.__scopeSelect),[l,s]=v.useState(!1),c=ze(n,i.onScrollButtonChange);return $t(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;s(m)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(eE,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop+d.offsetHeight)}}):null});JS.displayName=Tp;var eE=v.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:i,...l}=e,s=Oa("SelectScrollButton",r),c=v.useRef(null),f=Xc(r),d=v.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return v.useEffect(()=>()=>d(),[d]),$t(()=>{f().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),g.jsx(_e.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:me(l.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(i,50))}),onPointerMove:me(l.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(i,50))}),onPointerLeave:me(l.onPointerLeave,()=>{d()})})}),YP="SelectSeparator",tE=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return g.jsx(_e.div,{"aria-hidden":!0,...i,ref:n})});tE.displayName=YP;var Rp="SelectArrow",KP=v.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=Qc(r),s=Da(Rp,r),c=Oa(Rp,r);return s.open&&c.position==="popper"?g.jsx(Mm,{...l,...i,ref:n}):null});KP.displayName=Rp;var XP="SelectBubbleInput",nE=v.forwardRef(({__scopeSelect:e,value:n,...r},i)=>{const l=v.useRef(null),s=ze(i,l),c=MS(n);return v.useEffect(()=>{const f=l.current;if(!f)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(c!==n&&m){const y=new Event("change",{bubbles:!0});m.call(f,n),f.dispatchEvent(y)}},[c,n]),g.jsx(_e.select,{...r,style:{...Cw,...r.style},ref:s,defaultValue:n})});nE.displayName=XP;function rE(e){return e===""||e===void 0}function aE(e){const n=Tt(e),r=v.useRef(""),i=v.useRef(0),l=v.useCallback(c=>{const f=r.current+c;n(f),(function d(h){r.current=h,window.clearTimeout(i.current),h!==""&&(i.current=window.setTimeout(()=>d(""),1e3))})(f)},[n]),s=v.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,l,s]}function iE(e,n,r){const l=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=QP(e,Math.max(s,0));l.length===1&&(c=c.filter(h=>h!==r));const d=c.find(h=>h.textValue.toLowerCase().startsWith(l.toLowerCase()));return d!==r?d:void 0}function QP(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var ZP=jS,oE=OS,WP=LS,JP=zS,eL=IS,lE=BS,tL=VS,sE=GS,uE=KS,nL=XS,rL=ZS,cE=WS,fE=JS,dE=tE;const Gb=ZP,Yb=WP,Np=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(oE,{ref:i,className:ue("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,g.jsx(JP,{asChild:!0,children:g.jsx(Yw,{className:"h-4 w-4 opacity-50"})})]}));Np.displayName=oE.displayName;const hE=v.forwardRef(({className:e,...n},r)=>g.jsx(cE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(aM,{className:"h-4 w-4"})}));hE.displayName=cE.displayName;const pE=v.forwardRef(({className:e,...n},r)=>g.jsx(fE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(Yw,{className:"h-4 w-4"})}));pE.displayName=fE.displayName;const _p=v.forwardRef(({className:e,children:n,position:r="popper",...i},l)=>g.jsx(eL,{children:g.jsxs(lE,{ref:l,className:ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[g.jsx(hE,{}),g.jsx(tL,{className:ue("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),g.jsx(pE,{})]})}));_p.displayName=lE.displayName;const aL=v.forwardRef(({className:e,...n},r)=>g.jsx(sE,{ref:r,className:ue("px-2 py-1.5 text-sm font-semibold",e),...n}));aL.displayName=sE.displayName;const li=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(uE,{ref:i,className:ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(rL,{children:g.jsx(Oc,{className:"h-4 w-4"})})}),g.jsx(nL,{children:n})]}));li.displayName=uE.displayName;const iL=v.forwardRef(({className:e,...n},r)=>g.jsx(dE,{ref:r,className:ue("-mx-1 my-1 h-px bg-muted",e),...n}));iL.displayName=dE.displayName;const Zc=pm,aH=F1,oL=mm,mE=v.forwardRef(({className:e,...n},r)=>g.jsx(ls,{ref:r,className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));mE.displayName=ls.displayName;const ds=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(oL,{children:[g.jsx(mE,{}),g.jsxs(ss,{ref:i,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,g.jsxs(Bc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(so,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ds.displayName=ss.displayName;const hs=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});hs.displayName="DialogHeader";const gE=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});gE.displayName="DialogFooter";const ps=v.forwardRef(({className:e,...n},r)=>g.jsx(us,{ref:r,className:ue("text-lg font-semibold leading-none tracking-tight",e),...n}));ps.displayName=us.displayName;const zl=v.forwardRef(({className:e,...n},r)=>g.jsx(cs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));zl.displayName=cs.displayName;function zh({className:e,...n}){return g.jsx("kbd",{"data-slot":"kbd",className:ue("inline-flex h-5 items-center justify-center rounded border border-muted-foreground/30 bg-muted/50 px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-sm",e),...n})}function iH({className:e,...n}){return g.jsx("span",{"data-slot":"kbd-group",className:ue("inline-flex items-center gap-0.5",e),...n})}function oH(){}function lH(){}function sH(e){const n=[],r=String(e||"");let i=r.indexOf(","),l=0,s=!1;for(;!s;){i===-1&&(i=r.length,s=!0);const c=r.slice(l,i).trim();(c||!s)&&n.push(c),l=i+1,i=r.indexOf(",",l)}return n}function lL(e,n){const r=n||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const sL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cL={};function Kb(e,n){return(cL.jsx?uL:sL).test(e)}const fL=/[ \t\n\f\r]/g;function dL(e){return typeof e=="object"?e.type==="text"?Xb(e.value):!1:Xb(e)}function Xb(e){return e.replace(fL,"")===""}class ms{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}ms.prototype.normal={};ms.prototype.property={};ms.prototype.space=void 0;function yE(e,n){const r={},i={};for(const l of e)Object.assign(r,l.property),Object.assign(i,l.normal);return new ms(r,i,n)}function Mp(e){return e.toLowerCase()}class xn{constructor(n,r){this.attribute=r,this.property=n}}xn.prototype.attribute="";xn.prototype.booleanish=!1;xn.prototype.boolean=!1;xn.prototype.commaOrSpaceSeparated=!1;xn.prototype.commaSeparated=!1;xn.prototype.defined=!1;xn.prototype.mustUseProperty=!1;xn.prototype.number=!1;xn.prototype.overloadedBoolean=!1;xn.prototype.property="";xn.prototype.spaceSeparated=!1;xn.prototype.space=void 0;let hL=0;const Le=pi(),Dt=pi(),jp=pi(),he=pi(),ft=pi(),fo=pi(),Dn=pi();function pi(){return 2**++hL}const Dp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Dt,commaOrSpaceSeparated:Dn,commaSeparated:fo,number:he,overloadedBoolean:jp,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Ih=Object.keys(Dp);class Om extends xn{constructor(n,r,i,l){let s=-1;if(super(n,r),Qb(this,"space",l),typeof i=="number")for(;++s<Ih.length;){const c=Ih[s];Qb(this,Ih[s],(i&Dp[c])===Dp[c])}}}Om.prototype.defined=!0;function Qb(e,n,r){r&&(e[n]=r)}function _o(e){const n={},r={};for(const[i,l]of Object.entries(e.properties)){const s=new Om(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[Mp(i)]=i,r[Mp(s.attribute)]=i}return new ms(n,r,e.space)}const vE=_o({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:ft,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:he,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:ft,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Dt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function xE(e,n){return n in e?e[n]:n}function bE(e,n){return xE(e,n.toLowerCase())}const pL=_o({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fo,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:ft,autoFocus:Le,autoPlay:Le,blocking:ft,capture:null,charSet:null,checked:Le,cite:null,className:ft,cols:he,colSpan:null,content:null,contentEditable:Dt,controls:Le,controlsList:ft,coords:he|fo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:jp,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:ft,height:he,hidden:jp,high:he,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:ft,itemRef:ft,itemScope:Le,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Le,optimum:he,pattern:null,ping:ft,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:ft,required:Le,reversed:Le,rows:he,rowSpan:he,sandbox:ft,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:Dt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:bE}),mL=_o({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Dn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fo,g2:fo,glyphName:fo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Dn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dn,rev:Dn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dn,requiredFeatures:Dn,requiredFonts:Dn,requiredFormats:Dn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Dn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xE}),wE=_o({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),SE=_o({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bE}),EE=_o({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),gL={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},yL=/[A-Z]/g,Zb=/-[a-z]/g,vL=/^data[-\w.:]+$/i;function xL(e,n){const r=Mp(n);let i=n,l=xn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&vL.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(Zb,wL);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!Zb.test(s)){let c=s.replace(yL,bL);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}l=Om}return new l(i,n)}function bL(e){return"-"+e.toLowerCase()}function wL(e){return e.charAt(1).toUpperCase()}const SL=yE([vE,pL,wE,SE,EE],"html"),Pm=yE([vE,mL,wE,SE,EE],"svg");function uH(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function EL(e){return e.join(" ").trim()}var io={},Bh,Wb;function CL(){if(Wb)return Bh;Wb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
366
+ `,h="/",m="*",y="",w="comment",b="declaration";Bh=function(E,T){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];T=T||{};var A=1,R=1;function N(ne){var G=ne.match(n);G&&(A+=G.length);var ae=ne.lastIndexOf(d);R=~ae?ne.length-ae:R+ne.length}function O(){var ne={line:A,column:R};return function(G){return G.position=new L(ne),$(),G}}function L(ne){this.start=ne,this.end={line:A,column:R},this.source=T.source}L.prototype.content=E;function j(ne){var G=new Error(T.source+":"+A+":"+R+": "+ne);if(G.reason=ne,G.filename=T.source,G.line=A,G.column=R,G.source=E,!T.silent)throw G}function H(ne){var G=ne.exec(E);if(G){var ae=G[0];return N(ae),E=E.slice(ae.length),G}}function $(){H(r)}function Y(ne){var G;for(ne=ne||[];G=D();)G!==!1&&ne.push(G);return ne}function D(){var ne=O();if(!(h!=E.charAt(0)||m!=E.charAt(1))){for(var G=2;y!=E.charAt(G)&&(m!=E.charAt(G)||h!=E.charAt(G+1));)++G;if(G+=2,y===E.charAt(G-1))return j("End of comment missing");var ae=E.slice(2,G-2);return R+=2,N(ae),E=E.slice(G),R+=2,ne({type:w,comment:ae})}}function Z(){var ne=O(),G=H(i);if(G){if(D(),!H(l))return j("property missing ':'");var ae=H(s),z=ne({type:b,property:S(G[0].replace(e,y)),value:ae?S(ae[0].replace(e,y)):y});return H(c),z}}function J(){var ne=[];Y(ne);for(var G;G=Z();)G!==!1&&(ne.push(G),Y(ne));return ne}return $(),J()};function S(E){return E?E.replace(f,y):y}return Bh}var Jb;function kL(){if(Jb)return io;Jb=1;var e=io&&io.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(io,"__esModule",{value:!0}),io.default=r;var n=e(CL());function r(i,l){var s=null;if(!i||typeof i!="string")return s;var c=(0,n.default)(i),f=typeof l=="function";return c.forEach(function(d){if(d.type==="declaration"){var h=d.property,m=d.value;f?l(h,m,d):m&&(s=s||{},s[h]=m)}}),s}return io}var _l={},e0;function AL(){if(e0)return _l;e0=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(h){return!h||r.test(h)||e.test(h)},c=function(h,m){return m.toUpperCase()},f=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),s(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(l,f):h=h.replace(i,f),h.replace(n,c))};return _l.camelCase=d,_l}var Ml,t0;function TL(){if(t0)return Ml;t0=1;var e=Ml&&Ml.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=e(kL()),r=AL();function i(l,s){var c={};return!l||typeof l!="string"||(0,n.default)(l,function(f,d){f&&d&&(c[(0,r.camelCase)(f,s)]=d)}),c}return i.default=i,Ml=i,Ml}var RL=TL();const NL=Cc(RL),CE=kE("end"),Lm=kE("start");function kE(e){return n;function n(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function AE(e){const n=Lm(e),r=CE(e);if(n&&r)return{start:n,end:r}}function Hl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?n0(e.position):"start"in e||"end"in e?n0(e):"line"in e||"column"in e?Op(e):""}function Op(e){return r0(e&&e.line)+":"+r0(e&&e.column)}function n0(e){return Op(e&&e.start)+"-"+Op(e&&e.end)}function r0(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(n,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let l="",s={},c=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof n=="string"?l=n:!s.cause&&n&&(c=!0,l=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?s.ruleId=i:(s.source=i.slice(0,d),s.ruleId=i.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=Hl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rn.prototype.file="";rn.prototype.name="";rn.prototype.reason="";rn.prototype.message="";rn.prototype.stack="";rn.prototype.column=void 0;rn.prototype.line=void 0;rn.prototype.ancestors=void 0;rn.prototype.cause=void 0;rn.prototype.fatal=void 0;rn.prototype.place=void 0;rn.prototype.ruleId=void 0;rn.prototype.source=void 0;const zm={}.hasOwnProperty,_L=new Map,ML=/[A-Z]/g,jL=new Set(["table","tbody","thead","tfoot","tr"]),DL=new Set(["td","th"]),TE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OL(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=FL(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=HL(r,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Pm:SL,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=RE(l,e,void 0);return s&&typeof s!="string"?s:l.create(e,l.Fragment,{children:s||void 0},void 0)}function RE(e,n,r){if(n.type==="element")return PL(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return LL(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return IL(e,n,r);if(n.type==="mdxjsEsm")return zL(e,n);if(n.type==="root")return BL(e,n,r);if(n.type==="text")return UL(e,n)}function PL(e,n,r){const i=e.schema;let l=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=Pm,e.schema=l),e.ancestors.push(n);const s=_E(e,n.tagName,!1),c=VL(e,n);let f=Bm(e,n);return jL.has(n.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!dL(d):!0})),NE(e,c,s,n),Im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function LL(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ql(e,n.position)}function zL(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ql(e,n.position)}function IL(e,n,r){const i=e.schema;let l=i;n.name==="svg"&&i.space==="html"&&(l=Pm,e.schema=l),e.ancestors.push(n);const s=n.name===null?e.Fragment:_E(e,n.name,!0),c=qL(e,n),f=Bm(e,n);return NE(e,c,s,n),Im(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function BL(e,n,r){const i={};return Im(i,Bm(e,n)),e.create(n,e.Fragment,i,r)}function UL(e,n){return n.value}function NE(e,n,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=i)}function Im(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function HL(e,n,r){return i;function i(l,s,c,f){const h=Array.isArray(c.children)?r:n;return f?h(s,c,f):h(s,c)}}function FL(e,n){return r;function r(i,l,s,c){const f=Array.isArray(s.children),d=Lm(i);return n(l,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function VL(e,n){const r={};let i,l;for(l in n.properties)if(l!=="children"&&zm.call(n.properties,l)){const s=$L(e,l,n.properties[l]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&DL.has(n.tagName)?i=f:r[c]=f}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function qL(e,n){const r={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Ql(e,n.position);else{const l=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Ql(e,n.position);else s=i.value===null?!0:i.value;r[l]=s}return r}function Bm(e,n){const r=[];let i=-1;const l=e.passKeys?new Map:_L;for(;++i<n.children.length;){const s=n.children[i];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=l.get(d)||0;c=d+"-"+h,l.set(d,h+1)}}const f=RE(e,s,c);f!==void 0&&r.push(f)}return r}function $L(e,n,r){const i=xL(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?lL(r):EL(r)),i.property==="style"){let l=typeof r=="object"?r:GL(e,String(r));return e.stylePropertyNameCase==="css"&&(l=YL(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?gL[i.property]||i.property:i.attribute,r]}}function GL(e,n){try{return NL(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=TE+"#cannot-parse-style-attribute",l}}function _E(e,n,r){let i;if(!r)i={type:"Literal",value:n};else if(n.includes(".")){const l=n.split(".");let s=-1,c;for(;++s<l.length;){const f=Kb(l[s])?{type:"Identifier",name:l[s]}:{type:"Literal",value:l[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}i=c}else i=Kb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const l=i.value;return zm.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ql(e)}function Ql(e,n){const r=new rn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=TE+"#cannot-handle-mdx-estrees-without-createevaluater",r}function YL(e){const n={};let r;for(r in e)zm.call(e,r)&&(n[KL(r)]=e[r]);return n}function KL(e){let n=e.replace(ML,XL);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function XL(e){return"-"+e.toLowerCase()}const Uh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},QL={};function Um(e,n){const r=QL,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return ME(e,i,l)}function ME(e,n,r){if(ZL(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return a0(e.children,n,r)}return Array.isArray(e)?a0(e,n,r):""}function a0(e,n,r){const i=[];let l=-1;for(;++l<e.length;)i[l]=ME(e[l],n,r);return i.join("")}function ZL(e){return!!(e&&typeof e=="object")}const i0=document.createElement("i");function Hm(e){const n="&"+e+";";i0.innerHTML=n;const r=i0.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function Ln(e,n,r,i){const l=e.length;let s=0,c;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(n,r),e.splice(...c);else for(r&&e.splice(n,r);s<i.length;)c=i.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function Kn(e,n){return e.length>0?(Ln(e,e.length,0,n),e):n}const o0={}.hasOwnProperty;function jE(e){const n={};let r=-1;for(;++r<e.length;)WL(n,e[r]);return n}function WL(e,n){let r;for(r in n){const l=(o0.call(e,r)?e[r]:void 0)||(e[r]={}),s=n[r];let c;if(s)for(c in s){o0.call(l,c)||(l[c]=[]);const f=s[c];JL(l[c],Array.isArray(f)?f:f?[f]:[])}}}function JL(e,n){let r=-1;const i=[];for(;++r<n.length;)(n[r].add==="after"?e:i).push(n[r]);Ln(e,0,0,i)}function DE(e,n){const r=Number.parseInt(e,n);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const sn=Pa(/[A-Za-z]/),nn=Pa(/[\dA-Za-z]/),ez=Pa(/[#-'*+\--9=?A-Z^-~]/);function yc(e){return e!==null&&(e<32||e===127)}const Pp=Pa(/\d/),tz=Pa(/[\dA-Fa-f]/),nz=Pa(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function ut(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Wc=Pa(new RegExp("\\p{P}|\\p{S}","u")),hi=Pa(/\s/);function Pa(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Mo(e){const n=[];let r=-1,i=0,l=0;for(;++r<e.length;){const s=e.charCodeAt(r);let c="";if(s===37&&nn(e.charCodeAt(r+1))&&nn(e.charCodeAt(r+2)))l=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),l=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(i,r),encodeURIComponent(c)),i=r+l+1,c=""),l&&(r+=l,l=0)}return n.join("")+e.slice(i)}function Ze(e,n,r,i){const l=i?i-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Ye(d)?(e.enter(r),f(d)):n(d)}function f(d){return Ye(d)&&s++<l?(e.consume(d),f):(e.exit(r),n(d))}}const rz={tokenize:az};function az(e){const n=e.attempt(this.parser.constructs.contentInitial,i,l);let r;return n;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ze(e,n,"linePrefix")}function l(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Te(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const iz={tokenize:oz},l0={tokenize:lz};function oz(e){const n=this,r=[];let i=0,l,s,c;return f;function f(N){if(i<r.length){const O=r[i];return n.containerState=O[1],e.attempt(O[0].continuation,d,h)(N)}return h(N)}function d(N){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&R();const O=n.events.length;let L=O,j;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){j=n.events[L][1].end;break}A(i);let H=O;for(;H<n.events.length;)n.events[H][1].end={...j},H++;return Ln(n.events,L+1,0,n.events.slice(O)),n.events.length=H,h(N)}return f(N)}function h(N){if(i===r.length){if(!l)return w(N);if(l.currentConstruct&&l.currentConstruct.concrete)return S(N);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(l0,m,y)(N)}function m(N){return l&&R(),A(i),w(N)}function y(N){return n.parser.lazy[n.now().line]=i!==r.length,c=n.now().offset,S(N)}function w(N){return n.containerState={},e.attempt(l0,b,S)(N)}function b(N){return i++,r.push([n.currentConstruct,n.containerState]),w(N)}function S(N){if(N===null){l&&R(),A(0),e.consume(N);return}return l=l||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:s}),E(N)}function E(N){if(N===null){T(e.exit("chunkFlow"),!0),A(0),e.consume(N);return}return Te(N)?(e.consume(N),T(e.exit("chunkFlow")),i=0,n.interrupt=void 0,f):(e.consume(N),E)}function T(N,O){const L=n.sliceStream(N);if(O&&L.push(null),N.previous=s,s&&(s.next=N),s=N,l.defineSkip(N.start),l.write(L),n.parser.lazy[N.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<c&&(!l.events[j][1].end||l.events[j][1].end.offset>c))return;const H=n.events.length;let $=H,Y,D;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(Y){D=n.events[$][1].end;break}Y=!0}for(A(i),j=H;j<n.events.length;)n.events[j][1].end={...D},j++;Ln(n.events,$+1,0,n.events.slice(H)),n.events.length=j}}function A(N){let O=r.length;for(;O-- >N;){const L=r[O];n.containerState=L[1],L[0].exit.call(n,e)}r.length=N}function R(){l.write([null]),s=void 0,l=void 0,n.containerState._closeFlow=void 0}}function lz(e,n,r){return Ze(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function go(e){if(e===null||ut(e)||hi(e))return 1;if(Wc(e))return 2}function Jc(e,n,r){const i=[];let l=-1;for(;++l<e.length;){const s=e[l].resolveAll;s&&!i.includes(s)&&(n=s(n,r),i.push(s))}return n}const Lp={name:"attention",resolveAll:sz,tokenize:uz};function sz(e,n){let r=-1,i,l,s,c,f,d,h,m;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[i][1].end},w={...e[r][1].start};s0(y,-d),s0(w,d),c={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:w},s={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},l={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[r][1].start={...f.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=Kn(h,[["enter",e[i][1],n],["exit",e[i][1],n]])),h=Kn(h,[["enter",l,n],["enter",c,n],["exit",c,n],["enter",s,n]]),h=Kn(h,Jc(n.parser.constructs.insideSpan.null,e.slice(i+1,r),n)),h=Kn(h,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",l,n]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,h=Kn(h,[["enter",e[r][1],n],["exit",e[r][1],n]])):m=0,Ln(e,i-1,r-i+3,h),r=i+h.length-m-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function uz(e,n){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=go(i);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),m=go(d),y=!m||m===2&&l||r.includes(d),w=!l||l===2&&m||r.includes(i);return h._open=!!(s===42?y:y&&(l||!w)),h._close=!!(s===42?w:w&&(m||!y)),n(d)}}function s0(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const cz={name:"autolink",tokenize:fz};function fz(e,n,r){let i=0;return l;function l(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return sn(b)?(e.consume(b),c):b===64?r(b):h(b)}function c(b){return b===43||b===45||b===46||nn(b)?(i=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),i=0,d):(b===43||b===45||b===46||nn(b))&&i++<32?(e.consume(b),f):(i=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||yc(b)?r(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),m):ez(b)?(e.consume(b),h):r(b)}function m(b){return nn(b)?y(b):r(b)}function y(b){return b===46?(e.consume(b),i=0,m):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):w(b)}function w(b){if((b===45||nn(b))&&i++<63){const S=b===45?w:y;return e.consume(b),S}return r(b)}}const gs={partial:!0,tokenize:dz};function dz(e,n,r){return i;function i(s){return Ye(s)?Ze(e,l,"linePrefix")(s):l(s)}function l(s){return s===null||Te(s)?n(s):r(s)}}const OE={continuation:{tokenize:pz},exit:mz,name:"blockQuote",tokenize:hz};function hz(e,n,r){const i=this;return l;function l(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return r(c)}function s(c){return Ye(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function pz(e,n,r){const i=this;return l;function l(c){return Ye(c)?Ze(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(OE,n,r)(c)}}function mz(e){e.exit("blockQuote")}const PE={name:"characterEscape",tokenize:gz};function gz(e,n,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),l}function l(s){return nz(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(s)}}const LE={name:"characterReference",tokenize:yz};function yz(e,n,r){const i=this;let l=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=nn,m(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=tz,m):(e.enter("characterReferenceValue"),s=7,c=Pp,m(y))}function m(y){if(y===59&&l){const w=e.exit("characterReferenceValue");return c===nn&&!Hm(i.sliceSerialize(w))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&l++<s?(e.consume(y),m):r(y)}}const u0={partial:!0,tokenize:xz},c0={concrete:!0,name:"codeFenced",tokenize:vz};function vz(e,n,r){const i=this,l={partial:!0,tokenize:L};let s=0,c=0,f;return d;function d(j){return h(j)}function h(j){const H=i.events[i.events.length-1];return s=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===f?(c++,e.consume(j),m):c<3?r(j):(e.exit("codeFencedFenceSequence"),Ye(j)?Ze(e,y,"whitespace")(j):y(j))}function y(j){return j===null||Te(j)?(e.exit("codeFencedFence"),i.interrupt?n(j):e.check(u0,E,O)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(j))}function w(j){return j===null||Te(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(j)):Ye(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),w)}function b(j){return j===null||Te(j)?y(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(j))}function S(j){return j===null||Te(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(j)):j===96&&j===f?r(j):(e.consume(j),S)}function E(j){return e.attempt(l,O,T)(j)}function T(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),A}function A(j){return s>0&&Ye(j)?Ze(e,R,"linePrefix",s+1)(j):R(j)}function R(j){return j===null||Te(j)?e.check(u0,E,O)(j):(e.enter("codeFlowValue"),N(j))}function N(j){return j===null||Te(j)?(e.exit("codeFlowValue"),R(j)):(e.consume(j),N)}function O(j){return e.exit("codeFenced"),n(j)}function L(j,H,$){let Y=0;return D;function D(ae){return j.enter("lineEnding"),j.consume(ae),j.exit("lineEnding"),Z}function Z(ae){return j.enter("codeFencedFence"),Ye(ae)?Ze(j,J,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):J(ae)}function J(ae){return ae===f?(j.enter("codeFencedFenceSequence"),ne(ae)):$(ae)}function ne(ae){return ae===f?(Y++,j.consume(ae),ne):Y>=c?(j.exit("codeFencedFenceSequence"),Ye(ae)?Ze(j,G,"whitespace")(ae):G(ae)):$(ae)}function G(ae){return ae===null||Te(ae)?(j.exit("codeFencedFence"),H(ae)):$(ae)}}}function xz(e,n,r){const i=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}const Hh={name:"codeIndented",tokenize:wz},bz={partial:!0,tokenize:Sz};function wz(e,n,r){const i=this;return l;function l(h){return e.enter("codeIndented"),Ze(e,s,"linePrefix",5)(h)}function s(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):r(h)}function c(h){return h===null?d(h):Te(h)?e.attempt(bz,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Te(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),n(h)}}function Sz(e,n,r){const i=this;return l;function l(c){return i.parser.lazy[i.now().line]?r(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):Ze(e,s,"linePrefix",5)(c)}function s(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):Te(c)?l(c):r(c)}}const Ez={name:"codeText",previous:kz,resolve:Cz,tokenize:Az};function Cz(e){let n=e.length-4,r=3,i,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=r;++i<n;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(i=r-1,n++;++i<=n;)l===void 0?i!==n&&e[i][1].type!=="lineEnding"&&(l=i):(i===n||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),n-=i-l-2,i=l+2),l=void 0);return e}function kz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Az(e,n,r){let i=0,l,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),l=0,m(y)):Te(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||Te(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function m(y){return y===96?(e.consume(y),l++,m):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(s.type="codeTextData",h(y))}}class Tz{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,r,i){const l=r||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&jl(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),jl(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),jl(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);jl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);jl(this.left,r.reverse())}}}function jl(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function zE(e){const n={};let r=-1,i,l,s,c,f,d,h;const m=new Tz(e);for(;++r<m.length;){for(;r in n;)r=n[r];if(i=m.get(r),r&&i[1].type==="chunkFlow"&&m.get(r-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,Rz(m,r)),r=n[r],h=!0);else if(i[1]._container){for(s=r,l=void 0;s--;)if(c=m.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(m.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(i[1].end={...m.get(l)[1].start},f=m.slice(l,r),f.unshift(i),m.splice(l,r-l+1,f))}}return Ln(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Rz(e,n){const r=e.get(n)[1],i=e.get(n)[2];let l=n-1;const s=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let m,y,w=-1,b=r,S=0,E=0;const T=[E];for(;b;){for(;e.get(++l)[1]!==b;);s.push(l),b._tokenizer||(m=i.sliceStream(b),b.next||m.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=r;++w<f.length;)f[w][0]==="exit"&&f[w-1][0]==="enter"&&f[w][1].type===f[w-1][1].type&&f[w][1].start.line!==f[w][1].end.line&&(E=w+1,T.push(E),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):T.pop(),w=T.length;w--;){const A=f.slice(T[w],T[w+1]),R=s.pop();d.push([R,R+A.length-1]),e.splice(R,2,A)}for(d.reverse(),w=-1;++w<d.length;)h[S+d[w][0]]=S+d[w][1],S+=d[w][1]-d[w][0]-1;return h}const Nz={resolve:Mz,tokenize:jz},_z={partial:!0,tokenize:Dz};function Mz(e){return zE(e),e}function jz(e,n){let r;return i;function i(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?s(f):Te(f)?e.check(_z,c,s)(f):(e.consume(f),l)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function Dz(e,n,r){const i=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,s,"linePrefix")}function s(c){if(c===null||Te(c))return r(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(i.parser.constructs.flow,r,n)(c)}}function IE(e,n,r,i,l,s,c,f,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return y;function y(A){return A===60?(e.enter(i),e.enter(l),e.enter(s),e.consume(A),e.exit(s),w):A===null||A===32||A===41||yc(A)?r(A):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(A))}function w(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(l),e.exit(i),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(f),w(A)):A===null||A===60||Te(A)?r(A):(e.consume(A),A===92?S:b)}function S(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function E(A){return!m&&(A===null||A===41||ut(A))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),n(A)):m<h&&A===40?(e.consume(A),m++,E):A===41?(e.consume(A),m--,E):A===null||A===32||A===40||yc(A)?r(A):(e.consume(A),A===92?T:E)}function T(A){return A===40||A===41||A===92?(e.consume(A),E):E(A)}}function BE(e,n,r,i,l,s){const c=this;let f=0,d;return h;function h(b){return e.enter(i),e.enter(l),e.consume(b),e.exit(l),e.enter(s),m}function m(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(b):b===93?(e.exit(s),e.enter(l),e.consume(b),e.exit(l),e.exit(i),n):Te(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Te(b)||f++>999?(e.exit("chunkString"),m(b)):(e.consume(b),d||(d=!Ye(b)),b===92?w:y)}function w(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function UE(e,n,r,i,l,s){let c;return f;function f(w){return w===34||w===39||w===40?(e.enter(i),e.enter(l),e.consume(w),e.exit(l),c=w===40?41:w,d):r(w)}function d(w){return w===c?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),n):(e.enter(s),h(w))}function h(w){return w===c?(e.exit(s),d(c)):w===null?r(w):Te(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Ze(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===c||w===null||Te(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?y:m)}function y(w){return w===c||w===92?(e.consume(w),m):m(w)}}function Fl(e,n){let r;return i;function i(l){return Te(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,i):Ye(l)?Ze(e,i,r?"linePrefix":"lineSuffix")(l):n(l)}}const Oz={name:"definition",tokenize:Lz},Pz={partial:!0,tokenize:zz};function Lz(e,n,r){const i=this;let l;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return BE.call(i,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return l=sr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):r(b)}function d(b){return ut(b)?Fl(e,h)(b):h(b)}function h(b){return IE(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(Pz,y,y)(b)}function y(b){return Ye(b)?Ze(e,w,"whitespace")(b):w(b)}function w(b){return b===null||Te(b)?(e.exit("definition"),i.parser.defined.push(l),n(b)):r(b)}}function zz(e,n,r){return i;function i(f){return ut(f)?Fl(e,l)(f):r(f)}function l(f){return UE(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ye(f)?Ze(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?n(f):r(f)}}const Iz={name:"hardBreakEscape",tokenize:Bz};function Bz(e,n,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),l}function l(s){return Te(s)?(e.exit("hardBreakEscape"),n(s)):r(s)}}const Uz={name:"headingAtx",resolve:Hz,tokenize:Fz};function Hz(e,n){let r=e.length-2,i=3,l,s;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},Ln(e,i,r-i+1,[["enter",l,n],["enter",s,n],["exit",s,n],["exit",l,n]])),e}function Fz(e,n,r){let i=0;return l;function l(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||ut(m)?(e.exit("atxHeadingSequence"),f(m)):r(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Te(m)?(e.exit("atxHeading"),n(m)):Ye(m)?Ze(e,f,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),f(m))}function h(m){return m===null||m===35||ut(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),h)}}const Vz=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],f0=["pre","script","style","textarea"],qz={concrete:!0,name:"htmlFlow",resolveTo:Yz,tokenize:Kz},$z={partial:!0,tokenize:Qz},Gz={partial:!0,tokenize:Xz};function Yz(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Kz(e,n,r){const i=this;let l,s,c,f,d;return h;function h(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),y}function y(M){return M===33?(e.consume(M),w):M===47?(e.consume(M),s=!0,E):M===63?(e.consume(M),l=3,i.interrupt?n:k):sn(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function w(M){return M===45?(e.consume(M),l=2,b):M===91?(e.consume(M),l=5,f=0,S):sn(M)?(e.consume(M),l=4,i.interrupt?n:k):r(M)}function b(M){return M===45?(e.consume(M),i.interrupt?n:k):r(M)}function S(M){const ce="CDATA[";return M===ce.charCodeAt(f++)?(e.consume(M),f===ce.length?i.interrupt?n:J:S):r(M)}function E(M){return sn(M)?(e.consume(M),c=String.fromCharCode(M),T):r(M)}function T(M){if(M===null||M===47||M===62||ut(M)){const ce=M===47,Ee=c.toLowerCase();return!ce&&!s&&f0.includes(Ee)?(l=1,i.interrupt?n(M):J(M)):Vz.includes(c.toLowerCase())?(l=6,ce?(e.consume(M),A):i.interrupt?n(M):J(M)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(M):s?R(M):N(M))}return M===45||nn(M)?(e.consume(M),c+=String.fromCharCode(M),T):r(M)}function A(M){return M===62?(e.consume(M),i.interrupt?n:J):r(M)}function R(M){return Ye(M)?(e.consume(M),R):D(M)}function N(M){return M===47?(e.consume(M),D):M===58||M===95||sn(M)?(e.consume(M),O):Ye(M)?(e.consume(M),N):D(M)}function O(M){return M===45||M===46||M===58||M===95||nn(M)?(e.consume(M),O):L(M)}function L(M){return M===61?(e.consume(M),j):Ye(M)?(e.consume(M),L):N(M)}function j(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),d=M,H):Ye(M)?(e.consume(M),j):$(M)}function H(M){return M===d?(e.consume(M),d=null,Y):M===null||Te(M)?r(M):(e.consume(M),H)}function $(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||ut(M)?L(M):(e.consume(M),$)}function Y(M){return M===47||M===62||Ye(M)?N(M):r(M)}function D(M){return M===62?(e.consume(M),Z):r(M)}function Z(M){return M===null||Te(M)?J(M):Ye(M)?(e.consume(M),Z):r(M)}function J(M){return M===45&&l===2?(e.consume(M),z):M===60&&l===1?(e.consume(M),Q):M===62&&l===4?(e.consume(M),W):M===63&&l===3?(e.consume(M),k):M===93&&l===5?(e.consume(M),ie):Te(M)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check($z,se,ne)(M)):M===null||Te(M)?(e.exit("htmlFlowData"),ne(M)):(e.consume(M),J)}function ne(M){return e.check(Gz,G,se)(M)}function G(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),ae}function ae(M){return M===null||Te(M)?ne(M):(e.enter("htmlFlowData"),J(M))}function z(M){return M===45?(e.consume(M),k):J(M)}function Q(M){return M===47?(e.consume(M),c="",B):J(M)}function B(M){if(M===62){const ce=c.toLowerCase();return f0.includes(ce)?(e.consume(M),W):J(M)}return sn(M)&&c.length<8?(e.consume(M),c+=String.fromCharCode(M),B):J(M)}function ie(M){return M===93?(e.consume(M),k):J(M)}function k(M){return M===62?(e.consume(M),W):M===45&&l===2?(e.consume(M),k):J(M)}function W(M){return M===null||Te(M)?(e.exit("htmlFlowData"),se(M)):(e.consume(M),W)}function se(M){return e.exit("htmlFlow"),n(M)}}function Xz(e,n,r){const i=this;return l;function l(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):r(c)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}function Qz(e,n,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(gs,n,r)}}const Zz={name:"htmlText",tokenize:Wz};function Wz(e,n,r){const i=this;let l,s,c;return f;function f(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),L):k===63?(e.consume(k),N):sn(k)?(e.consume(k),$):r(k)}function h(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),s=0,S):sn(k)?(e.consume(k),R):r(k)}function m(k){return k===45?(e.consume(k),b):r(k)}function y(k){return k===null?r(k):k===45?(e.consume(k),w):Te(k)?(c=y,Q(k)):(e.consume(k),y)}function w(k){return k===45?(e.consume(k),b):y(k)}function b(k){return k===62?z(k):k===45?w(k):y(k)}function S(k){const W="CDATA[";return k===W.charCodeAt(s++)?(e.consume(k),s===W.length?E:S):r(k)}function E(k){return k===null?r(k):k===93?(e.consume(k),T):Te(k)?(c=E,Q(k)):(e.consume(k),E)}function T(k){return k===93?(e.consume(k),A):E(k)}function A(k){return k===62?z(k):k===93?(e.consume(k),A):E(k)}function R(k){return k===null||k===62?z(k):Te(k)?(c=R,Q(k)):(e.consume(k),R)}function N(k){return k===null?r(k):k===63?(e.consume(k),O):Te(k)?(c=N,Q(k)):(e.consume(k),N)}function O(k){return k===62?z(k):N(k)}function L(k){return sn(k)?(e.consume(k),j):r(k)}function j(k){return k===45||nn(k)?(e.consume(k),j):H(k)}function H(k){return Te(k)?(c=H,Q(k)):Ye(k)?(e.consume(k),H):z(k)}function $(k){return k===45||nn(k)?(e.consume(k),$):k===47||k===62||ut(k)?Y(k):r(k)}function Y(k){return k===47?(e.consume(k),z):k===58||k===95||sn(k)?(e.consume(k),D):Te(k)?(c=Y,Q(k)):Ye(k)?(e.consume(k),Y):z(k)}function D(k){return k===45||k===46||k===58||k===95||nn(k)?(e.consume(k),D):Z(k)}function Z(k){return k===61?(e.consume(k),J):Te(k)?(c=Z,Q(k)):Ye(k)?(e.consume(k),Z):Y(k)}function J(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),l=k,ne):Te(k)?(c=J,Q(k)):Ye(k)?(e.consume(k),J):(e.consume(k),G)}function ne(k){return k===l?(e.consume(k),l=void 0,ae):k===null?r(k):Te(k)?(c=ne,Q(k)):(e.consume(k),ne)}function G(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||ut(k)?Y(k):(e.consume(k),G)}function ae(k){return k===47||k===62||ut(k)?Y(k):r(k)}function z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),n):r(k)}function Q(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),B}function B(k){return Ye(k)?Ze(e,ie,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),c(k)}}const Fm={name:"labelEnd",resolveAll:n3,resolveTo:r3,tokenize:a3},Jz={tokenize:i3},e3={tokenize:o3},t3={tokenize:l3};function n3(e){let n=-1;const r=[];for(;++n<e.length;){const i=e[n][1];if(r.push(e[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",n+=l}}return e.length!==r.length&&Ln(e,0,e.length,r),e}function r3(e,n){let r=e.length,i=0,l,s,c,f;for(;r--;)if(l=e[r][1],s){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(s=r,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(c=r);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,n],["enter",h,n]],f=Kn(f,e.slice(s+1,s+i+3)),f=Kn(f,[["enter",m,n]]),f=Kn(f,Jc(n.parser.constructs.insideSpan.null,e.slice(s+i+4,c-3),n)),f=Kn(f,[["exit",m,n],e[c-2],e[c-1],["exit",h,n]]),f=Kn(f,e.slice(c+1)),f=Kn(f,[["exit",d,n]]),Ln(e,s,e.length,f),e}function a3(e,n,r){const i=this;let l=i.events.length,s,c;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){s=i.events[l][1];break}return f;function f(w){return s?s._inactive?y(w):(c=i.parser.defined.includes(sr(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),d):r(w)}function d(w){return w===40?e.attempt(Jz,m,c?m:y)(w):w===91?e.attempt(e3,m,c?h:y)(w):c?m(w):y(w)}function h(w){return e.attempt(t3,m,y)(w)}function m(w){return n(w)}function y(w){return s._balanced=!0,r(w)}}function i3(e,n,r){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return ut(y)?Fl(e,s)(y):s(y)}function s(y){return y===41?m(y):IE(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return ut(y)?Fl(e,d)(y):m(y)}function f(y){return r(y)}function d(y){return y===34||y===39||y===40?UE(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):m(y)}function h(y){return ut(y)?Fl(e,m)(y):m(y)}function m(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):r(y)}}function o3(e,n,r){const i=this;return l;function l(f){return BE.call(i,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return i.parser.defined.includes(sr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(f):r(f)}function c(f){return r(f)}}function l3(e,n,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),l}function l(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):r(s)}}const s3={name:"labelStartImage",resolveAll:Fm.resolveAll,tokenize:u3};function u3(e,n,r){const i=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(f):n(f)}}const c3={name:"labelStartLink",resolveAll:Fm.resolveAll,tokenize:f3};function f3(e,n,r){const i=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):n(c)}}const Fh={name:"lineEnding",tokenize:d3};function d3(e,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ze(e,n,"linePrefix")}}const ic={name:"thematicBreak",tokenize:h3};function h3(e,n,r){let i=0,l;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return l=h,f(h)}function f(h){return h===l?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),n(h)):r(h)}function d(h){return h===l?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Ye(h)?Ze(e,f,"whitespace")(h):f(h))}}const vn={continuation:{tokenize:y3},exit:x3,name:"list",tokenize:g3},p3={partial:!0,tokenize:b3},m3={partial:!0,tokenize:v3};function g3(e,n,r){const i=this,l=i.events[i.events.length-1];let s=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(b){const S=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:Pp(b)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ic,r,h)(b):h(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return r(b)}function d(b){return Pp(b)&&++c<10?(e.consume(b),d):(!i.interrupt||c<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):r(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(gs,i.interrupt?r:m,e.attempt(p3,w,y))}function m(b){return i.containerState.initialBlankLine=!0,s++,w(b)}function y(b){return Ye(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),w):r(b)}function w(b){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function y3(e,n,r){const i=this;return i.containerState._closeFlow=void 0,e.check(gs,l,s);function l(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ze(e,n,"listItemIndent",i.containerState.size+1)(f)}function s(f){return i.containerState.furtherBlankLines||!Ye(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(m3,n,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ze(e,e.attempt(vn,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function v3(e,n,r){const i=this;return Ze(e,l,"listItemIndent",i.containerState.size+1);function l(s){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?n(s):r(s)}}function x3(e){e.exit(this.containerState.type)}function b3(e,n,r){const i=this;return Ze(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(s){const c=i.events[i.events.length-1];return!Ye(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):r(s)}}const d0={name:"setextUnderline",resolveTo:w3,tokenize:S3};function w3(e,n){let r=e.length,i,l,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",s?(e.splice(l,0,["enter",c,n]),e.splice(s+1,0,["exit",e[i][1],n]),e[i][1].end={...e[s][1].end}):e[i][1]=c,e.push(["exit",c,n]),e}function S3(e,n,r){const i=this;let l;return s;function s(h){let m=i.events.length,y;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){y=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),l=h,c(h)):r(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===l?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ye(h)?Ze(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),n(h)):r(h)}}const E3={tokenize:C3};function C3(e){const n=this,r=e.attempt(gs,i,e.attempt(this.parser.constructs.flowInitial,l,Ze(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Nz,l)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function l(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const k3={resolveAll:FE()},A3=HE("string"),T3=HE("text");function HE(e){return{resolveAll:FE(e==="text"?R3:void 0),tokenize:n};function n(r){const i=this,l=this.parser.constructs[e],s=r.attempt(l,c,f);return c;function c(m){return h(m)?s(m):f(m)}function f(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),d}function d(m){return h(m)?(r.exit("data"),s(m)):(r.consume(m),d)}function h(m){if(m===null)return!0;const y=l[m];let w=-1;if(y)for(;++w<y.length;){const b=y[w];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function FE(e){return n;function n(r,i){let l=-1,s;for(;++l<=r.length;)s===void 0?r[l]&&r[l][1].type==="data"&&(s=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==s+2&&(r[s][1].end=r[l-1][1].end,r.splice(s+2,l-s-2),l=s+2),s=void 0);return e?e(r,i):r}}function R3(e,n){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=n.sliceStream(i);let s=l.length,c=-1,f=0,d;for(;s--;){const h=l[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(f=0),f){const h={type:r===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:i.start._bufferIndex+c,_index:i.start._index+s,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(r,0,["enter",h,n],["exit",h,n]),r+=2)}r++}return e}const N3={42:vn,43:vn,45:vn,48:vn,49:vn,50:vn,51:vn,52:vn,53:vn,54:vn,55:vn,56:vn,57:vn,62:OE},_3={91:Oz},M3={[-2]:Hh,[-1]:Hh,32:Hh},j3={35:Uz,42:ic,45:[d0,ic],60:qz,61:d0,95:ic,96:c0,126:c0},D3={38:LE,92:PE},O3={[-5]:Fh,[-4]:Fh,[-3]:Fh,33:s3,38:LE,42:Lp,60:[cz,Zz],91:c3,92:[Iz,PE],93:Fm,95:Lp,96:Ez},P3={null:[Lp,k3]},L3={null:[42,95]},z3={null:[]},I3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:L3,contentInitial:_3,disable:z3,document:N3,flow:j3,flowInitial:M3,insideSpan:P3,string:D3,text:O3},Symbol.toStringTag,{value:"Module"}));function B3(e,n,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},s=[];let c=[],f=[];const d={attempt:H(L),check:H(j),consume:R,enter:N,exit:O,interrupt:H(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:S,parser:e,previous:null,sliceSerialize:w,sliceStream:b,write:y};let m=n.tokenize.call(h,d);return n.resolveAll&&s.push(n),h;function y(Z){return c=Kn(c,Z),T(),c[c.length-1]!==null?[]:($(n,0),h.events=Jc(s,h.events,h),h.events)}function w(Z,J){return H3(b(Z),J)}function b(Z){return U3(c,Z)}function S(){const{_bufferIndex:Z,_index:J,line:ne,column:G,offset:ae}=i;return{_bufferIndex:Z,_index:J,line:ne,column:G,offset:ae}}function E(Z){l[Z.line]=Z.column,D()}function T(){let Z;for(;i._index<c.length;){const J=c[i._index];if(typeof J=="string")for(Z=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===Z&&i._bufferIndex<J.length;)A(J.charCodeAt(i._bufferIndex));else A(J)}}function A(Z){m=m(Z)}function R(Z){Te(Z)?(i.line++,i.column=1,i.offset+=Z===-3?2:1,D()):Z!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=Z}function N(Z,J){const ne=J||{};return ne.type=Z,ne.start=S(),h.events.push(["enter",ne,h]),f.push(ne),ne}function O(Z){const J=f.pop();return J.end=S(),h.events.push(["exit",J,h]),J}function L(Z,J){$(Z,J.from)}function j(Z,J){J.restore()}function H(Z,J){return ne;function ne(G,ae,z){let Q,B,ie,k;return Array.isArray(G)?se(G):"tokenize"in G?se([G]):W(G);function W(pe){return le;function le(ve){const Ve=ve!==null&&pe[ve],De=ve!==null&&pe.null,Be=[...Array.isArray(Ve)?Ve:Ve?[Ve]:[],...Array.isArray(De)?De:De?[De]:[]];return se(Be)(ve)}}function se(pe){return Q=pe,B=0,pe.length===0?z:M(pe[B])}function M(pe){return le;function le(ve){return k=Y(),ie=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?Ee():pe.tokenize.call(J?Object.assign(Object.create(h),J):h,d,ce,Ee)(ve)}}function ce(pe){return Z(ie,k),ae}function Ee(pe){return k.restore(),++B<Q.length?M(Q[B]):z}}}function $(Z,J){Z.resolveAll&&!s.includes(Z)&&s.push(Z),Z.resolve&&Ln(h.events,J,h.events.length-J,Z.resolve(h.events.slice(J),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function Y(){const Z=S(),J=h.previous,ne=h.currentConstruct,G=h.events.length,ae=Array.from(f);return{from:G,restore:z};function z(){i=Z,h.previous=J,h.currentConstruct=ne,h.events.length=G,f=ae,D()}}function D(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function U3(e,n){const r=n.start._index,i=n.start._bufferIndex,l=n.end._index,s=n.end._bufferIndex;let c;if(r===l)c=[e[r].slice(i,s)];else{if(c=e.slice(r,l),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}s>0&&c.push(e[l].slice(0,s))}return c}function H3(e,n){let r=-1;const i=[];let l;for(;++r<e.length;){const s=e[r];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
367
367
  `;break}case-3:{c=`\r
368
- `;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&l)continue;c=" ";break}default:c=String.fromCharCode(s)}l=s===-2,i.push(c)}return i.join("")}function F3(e){const i={constructs:jE([I3,...(e||{}).extensions||[]]),content:l(rz),defined:[],document:l(iz),flow:l(E3),lazy:{},string:l(A3),text:l(T3)};return i;function l(s){return c;function c(f){return B3(i,s,f)}}}function V3(e){for(;!zE(e););return e}const h0=/[\0\t\n\r]/g;function q3(){let e=1,n="",r=!0,i;return l;function l(s,c,f){const d=[];let h,m,y,w,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,n="",r&&(s.charCodeAt(0)===65279&&y++,r=void 0);y<s.length;){if(h0.lastIndex=y,h=h0.exec(s),w=h&&h.index!==void 0?h.index:s.length,b=s.charCodeAt(w),!h){n=s.slice(y);break}if(b===10&&y===w&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),y<w&&(d.push(s.slice(y,w)),e+=w-y),b){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}y=w+1}return f&&(i&&d.push(-5),n&&d.push(n),d.push(null)),d}}const $3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function G3(e){return e.replace($3,Y3)}function Y3(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),s=l===120||l===88;return DE(r.slice(s?2:1),s?16:10)}return Hm(r)||e}const VE={}.hasOwnProperty;function K3(e,n,r){return typeof n!="string"&&(r=n,n=void 0),X3(r)(V3(F3(r).document().write(q3()(e,n,!0))))}function X3(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(bn),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(zn),blockQuote:s(De),characterEscape:Y,characterReference:Y,codeFenced:s(Be),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Be,c),codeText:s(We,c),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(Ke),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(xt),hardBreakEscape:s(tr),hardBreakTrailing:s(tr),htmlFlow:s(Rt,c),htmlFlowData:Y,htmlText:s(Rt,c),htmlTextData:Y,image:s(yi),label:c,link:s(bn),listItem:s(hr),listItemValue:w,listOrdered:s(wn,y),listUnordered:s(wn),paragraph:s(ea),reference:M,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(zn),strong:s(Sn),thematicBreak:s(vi)},exit:{atxHeading:d(),atxHeadingSequence:L,autolink:d(),autolinkEmail:Ve,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:pe,characterReference:le,codeFenced:d(T),codeFencedFence:E,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:D,codeIndented:d(A),codeText:d(ae),codeTextData:D,data:D,definition:d(),definitionDestinationString:O,definitionLabelString:R,definitionTitleString:N,emphasis:d(),hardBreakEscape:d(J),hardBreakTrailing:d(J),htmlFlow:d(ne),htmlFlowData:D,htmlText:d(G),htmlTextData:D,image:d(Q),label:ie,labelText:B,lineEnding:Z,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ce,resourceDestinationString:k,resourceTitleString:W,resource:se,setextHeading:d($),setextHeadingLineSequence:H,setextHeadingText:j,strong:d(),thematicBreak:d()}};qE(n,(e||{}).mdastExtensions||[]);const r={};return i;function i(ee){let de={type:"root",children:[]};const ke={stack:[de],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:m,data:r},Ae=[];let Je=-1;for(;++Je<ee.length;)if(ee[Je][1].type==="listOrdered"||ee[Je][1].type==="listUnordered")if(ee[Je][0]==="enter")Ae.push(Je);else{const Zt=Ae.pop();Je=l(ee,Zt,Je)}for(Je=-1;++Je<ee.length;){const Zt=n[ee[Je][0]];VE.call(Zt,ee[Je][1].type)&&Zt[ee[Je][1].type].call(Object.assign({sliceSerialize:ee[Je][2].sliceSerialize},ke),ee[Je][1])}if(ke.tokenStack.length>0){const Zt=ke.tokenStack[ke.tokenStack.length-1];(Zt[1]||p0).call(ke,void 0,Zt[0])}for(de.position={start:ka(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:ka(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<n.transforms.length;)de=n.transforms[Je](de)||de;return de}function l(ee,de,ke){let Ae=de-1,Je=-1,Zt=!1,fn,Wt,In,Jt;for(;++Ae<=ke;){const Nt=ee[Ae];switch(Nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Nt[0]==="enter"?Je++:Je--,Jt=void 0;break}case"lineEndingBlank":{Nt[0]==="enter"&&(fn&&!Jt&&!Je&&!In&&(In=Ae),Jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Jt=void 0}if(!Je&&Nt[0]==="enter"&&Nt[1].type==="listItemPrefix"||Je===-1&&Nt[0]==="exit"&&(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered")){if(fn){let dn=Ae;for(Wt=void 0;dn--;){const En=ee[dn];if(En[1].type==="lineEnding"||En[1].type==="lineEndingBlank"){if(En[0]==="exit")continue;Wt&&(ee[Wt][1].type="lineEndingBlank",Zt=!0),En[1].type="lineEnding",Wt=dn}else if(!(En[1].type==="linePrefix"||En[1].type==="blockQuotePrefix"||En[1].type==="blockQuotePrefixWhitespace"||En[1].type==="blockQuoteMarker"||En[1].type==="listItemIndent"))break}In&&(!Wt||In<Wt)&&(fn._spread=!0),fn.end=Object.assign({},Wt?ee[Wt][1].start:Nt[1].end),ee.splice(Wt||Ae,0,["exit",fn,Nt[2]]),Ae++,ke++}if(Nt[1].type==="listItemPrefix"){const dn={type:"listItem",_spread:!1,start:Object.assign({},Nt[1].start),end:void 0};fn=dn,ee.splice(Ae,0,["enter",dn,Nt[2]]),Ae++,ke++,In=void 0,Jt=!0}}}return ee[de][1]._spread=Zt,ke}function s(ee,de){return ke;function ke(Ae){f.call(this,ee(Ae),Ae),de&&de.call(this,Ae)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ee,de,ke){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([de,ke||void 0]),ee.position={start:ka(de.start),end:void 0}}function d(ee){return de;function de(ke){ee&&ee.call(this,ke),h.call(this,ke)}}function h(ee,de){const ke=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==ee.type&&(de?de.call(this,ee,Ae[0]):(Ae[1]||p0).call(this,ee,Ae[0]));else throw new Error("Cannot close `"+ee.type+"` ("+Fl({start:ee.start,end:ee.end})+"): it’s not open");ke.position.end=ka(ee.end)}function m(){return Um(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function w(ee){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.lang=ee}function S(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.meta=ee}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee.replace(/(\r?\n|\r)$/g,"")}function R(ee){const de=this.resume(),ke=this.stack[this.stack.length-1];ke.label=de,ke.identifier=sr(this.sliceSerialize(ee)).toLowerCase()}function N(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.title=ee}function O(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.url=ee}function L(ee){const de=this.stack[this.stack.length-1];if(!de.depth){const ke=this.sliceSerialize(ee).length;de.depth=ke}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function H(ee){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(ee){const ke=this.stack[this.stack.length-1].children;let Ae=ke[ke.length-1];(!Ae||Ae.type!=="text")&&(Ae=ta(),Ae.position={start:ka(ee.start),end:void 0},ke.push(Ae)),this.stack.push(Ae)}function D(ee){const de=this.stack.pop();de.value+=this.sliceSerialize(ee),de.position.end=ka(ee.end)}function Z(ee){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=de.children[de.children.length-1];ke.position.end=ka(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(de.type)&&(Y.call(this,ee),D.call(this,ee))}function J(){this.data.atHardBreak=!0}function ne(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee}function G(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee}function ae(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee}function z(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=de,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function Q(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=de,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function B(ee){const de=this.sliceSerialize(ee),ke=this.stack[this.stack.length-2];ke.label=G3(de),ke.identifier=sr(de).toLowerCase()}function ie(){const ee=this.stack[this.stack.length-1],de=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Ae=ee.children;ke.children=Ae}else ke.alt=de}function k(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.url=ee}function W(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.title=ee}function se(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function ce(ee){const de=this.resume(),ke=this.stack[this.stack.length-1];ke.label=de,ke.identifier=sr(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Ee(ee){this.data.characterReferenceType=ee.type}function pe(ee){const de=this.sliceSerialize(ee),ke=this.data.characterReferenceType;let Ae;ke?(Ae=DE(de,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=Hm(de);const Je=this.stack[this.stack.length-1];Je.value+=Ae}function le(ee){const de=this.stack.pop();de.position.end=ka(ee.end)}function ve(ee){D.call(this,ee);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ee)}function Ve(ee){D.call(this,ee);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ee)}function De(){return{type:"blockquote",children:[]}}function Be(){return{type:"code",lang:null,meta:null,value:""}}function We(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function zn(){return{type:"heading",depth:0,children:[]}}function tr(){return{type:"break"}}function Rt(){return{type:"html",value:""}}function yi(){return{type:"image",title:null,url:"",alt:null}}function bn(){return{type:"link",title:null,url:"",children:[]}}function wn(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function hr(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function ea(){return{type:"paragraph",children:[]}}function Sn(){return{type:"strong",children:[]}}function ta(){return{type:"text",value:""}}function vi(){return{type:"thematicBreak"}}}function ka(e){return{line:e.line,column:e.column,offset:e.offset}}function qE(e,n){let r=-1;for(;++r<n.length;){const i=n[r];Array.isArray(i)?qE(e,i):Q3(e,i)}}function Q3(e,n){let r;for(r in n)if(VE.call(n,r))switch(r){case"canContainEols":{const i=n[r];i&&e[r].push(...i);break}case"transforms":{const i=n[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=n[r];i&&Object.assign(e[r],i);break}}}function p0(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Fl({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Fl({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Fl({start:n.start,end:n.end})+") is still open")}function Z3(e){const n=this;n.parser=r;function r(i){return K3(i,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function W3(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function J3(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
368
+ `;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&l)continue;c=" ";break}default:c=String.fromCharCode(s)}l=s===-2,i.push(c)}return i.join("")}function F3(e){const i={constructs:jE([I3,...(e||{}).extensions||[]]),content:l(rz),defined:[],document:l(iz),flow:l(E3),lazy:{},string:l(A3),text:l(T3)};return i;function l(s){return c;function c(f){return B3(i,s,f)}}}function V3(e){for(;!zE(e););return e}const h0=/[\0\t\n\r]/g;function q3(){let e=1,n="",r=!0,i;return l;function l(s,c,f){const d=[];let h,m,y,w,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,n="",r&&(s.charCodeAt(0)===65279&&y++,r=void 0);y<s.length;){if(h0.lastIndex=y,h=h0.exec(s),w=h&&h.index!==void 0?h.index:s.length,b=s.charCodeAt(w),!h){n=s.slice(y);break}if(b===10&&y===w&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),y<w&&(d.push(s.slice(y,w)),e+=w-y),b){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}y=w+1}return f&&(i&&d.push(-5),n&&d.push(n),d.push(null)),d}}const $3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function G3(e){return e.replace($3,Y3)}function Y3(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),s=l===120||l===88;return DE(r.slice(s?2:1),s?16:10)}return Hm(r)||e}const VE={}.hasOwnProperty;function K3(e,n,r){return typeof n!="string"&&(r=n,n=void 0),X3(r)(V3(F3(r).document().write(q3()(e,n,!0))))}function X3(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(bn),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(zn),blockQuote:s(De),characterEscape:Y,characterReference:Y,codeFenced:s(Be),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Be,c),codeText:s(We,c),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(Ke),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(xt),hardBreakEscape:s(tr),hardBreakTrailing:s(tr),htmlFlow:s(Rt,c),htmlFlowData:Y,htmlText:s(Rt,c),htmlTextData:Y,image:s(yi),label:c,link:s(bn),listItem:s(hr),listItemValue:w,listOrdered:s(wn,y),listUnordered:s(wn),paragraph:s(ea),reference:M,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(zn),strong:s(Sn),thematicBreak:s(vi)},exit:{atxHeading:d(),atxHeadingSequence:L,autolink:d(),autolinkEmail:Ve,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:pe,characterReference:le,codeFenced:d(T),codeFencedFence:E,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:D,codeIndented:d(A),codeText:d(ae),codeTextData:D,data:D,definition:d(),definitionDestinationString:O,definitionLabelString:R,definitionTitleString:N,emphasis:d(),hardBreakEscape:d(J),hardBreakTrailing:d(J),htmlFlow:d(ne),htmlFlowData:D,htmlText:d(G),htmlTextData:D,image:d(Q),label:ie,labelText:B,lineEnding:Z,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ce,resourceDestinationString:k,resourceTitleString:W,resource:se,setextHeading:d($),setextHeadingLineSequence:H,setextHeadingText:j,strong:d(),thematicBreak:d()}};qE(n,(e||{}).mdastExtensions||[]);const r={};return i;function i(ee){let de={type:"root",children:[]};const ke={stack:[de],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:m,data:r},Ae=[];let Je=-1;for(;++Je<ee.length;)if(ee[Je][1].type==="listOrdered"||ee[Je][1].type==="listUnordered")if(ee[Je][0]==="enter")Ae.push(Je);else{const Zt=Ae.pop();Je=l(ee,Zt,Je)}for(Je=-1;++Je<ee.length;){const Zt=n[ee[Je][0]];VE.call(Zt,ee[Je][1].type)&&Zt[ee[Je][1].type].call(Object.assign({sliceSerialize:ee[Je][2].sliceSerialize},ke),ee[Je][1])}if(ke.tokenStack.length>0){const Zt=ke.tokenStack[ke.tokenStack.length-1];(Zt[1]||p0).call(ke,void 0,Zt[0])}for(de.position={start:ka(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:ka(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<n.transforms.length;)de=n.transforms[Je](de)||de;return de}function l(ee,de,ke){let Ae=de-1,Je=-1,Zt=!1,fn,Wt,In,Jt;for(;++Ae<=ke;){const Nt=ee[Ae];switch(Nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Nt[0]==="enter"?Je++:Je--,Jt=void 0;break}case"lineEndingBlank":{Nt[0]==="enter"&&(fn&&!Jt&&!Je&&!In&&(In=Ae),Jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Jt=void 0}if(!Je&&Nt[0]==="enter"&&Nt[1].type==="listItemPrefix"||Je===-1&&Nt[0]==="exit"&&(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered")){if(fn){let dn=Ae;for(Wt=void 0;dn--;){const En=ee[dn];if(En[1].type==="lineEnding"||En[1].type==="lineEndingBlank"){if(En[0]==="exit")continue;Wt&&(ee[Wt][1].type="lineEndingBlank",Zt=!0),En[1].type="lineEnding",Wt=dn}else if(!(En[1].type==="linePrefix"||En[1].type==="blockQuotePrefix"||En[1].type==="blockQuotePrefixWhitespace"||En[1].type==="blockQuoteMarker"||En[1].type==="listItemIndent"))break}In&&(!Wt||In<Wt)&&(fn._spread=!0),fn.end=Object.assign({},Wt?ee[Wt][1].start:Nt[1].end),ee.splice(Wt||Ae,0,["exit",fn,Nt[2]]),Ae++,ke++}if(Nt[1].type==="listItemPrefix"){const dn={type:"listItem",_spread:!1,start:Object.assign({},Nt[1].start),end:void 0};fn=dn,ee.splice(Ae,0,["enter",dn,Nt[2]]),Ae++,ke++,In=void 0,Jt=!0}}}return ee[de][1]._spread=Zt,ke}function s(ee,de){return ke;function ke(Ae){f.call(this,ee(Ae),Ae),de&&de.call(this,Ae)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ee,de,ke){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([de,ke||void 0]),ee.position={start:ka(de.start),end:void 0}}function d(ee){return de;function de(ke){ee&&ee.call(this,ke),h.call(this,ke)}}function h(ee,de){const ke=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==ee.type&&(de?de.call(this,ee,Ae[0]):(Ae[1]||p0).call(this,ee,Ae[0]));else throw new Error("Cannot close `"+ee.type+"` ("+Hl({start:ee.start,end:ee.end})+"): it’s not open");ke.position.end=ka(ee.end)}function m(){return Um(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function w(ee){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.lang=ee}function S(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.meta=ee}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee.replace(/(\r?\n|\r)$/g,"")}function R(ee){const de=this.resume(),ke=this.stack[this.stack.length-1];ke.label=de,ke.identifier=sr(this.sliceSerialize(ee)).toLowerCase()}function N(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.title=ee}function O(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.url=ee}function L(ee){const de=this.stack[this.stack.length-1];if(!de.depth){const ke=this.sliceSerialize(ee).length;de.depth=ke}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function H(ee){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(ee){const ke=this.stack[this.stack.length-1].children;let Ae=ke[ke.length-1];(!Ae||Ae.type!=="text")&&(Ae=ta(),Ae.position={start:ka(ee.start),end:void 0},ke.push(Ae)),this.stack.push(Ae)}function D(ee){const de=this.stack.pop();de.value+=this.sliceSerialize(ee),de.position.end=ka(ee.end)}function Z(ee){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=de.children[de.children.length-1];ke.position.end=ka(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(de.type)&&(Y.call(this,ee),D.call(this,ee))}function J(){this.data.atHardBreak=!0}function ne(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee}function G(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee}function ae(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.value=ee}function z(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=de,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function Q(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=de,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function B(ee){const de=this.sliceSerialize(ee),ke=this.stack[this.stack.length-2];ke.label=G3(de),ke.identifier=sr(de).toLowerCase()}function ie(){const ee=this.stack[this.stack.length-1],de=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Ae=ee.children;ke.children=Ae}else ke.alt=de}function k(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.url=ee}function W(){const ee=this.resume(),de=this.stack[this.stack.length-1];de.title=ee}function se(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function ce(ee){const de=this.resume(),ke=this.stack[this.stack.length-1];ke.label=de,ke.identifier=sr(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Ee(ee){this.data.characterReferenceType=ee.type}function pe(ee){const de=this.sliceSerialize(ee),ke=this.data.characterReferenceType;let Ae;ke?(Ae=DE(de,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=Hm(de);const Je=this.stack[this.stack.length-1];Je.value+=Ae}function le(ee){const de=this.stack.pop();de.position.end=ka(ee.end)}function ve(ee){D.call(this,ee);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ee)}function Ve(ee){D.call(this,ee);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ee)}function De(){return{type:"blockquote",children:[]}}function Be(){return{type:"code",lang:null,meta:null,value:""}}function We(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function zn(){return{type:"heading",depth:0,children:[]}}function tr(){return{type:"break"}}function Rt(){return{type:"html",value:""}}function yi(){return{type:"image",title:null,url:"",alt:null}}function bn(){return{type:"link",title:null,url:"",children:[]}}function wn(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function hr(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function ea(){return{type:"paragraph",children:[]}}function Sn(){return{type:"strong",children:[]}}function ta(){return{type:"text",value:""}}function vi(){return{type:"thematicBreak"}}}function ka(e){return{line:e.line,column:e.column,offset:e.offset}}function qE(e,n){let r=-1;for(;++r<n.length;){const i=n[r];Array.isArray(i)?qE(e,i):Q3(e,i)}}function Q3(e,n){let r;for(r in n)if(VE.call(n,r))switch(r){case"canContainEols":{const i=n[r];i&&e[r].push(...i);break}case"transforms":{const i=n[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=n[r];i&&Object.assign(e[r],i);break}}}function p0(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Hl({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Hl({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Hl({start:n.start,end:n.end})+") is still open")}function Z3(e){const n=this;n.parser=r;function r(i){return K3(i,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function W3(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function J3(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
369
369
  `}]}function e5(e,n){const r=n.value?n.value+`
370
370
  `:"",i={};n.lang&&(i.className=["language-"+n.lang]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function t5(e,n){const r={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function n5(e,n){const r={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function r5(e,n){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),l=Mo(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let c,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(i,f);const d={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(n,h),e.applyData(n,h)}function a5(e,n){const r={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function i5(e,n){if(e.options.allowDangerousHtml){const r={type:"raw",value:n.value};return e.patch(n,r),e.applyData(n,r)}}function $E(e,n){const r=n.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const l=e.all(n),s=l[0];s&&s.type==="text"?s.value="["+s.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=i:l.push({type:"text",value:i}),l}function o5(e,n){const r=String(n.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return $E(e,n);const l={src:Mo(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const s={type:"element",tagName:"img",properties:l,children:[]};return e.patch(n,s),e.applyData(n,s)}function l5(e,n){const r={src:Mo(n.url)};n.alt!==null&&n.alt!==void 0&&(r.alt=n.alt),n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,i),e.applyData(n,i)}function s5(e,n){const r={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(n,i),e.applyData(n,i)}function u5(e,n){const r=String(n.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return $E(e,n);const l={href:Mo(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const s={type:"element",tagName:"a",properties:l,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function c5(e,n){const r={href:Mo(n.url)};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function f5(e,n,r){const i=e.all(n),l=r?d5(r):GE(n),s={},c=[];if(typeof n.checked=="boolean"){const m=i[0];let y;m&&m.type==="element"&&m.tagName==="p"?y=m:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const m=i[f];(l||f!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
371
371
  `}),m.type==="element"&&m.tagName==="p"&&!l?c.push(...m.children):c.push(m)}const d=i[i.length-1];d&&(l||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
372
- `});const h={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,h),e.applyData(n,h)}function d5(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const r=e.children;let i=-1;for(;!n&&++i<r.length;)n=GE(r[i])}return n}function GE(e){const n=e.spread;return n??e.children.length>1}function h5(e,n){const r={},i=e.all(n);let l=-1;for(typeof n.start=="number"&&n.start!==1&&(r.start=n.start);++l<i.length;){const c=i[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(n,s),e.applyData(n,s)}function p5(e,n){const r={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function m5(e,n){const r={type:"root",children:e.wrap(e.all(n))};return e.patch(n,r),e.applyData(n,r)}function g5(e,n){const r={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function y5(e,n){const r=e.all(n),i=r.shift(),l=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(n.children[0],c),l.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Lm(n.children[1]),d=CE(n.children[n.children.length-1]);f&&d&&(c.position={start:f,end:d}),l.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(n,s),e.applyData(n,s)}function v5(e,n,r){const i=r?r.children:void 0,s=(i?i.indexOf(n):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:n.children.length;let d=-1;const h=[];for(;++d<f;){const y=n.children[d],w={},b=c?c[d]:void 0;b&&(w.align=b);let S={type:"element",tagName:s,properties:w,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),h.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,m),e.applyData(n,m)}function x5(e,n){const r={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}const m0=9,g0=32;function b5(e){const n=String(e),r=/\r?\n|\r/g;let i=r.exec(n),l=0;const s=[];for(;i;)s.push(y0(n.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=r.exec(n);return s.push(y0(n.slice(l),l>0,!1)),s.join("")}function y0(e,n,r){let i=0,l=e.length;if(n){let s=e.codePointAt(i);for(;s===m0||s===g0;)i++,s=e.codePointAt(i)}if(r){let s=e.codePointAt(l-1);for(;s===m0||s===g0;)l--,s=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function w5(e,n){const r={type:"text",value:b5(String(n.value))};return e.patch(n,r),e.applyData(n,r)}function S5(e,n){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,r),e.applyData(n,r)}const E5={blockquote:W3,break:J3,code:e5,delete:t5,emphasis:n5,footnoteReference:r5,heading:a5,html:i5,imageReference:o5,image:l5,inlineCode:s5,linkReference:u5,link:c5,listItem:f5,list:h5,paragraph:p5,root:m5,strong:g5,table:y5,tableCell:x5,tableRow:v5,text:w5,thematicBreak:S5,toml:Yu,yaml:Yu,definition:Yu,footnoteDefinition:Yu};function Yu(){}const YE=-1,ef=0,ql=1,vc=2,Vm=3,qm=4,$m=5,Gm=6,KE=7,XE=8,v0=typeof self=="object"?self:globalThis,C5=(e,n)=>{const r=(l,s)=>(e.set(s,l),l),i=l=>{if(e.has(l))return e.get(l);const[s,c]=n[l];switch(s){case ef:case YE:return r(c,l);case ql:{const f=r([],l);for(const d of c)f.push(i(d));return f}case vc:{const f=r({},l);for(const[d,h]of c)f[i(d)]=i(h);return f}case Vm:return r(new Date(c),l);case qm:{const{source:f,flags:d}=c;return r(new RegExp(f,d),l)}case $m:{const f=r(new Map,l);for(const[d,h]of c)f.set(i(d),i(h));return f}case Gm:{const f=r(new Set,l);for(const d of c)f.add(i(d));return f}case KE:{const{name:f,message:d}=c;return r(new v0[f](d),l)}case XE:return r(BigInt(c),l);case"BigInt":return r(Object(BigInt(c)),l);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(new v0[s](c),l)};return i},x0=e=>C5(new Map,e)(0),oo="",{toString:k5}={},{keys:A5}=Object,Dl=e=>{const n=typeof e;if(n!=="object"||!e)return[ef,n];const r=k5.call(e).slice(8,-1);switch(r){case"Array":return[ql,oo];case"Object":return[vc,oo];case"Date":return[Vm,oo];case"RegExp":return[qm,oo];case"Map":return[$m,oo];case"Set":return[Gm,oo];case"DataView":return[ql,r]}return r.includes("Array")?[ql,r]:r.includes("Error")?[KE,r]:[vc,r]},Ku=([e,n])=>e===ef&&(n==="function"||n==="symbol"),T5=(e,n,r,i)=>{const l=(c,f)=>{const d=i.push(c)-1;return r.set(f,d),d},s=c=>{if(r.has(c))return r.get(c);let[f,d]=Dl(c);switch(f){case ef:{let m=c;switch(d){case"bigint":f=XE,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return l([YE],c)}return l([f,m],c)}case ql:{if(d){let w=c;return d==="DataView"?w=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(w=new Uint8Array(c)),l([d,[...w]],c)}const m=[],y=l([f,m],c);for(const w of c)m.push(s(w));return y}case vc:{if(d)switch(d){case"BigInt":return l([d,c.toString()],c);case"Boolean":case"Number":case"String":return l([d,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const m=[],y=l([f,m],c);for(const w of A5(c))(e||!Ku(Dl(c[w])))&&m.push([s(w),s(c[w])]);return y}case Vm:return l([f,c.toISOString()],c);case qm:{const{source:m,flags:y}=c;return l([f,{source:m,flags:y}],c)}case $m:{const m=[],y=l([f,m],c);for(const[w,b]of c)(e||!(Ku(Dl(w))||Ku(Dl(b))))&&m.push([s(w),s(b)]);return y}case Gm:{const m=[],y=l([f,m],c);for(const w of c)(e||!Ku(Dl(w)))&&m.push(s(w));return y}}const{message:h}=c;return l([f,{name:d,message:h}],c)};return s},b0=(e,{json:n,lossy:r}={})=>{const i=[];return T5(!(n||r),!!n,new Map,i)(e),i},Wl=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?x0(b0(e,n)):structuredClone(e):(e,n)=>x0(b0(e,n));function R5(e,n){const r=[{type:"text",value:"↩"}];return n>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),r}function N5(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function _5(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||R5,i=e.options.footnoteBackLabel||N5,l=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),y=String(h.identifier).toUpperCase(),w=Mo(y.toLowerCase());let b=0;const S=[],E=e.footnoteCounts.get(y);for(;E!==void 0&&++b<=E;){S.length>0&&S.push({type:"text",value:" "});let R=typeof r=="string"?r:r(d,b);typeof R=="string"&&(R={type:"text",value:R}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+w+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const T=m[m.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const R=T.children[T.children.length-1];R&&R.type==="text"?R.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...S)}else m.push(...S);const A={type:"element",tagName:"li",properties:{id:n+"fn-"+w},children:e.wrap(m,!0)};e.patch(h,A),f.push(A)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Wl(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
372
+ `});const h={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,h),e.applyData(n,h)}function d5(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const r=e.children;let i=-1;for(;!n&&++i<r.length;)n=GE(r[i])}return n}function GE(e){const n=e.spread;return n??e.children.length>1}function h5(e,n){const r={},i=e.all(n);let l=-1;for(typeof n.start=="number"&&n.start!==1&&(r.start=n.start);++l<i.length;){const c=i[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(n,s),e.applyData(n,s)}function p5(e,n){const r={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function m5(e,n){const r={type:"root",children:e.wrap(e.all(n))};return e.patch(n,r),e.applyData(n,r)}function g5(e,n){const r={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function y5(e,n){const r=e.all(n),i=r.shift(),l=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(n.children[0],c),l.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Lm(n.children[1]),d=CE(n.children[n.children.length-1]);f&&d&&(c.position={start:f,end:d}),l.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(n,s),e.applyData(n,s)}function v5(e,n,r){const i=r?r.children:void 0,s=(i?i.indexOf(n):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:n.children.length;let d=-1;const h=[];for(;++d<f;){const y=n.children[d],w={},b=c?c[d]:void 0;b&&(w.align=b);let S={type:"element",tagName:s,properties:w,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),h.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,m),e.applyData(n,m)}function x5(e,n){const r={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}const m0=9,g0=32;function b5(e){const n=String(e),r=/\r?\n|\r/g;let i=r.exec(n),l=0;const s=[];for(;i;)s.push(y0(n.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=r.exec(n);return s.push(y0(n.slice(l),l>0,!1)),s.join("")}function y0(e,n,r){let i=0,l=e.length;if(n){let s=e.codePointAt(i);for(;s===m0||s===g0;)i++,s=e.codePointAt(i)}if(r){let s=e.codePointAt(l-1);for(;s===m0||s===g0;)l--,s=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function w5(e,n){const r={type:"text",value:b5(String(n.value))};return e.patch(n,r),e.applyData(n,r)}function S5(e,n){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,r),e.applyData(n,r)}const E5={blockquote:W3,break:J3,code:e5,delete:t5,emphasis:n5,footnoteReference:r5,heading:a5,html:i5,imageReference:o5,image:l5,inlineCode:s5,linkReference:u5,link:c5,listItem:f5,list:h5,paragraph:p5,root:m5,strong:g5,table:y5,tableCell:x5,tableRow:v5,text:w5,thematicBreak:S5,toml:Gu,yaml:Gu,definition:Gu,footnoteDefinition:Gu};function Gu(){}const YE=-1,ef=0,Vl=1,vc=2,Vm=3,qm=4,$m=5,Gm=6,KE=7,XE=8,v0=typeof self=="object"?self:globalThis,C5=(e,n)=>{const r=(l,s)=>(e.set(s,l),l),i=l=>{if(e.has(l))return e.get(l);const[s,c]=n[l];switch(s){case ef:case YE:return r(c,l);case Vl:{const f=r([],l);for(const d of c)f.push(i(d));return f}case vc:{const f=r({},l);for(const[d,h]of c)f[i(d)]=i(h);return f}case Vm:return r(new Date(c),l);case qm:{const{source:f,flags:d}=c;return r(new RegExp(f,d),l)}case $m:{const f=r(new Map,l);for(const[d,h]of c)f.set(i(d),i(h));return f}case Gm:{const f=r(new Set,l);for(const d of c)f.add(i(d));return f}case KE:{const{name:f,message:d}=c;return r(new v0[f](d),l)}case XE:return r(BigInt(c),l);case"BigInt":return r(Object(BigInt(c)),l);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(new v0[s](c),l)};return i},x0=e=>C5(new Map,e)(0),oo="",{toString:k5}={},{keys:A5}=Object,Dl=e=>{const n=typeof e;if(n!=="object"||!e)return[ef,n];const r=k5.call(e).slice(8,-1);switch(r){case"Array":return[Vl,oo];case"Object":return[vc,oo];case"Date":return[Vm,oo];case"RegExp":return[qm,oo];case"Map":return[$m,oo];case"Set":return[Gm,oo];case"DataView":return[Vl,r]}return r.includes("Array")?[Vl,r]:r.includes("Error")?[KE,r]:[vc,r]},Yu=([e,n])=>e===ef&&(n==="function"||n==="symbol"),T5=(e,n,r,i)=>{const l=(c,f)=>{const d=i.push(c)-1;return r.set(f,d),d},s=c=>{if(r.has(c))return r.get(c);let[f,d]=Dl(c);switch(f){case ef:{let m=c;switch(d){case"bigint":f=XE,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return l([YE],c)}return l([f,m],c)}case Vl:{if(d){let w=c;return d==="DataView"?w=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(w=new Uint8Array(c)),l([d,[...w]],c)}const m=[],y=l([f,m],c);for(const w of c)m.push(s(w));return y}case vc:{if(d)switch(d){case"BigInt":return l([d,c.toString()],c);case"Boolean":case"Number":case"String":return l([d,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const m=[],y=l([f,m],c);for(const w of A5(c))(e||!Yu(Dl(c[w])))&&m.push([s(w),s(c[w])]);return y}case Vm:return l([f,c.toISOString()],c);case qm:{const{source:m,flags:y}=c;return l([f,{source:m,flags:y}],c)}case $m:{const m=[],y=l([f,m],c);for(const[w,b]of c)(e||!(Yu(Dl(w))||Yu(Dl(b))))&&m.push([s(w),s(b)]);return y}case Gm:{const m=[],y=l([f,m],c);for(const w of c)(e||!Yu(Dl(w)))&&m.push(s(w));return y}}const{message:h}=c;return l([f,{name:d,message:h}],c)};return s},b0=(e,{json:n,lossy:r}={})=>{const i=[];return T5(!(n||r),!!n,new Map,i)(e),i},Zl=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?x0(b0(e,n)):structuredClone(e):(e,n)=>x0(b0(e,n));function R5(e,n){const r=[{type:"text",value:"↩"}];return n>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),r}function N5(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function _5(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||R5,i=e.options.footnoteBackLabel||N5,l=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),y=String(h.identifier).toUpperCase(),w=Mo(y.toLowerCase());let b=0;const S=[],E=e.footnoteCounts.get(y);for(;E!==void 0&&++b<=E;){S.length>0&&S.push({type:"text",value:" "});let R=typeof r=="string"?r:r(d,b);typeof R=="string"&&(R={type:"text",value:R}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+w+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const T=m[m.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const R=T.children[T.children.length-1];R&&R.type==="text"?R.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...S)}else m.push(...S);const A={type:"element",tagName:"li",properties:{id:n+"fn-"+w},children:e.wrap(m,!0)};e.patch(h,A),f.push(A)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Zl(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
373
373
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
374
- `}]}}const tf=(function(e){if(e==null)return O5;if(typeof e=="function")return nf(e);if(typeof e=="object")return Array.isArray(e)?M5(e):j5(e);if(typeof e=="string")return D5(e);throw new Error("Expected function, string, or object as test")});function M5(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=tf(e[r]);return nf(i);function i(...l){let s=-1;for(;++s<n.length;)if(n[s].apply(this,l))return!0;return!1}}function j5(e){const n=e;return nf(r);function r(i){const l=i;let s;for(s in e)if(l[s]!==n[s])return!1;return!0}}function D5(e){return nf(n);function n(r){return r&&r.type===e}}function nf(e){return n;function n(r,i,l){return!!(P5(r)&&e.call(this,r,typeof i=="number"?i:void 0,l||void 0))}}function O5(){return!0}function P5(e){return e!==null&&typeof e=="object"&&"type"in e}const QE=[],L5=!0,zp=!1,z5="skip";function ZE(e,n,r,i){let l;typeof n=="function"&&typeof r!="function"?(i=r,r=n):l=n;const s=tf(l),c=i?-1:1;f(e,void 0,[])();function f(d,h,m){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return w;function w(){let b=QE,S,E,T;if((!n||s(d,h,m[m.length-1]||void 0))&&(b=I5(r(d,m)),b[0]===zp))return b;if("children"in d&&d.children){const A=d;if(A.children&&b[0]!==z5)for(E=(i?A.children.length:-1)+c,T=m.concat(A);E>-1&&E<A.children.length;){const R=A.children[E];if(S=f(R,E,T)(),S[0]===zp)return S;E=typeof S[1]=="number"?S[1]:E+c}}return b}}}function I5(e){return Array.isArray(e)?e:typeof e=="number"?[L5,e]:e==null?QE:[e]}function Ym(e,n,r,i){let l,s,c;typeof n=="function"&&typeof r!="function"?(s=void 0,c=n,l=r):(s=n,c=r,l=i),ZE(e,s,f,l);function f(d,h){const m=h[h.length-1],y=m?m.children.indexOf(d):void 0;return c(d,y,m)}}const Ip={}.hasOwnProperty,B5={};function U5(e,n){const r=n||B5,i=new Map,l=new Map,s=new Map,c={...E5,...r.handlers},f={all:h,applyData:F5,definitionById:i,footnoteById:l,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:r,patch:H5,wrap:q5};return Ym(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const y=m.type==="definition"?i:l,w=String(m.identifier).toUpperCase();y.has(w)||y.set(w,m)}}),f;function d(m,y){const w=m.type,b=f.handlers[w];if(Ip.call(f.handlers,w)&&b)return b(f,m,y);if(f.options.passThrough&&f.options.passThrough.includes(w)){if("children"in m){const{children:E,...T}=m,A=Wl(T);return A.children=f.all(m),A}return Wl(m)}return(f.options.unknownHandler||V5)(f,m,y)}function h(m){const y=[];if("children"in m){const w=m.children;let b=-1;for(;++b<w.length;){const S=f.one(w[b],m);if(S){if(b&&w[b-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=w0(S.value)),!Array.isArray(S)&&S.type==="element")){const E=S.children[0];E&&E.type==="text"&&(E.value=w0(E.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function H5(e,n){e.position&&(n.position=AE(e))}function F5(e,n){let r=n;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const c="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:c}}r.type==="element"&&s&&Object.assign(r.properties,Wl(s)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function V5(e,n){const r=n.data||{},i="value"in n&&!(Ip.call(r,"hProperties")||Ip.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function q5(e,n){const r=[];let i=-1;for(n&&r.push({type:"text",value:`
374
+ `}]}}const tf=(function(e){if(e==null)return O5;if(typeof e=="function")return nf(e);if(typeof e=="object")return Array.isArray(e)?M5(e):j5(e);if(typeof e=="string")return D5(e);throw new Error("Expected function, string, or object as test")});function M5(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=tf(e[r]);return nf(i);function i(...l){let s=-1;for(;++s<n.length;)if(n[s].apply(this,l))return!0;return!1}}function j5(e){const n=e;return nf(r);function r(i){const l=i;let s;for(s in e)if(l[s]!==n[s])return!1;return!0}}function D5(e){return nf(n);function n(r){return r&&r.type===e}}function nf(e){return n;function n(r,i,l){return!!(P5(r)&&e.call(this,r,typeof i=="number"?i:void 0,l||void 0))}}function O5(){return!0}function P5(e){return e!==null&&typeof e=="object"&&"type"in e}const QE=[],L5=!0,zp=!1,z5="skip";function ZE(e,n,r,i){let l;typeof n=="function"&&typeof r!="function"?(i=r,r=n):l=n;const s=tf(l),c=i?-1:1;f(e,void 0,[])();function f(d,h,m){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return w;function w(){let b=QE,S,E,T;if((!n||s(d,h,m[m.length-1]||void 0))&&(b=I5(r(d,m)),b[0]===zp))return b;if("children"in d&&d.children){const A=d;if(A.children&&b[0]!==z5)for(E=(i?A.children.length:-1)+c,T=m.concat(A);E>-1&&E<A.children.length;){const R=A.children[E];if(S=f(R,E,T)(),S[0]===zp)return S;E=typeof S[1]=="number"?S[1]:E+c}}return b}}}function I5(e){return Array.isArray(e)?e:typeof e=="number"?[L5,e]:e==null?QE:[e]}function Ym(e,n,r,i){let l,s,c;typeof n=="function"&&typeof r!="function"?(s=void 0,c=n,l=r):(s=n,c=r,l=i),ZE(e,s,f,l);function f(d,h){const m=h[h.length-1],y=m?m.children.indexOf(d):void 0;return c(d,y,m)}}const Ip={}.hasOwnProperty,B5={};function U5(e,n){const r=n||B5,i=new Map,l=new Map,s=new Map,c={...E5,...r.handlers},f={all:h,applyData:F5,definitionById:i,footnoteById:l,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:r,patch:H5,wrap:q5};return Ym(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const y=m.type==="definition"?i:l,w=String(m.identifier).toUpperCase();y.has(w)||y.set(w,m)}}),f;function d(m,y){const w=m.type,b=f.handlers[w];if(Ip.call(f.handlers,w)&&b)return b(f,m,y);if(f.options.passThrough&&f.options.passThrough.includes(w)){if("children"in m){const{children:E,...T}=m,A=Zl(T);return A.children=f.all(m),A}return Zl(m)}return(f.options.unknownHandler||V5)(f,m,y)}function h(m){const y=[];if("children"in m){const w=m.children;let b=-1;for(;++b<w.length;){const S=f.one(w[b],m);if(S){if(b&&w[b-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=w0(S.value)),!Array.isArray(S)&&S.type==="element")){const E=S.children[0];E&&E.type==="text"&&(E.value=w0(E.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function H5(e,n){e.position&&(n.position=AE(e))}function F5(e,n){let r=n;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const c="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:c}}r.type==="element"&&s&&Object.assign(r.properties,Zl(s)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function V5(e,n){const r=n.data||{},i="value"in n&&!(Ip.call(r,"hProperties")||Ip.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function q5(e,n){const r=[];let i=-1;for(n&&r.push({type:"text",value:`
375
375
  `});++i<e.length;)i&&r.push({type:"text",value:`
376
376
  `}),r.push(e[i]);return n&&e.length>0&&r.push({type:"text",value:`
377
377
  `}),r}function w0(e){let n=0,r=e.charCodeAt(n);for(;r===9||r===32;)n++,r=e.charCodeAt(n);return e.slice(n)}function S0(e,n){const r=U5(e,n),i=r.one(e,void 0),l=_5(r),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&s.children.push({type:"text",value:`
378
- `},l),s}function $5(e,n){return e&&"run"in e?async function(r,i){const l=S0(r,{file:i,...n});await e.run(l,i)}:function(r,i){return S0(r,{file:i,...e||n})}}function E0(e){if(e)throw e}var Vh,C0;function G5(){if(C0)return Vh;C0=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},s=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!y)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},c=function(h,m){r&&m.name==="__proto__"?r(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},f=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(i)return i(h,m).value}else return;return h[m]};return Vh=function d(){var h,m,y,w,b,S,E=arguments[0],T=1,A=arguments.length,R=!1;for(typeof E=="boolean"&&(R=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<A;++T)if(h=arguments[T],h!=null)for(m in h)y=f(E,m),w=f(h,m),E!==w&&(R&&w&&(s(w)||(b=l(w)))?(b?(b=!1,S=y&&l(y)?y:[]):S=y&&s(y)?y:{},c(E,{name:m,newValue:d(R,S,w)})):typeof w<"u"&&c(E,{name:m,newValue:w}));return E},Vh}var Y5=G5();const qh=Cc(Y5);function Bp(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function K5(){const e=[],n={run:r,use:i};return n;function r(...l){let s=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(d,...h){const m=e[++s];let y=-1;if(d){c(d);return}for(;++y<l.length;)(h[y]===null||h[y]===void 0)&&(h[y]=l[y]);l=h,m?X5(m,f)(...h):c(null,...h)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),n}}function X5(e,n){let r;return i;function i(...c){const f=e.length>c.length;let d;f&&c.push(l);try{d=e.apply(this,c)}catch(h){const m=h;if(f&&r)throw m;return l(m)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,l):d instanceof Error?l(d):s(d))}function l(c,...f){r||(r=!0,n(c,...f))}function s(c){l(null,c)}}const wr={basename:Q5,dirname:Z5,extname:W5,join:J5,sep:"/"};function Q5(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');vs(e);let r=0,i=-1,l=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(s){r=l+1;break}}else i<0&&(s=!0,i=l+1);return i<0?"":e.slice(r,i)}if(n===e)return"";let c=-1,f=n.length-1;for(;l--;)if(e.codePointAt(l)===47){if(s){r=l+1;break}}else c<0&&(s=!0,c=l+1),f>-1&&(e.codePointAt(l)===n.codePointAt(f--)?f<0&&(i=l):(f=-1,i=c));return r===i?i=c:i<0&&(i=e.length),e.slice(r,i)}function Z5(e){if(vs(e),e.length===0)return".";let n=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){n=r;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function W5(e){vs(e);let n=e.length,r=-1,i=0,l=-1,s=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){i=n+1;break}continue}r<0&&(c=!0,r=n+1),f===46?l<0?l=n:s!==1&&(s=1):l>-1&&(s=-1)}return l<0||r<0||s===0||s===1&&l===r-1&&l===i+1?"":e.slice(l,r)}function J5(...e){let n=-1,r;for(;++n<e.length;)vs(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":e6(r)}function e6(e){vs(e);const n=e.codePointAt(0)===47;let r=t6(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}function t6(e,n){let r="",i=0,l=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||s===1))if(l!==c-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(d=r.lastIndexOf("/"),d!==r.length-1){d<0?(r="",i=0):(r=r.slice(0,d),i=r.length-1-r.lastIndexOf("/")),l=c,s=0;continue}}else if(r.length>0){r="",i=0,l=c,s=0;continue}}n&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),i=c-l-1;l=c,s=0}else f===46&&s>-1?s++:s=-1}return r}function vs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const n6={cwd:r6};function r6(){return"/"}function Up(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function a6(e){if(typeof e=="string")e=new URL(e);else if(!Up(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return i6(e)}function i6(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const i=n.codePointAt(r+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(n)}const $h=["history","path","basename","stem","extname","dirname"];class WE{constructor(n){let r;n?Up(n)?r={path:n}:typeof n=="string"||o6(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":n6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<$h.length;){const s=$h[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let l;for(l in r)$h.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?wr.basename(this.path):void 0}set basename(n){Yh(n,"basename"),Gh(n,"basename"),this.path=wr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?wr.dirname(this.path):void 0}set dirname(n){k0(this.basename,"dirname"),this.path=wr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?wr.extname(this.path):void 0}set extname(n){if(Gh(n,"extname"),k0(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Up(n)&&(n=a6(n)),Yh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?wr.basename(this.path,this.extname):void 0}set stem(n){Yh(n,"stem"),Gh(n,"stem"),this.path=wr.join(this.dirname||"",n+(this.extname||""))}fail(n,r,i){const l=this.message(n,r,i);throw l.fatal=!0,l}info(n,r,i){const l=this.message(n,r,i);return l.fatal=void 0,l}message(n,r,i){const l=new rn(n,r,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Gh(e,n){if(e&&e.includes(wr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+wr.sep+"`")}function Yh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function k0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function o6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const l6=(function(e){const i=this.constructor.prototype,l=i[e],s=function(){return l.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),s6={}.hasOwnProperty;class Km extends l6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=K5()}copy(){const n=new Km;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];n.use(...i)}return n.data(qh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(Qh("data",this.frozen),this.namespace[n]=r,this):s6.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Qh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=r.call(n,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=Xu(n),i=this.parser||this.Parser;return Kh("parse",i),i(String(r),r)}process(n,r){const i=this;return this.freeze(),Kh("process",this.parser||this.Parser),Xh("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(s,c){const f=Xu(n),d=i.parse(f);i.run(d,f,function(m,y,w){if(m||!y||!w)return h(m);const b=y,S=i.stringify(b,w);f6(S)?w.value=S:w.result=S,h(m,w)});function h(m,y){m||!y?c(m):s?s(y):r(void 0,y)}}}processSync(n){let r=!1,i;return this.freeze(),Kh("processSync",this.parser||this.Parser),Xh("processSync",this.compiler||this.Compiler),this.process(n,l),T0("processSync","process",r),i;function l(s,c){r=!0,E0(s),i=c}}run(n,r,i){A0(n),this.freeze();const l=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(c,f){const d=Xu(r);l.run(n,d,h);function h(m,y,w){const b=y||n;m?f(m):c?c(b):i(void 0,b,w)}}}runSync(n,r){let i=!1,l;return this.run(n,r,s),T0("runSync","run",i),l;function s(c,f){E0(c),l=f,i=!0}}stringify(n,r){this.freeze();const i=Xu(r),l=this.compiler||this.Compiler;return Xh("stringify",l),A0(n),l(n,i)}use(n,...r){const i=this.attachers,l=this.namespace;if(Qh("use",this.frozen),n!=null)if(typeof n=="function")d(n,r);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...y]=h;d(m,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(l.settings=qh(!0,l.settings,h.settings))}function f(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const y=h[m];s(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let y=-1,w=-1;for(;++y<i.length;)if(i[y][0]===h){w=y;break}if(w===-1)i.push([h,...m]);else if(m.length>0){let[b,...S]=m;const E=i[w][1];Bp(E)&&Bp(b)&&(b=qh(!0,E,b)),i[w]=[h,b,...S]}}}}const u6=new Km().freeze();function Kh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function A0(e){if(!Bp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function T0(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Xu(e){return c6(e)?e:new WE(e)}function c6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function f6(e){return typeof e=="string"||d6(e)}function d6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",R0=[],N0={allowDangerousHtml:!0},p6=/^(https?|ircs?|mailto|xmpp)$/i,m6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function g6(e){const n=y6(e),r=v6(e);return x6(n.runSync(n.parse(r),r),e)}function y6(e){const n=e.rehypePlugins||R0,r=e.remarkPlugins||R0,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...N0}:N0;return u6().use(Z3).use(r).use($5,i).use(n)}function v6(e){const n=e.children||"",r=new WE;return typeof n=="string"&&(r.value=n),r}function x6(e,n){const r=n.allowedElements,i=n.allowElement,l=n.components,s=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,d=n.urlTransform||b6;for(const m of m6)Object.hasOwn(n,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+h6+m.id,void 0);return Ym(e,h),OL(e,{Fragment:g.Fragment,components:l,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function h(m,y,w){if(m.type==="raw"&&w&&typeof y=="number")return c?w.children.splice(y,1):w.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let b;for(b in Uh)if(Object.hasOwn(Uh,b)&&Object.hasOwn(m.properties,b)){const S=m.properties[b],E=Uh[b];(E===null||E.includes(m.tagName))&&(m.properties[b]=d(String(S||""),b,m))}}if(m.type==="element"){let b=r?!r.includes(m.tagName):s?s.includes(m.tagName):!1;if(!b&&i&&typeof y=="number"&&(b=!i(m,y,w)),b&&w&&typeof y=="number")return f&&m.children?w.children.splice(y,1,...m.children):w.children.splice(y,1),y}}}function b6(e){const n=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return n===-1||l!==-1&&n>l||r!==-1&&n>r||i!==-1&&n>i||p6.test(e.slice(0,n))?e:""}function _0(e,n){const r=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,l=r.indexOf(n);for(;l!==-1;)i++,l=r.indexOf(n,l+n.length);return i}function w6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S6(e,n,r){const l=tf((r||{}).ignore||[]),s=E6(n);let c=-1;for(;++c<s.length;)ZE(e,"text",f);function f(h,m){let y=-1,w;for(;++y<m.length;){const b=m[y],S=w?w.children:void 0;if(l(b,S?S.indexOf(b):void 0,w))return;w=b}if(w)return d(h,m)}function d(h,m){const y=m[m.length-1],w=s[c][0],b=s[c][1];let S=0;const T=y.children.indexOf(h);let A=!1,R=[];w.lastIndex=0;let N=w.exec(h.value);for(;N;){const O=N.index,L={index:N.index,input:N.input,stack:[...m,h]};let j=b(...N,L);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?w.lastIndex=O+1:(S!==O&&R.push({type:"text",value:h.value.slice(S,O)}),Array.isArray(j)?R.push(...j):j&&R.push(j),S=O+N[0].length,A=!0),!w.global)break;N=w.exec(h.value)}return A?(S<h.value.length&&R.push({type:"text",value:h.value.slice(S)}),y.children.splice(T,1,...R)):R=[h],T+R.length}}function E6(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const l=r[i];n.push([C6(l[0]),k6(l[1])])}return n}function C6(e){return typeof e=="string"?new RegExp(w6(e),"g"):e}function k6(e){return typeof e=="function"?e:function(){return e}}const Zh="phrasing",Wh=["autolink","link","image","label"];function A6(){return{transforms:[D6],enter:{literalAutolink:R6,literalAutolinkEmail:Jh,literalAutolinkHttp:Jh,literalAutolinkWww:Jh},exit:{literalAutolink:j6,literalAutolinkEmail:M6,literalAutolinkHttp:N6,literalAutolinkWww:_6}}}function T6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zh,notInConstruct:Wh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zh,notInConstruct:Wh},{character:":",before:"[ps]",after:"\\/",inConstruct:Zh,notInConstruct:Wh}]}}function R6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jh(e){this.config.enter.autolinkProtocol.call(this,e)}function N6(e){this.config.exit.autolinkProtocol.call(this,e)}function _6(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function M6(e){this.config.exit.autolinkEmail.call(this,e)}function j6(e){this.exit(e)}function D6(e){S6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,O6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),P6]],{ignore:["link","linkReference"]})}function O6(e,n,r,i,l){let s="";if(!JE(l)||(/^w/i.test(n)&&(r=n+r,n="",s="http://"),!L6(r)))return!1;const c=z6(r+i);if(!c[0])return!1;const f={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function P6(e,n,r,i){return!JE(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+r,children:[{type:"text",value:n+"@"+r}]}}function L6(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function z6(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],i=r.indexOf(")");const l=_0(e,"(");let s=_0(e,")");for(;i!==-1&&l>s;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),s++;return[e,r]}function JE(e,n){const r=e.input.charCodeAt(e.index-1);return(e.index===0||hi(r)||Wc(r))&&(!n||r!==47)}eC.peek=G6;function I6(){this.buffer()}function B6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function U6(){this.buffer()}function H6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function F6(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=sr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function V6(e){this.exit(e)}function q6(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=sr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function $6(e){this.exit(e)}function G6(){return"["}function eC(e,n,r,i){const l=r.createTracker(i);let s=l.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return s+=l.move(r.safe(r.associationId(e),{after:"]",before:s})),f(),c(),s+=l.move("]"),s}function Y6(){return{enter:{gfmFootnoteCallString:I6,gfmFootnoteCall:B6,gfmFootnoteDefinitionLabelString:U6,gfmFootnoteDefinition:H6},exit:{gfmFootnoteCallString:F6,gfmFootnoteCall:V6,gfmFootnoteDefinitionLabelString:q6,gfmFootnoteDefinition:$6}}}function K6(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:r,footnoteReference:eC},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,l,s,c){const f=s.createTracker(c);let d=f.move("[^");const h=s.enter("footnoteDefinition"),m=s.enter("label");return d+=f.move(s.safe(s.associationId(i),{before:d,after:"]"})),m(),d+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),d+=f.move((n?`
378
+ `},l),s}function $5(e,n){return e&&"run"in e?async function(r,i){const l=S0(r,{file:i,...n});await e.run(l,i)}:function(r,i){return S0(r,{file:i,...e||n})}}function E0(e){if(e)throw e}var Vh,C0;function G5(){if(C0)return Vh;C0=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},s=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!y)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},c=function(h,m){r&&m.name==="__proto__"?r(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},f=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(i)return i(h,m).value}else return;return h[m]};return Vh=function d(){var h,m,y,w,b,S,E=arguments[0],T=1,A=arguments.length,R=!1;for(typeof E=="boolean"&&(R=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<A;++T)if(h=arguments[T],h!=null)for(m in h)y=f(E,m),w=f(h,m),E!==w&&(R&&w&&(s(w)||(b=l(w)))?(b?(b=!1,S=y&&l(y)?y:[]):S=y&&s(y)?y:{},c(E,{name:m,newValue:d(R,S,w)})):typeof w<"u"&&c(E,{name:m,newValue:w}));return E},Vh}var Y5=G5();const qh=Cc(Y5);function Bp(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function K5(){const e=[],n={run:r,use:i};return n;function r(...l){let s=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(d,...h){const m=e[++s];let y=-1;if(d){c(d);return}for(;++y<l.length;)(h[y]===null||h[y]===void 0)&&(h[y]=l[y]);l=h,m?X5(m,f)(...h):c(null,...h)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),n}}function X5(e,n){let r;return i;function i(...c){const f=e.length>c.length;let d;f&&c.push(l);try{d=e.apply(this,c)}catch(h){const m=h;if(f&&r)throw m;return l(m)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,l):d instanceof Error?l(d):s(d))}function l(c,...f){r||(r=!0,n(c,...f))}function s(c){l(null,c)}}const wr={basename:Q5,dirname:Z5,extname:W5,join:J5,sep:"/"};function Q5(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ys(e);let r=0,i=-1,l=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(s){r=l+1;break}}else i<0&&(s=!0,i=l+1);return i<0?"":e.slice(r,i)}if(n===e)return"";let c=-1,f=n.length-1;for(;l--;)if(e.codePointAt(l)===47){if(s){r=l+1;break}}else c<0&&(s=!0,c=l+1),f>-1&&(e.codePointAt(l)===n.codePointAt(f--)?f<0&&(i=l):(f=-1,i=c));return r===i?i=c:i<0&&(i=e.length),e.slice(r,i)}function Z5(e){if(ys(e),e.length===0)return".";let n=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){n=r;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function W5(e){ys(e);let n=e.length,r=-1,i=0,l=-1,s=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){i=n+1;break}continue}r<0&&(c=!0,r=n+1),f===46?l<0?l=n:s!==1&&(s=1):l>-1&&(s=-1)}return l<0||r<0||s===0||s===1&&l===r-1&&l===i+1?"":e.slice(l,r)}function J5(...e){let n=-1,r;for(;++n<e.length;)ys(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":e6(r)}function e6(e){ys(e);const n=e.codePointAt(0)===47;let r=t6(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}function t6(e,n){let r="",i=0,l=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||s===1))if(l!==c-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(d=r.lastIndexOf("/"),d!==r.length-1){d<0?(r="",i=0):(r=r.slice(0,d),i=r.length-1-r.lastIndexOf("/")),l=c,s=0;continue}}else if(r.length>0){r="",i=0,l=c,s=0;continue}}n&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),i=c-l-1;l=c,s=0}else f===46&&s>-1?s++:s=-1}return r}function ys(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const n6={cwd:r6};function r6(){return"/"}function Up(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function a6(e){if(typeof e=="string")e=new URL(e);else if(!Up(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return i6(e)}function i6(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const i=n.codePointAt(r+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(n)}const $h=["history","path","basename","stem","extname","dirname"];class WE{constructor(n){let r;n?Up(n)?r={path:n}:typeof n=="string"||o6(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":n6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<$h.length;){const s=$h[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let l;for(l in r)$h.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?wr.basename(this.path):void 0}set basename(n){Yh(n,"basename"),Gh(n,"basename"),this.path=wr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?wr.dirname(this.path):void 0}set dirname(n){k0(this.basename,"dirname"),this.path=wr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?wr.extname(this.path):void 0}set extname(n){if(Gh(n,"extname"),k0(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Up(n)&&(n=a6(n)),Yh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?wr.basename(this.path,this.extname):void 0}set stem(n){Yh(n,"stem"),Gh(n,"stem"),this.path=wr.join(this.dirname||"",n+(this.extname||""))}fail(n,r,i){const l=this.message(n,r,i);throw l.fatal=!0,l}info(n,r,i){const l=this.message(n,r,i);return l.fatal=void 0,l}message(n,r,i){const l=new rn(n,r,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Gh(e,n){if(e&&e.includes(wr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+wr.sep+"`")}function Yh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function k0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function o6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const l6=(function(e){const i=this.constructor.prototype,l=i[e],s=function(){return l.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),s6={}.hasOwnProperty;class Km extends l6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=K5()}copy(){const n=new Km;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];n.use(...i)}return n.data(qh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(Qh("data",this.frozen),this.namespace[n]=r,this):s6.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Qh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=r.call(n,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=Ku(n),i=this.parser||this.Parser;return Kh("parse",i),i(String(r),r)}process(n,r){const i=this;return this.freeze(),Kh("process",this.parser||this.Parser),Xh("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(s,c){const f=Ku(n),d=i.parse(f);i.run(d,f,function(m,y,w){if(m||!y||!w)return h(m);const b=y,S=i.stringify(b,w);f6(S)?w.value=S:w.result=S,h(m,w)});function h(m,y){m||!y?c(m):s?s(y):r(void 0,y)}}}processSync(n){let r=!1,i;return this.freeze(),Kh("processSync",this.parser||this.Parser),Xh("processSync",this.compiler||this.Compiler),this.process(n,l),T0("processSync","process",r),i;function l(s,c){r=!0,E0(s),i=c}}run(n,r,i){A0(n),this.freeze();const l=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(c,f){const d=Ku(r);l.run(n,d,h);function h(m,y,w){const b=y||n;m?f(m):c?c(b):i(void 0,b,w)}}}runSync(n,r){let i=!1,l;return this.run(n,r,s),T0("runSync","run",i),l;function s(c,f){E0(c),l=f,i=!0}}stringify(n,r){this.freeze();const i=Ku(r),l=this.compiler||this.Compiler;return Xh("stringify",l),A0(n),l(n,i)}use(n,...r){const i=this.attachers,l=this.namespace;if(Qh("use",this.frozen),n!=null)if(typeof n=="function")d(n,r);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...y]=h;d(m,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(l.settings=qh(!0,l.settings,h.settings))}function f(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const y=h[m];s(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let y=-1,w=-1;for(;++y<i.length;)if(i[y][0]===h){w=y;break}if(w===-1)i.push([h,...m]);else if(m.length>0){let[b,...S]=m;const E=i[w][1];Bp(E)&&Bp(b)&&(b=qh(!0,E,b)),i[w]=[h,b,...S]}}}}const u6=new Km().freeze();function Kh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function A0(e){if(!Bp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function T0(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ku(e){return c6(e)?e:new WE(e)}function c6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function f6(e){return typeof e=="string"||d6(e)}function d6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",R0=[],N0={allowDangerousHtml:!0},p6=/^(https?|ircs?|mailto|xmpp)$/i,m6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function g6(e){const n=y6(e),r=v6(e);return x6(n.runSync(n.parse(r),r),e)}function y6(e){const n=e.rehypePlugins||R0,r=e.remarkPlugins||R0,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...N0}:N0;return u6().use(Z3).use(r).use($5,i).use(n)}function v6(e){const n=e.children||"",r=new WE;return typeof n=="string"&&(r.value=n),r}function x6(e,n){const r=n.allowedElements,i=n.allowElement,l=n.components,s=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,d=n.urlTransform||b6;for(const m of m6)Object.hasOwn(n,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+h6+m.id,void 0);return Ym(e,h),OL(e,{Fragment:g.Fragment,components:l,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function h(m,y,w){if(m.type==="raw"&&w&&typeof y=="number")return c?w.children.splice(y,1):w.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let b;for(b in Uh)if(Object.hasOwn(Uh,b)&&Object.hasOwn(m.properties,b)){const S=m.properties[b],E=Uh[b];(E===null||E.includes(m.tagName))&&(m.properties[b]=d(String(S||""),b,m))}}if(m.type==="element"){let b=r?!r.includes(m.tagName):s?s.includes(m.tagName):!1;if(!b&&i&&typeof y=="number"&&(b=!i(m,y,w)),b&&w&&typeof y=="number")return f&&m.children?w.children.splice(y,1,...m.children):w.children.splice(y,1),y}}}function b6(e){const n=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return n===-1||l!==-1&&n>l||r!==-1&&n>r||i!==-1&&n>i||p6.test(e.slice(0,n))?e:""}function _0(e,n){const r=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,l=r.indexOf(n);for(;l!==-1;)i++,l=r.indexOf(n,l+n.length);return i}function w6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S6(e,n,r){const l=tf((r||{}).ignore||[]),s=E6(n);let c=-1;for(;++c<s.length;)ZE(e,"text",f);function f(h,m){let y=-1,w;for(;++y<m.length;){const b=m[y],S=w?w.children:void 0;if(l(b,S?S.indexOf(b):void 0,w))return;w=b}if(w)return d(h,m)}function d(h,m){const y=m[m.length-1],w=s[c][0],b=s[c][1];let S=0;const T=y.children.indexOf(h);let A=!1,R=[];w.lastIndex=0;let N=w.exec(h.value);for(;N;){const O=N.index,L={index:N.index,input:N.input,stack:[...m,h]};let j=b(...N,L);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?w.lastIndex=O+1:(S!==O&&R.push({type:"text",value:h.value.slice(S,O)}),Array.isArray(j)?R.push(...j):j&&R.push(j),S=O+N[0].length,A=!0),!w.global)break;N=w.exec(h.value)}return A?(S<h.value.length&&R.push({type:"text",value:h.value.slice(S)}),y.children.splice(T,1,...R)):R=[h],T+R.length}}function E6(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const l=r[i];n.push([C6(l[0]),k6(l[1])])}return n}function C6(e){return typeof e=="string"?new RegExp(w6(e),"g"):e}function k6(e){return typeof e=="function"?e:function(){return e}}const Zh="phrasing",Wh=["autolink","link","image","label"];function A6(){return{transforms:[D6],enter:{literalAutolink:R6,literalAutolinkEmail:Jh,literalAutolinkHttp:Jh,literalAutolinkWww:Jh},exit:{literalAutolink:j6,literalAutolinkEmail:M6,literalAutolinkHttp:N6,literalAutolinkWww:_6}}}function T6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zh,notInConstruct:Wh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zh,notInConstruct:Wh},{character:":",before:"[ps]",after:"\\/",inConstruct:Zh,notInConstruct:Wh}]}}function R6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jh(e){this.config.enter.autolinkProtocol.call(this,e)}function N6(e){this.config.exit.autolinkProtocol.call(this,e)}function _6(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function M6(e){this.config.exit.autolinkEmail.call(this,e)}function j6(e){this.exit(e)}function D6(e){S6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,O6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),P6]],{ignore:["link","linkReference"]})}function O6(e,n,r,i,l){let s="";if(!JE(l)||(/^w/i.test(n)&&(r=n+r,n="",s="http://"),!L6(r)))return!1;const c=z6(r+i);if(!c[0])return!1;const f={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function P6(e,n,r,i){return!JE(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+r,children:[{type:"text",value:n+"@"+r}]}}function L6(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function z6(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],i=r.indexOf(")");const l=_0(e,"(");let s=_0(e,")");for(;i!==-1&&l>s;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),s++;return[e,r]}function JE(e,n){const r=e.input.charCodeAt(e.index-1);return(e.index===0||hi(r)||Wc(r))&&(!n||r!==47)}eC.peek=G6;function I6(){this.buffer()}function B6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function U6(){this.buffer()}function H6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function F6(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=sr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function V6(e){this.exit(e)}function q6(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=sr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function $6(e){this.exit(e)}function G6(){return"["}function eC(e,n,r,i){const l=r.createTracker(i);let s=l.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return s+=l.move(r.safe(r.associationId(e),{after:"]",before:s})),f(),c(),s+=l.move("]"),s}function Y6(){return{enter:{gfmFootnoteCallString:I6,gfmFootnoteCall:B6,gfmFootnoteDefinitionLabelString:U6,gfmFootnoteDefinition:H6},exit:{gfmFootnoteCallString:F6,gfmFootnoteCall:V6,gfmFootnoteDefinitionLabelString:q6,gfmFootnoteDefinition:$6}}}function K6(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:r,footnoteReference:eC},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,l,s,c){const f=s.createTracker(c);let d=f.move("[^");const h=s.enter("footnoteDefinition"),m=s.enter("label");return d+=f.move(s.safe(s.associationId(i),{before:d,after:"]"})),m(),d+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),d+=f.move((n?`
379
379
  `:" ")+s.indentLines(s.containerFlow(i,f.current()),n?tC:X6))),h(),d}}function X6(e,n,r){return n===0?e:tC(e,n,r)}function tC(e,n,r){return(r?"":" ")+e}const Q6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nC.peek=tI;function Z6(){return{canContainEols:["delete"],enter:{strikethrough:J6},exit:{strikethrough:eI}}}function W6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Q6}],handlers:{delete:nC}}}function J6(e){this.enter({type:"delete",children:[]},e)}function eI(e){this.exit(e)}function nC(e,n,r,i){const l=r.createTracker(i),s=r.enter("strikethrough");let c=l.move("~~");return c+=r.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),s(),c}function tI(){return"~"}function nI(e){return e.length}function rI(e,n){const r=n||{},i=(r.align||[]).concat(),l=r.stringLength||nI,s=[],c=[],f=[],d=[];let h=0,m=-1;for(;++m<e.length;){const E=[],T=[];let A=-1;for(e[m].length>h&&(h=e[m].length);++A<e[m].length;){const R=aI(e[m][A]);if(r.alignDelimiters!==!1){const N=l(R);T[A]=N,(d[A]===void 0||N>d[A])&&(d[A]=N)}E.push(R)}c[m]=E,f[m]=T}let y=-1;if(typeof i=="object"&&"length"in i)for(;++y<h;)s[y]=M0(i[y]);else{const E=M0(i);for(;++y<h;)s[y]=E}y=-1;const w=[],b=[];for(;++y<h;){const E=s[y];let T="",A="";E===99?(T=":",A=":"):E===108?T=":":E===114&&(A=":");let R=r.alignDelimiters===!1?1:Math.max(1,d[y]-T.length-A.length);const N=T+"-".repeat(R)+A;r.alignDelimiters!==!1&&(R=T.length+R+A.length,R>d[y]&&(d[y]=R),b[y]=R),w[y]=N}c.splice(1,0,w),f.splice(1,0,b),m=-1;const S=[];for(;++m<c.length;){const E=c[m],T=f[m];y=-1;const A=[];for(;++y<h;){const R=E[y]||"";let N="",O="";if(r.alignDelimiters!==!1){const L=d[y]-(T[y]||0),j=s[y];j===114?N=" ".repeat(L):j===99?L%2?(N=" ".repeat(L/2+.5),O=" ".repeat(L/2-.5)):(N=" ".repeat(L/2),O=N):O=" ".repeat(L)}r.delimiterStart!==!1&&!y&&A.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&R==="")&&(r.delimiterStart!==!1||y)&&A.push(" "),r.alignDelimiters!==!1&&A.push(N),A.push(R),r.alignDelimiters!==!1&&A.push(O),r.padding!==!1&&A.push(" "),(r.delimiterEnd!==!1||y!==h-1)&&A.push("|")}S.push(r.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return S.join(`
380
380
  `)}function aI(e){return e==null?"":String(e)}function M0(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function iI(e,n,r,i){const l=r.enter("blockquote"),s=r.createTracker(i);s.move("> "),s.shift(2);const c=r.indentLines(r.containerFlow(e,s.current()),oI);return l(),c}function oI(e,n,r){return">"+(r?"":" ")+e}function lI(e,n){return j0(e,n.inConstruct,!0)&&!j0(e,n.notInConstruct,!1)}function j0(e,n,r){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return r;let i=-1;for(;++i<n.length;)if(e.includes(n[i]))return!0;return!1}function D0(e,n,r,i){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
381
381
  `&&lI(r.stack,r.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
@@ -383,20 +383,20 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
383
383
  `,encode:["`"],...f.current()})),y()}return m+=f.move(`
384
384
  `),s&&(m+=f.move(s+`
385
385
  `)),m+=f.move(d),h(),m}function dI(e,n,r){return(r?"":" ")+e}function Xm(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function hI(e,n,r,i){const l=Xm(r),s=l==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const d=r.createTracker(i);let h=d.move("[");return h+=d.move(r.safe(r.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(r.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=r.enter("destinationRaw"),h+=d.move(r.safe(e.url,{before:h,after:e.title?" ":`
386
- `,...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),h+=d.move(" "+l),h+=d.move(r.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),c(),h}function pI(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Jl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xc(e,n,r){const i=go(e),l=go(n);return i===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}rC.peek=mI;function rC(e,n,r,i){const l=pI(r),s=r.enter("emphasis"),c=r.createTracker(i),f=c.move(l);let d=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),m=xc(i.before.charCodeAt(i.before.length-1),h,l);m.inside&&(d=Jl(h)+d.slice(1));const y=d.charCodeAt(d.length-1),w=xc(i.after.charCodeAt(0),y,l);w.inside&&(d=d.slice(0,-1)+Jl(y));const b=c.move(l);return s(),r.attentionEncodeSurroundingInfo={after:w.outside,before:m.outside},f+d+b}function mI(e,n,r){return r.options.emphasis||"*"}function gI(e,n){let r=!1;return Ym(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,zp}),!!((!e.depth||e.depth<3)&&Um(e)&&(n.options.setext||r))}function yI(e,n,r,i){const l=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(i);if(gI(e,r)){const m=r.enter("headingSetext"),y=r.enter("phrasing"),w=r.containerPhrasing(e,{...s.current(),before:`
386
+ `,...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),h+=d.move(" "+l),h+=d.move(r.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),c(),h}function pI(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Wl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xc(e,n,r){const i=go(e),l=go(n);return i===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}rC.peek=mI;function rC(e,n,r,i){const l=pI(r),s=r.enter("emphasis"),c=r.createTracker(i),f=c.move(l);let d=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),m=xc(i.before.charCodeAt(i.before.length-1),h,l);m.inside&&(d=Wl(h)+d.slice(1));const y=d.charCodeAt(d.length-1),w=xc(i.after.charCodeAt(0),y,l);w.inside&&(d=d.slice(0,-1)+Wl(y));const b=c.move(l);return s(),r.attentionEncodeSurroundingInfo={after:w.outside,before:m.outside},f+d+b}function mI(e,n,r){return r.options.emphasis||"*"}function gI(e,n){let r=!1;return Ym(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,zp}),!!((!e.depth||e.depth<3)&&Um(e)&&(n.options.setext||r))}function yI(e,n,r,i){const l=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(i);if(gI(e,r)){const m=r.enter("headingSetext"),y=r.enter("phrasing"),w=r.containerPhrasing(e,{...s.current(),before:`
387
387
  `,after:`
388
388
  `});return y(),m(),w+`
389
389
  `+(l===1?"=":"-").repeat(w.length-(Math.max(w.lastIndexOf("\r"),w.lastIndexOf(`
390
390
  `))+1))}const c="#".repeat(l),f=r.enter("headingAtx"),d=r.enter("phrasing");s.move(c+" ");let h=r.containerPhrasing(e,{before:"# ",after:`
391
- `,...s.current()});return/^[\t ]/.test(h)&&(h=Jl(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,r.options.closeAtx&&(h+=" "+c),d(),f(),h}aC.peek=vI;function aC(e){return e.value||""}function vI(){return"<"}iC.peek=xI;function iC(e,n,r,i){const l=Xm(r),s=l==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const d=r.createTracker(i);let h=d.move("![");return h+=d.move(r.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(r.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=r.enter("destinationRaw"),h+=d.move(r.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),h+=d.move(" "+l),h+=d.move(r.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),h+=d.move(")"),c(),h}function xI(){return"!"}oC.peek=bI;function oC(e,n,r,i){const l=e.referenceType,s=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(i);let d=f.move("![");const h=r.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const m=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return c(),r.stack=m,s(),l==="full"||!h||h!==y?d+=f.move(y+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function bI(){return"!"}lC.peek=wI;function lC(e,n,r){let i=e.value||"",l="`",s=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<r.unsafe.length;){const c=r.unsafe[s],f=r.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(i);){let h=d.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(d.index+1)}}return l+i+l}function wI(){return"`"}function sC(e,n){const r=Um(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}uC.peek=SI;function uC(e,n,r,i){const l=Xm(r),s=l==='"'?"Quote":"Apostrophe",c=r.createTracker(i);let f,d;if(sC(e,r)){const m=r.stack;r.stack=[],f=r.enter("autolink");let y=c.move("<");return y+=c.move(r.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),r.stack=m,y}f=r.enter("link"),d=r.enter("label");let h=c.move("[");return h+=c.move(r.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(r.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=r.enter("destinationRaw"),h+=c.move(r.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=r.enter(`title${s}`),h+=c.move(" "+l),h+=c.move(r.safe(e.title,{before:h,after:l,...c.current()})),h+=c.move(l),d()),h+=c.move(")"),f(),h}function SI(e,n,r){return sC(e,r)?"<":"["}cC.peek=EI;function cC(e,n,r,i){const l=e.referenceType,s=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(i);let d=f.move("[");const h=r.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const m=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return c(),r.stack=m,s(),l==="full"||!h||h!==y?d+=f.move(y+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function EI(){return"["}function Qm(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function CI(e){const n=Qm(e),r=e.options.bulletOther;if(!r)return n==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+r+"`) to be different");return r}function kI(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function fC(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function AI(e,n,r,i){const l=r.enter("list"),s=r.bulletCurrent;let c=e.ordered?kI(r):Qm(r);const f=e.ordered?c==="."?")":".":CI(r);let d=n&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(d=!0),fC(r)===c&&m){let y=-1;for(;++y<e.children.length;){const w=e.children[y];if(w&&w.type==="listItem"&&w.children&&w.children[0]&&w.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),r.bulletCurrent=c;const h=r.containerFlow(e,i);return r.bulletLastUsed=c,r.bulletCurrent=s,l(),h}function TI(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function RI(e,n,r,i){const l=TI(r);let s=r.bulletCurrent||Qm(r);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(r.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let c=s.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(i);f.move(s+" ".repeat(c-s.length)),f.shift(c);const d=r.enter("listItem"),h=r.indentLines(r.containerFlow(e,f.current()),m);return d(),h;function m(y,w,b){return w?(b?"":" ".repeat(c))+y:(b?s:s+" ".repeat(c-s.length))+y}}function NI(e,n,r,i){const l=r.enter("paragraph"),s=r.enter("phrasing"),c=r.containerPhrasing(e,i);return s(),l(),c}const _I=tf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MI(e,n,r,i){return(e.children.some(function(c){return _I(c)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function jI(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}dC.peek=DI;function dC(e,n,r,i){const l=jI(r),s=r.enter("strong"),c=r.createTracker(i),f=c.move(l+l);let d=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),m=xc(i.before.charCodeAt(i.before.length-1),h,l);m.inside&&(d=Jl(h)+d.slice(1));const y=d.charCodeAt(d.length-1),w=xc(i.after.charCodeAt(0),y,l);w.inside&&(d=d.slice(0,-1)+Jl(y));const b=c.move(l+l);return s(),r.attentionEncodeSurroundingInfo={after:w.outside,before:m.outside},f+d+b}function DI(e,n,r){return r.options.strong||"*"}function OI(e,n,r,i){return r.safe(e.value,i)}function PI(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function LI(e,n,r){const i=(fC(r)+(r.options.ruleSpaces?" ":"")).repeat(PI(r));return r.options.ruleSpaces?i.slice(0,-1):i}const hC={blockquote:iI,break:D0,code:fI,definition:hI,emphasis:rC,hardBreak:D0,heading:yI,html:aC,image:iC,imageReference:oC,inlineCode:lC,link:uC,linkReference:cC,list:AI,listItem:RI,paragraph:NI,root:MI,strong:dC,text:OI,thematicBreak:LI};function zI(){return{enter:{table:II,tableData:O0,tableHeader:O0,tableRow:UI},exit:{codeText:HI,table:BI,tableData:ep,tableHeader:ep,tableRow:ep}}}function II(e){const n=e._align;this.enter({type:"table",align:n.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function BI(e){this.exit(e),this.data.inTable=void 0}function UI(e){this.enter({type:"tableRow",children:[]},e)}function ep(e){this.exit(e)}function O0(e){this.enter({type:"tableCell",children:[]},e)}function HI(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,FI));const r=this.stack[this.stack.length-1];r.type,r.value=n,this.exit(e)}function FI(e,n){return n==="|"?n:e}function VI(e){const n=e||{},r=n.tableCellPadding,i=n.tablePipeAlign,l=n.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
391
+ `,...s.current()});return/^[\t ]/.test(h)&&(h=Wl(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,r.options.closeAtx&&(h+=" "+c),d(),f(),h}aC.peek=vI;function aC(e){return e.value||""}function vI(){return"<"}iC.peek=xI;function iC(e,n,r,i){const l=Xm(r),s=l==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const d=r.createTracker(i);let h=d.move("![");return h+=d.move(r.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(r.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=r.enter("destinationRaw"),h+=d.move(r.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),h+=d.move(" "+l),h+=d.move(r.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),h+=d.move(")"),c(),h}function xI(){return"!"}oC.peek=bI;function oC(e,n,r,i){const l=e.referenceType,s=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(i);let d=f.move("![");const h=r.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const m=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return c(),r.stack=m,s(),l==="full"||!h||h!==y?d+=f.move(y+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function bI(){return"!"}lC.peek=wI;function lC(e,n,r){let i=e.value||"",l="`",s=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<r.unsafe.length;){const c=r.unsafe[s],f=r.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(i);){let h=d.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(d.index+1)}}return l+i+l}function wI(){return"`"}function sC(e,n){const r=Um(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}uC.peek=SI;function uC(e,n,r,i){const l=Xm(r),s=l==='"'?"Quote":"Apostrophe",c=r.createTracker(i);let f,d;if(sC(e,r)){const m=r.stack;r.stack=[],f=r.enter("autolink");let y=c.move("<");return y+=c.move(r.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),r.stack=m,y}f=r.enter("link"),d=r.enter("label");let h=c.move("[");return h+=c.move(r.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(r.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=r.enter("destinationRaw"),h+=c.move(r.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=r.enter(`title${s}`),h+=c.move(" "+l),h+=c.move(r.safe(e.title,{before:h,after:l,...c.current()})),h+=c.move(l),d()),h+=c.move(")"),f(),h}function SI(e,n,r){return sC(e,r)?"<":"["}cC.peek=EI;function cC(e,n,r,i){const l=e.referenceType,s=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(i);let d=f.move("[");const h=r.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const m=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return c(),r.stack=m,s(),l==="full"||!h||h!==y?d+=f.move(y+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function EI(){return"["}function Qm(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function CI(e){const n=Qm(e),r=e.options.bulletOther;if(!r)return n==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+r+"`) to be different");return r}function kI(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function fC(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function AI(e,n,r,i){const l=r.enter("list"),s=r.bulletCurrent;let c=e.ordered?kI(r):Qm(r);const f=e.ordered?c==="."?")":".":CI(r);let d=n&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(d=!0),fC(r)===c&&m){let y=-1;for(;++y<e.children.length;){const w=e.children[y];if(w&&w.type==="listItem"&&w.children&&w.children[0]&&w.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),r.bulletCurrent=c;const h=r.containerFlow(e,i);return r.bulletLastUsed=c,r.bulletCurrent=s,l(),h}function TI(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function RI(e,n,r,i){const l=TI(r);let s=r.bulletCurrent||Qm(r);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(r.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let c=s.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(i);f.move(s+" ".repeat(c-s.length)),f.shift(c);const d=r.enter("listItem"),h=r.indentLines(r.containerFlow(e,f.current()),m);return d(),h;function m(y,w,b){return w?(b?"":" ".repeat(c))+y:(b?s:s+" ".repeat(c-s.length))+y}}function NI(e,n,r,i){const l=r.enter("paragraph"),s=r.enter("phrasing"),c=r.containerPhrasing(e,i);return s(),l(),c}const _I=tf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MI(e,n,r,i){return(e.children.some(function(c){return _I(c)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function jI(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}dC.peek=DI;function dC(e,n,r,i){const l=jI(r),s=r.enter("strong"),c=r.createTracker(i),f=c.move(l+l);let d=c.move(r.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),m=xc(i.before.charCodeAt(i.before.length-1),h,l);m.inside&&(d=Wl(h)+d.slice(1));const y=d.charCodeAt(d.length-1),w=xc(i.after.charCodeAt(0),y,l);w.inside&&(d=d.slice(0,-1)+Wl(y));const b=c.move(l+l);return s(),r.attentionEncodeSurroundingInfo={after:w.outside,before:m.outside},f+d+b}function DI(e,n,r){return r.options.strong||"*"}function OI(e,n,r,i){return r.safe(e.value,i)}function PI(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function LI(e,n,r){const i=(fC(r)+(r.options.ruleSpaces?" ":"")).repeat(PI(r));return r.options.ruleSpaces?i.slice(0,-1):i}const hC={blockquote:iI,break:D0,code:fI,definition:hI,emphasis:rC,hardBreak:D0,heading:yI,html:aC,image:iC,imageReference:oC,inlineCode:lC,link:uC,linkReference:cC,list:AI,listItem:RI,paragraph:NI,root:MI,strong:dC,text:OI,thematicBreak:LI};function zI(){return{enter:{table:II,tableData:O0,tableHeader:O0,tableRow:UI},exit:{codeText:HI,table:BI,tableData:ep,tableHeader:ep,tableRow:ep}}}function II(e){const n=e._align;this.enter({type:"table",align:n.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function BI(e){this.exit(e),this.data.inTable=void 0}function UI(e){this.enter({type:"tableRow",children:[]},e)}function ep(e){this.exit(e)}function O0(e){this.enter({type:"tableCell",children:[]},e)}function HI(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,FI));const r=this.stack[this.stack.length-1];r.type,r.value=n,this.exit(e)}function FI(e,n){return n==="|"?n:e}function VI(e){const n=e||{},r=n.tableCellPadding,i=n.tablePipeAlign,l=n.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
392
392
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:w,table:c,tableCell:d,tableRow:f}};function c(b,S,E,T){return h(m(b,E,T),b.align)}function f(b,S,E,T){const A=y(b,E,T),R=h([A]);return R.slice(0,R.indexOf(`
393
- `))}function d(b,S,E,T){const A=E.enter("tableCell"),R=E.enter("phrasing"),N=E.containerPhrasing(b,{...T,before:s,after:s});return R(),A(),N}function h(b,S){return rI(b,{align:S,alignDelimiters:i,padding:r,stringLength:l})}function m(b,S,E){const T=b.children;let A=-1;const R=[],N=S.enter("table");for(;++A<T.length;)R[A]=y(T[A],S,E);return N(),R}function y(b,S,E){const T=b.children;let A=-1;const R=[],N=S.enter("tableRow");for(;++A<T.length;)R[A]=d(T[A],b,S,E);return N(),R}function w(b,S,E){let T=hC.inlineCode(b,S,E);return E.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function qI(){return{exit:{taskListCheckValueChecked:P0,taskListCheckValueUnchecked:P0,paragraph:GI}}}function $I(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:YI}}}function P0(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function GI(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const l=n.children;let s=-1,c;for(;++s<l.length;){const f=l[s];if(f.type==="paragraph"){c=f;break}}c===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function YI(e,n,r,i){const l=e.children[0],s=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(i);s&&f.move(c);let d=hC.listItem(e,n,r,{...i,...f.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+c}}function KI(){return[A6(),Y6(),Z6(),zI(),qI()]}function XI(e){return{extensions:[T6(),K6(e),W6(),VI(e),$I()]}}const QI={tokenize:n9,partial:!0},pC={tokenize:r9,partial:!0},mC={tokenize:a9,partial:!0},gC={tokenize:i9,partial:!0},ZI={tokenize:o9,partial:!0},yC={name:"wwwAutolink",tokenize:e9,previous:xC},vC={name:"protocolAutolink",tokenize:t9,previous:bC},Wr={name:"emailAutolink",tokenize:JI,previous:wC},Nr={};function WI(){return{text:Nr}}let ni=48;for(;ni<123;)Nr[ni]=Wr,ni++,ni===58?ni=65:ni===91&&(ni=97);Nr[43]=Wr;Nr[45]=Wr;Nr[46]=Wr;Nr[95]=Wr;Nr[72]=[Wr,vC];Nr[104]=[Wr,vC];Nr[87]=[Wr,yC];Nr[119]=[Wr,yC];function JI(e,n,r){const i=this;let l,s;return c;function c(y){return!Hp(y)||!wC.call(i,i.previous)||Zm(i.events)?r(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Hp(y)?(e.consume(y),f):y===64?(e.consume(y),d):r(y)}function d(y){return y===46?e.check(ZI,m,h)(y):y===45||y===95||nn(y)?(s=!0,e.consume(y),d):m(y)}function h(y){return e.consume(y),l=!0,d}function m(y){return s&&l&&sn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):r(y)}}function e9(e,n,r){const i=this;return l;function l(c){return c!==87&&c!==119||!xC.call(i,i.previous)||Zm(i.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(QI,e.attempt(pC,e.attempt(mC,s),r),r)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function t9(e,n,r){const i=this;let l="",s=!1;return c;function c(y){return(y===72||y===104)&&bC.call(i,i.previous)&&!Zm(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(y),e.consume(y),f):r(y)}function f(y){if(sn(y)&&l.length<5)return l+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const w=l.toLowerCase();if(w==="http"||w==="https")return e.consume(y),d}return r(y)}function d(y){return y===47?(e.consume(y),s?h:(s=!0,d)):r(y)}function h(y){return y===null||yc(y)||ut(y)||hi(y)||Wc(y)?r(y):e.attempt(pC,e.attempt(mC,m),r)(y)}function m(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function n9(e,n,r){let i=0;return l;function l(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),l):c===46&&i===3?(e.consume(c),s):r(c)}function s(c){return c===null?r(c):n(c)}}function r9(e,n,r){let i,l,s;return c;function c(h){return h===46||h===95?e.check(gC,d,f)(h):h===null||ut(h)||hi(h)||h!==45&&Wc(h)?d(h):(s=!0,e.consume(h),c)}function f(h){return h===95?i=!0:(l=i,i=void 0),e.consume(h),c}function d(h){return l||i||!s?r(h):n(h)}}function a9(e,n){let r=0,i=0;return l;function l(c){return c===40?(r++,e.consume(c),l):c===41&&i<r?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(gC,n,s)(c):c===null||ut(c)||hi(c)?n(c):(e.consume(c),l)}function s(c){return c===41&&i++,e.consume(c),l}}function i9(e,n,r){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),s):f===93?(e.consume(f),l):f===60||f===null||ut(f)||hi(f)?n(f):r(f)}function l(f){return f===null||f===40||f===91||ut(f)||hi(f)?n(f):i(f)}function s(f){return sn(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),i):sn(f)?(e.consume(f),c):r(f)}}function o9(e,n,r){return i;function i(s){return e.consume(s),l}function l(s){return nn(s)?r(s):n(s)}}function xC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ut(e)}function bC(e){return!sn(e)}function wC(e){return!(e===47||Hp(e))}function Hp(e){return e===43||e===45||e===46||e===95||nn(e)}function Zm(e){let n=e.length,r=!1;for(;n--;){const i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const l9={tokenize:m9,partial:!0};function s9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:d9,continuation:{tokenize:h9},exit:p9}},text:{91:{name:"gfmFootnoteCall",tokenize:f9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:u9,resolveTo:c9}}}}function u9(e,n,r){const i=this;let l=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;l--;){const d=i.events[l][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return r(d);const h=sr(i.sliceSerialize({start:c.end,end:i.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?r(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),n(d))}}function c9(e,n){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[r+1],e[r+2],["enter",i,n],e[r+3],e[r+4],["enter",l,n],["exit",l,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(r,e.length-r+1,...f),e}function f9(e,n,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),d}function d(y){return y!==94?r(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(s>999||y===93&&!c||y===null||y===91||ut(y))return r(y);if(y===93){e.exit("chunkString");const w=e.exit("gfmFootnoteCallString");return l.includes(sr(i.sliceSerialize(w)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(y)}return ut(y)||(c=!0),s++,e.consume(y),y===92?m:h}function m(y){return y===91||y===92||y===93?(e.consume(y),s++,h):h(y)}}function d9(e,n,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,c=0,f;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(S)}function m(S){if(c>999||S===93&&!f||S===null||S===91||ut(S))return r(S);if(S===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return s=sr(i.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),w}return ut(S)||(f=!0),c++,e.consume(S),S===92?y:m}function y(S){return S===91||S===92||S===93?(e.consume(S),c++,m):m(S)}function w(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),l.includes(s)||l.push(s),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):r(S)}function b(S){return n(S)}}function h9(e,n,r){return e.check(ys,n,e.attempt(l9,n,r))}function p9(e){e.exit("gfmFootnoteDefinition")}function m9(e,n,r){const i=this;return Ze(e,l,"gfmFootnoteDefinitionIndent",5);function l(s){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):r(s)}}function g9(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:l};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},y={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},w=[["enter",m,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",y,f]],b=f.parser.constructs.insideSpan.null;b&&Ln(w,w.length,0,Jc(b,c.slice(h+1,d),f)),Ln(w,w.length,0,[["exit",y,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",m,f]]),Ln(c,h-1,d-h+3,w),d=h+w.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function s(c,f,d){const h=this.previous,m=this.events;let y=0;return w;function w(S){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(S):(c.enter("strikethroughSequenceTemporary"),b(S))}function b(S){const E=go(h);if(S===126)return y>1?d(S):(c.consume(S),y++,b);if(y<2&&!r)return d(S);const T=c.exit("strikethroughSequenceTemporary"),A=go(S);return T._open=!A||A===2&&!!E,T._close=!E||E===2&&!!A,f(S)}}}class y9{constructor(){this.map=[]}add(n,r,i){v9(this,n,r,i)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];i.push(n.slice()),n.length=0;let l=i.pop();for(;l;){for(const s of l)n.push(s);l=i.pop()}this.map.length=0}}function v9(e,n,r,i){let l=0;if(!(r===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===n){e.map[l][1]+=r,e.map[l][2].push(...i);return}l+=1}e.map.push([n,r,i])}}function x9(e,n){let r=!1;const i=[];for(;n<e.length;){const l=e[n];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);n+=1}return i}function b9(){return{flow:{null:{name:"table",tokenize:w9,resolveAll:S9}}}}function w9(e,n,r){const i=this;let l=0,s=0,c;return f;function f(D){let Z=i.events.length-1;for(;Z>-1;){const G=i.events[Z][1].type;if(G==="lineEnding"||G==="linePrefix")Z--;else break}const J=Z>-1?i.events[Z][1].type:null,ne=J==="tableHead"||J==="tableRow"?j:d;return ne===j&&i.parser.lazy[i.now().line]?r(D):ne(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(c=!0,s+=1),m(D)}function m(D){return D===null?r(D):Te(D)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),b):r(D):Ye(D)?Ze(e,m,"whitespace")(D):(s+=1,c&&(c=!1,l+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),y(D)))}function y(D){return D===null||D===124||ut(D)?(e.exit("data"),m(D)):(e.consume(D),D===92?w:y)}function w(D){return D===92||D===124?(e.consume(D),y):y(D)}function b(D){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(D):(e.enter("tableDelimiterRow"),c=!1,Ye(D)?Ze(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):S(D))}function S(D){return D===45||D===58?T(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),E):L(D)}function E(D){return Ye(D)?Ze(e,T,"whitespace")(D):T(D)}function T(D){return D===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):D===45?(s+=1,A(D)):D===null||Te(D)?O(D):L(D)}function A(D){return D===45?(e.enter("tableDelimiterFiller"),R(D)):L(D)}function R(D){return D===45?(e.consume(D),R):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(D))}function N(D){return Ye(D)?Ze(e,O,"whitespace")(D):O(D)}function O(D){return D===124?S(D):D===null||Te(D)?!c||l!==s?L(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):L(D)}function L(D){return r(D)}function j(D){return e.enter("tableRow"),H(D)}function H(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),H):D===null||Te(D)?(e.exit("tableRow"),n(D)):Ye(D)?Ze(e,H,"whitespace")(D):(e.enter("data"),$(D))}function $(D){return D===null||D===124||ut(D)?(e.exit("data"),H(D)):(e.consume(D),D===92?Y:$)}function Y(D){return D===92||D===124?(e.consume(D),$):$(D)}}function S9(e,n){let r=-1,i=!0,l=0,s=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,m,y;const w=new y9;for(;++r<e.length;){const b=e[r],S=b[1];b[0]==="enter"?S.type==="tableHead"?(f=!1,d!==0&&(L0(w,n,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},w.add(r,0,[["enter",h,n]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,y=void 0,s=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},w.add(r,0,[["enter",m,n]])),l=S.type==="tableDelimiterRow"?2:m?3:1):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],y=Qu(w,n,s,l,void 0,y),s=[0,0,0,0]),c[2]=r)):S.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(c[0]=c[1],y=Qu(w,n,s,l,void 0,y)),s=c,c=[s[1],r,0,0])):S.type==="tableHead"?(f=!0,d=r):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=r,s[1]!==0?(c[0]=c[1],y=Qu(w,n,s,l,r,y)):c[1]!==0&&(y=Qu(w,n,c,l,r,y)),l=0):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=r)}for(d!==0&&L0(w,n,d,h,m),w.consume(n.events),r=-1;++r<n.events.length;){const b=n.events[r];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=x9(n.events,r))}return e}function Qu(e,n,r,i,l,s){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(s.end=Object.assign({},lo(n.events,r[0])),e.add(r[0],0,[["exit",s,n]]));const d=lo(n.events,r[1]);if(s={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(r[1],0,[["enter",s,n]]),r[2]!==0){const h=lo(n.events,r[2]),m=lo(n.events,r[3]),y={type:f,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(r[2],0,[["enter",y,n]]),i!==2){const w=n.events[r[2]],b=n.events[r[3]];if(w[1].end=Object.assign({},b[1].end),w[1].type="chunkText",w[1].contentType="text",r[3]>r[2]+1){const S=r[2]+1,E=r[3]-r[2]-1;e.add(S,E,[])}}e.add(r[3]+1,0,[["exit",y,n]])}return l!==void 0&&(s.end=Object.assign({},lo(n.events,l)),e.add(l,0,[["exit",s,n]]),s=void 0),s}function L0(e,n,r,i,l){const s=[],c=lo(n.events,r);l&&(l.end=Object.assign({},c),s.push(["exit",l,n])),i.end=Object.assign({},c),s.push(["exit",i,n]),e.add(r+1,0,s)}function lo(e,n){const r=e[n],i=r[0]==="enter"?"start":"end";return r[1][i]}const E9={name:"tasklistCheck",tokenize:k9};function C9(){return{text:{91:E9}}}function k9(e,n,r){const i=this;return l;function l(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return ut(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):r(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(d)}function f(d){return Te(d)?n(d):Ye(d)?e.check({tokenize:A9},n,r)(d):r(d)}}function A9(e,n,r){return Ze(e,i,"whitespace");function i(l){return l===null?r(l):n(l)}}function T9(e){return jE([WI(),s9(),g9(e),b9(),C9()])}const R9={};function N9(e){const n=this,r=e||R9,i=n.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(T9(r)),s.push(KI()),c.push(XI(r))}const ri=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],z0={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ri,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ri],h2:[["className","sr-only"]],img:[...ri,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ri,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ri],table:[...ri],ul:[...ri,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ra={}.hasOwnProperty;function _9(e,n){let r={type:"root",children:[]};const i={schema:n?{...z0,...n}:z0,stack:[]},l=SC(i,e);return l&&(Array.isArray(l)?l.length===1?r=l[0]:r.children=l:r=l),r}function SC(e,n){if(n&&typeof n=="object"){const r=n;switch(typeof r.type=="string"?r.type:""){case"comment":return M9(e,r);case"doctype":return j9(e,r);case"element":return D9(e,r);case"root":return O9(e,r);case"text":return P9(e,r)}}}function M9(e,n){if(e.schema.allowComments){const r=typeof n.value=="string"?n.value:"",i=r.indexOf("-->"),s={type:"comment",value:i<0?r:r.slice(0,i)};return xs(s,n),s}}function j9(e,n){if(e.schema.allowDoctypes){const r={type:"doctype"};return xs(r,n),r}}function D9(e,n){const r=typeof n.tagName=="string"?n.tagName:"";e.stack.push(r);const i=EC(e,n.children),l=L9(e,n.properties);e.stack.pop();let s=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&Ra.call(e.schema.ancestors,r))){const f=e.schema.ancestors[r];let d=-1;for(s=!1;++d<f.length;)e.stack.includes(f[d])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?i:void 0;const c={type:"element",tagName:r,properties:l,children:i};return xs(c,n),c}function O9(e,n){const i={type:"root",children:EC(e,n.children)};return xs(i,n),i}function P9(e,n){const i={type:"text",value:typeof n.value=="string"?n.value:""};return xs(i,n),i}function EC(e,n){const r=[];if(Array.isArray(n)){const i=n;let l=-1;for(;++l<i.length;){const s=SC(e,i[l]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}function L9(e,n){const r=e.stack[e.stack.length-1],i=e.schema.attributes,l=e.schema.required,s=i&&Ra.call(i,r)?i[r]:void 0,c=i&&Ra.call(i,"*")?i["*"]:void 0,f=n&&typeof n=="object"?n:{},d={};let h;for(h in f)if(Ra.call(f,h)){const m=f[h];let y=I0(e,B0(s,h),h,m);y==null&&(y=I0(e,B0(c,h),h,m)),y!=null&&(d[h]=y)}if(l&&Ra.call(l,r)){const m=l[r];for(h in m)Ra.call(m,h)&&!Ra.call(d,h)&&(d[h]=m[h])}return d}function I0(e,n,r,i){return n?Array.isArray(i)?z9(e,n,r,i):CC(e,n,r,i):void 0}function z9(e,n,r,i){let l=-1;const s=[];for(;++l<i.length;){const c=CC(e,n,r,i[l]);(typeof c=="number"||typeof c=="string")&&s.push(c)}return s}function CC(e,n,r,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&I9(e,r,i)){if(typeof n=="object"&&n.length>1){let l=!1,s=0;for(;++s<n.length;){const c=n[s];if(c&&typeof c=="object"&&"flags"in c){if(c.test(String(i))){l=!0;break}}else if(c===i){l=!0;break}}if(!l)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+i:i}}function I9(e,n,r){const i=e.schema.protocols&&Ra.call(e.schema.protocols,n)?e.schema.protocols[n]:void 0;if(!i||i.length===0)return!0;const l=String(r),s=l.indexOf(":"),c=l.indexOf("?"),f=l.indexOf("#"),d=l.indexOf("/");if(s<0||d>-1&&s>d||c>-1&&s>c||f>-1&&s>f)return!0;let h=-1;for(;++h<i.length;){const m=i[h];if(s===m.length&&l.slice(0,m.length)===m)return!0}return!1}function xs(e,n){const r=AE(n);n.data&&(e.data=Wl(n.data)),r&&(e.position=r)}function B0(e,n){let r,i=-1;if(e)for(;++i<e.length;){const l=e[i],s=typeof l=="string"?l:l[0];if(s===n)return l;s==="data*"&&(r=l)}if(n.length>4&&n.slice(0,4).toLowerCase()==="data")return r}function B9(e){return function(n){return _9(n,e)}}const bs=v.forwardRef(({children:e,className:n,...r},i)=>g.jsx("div",{ref:i,className:ue("prose prose-sm max-w-none dark:prose-invert","prose-headings:font-semibold prose-headings:text-foreground","prose-h1:text-2xl prose-h1:mb-4 prose-h1:mt-6 first:prose-h1:mt-0","prose-h2:text-xl prose-h2:mb-3 prose-h2:mt-5","prose-h3:text-lg prose-h3:mb-2 prose-h3:mt-4","prose-p:text-sm prose-p:leading-relaxed prose-p:text-foreground prose-p:mb-4","prose-code:text-xs prose-code:bg-muted prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-foreground","prose-pre:bg-muted prose-pre:text-sm prose-pre:p-4 prose-pre:rounded-lg prose-pre:overflow-x-auto","prose-blockquote:border-l-4 prose-blockquote:border-muted-foreground prose-blockquote:pl-4 prose-blockquote:italic prose-blockquote:text-muted-foreground","prose-ul:text-sm prose-ul:mb-4 prose-ul:list-disc prose-ul:pl-6","prose-ol:text-sm prose-ol:mb-4 prose-ol:list-decimal prose-ol:pl-6","prose-li:text-sm prose-li:leading-relaxed prose-li:text-foreground prose-li:mb-1 prose-li:marker:text-muted-foreground","prose-table:text-sm prose-table:border-collapse prose-table:w-full","prose-th:text-xs prose-th:font-semibold prose-th:text-muted-foreground prose-th:border prose-th:border-border prose-th:p-2 prose-th:bg-muted/50","prose-td:text-sm prose-td:border prose-td:border-border prose-td:p-2","prose-strong:text-foreground prose-strong:font-semibold","prose-em:text-foreground prose-em:italic","prose-hr:border-border prose-hr:my-6",n),...r,children:g.jsx(g6,{remarkPlugins:[N9],rehypePlugins:[B9],components:{input:({type:l,checked:s,...c})=>l==="checkbox"?g.jsx("input",{type:"checkbox",checked:s,disabled:!0,className:"mr-2 h-4 w-4 rounded border-2 border-muted-foreground bg-background accent-primary flex-shrink-0 mt-0.5",...c}):g.jsx("input",{type:l,...c}),li:({children:l,...s})=>v.Children.toArray(l).some(f=>v.isValidElement(f)&&f.props&&f.props.type==="checkbox")?g.jsx("li",{className:"flex items-start gap-1 list-none pl-0",...s,children:l}):g.jsx("li",{...s,children:l}),a:({href:l,children:s,...c})=>g.jsx("a",{href:l,className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",...c,children:s}),img:({src:l,alt:s,...c})=>{let f=l;return l?.startsWith("../images/")&&(f=`/api/v1/context/images/${l.replace("../images/","")}`),g.jsx("img",{src:f,alt:s||"",className:"max-w-full h-auto rounded-lg",loading:"lazy",...c})}},children:e})}));bs.displayName="MarkdownViewer";var kC="AlertDialog",[U9,cH]=Jn(kC,[A1]),Jr=A1(),AC=e=>{const{__scopeAlertDialog:n,...r}=e,i=Jr(n);return g.jsx(pm,{...i,...r,modal:!0})};AC.displayName=kC;var H9="AlertDialogTrigger",TC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(F1,{...l,...i,ref:n})});TC.displayName=H9;var F9="AlertDialogPortal",RC=e=>{const{__scopeAlertDialog:n,...r}=e,i=Jr(n);return g.jsx(mm,{...i,...r})};RC.displayName=F9;var V9="AlertDialogOverlay",NC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(ss,{...l,...i,ref:n})});NC.displayName=V9;var ho="AlertDialogContent",[q9,$9]=U9(ho),G9=bw("AlertDialogContent"),_C=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,children:i,...l}=e,s=Jr(r),c=v.useRef(null),f=ze(n,c),d=v.useRef(null);return g.jsx(dO,{contentName:ho,titleName:MC,docsSlug:"alert-dialog",children:g.jsx(q9,{scope:r,cancelRef:d,children:g.jsxs(us,{role:"alertdialog",...s,...l,ref:f,onOpenAutoFocus:me(l.onOpenAutoFocus,h=>{h.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[g.jsx(G9,{children:i}),g.jsx(K9,{contentRef:c})]})})})});_C.displayName=ho;var MC="AlertDialogTitle",jC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(cs,{...l,...i,ref:n})});jC.displayName=MC;var DC="AlertDialogDescription",OC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(fs,{...l,...i,ref:n})});OC.displayName=DC;var Y9="AlertDialogAction",PC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(Bc,{...l,...i,ref:n})});PC.displayName=Y9;var LC="AlertDialogCancel",zC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,{cancelRef:l}=$9(LC,r),s=Jr(r),c=ze(n,l);return g.jsx(Bc,{...s,...i,ref:c})});zC.displayName=LC;var K9=({contentRef:e})=>{const n=`\`${ho}\` requires a description for the component to be accessible for screen reader users.
393
+ `))}function d(b,S,E,T){const A=E.enter("tableCell"),R=E.enter("phrasing"),N=E.containerPhrasing(b,{...T,before:s,after:s});return R(),A(),N}function h(b,S){return rI(b,{align:S,alignDelimiters:i,padding:r,stringLength:l})}function m(b,S,E){const T=b.children;let A=-1;const R=[],N=S.enter("table");for(;++A<T.length;)R[A]=y(T[A],S,E);return N(),R}function y(b,S,E){const T=b.children;let A=-1;const R=[],N=S.enter("tableRow");for(;++A<T.length;)R[A]=d(T[A],b,S,E);return N(),R}function w(b,S,E){let T=hC.inlineCode(b,S,E);return E.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function qI(){return{exit:{taskListCheckValueChecked:P0,taskListCheckValueUnchecked:P0,paragraph:GI}}}function $I(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:YI}}}function P0(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function GI(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const l=n.children;let s=-1,c;for(;++s<l.length;){const f=l[s];if(f.type==="paragraph"){c=f;break}}c===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function YI(e,n,r,i){const l=e.children[0],s=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(i);s&&f.move(c);let d=hC.listItem(e,n,r,{...i,...f.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+c}}function KI(){return[A6(),Y6(),Z6(),zI(),qI()]}function XI(e){return{extensions:[T6(),K6(e),W6(),VI(e),$I()]}}const QI={tokenize:n9,partial:!0},pC={tokenize:r9,partial:!0},mC={tokenize:a9,partial:!0},gC={tokenize:i9,partial:!0},ZI={tokenize:o9,partial:!0},yC={name:"wwwAutolink",tokenize:e9,previous:xC},vC={name:"protocolAutolink",tokenize:t9,previous:bC},Wr={name:"emailAutolink",tokenize:JI,previous:wC},Nr={};function WI(){return{text:Nr}}let ni=48;for(;ni<123;)Nr[ni]=Wr,ni++,ni===58?ni=65:ni===91&&(ni=97);Nr[43]=Wr;Nr[45]=Wr;Nr[46]=Wr;Nr[95]=Wr;Nr[72]=[Wr,vC];Nr[104]=[Wr,vC];Nr[87]=[Wr,yC];Nr[119]=[Wr,yC];function JI(e,n,r){const i=this;let l,s;return c;function c(y){return!Hp(y)||!wC.call(i,i.previous)||Zm(i.events)?r(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Hp(y)?(e.consume(y),f):y===64?(e.consume(y),d):r(y)}function d(y){return y===46?e.check(ZI,m,h)(y):y===45||y===95||nn(y)?(s=!0,e.consume(y),d):m(y)}function h(y){return e.consume(y),l=!0,d}function m(y){return s&&l&&sn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):r(y)}}function e9(e,n,r){const i=this;return l;function l(c){return c!==87&&c!==119||!xC.call(i,i.previous)||Zm(i.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(QI,e.attempt(pC,e.attempt(mC,s),r),r)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function t9(e,n,r){const i=this;let l="",s=!1;return c;function c(y){return(y===72||y===104)&&bC.call(i,i.previous)&&!Zm(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(y),e.consume(y),f):r(y)}function f(y){if(sn(y)&&l.length<5)return l+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const w=l.toLowerCase();if(w==="http"||w==="https")return e.consume(y),d}return r(y)}function d(y){return y===47?(e.consume(y),s?h:(s=!0,d)):r(y)}function h(y){return y===null||yc(y)||ut(y)||hi(y)||Wc(y)?r(y):e.attempt(pC,e.attempt(mC,m),r)(y)}function m(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function n9(e,n,r){let i=0;return l;function l(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),l):c===46&&i===3?(e.consume(c),s):r(c)}function s(c){return c===null?r(c):n(c)}}function r9(e,n,r){let i,l,s;return c;function c(h){return h===46||h===95?e.check(gC,d,f)(h):h===null||ut(h)||hi(h)||h!==45&&Wc(h)?d(h):(s=!0,e.consume(h),c)}function f(h){return h===95?i=!0:(l=i,i=void 0),e.consume(h),c}function d(h){return l||i||!s?r(h):n(h)}}function a9(e,n){let r=0,i=0;return l;function l(c){return c===40?(r++,e.consume(c),l):c===41&&i<r?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(gC,n,s)(c):c===null||ut(c)||hi(c)?n(c):(e.consume(c),l)}function s(c){return c===41&&i++,e.consume(c),l}}function i9(e,n,r){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),s):f===93?(e.consume(f),l):f===60||f===null||ut(f)||hi(f)?n(f):r(f)}function l(f){return f===null||f===40||f===91||ut(f)||hi(f)?n(f):i(f)}function s(f){return sn(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),i):sn(f)?(e.consume(f),c):r(f)}}function o9(e,n,r){return i;function i(s){return e.consume(s),l}function l(s){return nn(s)?r(s):n(s)}}function xC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ut(e)}function bC(e){return!sn(e)}function wC(e){return!(e===47||Hp(e))}function Hp(e){return e===43||e===45||e===46||e===95||nn(e)}function Zm(e){let n=e.length,r=!1;for(;n--;){const i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const l9={tokenize:m9,partial:!0};function s9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:d9,continuation:{tokenize:h9},exit:p9}},text:{91:{name:"gfmFootnoteCall",tokenize:f9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:u9,resolveTo:c9}}}}function u9(e,n,r){const i=this;let l=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;l--;){const d=i.events[l][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return r(d);const h=sr(i.sliceSerialize({start:c.end,end:i.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?r(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),n(d))}}function c9(e,n){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[r+1],e[r+2],["enter",i,n],e[r+3],e[r+4],["enter",l,n],["exit",l,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(r,e.length-r+1,...f),e}function f9(e,n,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),d}function d(y){return y!==94?r(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(s>999||y===93&&!c||y===null||y===91||ut(y))return r(y);if(y===93){e.exit("chunkString");const w=e.exit("gfmFootnoteCallString");return l.includes(sr(i.sliceSerialize(w)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(y)}return ut(y)||(c=!0),s++,e.consume(y),y===92?m:h}function m(y){return y===91||y===92||y===93?(e.consume(y),s++,h):h(y)}}function d9(e,n,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,c=0,f;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(S)}function m(S){if(c>999||S===93&&!f||S===null||S===91||ut(S))return r(S);if(S===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return s=sr(i.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),w}return ut(S)||(f=!0),c++,e.consume(S),S===92?y:m}function y(S){return S===91||S===92||S===93?(e.consume(S),c++,m):m(S)}function w(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),l.includes(s)||l.push(s),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):r(S)}function b(S){return n(S)}}function h9(e,n,r){return e.check(gs,n,e.attempt(l9,n,r))}function p9(e){e.exit("gfmFootnoteDefinition")}function m9(e,n,r){const i=this;return Ze(e,l,"gfmFootnoteDefinitionIndent",5);function l(s){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):r(s)}}function g9(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:l};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},y={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},w=[["enter",m,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",y,f]],b=f.parser.constructs.insideSpan.null;b&&Ln(w,w.length,0,Jc(b,c.slice(h+1,d),f)),Ln(w,w.length,0,[["exit",y,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",m,f]]),Ln(c,h-1,d-h+3,w),d=h+w.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function s(c,f,d){const h=this.previous,m=this.events;let y=0;return w;function w(S){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(S):(c.enter("strikethroughSequenceTemporary"),b(S))}function b(S){const E=go(h);if(S===126)return y>1?d(S):(c.consume(S),y++,b);if(y<2&&!r)return d(S);const T=c.exit("strikethroughSequenceTemporary"),A=go(S);return T._open=!A||A===2&&!!E,T._close=!E||E===2&&!!A,f(S)}}}class y9{constructor(){this.map=[]}add(n,r,i){v9(this,n,r,i)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];i.push(n.slice()),n.length=0;let l=i.pop();for(;l;){for(const s of l)n.push(s);l=i.pop()}this.map.length=0}}function v9(e,n,r,i){let l=0;if(!(r===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===n){e.map[l][1]+=r,e.map[l][2].push(...i);return}l+=1}e.map.push([n,r,i])}}function x9(e,n){let r=!1;const i=[];for(;n<e.length;){const l=e[n];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);n+=1}return i}function b9(){return{flow:{null:{name:"table",tokenize:w9,resolveAll:S9}}}}function w9(e,n,r){const i=this;let l=0,s=0,c;return f;function f(D){let Z=i.events.length-1;for(;Z>-1;){const G=i.events[Z][1].type;if(G==="lineEnding"||G==="linePrefix")Z--;else break}const J=Z>-1?i.events[Z][1].type:null,ne=J==="tableHead"||J==="tableRow"?j:d;return ne===j&&i.parser.lazy[i.now().line]?r(D):ne(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(c=!0,s+=1),m(D)}function m(D){return D===null?r(D):Te(D)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),b):r(D):Ye(D)?Ze(e,m,"whitespace")(D):(s+=1,c&&(c=!1,l+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),y(D)))}function y(D){return D===null||D===124||ut(D)?(e.exit("data"),m(D)):(e.consume(D),D===92?w:y)}function w(D){return D===92||D===124?(e.consume(D),y):y(D)}function b(D){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(D):(e.enter("tableDelimiterRow"),c=!1,Ye(D)?Ze(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):S(D))}function S(D){return D===45||D===58?T(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),E):L(D)}function E(D){return Ye(D)?Ze(e,T,"whitespace")(D):T(D)}function T(D){return D===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):D===45?(s+=1,A(D)):D===null||Te(D)?O(D):L(D)}function A(D){return D===45?(e.enter("tableDelimiterFiller"),R(D)):L(D)}function R(D){return D===45?(e.consume(D),R):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(D))}function N(D){return Ye(D)?Ze(e,O,"whitespace")(D):O(D)}function O(D){return D===124?S(D):D===null||Te(D)?!c||l!==s?L(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):L(D)}function L(D){return r(D)}function j(D){return e.enter("tableRow"),H(D)}function H(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),H):D===null||Te(D)?(e.exit("tableRow"),n(D)):Ye(D)?Ze(e,H,"whitespace")(D):(e.enter("data"),$(D))}function $(D){return D===null||D===124||ut(D)?(e.exit("data"),H(D)):(e.consume(D),D===92?Y:$)}function Y(D){return D===92||D===124?(e.consume(D),$):$(D)}}function S9(e,n){let r=-1,i=!0,l=0,s=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,m,y;const w=new y9;for(;++r<e.length;){const b=e[r],S=b[1];b[0]==="enter"?S.type==="tableHead"?(f=!1,d!==0&&(L0(w,n,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},w.add(r,0,[["enter",h,n]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,y=void 0,s=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},w.add(r,0,[["enter",m,n]])),l=S.type==="tableDelimiterRow"?2:m?3:1):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],y=Xu(w,n,s,l,void 0,y),s=[0,0,0,0]),c[2]=r)):S.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(c[0]=c[1],y=Xu(w,n,s,l,void 0,y)),s=c,c=[s[1],r,0,0])):S.type==="tableHead"?(f=!0,d=r):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=r,s[1]!==0?(c[0]=c[1],y=Xu(w,n,s,l,r,y)):c[1]!==0&&(y=Xu(w,n,c,l,r,y)),l=0):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=r)}for(d!==0&&L0(w,n,d,h,m),w.consume(n.events),r=-1;++r<n.events.length;){const b=n.events[r];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=x9(n.events,r))}return e}function Xu(e,n,r,i,l,s){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(s.end=Object.assign({},lo(n.events,r[0])),e.add(r[0],0,[["exit",s,n]]));const d=lo(n.events,r[1]);if(s={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(r[1],0,[["enter",s,n]]),r[2]!==0){const h=lo(n.events,r[2]),m=lo(n.events,r[3]),y={type:f,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(r[2],0,[["enter",y,n]]),i!==2){const w=n.events[r[2]],b=n.events[r[3]];if(w[1].end=Object.assign({},b[1].end),w[1].type="chunkText",w[1].contentType="text",r[3]>r[2]+1){const S=r[2]+1,E=r[3]-r[2]-1;e.add(S,E,[])}}e.add(r[3]+1,0,[["exit",y,n]])}return l!==void 0&&(s.end=Object.assign({},lo(n.events,l)),e.add(l,0,[["exit",s,n]]),s=void 0),s}function L0(e,n,r,i,l){const s=[],c=lo(n.events,r);l&&(l.end=Object.assign({},c),s.push(["exit",l,n])),i.end=Object.assign({},c),s.push(["exit",i,n]),e.add(r+1,0,s)}function lo(e,n){const r=e[n],i=r[0]==="enter"?"start":"end";return r[1][i]}const E9={name:"tasklistCheck",tokenize:k9};function C9(){return{text:{91:E9}}}function k9(e,n,r){const i=this;return l;function l(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return ut(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):r(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(d)}function f(d){return Te(d)?n(d):Ye(d)?e.check({tokenize:A9},n,r)(d):r(d)}}function A9(e,n,r){return Ze(e,i,"whitespace");function i(l){return l===null?r(l):n(l)}}function T9(e){return jE([WI(),s9(),g9(e),b9(),C9()])}const R9={};function N9(e){const n=this,r=e||R9,i=n.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(T9(r)),s.push(KI()),c.push(XI(r))}const ri=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],z0={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ri,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ri],h2:[["className","sr-only"]],img:[...ri,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ri,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ri],table:[...ri],ul:[...ri,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ra={}.hasOwnProperty;function _9(e,n){let r={type:"root",children:[]};const i={schema:n?{...z0,...n}:z0,stack:[]},l=SC(i,e);return l&&(Array.isArray(l)?l.length===1?r=l[0]:r.children=l:r=l),r}function SC(e,n){if(n&&typeof n=="object"){const r=n;switch(typeof r.type=="string"?r.type:""){case"comment":return M9(e,r);case"doctype":return j9(e,r);case"element":return D9(e,r);case"root":return O9(e,r);case"text":return P9(e,r)}}}function M9(e,n){if(e.schema.allowComments){const r=typeof n.value=="string"?n.value:"",i=r.indexOf("-->"),s={type:"comment",value:i<0?r:r.slice(0,i)};return vs(s,n),s}}function j9(e,n){if(e.schema.allowDoctypes){const r={type:"doctype"};return vs(r,n),r}}function D9(e,n){const r=typeof n.tagName=="string"?n.tagName:"";e.stack.push(r);const i=EC(e,n.children),l=L9(e,n.properties);e.stack.pop();let s=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&Ra.call(e.schema.ancestors,r))){const f=e.schema.ancestors[r];let d=-1;for(s=!1;++d<f.length;)e.stack.includes(f[d])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?i:void 0;const c={type:"element",tagName:r,properties:l,children:i};return vs(c,n),c}function O9(e,n){const i={type:"root",children:EC(e,n.children)};return vs(i,n),i}function P9(e,n){const i={type:"text",value:typeof n.value=="string"?n.value:""};return vs(i,n),i}function EC(e,n){const r=[];if(Array.isArray(n)){const i=n;let l=-1;for(;++l<i.length;){const s=SC(e,i[l]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}function L9(e,n){const r=e.stack[e.stack.length-1],i=e.schema.attributes,l=e.schema.required,s=i&&Ra.call(i,r)?i[r]:void 0,c=i&&Ra.call(i,"*")?i["*"]:void 0,f=n&&typeof n=="object"?n:{},d={};let h;for(h in f)if(Ra.call(f,h)){const m=f[h];let y=I0(e,B0(s,h),h,m);y==null&&(y=I0(e,B0(c,h),h,m)),y!=null&&(d[h]=y)}if(l&&Ra.call(l,r)){const m=l[r];for(h in m)Ra.call(m,h)&&!Ra.call(d,h)&&(d[h]=m[h])}return d}function I0(e,n,r,i){return n?Array.isArray(i)?z9(e,n,r,i):CC(e,n,r,i):void 0}function z9(e,n,r,i){let l=-1;const s=[];for(;++l<i.length;){const c=CC(e,n,r,i[l]);(typeof c=="number"||typeof c=="string")&&s.push(c)}return s}function CC(e,n,r,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&I9(e,r,i)){if(typeof n=="object"&&n.length>1){let l=!1,s=0;for(;++s<n.length;){const c=n[s];if(c&&typeof c=="object"&&"flags"in c){if(c.test(String(i))){l=!0;break}}else if(c===i){l=!0;break}}if(!l)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+i:i}}function I9(e,n,r){const i=e.schema.protocols&&Ra.call(e.schema.protocols,n)?e.schema.protocols[n]:void 0;if(!i||i.length===0)return!0;const l=String(r),s=l.indexOf(":"),c=l.indexOf("?"),f=l.indexOf("#"),d=l.indexOf("/");if(s<0||d>-1&&s>d||c>-1&&s>c||f>-1&&s>f)return!0;let h=-1;for(;++h<i.length;){const m=i[h];if(s===m.length&&l.slice(0,m.length)===m)return!0}return!1}function vs(e,n){const r=AE(n);n.data&&(e.data=Zl(n.data)),r&&(e.position=r)}function B0(e,n){let r,i=-1;if(e)for(;++i<e.length;){const l=e[i],s=typeof l=="string"?l:l[0];if(s===n)return l;s==="data*"&&(r=l)}if(n.length>4&&n.slice(0,4).toLowerCase()==="data")return r}function B9(e){return function(n){return _9(n,e)}}const xs=v.forwardRef(({children:e,className:n,...r},i)=>g.jsx("div",{ref:i,className:ue("prose prose-sm max-w-none dark:prose-invert","prose-headings:font-semibold prose-headings:text-foreground","prose-h1:text-2xl prose-h1:mb-4 prose-h1:mt-6 first:prose-h1:mt-0","prose-h2:text-xl prose-h2:mb-3 prose-h2:mt-5","prose-h3:text-lg prose-h3:mb-2 prose-h3:mt-4","prose-p:text-sm prose-p:leading-relaxed prose-p:text-foreground prose-p:mb-4","prose-code:text-xs prose-code:bg-muted prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-foreground","prose-pre:bg-muted prose-pre:text-sm prose-pre:p-4 prose-pre:rounded-lg prose-pre:overflow-x-auto","prose-blockquote:border-l-4 prose-blockquote:border-muted-foreground prose-blockquote:pl-4 prose-blockquote:italic prose-blockquote:text-muted-foreground","prose-ul:text-sm prose-ul:mb-4 prose-ul:list-disc prose-ul:pl-6","prose-ol:text-sm prose-ol:mb-4 prose-ol:list-decimal prose-ol:pl-6","prose-li:text-sm prose-li:leading-relaxed prose-li:text-foreground prose-li:mb-1 prose-li:marker:text-muted-foreground","prose-table:text-sm prose-table:border-collapse prose-table:w-full","prose-th:text-xs prose-th:font-semibold prose-th:text-muted-foreground prose-th:border prose-th:border-border prose-th:p-2 prose-th:bg-muted/50","prose-td:text-sm prose-td:border prose-td:border-border prose-td:p-2","prose-strong:text-foreground prose-strong:font-semibold","prose-em:text-foreground prose-em:italic","prose-hr:border-border prose-hr:my-6",n),...r,children:g.jsx(g6,{remarkPlugins:[N9],rehypePlugins:[B9],components:{input:({type:l,checked:s,...c})=>l==="checkbox"?g.jsx("input",{type:"checkbox",checked:s,disabled:!0,className:"mr-2 h-4 w-4 rounded border-2 border-muted-foreground bg-background accent-primary flex-shrink-0 mt-0.5",...c}):g.jsx("input",{type:l,...c}),li:({children:l,...s})=>v.Children.toArray(l).some(f=>v.isValidElement(f)&&f.props&&f.props.type==="checkbox")?g.jsx("li",{className:"flex items-start gap-1 list-none pl-0",...s,children:l}):g.jsx("li",{...s,children:l}),a:({href:l,children:s,...c})=>g.jsx("a",{href:l,className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",...c,children:s}),img:({src:l,alt:s,...c})=>{let f=l;return l?.startsWith("../images/")&&(f=`/api/v1/context/images/${l.replace("../images/","")}`),g.jsx("img",{src:f,alt:s||"",className:"max-w-full h-auto rounded-lg",loading:"lazy",...c})}},children:e})}));xs.displayName="MarkdownViewer";var kC="AlertDialog",[U9,cH]=Jn(kC,[A1]),Jr=A1(),AC=e=>{const{__scopeAlertDialog:n,...r}=e,i=Jr(n);return g.jsx(pm,{...i,...r,modal:!0})};AC.displayName=kC;var H9="AlertDialogTrigger",TC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(F1,{...l,...i,ref:n})});TC.displayName=H9;var F9="AlertDialogPortal",RC=e=>{const{__scopeAlertDialog:n,...r}=e,i=Jr(n);return g.jsx(mm,{...i,...r})};RC.displayName=F9;var V9="AlertDialogOverlay",NC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(ls,{...l,...i,ref:n})});NC.displayName=V9;var ho="AlertDialogContent",[q9,$9]=U9(ho),G9=bw("AlertDialogContent"),_C=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,children:i,...l}=e,s=Jr(r),c=v.useRef(null),f=ze(n,c),d=v.useRef(null);return g.jsx(dO,{contentName:ho,titleName:MC,docsSlug:"alert-dialog",children:g.jsx(q9,{scope:r,cancelRef:d,children:g.jsxs(ss,{role:"alertdialog",...s,...l,ref:f,onOpenAutoFocus:me(l.onOpenAutoFocus,h=>{h.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[g.jsx(G9,{children:i}),g.jsx(K9,{contentRef:c})]})})})});_C.displayName=ho;var MC="AlertDialogTitle",jC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(us,{...l,...i,ref:n})});jC.displayName=MC;var DC="AlertDialogDescription",OC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(cs,{...l,...i,ref:n})});OC.displayName=DC;var Y9="AlertDialogAction",PC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,l=Jr(r);return g.jsx(Bc,{...l,...i,ref:n})});PC.displayName=Y9;var LC="AlertDialogCancel",zC=v.forwardRef((e,n)=>{const{__scopeAlertDialog:r,...i}=e,{cancelRef:l}=$9(LC,r),s=Jr(r),c=ze(n,l);return g.jsx(Bc,{...s,...i,ref:c})});zC.displayName=LC;var K9=({contentRef:e})=>{const n=`\`${ho}\` requires a description for the component to be accessible for screen reader users.
394
394
 
395
395
  You can add a description to the \`${ho}\` by passing a \`${DC}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
396
396
 
397
397
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ho}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
398
398
 
399
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null},X9=AC,Q9=TC,Z9=RC,IC=NC,BC=_C,UC=PC,HC=zC,FC=jC,VC=OC;const W9=X9,J9=Q9,e8=Z9,qC=v.forwardRef(({className:e,...n},r)=>g.jsx(IC,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));qC.displayName=IC.displayName;const $C=v.forwardRef(({className:e,...n},r)=>g.jsxs(e8,{children:[g.jsx(qC,{}),g.jsx(BC,{ref:r,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n})]}));$C.displayName=BC.displayName;const GC=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...n});GC.displayName="AlertDialogHeader";const YC=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});YC.displayName="AlertDialogFooter";const KC=v.forwardRef(({className:e,...n},r)=>g.jsx(FC,{ref:r,className:ue("text-lg font-semibold",e),...n}));KC.displayName=FC.displayName;const XC=v.forwardRef(({className:e,...n},r)=>g.jsx(VC,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));XC.displayName=VC.displayName;const QC=v.forwardRef(({className:e,...n},r)=>g.jsx(UC,{ref:r,className:ue(sm(),e),...n}));QC.displayName=UC.displayName;const ZC=v.forwardRef(({className:e,...n},r)=>g.jsx(HC,{ref:r,className:ue(sm({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));ZC.displayName=HC.displayName;var rf="Checkbox",[t8,fH]=Jn(rf),[n8,Wm]=t8(rf);function r8(e){const{__scopeCheckbox:n,checked:r,children:i,defaultChecked:l,disabled:s,form:c,name:f,onCheckedChange:d,required:h,value:m="on",internal_do_not_use_render:y}=e,[w,b]=_a({prop:r,defaultProp:l??!1,onChange:d,caller:rf}),[S,E]=v.useState(null),[T,A]=v.useState(null),R=v.useRef(!1),N=S?!!c||!!S.closest("form"):!0,O={checked:w,disabled:s,setChecked:b,control:S,setControl:E,name:f,form:c,value:m,hasConsumerStoppedPropagationRef:R,required:h,defaultChecked:Na(l)?!1:l,isFormControl:N,bubbleInput:T,setBubbleInput:A};return g.jsx(n8,{scope:n,...O,children:a8(y)?y(O):i})}var WC="CheckboxTrigger",JC=v.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...i},l)=>{const{control:s,value:c,disabled:f,checked:d,required:h,setControl:m,setChecked:y,hasConsumerStoppedPropagationRef:w,isFormControl:b,bubbleInput:S}=Wm(WC,e),E=ze(l,m),T=v.useRef(d);return v.useEffect(()=>{const A=s?.form;if(A){const R=()=>y(T.current);return A.addEventListener("reset",R),()=>A.removeEventListener("reset",R)}},[s,y]),g.jsx(_e.button,{type:"button",role:"checkbox","aria-checked":Na(d)?"mixed":d,"aria-required":h,"data-state":ak(d),"data-disabled":f?"":void 0,disabled:f,value:c,...i,ref:E,onKeyDown:me(n,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:me(r,A=>{y(R=>Na(R)?!0:!R),S&&b&&(w.current=A.isPropagationStopped(),w.current||A.stopPropagation())})})});JC.displayName=WC;var Jm=v.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:i,checked:l,defaultChecked:s,required:c,disabled:f,value:d,onCheckedChange:h,form:m,...y}=e;return g.jsx(r8,{__scopeCheckbox:r,checked:l,defaultChecked:s,disabled:f,required:c,onCheckedChange:h,name:i,form:m,value:d,internal_do_not_use_render:({isFormControl:w})=>g.jsxs(g.Fragment,{children:[g.jsx(JC,{...y,ref:n,__scopeCheckbox:r}),w&&g.jsx(rk,{__scopeCheckbox:r})]})})});Jm.displayName=rf;var ek="CheckboxIndicator",tk=v.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:i,...l}=e,s=Wm(ek,r);return g.jsx(un,{present:i||Na(s.checked)||s.checked===!0,children:g.jsx(_e.span,{"data-state":ak(s.checked),"data-disabled":s.disabled?"":void 0,...l,ref:n,style:{pointerEvents:"none",...e.style}})})});tk.displayName=ek;var nk="CheckboxBubbleInput",rk=v.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:i,hasConsumerStoppedPropagationRef:l,checked:s,defaultChecked:c,required:f,disabled:d,name:h,value:m,form:y,bubbleInput:w,setBubbleInput:b}=Wm(nk,e),S=ze(r,b),E=MS(s),T=aS(i);v.useEffect(()=>{const R=w;if(!R)return;const N=window.HTMLInputElement.prototype,L=Object.getOwnPropertyDescriptor(N,"checked").set,j=!l.current;if(E!==s&&L){const H=new Event("click",{bubbles:j});R.indeterminate=Na(s),L.call(R,Na(s)?!1:s),R.dispatchEvent(H)}},[w,E,s,l]);const A=v.useRef(Na(s)?!1:s);return g.jsx(_e.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??A.current,required:f,disabled:d,name:h,value:m,form:y,...n,tabIndex:-1,ref:S,style:{...n.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});rk.displayName=nk;function a8(e){return typeof e=="function"}function Na(e){return e==="indeterminate"}function ak(e){return Na(e)?"indeterminate":e?"checked":"unchecked"}const oc=v.forwardRef(({className:e,...n},r)=>g.jsx(Jm,{ref:r,className:ue("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:g.jsx(tk,{className:ue("flex items-center justify-center text-current"),children:g.jsx(Oc,{className:"h-4 w-4"})})}));oc.displayName=Jm.displayName;function i8(e,n){return v.useReducer((r,i)=>n[r][i]??r,e)}var eg="ScrollArea",[ik,dH]=Jn(eg),[o8,er]=ik(eg),ok=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,type:i="hover",dir:l,scrollHideDelay:s=600,...c}=e,[f,d]=v.useState(null),[h,m]=v.useState(null),[y,w]=v.useState(null),[b,S]=v.useState(null),[E,T]=v.useState(null),[A,R]=v.useState(0),[N,O]=v.useState(0),[L,j]=v.useState(!1),[H,$]=v.useState(!1),Y=ze(n,Z=>d(Z)),D=Yc(l);return g.jsx(o8,{scope:r,type:i,dir:D,scrollHideDelay:s,scrollArea:f,viewport:h,onViewportChange:m,content:y,onContentChange:w,scrollbarX:b,onScrollbarXChange:S,scrollbarXEnabled:L,onScrollbarXEnabledChange:j,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:H,onScrollbarYEnabledChange:$,onCornerWidthChange:R,onCornerHeightChange:O,children:g.jsx(_e.div,{dir:D,...c,ref:Y,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})});ok.displayName=eg;var lk="ScrollAreaViewport",sk=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,children:i,nonce:l,...s}=e,c=er(lk,r),f=v.useRef(null),d=ze(n,f,c.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),g.jsx(_e.div,{"data-radix-scroll-area-viewport":"",...s,ref:d,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});sk.displayName=lk;var _r="ScrollAreaScrollbar",tg=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=er(_r,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=l,f=e.orientation==="horizontal";return v.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),l.type==="hover"?g.jsx(l8,{...i,ref:n,forceMount:r}):l.type==="scroll"?g.jsx(s8,{...i,ref:n,forceMount:r}):l.type==="auto"?g.jsx(uk,{...i,ref:n,forceMount:r}):l.type==="always"?g.jsx(ng,{...i,ref:n}):null});tg.displayName=_r;var l8=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=er(_r,e.__scopeScrollArea),[s,c]=v.useState(!1);return v.useEffect(()=>{const f=l.scrollArea;let d=0;if(f){const h=()=>{window.clearTimeout(d),c(!0)},m=()=>{d=window.setTimeout(()=>c(!1),l.scrollHideDelay)};return f.addEventListener("pointerenter",h),f.addEventListener("pointerleave",m),()=>{window.clearTimeout(d),f.removeEventListener("pointerenter",h),f.removeEventListener("pointerleave",m)}}},[l.scrollArea,l.scrollHideDelay]),g.jsx(un,{present:r||s,children:g.jsx(uk,{"data-state":s?"visible":"hidden",...i,ref:n})})}),s8=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=er(_r,e.__scopeScrollArea),s=e.orientation==="horizontal",c=of(()=>d("SCROLL_END"),100),[f,d]=i8("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(f==="idle"){const h=window.setTimeout(()=>d("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(h)}},[f,l.scrollHideDelay,d]),v.useEffect(()=>{const h=l.viewport,m=s?"scrollLeft":"scrollTop";if(h){let y=h[m];const w=()=>{const b=h[m];y!==b&&(d("SCROLL"),c()),y=b};return h.addEventListener("scroll",w),()=>h.removeEventListener("scroll",w)}},[l.viewport,s,d,c]),g.jsx(un,{present:r||f!=="hidden",children:g.jsx(ng,{"data-state":f==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:me(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:me(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),uk=v.forwardRef((e,n)=>{const r=er(_r,e.__scopeScrollArea),{forceMount:i,...l}=e,[s,c]=v.useState(!1),f=e.orientation==="horizontal",d=of(()=>{if(r.viewport){const h=r.viewport.offsetWidth<r.viewport.scrollWidth,m=r.viewport.offsetHeight<r.viewport.scrollHeight;c(f?h:m)}},10);return yo(r.viewport,d),yo(r.content,d),g.jsx(un,{present:i||s,children:g.jsx(ng,{"data-state":s?"visible":"hidden",...l,ref:n})})}),ng=v.forwardRef((e,n)=>{const{orientation:r="vertical",...i}=e,l=er(_r,e.__scopeScrollArea),s=v.useRef(null),c=v.useRef(0),[f,d]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=pk(f.viewport,f.content),m={...i,sizes:f,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:w=>s.current=w,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:w=>c.current=w};function y(w,b){return p8(w,c.current,f,b)}return r==="horizontal"?g.jsx(u8,{...m,ref:n,onThumbPositionChange:()=>{if(l.viewport&&s.current){const w=l.viewport.scrollLeft,b=U0(w,f,l.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:w=>{l.viewport&&(l.viewport.scrollLeft=w)},onDragScroll:w=>{l.viewport&&(l.viewport.scrollLeft=y(w,l.dir))}}):r==="vertical"?g.jsx(c8,{...m,ref:n,onThumbPositionChange:()=>{if(l.viewport&&s.current){const w=l.viewport.scrollTop,b=U0(w,f);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:w=>{l.viewport&&(l.viewport.scrollTop=w)},onDragScroll:w=>{l.viewport&&(l.viewport.scrollTop=y(w))}}):null}),u8=v.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...l}=e,s=er(_r,e.__scopeScrollArea),[c,f]=v.useState(),d=v.useRef(null),h=ze(n,d,s.onScrollbarXChange);return v.useEffect(()=>{d.current&&f(getComputedStyle(d.current))},[d]),g.jsx(fk,{"data-orientation":"horizontal",...l,ref:h,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":af(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,y)=>{if(s.viewport){const w=s.viewport.scrollLeft+m.deltaX;e.onWheelScroll(w),gk(w,y)&&m.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:wc(c.paddingLeft),paddingEnd:wc(c.paddingRight)}})}})}),c8=v.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...l}=e,s=er(_r,e.__scopeScrollArea),[c,f]=v.useState(),d=v.useRef(null),h=ze(n,d,s.onScrollbarYChange);return v.useEffect(()=>{d.current&&f(getComputedStyle(d.current))},[d]),g.jsx(fk,{"data-orientation":"vertical",...l,ref:h,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":af(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,y)=>{if(s.viewport){const w=s.viewport.scrollTop+m.deltaY;e.onWheelScroll(w),gk(w,y)&&m.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:wc(c.paddingTop),paddingEnd:wc(c.paddingBottom)}})}})}),[f8,ck]=ik(_r),fk=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,sizes:i,hasThumb:l,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:m,onResize:y,...w}=e,b=er(_r,r),[S,E]=v.useState(null),T=ze(n,Y=>E(Y)),A=v.useRef(null),R=v.useRef(""),N=b.viewport,O=i.content-i.viewport,L=Tt(m),j=Tt(d),H=of(y,10);function $(Y){if(A.current){const D=Y.clientX-A.current.left,Z=Y.clientY-A.current.top;h({x:D,y:Z})}}return v.useEffect(()=>{const Y=D=>{const Z=D.target;S?.contains(Z)&&L(D,O)};return document.addEventListener("wheel",Y,{passive:!1}),()=>document.removeEventListener("wheel",Y,{passive:!1})},[N,S,O,L]),v.useEffect(j,[i,j]),yo(S,H),yo(b.content,H),g.jsx(f8,{scope:r,scrollbar:S,hasThumb:l,onThumbChange:Tt(s),onThumbPointerUp:Tt(c),onThumbPositionChange:j,onThumbPointerDown:Tt(f),children:g.jsx(_e.div,{...w,ref:T,style:{position:"absolute",...w.style},onPointerDown:me(e.onPointerDown,Y=>{Y.button===0&&(Y.target.setPointerCapture(Y.pointerId),A.current=S.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),$(Y))}),onPointerMove:me(e.onPointerMove,$),onPointerUp:me(e.onPointerUp,Y=>{const D=Y.target;D.hasPointerCapture(Y.pointerId)&&D.releasePointerCapture(Y.pointerId),document.body.style.webkitUserSelect=R.current,b.viewport&&(b.viewport.style.scrollBehavior=""),A.current=null})})})}),bc="ScrollAreaThumb",dk=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=ck(bc,e.__scopeScrollArea);return g.jsx(un,{present:r||l.hasThumb,children:g.jsx(d8,{ref:n,...i})})}),d8=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,style:i,...l}=e,s=er(bc,r),c=ck(bc,r),{onThumbPositionChange:f}=c,d=ze(n,y=>c.onThumbChange(y)),h=v.useRef(void 0),m=of(()=>{h.current&&(h.current(),h.current=void 0)},100);return v.useEffect(()=>{const y=s.viewport;if(y){const w=()=>{if(m(),!h.current){const b=m8(y,f);h.current=b,f()}};return f(),y.addEventListener("scroll",w),()=>y.removeEventListener("scroll",w)}},[s.viewport,m,f]),g.jsx(_e.div,{"data-state":c.hasThumb?"visible":"hidden",...l,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:me(e.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),S=y.clientX-b.left,E=y.clientY-b.top;c.onThumbPointerDown({x:S,y:E})}),onPointerUp:me(e.onPointerUp,c.onThumbPointerUp)})});dk.displayName=bc;var rg="ScrollAreaCorner",hk=v.forwardRef((e,n)=>{const r=er(rg,e.__scopeScrollArea),i=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&i?g.jsx(h8,{...e,ref:n}):null});hk.displayName=rg;var h8=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,...i}=e,l=er(rg,r),[s,c]=v.useState(0),[f,d]=v.useState(0),h=!!(s&&f);return yo(l.scrollbarX,()=>{const m=l.scrollbarX?.offsetHeight||0;l.onCornerHeightChange(m),d(m)}),yo(l.scrollbarY,()=>{const m=l.scrollbarY?.offsetWidth||0;l.onCornerWidthChange(m),c(m)}),h?g.jsx(_e.div,{...i,ref:n,style:{width:s,height:f,position:"absolute",right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function wc(e){return e?parseInt(e,10):0}function pk(e,n){const r=e/n;return isNaN(r)?0:r}function af(e){const n=pk(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-r)*n;return Math.max(i,18)}function p8(e,n,r,i="ltr"){const l=af(r),s=l/2,c=n||s,f=l-c,d=r.scrollbar.paddingStart+c,h=r.scrollbar.size-r.scrollbar.paddingEnd-f,m=r.content-r.viewport,y=i==="ltr"?[0,m]:[m*-1,0];return mk([d,h],y)(e)}function U0(e,n,r="ltr"){const i=af(n),l=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,s=n.scrollbar.size-l,c=n.content-n.viewport,f=s-i,d=r==="ltr"?[0,c]:[c*-1,0],h=Ep(e,d);return mk([0,c],[0,f])(h)}function mk(e,n){return r=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(r-e[0])}}function gk(e,n){return e>0&&e<n}var m8=(e,n=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},i=0;return(function l(){const s={left:e.scrollLeft,top:e.scrollTop},c=r.left!==s.left,f=r.top!==s.top;(c||f)&&n(),r=s,i=window.requestAnimationFrame(l)})(),()=>window.cancelAnimationFrame(i)};function of(e,n){const r=Tt(e),i=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(i.current),[]),v.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,n)},[r,n])}function yo(e,n){const r=Tt(n);$t(()=>{let i=0;if(e){const l=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(r)});return l.observe(e),()=>{window.cancelAnimationFrame(i),l.unobserve(e)}}},[e,r])}var yk=ok,g8=sk,y8=hk;const es=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(yk,{ref:i,className:ue("relative overflow-hidden",e),...r,children:[g.jsx(g8,{className:"h-full w-full rounded-[inherit]",children:n}),g.jsx(vk,{}),g.jsx(y8,{})]}));es.displayName=yk.displayName;const vk=v.forwardRef(({className:e,orientation:n="vertical",...r},i)=>g.jsx(tg,{ref:i,orientation:n,className:ue("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:g.jsx(dk,{className:"relative flex-1 rounded-full bg-border"})}));vk.displayName=tg.displayName;async function xk(){const n=[...[{id:"project-md",name:"project.md",path:".nut/context/project.md",relativePath:"context/project.md",type:"context",content:"Loading..."},{id:"architecture-md",name:"architecture.md",path:".nut/context/architecture.md",relativePath:"context/architecture.md",type:"context",content:"Loading..."},{id:"role-md",name:"role.md",path:".nut/context/role.md",relativePath:"context/role.md",type:"context",content:"Loading..."}]];try{const r=await fetch(`${Et}/api/v1/context/knowledge`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.documents)){const l=i.documents.filter(s=>typeof s?.filename=="string").map(s=>({id:`knowledge-${s.filename.replace(".md","")}`,name:s.filename,path:`.nut/context/knowledge/${s.filename}`,relativePath:`context/knowledge/${s.filename}`,type:"knowledge",content:"Loading..."}));n.push(...l)}}}catch(r){console.error("Error fetching knowledge documents:",r)}try{const r=await fetch(`${Et}/api/v1/proposals`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.data)){const l=i.data.filter(s=>typeof s?.id=="string"&&typeof s.intent=="string").map(s=>({id:`proposal-${s.id}`,name:`${s.id}: ${s.intent}`,path:`.nut/proposals/${s.id}.md`,relativePath:`proposals/${s.id}.md`,type:"proposal",content:"Loading..."}));n.push(...l)}}}catch(r){console.error("Error fetching proposals:",r)}return n}async function Fp(e){if(e.content&&e.content!=="Loading...")return e;try{let n=null;if(e.name==="project.md"?n="/api/v1/context/project":e.name==="architecture.md"?n="/api/v1/context/architecture":e.name==="role.md"?n="/api/v1/context/role":e.type==="knowledge"?n=`/api/v1/context/knowledge/${e.path?.split("/").pop()?.replace(".md","")||e.relativePath?.split("/").pop()?.replace(".md","")||e.name.replace(".md","")}`:e.type==="proposal"&&(n=`/api/v1/proposals/${e.id.replace("proposal-","")}`),n){const r=await fetch(`${Et}${n}`);if(r.ok)if(e.type==="proposal"){const l=(await r.json()).data;if(l&&typeof l.intent=="string")return{...e,content:`# ${l.intent}
399
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null},X9=AC,Q9=TC,Z9=RC,IC=NC,BC=_C,UC=PC,HC=zC,FC=jC,VC=OC;const W9=X9,J9=Q9,e8=Z9,qC=v.forwardRef(({className:e,...n},r)=>g.jsx(IC,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));qC.displayName=IC.displayName;const $C=v.forwardRef(({className:e,...n},r)=>g.jsxs(e8,{children:[g.jsx(qC,{}),g.jsx(BC,{ref:r,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n})]}));$C.displayName=BC.displayName;const GC=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...n});GC.displayName="AlertDialogHeader";const YC=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});YC.displayName="AlertDialogFooter";const KC=v.forwardRef(({className:e,...n},r)=>g.jsx(FC,{ref:r,className:ue("text-lg font-semibold",e),...n}));KC.displayName=FC.displayName;const XC=v.forwardRef(({className:e,...n},r)=>g.jsx(VC,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));XC.displayName=VC.displayName;const QC=v.forwardRef(({className:e,...n},r)=>g.jsx(UC,{ref:r,className:ue(sm(),e),...n}));QC.displayName=UC.displayName;const ZC=v.forwardRef(({className:e,...n},r)=>g.jsx(HC,{ref:r,className:ue(sm({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));ZC.displayName=HC.displayName;var rf="Checkbox",[t8,fH]=Jn(rf),[n8,Wm]=t8(rf);function r8(e){const{__scopeCheckbox:n,checked:r,children:i,defaultChecked:l,disabled:s,form:c,name:f,onCheckedChange:d,required:h,value:m="on",internal_do_not_use_render:y}=e,[w,b]=_a({prop:r,defaultProp:l??!1,onChange:d,caller:rf}),[S,E]=v.useState(null),[T,A]=v.useState(null),R=v.useRef(!1),N=S?!!c||!!S.closest("form"):!0,O={checked:w,disabled:s,setChecked:b,control:S,setControl:E,name:f,form:c,value:m,hasConsumerStoppedPropagationRef:R,required:h,defaultChecked:Na(l)?!1:l,isFormControl:N,bubbleInput:T,setBubbleInput:A};return g.jsx(n8,{scope:n,...O,children:a8(y)?y(O):i})}var WC="CheckboxTrigger",JC=v.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...i},l)=>{const{control:s,value:c,disabled:f,checked:d,required:h,setControl:m,setChecked:y,hasConsumerStoppedPropagationRef:w,isFormControl:b,bubbleInput:S}=Wm(WC,e),E=ze(l,m),T=v.useRef(d);return v.useEffect(()=>{const A=s?.form;if(A){const R=()=>y(T.current);return A.addEventListener("reset",R),()=>A.removeEventListener("reset",R)}},[s,y]),g.jsx(_e.button,{type:"button",role:"checkbox","aria-checked":Na(d)?"mixed":d,"aria-required":h,"data-state":ak(d),"data-disabled":f?"":void 0,disabled:f,value:c,...i,ref:E,onKeyDown:me(n,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:me(r,A=>{y(R=>Na(R)?!0:!R),S&&b&&(w.current=A.isPropagationStopped(),w.current||A.stopPropagation())})})});JC.displayName=WC;var Jm=v.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:i,checked:l,defaultChecked:s,required:c,disabled:f,value:d,onCheckedChange:h,form:m,...y}=e;return g.jsx(r8,{__scopeCheckbox:r,checked:l,defaultChecked:s,disabled:f,required:c,onCheckedChange:h,name:i,form:m,value:d,internal_do_not_use_render:({isFormControl:w})=>g.jsxs(g.Fragment,{children:[g.jsx(JC,{...y,ref:n,__scopeCheckbox:r}),w&&g.jsx(rk,{__scopeCheckbox:r})]})})});Jm.displayName=rf;var ek="CheckboxIndicator",tk=v.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:i,...l}=e,s=Wm(ek,r);return g.jsx(un,{present:i||Na(s.checked)||s.checked===!0,children:g.jsx(_e.span,{"data-state":ak(s.checked),"data-disabled":s.disabled?"":void 0,...l,ref:n,style:{pointerEvents:"none",...e.style}})})});tk.displayName=ek;var nk="CheckboxBubbleInput",rk=v.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:i,hasConsumerStoppedPropagationRef:l,checked:s,defaultChecked:c,required:f,disabled:d,name:h,value:m,form:y,bubbleInput:w,setBubbleInput:b}=Wm(nk,e),S=ze(r,b),E=MS(s),T=aS(i);v.useEffect(()=>{const R=w;if(!R)return;const N=window.HTMLInputElement.prototype,L=Object.getOwnPropertyDescriptor(N,"checked").set,j=!l.current;if(E!==s&&L){const H=new Event("click",{bubbles:j});R.indeterminate=Na(s),L.call(R,Na(s)?!1:s),R.dispatchEvent(H)}},[w,E,s,l]);const A=v.useRef(Na(s)?!1:s);return g.jsx(_e.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??A.current,required:f,disabled:d,name:h,value:m,form:y,...n,tabIndex:-1,ref:S,style:{...n.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});rk.displayName=nk;function a8(e){return typeof e=="function"}function Na(e){return e==="indeterminate"}function ak(e){return Na(e)?"indeterminate":e?"checked":"unchecked"}const oc=v.forwardRef(({className:e,...n},r)=>g.jsx(Jm,{ref:r,className:ue("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:g.jsx(tk,{className:ue("flex items-center justify-center text-current"),children:g.jsx(Oc,{className:"h-4 w-4"})})}));oc.displayName=Jm.displayName;function i8(e,n){return v.useReducer((r,i)=>n[r][i]??r,e)}var eg="ScrollArea",[ik,dH]=Jn(eg),[o8,er]=ik(eg),ok=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,type:i="hover",dir:l,scrollHideDelay:s=600,...c}=e,[f,d]=v.useState(null),[h,m]=v.useState(null),[y,w]=v.useState(null),[b,S]=v.useState(null),[E,T]=v.useState(null),[A,R]=v.useState(0),[N,O]=v.useState(0),[L,j]=v.useState(!1),[H,$]=v.useState(!1),Y=ze(n,Z=>d(Z)),D=Yc(l);return g.jsx(o8,{scope:r,type:i,dir:D,scrollHideDelay:s,scrollArea:f,viewport:h,onViewportChange:m,content:y,onContentChange:w,scrollbarX:b,onScrollbarXChange:S,scrollbarXEnabled:L,onScrollbarXEnabledChange:j,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:H,onScrollbarYEnabledChange:$,onCornerWidthChange:R,onCornerHeightChange:O,children:g.jsx(_e.div,{dir:D,...c,ref:Y,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})});ok.displayName=eg;var lk="ScrollAreaViewport",sk=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,children:i,nonce:l,...s}=e,c=er(lk,r),f=v.useRef(null),d=ze(n,f,c.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),g.jsx(_e.div,{"data-radix-scroll-area-viewport":"",...s,ref:d,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});sk.displayName=lk;var _r="ScrollAreaScrollbar",tg=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=er(_r,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=l,f=e.orientation==="horizontal";return v.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),l.type==="hover"?g.jsx(l8,{...i,ref:n,forceMount:r}):l.type==="scroll"?g.jsx(s8,{...i,ref:n,forceMount:r}):l.type==="auto"?g.jsx(uk,{...i,ref:n,forceMount:r}):l.type==="always"?g.jsx(ng,{...i,ref:n}):null});tg.displayName=_r;var l8=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=er(_r,e.__scopeScrollArea),[s,c]=v.useState(!1);return v.useEffect(()=>{const f=l.scrollArea;let d=0;if(f){const h=()=>{window.clearTimeout(d),c(!0)},m=()=>{d=window.setTimeout(()=>c(!1),l.scrollHideDelay)};return f.addEventListener("pointerenter",h),f.addEventListener("pointerleave",m),()=>{window.clearTimeout(d),f.removeEventListener("pointerenter",h),f.removeEventListener("pointerleave",m)}}},[l.scrollArea,l.scrollHideDelay]),g.jsx(un,{present:r||s,children:g.jsx(uk,{"data-state":s?"visible":"hidden",...i,ref:n})})}),s8=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=er(_r,e.__scopeScrollArea),s=e.orientation==="horizontal",c=of(()=>d("SCROLL_END"),100),[f,d]=i8("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(f==="idle"){const h=window.setTimeout(()=>d("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(h)}},[f,l.scrollHideDelay,d]),v.useEffect(()=>{const h=l.viewport,m=s?"scrollLeft":"scrollTop";if(h){let y=h[m];const w=()=>{const b=h[m];y!==b&&(d("SCROLL"),c()),y=b};return h.addEventListener("scroll",w),()=>h.removeEventListener("scroll",w)}},[l.viewport,s,d,c]),g.jsx(un,{present:r||f!=="hidden",children:g.jsx(ng,{"data-state":f==="hidden"?"hidden":"visible",...i,ref:n,onPointerEnter:me(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:me(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),uk=v.forwardRef((e,n)=>{const r=er(_r,e.__scopeScrollArea),{forceMount:i,...l}=e,[s,c]=v.useState(!1),f=e.orientation==="horizontal",d=of(()=>{if(r.viewport){const h=r.viewport.offsetWidth<r.viewport.scrollWidth,m=r.viewport.offsetHeight<r.viewport.scrollHeight;c(f?h:m)}},10);return yo(r.viewport,d),yo(r.content,d),g.jsx(un,{present:i||s,children:g.jsx(ng,{"data-state":s?"visible":"hidden",...l,ref:n})})}),ng=v.forwardRef((e,n)=>{const{orientation:r="vertical",...i}=e,l=er(_r,e.__scopeScrollArea),s=v.useRef(null),c=v.useRef(0),[f,d]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=pk(f.viewport,f.content),m={...i,sizes:f,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:w=>s.current=w,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:w=>c.current=w};function y(w,b){return p8(w,c.current,f,b)}return r==="horizontal"?g.jsx(u8,{...m,ref:n,onThumbPositionChange:()=>{if(l.viewport&&s.current){const w=l.viewport.scrollLeft,b=U0(w,f,l.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:w=>{l.viewport&&(l.viewport.scrollLeft=w)},onDragScroll:w=>{l.viewport&&(l.viewport.scrollLeft=y(w,l.dir))}}):r==="vertical"?g.jsx(c8,{...m,ref:n,onThumbPositionChange:()=>{if(l.viewport&&s.current){const w=l.viewport.scrollTop,b=U0(w,f);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:w=>{l.viewport&&(l.viewport.scrollTop=w)},onDragScroll:w=>{l.viewport&&(l.viewport.scrollTop=y(w))}}):null}),u8=v.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...l}=e,s=er(_r,e.__scopeScrollArea),[c,f]=v.useState(),d=v.useRef(null),h=ze(n,d,s.onScrollbarXChange);return v.useEffect(()=>{d.current&&f(getComputedStyle(d.current))},[d]),g.jsx(fk,{"data-orientation":"horizontal",...l,ref:h,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":af(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,y)=>{if(s.viewport){const w=s.viewport.scrollLeft+m.deltaX;e.onWheelScroll(w),gk(w,y)&&m.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:wc(c.paddingLeft),paddingEnd:wc(c.paddingRight)}})}})}),c8=v.forwardRef((e,n)=>{const{sizes:r,onSizesChange:i,...l}=e,s=er(_r,e.__scopeScrollArea),[c,f]=v.useState(),d=v.useRef(null),h=ze(n,d,s.onScrollbarYChange);return v.useEffect(()=>{d.current&&f(getComputedStyle(d.current))},[d]),g.jsx(fk,{"data-orientation":"vertical",...l,ref:h,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":af(r)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,y)=>{if(s.viewport){const w=s.viewport.scrollTop+m.deltaY;e.onWheelScroll(w),gk(w,y)&&m.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:wc(c.paddingTop),paddingEnd:wc(c.paddingBottom)}})}})}),[f8,ck]=ik(_r),fk=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,sizes:i,hasThumb:l,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:m,onResize:y,...w}=e,b=er(_r,r),[S,E]=v.useState(null),T=ze(n,Y=>E(Y)),A=v.useRef(null),R=v.useRef(""),N=b.viewport,O=i.content-i.viewport,L=Tt(m),j=Tt(d),H=of(y,10);function $(Y){if(A.current){const D=Y.clientX-A.current.left,Z=Y.clientY-A.current.top;h({x:D,y:Z})}}return v.useEffect(()=>{const Y=D=>{const Z=D.target;S?.contains(Z)&&L(D,O)};return document.addEventListener("wheel",Y,{passive:!1}),()=>document.removeEventListener("wheel",Y,{passive:!1})},[N,S,O,L]),v.useEffect(j,[i,j]),yo(S,H),yo(b.content,H),g.jsx(f8,{scope:r,scrollbar:S,hasThumb:l,onThumbChange:Tt(s),onThumbPointerUp:Tt(c),onThumbPositionChange:j,onThumbPointerDown:Tt(f),children:g.jsx(_e.div,{...w,ref:T,style:{position:"absolute",...w.style},onPointerDown:me(e.onPointerDown,Y=>{Y.button===0&&(Y.target.setPointerCapture(Y.pointerId),A.current=S.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),$(Y))}),onPointerMove:me(e.onPointerMove,$),onPointerUp:me(e.onPointerUp,Y=>{const D=Y.target;D.hasPointerCapture(Y.pointerId)&&D.releasePointerCapture(Y.pointerId),document.body.style.webkitUserSelect=R.current,b.viewport&&(b.viewport.style.scrollBehavior=""),A.current=null})})})}),bc="ScrollAreaThumb",dk=v.forwardRef((e,n)=>{const{forceMount:r,...i}=e,l=ck(bc,e.__scopeScrollArea);return g.jsx(un,{present:r||l.hasThumb,children:g.jsx(d8,{ref:n,...i})})}),d8=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,style:i,...l}=e,s=er(bc,r),c=ck(bc,r),{onThumbPositionChange:f}=c,d=ze(n,y=>c.onThumbChange(y)),h=v.useRef(void 0),m=of(()=>{h.current&&(h.current(),h.current=void 0)},100);return v.useEffect(()=>{const y=s.viewport;if(y){const w=()=>{if(m(),!h.current){const b=m8(y,f);h.current=b,f()}};return f(),y.addEventListener("scroll",w),()=>y.removeEventListener("scroll",w)}},[s.viewport,m,f]),g.jsx(_e.div,{"data-state":c.hasThumb?"visible":"hidden",...l,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:me(e.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),S=y.clientX-b.left,E=y.clientY-b.top;c.onThumbPointerDown({x:S,y:E})}),onPointerUp:me(e.onPointerUp,c.onThumbPointerUp)})});dk.displayName=bc;var rg="ScrollAreaCorner",hk=v.forwardRef((e,n)=>{const r=er(rg,e.__scopeScrollArea),i=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&i?g.jsx(h8,{...e,ref:n}):null});hk.displayName=rg;var h8=v.forwardRef((e,n)=>{const{__scopeScrollArea:r,...i}=e,l=er(rg,r),[s,c]=v.useState(0),[f,d]=v.useState(0),h=!!(s&&f);return yo(l.scrollbarX,()=>{const m=l.scrollbarX?.offsetHeight||0;l.onCornerHeightChange(m),d(m)}),yo(l.scrollbarY,()=>{const m=l.scrollbarY?.offsetWidth||0;l.onCornerWidthChange(m),c(m)}),h?g.jsx(_e.div,{...i,ref:n,style:{width:s,height:f,position:"absolute",right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function wc(e){return e?parseInt(e,10):0}function pk(e,n){const r=e/n;return isNaN(r)?0:r}function af(e){const n=pk(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-r)*n;return Math.max(i,18)}function p8(e,n,r,i="ltr"){const l=af(r),s=l/2,c=n||s,f=l-c,d=r.scrollbar.paddingStart+c,h=r.scrollbar.size-r.scrollbar.paddingEnd-f,m=r.content-r.viewport,y=i==="ltr"?[0,m]:[m*-1,0];return mk([d,h],y)(e)}function U0(e,n,r="ltr"){const i=af(n),l=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,s=n.scrollbar.size-l,c=n.content-n.viewport,f=s-i,d=r==="ltr"?[0,c]:[c*-1,0],h=Ep(e,d);return mk([0,c],[0,f])(h)}function mk(e,n){return r=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(r-e[0])}}function gk(e,n){return e>0&&e<n}var m8=(e,n=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},i=0;return(function l(){const s={left:e.scrollLeft,top:e.scrollTop},c=r.left!==s.left,f=r.top!==s.top;(c||f)&&n(),r=s,i=window.requestAnimationFrame(l)})(),()=>window.cancelAnimationFrame(i)};function of(e,n){const r=Tt(e),i=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(i.current),[]),v.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,n)},[r,n])}function yo(e,n){const r=Tt(n);$t(()=>{let i=0;if(e){const l=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(r)});return l.observe(e),()=>{window.cancelAnimationFrame(i),l.unobserve(e)}}},[e,r])}var yk=ok,g8=sk,y8=hk;const Jl=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(yk,{ref:i,className:ue("relative overflow-hidden",e),...r,children:[g.jsx(g8,{className:"h-full w-full rounded-[inherit]",children:n}),g.jsx(vk,{}),g.jsx(y8,{})]}));Jl.displayName=yk.displayName;const vk=v.forwardRef(({className:e,orientation:n="vertical",...r},i)=>g.jsx(tg,{ref:i,orientation:n,className:ue("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:g.jsx(dk,{className:"relative flex-1 rounded-full bg-border"})}));vk.displayName=tg.displayName;async function xk(){const n=[...[{id:"project-md",name:"project.md",path:".nut/context/project.md",relativePath:"context/project.md",type:"context",content:"Loading..."},{id:"architecture-md",name:"architecture.md",path:".nut/context/architecture.md",relativePath:"context/architecture.md",type:"context",content:"Loading..."},{id:"role-md",name:"role.md",path:".nut/context/role.md",relativePath:"context/role.md",type:"context",content:"Loading..."}]];try{const r=await fetch(`${Et}/api/v1/context/knowledge`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.documents)){const l=i.documents.filter(s=>typeof s?.filename=="string").map(s=>({id:`knowledge-${s.filename.replace(".md","")}`,name:s.filename,path:`.nut/context/knowledge/${s.filename}`,relativePath:`context/knowledge/${s.filename}`,type:"knowledge",content:"Loading..."}));n.push(...l)}}}catch(r){console.error("Error fetching knowledge documents:",r)}try{const r=await fetch(`${Et}/api/v1/proposals`);if(r.ok){const i=await r.json();if(i.success&&Array.isArray(i.data)){const l=i.data.filter(s=>typeof s?.id=="string"&&typeof s.intent=="string").map(s=>({id:`proposal-${s.id}`,name:`${s.id}: ${s.intent}`,path:`.nut/proposals/${s.id}.md`,relativePath:`proposals/${s.id}.md`,type:"proposal",content:"Loading..."}));n.push(...l)}}}catch(r){console.error("Error fetching proposals:",r)}return n}async function Fp(e){if(e.content&&e.content!=="Loading...")return e;try{let n=null;if(e.name==="project.md"?n="/api/v1/context/project":e.name==="architecture.md"?n="/api/v1/context/architecture":e.name==="role.md"?n="/api/v1/context/role":e.type==="knowledge"?n=`/api/v1/context/knowledge/${e.path?.split("/").pop()?.replace(".md","")||e.relativePath?.split("/").pop()?.replace(".md","")||e.name.replace(".md","")}`:e.type==="proposal"&&(n=`/api/v1/proposals/${e.id.replace("proposal-","")}`),n){const r=await fetch(`${Et}${n}`);if(r.ok)if(e.type==="proposal"){const l=(await r.json()).data;if(l&&typeof l.intent=="string")return{...e,content:`# ${l.intent}
400
400
 
401
401
  ${l.content||"No content available"}`}}else{const l=(await r.json()).document?.content;return{...e,content:typeof l=="string"&&l.length>0?l:"Content not available"}}}}catch(n){console.error(`Error loading content for ${e.name}:`,n)}return{...e,content:e.content??"Content could not be loaded."}}function H0({open:e,onOpenChange:n,onSelectionConfirm:r,initialSelection:i=[]}){const[l,s]=v.useState([]),[c,f]=v.useState(i),[d,h]=v.useState(null),[m,y]=v.useState(!1);v.useEffect(()=>{e&&(w(),f(i))},[e,i]);const w=async()=>{y(!0);try{const N=await xk();s(N)}catch(N){console.error("Error loading context files:",N)}finally{y(!1)}},b=async N=>{if(N.content&&N.content!=="Loading...")return N;try{return await Fp(N)}catch(O){console.error("Error loading file content via API:",O)}try{let O="Content could not be loaded.";return N.name==="project.md"?O=`# Coconut - Project Context
402
402
 
@@ -441,11 +441,11 @@ project-root/
441
441
  │ ├── context/ # Project context
442
442
  │ └── knowledge/ # Team knowledge
443
443
  └── your-actual-code/ # Your project files
444
- \`\`\``),{...N,content:O}}catch(O){return console.error("Fallback content generation failed:",O),{...N,content:"Error loading content"}}},S=async N=>{const O=await b(N);h(O)},E=(N,O)=>{f(L=>O?[...L,N]:L.filter(j=>j!==N))},T=()=>{const N=l.filter(O=>c.includes(O.id));r({files:N,selectedIds:c}),n(!1)},A=N=>{switch(N){case"context":case"knowledge":return g.jsx(uc,{className:"h-4 w-4"});case"agent":return g.jsx(Hl,{className:"h-4 w-4"});case"proposal":return g.jsx(xb,{className:"h-4 w-4"});default:return g.jsx(xb,{className:"h-4 w-4"})}},R=l.reduce((N,O)=>{let L="context";return O.type==="knowledge"?L="knowledge":O.type==="proposal"&&(L="proposals"),N[L]||(N[L]=[]),N[L].push(O),N},{});return g.jsx(Zc,{open:e,onOpenChange:n,children:g.jsxs(hs,{className:"max-w-4xl h-[80vh] flex flex-col",children:[g.jsx(ps,{children:g.jsx(ms,{children:"Select Context Files"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsx("div",{className:"mb-2 text-sm font-medium",children:"Project Context"}),g.jsx(es,{className:"h-full",children:m?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx(cc,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading files..."})]})}):l.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"text-center text-muted-foreground",children:[g.jsx(xM,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No context files available"})]})}):g.jsxs("div",{className:"space-y-1",children:[R.context&&g.jsxs("div",{className:"space-y-1",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(tc,{className:"h-3 w-3"}),g.jsx("span",{children:"Context"})]}),R.context.map(N=>g.jsxs("div",{className:ue("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",d?.id===N.id&&"bg-muted"),onClick:()=>S(N),children:[g.jsx(oc,{checked:c.includes(N.id),onCheckedChange:O=>E(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),R.knowledge&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(tc,{className:"h-3 w-3"}),g.jsx("span",{children:"Knowledge"})]}),R.knowledge.map(N=>g.jsxs("div",{className:ue("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",d?.id===N.id&&"bg-muted"),onClick:()=>S(N),children:[g.jsx(oc,{checked:c.includes(N.id),onCheckedChange:O=>E(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),R.proposals&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(tc,{className:"h-3 w-3"}),g.jsx("span",{children:"Proposals"})]}),R.proposals.map(N=>g.jsxs("div",{className:ue("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",d?.id===N.id&&"bg-muted"),onClick:()=>S(N),children:[g.jsx(oc,{checked:c.includes(N.id),onCheckedChange:O=>E(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",title:N.name,children:N.name.length>30?`${N.name.substring(0,30)}...`:N.name})]},N.id))]})]})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:d?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[A(d.type),g.jsx("span",{className:"font-medium",children:d.name}),g.jsx("span",{className:"text-xs text-muted-foreground",children:d.relativePath})]})}),g.jsx(es,{className:"flex-1 border rounded-md p-4",children:d.content==="Loading..."?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx(cc,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading content..."})]})}):g.jsx(bs,{className:"[&_.prose]:max-w-none",children:d.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(uc,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select a file to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsxs("div",{className:"text-sm text-muted-foreground",children:[c.length," file",c.length!==1?"s":""," selected"]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(vt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(vt,{onClick:T,children:"Use Selected Context"})]})]})]})})}function F0({open:e,onOpenChange:n,onSelect:r,initialSelectedId:i=null}){const[l,s]=v.useState([]),[c,f]=v.useState(!1),[d,h]=v.useState(i);v.useEffect(()=>{e&&(h(i),f(!0),fetch(`${Et}/api/v1/agents`).then(async w=>{if(!w.ok)throw new Error("Failed to load agents");const b=await w.json();s(b.documents||[])}).catch(()=>s([])).finally(()=>f(!1)))},[e,i]);const m=v.useMemo(()=>l.find(w=>w.filename.replace(".md","")===d)||null,[l,d]),y=()=>{m&&(r(m),n(!1))};return g.jsx(Zc,{open:e,onOpenChange:n,children:g.jsxs(hs,{className:"max-w-4xl h-[80vh] flex flex-col",children:[g.jsx(ps,{children:g.jsx(ms,{children:"Select an Agent"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsxs("div",{className:"mb-2 text-sm font-medium flex items-center gap-2",children:[g.jsx(tc,{className:"h-3 w-3"}),g.jsx("span",{children:"Agents"})]}),g.jsx(es,{className:"h-full",children:c?g.jsx("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):l.length===0?g.jsx("div",{className:"py-8 text-sm text-muted-foreground text-center",children:"No agents found"}):g.jsx("div",{className:"space-y-1",children:l.map(w=>{const b=w.filename.replace(".md",""),S=d===b;return g.jsxs("button",{onClick:()=>h(b),className:ue("w-full text-left p-2 rounded-md hover:bg-muted flex items-center gap-2",S&&"bg-muted"),children:[g.jsx("input",{type:"radio",checked:S,onChange:()=>h(b),className:"h-4 w-4"}),g.jsx(Hl,{className:"h-4 w-4"}),g.jsx("span",{className:"text-sm truncate flex-1",children:w.metadata?.name||w.title})]},b)})})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:m?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Hl,{className:"h-4 w-4"}),g.jsx("span",{className:"font-medium",children:m.metadata?.name||m.title}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:[".nut/agents/",m.filename]})]})}),g.jsx(es,{className:"flex-1 border rounded-md p-4",children:g.jsx(bs,{className:"[&_.prose]:max-w-none",children:m.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(Hl,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select an agent to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsx("div",{className:"text-sm text-muted-foreground",children:m?`Selected: ${m.metadata?.name||m.title}`:"No agent selected"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(vt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(vt,{onClick:y,disabled:!m,children:"Use Agent"})]})]})]})})}const v8=[{id:"openai/gpt-4o",label:"GPT-4o",provider:"openai",supportsMCP:!0,strengths:["balanced","reasoning","code","tools"],notes:"Great general model with tool/function calling support."},{id:"openai/gpt-4o-mini",label:"GPT-4o Mini",provider:"openai",supportsMCP:!0,strengths:["cost-effective","fast","tools"],notes:"Good for quick, inexpensive tasks with function calling."},{id:"openai/gpt-4.1",label:"GPT-4.1",provider:"openai",supportsMCP:!0,strengths:["coding","instruction following","long context"],notes:"Latest GPT-4 series with enhanced capabilities."},{id:"openai/o3-mini",label:"o3-mini",provider:"openai",supportsMCP:!0,strengths:["reasoning","math","coding"],notes:"Reasoning model optimized for efficiency."},{id:"anthropic/claude-sonnet-4.5",label:"Claude Sonnet 4.5",provider:"anthropic",supportsMCP:!0,strengths:["agents","coding","tools","fast","long context"],notes:"Most advanced Sonnet - 1.5-2x faster, optimized for agents and tool orchestration."},{id:"anthropic/claude-sonnet-4",label:"Claude Sonnet 4",provider:"anthropic",supportsMCP:!0,strengths:["reasoning","analysis","tools","coding"],notes:"Excellent tool use and reasoning capabilities."},{id:"anthropic/claude-3.5-sonnet",label:"Claude 3.5 Sonnet",provider:"anthropic",supportsMCP:!0,strengths:["reasoning","analysis","tools"],notes:"Reliable Claude model with strong tool support."},{id:"google/gemini-2.0-flash-001",label:"Gemini 2.0 Flash",provider:"google",supportsMCP:!0,strengths:["speed","multimodal","tools"],notes:"Fast Google model with function calling."},{id:"meta-llama/llama-3.1-405b-instruct",label:"Llama 3.1 405B",provider:"meta-llama",supportsMCP:!0,strengths:["reasoning","open weights","code"],notes:"High-capacity open model; function calling often available."},{id:"qwen/qwen-2.5-72b-instruct",label:"Qwen 2.5 72B",provider:"qwen",supportsMCP:!0,strengths:["cost-effective","code","tools"],notes:"Strong value open model with tool support."}],x8={models:v8},bk=x8;function b8(){return bk.models}function w8(e){return bk.models.find(n=>n.id===e)}function S8(e){return!!w8(e)?.supportsMCP}const wk=v.forwardRef(({className:e,...n},r)=>g.jsx("textarea",{className:ue("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));wk.displayName="Textarea";const E8=/```knowledge_action\s*\n([\s\S]*?)```/gi;function Vp(e){if(!e||typeof e!="object")return!1;const n=e;return!(typeof n.action!="string"||n.action!=="create"&&n.action!=="update"||typeof n.title!="string"||typeof n.content!="string"||n.action==="update"&&typeof n.filename!="string")}function qp(e){const n=e.metadata?{...e.metadata,tags:Array.isArray(e.metadata.tags)?e.metadata.tags:e.metadata.tags?[e.metadata.tags].flat().map(String):[],sources:Array.isArray(e.metadata.sources)?e.metadata.sources:e.metadata.sources?[e.metadata.sources].flat().map(String):[],related:Array.isArray(e.metadata.related)?e.metadata.related:[],audience:Array.isArray(e.metadata.audience)?e.metadata.audience:[]}:void 0;return{...e,metadata:n}}function C8(e){if(!e)return[];const n=Array.isArray(e)?e:[e],r=[];for(const i of n)Vp(i)&&r.push(qp(i));return r}function k8(e){const n=e.trimEnd();if(!n.endsWith("}"))return null;let r=0,i=!1,l=!1;for(let s=n.length-1;s>=0;s--){const c=n[s];if(i){l?l=!1:c==="\\"?l=!0:c==='"'&&(i=!1);continue}if(c==='"'){i=!0;continue}if(c==="}"){r+=1;continue}if(c==="{"&&(r-=1,r===0)){const f=n.slice(s);try{const d=JSON.parse(f),h=C8(d);if(h.length>0)return{cleaned:n.slice(0,s).trimEnd(),actions:h}}catch(d){console.error("Failed to parse trailing knowledge action payload:",d)}return null}}return null}function A8(e){const n=[];let i=e.replace(E8,(l,s)=>{try{const c=JSON.parse(s.trim());Array.isArray(c)?c.forEach(f=>{Vp(f)&&n.push(qp(f))}):Vp(c)&&n.push(qp(c))}catch(c){console.error("Failed to parse knowledge_action block:",c)}return""}).replace(/\n{3,}/g,`
444
+ \`\`\``),{...N,content:O}}catch(O){return console.error("Fallback content generation failed:",O),{...N,content:"Error loading content"}}},S=async N=>{const O=await b(N);h(O)},E=(N,O)=>{f(L=>O?[...L,N]:L.filter(j=>j!==N))},T=()=>{const N=l.filter(O=>c.includes(O.id));r({files:N,selectedIds:c}),n(!1)},A=N=>{switch(N){case"context":case"knowledge":return g.jsx(uc,{className:"h-4 w-4"});case"agent":return g.jsx(Ul,{className:"h-4 w-4"});case"proposal":return g.jsx(xb,{className:"h-4 w-4"});default:return g.jsx(xb,{className:"h-4 w-4"})}},R=l.reduce((N,O)=>{let L="context";return O.type==="knowledge"?L="knowledge":O.type==="proposal"&&(L="proposals"),N[L]||(N[L]=[]),N[L].push(O),N},{});return g.jsx(Zc,{open:e,onOpenChange:n,children:g.jsxs(ds,{className:"max-w-4xl h-[80vh] flex flex-col",children:[g.jsx(hs,{children:g.jsx(ps,{children:"Select Context Files"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsx("div",{className:"mb-2 text-sm font-medium",children:"Project Context"}),g.jsx(Jl,{className:"h-full",children:m?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx(cc,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading files..."})]})}):l.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"text-center text-muted-foreground",children:[g.jsx(xM,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No context files available"})]})}):g.jsxs("div",{className:"space-y-1",children:[R.context&&g.jsxs("div",{className:"space-y-1",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(ec,{className:"h-3 w-3"}),g.jsx("span",{children:"Context"})]}),R.context.map(N=>g.jsxs("div",{className:ue("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",d?.id===N.id&&"bg-muted"),onClick:()=>S(N),children:[g.jsx(oc,{checked:c.includes(N.id),onCheckedChange:O=>E(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),R.knowledge&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(ec,{className:"h-3 w-3"}),g.jsx("span",{children:"Knowledge"})]}),R.knowledge.map(N=>g.jsxs("div",{className:ue("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",d?.id===N.id&&"bg-muted"),onClick:()=>S(N),children:[g.jsx(oc,{checked:c.includes(N.id),onCheckedChange:O=>E(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",children:N.name})]},N.id))]}),R.proposals&&g.jsxs("div",{className:"space-y-1 mt-4",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[g.jsx(ec,{className:"h-3 w-3"}),g.jsx("span",{children:"Proposals"})]}),R.proposals.map(N=>g.jsxs("div",{className:ue("flex items-center gap-2 p-2 rounded-md cursor-pointer hover:bg-muted",d?.id===N.id&&"bg-muted"),onClick:()=>S(N),children:[g.jsx(oc,{checked:c.includes(N.id),onCheckedChange:O=>E(N.id,O),onClick:O=>O.stopPropagation()}),A(N.type),g.jsx("span",{className:"text-sm truncate flex-1",title:N.name,children:N.name.length>30?`${N.name.substring(0,30)}...`:N.name})]},N.id))]})]})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:d?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[A(d.type),g.jsx("span",{className:"font-medium",children:d.name}),g.jsx("span",{className:"text-xs text-muted-foreground",children:d.relativePath})]})}),g.jsx(Jl,{className:"flex-1 border rounded-md p-4",children:d.content==="Loading..."?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx(cc,{className:"h-4 w-4 animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading content..."})]})}):g.jsx(xs,{className:"[&_.prose]:max-w-none",children:d.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(uc,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select a file to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsxs("div",{className:"text-sm text-muted-foreground",children:[c.length," file",c.length!==1?"s":""," selected"]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(vt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(vt,{onClick:T,children:"Use Selected Context"})]})]})]})})}function F0({open:e,onOpenChange:n,onSelect:r,initialSelectedId:i=null}){const[l,s]=v.useState([]),[c,f]=v.useState(!1),[d,h]=v.useState(i);v.useEffect(()=>{e&&(h(i),f(!0),fetch(`${Et}/api/v1/agents`).then(async w=>{if(!w.ok)throw new Error("Failed to load agents");const b=await w.json();s(b.documents||[])}).catch(()=>s([])).finally(()=>f(!1)))},[e,i]);const m=v.useMemo(()=>l.find(w=>w.filename.replace(".md","")===d)||null,[l,d]),y=()=>{m&&(r(m),n(!1))};return g.jsx(Zc,{open:e,onOpenChange:n,children:g.jsxs(ds,{className:"max-w-4xl h-[80vh] flex flex-col",children:[g.jsx(hs,{children:g.jsx(ps,{children:"Select an Agent"})}),g.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[g.jsxs("div",{className:"w-1/3 border-r pr-4",children:[g.jsxs("div",{className:"mb-2 text-sm font-medium flex items-center gap-2",children:[g.jsx(ec,{className:"h-3 w-3"}),g.jsx("span",{children:"Agents"})]}),g.jsx(Jl,{className:"h-full",children:c?g.jsx("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):l.length===0?g.jsx("div",{className:"py-8 text-sm text-muted-foreground text-center",children:"No agents found"}):g.jsx("div",{className:"space-y-1",children:l.map(w=>{const b=w.filename.replace(".md",""),S=d===b;return g.jsxs("button",{onClick:()=>h(b),className:ue("w-full text-left p-2 rounded-md hover:bg-muted flex items-center gap-2",S&&"bg-muted"),children:[g.jsx("input",{type:"radio",checked:S,onChange:()=>h(b),className:"h-4 w-4"}),g.jsx(Ul,{className:"h-4 w-4"}),g.jsx("span",{className:"text-sm truncate flex-1",children:w.metadata?.name||w.title})]},b)})})})]}),g.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:m?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ul,{className:"h-4 w-4"}),g.jsx("span",{className:"font-medium",children:m.metadata?.name||m.title}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:[".nut/agents/",m.filename]})]})}),g.jsx(Jl,{className:"flex-1 border rounded-md p-4",children:g.jsx(xs,{className:"[&_.prose]:max-w-none",children:m.content||"No content available"})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx(Ul,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Select an agent to preview"})]})})})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[g.jsx("div",{className:"text-sm text-muted-foreground",children:m?`Selected: ${m.metadata?.name||m.title}`:"No agent selected"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(vt,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),g.jsx(vt,{onClick:y,disabled:!m,children:"Use Agent"})]})]})]})})}const v8=[{id:"openai/gpt-4o",label:"GPT-4o",provider:"openai",supportsMCP:!0,strengths:["balanced","reasoning","code","tools"],notes:"Great general model with tool/function calling support."},{id:"openai/gpt-4o-mini",label:"GPT-4o Mini",provider:"openai",supportsMCP:!0,strengths:["cost-effective","fast","tools"],notes:"Good for quick, inexpensive tasks with function calling."},{id:"openai/gpt-4.1",label:"GPT-4.1",provider:"openai",supportsMCP:!0,strengths:["coding","instruction following","long context"],notes:"Latest GPT-4 series with enhanced capabilities."},{id:"openai/o3-mini",label:"o3-mini",provider:"openai",supportsMCP:!0,strengths:["reasoning","math","coding"],notes:"Reasoning model optimized for efficiency."},{id:"anthropic/claude-sonnet-4.5",label:"Claude Sonnet 4.5",provider:"anthropic",supportsMCP:!0,strengths:["agents","coding","tools","fast","long context"],notes:"Most advanced Sonnet - 1.5-2x faster, optimized for agents and tool orchestration."},{id:"anthropic/claude-sonnet-4",label:"Claude Sonnet 4",provider:"anthropic",supportsMCP:!0,strengths:["reasoning","analysis","tools","coding"],notes:"Excellent tool use and reasoning capabilities."},{id:"anthropic/claude-3.5-sonnet",label:"Claude 3.5 Sonnet",provider:"anthropic",supportsMCP:!0,strengths:["reasoning","analysis","tools"],notes:"Reliable Claude model with strong tool support."},{id:"google/gemini-2.0-flash-001",label:"Gemini 2.0 Flash",provider:"google",supportsMCP:!0,strengths:["speed","multimodal","tools"],notes:"Fast Google model with function calling."},{id:"meta-llama/llama-3.1-405b-instruct",label:"Llama 3.1 405B",provider:"meta-llama",supportsMCP:!0,strengths:["reasoning","open weights","code"],notes:"High-capacity open model; function calling often available."},{id:"qwen/qwen-2.5-72b-instruct",label:"Qwen 2.5 72B",provider:"qwen",supportsMCP:!0,strengths:["cost-effective","code","tools"],notes:"Strong value open model with tool support."}],x8={models:v8},bk=x8;function b8(){return bk.models}function w8(e){return bk.models.find(n=>n.id===e)}function S8(e){return!!w8(e)?.supportsMCP}const wk=v.forwardRef(({className:e,...n},r)=>g.jsx("textarea",{className:ue("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));wk.displayName="Textarea";const E8=/```knowledge_action\s*\n([\s\S]*?)```/gi;function Vp(e){if(!e||typeof e!="object")return!1;const n=e;return!(typeof n.action!="string"||n.action!=="create"&&n.action!=="update"||typeof n.title!="string"||typeof n.content!="string"||n.action==="update"&&typeof n.filename!="string")}function qp(e){const n=e.metadata?{...e.metadata,tags:Array.isArray(e.metadata.tags)?e.metadata.tags:e.metadata.tags?[e.metadata.tags].flat().map(String):[],sources:Array.isArray(e.metadata.sources)?e.metadata.sources:e.metadata.sources?[e.metadata.sources].flat().map(String):[],related:Array.isArray(e.metadata.related)?e.metadata.related:[],audience:Array.isArray(e.metadata.audience)?e.metadata.audience:[]}:void 0;return{...e,metadata:n}}function C8(e){if(!e)return[];const n=Array.isArray(e)?e:[e],r=[];for(const i of n)Vp(i)&&r.push(qp(i));return r}function k8(e){const n=e.trimEnd();if(!n.endsWith("}"))return null;let r=0,i=!1,l=!1;for(let s=n.length-1;s>=0;s--){const c=n[s];if(i){l?l=!1:c==="\\"?l=!0:c==='"'&&(i=!1);continue}if(c==='"'){i=!0;continue}if(c==="}"){r+=1;continue}if(c==="{"&&(r-=1,r===0)){const f=n.slice(s);try{const d=JSON.parse(f),h=C8(d);if(h.length>0)return{cleaned:n.slice(0,s).trimEnd(),actions:h}}catch(d){console.error("Failed to parse trailing knowledge action payload:",d)}return null}}return null}function A8(e){const n=[];let i=e.replace(E8,(l,s)=>{try{const c=JSON.parse(s.trim());Array.isArray(c)?c.forEach(f=>{Vp(f)&&n.push(qp(f))}):Vp(c)&&n.push(qp(c))}catch(c){console.error("Failed to parse knowledge_action block:",c)}return""}).replace(/\n{3,}/g,`
445
445
 
446
446
  `).trim();if(n.length===0){const l=k8(i);l&&(n.push(...l.actions),i=l.cleaned)}return{cleanedContent:i,actions:n}}function T8(e){return e.action==="create"?`Proposed new knowledge document "${e.title}"`:`Proposed updates to ${e.filename||e.title}`}function R8(e,n){const r=e.split(`
447
447
  `),i=n.split(`
448
- `),l=r.length,s=i.length,c=Array.from({length:l+1},()=>Array(s+1).fill(0));for(let m=l-1;m>=0;m--)for(let y=s-1;y>=0;y--)r[m]===i[y]?c[m][y]=c[m+1][y+1]+1:c[m][y]=Math.max(c[m+1][y],c[m][y+1]);const f=[];let d=0,h=0;for(;d<l&&h<s;)r[d]===i[h]?(f.push({type:"context",value:r[d]}),d++,h++):c[d+1][h]>=c[d][h+1]?(f.push({type:"removed",value:r[d]}),d++):(f.push({type:"added",value:i[h]}),h++);for(;d<l;)f.push({type:"removed",value:r[d]}),d++;for(;h<s;)f.push({type:"added",value:i[h]}),h++;return f}function N8({original:e,updated:n}){const r=v.useMemo(()=>R8(e??"",n??""),[e,n]);return g.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md bg-background",children:g.jsx("pre",{className:"text-xs leading-5 font-mono p-4 space-y-1",children:r.map((i,l)=>{const s=i.type==="added"?"+":i.type==="removed"?"-":" ",c=i.type==="added"?"bg-green-100 dark:bg-green-950/40 text-green-900 dark:text-green-200 border-l-2 border-green-500":i.type==="removed"?"bg-red-100 dark:bg-red-950/40 text-red-900 dark:text-red-200 border-l-2 border-red-500":"text-muted-foreground";return g.jsxs("div",{className:ue("px-2 py-1 whitespace-pre-wrap break-words rounded-sm",c),children:[s," ",i.value]},l)})})})}function _8({action:e,onApply:n,fetchDocumentContent:r}){const[i,l]=v.useState(!1),[s,c]=v.useState(null),[f,d]=v.useState(null),[h,m]=v.useState(!1),[y,w]=v.useState(!1),[b,S]=v.useState("idle"),[E,T]=v.useState(null),A=e.action==="create"?"Preview document":"View diff",R=e.action==="create"?"Add to knowledge":`Update ${e.filename||"document"}`,N=async()=>{if(d(null),e.action==="update"){if(!e.filename){d("Filename is required to load the existing document."),l(!0);return}l(!0),m(!0);try{const j=await r(e.filename);if(!j){d("Could not load the existing knowledge document.");return}c({mode:"diff",original:j,updated:e.content})}catch(j){d(j instanceof Error?j.message:"Failed to load preview.")}finally{m(!1)}}else c({mode:"content",updated:e.content}),l(!0)},O=async()=>{T(null),S("idle"),w(!0);try{await n(e),S("success")}catch(j){S("error"),T(j instanceof Error?j.message:"Failed to update knowledge document.")}finally{w(!1)}},L=()=>{l(!1),c(null),d(null)};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"border border-dashed border-primary/40 bg-primary/5 text-sm rounded-md p-3 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"font-medium leading-tight",children:T8(e)}),e.summary&&g.jsx("p",{className:"text-xs text-muted-foreground leading-snug",children:e.summary})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(vt,{variant:"outline",size:"sm",onClick:N,disabled:h,children:h?"Loading…":A}),g.jsx(vt,{size:"sm",onClick:O,disabled:y||b==="success",children:y?"Applying…":R})]})]}),b==="success"&&g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"Knowledge document saved."}),b==="error"&&E&&g.jsx("p",{className:"text-xs text-destructive",children:E})]}),g.jsx(Zc,{open:i,onOpenChange:j=>j?l(!0):L(),children:g.jsxs(hs,{className:"max-w-3xl",children:[g.jsxs(ps,{children:[g.jsx(ms,{children:e.action==="create"?e.title:`Proposed changes for ${e.filename||e.title}`}),f&&g.jsx(Il,{className:"text-destructive",children:f}),h&&!f&&g.jsx(Il,{children:"Loading preview…"}),s?.mode==="diff"&&!h&&!f&&g.jsx(Il,{children:"Review differences before updating the knowledge document."}),s?.mode==="content"&&!h&&!f&&g.jsx(Il,{children:"Review the drafted knowledge content before saving."})]}),!h&&!f&&s&&(s.mode==="diff"&&s.original?g.jsx(N8,{original:s.original,updated:s.updated}):g.jsx("div",{className:"border rounded-md p-4 max-h-[60vh] overflow-auto bg-background",children:g.jsx(bs,{className:"text-sm [&_.prose]:text-sm",children:s.updated})})),g.jsx(gE,{children:g.jsx(vt,{variant:"outline",size:"sm",onClick:L,children:"Close"})})]})})]})}function M8({isOpen:e,onToggle:n,contextInfo:r,discussDocument:i,onDiscussDocumentHandled:l,pendingPrompt:s,onPendingPromptHandled:c,openInFullScreen:f,onFullScreenHandled:d}){const[h,m]=v.useState("openai/gpt-4o"),[y,w]=v.useState(""),[b,S]=v.useState([]),[E,T]=v.useState(!1),[A,R]=v.useState(!1),N=f1(),O=as(),[L,j]=v.useState(!1),[H,$]=v.useState([]),[Y,D]=v.useState(!1),[Z,J]=v.useState(!1),[ne,G]=v.useState([]),[ae,z]=v.useState([]),Q=v.useRef([]),B=v.useRef(new Map),ie=v.useRef(!0),[k,W]=v.useState([]),se=k.length,M=se>0?`${se} file${se===1?"":"s"}`:"None",ce=()=>g.jsxs(g.Fragment,{children:["Added context:"," ",g.jsx("span",{className:"text-emerald-500 font-medium",children:M})]}),[Ee,pe]=v.useState(!1),[le,ve]=v.useState(null),[Ve,De]=v.useState(!1),[Be,We]=v.useState([]),[Ke,xt]=v.useState(!1),[zn,tr]=v.useState(null),[Rt,yi]=v.useState(null),[bn,wn]=v.useState(null);v.useEffect(()=>{const F=fe=>{if(fe.key==="Escape"){if(A){xi();return}if(Ke){xt(!1);return}}if((fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="k"){fe.preventDefault(),J(!0);return}if((fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="n"){fe.preventDefault(),(b.length>0||k.length>0||le)&&(Sn.current&&(Sn.current.abort(),Sn.current=null),T(!1),R(!1),wn(null),S([]),W([]),z([]),Q.current=[],ve(null),De(!1),w(""));return}if((fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="e"){fe.preventDefault(),xt(ye=>!ye);return}};if(e)return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[e,Ke,A,b.length,k.length,le]);const hr=v.useRef(null),ea=v.useRef(null),Sn=v.useRef(null),ta=v.useRef(null);v.useEffect(()=>{e&&setTimeout(()=>ta.current?.focus(),100)},[e]);const vi=v.useCallback((F=!1)=>{try{ea.current?ea.current.scrollTop=ea.current.scrollHeight:hr.current&&hr.current.scrollIntoView({behavior:F?"auto":"smooth"})}catch{console.error("Error scrolling to bottom")}},[]);v.useEffect(()=>{vi(A)},[b,E,A,vi]),v.useEffect(()=>{(async()=>{try{const fe=await fetch(`${Et}/api/v1/config?type=global`);if(fe.ok){const ge=(await fe.json())?.data?.defaults?.model;typeof ge=="string"&&ge.length>0&&m(ge)}}catch(fe){console.error("Error loading default AI model configuration:",fe)}})()},[]),v.useEffect(()=>()=>{ie.current=!1},[]),v.useEffect(()=>{Q.current=ae},[ae]),v.useEffect(()=>{if(!Ke&&zn){const F=zn;tr(null),requestAnimationFrame(()=>{O("/proposals/new",{state:F})})}},[Ke,zn,O]),v.useEffect(()=>{let F=!1;return(async()=>{try{const ye=await xk();if(F)return;G(ye);const ge=B.current;ye.forEach(Se=>{const Ue=ge.get(Se.id);Ue&&Ue.content&&Ue.content!=="Loading..."&&(!Se.content||Se.content==="Loading...")?ge.set(Se.id,Ue):ge.set(Se.id,Se)})}catch(ye){F||console.error("Error loading context file list:",ye)}})(),()=>{F=!0}},[]),v.useEffect(()=>{(async()=>{try{const fe=await fetch(`${Et}/api/v1/mcp`);if(fe.ok){const ye=await fe.json();if(ye.tools){const ge=Object.entries(ye.tools).map(([Se,Ue])=>({name:Se,...Ue}));We(ge)}}}catch(fe){console.error("Error loading MCP tools:",fe)}})()},[]);const ee=v.useMemo(()=>b8().map(F=>({value:F.id,label:F.label})),[]),de=S8(h),ke=Be.length>0,Ae=v.useCallback(F=>{const fe=B.current.get(F);if(fe)return fe;const ye=ne.find(ge=>ge.id===F);return ye?(B.current.set(F,ye),ye):null},[ne]),Je=v.useCallback(F=>{if(F.startsWith("knowledge-")){const ye=`${F.replace("knowledge-","")}.md`;return{id:F,name:ye,type:"knowledge",path:`.nut/context/knowledge/${ye}`,relativePath:`context/knowledge/${ye}`,content:"Loading..."}}if(F.startsWith("proposal-")){const fe=F.replace("proposal-","");return{id:F,name:`${fe}.md`,type:"proposal",path:`.nut/proposals/${fe}.md`,relativePath:`proposals/${fe}.md`,content:"Loading..."}}return F==="project-md"?{id:F,name:"project.md",type:"context",path:".nut/context/project.md",relativePath:"context/project.md",content:"Loading..."}:F==="architecture-md"?{id:F,name:"architecture.md",type:"context",path:".nut/context/architecture.md",relativePath:"context/architecture.md",content:"Loading..."}:null},[]),Zt=v.useCallback(async F=>{const fe=F.filter((ge,Se,Ue)=>Ue.indexOf(ge)===Se),ye=[];for(const ge of fe){let Se=Ae(ge);if(Se||(Se=Je(ge),Se&&B.current.set(ge,Se)),!!Se){if(Se.content&&Se.content!=="Loading..."){B.current.set(ge,Se),ye.push(Se);continue}try{const Ue=await Fp(Se);B.current.set(ge,Ue),ye.push(Ue)}catch(Ue){console.error(`Error ensuring content for context file ${Se.name}:`,Ue),ye.push(Se)}}}return ye},[Je,Ae]),fn=v.useCallback(async F=>{if(F.length===0){W([]);return}try{const fe=await Zt(F);if(!ie.current)return;const ye=new Map(fe.map(Se=>[Se.id,Se])),ge=F.map(Se=>ye.get(Se)).filter(Se=>!!Se);W(ge)}catch(fe){console.error("Error synchronizing selected context files:",fe)}},[Zt]);v.useEffect(()=>{if(i&&e){const F={id:i.id,name:i.name,type:i.type||"knowledge",path:i.path,relativePath:i.path,content:"Loading..."};if(!Q.current.includes(i.id)){const fe=[...Q.current,i.id];z(fe),Q.current=fe,B.current.set(i.id,F),W(ye=>ye.some(ge=>ge.id===i.id)?ye:[...ye,F]),fn(fe).catch(ye=>{console.error("Error syncing context after discuss document:",ye)})}l?.()}},[i,e,l,fn]),v.useEffect(()=>{s&&e&&(w(s),c?.())},[s,e,c]),v.useEffect(()=>{f&&(xt(!0),d?.(),setTimeout(()=>ta.current?.focus(),100))},[f,d]),v.useEffect(()=>{const F=()=>{xt(fe=>!fe),setTimeout(()=>ta.current?.focus(),100)};return window.addEventListener("toggle-assistant-fullscreen",F),()=>{window.removeEventListener("toggle-assistant-fullscreen",F)}},[]);const Wt=de&&ke;v.useEffect(()=>{!new Set(ee.map(fe=>fe.value)).has(h)&&ee.length>0&&m(ee[0].value)},[ee,h]);const In=async()=>{if(b.length!==0)try{const F=await fetch(`${Et}/api/v1/chats`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:b,model:h,context:r})});if(!F.ok){const ye=await F.json();throw new Error(ye.error||"Failed to save chat")}const fe=await F.json();console.log("Chat saved:",fe.chatId)}catch(F){console.error("Error saving chat:",F)}},Jt=async()=>{D(!0);try{const F=await fetch(`${Et}/api/v1/chats`);if(!F.ok)throw new Error("Failed to load chat history");const fe=await F.json();$(fe.chats)}catch(F){console.error("Error loading chat history:",F)}finally{D(!1)}},Nt=async F=>{try{const fe=await fetch(`${Et}/api/v1/chats/${F}`);if(!fe.ok)throw new Error("Failed to load chat");const ye=await fe.json();S(ye.chat.messages),m(ye.chat.model),j(!1)}catch(fe){console.error("Error loading chat:",fe)}},dn=async F=>{try{if(!(await fetch(`${Et}/api/v1/chats/${F}`,{method:"DELETE"})).ok)throw new Error("Failed to delete chat");await Jt()}catch(fe){console.error("Error deleting chat:",fe)}},En=()=>{A&&xi(),S([]),W([]),z([]),Q.current=[],ve(null),De(!1),w("")},Cs=async(F,fe)=>{try{await navigator.clipboard.writeText(F),yi(fe),setTimeout(()=>yi(null),2e3)}catch(ye){console.error("Failed to copy message:",ye)}},ks=F=>{const fe=pr(),ge=[...fe.understand,...fe.define,...fe.explore,...fe.synthesize,...fe.capture].find(Se=>Se.label===F);ge&&w(ge.prompt)},jo=async F=>{try{const fe=F.endsWith(".md")?F.slice(0,-3):F,ye=await fetch(`${Et}/api/v1/context/knowledge/${fe}`);return ye.ok?(await ye.json()).document?.content||null:(console.error("Failed to fetch knowledge document:",ye.statusText),null)}catch(fe){return console.error("Error fetching knowledge document:",fe),null}},La=async F=>{const fe={tool:"knowledge_documents",arguments:{operation:F.action==="create"?"create":"update",title:F.title,content:F.content,filename:F.filename,metadata:F.metadata,summary:F.summary}};try{const ye=await fetch(`${Et}/api/v1/mcp/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(fe)}),ge=await ye.json();if(!ye.ok||!ge.success)throw new Error(ge.error||"Knowledge tool execution failed");const Se=ge.data?.filename||F.filename||F.title,Ue=F.action==="create"?"added to the knowledge base":"updated in the knowledge base";S(It=>[...It,{role:"system",content:`Knowledge document ${Se} ${Ue}.`}])}catch(ye){throw console.error("Error applying knowledge action:",ye),ye instanceof Error?ye:new Error("Failed to apply knowledge action")}},As=async()=>{if(!y.trim()||A)return;const F=y,ye=!b.some(Xe=>Xe.role==="user");let ge;ye&&le&&!Ve&&(ge=`--- System Persona ---
448
+ `),l=r.length,s=i.length,c=Array.from({length:l+1},()=>Array(s+1).fill(0));for(let m=l-1;m>=0;m--)for(let y=s-1;y>=0;y--)r[m]===i[y]?c[m][y]=c[m+1][y+1]+1:c[m][y]=Math.max(c[m+1][y],c[m][y+1]);const f=[];let d=0,h=0;for(;d<l&&h<s;)r[d]===i[h]?(f.push({type:"context",value:r[d]}),d++,h++):c[d+1][h]>=c[d][h+1]?(f.push({type:"removed",value:r[d]}),d++):(f.push({type:"added",value:i[h]}),h++);for(;d<l;)f.push({type:"removed",value:r[d]}),d++;for(;h<s;)f.push({type:"added",value:i[h]}),h++;return f}function N8({original:e,updated:n}){const r=v.useMemo(()=>R8(e??"",n??""),[e,n]);return g.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md bg-background",children:g.jsx("pre",{className:"text-xs leading-5 font-mono p-4 space-y-1",children:r.map((i,l)=>{const s=i.type==="added"?"+":i.type==="removed"?"-":" ",c=i.type==="added"?"bg-green-100 dark:bg-green-950/40 text-green-900 dark:text-green-200 border-l-2 border-green-500":i.type==="removed"?"bg-red-100 dark:bg-red-950/40 text-red-900 dark:text-red-200 border-l-2 border-red-500":"text-muted-foreground";return g.jsxs("div",{className:ue("px-2 py-1 whitespace-pre-wrap break-words rounded-sm",c),children:[s," ",i.value]},l)})})})}function _8({action:e,onApply:n,fetchDocumentContent:r}){const[i,l]=v.useState(!1),[s,c]=v.useState(null),[f,d]=v.useState(null),[h,m]=v.useState(!1),[y,w]=v.useState(!1),[b,S]=v.useState("idle"),[E,T]=v.useState(null),A=e.action==="create"?"Preview document":"View diff",R=e.action==="create"?"Add to knowledge":`Update ${e.filename||"document"}`,N=async()=>{if(d(null),e.action==="update"){if(!e.filename){d("Filename is required to load the existing document."),l(!0);return}l(!0),m(!0);try{const j=await r(e.filename);if(!j){d("Could not load the existing knowledge document.");return}c({mode:"diff",original:j,updated:e.content})}catch(j){d(j instanceof Error?j.message:"Failed to load preview.")}finally{m(!1)}}else c({mode:"content",updated:e.content}),l(!0)},O=async()=>{T(null),S("idle"),w(!0);try{await n(e),S("success")}catch(j){S("error"),T(j instanceof Error?j.message:"Failed to update knowledge document.")}finally{w(!1)}},L=()=>{l(!1),c(null),d(null)};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"border border-dashed border-primary/40 bg-primary/5 text-sm rounded-md p-3 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"font-medium leading-tight",children:T8(e)}),e.summary&&g.jsx("p",{className:"text-xs text-muted-foreground leading-snug",children:e.summary})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(vt,{variant:"outline",size:"sm",onClick:N,disabled:h,children:h?"Loading…":A}),g.jsx(vt,{size:"sm",onClick:O,disabled:y||b==="success",children:y?"Applying…":R})]})]}),b==="success"&&g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"Knowledge document saved."}),b==="error"&&E&&g.jsx("p",{className:"text-xs text-destructive",children:E})]}),g.jsx(Zc,{open:i,onOpenChange:j=>j?l(!0):L(),children:g.jsxs(ds,{className:"max-w-3xl",children:[g.jsxs(hs,{children:[g.jsx(ps,{children:e.action==="create"?e.title:`Proposed changes for ${e.filename||e.title}`}),f&&g.jsx(zl,{className:"text-destructive",children:f}),h&&!f&&g.jsx(zl,{children:"Loading preview…"}),s?.mode==="diff"&&!h&&!f&&g.jsx(zl,{children:"Review differences before updating the knowledge document."}),s?.mode==="content"&&!h&&!f&&g.jsx(zl,{children:"Review the drafted knowledge content before saving."})]}),!h&&!f&&s&&(s.mode==="diff"&&s.original?g.jsx(N8,{original:s.original,updated:s.updated}):g.jsx("div",{className:"border rounded-md p-4 max-h-[60vh] overflow-auto bg-background",children:g.jsx(xs,{className:"text-sm [&_.prose]:text-sm",children:s.updated})})),g.jsx(gE,{children:g.jsx(vt,{variant:"outline",size:"sm",onClick:L,children:"Close"})})]})})]})}function M8({isOpen:e,onToggle:n,contextInfo:r,discussDocument:i,onDiscussDocumentHandled:l,pendingPrompt:s,onPendingPromptHandled:c,openInFullScreen:f,onFullScreenHandled:d}){const[h,m]=v.useState("openai/gpt-4o"),[y,w]=v.useState(""),[b,S]=v.useState([]),[E,T]=v.useState(!1),[A,R]=v.useState(!1),N=f1(),O=rs(),[L,j]=v.useState(!1),[H,$]=v.useState([]),[Y,D]=v.useState(!1),[Z,J]=v.useState(!1),[ne,G]=v.useState([]),[ae,z]=v.useState([]),Q=v.useRef([]),B=v.useRef(new Map),ie=v.useRef(!0),[k,W]=v.useState([]),se=k.length,M=se>0?`${se} file${se===1?"":"s"}`:"None",ce=()=>g.jsxs(g.Fragment,{children:["Added context:"," ",g.jsx("span",{className:"text-emerald-500 font-medium",children:M})]}),[Ee,pe]=v.useState(!1),[le,ve]=v.useState(null),[Ve,De]=v.useState(!1),[Be,We]=v.useState([]),[Ke,xt]=v.useState(!1),[zn,tr]=v.useState(null),[Rt,yi]=v.useState(null),[bn,wn]=v.useState(null);v.useEffect(()=>{const F=fe=>{if(fe.key==="Escape"){if(A){xi();return}if(Ke){xt(!1);return}}if((fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="k"){fe.preventDefault(),J(!0);return}if((fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="n"){fe.preventDefault(),(b.length>0||k.length>0||le)&&(Sn.current&&(Sn.current.abort(),Sn.current=null),T(!1),R(!1),wn(null),S([]),W([]),z([]),Q.current=[],ve(null),De(!1),w(""));return}if((fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="e"){fe.preventDefault(),xt(ye=>!ye);return}};if(e)return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[e,Ke,A,b.length,k.length,le]);const hr=v.useRef(null),ea=v.useRef(null),Sn=v.useRef(null),ta=v.useRef(null);v.useEffect(()=>{e&&setTimeout(()=>ta.current?.focus(),100)},[e]);const vi=v.useCallback((F=!1)=>{try{ea.current?ea.current.scrollTop=ea.current.scrollHeight:hr.current&&hr.current.scrollIntoView({behavior:F?"auto":"smooth"})}catch{console.error("Error scrolling to bottom")}},[]);v.useEffect(()=>{vi(A)},[b,E,A,vi]),v.useEffect(()=>{(async()=>{try{const fe=await fetch(`${Et}/api/v1/config?type=global`);if(fe.ok){const ge=(await fe.json())?.data?.defaults?.model;typeof ge=="string"&&ge.length>0&&m(ge)}}catch(fe){console.error("Error loading default AI model configuration:",fe)}})()},[]),v.useEffect(()=>()=>{ie.current=!1},[]),v.useEffect(()=>{Q.current=ae},[ae]),v.useEffect(()=>{if(!Ke&&zn){const F=zn;tr(null),requestAnimationFrame(()=>{O("/proposals/new",{state:F})})}},[Ke,zn,O]),v.useEffect(()=>{let F=!1;return(async()=>{try{const ye=await xk();if(F)return;G(ye);const ge=B.current;ye.forEach(Se=>{const Ue=ge.get(Se.id);Ue&&Ue.content&&Ue.content!=="Loading..."&&(!Se.content||Se.content==="Loading...")?ge.set(Se.id,Ue):ge.set(Se.id,Se)})}catch(ye){F||console.error("Error loading context file list:",ye)}})(),()=>{F=!0}},[]),v.useEffect(()=>{(async()=>{try{const fe=await fetch(`${Et}/api/v1/mcp`);if(fe.ok){const ye=await fe.json();if(ye.tools){const ge=Object.entries(ye.tools).map(([Se,Ue])=>({name:Se,...Ue}));We(ge)}}}catch(fe){console.error("Error loading MCP tools:",fe)}})()},[]);const ee=v.useMemo(()=>b8().map(F=>({value:F.id,label:F.label})),[]),de=S8(h),ke=Be.length>0,Ae=v.useCallback(F=>{const fe=B.current.get(F);if(fe)return fe;const ye=ne.find(ge=>ge.id===F);return ye?(B.current.set(F,ye),ye):null},[ne]),Je=v.useCallback(F=>{if(F.startsWith("knowledge-")){const ye=`${F.replace("knowledge-","")}.md`;return{id:F,name:ye,type:"knowledge",path:`.nut/context/knowledge/${ye}`,relativePath:`context/knowledge/${ye}`,content:"Loading..."}}if(F.startsWith("proposal-")){const fe=F.replace("proposal-","");return{id:F,name:`${fe}.md`,type:"proposal",path:`.nut/proposals/${fe}.md`,relativePath:`proposals/${fe}.md`,content:"Loading..."}}return F==="project-md"?{id:F,name:"project.md",type:"context",path:".nut/context/project.md",relativePath:"context/project.md",content:"Loading..."}:F==="architecture-md"?{id:F,name:"architecture.md",type:"context",path:".nut/context/architecture.md",relativePath:"context/architecture.md",content:"Loading..."}:null},[]),Zt=v.useCallback(async F=>{const fe=F.filter((ge,Se,Ue)=>Ue.indexOf(ge)===Se),ye=[];for(const ge of fe){let Se=Ae(ge);if(Se||(Se=Je(ge),Se&&B.current.set(ge,Se)),!!Se){if(Se.content&&Se.content!=="Loading..."){B.current.set(ge,Se),ye.push(Se);continue}try{const Ue=await Fp(Se);B.current.set(ge,Ue),ye.push(Ue)}catch(Ue){console.error(`Error ensuring content for context file ${Se.name}:`,Ue),ye.push(Se)}}}return ye},[Je,Ae]),fn=v.useCallback(async F=>{if(F.length===0){W([]);return}try{const fe=await Zt(F);if(!ie.current)return;const ye=new Map(fe.map(Se=>[Se.id,Se])),ge=F.map(Se=>ye.get(Se)).filter(Se=>!!Se);W(ge)}catch(fe){console.error("Error synchronizing selected context files:",fe)}},[Zt]);v.useEffect(()=>{if(i&&e){const F={id:i.id,name:i.name,type:i.type||"knowledge",path:i.path,relativePath:i.path,content:"Loading..."};if(!Q.current.includes(i.id)){const fe=[...Q.current,i.id];z(fe),Q.current=fe,B.current.set(i.id,F),W(ye=>ye.some(ge=>ge.id===i.id)?ye:[...ye,F]),fn(fe).catch(ye=>{console.error("Error syncing context after discuss document:",ye)})}l?.()}},[i,e,l,fn]),v.useEffect(()=>{s&&e&&(w(s),c?.())},[s,e,c]),v.useEffect(()=>{f&&(xt(!0),d?.(),setTimeout(()=>ta.current?.focus(),100))},[f,d]),v.useEffect(()=>{const F=()=>{xt(fe=>!fe),setTimeout(()=>ta.current?.focus(),100)};return window.addEventListener("toggle-assistant-fullscreen",F),()=>{window.removeEventListener("toggle-assistant-fullscreen",F)}},[]);const Wt=de&&ke;v.useEffect(()=>{!new Set(ee.map(fe=>fe.value)).has(h)&&ee.length>0&&m(ee[0].value)},[ee,h]);const In=async()=>{if(b.length!==0)try{const F=await fetch(`${Et}/api/v1/chats`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:b,model:h,context:r})});if(!F.ok){const ye=await F.json();throw new Error(ye.error||"Failed to save chat")}const fe=await F.json();console.log("Chat saved:",fe.chatId)}catch(F){console.error("Error saving chat:",F)}},Jt=async()=>{D(!0);try{const F=await fetch(`${Et}/api/v1/chats`);if(!F.ok)throw new Error("Failed to load chat history");const fe=await F.json();$(fe.chats)}catch(F){console.error("Error loading chat history:",F)}finally{D(!1)}},Nt=async F=>{try{const fe=await fetch(`${Et}/api/v1/chats/${F}`);if(!fe.ok)throw new Error("Failed to load chat");const ye=await fe.json();S(ye.chat.messages),m(ye.chat.model),j(!1)}catch(fe){console.error("Error loading chat:",fe)}},dn=async F=>{try{if(!(await fetch(`${Et}/api/v1/chats/${F}`,{method:"DELETE"})).ok)throw new Error("Failed to delete chat");await Jt()}catch(fe){console.error("Error deleting chat:",fe)}},En=()=>{A&&xi(),S([]),W([]),z([]),Q.current=[],ve(null),De(!1),w("")},Es=async(F,fe)=>{try{await navigator.clipboard.writeText(F),yi(fe),setTimeout(()=>yi(null),2e3)}catch(ye){console.error("Failed to copy message:",ye)}},Cs=F=>{const fe=pr(),ge=[...fe.understand,...fe.define,...fe.explore,...fe.synthesize,...fe.capture].find(Se=>Se.label===F);ge&&w(ge.prompt)},jo=async F=>{try{const fe=F.endsWith(".md")?F.slice(0,-3):F,ye=await fetch(`${Et}/api/v1/context/knowledge/${fe}`);return ye.ok?(await ye.json()).document?.content||null:(console.error("Failed to fetch knowledge document:",ye.statusText),null)}catch(fe){return console.error("Error fetching knowledge document:",fe),null}},La=async F=>{const fe={tool:"knowledge_documents",arguments:{operation:F.action==="create"?"create":"update",title:F.title,content:F.content,filename:F.filename,metadata:F.metadata,summary:F.summary}};try{const ye=await fetch(`${Et}/api/v1/mcp/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(fe)}),ge=await ye.json();if(!ye.ok||!ge.success)throw new Error(ge.error||"Knowledge tool execution failed");const Se=ge.data?.filename||F.filename||F.title,Ue=F.action==="create"?"added to the knowledge base":"updated in the knowledge base";S(It=>[...It,{role:"system",content:`Knowledge document ${Se} ${Ue}.`}])}catch(ye){throw console.error("Error applying knowledge action:",ye),ye instanceof Error?ye:new Error("Failed to apply knowledge action")}},ks=async()=>{if(!y.trim()||A)return;const F=y,ye=!b.some(Xe=>Xe.role==="user");let ge;ye&&le&&!Ve&&(ge=`--- System Persona ---
449
449
  You MUST adopt and consistently act as the following agent persona for this entire conversation.
450
450
  - Follow its goals, tone, constraints, and tools.
451
451
  - Prioritize the agent's specified skills and focus areas in your reasoning and responses.
@@ -454,8 +454,8 @@ You MUST adopt and consistently act as the following agent persona for this enti
454
454
  Agent: ${le.name} (.nut/agents/${le.filename})
455
455
 
456
456
  ${le.content}
457
- --- End System Persona ---`,De(!0));const Ue=(await Promise.all(k.map(async Xe=>{if(Xe.content&&Xe.content!=="Loading..."&&Xe.content!=="Content not available")return Xe;try{const Gt=await Fp(Xe);return B.current.set(Xe.id,Gt),Gt}catch(Gt){return console.error(`Failed to load content for ${Xe.name}:`,Gt),Xe}}))).filter(Xe=>Xe.content&&Xe.content!=="Loading..."&&Xe.content!=="Content not available").map(Xe=>({name:Xe.name,path:Xe.path,type:Xe.type,content:Xe.content})),It={role:"user",content:y};S(Xe=>[...Xe,It]),w(""),T(!0),R(!0);const pt=new AbortController;Sn.current=pt;try{const Gt=[...b,It].filter(lt=>lt.role==="user"||lt.role==="assistant").map((lt,Yt,Bt)=>Yt===Bt.length-1&&lt.role==="user"?{role:lt.role,content:F}:lt),an={message:F,history:Gt,model:h,context:r?.type,contextContent:r?.content,agentPersona:ge,maxTokens:8e3,enableTools:Wt,attachedContextFiles:Ue.length>0?Ue:void 0,stream:!0},hn=await fetch(`${Et}/api/v1/ai`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(an),signal:pt.signal});if(!hn.ok){let lt="Failed to get AI response";try{const Yt=await hn.json();lt=Yt.error||Yt.message||lt,Yt.status&&(lt=`${lt} (${Yt.status})`)}catch{lt=`${hn.statusText||lt} (${hn.status})`}throw new Error(lt)}if(an.stream&&hn.body){const lt=hn.body.getReader(),Yt=new TextDecoder;let Bt="",mr=null;const mt=new Map;let bi=!1;const Ts={role:"assistant",content:""};S(Ot=>[...Ot,Ts]),T(!1);try{let Ot="";for(;;){const{done:Ut,value:gt}=await lt.read();if(Ut)break;Ot+=Yt.decode(gt,{stream:!0});const Ia=Ot.split(`
458
- `);Ot=Ia.pop()||"";for(const Ct of Ia)if(Ct.startsWith("data: ")){const _t=Ct.slice(6).trim();if(_t==="[DONE]")break;try{const bt=JSON.parse(_t);if(bt.error){mr=bt.error.message||bt.error||"Unknown streaming error",console.error("Stream error from API:",bt.error);break}const nr=bt.choices?.[0]?.delta?.content;nr&&(Bt+=nr,S(Ht=>{const kn=[...Ht];return kn[kn.length-1]={role:"assistant",content:Bt},kn}));const Cn=bt.choices?.[0]?.delta?.tool_calls;if(Cn&&Array.isArray(Cn)){bi=!0;for(const Ht of Cn){const kn=Ht.index??0,jr=mt.get(kn);jr?(Ht.id&&(jr.id=Ht.id),Ht.type&&(jr.type=Ht.type),Ht.function?.name&&(jr.function.name+=Ht.function.name),Ht.function?.arguments&&(jr.function.arguments+=Ht.function.arguments)):mt.set(kn,{id:Ht.id||"",type:Ht.type||"function",function:{name:Ht.function?.name||"",arguments:Ht.function?.arguments||""}})}}const Mr=bt.choices?.[0]?.finish_reason;Mr==="tool_calls"?bi=!0:Mr&&Mr!=="stop"&&Mr!=="length"&&console.warn("Unusual finish reason:",Mr)}catch{_t&&_t!=="[DONE]"&&console.warn("Failed to parse stream chunk:",_t.substring(0,100))}}}if(bi&&mt.size>0){const Ut=Array.from(mt.values()).map((Ct,_t)=>({id:Ct.id||`call_${_t}`,type:Ct.type,function:Ct.function})),gt=Ut.map(Ct=>Ct.function.name).filter(Boolean),Ia=gt.length>0?`Executing ${gt.join(", ")}...`:"Executing tools...";wn(Ia),T(!0),S(Ct=>{const _t=[...Ct];return _t[_t.length-1]={role:"assistant",content:Bt||""},_t});try{const Ct=await fetch(`${Et}/api/v1/ai/tools`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolCalls:Ut,model:h,history:Gt,context:r?.type,contextContent:r?.content,agentPersona:ge,attachedContextFiles:Ue.length>0?Ue:void 0,previousContent:Bt}),signal:pt.signal});if(Ct.ok){const _t=await Ct.json();wn(null),S(bt=>{const nr=[...bt];return nr[nr.length-1]={role:"assistant",content:_t.response||Bt,toolCalls:Ut,toolResults:_t.toolResults},nr})}else wn(null),console.error("Tool execution failed:",await Ct.text()),S(_t=>{const bt=[..._t];return bt[bt.length-1]={role:"assistant",content:Bt||"I tried to use tools but encountered an error executing them."},bt})}catch(Ct){wn(null),Ct instanceof DOMException&&Ct.name==="AbortError"||(console.error("Tool execution error:",Ct),S(_t=>{const bt=[..._t];return bt[bt.length-1]={role:"assistant",content:Bt||"I tried to use tools but encountered an error."},bt}))}}else mr?S(Ut=>{const gt=[...Ut];return gt[gt.length-1]={role:"assistant",content:`Sorry, I encountered an error: ${mr}`},gt}):Bt.trim()||(S(Ut=>{const gt=[...Ut];return gt[gt.length-1]?.role==="assistant"&&!gt[gt.length-1]?.content&&gt.pop(),gt}),console.warn("Stream completed with no content"))}catch(Ot){Ot instanceof DOMException&&Ot.name==="AbortError"||(console.error("Streaming error:",Ot),S(Ut=>{const gt=[...Ut];return gt[gt.length-1]?.role==="assistant"&&(gt[gt.length-1]={role:"assistant",content:`Sorry, I encountered a streaming error: ${Ot instanceof Error?Ot.message:"Unknown error"}`}),gt}))}}else{const lt=await hn.json(),Yt={role:"assistant",content:lt.response,toolCalls:lt.toolCalls,toolResults:lt.toolResults};S(Bt=>[...Bt,Yt])}}catch(Xe){if(Xe instanceof DOMException&&Xe.name==="AbortError")S(Gt=>{const an=[...Gt],hn=an[an.length-1];return hn?.role==="assistant"&&!hn.content&&an.pop(),an});else{console.error("Error calling AI:",Xe);const Gt={role:"assistant",content:`Sorry, I encountered an error: ${Xe instanceof Error?Xe.message:"Unknown error"}`};S(an=>[...an,Gt])}}finally{Sn.current=null,T(!1),R(!1),wn(null)}},xi=()=>{Sn.current&&(Sn.current.abort(),Sn.current=null),T(!1),R(!1),wn(null)},Do=F=>{F.files.forEach(ge=>{const Se=B.current.get(ge.id);(!Se||Se.content!==ge.content)&&B.current.set(ge.id,ge)}),z(F.selectedIds),Q.current=F.selectedIds;const fe=new Map(F.files.map(ge=>[ge.id,ge])),ye=F.selectedIds.map(ge=>{const Se=fe.get(ge);if(Se)return Se;const Ue=B.current.get(ge);return Ue||ne.find(It=>It.id===ge)||null}).filter(ge=>ge!==null);W(ye),fn(F.selectedIds).catch(ge=>{console.error("Error syncing context after manual selection:",ge)})},pr=()=>({understand:[{label:"Summarize this context",prompt:"Summarize the key points from the attached context. What are the main themes and takeaways?"},{label:"Explain relationships",prompt:"How do the attached documents relate to each other? What connections and dependencies exist?"},{label:"Identify gaps",prompt:"Based on the attached context, what important information seems to be missing or could be better documented?"}],define:[{label:"Define my project",prompt:"Help me define my project. I'd like to create or update the project.md document that captures what we're building, who it's for, and what success looks like. Please ask me questions to understand the project."},{label:"Define my architecture",prompt:"Help me define the technical architecture. I'd like to create or update the architecture.md document that captures our tech stack, conventions, and system design. Please ask me questions about our technical setup."},{label:"Refine project definition",prompt:"I'd like to refine or add to my project.md document. Please read the current version and suggest improvements or ask what I'd like to change."},{label:"Refine architecture",prompt:"I'd like to refine or add to my architecture.md document. Please read the current version and suggest improvements or ask what I'd like to change."}],explore:[{label:"What's been happening?",prompt:"Show me recent activity in this Coconut. What's been happening with proposals, knowledge updates, or agent sessions?"},{label:"Search knowledge base",prompt:"Search the knowledge base for information about: "},{label:"Find proposals about...",prompt:"Find and summarize proposals related to: "},{label:"Show recent events",prompt:"Show me the most recent events. I want to see what's been happening."}],synthesize:[{label:"Extract key insights",prompt:"Extract the most important insights from the attached context that should be preserved in the knowledge base."},{label:"Connect the dots",prompt:"Find patterns and connections across the attached documents. What story do they tell together?"},{label:"Draft proposal content",prompt:"Help me draft content for a change proposal about: (I'll create it via the Proposals UI or a coding agent)"},{label:"Compare approaches",prompt:"Help me understand the tradeoffs between: "}],capture:[{label:"Save to knowledge base",prompt:"Save the key insights from our conversation to the knowledge base as a new document."},{label:"Document a decision",prompt:"Create a knowledge document capturing this decision and its rationale: "},{label:"Update knowledge document",prompt:"Update the knowledge document about: "},{label:"Add to project.md",prompt:"I'd like to add the following to my project.md document: "},{label:"Add to architecture.md",prompt:"I'd like to add the following to my architecture.md document: "}]}),za=g.jsx(g.Fragment,{children:g.jsxs("div",{className:"flex h-full w-full flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between p-4 border-b flex-shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(dp,{className:ue(Ke?"h-6 w-6":"h-5 w-5")}),g.jsxs("div",{children:[g.jsx("h2",{className:ue("font-semibold leading-tight",Ke?"text-xl":"text-lg"),children:"Coconut Assistant"}),g.jsx("p",{className:"text-xs text-muted-foreground leading-tight",children:"Context Management"})]})]}),g.jsx("div",{className:ue("flex items-center gap-1",N&&"mr-8"),children:Ke?g.jsx(vt,{onClick:()=>xt(!1),size:"icon",variant:"ghost",className:"h-8 w-8",title:"Exit Expanded View (Esc)",children:g.jsx(so,{className:"h-4 w-4"})}):g.jsxs(g.Fragment,{children:[g.jsx(vt,{onClick:()=>{j(!L),L||Jt()},size:"icon",variant:"outline",className:"h-8 w-8",title:"Chat History",children:g.jsx(kM,{className:"h-4 w-4"})}),g.jsx(vt,{onClick:()=>xt(!0),size:"icon",variant:"outline",className:"h-8 w-8",title:"Expand View (⌘⇧L)",children:g.jsx(dM,{className:"h-4 w-4"})})]})})]}),g.jsx("div",{className:"p-4 border-b flex-shrink-0",children:g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsxs(Gb,{value:h,onValueChange:m,children:[g.jsx(Np,{className:"flex-1",children:g.jsx(Yb,{placeholder:"Select AI model"})}),g.jsx(_p,{children:ee.map(F=>g.jsx(li,{value:F.value,children:F.label},F.value))})]}),g.jsx(vt,{onClick:In,disabled:b.length===0,size:"icon",variant:"outline",className:"h-9 w-9 shrink-0",title:"Save Chat",children:g.jsx(KM,{className:"h-4 w-4"})}),g.jsxs(W9,{children:[g.jsx(J9,{asChild:!0,children:g.jsx(vt,{disabled:b.length===0&&k.length===0&&!le,size:"icon",variant:"outline",className:"h-9 w-9 shrink-0",title:"New Chat (⌘⇧N)",children:g.jsx(lj,{className:"h-4 w-4"})})}),g.jsxs($C,{children:[g.jsxs(GC,{children:[g.jsx(KC,{children:"Clear Chat"}),g.jsx(XC,{children:"This clears all messages, removes selected context files, and resets the selected agent. This action cannot be undone."})]}),g.jsxs(YC,{children:[g.jsx(ZC,{children:"Cancel"}),g.jsx(QC,{onClick:En,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Clear Chat"})]})]})]})]})}),g.jsx("div",{className:"p-4 border-b bg-muted/50 flex-shrink-0",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{className:"flex-1 min-w-0",children:se>0?g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:ce()}),g.jsx("div",{className:"flex flex-wrap gap-1",children:k.map(F=>g.jsxs("div",{className:ue("flex items-center gap-1 text-xs px-2 py-1 rounded-md","bg-primary/10 text-primary"),children:[g.jsx("span",{children:F.name}),g.jsx("button",{onClick:fe=>{fe.stopPropagation();const ye=Q.current.filter(ge=>ge!==F.id);z(ye),Q.current=ye,W(ge=>ge.filter(Se=>Se.id!==F.id)),fn(ye).catch(ge=>{console.error("Error syncing context after removal:",ge)})},className:ue("ml-1 rounded-full p-0.5 transition-colors","hover:bg-primary/20"),disabled:!1,title:"Remove from context",children:g.jsx(so,{className:"h-3 w-3"})})]},F.id))})]}):g.jsx("p",{className:"text-sm text-muted-foreground",children:ce()})}),g.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:[g.jsx(vt,{onClick:()=>J(!0),size:"icon",variant:"ghost",className:"h-6 w-6",title:"Select Context Files (⌘⇧K)",disabled:!1,children:g.jsx(LM,{className:"h-4 w-4"})}),g.jsxs("span",{className:"hidden sm:inline-flex items-center gap-0.5 text-muted-foreground/60",children:[g.jsx(zh,{className:"text-[9px] px-1 h-4",children:"⌘"}),g.jsx(zh,{className:"text-[9px] px-1 h-4",children:"⇧"}),g.jsx(zh,{className:"text-[9px] px-1 h-4",children:"K"})]})]})]})}),L&&g.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-2 min-h-0",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"font-medium",children:"Chat History"}),g.jsx(vt,{onClick:()=>j(!1),size:"sm",variant:"ghost",children:g.jsx(so,{className:"h-4 w-4"})})]}),Y?g.jsx("div",{className:"text-center text-muted-foreground py-8",children:g.jsxs("div",{className:"flex items-center justify-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):H.length===0?g.jsxs("div",{className:"text-center text-muted-foreground py-8",children:[g.jsx(IM,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No saved chats yet"})]}):g.jsx("div",{className:"space-y-2",children:H.map(F=>g.jsx("div",{className:"border rounded-lg p-3 hover:bg-muted/50 cursor-pointer group",onClick:()=>Nt(F.id),children:g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h4",{className:"text-sm font-medium truncate",children:F.title}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:[new Date(F.updatedAt).toLocaleDateString()," • ",F.messages.length," messages"]}),g.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:F.model.split("/")[1]||F.model})]}),g.jsx(vt,{onClick:fe=>{fe.stopPropagation(),dn(F.id)},size:"icon",variant:"ghost",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity",children:g.jsx(hj,{className:"h-3 w-3"})})]})},F.id))})]}),!L&&g.jsxs("div",{ref:ea,className:ue("flex-1 w-full overflow-y-auto space-y-4 min-h-0",Ke?"p-6 max-w-4xl mx-auto":"p-4"),children:[b.length===0&&g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center text-muted-foreground py-12",children:[g.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/5 flex items-center justify-center mb-4",children:g.jsx(dp,{className:"h-5 w-5 text-primary/40"})}),g.jsx("p",{className:"text-sm font-medium text-foreground/70 mb-1",children:"Plan, explore, and create tasks"}),g.jsx("p",{className:"text-xs text-muted-foreground/70 mb-4 max-w-[220px]",children:"Plan projects, structure work for coding agents, or explore your knowledge base"}),g.jsxs("button",{onClick:()=>J(!0),className:"text-xs text-primary/70 hover:text-primary transition-colors flex items-center gap-1.5",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),ce()]})]}),b.map((F,fe)=>{const ye=F.role==="assistant",ge=ye?A8(F.content):{cleanedContent:F.content,actions:[]},Se=ye?ge.cleanedContent.length>0?ge.cleanedContent:ge.actions.length>0?"Proposed knowledge update available below.":F.content:F.content;return g.jsx("div",{className:ue("rounded-2xl",F.role==="user"?ue("bg-primary text-primary-foreground p-3 min-w-[80px] max-w-[85%] ml-auto",Ke&&"max-w-[70%]"):F.role==="system"?ue("bg-muted/50 text-muted-foreground text-center text-xs py-2 px-3 mx-auto max-w-[90%] rounded-lg"):ue("bg-muted p-3 min-w-[80px] max-w-[85%] mr-auto",Ke&&"max-w-[70%]")),children:ye?g.jsxs("div",{className:"space-y-2",children:[F.toolCalls&&F.toolCalls.length>0&&g.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950/20 p-2 rounded text-xs",children:[g.jsx("div",{className:"font-medium text-blue-700 dark:text-blue-300 mb-1",children:"Tool Calls:"}),F.toolCalls.map((Ue,It)=>g.jsxs("div",{className:"text-blue-600 dark:text-blue-400",children:["• ",Ue.function.name,"(",JSON.parse(Ue.function.arguments).operation,")"]},It))]}),g.jsx(bs,{className:"text-sm [&_.prose]:text-sm [&_.prose-p]:text-sm [&_.prose-li]:text-sm [&_.prose-code]:text-xs",children:Se}),ge.actions.map((Ue,It)=>g.jsx(_8,{action:Ue,onApply:La,fetchDocumentContent:jo},`${fe}-knowledge-${It}`)),F.toolResults&&F.toolResults.length>0&&g.jsxs("div",{className:"bg-green-50 dark:bg-green-950/20 p-2 rounded text-xs",children:[g.jsx("div",{className:"font-medium text-green-700 dark:text-green-300 mb-1",children:"Tool Results:"}),F.toolResults.map((Ue,It)=>{const pt=JSON.parse(Ue.content);let Xe=null;return pt.success&&pt.data&&(pt.data.filename&&pt.message?.includes("knowledge document")?Xe=`/context/knowledge/${pt.data.filename.replace(/\.md$/,"")}`:pt.data.id&&(pt.message?.includes("proposal")||pt.data.intent)&&(Xe=`/proposals/${pt.data.id}`)),g.jsxs("div",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[g.jsxs("span",{children:["• ",pt.success?"✓":"✗"]}),Xe?g.jsxs(Sr,{to:Xe,className:"hover:underline inline-flex items-center gap-1",onClick:Gt=>Gt.stopPropagation(),children:[pt.message||pt.error,g.jsx(pM,{className:"h-3 w-3 opacity-70"})]}):g.jsx("span",{children:pt.message||pt.error})]},It)})]}),!E&&F.content.length>0&&g.jsxs("div",{className:"flex justify-end gap-1",children:[g.jsx(vt,{onClick:()=>{const Ue=F.content.match(/(?:^|\n)#{1,2}\s+(.+?)(?:\n|$)/),It=Ue?Ue[1].trim():void 0,pt={description:F.content,title:It};if(Ke){tr(pt),xt(!1);return}O("/proposals/new",{state:pt})},size:"icon",variant:"ghost",className:"h-5 w-5 opacity-60 hover:opacity-100",title:"Create task from message",children:g.jsx(Kw,{className:"h-3 w-3"})}),g.jsx(vt,{onClick:()=>Cs(F.content,fe),size:"icon",variant:"ghost",className:"h-5 w-5 opacity-60 hover:opacity-100",title:Rt===fe?"Copied!":"Copy message",children:Rt===fe?g.jsx(Oc,{className:"h-3 w-3"}):g.jsx(cM,{className:"h-3 w-3"})})]})]}):g.jsx("div",{className:"text-sm",children:F.content})},fe)}),(E||bn)&&g.jsx("div",{className:ue("p-3 rounded-2xl text-sm min-w-[80px] max-w-[85%] mr-auto",bn?"bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800":"bg-muted",Ke&&"max-w-[70%]"),children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:ue("w-2 h-2 rounded-full animate-bounce",bn?"bg-blue-500":"bg-current")}),g.jsx("div",{className:ue("w-2 h-2 rounded-full animate-bounce [animation-delay:0.1s]",bn?"bg-blue-500":"bg-current")}),g.jsx("div",{className:ue("w-2 h-2 rounded-full animate-bounce [animation-delay:0.2s]",bn?"bg-blue-500":"bg-current")}),bn&&g.jsx("span",{className:"text-xs text-blue-700 dark:text-blue-300 ml-1 font-medium",children:bn})]})}),g.jsx("div",{ref:hr})]}),!L&&g.jsx("div",{className:"border-t flex-shrink-0 w-full",children:g.jsxs("div",{className:ue(Ke?"p-6 max-w-4xl mx-auto":"p-4"),children:[g.jsx("div",{className:"mb-4 flex gap-2 items-center",children:g.jsxs(Gb,{onValueChange:ks,children:[g.jsx(Np,{className:"flex-1",children:g.jsx(Yb,{placeholder:"Actions..."})}),g.jsxs(_p,{children:[g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider",children:"Understand"}),pr().understand.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Define"}),pr().define.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Explore"}),pr().explore.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Synthesize"}),pr().synthesize.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Capture"}),pr().capture.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label))]})]})}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(wk,{ref:ta,value:y,onChange:F=>w(F.target.value),onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),As())},placeholder:"Ask AI for help...",className:ue("flex-1 resize-none",Ke?"min-h-[3rem] max-h-40 text-base":"min-h-[2.5rem] max-h-32"),"aria-label":"Assistant message input"}),A?g.jsx(vt,{onClick:xi,size:"icon",variant:"outline",className:"shrink-0",title:"Stop response (Esc)","aria-label":"Stop response",children:g.jsx(uj,{className:"h-4 w-4"})}):g.jsx(vt,{onClick:As,disabled:!y.trim(),size:"icon",className:"shrink-0",children:g.jsx(QM,{className:"h-4 w-4"})})]})]})})]})});return N?g.jsxs(g.Fragment,{children:[g.jsx(V1,{open:e,onOpenChange:n,children:g.jsxs(gm,{side:"right",className:"w-96 h-full p-0 bg-sidebar border-l border-sidebar-border",children:[g.jsx(ym,{className:"sr-only",children:g.jsx(vm,{children:"Assistant"})}),za]})}),g.jsx(H0,{open:Z,onOpenChange:J,onSelectionConfirm:Do,initialSelection:ae}),g.jsx(F0,{open:Ee,onOpenChange:pe,initialSelectedId:le?.filename?.replace(".md","")||null,onSelect:F=>{const fe={id:F.filename.replace(".md",""),name:F.metadata?.name||F.title,filename:F.filename,content:F.content};ve(fe),S(ye=>[...ye,{role:"system",content:`${fe.name} selected.`}])}})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:ue("fixed inset-y-0 right-0 z-10 h-dvh bg-sidebar border-l border-sidebar-border transition-all duration-300 ease-in-out",e?"w-96":"w-0 overflow-hidden"),children:g.jsx("div",{className:"w-96 h-full",children:za})}),g.jsx(Zc,{open:Ke,onOpenChange:xt,children:g.jsxs(hs,{className:"max-w-[90vw] w-[90vw] max-h-[90vh] h-[90vh] p-0 gap-0 [&>button]:hidden",children:[g.jsx(ps,{className:"sr-only",children:g.jsx(ms,{children:"Assistant"})}),g.jsx("div",{className:"h-full w-full flex flex-col bg-background rounded-lg overflow-hidden",children:za})]})}),g.jsx(H0,{open:Z,onOpenChange:J,onSelectionConfirm:Do,initialSelection:ae}),g.jsx(F0,{open:Ee,onOpenChange:pe,initialSelectedId:le?.filename?.replace(".md","")||null,onSelect:F=>{const fe={id:F.filename.replace(".md",""),name:F.metadata?.name||F.title,filename:F.filename,content:F.content};ve(fe),S(ye=>[...ye,{role:"system",content:`${fe.name} selected.`}])}})]})}var tp="rovingFocusGroup.onEntryFocus",j8={bubbles:!1,cancelable:!0},ws="RovingFocusGroup",[$p,Sk,D8]=_c(ws),[O8,Ek]=Jn(ws,[D8]),[P8,L8]=O8(ws),Ck=v.forwardRef((e,n)=>g.jsx($p.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx($p.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(z8,{...e,ref:n})})}));Ck.displayName=ws;var z8=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:l=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...y}=e,w=v.useRef(null),b=ze(n,w),S=Yc(s),[E,T]=_a({prop:c,defaultProp:f??null,onChange:d,caller:ws}),[A,R]=v.useState(!1),N=Tt(h),O=Sk(r),L=v.useRef(!1),[j,H]=v.useState(0);return v.useEffect(()=>{const $=w.current;if($)return $.addEventListener(tp,N),()=>$.removeEventListener(tp,N)},[N]),g.jsx(P8,{scope:r,orientation:i,dir:S,loop:l,currentTabStopId:E,onItemFocus:v.useCallback($=>T($),[T]),onItemShiftTab:v.useCallback(()=>R(!0),[]),onFocusableItemAdd:v.useCallback(()=>H($=>$+1),[]),onFocusableItemRemove:v.useCallback(()=>H($=>$-1),[]),children:g.jsx(_e.div,{tabIndex:A||j===0?-1:0,"data-orientation":i,...y,ref:b,style:{outline:"none",...e.style},onMouseDown:me(e.onMouseDown,()=>{L.current=!0}),onFocus:me(e.onFocus,$=>{const Y=!L.current;if($.target===$.currentTarget&&Y&&!A){const D=new CustomEvent(tp,j8);if($.currentTarget.dispatchEvent(D),!D.defaultPrevented){const Z=O().filter(z=>z.focusable),J=Z.find(z=>z.active),ne=Z.find(z=>z.id===E),ae=[J,ne,...Z].filter(Boolean).map(z=>z.ref.current);Tk(ae,m)}}L.current=!1}),onBlur:me(e.onBlur,()=>R(!1))})})}),kk="RovingFocusGroupItem",Ak=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:l=!1,tabStopId:s,children:c,...f}=e,d=kr(),h=s||d,m=L8(kk,r),y=m.currentTabStopId===h,w=Sk(r),{onFocusableItemAdd:b,onFocusableItemRemove:S,currentTabStopId:E}=m;return v.useEffect(()=>{if(i)return b(),()=>S()},[i,b,S]),g.jsx($p.ItemSlot,{scope:r,id:h,focusable:i,active:l,children:g.jsx(_e.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...f,ref:n,onMouseDown:me(e.onMouseDown,T=>{i?m.onItemFocus(h):T.preventDefault()}),onFocus:me(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:me(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){m.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const A=U8(T,m.orientation,m.dir);if(A!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let N=w().filter(O=>O.focusable).map(O=>O.ref.current);if(A==="last")N.reverse();else if(A==="prev"||A==="next"){A==="prev"&&N.reverse();const O=N.indexOf(T.currentTarget);N=m.loop?H8(N,O+1):N.slice(O+1)}setTimeout(()=>Tk(N))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:E!=null}):c})})});Ak.displayName=kk;var I8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function B8(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function U8(e,n,r){const i=B8(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return I8[i]}function Tk(e,n=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:n}),document.activeElement!==r))return}function H8(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var F8=Ck,V8=Ak,Gp=["Enter"," "],q8=["ArrowDown","PageUp","Home"],Rk=["ArrowUp","PageDown","End"],$8=[...q8,...Rk],G8={ltr:[...Gp,"ArrowRight"],rtl:[...Gp,"ArrowLeft"]},Y8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ss="Menu",[ts,K8,X8]=_c(Ss),[mi,Nk]=Jn(Ss,[X8,Ro,Ek]),lf=Ro(),_k=Ek(),[Q8,gi]=mi(Ss),[Z8,Es]=mi(Ss),Mk=e=>{const{__scopeMenu:n,open:r=!1,children:i,dir:l,onOpenChange:s,modal:c=!0}=e,f=lf(n),[d,h]=v.useState(null),m=v.useRef(!1),y=Tt(s),w=Yc(l);return v.useEffect(()=>{const b=()=>{m.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>m.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),g.jsx(Rm,{...f,children:g.jsx(Q8,{scope:n,open:r,onOpenChange:y,content:d,onContentChange:h,children:g.jsx(Z8,{scope:n,onClose:v.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:m,dir:w,modal:c,children:i})})})};Mk.displayName=Ss;var W8="MenuAnchor",ag=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,l=lf(r);return g.jsx(Nm,{...l,...i,ref:n})});ag.displayName=W8;var ig="MenuPortal",[J8,jk]=mi(ig,{forceMount:void 0}),Dk=e=>{const{__scopeMenu:n,forceMount:r,children:i,container:l}=e,s=gi(ig,n);return g.jsx(J8,{scope:n,forceMount:r,children:g.jsx(un,{present:r||s.open,children:g.jsx(os,{asChild:!0,container:l,children:i})})})};Dk.displayName=ig;var Xn="MenuContent",[eB,og]=mi(Xn),Ok=v.forwardRef((e,n)=>{const r=jk(Xn,e.__scopeMenu),{forceMount:i=r.forceMount,...l}=e,s=gi(Xn,e.__scopeMenu),c=Es(Xn,e.__scopeMenu);return g.jsx(ts.Provider,{scope:e.__scopeMenu,children:g.jsx(un,{present:i||s.open,children:g.jsx(ts.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(tB,{...l,ref:n}):g.jsx(nB,{...l,ref:n})})})})}),tB=v.forwardRef((e,n)=>{const r=gi(Xn,e.__scopeMenu),i=v.useRef(null),l=ze(n,i);return v.useEffect(()=>{const s=i.current;if(s)return cm(s)},[]),g.jsx(lg,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),nB=v.forwardRef((e,n)=>{const r=gi(Xn,e.__scopeMenu);return g.jsx(lg,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),rB=si("MenuContent.ScrollLock"),lg=v.forwardRef((e,n)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:l,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:w,onDismiss:b,disableOutsideScroll:S,...E}=e,T=gi(Xn,r),A=Es(Xn,r),R=lf(r),N=_k(r),O=K8(r),[L,j]=v.useState(null),H=v.useRef(null),$=ze(n,H,T.onContentChange),Y=v.useRef(0),D=v.useRef(""),Z=v.useRef(0),J=v.useRef(null),ne=v.useRef("right"),G=v.useRef(0),ae=S?zc:v.Fragment,z=S?{as:rB,allowPinchZoom:!0}:void 0,Q=ie=>{const k=D.current+ie,W=O().filter(le=>!le.disabled),se=document.activeElement,M=W.find(le=>le.ref.current===se)?.textValue,ce=W.map(le=>le.textValue),Ee=mB(ce,k,M),pe=W.find(le=>le.textValue===Ee)?.ref.current;(function le(ve){D.current=ve,window.clearTimeout(Y.current),ve!==""&&(Y.current=window.setTimeout(()=>le(""),1e3))})(k),pe&&setTimeout(()=>pe.focus())};v.useEffect(()=>()=>window.clearTimeout(Y.current),[]),um();const B=v.useCallback(ie=>ne.current===J.current?.side&&yB(ie,J.current?.area),[]);return g.jsx(eB,{scope:r,searchRef:D,onItemEnter:v.useCallback(ie=>{B(ie)&&ie.preventDefault()},[B]),onItemLeave:v.useCallback(ie=>{B(ie)||(H.current?.focus(),j(null))},[B]),onTriggerLeave:v.useCallback(ie=>{B(ie)&&ie.preventDefault()},[B]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:v.useCallback(ie=>{J.current=ie},[]),children:g.jsx(ae,{...z,children:g.jsx(Pc,{asChild:!0,trapped:l,onMountAutoFocus:me(s,ie=>{ie.preventDefault(),H.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:w,onDismiss:b,children:g.jsx(F8,{asChild:!0,...N,dir:A.dir,orientation:"vertical",loop:i,currentTabStopId:L,onCurrentTabStopIdChange:j,onEntryFocus:me(d,ie=>{A.isUsingKeyboardRef.current||ie.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(_m,{role:"menu","aria-orientation":"vertical","data-state":Qk(T.open),"data-radix-menu-content":"",dir:A.dir,...R,...E,ref:$,style:{outline:"none",...E.style},onKeyDown:me(E.onKeyDown,ie=>{const W=ie.target.closest("[data-radix-menu-content]")===ie.currentTarget,se=ie.ctrlKey||ie.altKey||ie.metaKey,M=ie.key.length===1;W&&(ie.key==="Tab"&&ie.preventDefault(),!se&&M&&Q(ie.key));const ce=H.current;if(ie.target!==ce||!$8.includes(ie.key))return;ie.preventDefault();const pe=O().filter(le=>!le.disabled).map(le=>le.ref.current);Rk.includes(ie.key)&&pe.reverse(),hB(pe)}),onBlur:me(e.onBlur,ie=>{ie.currentTarget.contains(ie.target)||(window.clearTimeout(Y.current),D.current="")}),onPointerMove:me(e.onPointerMove,ns(ie=>{const k=ie.target,W=G.current!==ie.clientX;if(ie.currentTarget.contains(k)&&W){const se=ie.clientX>G.current?"right":"left";ne.current=se,G.current=ie.clientX}}))})})})})})})});Ok.displayName=Xn;var aB="MenuGroup",sg=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(_e.div,{role:"group",...i,ref:n})});sg.displayName=aB;var iB="MenuLabel",Pk=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(_e.div,{...i,ref:n})});Pk.displayName=iB;var Sc="MenuItem",V0="menu.itemSelect",sf=v.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:i,...l}=e,s=v.useRef(null),c=Es(Sc,e.__scopeMenu),f=og(Sc,e.__scopeMenu),d=ze(n,s),h=v.useRef(!1),m=()=>{const y=s.current;if(!r&&y){const w=new CustomEvent(V0,{bubbles:!0,cancelable:!0});y.addEventListener(V0,b=>i?.(b),{once:!0}),rm(y,w),w.defaultPrevented?h.current=!1:c.onClose()}};return g.jsx(Lk,{...l,ref:d,disabled:r,onClick:me(e.onClick,m),onPointerDown:y=>{e.onPointerDown?.(y),h.current=!0},onPointerUp:me(e.onPointerUp,y=>{h.current||y.currentTarget?.click()}),onKeyDown:me(e.onKeyDown,y=>{const w=f.searchRef.current!=="";r||w&&y.key===" "||Gp.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});sf.displayName=Sc;var Lk=v.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:i=!1,textValue:l,...s}=e,c=og(Sc,r),f=_k(r),d=v.useRef(null),h=ze(n,d),[m,y]=v.useState(!1),[w,b]=v.useState("");return v.useEffect(()=>{const S=d.current;S&&b((S.textContent??"").trim())},[s.children]),g.jsx(ts.ItemSlot,{scope:r,disabled:i,textValue:l??w,children:g.jsx(V8,{asChild:!0,...f,focusable:!i,children:g.jsx(_e.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:h,onPointerMove:me(e.onPointerMove,ns(S=>{i?c.onItemLeave(S):(c.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:me(e.onPointerLeave,ns(S=>c.onItemLeave(S))),onFocus:me(e.onFocus,()=>y(!0)),onBlur:me(e.onBlur,()=>y(!1))})})})}),oB="MenuCheckboxItem",zk=v.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:i,...l}=e;return g.jsx(Fk,{scope:e.__scopeMenu,checked:r,children:g.jsx(sf,{role:"menuitemcheckbox","aria-checked":Ec(r)?"mixed":r,...l,ref:n,"data-state":cg(r),onSelect:me(l.onSelect,()=>i?.(Ec(r)?!0:!r),{checkForDefaultPrevented:!1})})})});zk.displayName=oB;var Ik="MenuRadioGroup",[lB,sB]=mi(Ik,{value:void 0,onValueChange:()=>{}}),Bk=v.forwardRef((e,n)=>{const{value:r,onValueChange:i,...l}=e,s=Tt(i);return g.jsx(lB,{scope:e.__scopeMenu,value:r,onValueChange:s,children:g.jsx(sg,{...l,ref:n})})});Bk.displayName=Ik;var Uk="MenuRadioItem",Hk=v.forwardRef((e,n)=>{const{value:r,...i}=e,l=sB(Uk,e.__scopeMenu),s=r===l.value;return g.jsx(Fk,{scope:e.__scopeMenu,checked:s,children:g.jsx(sf,{role:"menuitemradio","aria-checked":s,...i,ref:n,"data-state":cg(s),onSelect:me(i.onSelect,()=>l.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Hk.displayName=Uk;var ug="MenuItemIndicator",[Fk,uB]=mi(ug,{checked:!1}),Vk=v.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:i,...l}=e,s=uB(ug,r);return g.jsx(un,{present:i||Ec(s.checked)||s.checked===!0,children:g.jsx(_e.span,{...l,ref:n,"data-state":cg(s.checked)})})});Vk.displayName=ug;var cB="MenuSeparator",qk=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(_e.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})});qk.displayName=cB;var fB="MenuArrow",$k=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,l=lf(r);return g.jsx(Mm,{...l,...i,ref:n})});$k.displayName=fB;var dB="MenuSub",[hH,Gk]=mi(dB),Bl="MenuSubTrigger",Yk=v.forwardRef((e,n)=>{const r=gi(Bl,e.__scopeMenu),i=Es(Bl,e.__scopeMenu),l=Gk(Bl,e.__scopeMenu),s=og(Bl,e.__scopeMenu),c=v.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:d}=s,h={__scopeMenu:e.__scopeMenu},m=v.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return v.useEffect(()=>m,[m]),v.useEffect(()=>{const y=f.current;return()=>{window.clearTimeout(y),d(null)}},[f,d]),g.jsx(ag,{asChild:!0,...h,children:g.jsx(Lk,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":l.contentId,"data-state":Qk(r.open),...e,ref:Nc(n,l.onTriggerChange),onClick:y=>{e.onClick?.(y),!(e.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:me(e.onPointerMove,ns(y=>{s.onItemEnter(y),!y.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:me(e.onPointerLeave,ns(y=>{m();const w=r.content?.getBoundingClientRect();if(w){const b=r.content?.dataset.side,S=b==="right",E=S?-5:5,T=w[S?"left":"right"],A=w[S?"right":"left"];s.onPointerGraceIntentChange({area:[{x:y.clientX+E,y:y.clientY},{x:T,y:w.top},{x:A,y:w.top},{x:A,y:w.bottom},{x:T,y:w.bottom}],side:b}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(y),y.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:me(e.onKeyDown,y=>{const w=s.searchRef.current!=="";e.disabled||w&&y.key===" "||G8[i.dir].includes(y.key)&&(r.onOpenChange(!0),r.content?.focus(),y.preventDefault())})})})});Yk.displayName=Bl;var Kk="MenuSubContent",Xk=v.forwardRef((e,n)=>{const r=jk(Xn,e.__scopeMenu),{forceMount:i=r.forceMount,...l}=e,s=gi(Xn,e.__scopeMenu),c=Es(Xn,e.__scopeMenu),f=Gk(Kk,e.__scopeMenu),d=v.useRef(null),h=ze(n,d);return g.jsx(ts.Provider,{scope:e.__scopeMenu,children:g.jsx(un,{present:i||s.open,children:g.jsx(ts.Slot,{scope:e.__scopeMenu,children:g.jsx(lg,{id:f.contentId,"aria-labelledby":f.triggerId,...l,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:me(e.onFocusOutside,m=>{m.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:me(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:me(e.onKeyDown,m=>{const y=m.currentTarget.contains(m.target),w=Y8[c.dir].includes(m.key);y&&w&&(s.onOpenChange(!1),f.trigger?.focus(),m.preventDefault())})})})})})});Xk.displayName=Kk;function Qk(e){return e?"open":"closed"}function Ec(e){return e==="indeterminate"}function cg(e){return Ec(e)?"indeterminate":e?"checked":"unchecked"}function hB(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function pB(e,n){return e.map((r,i)=>e[(n+i)%e.length])}function mB(e,n,r){const l=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=pB(e,Math.max(s,0));l.length===1&&(c=c.filter(h=>h!==r));const d=c.find(h=>h.toLowerCase().startsWith(l.toLowerCase()));return d!==r?d:void 0}function gB(e,n){const{x:r,y:i}=e;let l=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,m=f.y,y=d.x,w=d.y;m>i!=w>i&&r<(y-h)*(i-m)/(w-m)+h&&(l=!l)}return l}function yB(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return gB(r,n)}function ns(e){return n=>n.pointerType==="mouse"?e(n):void 0}var vB=Mk,xB=ag,bB=Dk,wB=Ok,SB=sg,EB=Pk,CB=sf,kB=zk,AB=Bk,TB=Hk,RB=Vk,NB=qk,_B=$k,MB=Yk,jB=Xk,uf="DropdownMenu",[DB,pH]=Jn(uf,[Nk]),cn=Nk(),[OB,Zk]=DB(uf),Wk=e=>{const{__scopeDropdownMenu:n,children:r,dir:i,open:l,defaultOpen:s,onOpenChange:c,modal:f=!0}=e,d=cn(n),h=v.useRef(null),[m,y]=_a({prop:l,defaultProp:s??!1,onChange:c,caller:uf});return g.jsx(OB,{scope:n,triggerId:kr(),triggerRef:h,contentId:kr(),open:m,onOpenChange:y,onOpenToggle:v.useCallback(()=>y(w=>!w),[y]),modal:f,children:g.jsx(vB,{...d,open:m,onOpenChange:y,dir:i,modal:f,children:r})})};Wk.displayName=uf;var Jk="DropdownMenuTrigger",e2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...l}=e,s=Zk(Jk,r),c=cn(r);return g.jsx(xB,{asChild:!0,...c,children:g.jsx(_e.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...l,ref:Nc(n,s.triggerRef),onPointerDown:me(e.onPointerDown,f=>{!i&&f.button===0&&f.ctrlKey===!1&&(s.onOpenToggle(),s.open||f.preventDefault())}),onKeyDown:me(e.onKeyDown,f=>{i||(["Enter"," "].includes(f.key)&&s.onOpenToggle(),f.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});e2.displayName=Jk;var PB="DropdownMenuPortal",t2=e=>{const{__scopeDropdownMenu:n,...r}=e,i=cn(n);return g.jsx(bB,{...i,...r})};t2.displayName=PB;var n2="DropdownMenuContent",r2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=Zk(n2,r),s=cn(r),c=v.useRef(!1);return g.jsx(wB,{id:l.contentId,"aria-labelledby":l.triggerId,...s,...i,ref:n,onCloseAutoFocus:me(e.onCloseAutoFocus,f=>{c.current||l.triggerRef.current?.focus(),c.current=!1,f.preventDefault()}),onInteractOutside:me(e.onInteractOutside,f=>{const d=f.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,m=d.button===2||h;(!l.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});r2.displayName=n2;var LB="DropdownMenuGroup",zB=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(SB,{...l,...i,ref:n})});zB.displayName=LB;var IB="DropdownMenuLabel",a2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(EB,{...l,...i,ref:n})});a2.displayName=IB;var BB="DropdownMenuItem",i2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(CB,{...l,...i,ref:n})});i2.displayName=BB;var UB="DropdownMenuCheckboxItem",o2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(kB,{...l,...i,ref:n})});o2.displayName=UB;var HB="DropdownMenuRadioGroup",FB=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(AB,{...l,...i,ref:n})});FB.displayName=HB;var VB="DropdownMenuRadioItem",l2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(TB,{...l,...i,ref:n})});l2.displayName=VB;var qB="DropdownMenuItemIndicator",s2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(RB,{...l,...i,ref:n})});s2.displayName=qB;var $B="DropdownMenuSeparator",u2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(NB,{...l,...i,ref:n})});u2.displayName=$B;var GB="DropdownMenuArrow",YB=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(_B,{...l,...i,ref:n})});YB.displayName=GB;var KB="DropdownMenuSubTrigger",c2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(MB,{...l,...i,ref:n})});c2.displayName=KB;var XB="DropdownMenuSubContent",f2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(jB,{...l,...i,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});f2.displayName=XB;var QB=Wk,ZB=e2,WB=t2,d2=r2,h2=a2,p2=i2,m2=o2,g2=l2,y2=s2,v2=u2,x2=c2,b2=f2;const JB=QB,eU=ZB,tU=v.forwardRef(({className:e,inset:n,children:r,...i},l)=>g.jsxs(x2,{ref:l,className:ue("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...i,children:[r,g.jsx(nM,{className:"ml-auto h-4 w-4"})]}));tU.displayName=x2.displayName;const nU=v.forwardRef(({className:e,...n},r)=>g.jsx(b2,{ref:r,className:ue("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));nU.displayName=b2.displayName;const w2=v.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(WB,{children:g.jsx(d2,{ref:i,sideOffset:n,className:ue("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));w2.displayName=d2.displayName;const S2=v.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(p2,{ref:i,className:ue("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...r}));S2.displayName=p2.displayName;const rU=v.forwardRef(({className:e,children:n,checked:r,...i},l)=>g.jsxs(m2,{ref:l,className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...i,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(y2,{children:g.jsx(Oc,{className:"h-4 w-4"})})}),n]}));rU.displayName=m2.displayName;const aU=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(g2,{ref:i,className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(y2,{children:g.jsx(oM,{className:"h-2 w-2 fill-current"})})}),n]}));aU.displayName=g2.displayName;const E2=v.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(h2,{ref:i,className:ue("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));E2.displayName=h2.displayName;const C2=v.forwardRef(({className:e,...n},r)=>g.jsx(v2,{ref:r,className:ue("-mx-1 my-1 h-px bg-muted",e),...n}));C2.displayName=v2.displayName;function iU(){const[e,n]=v.useState(!1),[r,i]=v.useState(null),[l,s]=v.useState(null),[c,f]=v.useState(null),[d,h]=v.useState("Coconut"),[m,y]=v.useState(null),[w,b]=v.useState(null),[S,E]=v.useState(!1),T=Wn(),A=as(),R=T.pathname,{user:N,logout:O,authEnabled:L}=yw();v.useEffect(()=>{const Y=localStorage.getItem("ai-sidebar-open");Y!==null&&n(JSON.parse(Y))},[]),v.useEffect(()=>{const Y=D=>{const Z=D.detail;Z&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),y(Z))};return window.addEventListener("discuss-in-chat",Y),()=>{window.removeEventListener("discuss-in-chat",Y)}},[]),v.useEffect(()=>{const Y=D=>{const Z=D.detail;Z?.prompt&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),b(Z.prompt))};return window.addEventListener("customize-prompt-in-assistant",Y),()=>{window.removeEventListener("customize-prompt-in-assistant",Y)}},[]),v.useEffect(()=>{const Y=()=>{n(!0),localStorage.setItem("ai-sidebar-open","true"),E(!0)};return window.addEventListener("open-assistant-expanded",Y),()=>{window.removeEventListener("open-assistant-expanded",Y)}},[]),v.useEffect(()=>{const Y=D=>{if((D.metaKey||D.ctrlKey)&&D.shiftKey&&D.key==="l"){D.preventDefault(),e||(n(!0),localStorage.setItem("ai-sidebar-open","true")),window.dispatchEvent(new CustomEvent("toggle-assistant-fullscreen"));return}(D.metaKey||D.ctrlKey)&&D.key==="l"&&(D.preventDefault(),j())};return window.addEventListener("keydown",Y),()=>{window.removeEventListener("keydown",Y)}},[e]),v.useEffect(()=>{const Y=async()=>{try{const Z=await fetch(`${Et}/api/v1/config`);if(Z.ok){const J=await Z.json();if(J.success&&J.data?.coconut){const{firstName:ne,lastName:G}=J.data.coconut;ne&&G?h(`${ne} ${G}`):(ne||G)&&h(ne||G)}}}catch(Z){console.error("Error fetching config:",Z)}};Y();const D=()=>{Y()};return window.addEventListener("config-updated",D),()=>{window.removeEventListener("config-updated",D)}},[]);const j=()=>{const Y=!e;n(Y),localStorage.setItem("ai-sidebar-open",JSON.stringify(Y))},H=async()=>{try{await O(),lp({title:"Logged out",description:"You have been logged out successfully"}),A("/login")}catch(Y){console.error("Logout error:",Y),lp({title:"Error",description:"Failed to logout",variant:"destructive"})}};v.useEffect(()=>{(async()=>{try{const D=await fetch(`${Et}/api/v1/context/project`);if(D.ok){const Z=await D.text();s(Z)}else s(null)}catch(D){console.error("Error fetching project context:",D),s(null)}if(R.includes("/context/architecture")||R.includes("/proposals"))try{const D=await fetch(`${Et}/api/v1/context/architecture`);if(D.ok){const Z=await D.text();f(Z)}else f(null)}catch(D){console.error("Error fetching architecture context:",D),f(null)}else f(null);if(R.includes("/proposals")&&(R.includes("/edit")||R.match(/\/proposals\/[^/]+$/))){const Z=R.match(/\/proposals\/([^/]+)(?:\/edit)?/)?.[1];if(Z)try{const ne=await(await fetch(`${Et}/api/v1/proposals/${Z}`)).json();if(ne.success){const G=ne.data,ae=`Proposal ID: ${Z}
457
+ --- End System Persona ---`,De(!0));const Ue=(await Promise.all(k.map(async Xe=>{if(Xe.content&&Xe.content!=="Loading..."&&Xe.content!=="Content not available")return Xe;try{const Gt=await Fp(Xe);return B.current.set(Xe.id,Gt),Gt}catch(Gt){return console.error(`Failed to load content for ${Xe.name}:`,Gt),Xe}}))).filter(Xe=>Xe.content&&Xe.content!=="Loading..."&&Xe.content!=="Content not available").map(Xe=>({name:Xe.name,path:Xe.path,type:Xe.type,content:Xe.content})),It={role:"user",content:y};S(Xe=>[...Xe,It]),w(""),T(!0),R(!0);const pt=new AbortController;Sn.current=pt;try{const Gt=[...b,It].filter(lt=>lt.role==="user"||lt.role==="assistant").map((lt,Yt,Bt)=>Yt===Bt.length-1&&lt.role==="user"?{role:lt.role,content:F}:lt),an={message:F,history:Gt,model:h,context:r?.type,contextContent:r?.content,agentPersona:ge,maxTokens:8e3,enableTools:Wt,attachedContextFiles:Ue.length>0?Ue:void 0,stream:!0},hn=await fetch(`${Et}/api/v1/ai`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(an),signal:pt.signal});if(!hn.ok){let lt="Failed to get AI response";try{const Yt=await hn.json();lt=Yt.error||Yt.message||lt,Yt.status&&(lt=`${lt} (${Yt.status})`)}catch{lt=`${hn.statusText||lt} (${hn.status})`}throw new Error(lt)}if(an.stream&&hn.body){const lt=hn.body.getReader(),Yt=new TextDecoder;let Bt="",mr=null;const mt=new Map;let bi=!1;const As={role:"assistant",content:""};S(Ot=>[...Ot,As]),T(!1);try{let Ot="";for(;;){const{done:Ut,value:gt}=await lt.read();if(Ut)break;Ot+=Yt.decode(gt,{stream:!0});const Ia=Ot.split(`
458
+ `);Ot=Ia.pop()||"";for(const Ct of Ia)if(Ct.startsWith("data: ")){const _t=Ct.slice(6).trim();if(_t==="[DONE]")break;try{const bt=JSON.parse(_t);if(bt.error){mr=bt.error.message||bt.error||"Unknown streaming error",console.error("Stream error from API:",bt.error);break}const nr=bt.choices?.[0]?.delta?.content;nr&&(Bt+=nr,S(Ht=>{const kn=[...Ht];return kn[kn.length-1]={role:"assistant",content:Bt},kn}));const Cn=bt.choices?.[0]?.delta?.tool_calls;if(Cn&&Array.isArray(Cn)){bi=!0;for(const Ht of Cn){const kn=Ht.index??0,jr=mt.get(kn);jr?(Ht.id&&(jr.id=Ht.id),Ht.type&&(jr.type=Ht.type),Ht.function?.name&&(jr.function.name+=Ht.function.name),Ht.function?.arguments&&(jr.function.arguments+=Ht.function.arguments)):mt.set(kn,{id:Ht.id||"",type:Ht.type||"function",function:{name:Ht.function?.name||"",arguments:Ht.function?.arguments||""}})}}const Mr=bt.choices?.[0]?.finish_reason;Mr==="tool_calls"?bi=!0:Mr&&Mr!=="stop"&&Mr!=="length"&&console.warn("Unusual finish reason:",Mr)}catch{_t&&_t!=="[DONE]"&&console.warn("Failed to parse stream chunk:",_t.substring(0,100))}}}if(bi&&mt.size>0){const Ut=Array.from(mt.values()).map((Ct,_t)=>({id:Ct.id||`call_${_t}`,type:Ct.type,function:Ct.function})),gt=Ut.map(Ct=>Ct.function.name).filter(Boolean),Ia=gt.length>0?`Executing ${gt.join(", ")}...`:"Executing tools...";wn(Ia),T(!0),S(Ct=>{const _t=[...Ct];return _t[_t.length-1]={role:"assistant",content:Bt||""},_t});try{const Ct=await fetch(`${Et}/api/v1/ai/tools`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolCalls:Ut,model:h,history:Gt,context:r?.type,contextContent:r?.content,agentPersona:ge,attachedContextFiles:Ue.length>0?Ue:void 0,previousContent:Bt}),signal:pt.signal});if(Ct.ok){const _t=await Ct.json();wn(null),S(bt=>{const nr=[...bt];return nr[nr.length-1]={role:"assistant",content:_t.response||Bt,toolCalls:Ut,toolResults:_t.toolResults},nr})}else wn(null),console.error("Tool execution failed:",await Ct.text()),S(_t=>{const bt=[..._t];return bt[bt.length-1]={role:"assistant",content:Bt||"I tried to use tools but encountered an error executing them."},bt})}catch(Ct){wn(null),Ct instanceof DOMException&&Ct.name==="AbortError"||(console.error("Tool execution error:",Ct),S(_t=>{const bt=[..._t];return bt[bt.length-1]={role:"assistant",content:Bt||"I tried to use tools but encountered an error."},bt}))}}else mr?S(Ut=>{const gt=[...Ut];return gt[gt.length-1]={role:"assistant",content:`Sorry, I encountered an error: ${mr}`},gt}):Bt.trim()||(S(Ut=>{const gt=[...Ut];return gt[gt.length-1]?.role==="assistant"&&!gt[gt.length-1]?.content&&gt.pop(),gt}),console.warn("Stream completed with no content"))}catch(Ot){Ot instanceof DOMException&&Ot.name==="AbortError"||(console.error("Streaming error:",Ot),S(Ut=>{const gt=[...Ut];return gt[gt.length-1]?.role==="assistant"&&(gt[gt.length-1]={role:"assistant",content:`Sorry, I encountered a streaming error: ${Ot instanceof Error?Ot.message:"Unknown error"}`}),gt}))}}else{const lt=await hn.json(),Yt={role:"assistant",content:lt.response,toolCalls:lt.toolCalls,toolResults:lt.toolResults};S(Bt=>[...Bt,Yt])}}catch(Xe){if(Xe instanceof DOMException&&Xe.name==="AbortError")S(Gt=>{const an=[...Gt],hn=an[an.length-1];return hn?.role==="assistant"&&!hn.content&&an.pop(),an});else{console.error("Error calling AI:",Xe);const Gt={role:"assistant",content:`Sorry, I encountered an error: ${Xe instanceof Error?Xe.message:"Unknown error"}`};S(an=>[...an,Gt])}}finally{Sn.current=null,T(!1),R(!1),wn(null)}},xi=()=>{Sn.current&&(Sn.current.abort(),Sn.current=null),T(!1),R(!1),wn(null)},Do=F=>{F.files.forEach(ge=>{const Se=B.current.get(ge.id);(!Se||Se.content!==ge.content)&&B.current.set(ge.id,ge)}),z(F.selectedIds),Q.current=F.selectedIds;const fe=new Map(F.files.map(ge=>[ge.id,ge])),ye=F.selectedIds.map(ge=>{const Se=fe.get(ge);if(Se)return Se;const Ue=B.current.get(ge);return Ue||ne.find(It=>It.id===ge)||null}).filter(ge=>ge!==null);W(ye),fn(F.selectedIds).catch(ge=>{console.error("Error syncing context after manual selection:",ge)})},pr=()=>({understand:[{label:"Summarize this context",prompt:"Summarize the key points from the attached context. What are the main themes and takeaways?"},{label:"Explain relationships",prompt:"How do the attached documents relate to each other? What connections and dependencies exist?"},{label:"Identify gaps",prompt:"Based on the attached context, what important information seems to be missing or could be better documented?"}],define:[{label:"Define my project",prompt:"Help me define my project. I'd like to create or update the project.md document that captures what we're building, who it's for, and what success looks like. Please ask me questions to understand the project."},{label:"Define my architecture",prompt:"Help me define the technical architecture. I'd like to create or update the architecture.md document that captures our tech stack, conventions, and system design. Please ask me questions about our technical setup."},{label:"Refine project definition",prompt:"I'd like to refine or add to my project.md document. Please read the current version and suggest improvements or ask what I'd like to change."},{label:"Refine architecture",prompt:"I'd like to refine or add to my architecture.md document. Please read the current version and suggest improvements or ask what I'd like to change."}],explore:[{label:"What's been happening?",prompt:"Show me recent activity in this Coconut. What's been happening with proposals, knowledge updates, or agent sessions?"},{label:"Search knowledge base",prompt:"Search the knowledge base for information about: "},{label:"Find proposals about...",prompt:"Find and summarize proposals related to: "},{label:"Show recent events",prompt:"Show me the most recent events. I want to see what's been happening."}],synthesize:[{label:"Extract key insights",prompt:"Extract the most important insights from the attached context that should be preserved in the knowledge base."},{label:"Connect the dots",prompt:"Find patterns and connections across the attached documents. What story do they tell together?"},{label:"Draft proposal content",prompt:"Help me draft content for a change proposal about: (I'll create it via the Proposals UI or a coding agent)"},{label:"Compare approaches",prompt:"Help me understand the tradeoffs between: "}],capture:[{label:"Save to knowledge base",prompt:"Save the key insights from our conversation to the knowledge base as a new document."},{label:"Document a decision",prompt:"Create a knowledge document capturing this decision and its rationale: "},{label:"Update knowledge document",prompt:"Update the knowledge document about: "},{label:"Add to project.md",prompt:"I'd like to add the following to my project.md document: "},{label:"Add to architecture.md",prompt:"I'd like to add the following to my architecture.md document: "}]}),za=g.jsx(g.Fragment,{children:g.jsxs("div",{className:"flex h-full w-full flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between p-4 border-b flex-shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(dp,{className:ue(Ke?"h-6 w-6":"h-5 w-5")}),g.jsxs("div",{children:[g.jsx("h2",{className:ue("font-semibold leading-tight",Ke?"text-xl":"text-lg"),children:"Coconut Assistant"}),g.jsx("p",{className:"text-xs text-muted-foreground leading-tight",children:"Context Management"})]})]}),g.jsx("div",{className:ue("flex items-center gap-1",N&&"mr-8"),children:Ke?g.jsx(vt,{onClick:()=>xt(!1),size:"icon",variant:"ghost",className:"h-8 w-8",title:"Exit Expanded View (Esc)",children:g.jsx(so,{className:"h-4 w-4"})}):g.jsxs(g.Fragment,{children:[g.jsx(vt,{onClick:()=>{j(!L),L||Jt()},size:"icon",variant:"outline",className:"h-8 w-8",title:"Chat History",children:g.jsx(kM,{className:"h-4 w-4"})}),g.jsx(vt,{onClick:()=>xt(!0),size:"icon",variant:"outline",className:"h-8 w-8",title:"Expand View (⌘⇧L)",children:g.jsx(dM,{className:"h-4 w-4"})})]})})]}),g.jsx("div",{className:"p-4 border-b flex-shrink-0",children:g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsxs(Gb,{value:h,onValueChange:m,children:[g.jsx(Np,{className:"flex-1",children:g.jsx(Yb,{placeholder:"Select AI model"})}),g.jsx(_p,{children:ee.map(F=>g.jsx(li,{value:F.value,children:F.label},F.value))})]}),g.jsx(vt,{onClick:In,disabled:b.length===0,size:"icon",variant:"outline",className:"h-9 w-9 shrink-0",title:"Save Chat",children:g.jsx(KM,{className:"h-4 w-4"})}),g.jsxs(W9,{children:[g.jsx(J9,{asChild:!0,children:g.jsx(vt,{disabled:b.length===0&&k.length===0&&!le,size:"icon",variant:"outline",className:"h-9 w-9 shrink-0",title:"New Chat (⌘⇧N)",children:g.jsx(lj,{className:"h-4 w-4"})})}),g.jsxs($C,{children:[g.jsxs(GC,{children:[g.jsx(KC,{children:"Clear Chat"}),g.jsx(XC,{children:"This clears all messages, removes selected context files, and resets the selected agent. This action cannot be undone."})]}),g.jsxs(YC,{children:[g.jsx(ZC,{children:"Cancel"}),g.jsx(QC,{onClick:En,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Clear Chat"})]})]})]})]})}),g.jsx("div",{className:"p-4 border-b bg-muted/50 flex-shrink-0",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{className:"flex-1 min-w-0",children:se>0?g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:ce()}),g.jsx("div",{className:"flex flex-wrap gap-1",children:k.map(F=>g.jsxs("div",{className:ue("flex items-center gap-1 text-xs px-2 py-1 rounded-md","bg-primary/10 text-primary"),children:[g.jsx("span",{children:F.name}),g.jsx("button",{onClick:fe=>{fe.stopPropagation();const ye=Q.current.filter(ge=>ge!==F.id);z(ye),Q.current=ye,W(ge=>ge.filter(Se=>Se.id!==F.id)),fn(ye).catch(ge=>{console.error("Error syncing context after removal:",ge)})},className:ue("ml-1 rounded-full p-0.5 transition-colors","hover:bg-primary/20"),disabled:!1,title:"Remove from context",children:g.jsx(so,{className:"h-3 w-3"})})]},F.id))})]}):g.jsx("p",{className:"text-sm text-muted-foreground",children:ce()})}),g.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:[g.jsx(vt,{onClick:()=>J(!0),size:"icon",variant:"ghost",className:"h-6 w-6",title:"Select Context Files (⌘⇧K)",disabled:!1,children:g.jsx(LM,{className:"h-4 w-4"})}),g.jsxs("span",{className:"hidden sm:inline-flex items-center gap-0.5 text-muted-foreground/60",children:[g.jsx(zh,{className:"text-[9px] px-1 h-4",children:"⌘"}),g.jsx(zh,{className:"text-[9px] px-1 h-4",children:"⇧"}),g.jsx(zh,{className:"text-[9px] px-1 h-4",children:"K"})]})]})]})}),L&&g.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-2 min-h-0",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"font-medium",children:"Chat History"}),g.jsx(vt,{onClick:()=>j(!1),size:"sm",variant:"ghost",children:g.jsx(so,{className:"h-4 w-4"})})]}),Y?g.jsx("div",{className:"text-center text-muted-foreground py-8",children:g.jsxs("div",{className:"flex items-center justify-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"w-2 h-2 bg-current rounded-full animate-bounce [animation-delay:0.2s]"})]})}):H.length===0?g.jsxs("div",{className:"text-center text-muted-foreground py-8",children:[g.jsx(IM,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),g.jsx("p",{className:"text-sm",children:"No saved chats yet"})]}):g.jsx("div",{className:"space-y-2",children:H.map(F=>g.jsx("div",{className:"border rounded-lg p-3 hover:bg-muted/50 cursor-pointer group",onClick:()=>Nt(F.id),children:g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h4",{className:"text-sm font-medium truncate",children:F.title}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:[new Date(F.updatedAt).toLocaleDateString()," • ",F.messages.length," messages"]}),g.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:F.model.split("/")[1]||F.model})]}),g.jsx(vt,{onClick:fe=>{fe.stopPropagation(),dn(F.id)},size:"icon",variant:"ghost",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity",children:g.jsx(hj,{className:"h-3 w-3"})})]})},F.id))})]}),!L&&g.jsxs("div",{ref:ea,className:ue("flex-1 w-full overflow-y-auto space-y-4 min-h-0",Ke?"p-6 max-w-4xl mx-auto":"p-4"),children:[b.length===0&&g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center text-muted-foreground py-12",children:[g.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/5 flex items-center justify-center mb-4",children:g.jsx(dp,{className:"h-5 w-5 text-primary/40"})}),g.jsx("p",{className:"text-sm font-medium text-foreground/70 mb-1",children:"Plan, explore, and create tasks"}),g.jsx("p",{className:"text-xs text-muted-foreground/70 mb-4 max-w-[220px]",children:"Plan projects, structure work for coding agents, or explore your knowledge base"}),g.jsxs("button",{onClick:()=>J(!0),className:"text-xs text-primary/70 hover:text-primary transition-colors flex items-center gap-1.5",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),ce()]})]}),b.map((F,fe)=>{const ye=F.role==="assistant",ge=ye?A8(F.content):{cleanedContent:F.content,actions:[]},Se=ye?ge.cleanedContent.length>0?ge.cleanedContent:ge.actions.length>0?"Proposed knowledge update available below.":F.content:F.content;return g.jsx("div",{className:ue("rounded-2xl",F.role==="user"?ue("bg-primary text-primary-foreground p-3 min-w-[80px] max-w-[85%] ml-auto",Ke&&"max-w-[70%]"):F.role==="system"?ue("bg-muted/50 text-muted-foreground text-center text-xs py-2 px-3 mx-auto max-w-[90%] rounded-lg"):ue("bg-muted p-3 min-w-[80px] max-w-[85%] mr-auto",Ke&&"max-w-[70%]")),children:ye?g.jsxs("div",{className:"space-y-2",children:[F.toolCalls&&F.toolCalls.length>0&&g.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950/20 p-2 rounded text-xs",children:[g.jsx("div",{className:"font-medium text-blue-700 dark:text-blue-300 mb-1",children:"Tool Calls:"}),F.toolCalls.map((Ue,It)=>g.jsxs("div",{className:"text-blue-600 dark:text-blue-400",children:["• ",Ue.function.name,"(",JSON.parse(Ue.function.arguments).operation,")"]},It))]}),g.jsx(xs,{className:"text-sm [&_.prose]:text-sm [&_.prose-p]:text-sm [&_.prose-li]:text-sm [&_.prose-code]:text-xs",children:Se}),ge.actions.map((Ue,It)=>g.jsx(_8,{action:Ue,onApply:La,fetchDocumentContent:jo},`${fe}-knowledge-${It}`)),F.toolResults&&F.toolResults.length>0&&g.jsxs("div",{className:"bg-green-50 dark:bg-green-950/20 p-2 rounded text-xs",children:[g.jsx("div",{className:"font-medium text-green-700 dark:text-green-300 mb-1",children:"Tool Results:"}),F.toolResults.map((Ue,It)=>{const pt=JSON.parse(Ue.content);let Xe=null;return pt.success&&pt.data&&(pt.data.filename&&pt.message?.includes("knowledge document")?Xe=`/context/knowledge/${pt.data.filename.replace(/\.md$/,"")}`:pt.data.id&&(pt.message?.includes("proposal")||pt.data.intent)&&(Xe=`/proposals/${pt.data.id}`)),g.jsxs("div",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[g.jsxs("span",{children:["• ",pt.success?"✓":"✗"]}),Xe?g.jsxs(Sr,{to:Xe,className:"hover:underline inline-flex items-center gap-1",onClick:Gt=>Gt.stopPropagation(),children:[pt.message||pt.error,g.jsx(pM,{className:"h-3 w-3 opacity-70"})]}):g.jsx("span",{children:pt.message||pt.error})]},It)})]}),!E&&F.content.length>0&&g.jsxs("div",{className:"flex justify-end gap-1",children:[g.jsx(vt,{onClick:()=>{const Ue=F.content.match(/(?:^|\n)#{1,2}\s+(.+?)(?:\n|$)/),It=Ue?Ue[1].trim():void 0,pt={description:F.content,title:It};if(Ke){tr(pt),xt(!1);return}O("/proposals/new",{state:pt})},size:"icon",variant:"ghost",className:"h-5 w-5 opacity-60 hover:opacity-100",title:"Create task from message",children:g.jsx(Kw,{className:"h-3 w-3"})}),g.jsx(vt,{onClick:()=>Es(F.content,fe),size:"icon",variant:"ghost",className:"h-5 w-5 opacity-60 hover:opacity-100",title:Rt===fe?"Copied!":"Copy message",children:Rt===fe?g.jsx(Oc,{className:"h-3 w-3"}):g.jsx(cM,{className:"h-3 w-3"})})]})]}):g.jsx("div",{className:"text-sm",children:F.content})},fe)}),(E||bn)&&g.jsx("div",{className:ue("p-3 rounded-2xl text-sm min-w-[80px] max-w-[85%] mr-auto",bn?"bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800":"bg-muted",Ke&&"max-w-[70%]"),children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:ue("w-2 h-2 rounded-full animate-bounce",bn?"bg-blue-500":"bg-current")}),g.jsx("div",{className:ue("w-2 h-2 rounded-full animate-bounce [animation-delay:0.1s]",bn?"bg-blue-500":"bg-current")}),g.jsx("div",{className:ue("w-2 h-2 rounded-full animate-bounce [animation-delay:0.2s]",bn?"bg-blue-500":"bg-current")}),bn&&g.jsx("span",{className:"text-xs text-blue-700 dark:text-blue-300 ml-1 font-medium",children:bn})]})}),g.jsx("div",{ref:hr})]}),!L&&g.jsx("div",{className:"border-t flex-shrink-0 w-full",children:g.jsxs("div",{className:ue(Ke?"p-6 max-w-4xl mx-auto":"p-4"),children:[g.jsx("div",{className:"mb-4 flex gap-2 items-center",children:g.jsxs(Gb,{onValueChange:Cs,children:[g.jsx(Np,{className:"flex-1",children:g.jsx(Yb,{placeholder:"Actions..."})}),g.jsxs(_p,{children:[g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider",children:"Understand"}),pr().understand.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Define"}),pr().define.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Explore"}),pr().explore.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Synthesize"}),pr().synthesize.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label)),g.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-wider border-t mt-1 pt-2",children:"Capture"}),pr().capture.map(F=>g.jsx(li,{value:F.label,className:"text-sm",children:F.label},F.label))]})]})}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(wk,{ref:ta,value:y,onChange:F=>w(F.target.value),onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),ks())},placeholder:"Ask AI for help...",className:ue("flex-1 resize-none",Ke?"min-h-[3rem] max-h-40 text-base":"min-h-[2.5rem] max-h-32"),"aria-label":"Assistant message input"}),A?g.jsx(vt,{onClick:xi,size:"icon",variant:"outline",className:"shrink-0",title:"Stop response (Esc)","aria-label":"Stop response",children:g.jsx(uj,{className:"h-4 w-4"})}):g.jsx(vt,{onClick:ks,disabled:!y.trim(),size:"icon",className:"shrink-0",children:g.jsx(QM,{className:"h-4 w-4"})})]})]})})]})});return N?g.jsxs(g.Fragment,{children:[g.jsx(V1,{open:e,onOpenChange:n,children:g.jsxs(gm,{side:"right",className:"w-96 h-full p-0 bg-sidebar border-l border-sidebar-border",children:[g.jsx(ym,{className:"sr-only",children:g.jsx(vm,{children:"Assistant"})}),za]})}),g.jsx(H0,{open:Z,onOpenChange:J,onSelectionConfirm:Do,initialSelection:ae}),g.jsx(F0,{open:Ee,onOpenChange:pe,initialSelectedId:le?.filename?.replace(".md","")||null,onSelect:F=>{const fe={id:F.filename.replace(".md",""),name:F.metadata?.name||F.title,filename:F.filename,content:F.content};ve(fe),S(ye=>[...ye,{role:"system",content:`${fe.name} selected.`}])}})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:ue("fixed inset-y-0 right-0 z-10 h-dvh bg-sidebar border-l border-sidebar-border transition-all duration-300 ease-in-out",e?"w-96":"w-0 overflow-hidden"),children:g.jsx("div",{className:"w-96 h-full",children:za})}),g.jsx(Zc,{open:Ke,onOpenChange:xt,children:g.jsxs(ds,{className:"max-w-[90vw] w-[90vw] max-h-[90vh] h-[90vh] p-0 gap-0 [&>button]:hidden",children:[g.jsx(hs,{className:"sr-only",children:g.jsx(ps,{children:"Assistant"})}),g.jsx("div",{className:"h-full w-full flex flex-col bg-background rounded-lg overflow-hidden",children:za})]})}),g.jsx(H0,{open:Z,onOpenChange:J,onSelectionConfirm:Do,initialSelection:ae}),g.jsx(F0,{open:Ee,onOpenChange:pe,initialSelectedId:le?.filename?.replace(".md","")||null,onSelect:F=>{const fe={id:F.filename.replace(".md",""),name:F.metadata?.name||F.title,filename:F.filename,content:F.content};ve(fe),S(ye=>[...ye,{role:"system",content:`${fe.name} selected.`}])}})]})}var tp="rovingFocusGroup.onEntryFocus",j8={bubbles:!1,cancelable:!0},bs="RovingFocusGroup",[$p,Sk,D8]=_c(bs),[O8,Ek]=Jn(bs,[D8]),[P8,L8]=O8(bs),Ck=v.forwardRef((e,n)=>g.jsx($p.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx($p.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(z8,{...e,ref:n})})}));Ck.displayName=bs;var z8=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:l=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...y}=e,w=v.useRef(null),b=ze(n,w),S=Yc(s),[E,T]=_a({prop:c,defaultProp:f??null,onChange:d,caller:bs}),[A,R]=v.useState(!1),N=Tt(h),O=Sk(r),L=v.useRef(!1),[j,H]=v.useState(0);return v.useEffect(()=>{const $=w.current;if($)return $.addEventListener(tp,N),()=>$.removeEventListener(tp,N)},[N]),g.jsx(P8,{scope:r,orientation:i,dir:S,loop:l,currentTabStopId:E,onItemFocus:v.useCallback($=>T($),[T]),onItemShiftTab:v.useCallback(()=>R(!0),[]),onFocusableItemAdd:v.useCallback(()=>H($=>$+1),[]),onFocusableItemRemove:v.useCallback(()=>H($=>$-1),[]),children:g.jsx(_e.div,{tabIndex:A||j===0?-1:0,"data-orientation":i,...y,ref:b,style:{outline:"none",...e.style},onMouseDown:me(e.onMouseDown,()=>{L.current=!0}),onFocus:me(e.onFocus,$=>{const Y=!L.current;if($.target===$.currentTarget&&Y&&!A){const D=new CustomEvent(tp,j8);if($.currentTarget.dispatchEvent(D),!D.defaultPrevented){const Z=O().filter(z=>z.focusable),J=Z.find(z=>z.active),ne=Z.find(z=>z.id===E),ae=[J,ne,...Z].filter(Boolean).map(z=>z.ref.current);Tk(ae,m)}}L.current=!1}),onBlur:me(e.onBlur,()=>R(!1))})})}),kk="RovingFocusGroupItem",Ak=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:l=!1,tabStopId:s,children:c,...f}=e,d=kr(),h=s||d,m=L8(kk,r),y=m.currentTabStopId===h,w=Sk(r),{onFocusableItemAdd:b,onFocusableItemRemove:S,currentTabStopId:E}=m;return v.useEffect(()=>{if(i)return b(),()=>S()},[i,b,S]),g.jsx($p.ItemSlot,{scope:r,id:h,focusable:i,active:l,children:g.jsx(_e.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...f,ref:n,onMouseDown:me(e.onMouseDown,T=>{i?m.onItemFocus(h):T.preventDefault()}),onFocus:me(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:me(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){m.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const A=U8(T,m.orientation,m.dir);if(A!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let N=w().filter(O=>O.focusable).map(O=>O.ref.current);if(A==="last")N.reverse();else if(A==="prev"||A==="next"){A==="prev"&&N.reverse();const O=N.indexOf(T.currentTarget);N=m.loop?H8(N,O+1):N.slice(O+1)}setTimeout(()=>Tk(N))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:E!=null}):c})})});Ak.displayName=kk;var I8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function B8(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function U8(e,n,r){const i=B8(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return I8[i]}function Tk(e,n=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:n}),document.activeElement!==r))return}function H8(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var F8=Ck,V8=Ak,Gp=["Enter"," "],q8=["ArrowDown","PageUp","Home"],Rk=["ArrowUp","PageDown","End"],$8=[...q8,...Rk],G8={ltr:[...Gp,"ArrowRight"],rtl:[...Gp,"ArrowLeft"]},Y8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ws="Menu",[es,K8,X8]=_c(ws),[mi,Nk]=Jn(ws,[X8,Ro,Ek]),lf=Ro(),_k=Ek(),[Q8,gi]=mi(ws),[Z8,Ss]=mi(ws),Mk=e=>{const{__scopeMenu:n,open:r=!1,children:i,dir:l,onOpenChange:s,modal:c=!0}=e,f=lf(n),[d,h]=v.useState(null),m=v.useRef(!1),y=Tt(s),w=Yc(l);return v.useEffect(()=>{const b=()=>{m.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>m.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),g.jsx(Rm,{...f,children:g.jsx(Q8,{scope:n,open:r,onOpenChange:y,content:d,onContentChange:h,children:g.jsx(Z8,{scope:n,onClose:v.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:m,dir:w,modal:c,children:i})})})};Mk.displayName=ws;var W8="MenuAnchor",ag=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,l=lf(r);return g.jsx(Nm,{...l,...i,ref:n})});ag.displayName=W8;var ig="MenuPortal",[J8,jk]=mi(ig,{forceMount:void 0}),Dk=e=>{const{__scopeMenu:n,forceMount:r,children:i,container:l}=e,s=gi(ig,n);return g.jsx(J8,{scope:n,forceMount:r,children:g.jsx(un,{present:r||s.open,children:g.jsx(is,{asChild:!0,container:l,children:i})})})};Dk.displayName=ig;var Xn="MenuContent",[eB,og]=mi(Xn),Ok=v.forwardRef((e,n)=>{const r=jk(Xn,e.__scopeMenu),{forceMount:i=r.forceMount,...l}=e,s=gi(Xn,e.__scopeMenu),c=Ss(Xn,e.__scopeMenu);return g.jsx(es.Provider,{scope:e.__scopeMenu,children:g.jsx(un,{present:i||s.open,children:g.jsx(es.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(tB,{...l,ref:n}):g.jsx(nB,{...l,ref:n})})})})}),tB=v.forwardRef((e,n)=>{const r=gi(Xn,e.__scopeMenu),i=v.useRef(null),l=ze(n,i);return v.useEffect(()=>{const s=i.current;if(s)return cm(s)},[]),g.jsx(lg,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),nB=v.forwardRef((e,n)=>{const r=gi(Xn,e.__scopeMenu);return g.jsx(lg,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),rB=si("MenuContent.ScrollLock"),lg=v.forwardRef((e,n)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:l,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:w,onDismiss:b,disableOutsideScroll:S,...E}=e,T=gi(Xn,r),A=Ss(Xn,r),R=lf(r),N=_k(r),O=K8(r),[L,j]=v.useState(null),H=v.useRef(null),$=ze(n,H,T.onContentChange),Y=v.useRef(0),D=v.useRef(""),Z=v.useRef(0),J=v.useRef(null),ne=v.useRef("right"),G=v.useRef(0),ae=S?zc:v.Fragment,z=S?{as:rB,allowPinchZoom:!0}:void 0,Q=ie=>{const k=D.current+ie,W=O().filter(le=>!le.disabled),se=document.activeElement,M=W.find(le=>le.ref.current===se)?.textValue,ce=W.map(le=>le.textValue),Ee=mB(ce,k,M),pe=W.find(le=>le.textValue===Ee)?.ref.current;(function le(ve){D.current=ve,window.clearTimeout(Y.current),ve!==""&&(Y.current=window.setTimeout(()=>le(""),1e3))})(k),pe&&setTimeout(()=>pe.focus())};v.useEffect(()=>()=>window.clearTimeout(Y.current),[]),um();const B=v.useCallback(ie=>ne.current===J.current?.side&&yB(ie,J.current?.area),[]);return g.jsx(eB,{scope:r,searchRef:D,onItemEnter:v.useCallback(ie=>{B(ie)&&ie.preventDefault()},[B]),onItemLeave:v.useCallback(ie=>{B(ie)||(H.current?.focus(),j(null))},[B]),onTriggerLeave:v.useCallback(ie=>{B(ie)&&ie.preventDefault()},[B]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:v.useCallback(ie=>{J.current=ie},[]),children:g.jsx(ae,{...z,children:g.jsx(Pc,{asChild:!0,trapped:l,onMountAutoFocus:me(s,ie=>{ie.preventDefault(),H.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:w,onDismiss:b,children:g.jsx(F8,{asChild:!0,...N,dir:A.dir,orientation:"vertical",loop:i,currentTabStopId:L,onCurrentTabStopIdChange:j,onEntryFocus:me(d,ie=>{A.isUsingKeyboardRef.current||ie.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(_m,{role:"menu","aria-orientation":"vertical","data-state":Qk(T.open),"data-radix-menu-content":"",dir:A.dir,...R,...E,ref:$,style:{outline:"none",...E.style},onKeyDown:me(E.onKeyDown,ie=>{const W=ie.target.closest("[data-radix-menu-content]")===ie.currentTarget,se=ie.ctrlKey||ie.altKey||ie.metaKey,M=ie.key.length===1;W&&(ie.key==="Tab"&&ie.preventDefault(),!se&&M&&Q(ie.key));const ce=H.current;if(ie.target!==ce||!$8.includes(ie.key))return;ie.preventDefault();const pe=O().filter(le=>!le.disabled).map(le=>le.ref.current);Rk.includes(ie.key)&&pe.reverse(),hB(pe)}),onBlur:me(e.onBlur,ie=>{ie.currentTarget.contains(ie.target)||(window.clearTimeout(Y.current),D.current="")}),onPointerMove:me(e.onPointerMove,ts(ie=>{const k=ie.target,W=G.current!==ie.clientX;if(ie.currentTarget.contains(k)&&W){const se=ie.clientX>G.current?"right":"left";ne.current=se,G.current=ie.clientX}}))})})})})})})});Ok.displayName=Xn;var aB="MenuGroup",sg=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(_e.div,{role:"group",...i,ref:n})});sg.displayName=aB;var iB="MenuLabel",Pk=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(_e.div,{...i,ref:n})});Pk.displayName=iB;var Sc="MenuItem",V0="menu.itemSelect",sf=v.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:i,...l}=e,s=v.useRef(null),c=Ss(Sc,e.__scopeMenu),f=og(Sc,e.__scopeMenu),d=ze(n,s),h=v.useRef(!1),m=()=>{const y=s.current;if(!r&&y){const w=new CustomEvent(V0,{bubbles:!0,cancelable:!0});y.addEventListener(V0,b=>i?.(b),{once:!0}),rm(y,w),w.defaultPrevented?h.current=!1:c.onClose()}};return g.jsx(Lk,{...l,ref:d,disabled:r,onClick:me(e.onClick,m),onPointerDown:y=>{e.onPointerDown?.(y),h.current=!0},onPointerUp:me(e.onPointerUp,y=>{h.current||y.currentTarget?.click()}),onKeyDown:me(e.onKeyDown,y=>{const w=f.searchRef.current!=="";r||w&&y.key===" "||Gp.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});sf.displayName=Sc;var Lk=v.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:i=!1,textValue:l,...s}=e,c=og(Sc,r),f=_k(r),d=v.useRef(null),h=ze(n,d),[m,y]=v.useState(!1),[w,b]=v.useState("");return v.useEffect(()=>{const S=d.current;S&&b((S.textContent??"").trim())},[s.children]),g.jsx(es.ItemSlot,{scope:r,disabled:i,textValue:l??w,children:g.jsx(V8,{asChild:!0,...f,focusable:!i,children:g.jsx(_e.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:h,onPointerMove:me(e.onPointerMove,ts(S=>{i?c.onItemLeave(S):(c.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:me(e.onPointerLeave,ts(S=>c.onItemLeave(S))),onFocus:me(e.onFocus,()=>y(!0)),onBlur:me(e.onBlur,()=>y(!1))})})})}),oB="MenuCheckboxItem",zk=v.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:i,...l}=e;return g.jsx(Fk,{scope:e.__scopeMenu,checked:r,children:g.jsx(sf,{role:"menuitemcheckbox","aria-checked":Ec(r)?"mixed":r,...l,ref:n,"data-state":cg(r),onSelect:me(l.onSelect,()=>i?.(Ec(r)?!0:!r),{checkForDefaultPrevented:!1})})})});zk.displayName=oB;var Ik="MenuRadioGroup",[lB,sB]=mi(Ik,{value:void 0,onValueChange:()=>{}}),Bk=v.forwardRef((e,n)=>{const{value:r,onValueChange:i,...l}=e,s=Tt(i);return g.jsx(lB,{scope:e.__scopeMenu,value:r,onValueChange:s,children:g.jsx(sg,{...l,ref:n})})});Bk.displayName=Ik;var Uk="MenuRadioItem",Hk=v.forwardRef((e,n)=>{const{value:r,...i}=e,l=sB(Uk,e.__scopeMenu),s=r===l.value;return g.jsx(Fk,{scope:e.__scopeMenu,checked:s,children:g.jsx(sf,{role:"menuitemradio","aria-checked":s,...i,ref:n,"data-state":cg(s),onSelect:me(i.onSelect,()=>l.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Hk.displayName=Uk;var ug="MenuItemIndicator",[Fk,uB]=mi(ug,{checked:!1}),Vk=v.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:i,...l}=e,s=uB(ug,r);return g.jsx(un,{present:i||Ec(s.checked)||s.checked===!0,children:g.jsx(_e.span,{...l,ref:n,"data-state":cg(s.checked)})})});Vk.displayName=ug;var cB="MenuSeparator",qk=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e;return g.jsx(_e.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})});qk.displayName=cB;var fB="MenuArrow",$k=v.forwardRef((e,n)=>{const{__scopeMenu:r,...i}=e,l=lf(r);return g.jsx(Mm,{...l,...i,ref:n})});$k.displayName=fB;var dB="MenuSub",[hH,Gk]=mi(dB),Il="MenuSubTrigger",Yk=v.forwardRef((e,n)=>{const r=gi(Il,e.__scopeMenu),i=Ss(Il,e.__scopeMenu),l=Gk(Il,e.__scopeMenu),s=og(Il,e.__scopeMenu),c=v.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:d}=s,h={__scopeMenu:e.__scopeMenu},m=v.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return v.useEffect(()=>m,[m]),v.useEffect(()=>{const y=f.current;return()=>{window.clearTimeout(y),d(null)}},[f,d]),g.jsx(ag,{asChild:!0,...h,children:g.jsx(Lk,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":l.contentId,"data-state":Qk(r.open),...e,ref:Nc(n,l.onTriggerChange),onClick:y=>{e.onClick?.(y),!(e.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:me(e.onPointerMove,ts(y=>{s.onItemEnter(y),!y.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:me(e.onPointerLeave,ts(y=>{m();const w=r.content?.getBoundingClientRect();if(w){const b=r.content?.dataset.side,S=b==="right",E=S?-5:5,T=w[S?"left":"right"],A=w[S?"right":"left"];s.onPointerGraceIntentChange({area:[{x:y.clientX+E,y:y.clientY},{x:T,y:w.top},{x:A,y:w.top},{x:A,y:w.bottom},{x:T,y:w.bottom}],side:b}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(y),y.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:me(e.onKeyDown,y=>{const w=s.searchRef.current!=="";e.disabled||w&&y.key===" "||G8[i.dir].includes(y.key)&&(r.onOpenChange(!0),r.content?.focus(),y.preventDefault())})})})});Yk.displayName=Il;var Kk="MenuSubContent",Xk=v.forwardRef((e,n)=>{const r=jk(Xn,e.__scopeMenu),{forceMount:i=r.forceMount,...l}=e,s=gi(Xn,e.__scopeMenu),c=Ss(Xn,e.__scopeMenu),f=Gk(Kk,e.__scopeMenu),d=v.useRef(null),h=ze(n,d);return g.jsx(es.Provider,{scope:e.__scopeMenu,children:g.jsx(un,{present:i||s.open,children:g.jsx(es.Slot,{scope:e.__scopeMenu,children:g.jsx(lg,{id:f.contentId,"aria-labelledby":f.triggerId,...l,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:me(e.onFocusOutside,m=>{m.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:me(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:me(e.onKeyDown,m=>{const y=m.currentTarget.contains(m.target),w=Y8[c.dir].includes(m.key);y&&w&&(s.onOpenChange(!1),f.trigger?.focus(),m.preventDefault())})})})})})});Xk.displayName=Kk;function Qk(e){return e?"open":"closed"}function Ec(e){return e==="indeterminate"}function cg(e){return Ec(e)?"indeterminate":e?"checked":"unchecked"}function hB(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function pB(e,n){return e.map((r,i)=>e[(n+i)%e.length])}function mB(e,n,r){const l=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=pB(e,Math.max(s,0));l.length===1&&(c=c.filter(h=>h!==r));const d=c.find(h=>h.toLowerCase().startsWith(l.toLowerCase()));return d!==r?d:void 0}function gB(e,n){const{x:r,y:i}=e;let l=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,m=f.y,y=d.x,w=d.y;m>i!=w>i&&r<(y-h)*(i-m)/(w-m)+h&&(l=!l)}return l}function yB(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return gB(r,n)}function ts(e){return n=>n.pointerType==="mouse"?e(n):void 0}var vB=Mk,xB=ag,bB=Dk,wB=Ok,SB=sg,EB=Pk,CB=sf,kB=zk,AB=Bk,TB=Hk,RB=Vk,NB=qk,_B=$k,MB=Yk,jB=Xk,uf="DropdownMenu",[DB,pH]=Jn(uf,[Nk]),cn=Nk(),[OB,Zk]=DB(uf),Wk=e=>{const{__scopeDropdownMenu:n,children:r,dir:i,open:l,defaultOpen:s,onOpenChange:c,modal:f=!0}=e,d=cn(n),h=v.useRef(null),[m,y]=_a({prop:l,defaultProp:s??!1,onChange:c,caller:uf});return g.jsx(OB,{scope:n,triggerId:kr(),triggerRef:h,contentId:kr(),open:m,onOpenChange:y,onOpenToggle:v.useCallback(()=>y(w=>!w),[y]),modal:f,children:g.jsx(vB,{...d,open:m,onOpenChange:y,dir:i,modal:f,children:r})})};Wk.displayName=uf;var Jk="DropdownMenuTrigger",e2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...l}=e,s=Zk(Jk,r),c=cn(r);return g.jsx(xB,{asChild:!0,...c,children:g.jsx(_e.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...l,ref:Nc(n,s.triggerRef),onPointerDown:me(e.onPointerDown,f=>{!i&&f.button===0&&f.ctrlKey===!1&&(s.onOpenToggle(),s.open||f.preventDefault())}),onKeyDown:me(e.onKeyDown,f=>{i||(["Enter"," "].includes(f.key)&&s.onOpenToggle(),f.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});e2.displayName=Jk;var PB="DropdownMenuPortal",t2=e=>{const{__scopeDropdownMenu:n,...r}=e,i=cn(n);return g.jsx(bB,{...i,...r})};t2.displayName=PB;var n2="DropdownMenuContent",r2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=Zk(n2,r),s=cn(r),c=v.useRef(!1);return g.jsx(wB,{id:l.contentId,"aria-labelledby":l.triggerId,...s,...i,ref:n,onCloseAutoFocus:me(e.onCloseAutoFocus,f=>{c.current||l.triggerRef.current?.focus(),c.current=!1,f.preventDefault()}),onInteractOutside:me(e.onInteractOutside,f=>{const d=f.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,m=d.button===2||h;(!l.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});r2.displayName=n2;var LB="DropdownMenuGroup",zB=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(SB,{...l,...i,ref:n})});zB.displayName=LB;var IB="DropdownMenuLabel",a2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(EB,{...l,...i,ref:n})});a2.displayName=IB;var BB="DropdownMenuItem",i2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(CB,{...l,...i,ref:n})});i2.displayName=BB;var UB="DropdownMenuCheckboxItem",o2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(kB,{...l,...i,ref:n})});o2.displayName=UB;var HB="DropdownMenuRadioGroup",FB=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(AB,{...l,...i,ref:n})});FB.displayName=HB;var VB="DropdownMenuRadioItem",l2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(TB,{...l,...i,ref:n})});l2.displayName=VB;var qB="DropdownMenuItemIndicator",s2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(RB,{...l,...i,ref:n})});s2.displayName=qB;var $B="DropdownMenuSeparator",u2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(NB,{...l,...i,ref:n})});u2.displayName=$B;var GB="DropdownMenuArrow",YB=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(_B,{...l,...i,ref:n})});YB.displayName=GB;var KB="DropdownMenuSubTrigger",c2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(MB,{...l,...i,ref:n})});c2.displayName=KB;var XB="DropdownMenuSubContent",f2=v.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...i}=e,l=cn(r);return g.jsx(jB,{...l,...i,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});f2.displayName=XB;var QB=Wk,ZB=e2,WB=t2,d2=r2,h2=a2,p2=i2,m2=o2,g2=l2,y2=s2,v2=u2,x2=c2,b2=f2;const JB=QB,eU=ZB,tU=v.forwardRef(({className:e,inset:n,children:r,...i},l)=>g.jsxs(x2,{ref:l,className:ue("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...i,children:[r,g.jsx(nM,{className:"ml-auto h-4 w-4"})]}));tU.displayName=x2.displayName;const nU=v.forwardRef(({className:e,...n},r)=>g.jsx(b2,{ref:r,className:ue("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));nU.displayName=b2.displayName;const w2=v.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(WB,{children:g.jsx(d2,{ref:i,sideOffset:n,className:ue("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));w2.displayName=d2.displayName;const S2=v.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(p2,{ref:i,className:ue("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...r}));S2.displayName=p2.displayName;const rU=v.forwardRef(({className:e,children:n,checked:r,...i},l)=>g.jsxs(m2,{ref:l,className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...i,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(y2,{children:g.jsx(Oc,{className:"h-4 w-4"})})}),n]}));rU.displayName=m2.displayName;const aU=v.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(g2,{ref:i,className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(y2,{children:g.jsx(oM,{className:"h-2 w-2 fill-current"})})}),n]}));aU.displayName=g2.displayName;const E2=v.forwardRef(({className:e,inset:n,...r},i)=>g.jsx(h2,{ref:i,className:ue("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));E2.displayName=h2.displayName;const C2=v.forwardRef(({className:e,...n},r)=>g.jsx(v2,{ref:r,className:ue("-mx-1 my-1 h-px bg-muted",e),...n}));C2.displayName=v2.displayName;function iU(){const[e,n]=v.useState(!1),[r,i]=v.useState(null),[l,s]=v.useState(null),[c,f]=v.useState(null),[d,h]=v.useState("Coconut"),[m,y]=v.useState(null),[w,b]=v.useState(null),[S,E]=v.useState(!1),T=Wn(),A=rs(),R=T.pathname,{user:N,logout:O,authEnabled:L}=yw();v.useEffect(()=>{const Y=localStorage.getItem("ai-sidebar-open");Y!==null&&n(JSON.parse(Y))},[]),v.useEffect(()=>{const Y=D=>{const Z=D.detail;Z&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),y(Z))};return window.addEventListener("discuss-in-chat",Y),()=>{window.removeEventListener("discuss-in-chat",Y)}},[]),v.useEffect(()=>{const Y=D=>{const Z=D.detail;Z?.prompt&&(n(!0),localStorage.setItem("ai-sidebar-open","true"),b(Z.prompt))};return window.addEventListener("customize-prompt-in-assistant",Y),()=>{window.removeEventListener("customize-prompt-in-assistant",Y)}},[]),v.useEffect(()=>{const Y=()=>{n(!0),localStorage.setItem("ai-sidebar-open","true"),E(!0)};return window.addEventListener("open-assistant-expanded",Y),()=>{window.removeEventListener("open-assistant-expanded",Y)}},[]),v.useEffect(()=>{const Y=D=>{if((D.metaKey||D.ctrlKey)&&D.shiftKey&&D.key==="l"){D.preventDefault(),e||(n(!0),localStorage.setItem("ai-sidebar-open","true")),window.dispatchEvent(new CustomEvent("toggle-assistant-fullscreen"));return}(D.metaKey||D.ctrlKey)&&D.key==="l"&&(D.preventDefault(),j())};return window.addEventListener("keydown",Y),()=>{window.removeEventListener("keydown",Y)}},[e]),v.useEffect(()=>{const Y=async()=>{try{const Z=await fetch(`${Et}/api/v1/config`);if(Z.ok){const J=await Z.json();if(J.success&&J.data?.coconut){const{firstName:ne,lastName:G}=J.data.coconut;ne&&G?h(`${ne} ${G}`):(ne||G)&&h(ne||G)}}}catch(Z){console.error("Error fetching config:",Z)}};Y();const D=()=>{Y()};return window.addEventListener("config-updated",D),()=>{window.removeEventListener("config-updated",D)}},[]);const j=()=>{const Y=!e;n(Y),localStorage.setItem("ai-sidebar-open",JSON.stringify(Y))},H=async()=>{try{await O(),lp({title:"Logged out",description:"You have been logged out successfully"}),A("/login")}catch(Y){console.error("Logout error:",Y),lp({title:"Error",description:"Failed to logout",variant:"destructive"})}};v.useEffect(()=>{(async()=>{try{const D=await fetch(`${Et}/api/v1/context/project`);if(D.ok){const Z=await D.text();s(Z)}else s(null)}catch(D){console.error("Error fetching project context:",D),s(null)}if(R.includes("/context/architecture")||R.includes("/proposals"))try{const D=await fetch(`${Et}/api/v1/context/architecture`);if(D.ok){const Z=await D.text();f(Z)}else f(null)}catch(D){console.error("Error fetching architecture context:",D),f(null)}else f(null);if(R.includes("/proposals")&&(R.includes("/edit")||R.match(/\/proposals\/[^/]+$/))){const Z=R.match(/\/proposals\/([^/]+)(?:\/edit)?/)?.[1];if(Z)try{const ne=await(await fetch(`${Et}/api/v1/proposals/${Z}`)).json();if(ne.success){const G=ne.data,ae=`Proposal ID: ${Z}
459
459
  Intent: ${G.intent}
460
460
  Status: ${G.status}
461
461
  Priority: ${G.metadata?.priority||"medium"}
@@ -465,4 +465,4 @@ ${G.content||""}`;i(ae)}else i(null)}catch(J){console.error("Error fetching prop
465
465
  ${l}`,r&&`=== PROPOSAL CONTENT ===
466
466
  ${r}`].filter(Boolean),G=ne.length>0?ne.join(`
467
467
 
468
- `):null;return{type:R.includes("/edit")?"proposals-edit":"proposals-view",content:G,displayId:D,contextFiles:J}}return{type:"proposals",content:l,contextFiles:"project.md"}}return R.includes("/context")?R.includes("/architecture")?{type:"context-architecture",content:c,contextFiles:"architecture.md"}:R.includes("/project")?{type:"context-project",content:l,contextFiles:"project.md"}:R.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:R.includes("/settings")?R.includes("/agents")?{type:"settings-agents",content:null}:R.includes("/integrations")?{type:"settings-integrations",content:null}:R.includes("/prompts")?{type:"settings-prompts",content:null}:R.includes("/rules")?{type:"settings-rules",content:null}:R.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:R.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return g.jsx(CS,{children:g.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[g.jsx(RP,{}),g.jsxs(TS,{className:ue("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[g.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[g.jsx(AS,{className:"-ml-1"}),g.jsxs("div",{className:"flex items-center justify-between flex-1",children:[g.jsx("h1",{className:"text-lg font-semibold",children:d||"Coconut"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(vt,{onClick:j,size:"icon",className:"h-8 w-8 rounded-full",children:g.jsx(dp,{className:"h-4 w-4"})}),L&&N&&g.jsxs(JB,{children:[g.jsx(eU,{asChild:!0,children:g.jsx(vt,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:g.jsx(xj,{className:"h-4 w-4"})})}),g.jsxs(w2,{align:"end",children:[g.jsx(E2,{children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:N.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:N.email})]})}),g.jsx(C2,{}),g.jsxs(S2,{onClick:H,children:[g.jsx(OM,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),g.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:g.jsx(nw,{})})]}),g.jsx(M8,{isOpen:e,onToggle:j,contextInfo:$(),discussDocument:m,onDiscussDocumentHandled:()=>y(null),pendingPrompt:w,onPendingPromptHandled:()=>b(null),openInFullScreen:S,onFullScreenHandled:()=>E(!1)})]})})}const oU=[{title:"Coconut Profile",href:"/settings/user",icon:mj,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:aj,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:nj,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:MM,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:uc,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:GM,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:Xw,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:UM,description:"Model Context Protocol configuration and settings"}];function lU(){const e=Wn();return g.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[g.jsx("aside",{className:"lg:w-1/5",children:g.jsx("nav",{className:"flex overflow-x-auto pb-2 gap-1 lg:flex-col lg:gap-0 lg:space-y-1 lg:overflow-visible lg:pb-0",children:oU.map(n=>g.jsxs(Sr,{to:n.href,className:ue("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-2 sm:px-3 lg:px-4 py-2 hover:bg-accent justify-start flex-shrink-0",e.pathname===n.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[g.jsx(n.icon,{className:"h-4 w-4 lg:mr-2"}),g.jsx("span",{className:"hidden lg:inline",children:n.title})]},n.href))})}),g.jsx("div",{className:"flex-1 lg:max-w-2xl",children:g.jsx("div",{className:"space-y-6",children:g.jsx(nw,{})})})]})}const sU=v.lazy(()=>Ie(()=>import("./DashboardPage-e9hNRsi2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),uU=v.lazy(()=>Ie(()=>import("./LoginPage-DcTU__Dc.js"),__vite__mapDeps([18,3,1,19]))),cU=v.lazy(()=>Ie(()=>import("./CallbackPage-CtydJ4j3.js"),__vite__mapDeps([20,8,21]))),fU=v.lazy(()=>Ie(()=>import("./ProposalsPage-BvKlKvuo.js"),__vite__mapDeps([22,1,2,17,10]))),dU=v.lazy(()=>Ie(()=>import("./ProposalDetailPage-BVXTjXw2.js"),__vite__mapDeps([23,24,1,2,3,25,26,27,12,15]))),hU=v.lazy(()=>Ie(()=>import("./ProposalEditPage-Bs3ak0PG.js"),__vite__mapDeps([28,3,1,29,30,31,32,17,33,2,25])).then(e=>({default:e.ProposalEditPage}))),pU=v.lazy(()=>Ie(()=>import("./NewProposalPage-BLIqmuks.js"),__vite__mapDeps([34,1,3,29,30,31,32,17,33,2,25])).then(e=>({default:e.NewProposalPage}))),mU=v.lazy(()=>Ie(()=>import("./TerminalPage-CqPXFOIN.js"),__vite__mapDeps([35,1,4,5,6,7,36,37,14,38,39]))),gU=v.lazy(()=>Ie(()=>import("./TerminalSessionPage-DR2cApWv.js"),__vite__mapDeps([40,1,2,41,31,3,4,6,7,42,43,36,14,17,11,39]))),yU=v.lazy(()=>Ie(()=>import("./UtilitiesPage-BGiBB5PT.js"),__vite__mapDeps([44,1,4,38,14]))),vU=v.lazy(()=>Ie(()=>import("./CodePage-BiRf5q_q.js"),__vite__mapDeps([45,1,2,4,5,6,7,43,36,37,14]))),xU=v.lazy(()=>Ie(()=>import("./AgentsPage-Bage8eYW.js"),__vite__mapDeps([46,1,2,24,47,48,10,17,49]))),bU=v.lazy(()=>Ie(()=>import("./AgentDetailPage-WLAnnZep.js"),__vite__mapDeps([50,1,2,25]))),wU=v.lazy(()=>Ie(()=>import("./NewAgentPage-8-abvhkI.js"),__vite__mapDeps([51,1,3,2,24,25,26]))),SU=v.lazy(()=>Ie(()=>import("./AgentEditPage-DOemUkvg.js"),__vite__mapDeps([52,1,3,2,24,25,26]))),EU=v.lazy(()=>Ie(()=>import("./ResourcesPage-BSyX_kHV.js"),__vite__mapDeps([53,1,3,2,24,48,27,9,12,49,17,10]))),CU=v.lazy(()=>Ie(()=>import("./KnowledgePage-DIlUufGq.js"),__vite__mapDeps([54,1,2,24,47,48,10,17,55,42]))),kU=v.lazy(()=>Ie(()=>import("./KnowledgeDetailPage-CLizVIxC.js"),__vite__mapDeps([56,1,2,24,25,12,49]))),AU=v.lazy(()=>Ie(()=>import("./KnowledgeEditPage-B-sdY_DS.js"),__vite__mapDeps([57,1,3,29,30,33,2,58,17,25]))),TU=v.lazy(()=>Ie(()=>import("./NewKnowledgePage-Rvj741x1.js"),__vite__mapDeps([59,1,3,29,30,33,2,58,17,25]))),RU=v.lazy(()=>Ie(()=>import("./ProjectPage-_L4wqwrB.js"),__vite__mapDeps([60,1,2,24]))),NU=v.lazy(()=>Ie(()=>import("./ProjectEditPage-DC5-v_2a.js"),__vite__mapDeps([61,1,3,29,30,25,16]))),_U=v.lazy(()=>Ie(()=>import("./ArchitecturePage-Cj4dVDWO.js"),__vite__mapDeps([62,1,24]))),MU=v.lazy(()=>Ie(()=>import("./ArchitectureEditPage-WY9k_1tR.js"),__vite__mapDeps([63,1,3,29,30,25,16]))),jU=v.lazy(()=>Ie(()=>import("./RolePage-D8xB0I-F.js"),__vite__mapDeps([64,1,24]))),DU=v.lazy(()=>Ie(()=>import("./RoleEditPage-CnWierul.js"),__vite__mapDeps([65,1,29,30,25,16]))),OU=v.lazy(()=>Ie(()=>import("./IdentityPage-DCpoDF2j.js"),__vite__mapDeps([66,1,3,2,67,19,11,68,17,26]))),q0=v.lazy(()=>Ie(()=>import("./UserSettingsPage-BuMnU394.js"),__vite__mapDeps([69,1,3,26]))),PU=v.lazy(()=>Ie(()=>import("./AuthSettingsPage-Bs5wL5Yj.js"),__vite__mapDeps([70,1,3,71,2,72]))),LU=v.lazy(()=>Ie(()=>import("./ApiKeysSettingsPage-DCKd4LXE.js"),__vite__mapDeps([73,1,3,2,67,17,72]))),zU=v.lazy(()=>Ie(()=>import("./AgentsSettingsPage-Cw2MTnHU.js"),__vite__mapDeps([74,1,3,2,17,75,14,11]))),IU=v.lazy(()=>Ie(()=>import("./IntegrationsSettingsPage-DJpf2gZn.js"),__vite__mapDeps([76,1,3]))),BU=v.lazy(()=>Ie(()=>import("./GitSettingsPage-Cn-MciXq.js"),__vite__mapDeps([77,1,3,41,36,8,21]))),UU=v.lazy(()=>Ie(()=>import("./McpSettingsPage-BPDLne4q.js"),__vite__mapDeps([78,1,3,2,71,67,47,48,10,72,17,16]))),HU=v.lazy(()=>Ie(()=>import("./PromptsSettingsPage-K-qqpF2S.js"),__vite__mapDeps([79,1,3,2,17,68,27]))),FU=v.lazy(()=>Ie(()=>import("./RulesSettingsPage-CZBQ0u-x.js"),__vite__mapDeps([80,1,3,2,17]))),VU=v.lazy(()=>Ie(()=>import("./GitPage-BG-ZSGfu.js"),__vite__mapDeps([81,1,3,19,8,21,42,55,36,72,13]))),qU=v.lazy(()=>Ie(()=>import("./SchedulePage-HBFJT_19.js"),__vite__mapDeps([82,1,2,3,71,19,36,17,14,75,15]))),$U=v.lazy(()=>Ie(()=>import("./JobDetailPage-9shaUPlO.js"),__vite__mapDeps([83,24,1,2,25,14,26,36,75,15,12]))),GU=v.lazy(()=>Ie(()=>import("./UserPreferencesPage-CPkulDiM.js"),__vite__mapDeps([84,1,3]))),YU=v.lazy(()=>Ie(()=>import("./ActivityPage-C_HqpJt2.js"),__vite__mapDeps([85,1,2])));function KU(){return g.jsxs(GN,{children:[g.jsx(iN,{children:g.jsx(v.Suspense,{fallback:g.jsx(sD,{}),children:g.jsxs(PR,{children:[g.jsx(Oe,{path:"/login",element:g.jsx(uU,{})}),g.jsx(Oe,{path:"/auth/github/callback",element:g.jsx(cU,{})}),g.jsxs(Oe,{path:"/",element:g.jsx(lD,{children:g.jsx(iU,{})}),children:[g.jsx(Oe,{index:!0,element:g.jsx(sU,{})}),g.jsx(Oe,{path:"proposals",element:g.jsx(fU,{})}),g.jsx(Oe,{path:"proposals/new",element:g.jsx(pU,{})}),g.jsx(Oe,{path:"proposals/:id",element:g.jsx(dU,{})}),g.jsx(Oe,{path:"proposals/:id/edit",element:g.jsx(hU,{})}),g.jsx(Oe,{path:"code",element:g.jsx(vU,{})}),g.jsx(Oe,{path:"utilities",element:g.jsx(yU,{})}),g.jsx(Oe,{path:"terminal",element:g.jsx(mU,{})}),g.jsx(Oe,{path:"terminal/:proposalId",element:g.jsx(gU,{})}),g.jsx(Oe,{path:"git",element:g.jsx(VU,{})}),g.jsx(Oe,{path:"schedule",element:g.jsx(qU,{})}),g.jsx(Oe,{path:"schedule/:id",element:g.jsx($U,{})}),g.jsx(Oe,{path:"identity",element:g.jsx(OU,{})}),g.jsx(Oe,{path:"agents",element:g.jsx(xU,{})}),g.jsx(Oe,{path:"agents/new",element:g.jsx(wU,{})}),g.jsx(Oe,{path:"agents/:id",element:g.jsx(bU,{})}),g.jsx(Oe,{path:"agents/:id/edit",element:g.jsx(SU,{})}),g.jsx(Oe,{path:"activity",element:g.jsx(YU,{})}),g.jsx(Oe,{path:"resources",element:g.jsx(EU,{})}),g.jsx(Oe,{path:"context/project",element:g.jsx(RU,{})}),g.jsx(Oe,{path:"context/project/edit",element:g.jsx(NU,{})}),g.jsx(Oe,{path:"context/architecture",element:g.jsx(_U,{})}),g.jsx(Oe,{path:"context/architecture/edit",element:g.jsx(MU,{})}),g.jsx(Oe,{path:"context/role",element:g.jsx(jU,{})}),g.jsx(Oe,{path:"context/role/edit",element:g.jsx(DU,{})}),g.jsx(Oe,{path:"context/knowledge",element:g.jsx(CU,{})}),g.jsx(Oe,{path:"context/knowledge/new",element:g.jsx(TU,{})}),g.jsx(Oe,{path:"context/knowledge/:filename",element:g.jsx(kU,{})}),g.jsx(Oe,{path:"context/knowledge/:filename/edit",element:g.jsx(AU,{})}),g.jsxs(Oe,{path:"settings",element:g.jsx(lU,{}),children:[g.jsx(Oe,{index:!0,element:g.jsx(q0,{})}),g.jsx(Oe,{path:"user",element:g.jsx(q0,{})}),g.jsx(Oe,{path:"preferences",element:g.jsx(GU,{})}),g.jsx(Oe,{path:"authentication",element:g.jsx(PU,{})}),g.jsx(Oe,{path:"api-keys",element:g.jsx(LU,{})}),g.jsx(Oe,{path:"agents",element:g.jsx(zU,{})}),g.jsx(Oe,{path:"integrations",element:g.jsx(IU,{})}),g.jsx(Oe,{path:"git",element:g.jsx(BU,{})}),g.jsx(Oe,{path:"mcp",element:g.jsx(UU,{})}),g.jsx(Oe,{path:"prompts",element:g.jsx(HU,{})}),g.jsx(Oe,{path:"rules",element:g.jsx(FU,{})})]})]})]})})}),g.jsx(oD,{})]})}UT.createRoot(document.getElementById("root")).render(g.jsx(v.StrictMode,{children:g.jsx(KU,{})}));export{XC as $,Et as A,vt as B,nM as C,Zc as D,pM as E,uc as F,Xw as G,yw as H,d1 as I,cc as J,iH as K,Sr as L,IM as M,lp as N,QU as O,aM as P,XU as Q,lj as R,es as S,fj as T,W9 as U,J9 as V,hj as W,so as X,$C as Y,GC as Z,KC as _,ZN as a,Uh as a$,YC as a0,ZC as a1,QC as a2,bs as a3,xj as a4,aH as a5,gE as a6,m1 as a7,KM as a8,iD as a9,N9 as aA,wM as aB,tf as aC,Cc as aD,uH as aE,sH as aF,Hm as aG,Ym as aH,Pm as aI,zp as aJ,z5 as aK,xL as aL,oH as aM,lL as aN,EL as aO,dL as aP,SL as aQ,Mp as aR,Lm as aS,CE as aT,Wl as aU,u6 as aV,Z3 as aW,$5 as aX,WE as aY,lH as aZ,OL as a_,JB as aa,eU as ab,w2 as ac,E2 as ad,C2 as ae,S2 as af,JU as ag,oc as ah,rU as ai,wj as aj,qN as ak,Oc as al,cM as am,_a as an,Jn as ao,_c as ap,me as aq,_e as ar,ze as as,Yc as at,Ep as au,aS as av,MS as aw,xb as ax,g6 as ay,B9 as az,hs as b,Aa as b0,rn as b1,_0 as b2,ZU as b3,UM as b4,eo as b5,MM as b6,Dc as b7,kr as b8,Ek as b9,F8 as ba,V8 as bb,un as bc,oM as bd,b8 as be,WU as bf,W_ as bg,kM as bh,Y_ as bi,je as c,ps as d,ue as e,ms as f,Il as g,Gb as h,Np as i,g as j,Yb as k,_p as l,li as m,dp as n,nj as o,Hl as p,sM as q,v as r,ej as s,Kw as t,as as u,Yw as v,wk as w,WM as x,zh as y,Wn as z};
468
+ `):null;return{type:R.includes("/edit")?"proposals-edit":"proposals-view",content:G,displayId:D,contextFiles:J}}return{type:"proposals",content:l,contextFiles:"project.md"}}return R.includes("/context")?R.includes("/architecture")?{type:"context-architecture",content:c,contextFiles:"architecture.md"}:R.includes("/project")?{type:"context-project",content:l,contextFiles:"project.md"}:R.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:R.includes("/settings")?R.includes("/agents")?{type:"settings-agents",content:null}:R.includes("/integrations")?{type:"settings-integrations",content:null}:R.includes("/prompts")?{type:"settings-prompts",content:null}:R.includes("/rules")?{type:"settings-rules",content:null}:R.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:R.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return g.jsx(CS,{children:g.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[g.jsx(RP,{}),g.jsxs(TS,{className:ue("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[g.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[g.jsx(AS,{className:"-ml-1"}),g.jsxs("div",{className:"flex items-center justify-between flex-1",children:[g.jsx("h1",{className:"text-lg font-semibold",children:d||"Coconut"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(vt,{onClick:j,size:"icon",className:"h-8 w-8 rounded-full",children:g.jsx(dp,{className:"h-4 w-4"})}),L&&N&&g.jsxs(JB,{children:[g.jsx(eU,{asChild:!0,children:g.jsx(vt,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:g.jsx(xj,{className:"h-4 w-4"})})}),g.jsxs(w2,{align:"end",children:[g.jsx(E2,{children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:N.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:N.email})]})}),g.jsx(C2,{}),g.jsxs(S2,{onClick:H,children:[g.jsx(OM,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),g.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:g.jsx(nw,{})})]}),g.jsx(M8,{isOpen:e,onToggle:j,contextInfo:$(),discussDocument:m,onDiscussDocumentHandled:()=>y(null),pendingPrompt:w,onPendingPromptHandled:()=>b(null),openInFullScreen:S,onFullScreenHandled:()=>E(!1)})]})})}const oU=[{title:"Coconut Profile",href:"/settings/user",icon:mj,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:aj,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:nj,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:MM,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:uc,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:GM,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:Xw,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:UM,description:"Model Context Protocol configuration and settings"}];function lU(){const e=Wn();return g.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[g.jsx("aside",{className:"lg:w-1/5",children:g.jsx("nav",{className:"flex overflow-x-auto pb-2 gap-1 lg:flex-col lg:gap-0 lg:space-y-1 lg:overflow-visible lg:pb-0",children:oU.map(n=>g.jsxs(Sr,{to:n.href,className:ue("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-2 sm:px-3 lg:px-4 py-2 hover:bg-accent justify-start flex-shrink-0",e.pathname===n.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[g.jsx(n.icon,{className:"h-4 w-4 lg:mr-2"}),g.jsx("span",{className:"hidden lg:inline",children:n.title})]},n.href))})}),g.jsx("div",{className:"flex-1 lg:max-w-2xl",children:g.jsx("div",{className:"space-y-6",children:g.jsx(nw,{})})})]})}const sU=v.lazy(()=>Ie(()=>import("./DashboardPage-D5C34QbO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),uU=v.lazy(()=>Ie(()=>import("./LoginPage-FUflG9B8.js"),__vite__mapDeps([18,3,1,19]))),cU=v.lazy(()=>Ie(()=>import("./CallbackPage-BMZOjCy_.js"),__vite__mapDeps([20,8,21]))),fU=v.lazy(()=>Ie(()=>import("./ProposalsPage-DaR_KuZx.js"),__vite__mapDeps([22,1,2,17,10]))),dU=v.lazy(()=>Ie(()=>import("./ProposalDetailPage-mZ9qj0wJ.js"),__vite__mapDeps([23,24,1,2,3,25,26,27,12,15]))),hU=v.lazy(()=>Ie(()=>import("./ProposalEditPage-DqJ3Po23.js"),__vite__mapDeps([28,3,1,29,30,31,32,17,33,2,25])).then(e=>({default:e.ProposalEditPage}))),pU=v.lazy(()=>Ie(()=>import("./NewProposalPage-BDbStKts.js"),__vite__mapDeps([34,1,3,29,30,31,32,17,33,2,25])).then(e=>({default:e.NewProposalPage}))),mU=v.lazy(()=>Ie(()=>import("./TerminalPage-BL8pa_9k.js"),__vite__mapDeps([35,1,4,5,6,7,36,37,14,38,39]))),gU=v.lazy(()=>Ie(()=>import("./TerminalSessionPage-DcC_o_sA.js"),__vite__mapDeps([40,1,2,41,31,3,4,6,7,42,43,36,14,17,11,39]))),yU=v.lazy(()=>Ie(()=>import("./UtilitiesPage-6BGeolw9.js"),__vite__mapDeps([44,1,4,38,14]))),vU=v.lazy(()=>Ie(()=>import("./CodePage-CCNmmkv_.js"),__vite__mapDeps([45,1,2,4,5,6,7,43,36,37,14]))),xU=v.lazy(()=>Ie(()=>import("./AgentsPage-9Hre8AD1.js"),__vite__mapDeps([46,1,2,24,47,48,10,17,49]))),bU=v.lazy(()=>Ie(()=>import("./AgentDetailPage-DtGFrHzZ.js"),__vite__mapDeps([50,1,2,25]))),wU=v.lazy(()=>Ie(()=>import("./NewAgentPage-CqBlVqdy.js"),__vite__mapDeps([51,1,3,2,24,25,26]))),SU=v.lazy(()=>Ie(()=>import("./AgentEditPage-1026aJox.js"),__vite__mapDeps([52,1,3,2,24,25,26]))),EU=v.lazy(()=>Ie(()=>import("./ResourcesPage-WMPlFn0S.js"),__vite__mapDeps([53,1,3,2,24,48,27,9,12,49,17,10]))),CU=v.lazy(()=>Ie(()=>import("./KnowledgePage-DS7xi1qJ.js"),__vite__mapDeps([54,1,2,24,47,48,10,17,55,42]))),kU=v.lazy(()=>Ie(()=>import("./KnowledgeDetailPage-C-a0njhy.js"),__vite__mapDeps([56,1,2,24,25,12,49]))),AU=v.lazy(()=>Ie(()=>import("./KnowledgeEditPage-B93ffsgz.js"),__vite__mapDeps([57,1,3,29,30,33,2,58,17,25]))),TU=v.lazy(()=>Ie(()=>import("./NewKnowledgePage-ue0ZRgKf.js"),__vite__mapDeps([59,1,3,29,30,33,2,58,17,25]))),RU=v.lazy(()=>Ie(()=>import("./ProjectPage-DAlEu9Af.js"),__vite__mapDeps([60,1,2,24]))),NU=v.lazy(()=>Ie(()=>import("./ProjectEditPage-_a9hJTgi.js"),__vite__mapDeps([61,1,3,29,30,25,16]))),_U=v.lazy(()=>Ie(()=>import("./ArchitecturePage-FcRJGw8O.js"),__vite__mapDeps([62,1,24]))),MU=v.lazy(()=>Ie(()=>import("./ArchitectureEditPage-DiRR28Rx.js"),__vite__mapDeps([63,1,3,29,30,25,16]))),jU=v.lazy(()=>Ie(()=>import("./RolePage-4aL0vR7F.js"),__vite__mapDeps([64,1,24]))),DU=v.lazy(()=>Ie(()=>import("./RoleEditPage-DIoamJfW.js"),__vite__mapDeps([65,1,29,30,25,16]))),OU=v.lazy(()=>Ie(()=>import("./IdentityPage-Dj-Do8q7.js"),__vite__mapDeps([66,1,3,2,67,19,11,68,17,26]))),q0=v.lazy(()=>Ie(()=>import("./UserSettingsPage-CqibuEiq.js"),__vite__mapDeps([69,1,3,26]))),PU=v.lazy(()=>Ie(()=>import("./AuthSettingsPage-D528tGhc.js"),__vite__mapDeps([70,1,3,71,2,72]))),LU=v.lazy(()=>Ie(()=>import("./ApiKeysSettingsPage-D-l8q30N.js"),__vite__mapDeps([73,1,3,2,67,17,72]))),zU=v.lazy(()=>Ie(()=>import("./AgentsSettingsPage-CILCHaO9.js"),__vite__mapDeps([74,1,3,2,17,75,14,11]))),IU=v.lazy(()=>Ie(()=>import("./IntegrationsSettingsPage-DTT6nX3v.js"),__vite__mapDeps([76,1,3]))),BU=v.lazy(()=>Ie(()=>import("./GitSettingsPage-Cld_sN5t.js"),__vite__mapDeps([77,1,3,41,36,8,21]))),UU=v.lazy(()=>Ie(()=>import("./McpSettingsPage-A6uws8gQ.js"),__vite__mapDeps([78,1,3,2,71,67,47,48,10,72,17,16]))),HU=v.lazy(()=>Ie(()=>import("./PromptsSettingsPage-4_C5zvq6.js"),__vite__mapDeps([79,1,3,2,17,68,27]))),FU=v.lazy(()=>Ie(()=>import("./RulesSettingsPage-CerRq_kE.js"),__vite__mapDeps([80,1,3,2,17]))),VU=v.lazy(()=>Ie(()=>import("./GitPage-ofZrdSSl.js"),__vite__mapDeps([81,1,3,19,8,21,42,55,36,72,13]))),qU=v.lazy(()=>Ie(()=>import("./SchedulePage-DF9TqOA6.js"),__vite__mapDeps([82,1,2,3,71,19,36,17,14,75,15]))),$U=v.lazy(()=>Ie(()=>import("./JobDetailPage-CWexORzH.js"),__vite__mapDeps([83,24,1,2,25,14,26,36,75,15,12]))),GU=v.lazy(()=>Ie(()=>import("./UserPreferencesPage-DoMyvwD4.js"),__vite__mapDeps([84,1,3]))),YU=v.lazy(()=>Ie(()=>import("./ActivityPage-AWTVFLmK.js"),__vite__mapDeps([85,1,2,36])));function KU(){return g.jsxs(GN,{children:[g.jsx(iN,{children:g.jsx(v.Suspense,{fallback:g.jsx(sD,{}),children:g.jsxs(PR,{children:[g.jsx(Oe,{path:"/login",element:g.jsx(uU,{})}),g.jsx(Oe,{path:"/auth/github/callback",element:g.jsx(cU,{})}),g.jsxs(Oe,{path:"/",element:g.jsx(lD,{children:g.jsx(iU,{})}),children:[g.jsx(Oe,{index:!0,element:g.jsx(sU,{})}),g.jsx(Oe,{path:"proposals",element:g.jsx(fU,{})}),g.jsx(Oe,{path:"proposals/new",element:g.jsx(pU,{})}),g.jsx(Oe,{path:"proposals/:id",element:g.jsx(dU,{})}),g.jsx(Oe,{path:"proposals/:id/edit",element:g.jsx(hU,{})}),g.jsx(Oe,{path:"code",element:g.jsx(vU,{})}),g.jsx(Oe,{path:"utilities",element:g.jsx(yU,{})}),g.jsx(Oe,{path:"terminal",element:g.jsx(mU,{})}),g.jsx(Oe,{path:"terminal/:proposalId",element:g.jsx(gU,{})}),g.jsx(Oe,{path:"git",element:g.jsx(VU,{})}),g.jsx(Oe,{path:"schedule",element:g.jsx(qU,{})}),g.jsx(Oe,{path:"schedule/:id",element:g.jsx($U,{})}),g.jsx(Oe,{path:"identity",element:g.jsx(OU,{})}),g.jsx(Oe,{path:"agents",element:g.jsx(xU,{})}),g.jsx(Oe,{path:"agents/new",element:g.jsx(wU,{})}),g.jsx(Oe,{path:"agents/:id",element:g.jsx(bU,{})}),g.jsx(Oe,{path:"agents/:id/edit",element:g.jsx(SU,{})}),g.jsx(Oe,{path:"activity",element:g.jsx(YU,{})}),g.jsx(Oe,{path:"resources",element:g.jsx(EU,{})}),g.jsx(Oe,{path:"context/project",element:g.jsx(RU,{})}),g.jsx(Oe,{path:"context/project/edit",element:g.jsx(NU,{})}),g.jsx(Oe,{path:"context/architecture",element:g.jsx(_U,{})}),g.jsx(Oe,{path:"context/architecture/edit",element:g.jsx(MU,{})}),g.jsx(Oe,{path:"context/role",element:g.jsx(jU,{})}),g.jsx(Oe,{path:"context/role/edit",element:g.jsx(DU,{})}),g.jsx(Oe,{path:"context/knowledge",element:g.jsx(CU,{})}),g.jsx(Oe,{path:"context/knowledge/new",element:g.jsx(TU,{})}),g.jsx(Oe,{path:"context/knowledge/:filename",element:g.jsx(kU,{})}),g.jsx(Oe,{path:"context/knowledge/:filename/edit",element:g.jsx(AU,{})}),g.jsxs(Oe,{path:"settings",element:g.jsx(lU,{}),children:[g.jsx(Oe,{index:!0,element:g.jsx(q0,{})}),g.jsx(Oe,{path:"user",element:g.jsx(q0,{})}),g.jsx(Oe,{path:"preferences",element:g.jsx(GU,{})}),g.jsx(Oe,{path:"authentication",element:g.jsx(PU,{})}),g.jsx(Oe,{path:"api-keys",element:g.jsx(LU,{})}),g.jsx(Oe,{path:"agents",element:g.jsx(zU,{})}),g.jsx(Oe,{path:"integrations",element:g.jsx(IU,{})}),g.jsx(Oe,{path:"git",element:g.jsx(BU,{})}),g.jsx(Oe,{path:"mcp",element:g.jsx(UU,{})}),g.jsx(Oe,{path:"prompts",element:g.jsx(HU,{})}),g.jsx(Oe,{path:"rules",element:g.jsx(FU,{})})]})]})]})})}),g.jsx(oD,{})]})}UT.createRoot(document.getElementById("root")).render(g.jsx(v.StrictMode,{children:g.jsx(KU,{})}));export{XC as $,Et as A,vt as B,nM as C,Zc as D,pM as E,uc as F,Xw as G,yw as H,d1 as I,cc as J,iH as K,Sr as L,IM as M,lp as N,QU as O,aM as P,XU as Q,lj as R,Jl as S,fj as T,W9 as U,J9 as V,hj as W,so as X,$C as Y,GC as Z,KC as _,ZN as a,OL as a$,YC as a0,ZC as a1,QC as a2,xs as a3,xj as a4,aH as a5,gE as a6,m1 as a7,KM as a8,iD as a9,B9 as aA,N9 as aB,wM as aC,tf as aD,Cc as aE,uH as aF,sH as aG,Hm as aH,Ym as aI,Pm as aJ,zp as aK,z5 as aL,xL as aM,oH as aN,lL as aO,EL as aP,dL as aQ,SL as aR,Mp as aS,Lm as aT,CE as aU,Zl as aV,u6 as aW,Z3 as aX,$5 as aY,WE as aZ,lH as a_,JB as aa,eU as ab,w2 as ac,E2 as ad,C2 as ae,S2 as af,JU as ag,oc as ah,WM as ai,rU as aj,wj as ak,qN as al,Oc as am,cM as an,_a as ao,Jn as ap,_c as aq,me as ar,_e as as,ze as at,Yc as au,Ep as av,aS as aw,MS as ax,xb as ay,g6 as az,ds as b,Uh as b0,Aa as b1,rn as b2,_0 as b3,ZU as b4,UM as b5,eo as b6,MM as b7,Dc as b8,kr as b9,Ek as ba,F8 as bb,V8 as bc,un as bd,oM as be,b8 as bf,WU as bg,W_ as bh,kM as bi,Y_ as bj,je as c,hs as d,ue as e,ps as f,zl as g,Gb as h,Np as i,g as j,Yb as k,_p as l,li as m,dp as n,nj as o,Ul as p,sM as q,v as r,ej as s,Kw as t,rs as u,Yw as v,wk as w,zh as x,Q_ as y,Wn as z};