@decocms/mesh 1.0.9 → 1.0.11

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 (111) hide show
  1. package/dist/client/assets/{AlertCircle-100C6qle.js → AlertCircle-zCOLtXNG.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CwqPFuY_.js → ArrowLeft-b0UM4Vui.js} +1 -1
  3. package/dist/client/assets/{Calendar-DJbHipjT.js → Calendar-Cxw5FKll.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-Bcv0yv7v.js → CheckCircle-U8-nit8x.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CQZ630QJ.js → ChevronDown-BFYjmmoG.js} +1 -1
  6. package/dist/client/assets/{Clock-DZbPsJyA.js → Clock-qZko4uak.js} +1 -1
  7. package/dist/client/assets/{Copy01-C3tbrRU5.js → Copy01-XN5V21c6.js} +1 -1
  8. package/dist/client/assets/{CpuChip02-eOcghqj5.js → CpuChip02-Nhk4zHXl.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-CZAuxCS9.js → DotsVertical-CcNQsTaW.js} +1 -1
  10. package/dist/client/assets/{File06-DVtVQX2W.js → File06-DB55FK-Z.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-B4cjyr__.js → GitBranch01-CM-ab6hS.js} +1 -1
  12. package/dist/client/assets/{Inbox01-azY3GERO.js → Inbox01-CIzt2AdR.js} +1 -1
  13. package/dist/client/assets/{InfoCircle-82xtHE2K.js → InfoCircle-ChxTTkMX.js} +1 -1
  14. package/dist/client/assets/{Key01-Bpa2nEg3.js → Key01-DYiMWoz_.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-C_0a4o__.js → LinkExternal01-CBZhTXC0.js} +1 -1
  16. package/dist/client/assets/{Loading01-CpOGYhvb.js → Loading01-Dtm2TLlA.js} +1 -1
  17. package/dist/client/assets/{Plus-DFHWilTh.js → Plus-DF_I5mml.js} +1 -1
  18. package/dist/client/assets/{SearchMd-CuszgCqb.js → SearchMd-C_ak4ze3.js} +1 -1
  19. package/dist/client/assets/{Terminal-BuJufC24.js → Terminal-4DdepWh9.js} +1 -1
  20. package/dist/client/assets/{Trash01-avMTxTy7.js → Trash01-FYPMjpVf.js} +1 -1
  21. package/dist/client/assets/{Upload01-CvIAU3H3.js → Upload01-BYeEw9Vy.js} +1 -1
  22. package/dist/client/assets/{X-BScAvcL1.js → X-BTsWwO_U.js} +1 -1
  23. package/dist/client/assets/{XClose-gnBfeV0u.js → XClose-CY6vd_0A.js} +1 -1
  24. package/dist/client/assets/{alert-dialog-otNJ1cnE.js → alert-dialog-DhxQ40TA.js} +2 -2
  25. package/dist/client/assets/auth-CfgXQhXI.js +1 -0
  26. package/dist/client/assets/{auth-catchall-BlTDjkLY.js → auth-catchall-CohlC3Pb.js} +1 -1
  27. package/dist/client/assets/{avatar-Bv-3L9Zn.js → avatar-CcUZFpwU.js} +1 -1
  28. package/dist/client/assets/{badge-DXjKunmL.js → badge-CgUwfcKq.js} +1 -1
  29. package/dist/client/assets/{button-DP3Fjd19.js → button-DuitHSR8.js} +1 -1
  30. package/dist/client/assets/{card-DKgSSyjo.js → card-DkEpNms8.js} +1 -1
  31. package/dist/client/assets/{checkbox-Bq-RnKQ1.js → checkbox-DTaSeum9.js} +1 -1
  32. package/dist/client/assets/{collection-detail-BnGYzoyo.js → collection-detail-Dvc6iyHF.js} +1 -1
  33. package/dist/client/assets/{collection-display-button-CM6lJjaN.js → collection-display-button-DgDdVSTg.js} +1 -1
  34. package/dist/client/assets/{collection-header-D42ZoG-6.js → collection-header-D-wXFMG4.js} +1 -1
  35. package/dist/client/assets/{collection-page-DYsl4ZS6.js → collection-page-AFIAghtr.js} +1 -1
  36. package/dist/client/assets/{collection-search-BQ-WB0Rj.js → collection-search-OoKPetka.js} +1 -1
  37. package/dist/client/assets/{collection-table-wrapper-Cbxid7c7.js → collection-table-wrapper-DEVlTpj8.js} +1 -1
  38. package/dist/client/assets/{connection-card-c58EGX4x.js → connection-card-CVX6Dj6b.js} +1 -1
  39. package/dist/client/assets/{connection-detail-DC_zKkGB.js → connection-detail-C_uPOJ6z.js} +1 -1
  40. package/dist/client/assets/{connections-DmpFPSpw.js → connections-DoAE9QhX.js} +1 -1
  41. package/dist/client/assets/{core-Bv5-AwrC.js → core-BMfBj0bw.js} +1 -1
  42. package/dist/client/assets/{create-organization-dialog-Cn0ZXv5F.js → create-organization-dialog-C_xVF_Jl.js} +1 -1
  43. package/dist/client/assets/{dialog-D5C6QiJE.js → dialog-Dl9CupEb.js} +1 -1
  44. package/dist/client/assets/{dropdown-menu-CjKpHxz2.js → dropdown-menu-CPQpNQmn.js} +1 -1
  45. package/dist/client/assets/env-vars-editor-BcyBU5xA.js +1 -0
  46. package/dist/client/assets/{error-boundary-DjqBPLyv.js → error-boundary-DMJQCmxn.js} +1 -1
  47. package/dist/client/assets/extract-connection-data-Bt1_1dQ8.js +1 -0
  48. package/dist/client/assets/{form-Dv8d8uAG.js → form-BfiwCHdz.js} +1 -1
  49. package/dist/client/assets/{formatDistanceToNow-QA-1KB4j.js → formatDistanceToNow-BmkU67cZ.js} +1 -1
  50. package/dist/client/assets/{gateway-detail-CEHicKUV.js → gateway-detail-ZknLelfM.js} +1 -1
  51. package/dist/client/assets/{gateways-DoXPnx0h.js → gateways-BAQA-e5y.js} +1 -1
  52. package/dist/client/assets/{home-pjEjaP5o.js → home-BzOK0WeX.js} +1 -1
  53. package/dist/client/assets/index-CCNaUj2A.js +156 -0
  54. package/dist/client/assets/{index-BDa_PRJi.js → index-DR-B7Y1Z.js} +1 -1
  55. package/dist/client/assets/{index-BVs1FX4U.js → index-T7OaHK12.js} +1 -1
  56. package/dist/client/assets/{index-qYBN_4Xo.js → index-be58e1VX.js} +3 -3
  57. package/dist/client/assets/{input-v6ODzgkG.js → input-YU6lpVgW.js} +1 -1
  58. package/dist/client/assets/json-BnmF_c7J.js +1 -0
  59. package/dist/client/assets/{json-syntax-highlighter-broWV870.js → json-syntax-highlighter-Dve1WRV4.js} +2 -2
  60. package/dist/client/assets/{layout-DARzNM_G.js → layout-n40g10Oh.js} +1 -1
  61. package/dist/client/assets/{lazy-highlighter-K2PzkRQc.js → lazy-highlighter-BY_mRZdt.js} +1 -1
  62. package/dist/client/assets/{localstorage-keys-ZIwm4Lc6.js → localstorage-keys-BphvZ-YX.js} +1 -1
  63. package/dist/client/assets/{login-BP1nMiPU.js → login-CJi6KFGq.js} +1 -1
  64. package/dist/client/assets/mcp-oauth-CvO1Z13d.js +1 -0
  65. package/dist/client/assets/{members-CMW2_o9N.js → members-UHyk3Nn4.js} +1 -1
  66. package/dist/client/assets/{monitoring-BcSjVFrb.js → monitoring-65mgE8O0.js} +1 -1
  67. package/dist/client/assets/{oauth-callback-DLDcCDZ7.js → oauth-callback-KqixmXKf.js} +1 -1
  68. package/dist/client/assets/{page-C1ZOKmwf.js → page-DmmG4y1n.js} +1 -1
  69. package/dist/client/assets/{popover-semXA6yo.js → popover-PTQF8Dbg.js} +1 -1
  70. package/dist/client/assets/prism-light-0RxCg8xt.js +1 -0
  71. package/dist/client/assets/{resizable-YWlggRLW.js → resizable-BF9gWgPg.js} +45 -47
  72. package/dist/client/assets/{resource-tabs-ChQvNf5W.js → resource-tabs-Dx5v9tHv.js} +1 -1
  73. package/dist/client/assets/{select-KWMArkl_.js → select-C4QWjnSz.js} +1 -1
  74. package/dist/client/assets/{settings-9DHfPDgm.js → settings-UndPSfwX.js} +1 -1
  75. package/dist/client/assets/{shell-layout-BY64qJt8.js → shell-layout-BLjMALRt.js} +1 -1
  76. package/dist/client/assets/{spinner-C2yBMiMG.js → spinner-CNb2mD_9.js} +1 -1
  77. package/dist/client/assets/{store-BwXm_Abw.js → store-CGyOcqhE.js} +1 -1
  78. package/dist/client/assets/{store-app-detail-DJ15hlvl.js → store-app-detail-BQ4UUaoG.js} +1 -1
  79. package/dist/client/assets/{switch-B-fBwCox.js → switch-BmVnuO_C.js} +1 -1
  80. package/dist/client/assets/{tools-list-DCXlrPCh.js → tools-list-BV-qlQqF.js} +1 -1
  81. package/dist/client/assets/{tooltip-DQ1jCLZj.js → tooltip-CqCXb38Z.js} +1 -1
  82. package/dist/client/assets/{types-bhDznoEx.js → types-Bm46njUN.js} +1 -1
  83. package/dist/client/assets/use-binding-DdwsXkNS.js +34 -0
  84. package/dist/client/assets/{use-connection-DQ204Coq.js → use-connection-BbvAiBvg.js} +1 -1
  85. package/dist/client/assets/{use-connection-resources-DR9t53Nb.js → use-connection-resources-D-1-SK-8.js} +1 -1
  86. package/dist/client/assets/{use-gateway-B2ZAQHo8.js → use-gateway-L1UQyU7-.js} +1 -1
  87. package/dist/client/assets/{use-list-state-DDpMfXlk.js → use-list-state-DVYCFUpb.js} +1 -1
  88. package/dist/client/assets/{use-mcp-fwyaX6l-.js → use-mcp-CWOlOW9q.js} +1 -1
  89. package/dist/client/assets/{use-members-DLmZgkLm.js → use-members-Dyh_-7GU.js} +1 -1
  90. package/dist/client/assets/{use-mobile-DLMOdcji.js → use-mobile-B0xRFGhT.js} +1 -1
  91. package/dist/client/assets/{use-organization-settings-C703l8NH.js → use-organization-settings-fWTyw7VB.js} +1 -1
  92. package/dist/client/assets/{use-tool-call-yMB7Rz-9.js → use-tool-call-CVPTtLoG.js} +1 -1
  93. package/dist/client/assets/useQuery-C4GPpw7d.js +1 -0
  94. package/dist/client/assets/utils-o1atviYh.js +1 -0
  95. package/dist/client/assets/{view-mode-toggle-D84JG7fQ.js → view-mode-toggle-DOtHoBLN.js} +1 -1
  96. package/dist/client/assets/{well-known-mcp-EWW8l3ev.js → well-known-mcp-d1wcdFCF.js} +1 -1
  97. package/dist/client/index.html +1 -1
  98. package/dist/server/cli.js +188 -216
  99. package/dist/server/migrate.js +141 -168
  100. package/dist/server/server.js +185 -213
  101. package/package.json +3 -4
  102. package/dist/client/assets/auth-Bt50jbKj.js +0 -26
  103. package/dist/client/assets/env-vars-editor-UiPLX9CZ.js +0 -1
  104. package/dist/client/assets/extract-connection-data-DTb8mOyN.js +0 -1
  105. package/dist/client/assets/index-BlDToaIG.js +0 -118
  106. package/dist/client/assets/json-CQDWLCNA.js +0 -1
  107. package/dist/client/assets/mcp-oauth-C6-fAUQ-.js +0 -1
  108. package/dist/client/assets/prism-light-BXZet5oM.js +0 -1
  109. package/dist/client/assets/use-binding-C5ZbAAxe.js +0 -38
  110. package/dist/client/assets/useQuery-CvfuVd3B.js +0 -1
  111. package/dist/client/assets/utils-3t85Hz8W.js +0 -1
@@ -1,118 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-BP1nMiPU.js","assets/button-DP3Fjd19.js","assets/utils-3t85Hz8W.js","assets/input-v6ODzgkG.js","assets/shell-layout-BY64qJt8.js","assets/SearchMd-CuszgCqb.js","assets/use-connection-DQ204Coq.js","assets/tooltip-DQ1jCLZj.js","assets/localstorage-keys-ZIwm4Lc6.js","assets/useQuery-CvfuVd3B.js","assets/CpuChip02-eOcghqj5.js","assets/Loading01-CpOGYhvb.js","assets/Plus-DFHWilTh.js","assets/X-BScAvcL1.js","assets/resizable-YWlggRLW.js","assets/dropdown-menu-CjKpHxz2.js","assets/dialog-D5C6QiJE.js","assets/select-KWMArkl_.js","assets/ChevronDown-CQZ630QJ.js","assets/use-mobile-DLMOdcji.js","assets/use-gateway-B2ZAQHo8.js","assets/Copy01-C3tbrRU5.js","assets/AlertCircle-100C6qle.js","assets/Terminal-BuJufC24.js","assets/connection-card-c58EGX4x.js","assets/card-DKgSSyjo.js","assets/LinkExternal01-C_0a4o__.js","assets/spinner-C2yBMiMG.js","assets/File06-DVtVQX2W.js","assets/InfoCircle-82xtHE2K.js","assets/use-binding-C5ZbAAxe.js","assets/auth-Bt50jbKj.js","assets/popover-semXA6yo.js","assets/Clock-DZbPsJyA.js","assets/Trash01-avMTxTy7.js","assets/error-boundary-DjqBPLyv.js","assets/use-organization-settings-C703l8NH.js","assets/create-organization-dialog-Cn0ZXv5F.js","assets/alert-dialog-otNJ1cnE.js","assets/form-Dv8d8uAG.js","assets/avatar-Bv-3L9Zn.js","assets/home-pjEjaP5o.js","assets/page-C1ZOKmwf.js","assets/collection-header-D42ZoG-6.js","assets/collection-display-button-CM6lJjaN.js","assets/view-mode-toggle-D84JG7fQ.js","assets/collection-page-DYsl4ZS6.js","assets/use-tool-call-yMB7Rz-9.js","assets/GitBranch01-B4cjyr__.js","assets/types-bhDznoEx.js","assets/index-BDa_PRJi.js","assets/json-syntax-highlighter-broWV870.js","assets/badge-DXjKunmL.js","assets/page-BZV40eAE.css","assets/members-CMW2_o9N.js","assets/collection-search-BQ-WB0Rj.js","assets/collection-table-wrapper-Cbxid7c7.js","assets/switch-B-fBwCox.js","assets/checkbox-Bq-RnKQ1.js","assets/ArrowLeft-CwqPFuY_.js","assets/use-members-DLmZgkLm.js","assets/well-known-mcp-EWW8l3ev.js","assets/XClose-gnBfeV0u.js","assets/DotsVertical-CZAuxCS9.js","assets/Key01-Bpa2nEg3.js","assets/connections-DmpFPSpw.js","assets/use-list-state-DDpMfXlk.js","assets/env-vars-editor-UiPLX9CZ.js","assets/generate-id-Dyweu44Y.js","assets/settings-9DHfPDgm.js","assets/Upload01-CvIAU3H3.js","assets/monitoring-BcSjVFrb.js","assets/index-BVs1FX4U.js","assets/Calendar-DJbHipjT.js","assets/store-BwXm_Abw.js","assets/slugify-CEUa2lfQ.js","assets/Inbox01-azY3GERO.js","assets/registry-utils-ulDDT0d8.js","assets/app-name-gTETL9So.js","assets/store-app-detail-DJ15hlvl.js","assets/CheckCircle-Bcv0yv7v.js","assets/tools-list-DCXlrPCh.js","assets/layout-DARzNM_G.js","assets/tools-list-CSRUKxnt.css","assets/resource-tabs-ChQvNf5W.js","assets/use-mcp-fwyaX6l-.js","assets/extract-connection-data-DTb8mOyN.js","assets/connection-detail-DC_zKkGB.js","assets/index-qYBN_4Xo.js","assets/mcp-oauth-C6-fAUQ-.js","assets/formatDistanceToNow-QA-1KB4j.js","assets/use-connection-resources-DR9t53Nb.js","assets/collection-detail-BnGYzoyo.js","assets/gateways-DoXPnx0h.js","assets/gateway-detail-CEHicKUV.js","assets/oauth-callback-DLDcCDZ7.js"])))=>i.map(i=>d[i]);
2
- function uC(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(a,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();const dC="modulepreload",fC=function(e){return"/"+e},h_={},Ln=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");o=u(n.map(h=>{if(h=fC(h),h in h_)return;h_[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":dC,g||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),g)return new Promise((_,S)=>{y.addEventListener("load",_),y.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${h}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var uB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wp={exports:{}},zl={};var p_;function hC(){if(p_)return zl;p_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:l}}return zl.Fragment=t,zl.jsx=n,zl.jsxs=n,zl}var m_;function pC(){return m_||(m_=1,Wp.exports=hC()),Wp.exports}var b=pC(),Zp={exports:{}},Fl={},Qp={exports:{}},Xp={};var g_;function mC(){return g_||(g_=1,(function(e){function t(P,F){var $=P.length;P.push(F);e:for(;0<$;){var re=$-1>>>1,ve=P[re];if(0<o(ve,F))P[re]=F,P[$]=ve,$=re;else break e}}function n(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var F=P[0],$=P.pop();if($!==F){P[0]=$;e:for(var re=0,ve=P.length,k=ve>>>1;re<k;){var Q=2*(re+1)-1,ee=P[Q],oe=Q+1,pe=P[oe];if(0>o(ee,$))oe<ve&&0>o(pe,ee)?(P[re]=pe,P[oe]=$,re=oe):(P[re]=ee,P[Q]=$,re=Q);else if(oe<ve&&0>o(pe,$))P[re]=pe,P[oe]=$,re=oe;else break e}}return F}function o(P,F){var $=P.sortIndex-F.sortIndex;return $!==0?$:P.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],g=1,p=null,y=3,_=!1,S=!1,x=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(P){for(var F=n(h);F!==null;){if(F.callback===null)a(h);else if(F.startTime<=P)a(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function M(P){if(x=!1,O(P),!S)if(n(f)!==null)S=!0,L||(L=!0,W());else{var F=n(h);F!==null&&ie(M,F.startTime-P)}}var L=!1,N=-1,D=5,U=-1;function Z(){return T?!0:!(e.unstable_now()-U<D)}function G(){if(T=!1,L){var P=e.unstable_now();U=P;var F=!0;try{e:{S=!1,x&&(x=!1,A(N),N=-1),_=!0;var $=y;try{t:{for(O(P),p=n(f);p!==null&&!(p.expirationTime>P&&Z());){var re=p.callback;if(typeof re=="function"){p.callback=null,y=p.priorityLevel;var ve=re(p.expirationTime<=P);if(P=e.unstable_now(),typeof ve=="function"){p.callback=ve,O(P),F=!0;break t}p===n(f)&&a(f),O(P)}else a(f);p=n(f)}if(p!==null)F=!0;else{var k=n(h);k!==null&&ie(M,k.startTime-P),F=!1}}break e}finally{p=null,y=$,_=!1}F=void 0}}finally{F?W():L=!1}}}var W;if(typeof C=="function")W=function(){C(G)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,ne=j.port2;j.port1.onmessage=G,W=function(){ne.postMessage(null)}}else W=function(){R(G,0)};function ie(P,F){N=R(function(){P(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(P){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var $=y;y=F;try{return P()}finally{y=$}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(P,F){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var $=y;y=P;try{return F()}finally{y=$}},e.unstable_scheduleCallback=function(P,F,$){var re=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?re+$:re):$=re,P){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=$+ve,P={id:g++,callback:F,priorityLevel:P,startTime:$,expirationTime:ve,sortIndex:-1},$>re?(P.sortIndex=$,t(h,P),n(f)===null&&P===n(h)&&(x?(A(N),N=-1):x=!0,ie(M,$-re))):(P.sortIndex=ve,t(f,P),S||_||(S=!0,L||(L=!0,W()))),P},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(P){var F=y;return function(){var $=y;y=F;try{return P.apply(this,arguments)}finally{y=$}}}})(Xp)),Xp}var v_;function gC(){return v_||(v_=1,Qp.exports=mC()),Qp.exports}var Jp={exports:{}},Ge={};var y_;function vC(){if(y_)return Ge;y_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=y&&k[y]||k["@@iterator"],typeof k=="function"?k:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,T={};function R(k,Q,ee){this.props=k,this.context=Q,this.refs=T,this.updater=ee||S}R.prototype.isReactComponent={},R.prototype.setState=function(k,Q){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,Q,"setState")},R.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(k,Q,ee){this.props=k,this.context=Q,this.refs=T,this.updater=ee||S}var O=C.prototype=new A;O.constructor=C,x(O,R.prototype),O.isPureReactComponent=!0;var M=Array.isArray;function L(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function U(k,Q,ee){var oe=ee.ref;return{$$typeof:e,type:k,key:Q,ref:oe!==void 0?oe:null,props:ee}}function Z(k,Q){return U(k.type,Q,k.props)}function G(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function W(k){var Q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ee){return Q[ee]})}var j=/\/+/g;function ne(k,Q){return typeof k=="object"&&k!==null&&k.key!=null?W(""+k.key):Q.toString(36)}function ie(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(L,L):(k.status="pending",k.then(function(Q){k.status==="pending"&&(k.status="fulfilled",k.value=Q)},function(Q){k.status==="pending"&&(k.status="rejected",k.reason=Q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function P(k,Q,ee,oe,pe){var be=typeof k;(be==="undefined"||be==="boolean")&&(k=null);var ye=!1;if(k===null)ye=!0;else switch(be){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(k.$$typeof){case e:case t:ye=!0;break;case g:return ye=k._init,P(ye(k._payload),Q,ee,oe,pe)}}if(ye)return pe=pe(k),ye=oe===""?"."+ne(k,0):oe,M(pe)?(ee="",ye!=null&&(ee=ye.replace(j,"$&/")+"/"),P(pe,Q,ee,"",function(ke){return ke})):pe!=null&&(G(pe)&&(pe=Z(pe,ee+(pe.key==null||k&&k.key===pe.key?"":(""+pe.key).replace(j,"$&/")+"/")+ye)),Q.push(pe)),1;ye=0;var Se=oe===""?".":oe+":";if(M(k))for(var Pe=0;Pe<k.length;Pe++)oe=k[Pe],be=Se+ne(oe,Pe),ye+=P(oe,Q,ee,be,pe);else if(Pe=_(k),typeof Pe=="function")for(k=Pe.call(k),Pe=0;!(oe=k.next()).done;)oe=oe.value,be=Se+ne(oe,Pe++),ye+=P(oe,Q,ee,be,pe);else if(be==="object"){if(typeof k.then=="function")return P(ie(k),Q,ee,oe,pe);throw Q=String(k),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ye}function F(k,Q,ee){if(k==null)return k;var oe=[],pe=0;return P(k,oe,"","",function(be){return Q.call(ee,be,pe++)}),oe}function $(k){if(k._status===-1){var Q=k._result;Q=Q(),Q.then(function(ee){(k._status===0||k._status===-1)&&(k._status=1,k._result=ee)},function(ee){(k._status===0||k._status===-1)&&(k._status=2,k._result=ee)}),k._status===-1&&(k._status=0,k._result=Q)}if(k._status===1)return k._result.default;throw k._result}var re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},ve={map:F,forEach:function(k,Q,ee){F(k,function(){Q.apply(this,arguments)},ee)},count:function(k){var Q=0;return F(k,function(){Q++}),Q},toArray:function(k){return F(k,function(Q){return Q})||[]},only:function(k){if(!G(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Ge.Activity=p,Ge.Children=ve,Ge.Component=R,Ge.Fragment=n,Ge.Profiler=o,Ge.PureComponent=C,Ge.StrictMode=a,Ge.Suspense=f,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(k){return N.H.useMemoCache(k)}},Ge.cache=function(k){return function(){return k.apply(null,arguments)}},Ge.cacheSignal=function(){return null},Ge.cloneElement=function(k,Q,ee){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var oe=x({},k.props),pe=k.key;if(Q!=null)for(be in Q.key!==void 0&&(pe=""+Q.key),Q)!D.call(Q,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&Q.ref===void 0||(oe[be]=Q[be]);var be=arguments.length-2;if(be===1)oe.children=ee;else if(1<be){for(var ye=Array(be),Se=0;Se<be;Se++)ye[Se]=arguments[Se+2];oe.children=ye}return U(k.type,pe,oe)},Ge.createContext=function(k){return k={$$typeof:u,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:l,_context:k},k},Ge.createElement=function(k,Q,ee){var oe,pe={},be=null;if(Q!=null)for(oe in Q.key!==void 0&&(be=""+Q.key),Q)D.call(Q,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(pe[oe]=Q[oe]);var ye=arguments.length-2;if(ye===1)pe.children=ee;else if(1<ye){for(var Se=Array(ye),Pe=0;Pe<ye;Pe++)Se[Pe]=arguments[Pe+2];pe.children=Se}if(k&&k.defaultProps)for(oe in ye=k.defaultProps,ye)pe[oe]===void 0&&(pe[oe]=ye[oe]);return U(k,be,pe)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(k){return{$$typeof:d,render:k}},Ge.isValidElement=G,Ge.lazy=function(k){return{$$typeof:g,_payload:{_status:-1,_result:k},_init:$}},Ge.memo=function(k,Q){return{$$typeof:h,type:k,compare:Q===void 0?null:Q}},Ge.startTransition=function(k){var Q=N.T,ee={};N.T=ee;try{var oe=k(),pe=N.S;pe!==null&&pe(ee,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(L,re)}catch(be){re(be)}finally{Q!==null&&ee.types!==null&&(Q.types=ee.types),N.T=Q}},Ge.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ge.use=function(k){return N.H.use(k)},Ge.useActionState=function(k,Q,ee){return N.H.useActionState(k,Q,ee)},Ge.useCallback=function(k,Q){return N.H.useCallback(k,Q)},Ge.useContext=function(k){return N.H.useContext(k)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(k,Q){return N.H.useDeferredValue(k,Q)},Ge.useEffect=function(k,Q){return N.H.useEffect(k,Q)},Ge.useEffectEvent=function(k){return N.H.useEffectEvent(k)},Ge.useId=function(){return N.H.useId()},Ge.useImperativeHandle=function(k,Q,ee){return N.H.useImperativeHandle(k,Q,ee)},Ge.useInsertionEffect=function(k,Q){return N.H.useInsertionEffect(k,Q)},Ge.useLayoutEffect=function(k,Q){return N.H.useLayoutEffect(k,Q)},Ge.useMemo=function(k,Q){return N.H.useMemo(k,Q)},Ge.useOptimistic=function(k,Q){return N.H.useOptimistic(k,Q)},Ge.useReducer=function(k,Q,ee){return N.H.useReducer(k,Q,ee)},Ge.useRef=function(k){return N.H.useRef(k)},Ge.useState=function(k){return N.H.useState(k)},Ge.useSyncExternalStore=function(k,Q,ee){return N.H.useSyncExternalStore(k,Q,ee)},Ge.useTransition=function(){return N.H.useTransition()},Ge.version="19.2.3",Ge}var b_;function Vi(){return b_||(b_=1,Jp.exports=vC()),Jp.exports}var em={exports:{}},Nn={};var __;function yC(){if(__)return Nn;__=1;var e=Vi();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(f,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:f,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Nn.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,g)},Nn.flushSync=function(f){var h=u.T,g=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=g,a.d.f()}},Nn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},Nn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},Nn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:_}):g==="script"&&a.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Nn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},Nn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin);a.d.L(f,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Nn.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},Nn.requestFormReset=function(f){a.d.r(f)},Nn.unstable_batchedUpdates=function(f,h){return f(h)},Nn.useFormState=function(f,h,g){return u.H.useFormState(f,h,g)},Nn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Nn.version="19.2.3",Nn}var E_;function cx(){if(E_)return em.exports;E_=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(t){console.error(t)}}return e(),em.exports=yC(),em.exports}var S_;function bC(){if(S_)return Fl;S_=1;var e=gC(),t=Vi(),n=cx();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s:null}function u(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,c=i;;){var m=s.return;if(m===null)break;var v=m.alternate;if(v===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===s)return f(m),r;if(v===c)return f(m),i;v=v.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=v;else{for(var w=!1,I=m.child;I;){if(I===s){w=!0,s=m,c=v;break}if(I===c){w=!0,c=m,s=v;break}I=I.sibling}if(!w){for(I=v.child;I;){if(I===s){w=!0,s=v,c=m;break}if(I===c){w=!0,c=v,s=m;break}I=I.sibling}if(!w)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function W(r){return r===null||typeof r!="object"?null:(r=G&&r[G]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function ne(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===j?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case x:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case M:return"Suspense";case L:return"SuspenseList";case U:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case O:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case N:return i=r.displayName||null,i!==null?i:ne(r.type)||"Memo";case D:i=r._payload,r=r._init;try{return ne(r(i))}catch{}}return null}var ie=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},re=[],ve=-1;function k(r){return{current:r}}function Q(r){0>ve||(r.current=re[ve],re[ve]=null,ve--)}function ee(r,i){ve++,re[ve]=r.current,r.current=i}var oe=k(null),pe=k(null),be=k(null),ye=k(null);function Se(r,i){switch(ee(be,i),ee(pe,r),ee(oe,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?kb(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=kb(i),r=jb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(oe),ee(oe,r)}function Pe(){Q(oe),Q(pe),Q(be)}function ke(r){r.memoizedState!==null&&ee(ye,r);var i=oe.current,s=jb(i,r.type);i!==s&&(ee(pe,r),ee(oe,s))}function Ee(r){pe.current===r&&(Q(oe),Q(pe)),ye.current===r&&(Q(ye),kl._currentValue=$)}var ze,Pt;function ge(r){if(ze===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);ze=i&&i[1]||"",Pt=-1<s.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+ze+r+Pt}var me=!1;function Re(r,i){if(!r||me)return"";me=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var te=ae}Reflect.construct(r,[],ue)}else{try{ue.call()}catch(ae){te=ae}r.call(ue.prototype)}}else{try{throw Error()}catch(ae){te=ae}(ue=r())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),w=v[0],I=v[1];if(w&&I){var z=w.split(`
5
- `),J=I.split(`
6
- `);for(m=c=0;c<z.length&&!z[c].includes("DetermineComponentFrameRoot");)c++;for(;m<J.length&&!J[m].includes("DetermineComponentFrameRoot");)m++;if(c===z.length||m===J.length)for(c=z.length-1,m=J.length-1;1<=c&&0<=m&&z[c]!==J[m];)m--;for(;1<=c&&0<=m;c--,m--)if(z[c]!==J[m]){if(c!==1||m!==1)do if(c--,m--,0>m||z[c]!==J[m]){var se=`
7
- `+z[c].replace(" at new "," at ");return r.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",r.displayName)),se}while(1<=c&&0<=m);break}}}finally{me=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?ge(s):""}function Ue(r,i){switch(r.tag){case 26:case 27:case 5:return ge(r.type);case 16:return ge("Lazy");case 13:return r.child!==i&&i!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return Re(r.type,!1);case 11:return Re(r.type.render,!1);case 1:return Re(r.type,!0);case 31:return ge("Activity");default:return""}}function it(r){try{var i="",s=null;do i+=Ue(r,s),s=r,r=r.return;while(r);return i}catch(c){return`
8
- Error generating stack: `+c.message+`
9
- `+c.stack}}var Fe=Object.prototype.hasOwnProperty,tt=e.unstable_scheduleCallback,B=e.unstable_cancelCallback,q=e.unstable_shouldYield,Y=e.unstable_requestPaint,ce=e.unstable_now,he=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,we=e.unstable_UserBlockingPriority,He=e.unstable_NormalPriority,nt=e.unstable_LowPriority,Tt=e.unstable_IdlePriority,nr=e.log,It=e.unstable_setDisableYieldValue,Kt=null,Mt=null;function sn(r){if(typeof nr=="function"&&It(r),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Kt,r)}catch{}}var Wt=Math.clz32?Math.clz32:Me,Xa=Math.log,Ra=Math.LN2;function Me(r){return r>>>=0,r===0?32:31-(Xa(r)/Ra|0)|0}var ot=256,dt=262144,Qe=4194304;function ft(r){var i=r&42;if(i!==0)return i;switch(r&-r){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:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ne(r,i,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,v=r.suspendedLanes,w=r.pingedLanes;r=r.warmLanes;var I=c&134217727;return I!==0?(c=I&~v,c!==0?m=ft(c):(w&=I,w!==0?m=ft(w):s||(s=I&~r,s!==0&&(m=ft(s))))):(I=c&~v,I!==0?m=ft(I):w!==0?m=ft(w):s||(s=c&~r,s!==0&&(m=ft(s)))),m===0?0:i!==0&&i!==m&&(i&v)===0&&(v=m&-m,s=i&-i,v>=s||v===32&&(s&4194048)!==0)?i:m}function Xe(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function At(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 St(){var r=Qe;return Qe<<=1,(Qe&62914560)===0&&(Qe=4194304),r}function Mn(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function ht(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Nt(r,i,s,c,m,v){var w=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var I=r.entanglements,z=r.expirationTimes,J=r.hiddenUpdates;for(s=w&~s;0<s;){var se=31-Wt(s),ue=1<<se;I[se]=0,z[se]=-1;var te=J[se];if(te!==null)for(J[se]=null,se=0;se<te.length;se++){var ae=te[se];ae!==null&&(ae.lane&=-536870913)}s&=~ue}c!==0&&_r(r,c,0),v!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=v&~(w&~i))}function _r(r,i,s){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-Wt(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function Sn(r,i){var s=r.entangledLanes|=i;for(r=r.entanglements;s;){var c=31-Wt(s),m=1<<c;m&i|r[c]&i&&(r[c]|=i),s&=~m}}function Fn(r,i){var s=i&-i;return s=(s&42)!==0?1:Lo(s),(s&(r.suspendedLanes|i))!==0?0:s}function Lo(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function zr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Bf(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:o_(r.type))}function S0(r,i){var s=F.p;try{return F.p=r,i()}finally{F.p=s}}var Ja=Math.random().toString(36).slice(2),xn="__reactFiber$"+Ja,Vn="__reactProps$"+Ja,Po="__reactContainer$"+Ja,zf="__reactEvents$"+Ja,JO="__reactListeners$"+Ja,eT="__reactHandles$"+Ja,x0="__reactResources$"+Ja,Qs="__reactMarker$"+Ja;function Ff(r){delete r[xn],delete r[Vn],delete r[zf],delete r[JO],delete r[eT]}function ko(r){var i=r[xn];if(i)return i;for(var s=r.parentNode;s;){if(i=s[Po]||s[xn]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=$b(r);r!==null;){if(s=r[xn])return s;r=$b(r)}return i}r=s,s=r.parentNode}return null}function jo(r){if(r=r[xn]||r[Po]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Xs(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Uo(r){var i=r[x0];return i||(i=r[x0]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function pn(r){r[Qs]=!0}var w0=new Set,R0={};function Gi(r,i){Bo(r,i),Bo(r+"Capture",i)}function Bo(r,i){for(R0[r]=i,r=0;r<i.length;r++)w0.add(i[r])}var tT=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]*$"),O0={},T0={};function nT(r){return Fe.call(T0,r)?!0:Fe.call(O0,r)?!1:tT.test(r)?T0[r]=!0:(O0[r]=!0,!1)}function Bc(r,i,s){if(nT(i))if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+s)}}function zc(r,i,s){if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+s)}}function Oa(r,i,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(i,s,""+c)}}function Er(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function A0(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function rT(r,i,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,v=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(w){s=""+w,v.call(this,w)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Vf(r){if(!r._valueTracker){var i=A0(r)?"checked":"value";r._valueTracker=rT(r,i,""+r[i])}}function C0(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return r&&(c=A0(r)?r.checked?"true":"false":r.value),r=c,r!==s?(i.setValue(r),!0):!1}function Fc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var aT=/[\n"\\]/g;function Sr(r){return r.replace(aT,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Hf(r,i,s,c,m,v,w,I){r.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.type=w:r.removeAttribute("type"),i!=null?w==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Er(i)):r.value!==""+Er(i)&&(r.value=""+Er(i)):w!=="submit"&&w!=="reset"||r.removeAttribute("value"),i!=null?$f(r,w,Er(i)):s!=null?$f(r,w,Er(s)):c!=null&&r.removeAttribute("value"),m==null&&v!=null&&(r.defaultChecked=!!v),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?r.name=""+Er(I):r.removeAttribute("name")}function I0(r,i,s,c,m,v,w,I){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){Vf(r);return}s=s!=null?""+Er(s):"",i=i!=null?""+Er(i):s,I||i===r.value||(r.value=i),r.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=I?r.checked:!!c,r.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(r.name=w),Vf(r)}function $f(r,i,s){i==="number"&&Fc(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function zo(r,i,s,c){if(r=r.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=i.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Er(s),i=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function M0(r,i,s){if(i!=null&&(i=""+Er(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+Er(s):""}function N0(r,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(ie(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=Er(i),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),Vf(r)}function Fo(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var iT=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 D0(r,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,s):typeof s!="number"||s===0||iT.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function L0(r,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&D0(r,m,c)}else for(var v in i)i.hasOwnProperty(v)&&D0(r,v,i[v])}function Gf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 oT=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"]]),sT=/^[\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 Vc(r){return sT.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Ta(){}var qf=null;function Yf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Vo=null,Ho=null;function P0(r){var i=jo(r);if(i&&(r=i.stateNode)){var s=r[Vn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Hf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Sr(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==r&&c.form===r.form){var m=c[Vn]||null;if(!m)throw Error(a(90));Hf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===r.form&&C0(c)}break e;case"textarea":M0(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&zo(r,!!s.multiple,i,!1)}}}var Kf=!1;function k0(r,i,s){if(Kf)return r(i,s);Kf=!0;try{var c=r(i);return c}finally{if(Kf=!1,(Vo!==null||Ho!==null)&&(Cu(),Vo&&(i=Vo,r=Ho,Ho=Vo=null,P0(i),r)))for(i=0;i<r.length;i++)P0(r[i])}}function Js(r,i){var s=r.stateNode;if(s===null)return null;var c=s[Vn]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var Aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wf=!1;if(Aa)try{var el={};Object.defineProperty(el,"passive",{get:function(){Wf=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Wf=!1}var ei=null,Zf=null,Hc=null;function j0(){if(Hc)return Hc;var r,i=Zf,s=i.length,c,m="value"in ei?ei.value:ei.textContent,v=m.length;for(r=0;r<s&&i[r]===m[r];r++);var w=s-r;for(c=1;c<=w&&i[s-c]===m[v-c];c++);return Hc=m.slice(r,1<c?1-c:void 0)}function $c(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Gc(){return!0}function U0(){return!1}function Hn(r){function i(s,c,m,v,w){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=v,this.target=w,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(s=r[I],this[I]=s?s(v):v[I]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Gc:U0,this.isPropagationStopped=U0,this}return p(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Gc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Gc)},persist:function(){},isPersistent:Gc}),i}var qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qc=Hn(qi),tl=p({},qi,{view:0,detail:0}),lT=Hn(tl),Qf,Xf,nl,Yc=p({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eh,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==nl&&(nl&&r.type==="mousemove"?(Qf=r.screenX-nl.screenX,Xf=r.screenY-nl.screenY):Xf=Qf=0,nl=r),Qf)},movementY:function(r){return"movementY"in r?r.movementY:Xf}}),B0=Hn(Yc),cT=p({},Yc,{dataTransfer:0}),uT=Hn(cT),dT=p({},tl,{relatedTarget:0}),Jf=Hn(dT),fT=p({},qi,{animationName:0,elapsedTime:0,pseudoElement:0}),hT=Hn(fT),pT=p({},qi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),mT=Hn(pT),gT=p({},qi,{data:0}),z0=Hn(gT),vT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yT={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"},bT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _T(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=bT[r])?!!i[r]:!1}function eh(){return _T}var ET=p({},tl,{key:function(r){if(r.key){var i=vT[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=$c(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?yT[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eh,charCode:function(r){return r.type==="keypress"?$c(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?$c(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),ST=Hn(ET),xT=p({},Yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),F0=Hn(xT),wT=p({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eh}),RT=Hn(wT),OT=p({},qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),TT=Hn(OT),AT=p({},Yc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),CT=Hn(AT),IT=p({},qi,{newState:0,oldState:0}),MT=Hn(IT),NT=[9,13,27,32],th=Aa&&"CompositionEvent"in window,rl=null;Aa&&"documentMode"in document&&(rl=document.documentMode);var DT=Aa&&"TextEvent"in window&&!rl,V0=Aa&&(!th||rl&&8<rl&&11>=rl),H0=" ",$0=!1;function G0(r,i){switch(r){case"keyup":return NT.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function q0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var $o=!1;function LT(r,i){switch(r){case"compositionend":return q0(i);case"keypress":return i.which!==32?null:($0=!0,H0);case"textInput":return r=i.data,r===H0&&$0?null:r;default:return null}}function PT(r,i){if($o)return r==="compositionend"||!th&&G0(r,i)?(r=j0(),Hc=Zf=ei=null,$o=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return V0&&i.locale!=="ko"?null:i.data;default:return null}}var kT={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 Y0(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!kT[r.type]:i==="textarea"}function K0(r,i,s,c){Vo?Ho?Ho.push(c):Ho=[c]:Vo=c,i=ku(i,"onChange"),0<i.length&&(s=new qc("onChange","change",null,s,c),r.push({event:s,listeners:i}))}var al=null,il=null;function jT(r){Ib(r,0)}function Kc(r){var i=Xs(r);if(C0(i))return r}function W0(r,i){if(r==="change")return i}var Z0=!1;if(Aa){var nh;if(Aa){var rh="oninput"in document;if(!rh){var Q0=document.createElement("div");Q0.setAttribute("oninput","return;"),rh=typeof Q0.oninput=="function"}nh=rh}else nh=!1;Z0=nh&&(!document.documentMode||9<document.documentMode)}function X0(){al&&(al.detachEvent("onpropertychange",J0),il=al=null)}function J0(r){if(r.propertyName==="value"&&Kc(il)){var i=[];K0(i,il,r,Yf(r)),k0(jT,i)}}function UT(r,i,s){r==="focusin"?(X0(),al=i,il=s,al.attachEvent("onpropertychange",J0)):r==="focusout"&&X0()}function BT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Kc(il)}function zT(r,i){if(r==="click")return Kc(i)}function FT(r,i){if(r==="input"||r==="change")return Kc(i)}function VT(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var rr=typeof Object.is=="function"?Object.is:VT;function ol(r,i){if(rr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var s=Object.keys(r),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Fe.call(i,m)||!rr(r[m],i[m]))return!1}return!0}function ey(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function ty(r,i){var s=ey(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=i&&c>=i)return{node:s,offset:i-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ey(s)}}function ny(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?ny(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function ry(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Fc(r.document);i instanceof r.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)r=i.contentWindow;else break;i=Fc(r.document)}return i}function ah(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var HT=Aa&&"documentMode"in document&&11>=document.documentMode,Go=null,ih=null,sl=null,oh=!1;function ay(r,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;oh||Go==null||Go!==Fc(c)||(c=Go,"selectionStart"in c&&ah(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),sl&&ol(sl,c)||(sl=c,c=ku(ih,"onSelect"),0<c.length&&(i=new qc("onSelect","select",null,i,s),r.push({event:i,listeners:c}),i.target=Go)))}function Yi(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var qo={animationend:Yi("Animation","AnimationEnd"),animationiteration:Yi("Animation","AnimationIteration"),animationstart:Yi("Animation","AnimationStart"),transitionrun:Yi("Transition","TransitionRun"),transitionstart:Yi("Transition","TransitionStart"),transitioncancel:Yi("Transition","TransitionCancel"),transitionend:Yi("Transition","TransitionEnd")},sh={},iy={};Aa&&(iy=document.createElement("div").style,"AnimationEvent"in window||(delete qo.animationend.animation,delete qo.animationiteration.animation,delete qo.animationstart.animation),"TransitionEvent"in window||delete qo.transitionend.transition);function Ki(r){if(sh[r])return sh[r];if(!qo[r])return r;var i=qo[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in iy)return sh[r]=i[s];return r}var oy=Ki("animationend"),sy=Ki("animationiteration"),ly=Ki("animationstart"),$T=Ki("transitionrun"),GT=Ki("transitionstart"),qT=Ki("transitioncancel"),cy=Ki("transitionend"),uy=new Map,lh="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(" ");lh.push("scrollEnd");function Fr(r,i){uy.set(r,i),Gi(i,[r])}var Wc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},xr=[],Yo=0,ch=0;function Zc(){for(var r=Yo,i=ch=Yo=0;i<r;){var s=xr[i];xr[i++]=null;var c=xr[i];xr[i++]=null;var m=xr[i];xr[i++]=null;var v=xr[i];if(xr[i++]=null,c!==null&&m!==null){var w=c.pending;w===null?m.next=m:(m.next=w.next,w.next=m),c.pending=m}v!==0&&dy(s,m,v)}}function Qc(r,i,s,c){xr[Yo++]=r,xr[Yo++]=i,xr[Yo++]=s,xr[Yo++]=c,ch|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function uh(r,i,s,c){return Qc(r,i,s,c),Xc(r)}function Wi(r,i){return Qc(r,null,null,i),Xc(r)}function dy(r,i,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,v=r.return;v!==null;)v.childLanes|=s,c=v.alternate,c!==null&&(c.childLanes|=s),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(m=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,m&&i!==null&&(m=31-Wt(s),r=v.hiddenUpdates,c=r[m],c===null?r[m]=[i]:c.push(i),i.lane=s|536870912),v):null}function Xc(r){if(50<Cl)throw Cl=0,bp=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Ko={};function YT(r,i,s,c){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(r,i,s,c){return new YT(r,i,s,c)}function dh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ca(r,i){var s=r.alternate;return s===null?(s=ar(r.tag,i,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=i,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,i=r.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function fy(r,i){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,i=s.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Jc(r,i,s,c,m,v){var w=0;if(c=r,typeof r=="function")dh(r)&&(w=1);else if(typeof r=="string")w=XA(r,s,oe.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case U:return r=ar(31,s,i,m),r.elementType=U,r.lanes=v,r;case x:return Zi(s.children,m,v,i);case T:w=8,m|=24;break;case R:return r=ar(12,s,i,m|2),r.elementType=R,r.lanes=v,r;case M:return r=ar(13,s,i,m),r.elementType=M,r.lanes=v,r;case L:return r=ar(19,s,i,m),r.elementType=L,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:w=10;break e;case A:w=9;break e;case O:w=11;break e;case N:w=14;break e;case D:w=16,c=null;break e}w=29,s=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=ar(w,s,i,m),i.elementType=r,i.type=c,i.lanes=v,i}function Zi(r,i,s,c){return r=ar(7,r,c,i),r.lanes=s,r}function fh(r,i,s){return r=ar(6,r,null,i),r.lanes=s,r}function hy(r){var i=ar(18,null,null,0);return i.stateNode=r,i}function hh(r,i,s){return i=ar(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var py=new WeakMap;function wr(r,i){if(typeof r=="object"&&r!==null){var s=py.get(r);return s!==void 0?s:(i={value:r,source:i,stack:it(i)},py.set(r,i),i)}return{value:r,source:i,stack:it(i)}}var Wo=[],Zo=0,eu=null,ll=0,Rr=[],Or=0,ti=null,na=1,ra="";function Ia(r,i){Wo[Zo++]=ll,Wo[Zo++]=eu,eu=r,ll=i}function my(r,i,s){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ti,ti=r;var c=na;r=ra;var m=32-Wt(c)-1;c&=~(1<<m),s+=1;var v=32-Wt(i)+m;if(30<v){var w=m-m%5;v=(c&(1<<w)-1).toString(32),c>>=w,m-=w,na=1<<32-Wt(i)+m|s<<m|c,ra=v+r}else na=1<<v|s<<m|c,ra=r}function ph(r){r.return!==null&&(Ia(r,1),my(r,1,0))}function mh(r){for(;r===eu;)eu=Wo[--Zo],Wo[Zo]=null,ll=Wo[--Zo],Wo[Zo]=null;for(;r===ti;)ti=Rr[--Or],Rr[Or]=null,ra=Rr[--Or],Rr[Or]=null,na=Rr[--Or],Rr[Or]=null}function gy(r,i){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ti,na=i.id,ra=i.overflow,ti=r}var wn=null,Dt=null,ct=!1,ni=null,Tr=!1,gh=Error(a(519));function ri(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(wr(i,r)),gh}function vy(r){var i=r.stateNode,s=r.type,c=r.memoizedProps;switch(i[xn]=r,i[Vn]=c,s){case"dialog":at("cancel",i),at("close",i);break;case"iframe":case"object":case"embed":at("load",i);break;case"video":case"audio":for(s=0;s<Ml.length;s++)at(Ml[s],i);break;case"source":at("error",i);break;case"img":case"image":case"link":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"input":at("invalid",i),I0(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":at("invalid",i);break;case"textarea":at("invalid",i),N0(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||Lb(i.textContent,s)?(c.popover!=null&&(at("beforetoggle",i),at("toggle",i)),c.onScroll!=null&&at("scroll",i),c.onScrollEnd!=null&&at("scrollend",i),c.onClick!=null&&(i.onclick=Ta),i=!0):i=!1,i||ri(r,!0)}function yy(r){for(wn=r.return;wn;)switch(wn.tag){case 5:case 31:case 13:Tr=!1;return;case 27:case 3:Tr=!0;return;default:wn=wn.return}}function Qo(r){if(r!==wn)return!1;if(!ct)return yy(r),ct=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Lp(r.type,r.memoizedProps)),s=!s),s&&Dt&&ri(r),yy(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Dt=Hb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Dt=Hb(r)}else i===27?(i=Dt,vi(r.type)?(r=Bp,Bp=null,Dt=r):Dt=i):Dt=wn?Cr(r.stateNode.nextSibling):null;return!0}function Qi(){Dt=wn=null,ct=!1}function vh(){var r=ni;return r!==null&&(Yn===null?Yn=r:Yn.push.apply(Yn,r),ni=null),r}function cl(r){ni===null?ni=[r]:ni.push(r)}var yh=k(null),Xi=null,Ma=null;function ai(r,i,s){ee(yh,i._currentValue),i._currentValue=s}function Na(r){r._currentValue=yh.current,Q(yh)}function bh(r,i,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===s)break;r=r.return}}function _h(r,i,s,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var v=m.dependencies;if(v!==null){var w=m.child;v=v.firstContext;e:for(;v!==null;){var I=v;v=m;for(var z=0;z<i.length;z++)if(I.context===i[z]){v.lanes|=s,I=v.alternate,I!==null&&(I.lanes|=s),bh(v.return,s,r),c||(w=null);break e}v=I.next}}else if(m.tag===18){if(w=m.return,w===null)throw Error(a(341));w.lanes|=s,v=w.alternate,v!==null&&(v.lanes|=s),bh(w,s,r),w=null}else w=m.child;if(w!==null)w.return=m;else for(w=m;w!==null;){if(w===r){w=null;break}if(m=w.sibling,m!==null){m.return=w.return,w=m;break}w=w.return}m=w}}function Xo(r,i,s,c){r=null;for(var m=i,v=!1;m!==null;){if(!v){if((m.flags&524288)!==0)v=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var w=m.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var I=m.type;rr(m.pendingProps.value,w.value)||(r!==null?r.push(I):r=[I])}}else if(m===ye.current){if(w=m.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(kl):r=[kl])}m=m.return}r!==null&&_h(i,r,s,c),i.flags|=262144}function tu(r){for(r=r.firstContext;r!==null;){if(!rr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ji(r){Xi=r,Ma=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Rn(r){return by(Xi,r)}function nu(r,i){return Xi===null&&Ji(r),by(r,i)}function by(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Ma===null){if(r===null)throw Error(a(308));Ma=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Ma=Ma.next=i;return s}var KT=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(s){return s()})}},WT=e.unstable_scheduleCallback,ZT=e.unstable_NormalPriority,Zt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eh(){return{controller:new KT,data:new Map,refCount:0}}function ul(r){r.refCount--,r.refCount===0&&WT(ZT,function(){r.controller.abort()})}var dl=null,Sh=0,Jo=0,es=null;function QT(r,i){if(dl===null){var s=dl=[];Sh=0,Jo=Rp(),es={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Sh++,i.then(_y,_y),i}function _y(){if(--Sh===0&&dl!==null){es!==null&&(es.status="fulfilled");var r=dl;dl=null,Jo=0,es=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function XT(r,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var Ey=P.S;P.S=function(r,i){ab=ce(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&QT(r,i),Ey!==null&&Ey(r,i)};var eo=k(null);function xh(){var r=eo.current;return r!==null?r:Ct.pooledCache}function ru(r,i){i===null?ee(eo,eo.current):ee(eo,i.pool)}function Sy(){var r=xh();return r===null?null:{parent:Zt._currentValue,pool:r}}var ts=Error(a(460)),wh=Error(a(474)),au=Error(a(542)),iu={then:function(){}};function xy(r){return r=r.status,r==="fulfilled"||r==="rejected"}function wy(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(Ta,Ta),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Oy(r),r;default:if(typeof i.status=="string")i.then(Ta,Ta);else{if(r=Ct,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Oy(r),r}throw no=i,ts}}function to(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(no=s,ts):s}}var no=null;function Ry(){if(no===null)throw Error(a(459));var r=no;return no=null,r}function Oy(r){if(r===ts||r===au)throw Error(a(483))}var ns=null,fl=0;function ou(r){var i=fl;return fl+=1,ns===null&&(ns=[]),wy(ns,r,i)}function hl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function su(r,i){throw i.$$typeof===y?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function Ty(r){function i(K,H){if(r){var X=K.deletions;X===null?(K.deletions=[H],K.flags|=16):X.push(H)}}function s(K,H){if(!r)return null;for(;H!==null;)i(K,H),H=H.sibling;return null}function c(K){for(var H=new Map;K!==null;)K.key!==null?H.set(K.key,K):H.set(K.index,K),K=K.sibling;return H}function m(K,H){return K=Ca(K,H),K.index=0,K.sibling=null,K}function v(K,H,X){return K.index=X,r?(X=K.alternate,X!==null?(X=X.index,X<H?(K.flags|=67108866,H):X):(K.flags|=67108866,H)):(K.flags|=1048576,H)}function w(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function I(K,H,X,le){return H===null||H.tag!==6?(H=fh(X,K.mode,le),H.return=K,H):(H=m(H,X),H.return=K,H)}function z(K,H,X,le){var je=X.type;return je===x?se(K,H,X.props.children,le,X.key):H!==null&&(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===D&&to(je)===H.type)?(H=m(H,X.props),hl(H,X),H.return=K,H):(H=Jc(X.type,X.key,X.props,null,K.mode,le),hl(H,X),H.return=K,H)}function J(K,H,X,le){return H===null||H.tag!==4||H.stateNode.containerInfo!==X.containerInfo||H.stateNode.implementation!==X.implementation?(H=hh(X,K.mode,le),H.return=K,H):(H=m(H,X.children||[]),H.return=K,H)}function se(K,H,X,le,je){return H===null||H.tag!==7?(H=Zi(X,K.mode,le,je),H.return=K,H):(H=m(H,X),H.return=K,H)}function ue(K,H,X){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=fh(""+H,K.mode,X),H.return=K,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return X=Jc(H.type,H.key,H.props,null,K.mode,X),hl(X,H),X.return=K,X;case S:return H=hh(H,K.mode,X),H.return=K,H;case D:return H=to(H),ue(K,H,X)}if(ie(H)||W(H))return H=Zi(H,K.mode,X,null),H.return=K,H;if(typeof H.then=="function")return ue(K,ou(H),X);if(H.$$typeof===C)return ue(K,nu(K,H),X);su(K,H)}return null}function te(K,H,X,le){var je=H!==null?H.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return je!==null?null:I(K,H,""+X,le);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case _:return X.key===je?z(K,H,X,le):null;case S:return X.key===je?J(K,H,X,le):null;case D:return X=to(X),te(K,H,X,le)}if(ie(X)||W(X))return je!==null?null:se(K,H,X,le,null);if(typeof X.then=="function")return te(K,H,ou(X),le);if(X.$$typeof===C)return te(K,H,nu(K,X),le);su(K,X)}return null}function ae(K,H,X,le,je){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return K=K.get(X)||null,I(H,K,""+le,je);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case _:return K=K.get(le.key===null?X:le.key)||null,z(H,K,le,je);case S:return K=K.get(le.key===null?X:le.key)||null,J(H,K,le,je);case D:return le=to(le),ae(K,H,X,le,je)}if(ie(le)||W(le))return K=K.get(X)||null,se(H,K,le,je,null);if(typeof le.then=="function")return ae(K,H,X,ou(le),je);if(le.$$typeof===C)return ae(K,H,X,nu(H,le),je);su(H,le)}return null}function Te(K,H,X,le){for(var je=null,pt=null,De=H,Ye=H=0,lt=null;De!==null&&Ye<X.length;Ye++){De.index>Ye?(lt=De,De=null):lt=De.sibling;var mt=te(K,De,X[Ye],le);if(mt===null){De===null&&(De=lt);break}r&&De&&mt.alternate===null&&i(K,De),H=v(mt,H,Ye),pt===null?je=mt:pt.sibling=mt,pt=mt,De=lt}if(Ye===X.length)return s(K,De),ct&&Ia(K,Ye),je;if(De===null){for(;Ye<X.length;Ye++)De=ue(K,X[Ye],le),De!==null&&(H=v(De,H,Ye),pt===null?je=De:pt.sibling=De,pt=De);return ct&&Ia(K,Ye),je}for(De=c(De);Ye<X.length;Ye++)lt=ae(De,K,Ye,X[Ye],le),lt!==null&&(r&&lt.alternate!==null&&De.delete(lt.key===null?Ye:lt.key),H=v(lt,H,Ye),pt===null?je=lt:pt.sibling=lt,pt=lt);return r&&De.forEach(function(Si){return i(K,Si)}),ct&&Ia(K,Ye),je}function Be(K,H,X,le){if(X==null)throw Error(a(151));for(var je=null,pt=null,De=H,Ye=H=0,lt=null,mt=X.next();De!==null&&!mt.done;Ye++,mt=X.next()){De.index>Ye?(lt=De,De=null):lt=De.sibling;var Si=te(K,De,mt.value,le);if(Si===null){De===null&&(De=lt);break}r&&De&&Si.alternate===null&&i(K,De),H=v(Si,H,Ye),pt===null?je=Si:pt.sibling=Si,pt=Si,De=lt}if(mt.done)return s(K,De),ct&&Ia(K,Ye),je;if(De===null){for(;!mt.done;Ye++,mt=X.next())mt=ue(K,mt.value,le),mt!==null&&(H=v(mt,H,Ye),pt===null?je=mt:pt.sibling=mt,pt=mt);return ct&&Ia(K,Ye),je}for(De=c(De);!mt.done;Ye++,mt=X.next())mt=ae(De,K,Ye,mt.value,le),mt!==null&&(r&&mt.alternate!==null&&De.delete(mt.key===null?Ye:mt.key),H=v(mt,H,Ye),pt===null?je=mt:pt.sibling=mt,pt=mt);return r&&De.forEach(function(cC){return i(K,cC)}),ct&&Ia(K,Ye),je}function Rt(K,H,X,le){if(typeof X=="object"&&X!==null&&X.type===x&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case _:e:{for(var je=X.key;H!==null;){if(H.key===je){if(je=X.type,je===x){if(H.tag===7){s(K,H.sibling),le=m(H,X.props.children),le.return=K,K=le;break e}}else if(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===D&&to(je)===H.type){s(K,H.sibling),le=m(H,X.props),hl(le,X),le.return=K,K=le;break e}s(K,H);break}else i(K,H);H=H.sibling}X.type===x?(le=Zi(X.props.children,K.mode,le,X.key),le.return=K,K=le):(le=Jc(X.type,X.key,X.props,null,K.mode,le),hl(le,X),le.return=K,K=le)}return w(K);case S:e:{for(je=X.key;H!==null;){if(H.key===je)if(H.tag===4&&H.stateNode.containerInfo===X.containerInfo&&H.stateNode.implementation===X.implementation){s(K,H.sibling),le=m(H,X.children||[]),le.return=K,K=le;break e}else{s(K,H);break}else i(K,H);H=H.sibling}le=hh(X,K.mode,le),le.return=K,K=le}return w(K);case D:return X=to(X),Rt(K,H,X,le)}if(ie(X))return Te(K,H,X,le);if(W(X)){if(je=W(X),typeof je!="function")throw Error(a(150));return X=je.call(X),Be(K,H,X,le)}if(typeof X.then=="function")return Rt(K,H,ou(X),le);if(X.$$typeof===C)return Rt(K,H,nu(K,X),le);su(K,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,H!==null&&H.tag===6?(s(K,H.sibling),le=m(H,X),le.return=K,K=le):(s(K,H),le=fh(X,K.mode,le),le.return=K,K=le),w(K)):s(K,H)}return function(K,H,X,le){try{fl=0;var je=Rt(K,H,X,le);return ns=null,je}catch(De){if(De===ts||De===au)throw De;var pt=ar(29,De,null,K.mode);return pt.lanes=le,pt.return=K,pt}}}var ro=Ty(!0),Ay=Ty(!1),ii=!1;function Rh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oh(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function oi(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function si(r,i,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(vt&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=Xc(r),dy(r,null,s),i}return Qc(r,c,i,s),Xc(r)}function pl(r,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,Sn(r,s)}}function Th(r,i){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var w={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};v===null?m=v=w:v=v.next=w,s=s.next}while(s!==null);v===null?m=v=i:v=v.next=i}else m=v=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=i:r.next=i,s.lastBaseUpdate=i}var Ah=!1;function ml(){if(Ah){var r=es;if(r!==null)throw r}}function gl(r,i,s,c){Ah=!1;var m=r.updateQueue;ii=!1;var v=m.firstBaseUpdate,w=m.lastBaseUpdate,I=m.shared.pending;if(I!==null){m.shared.pending=null;var z=I,J=z.next;z.next=null,w===null?v=J:w.next=J,w=z;var se=r.alternate;se!==null&&(se=se.updateQueue,I=se.lastBaseUpdate,I!==w&&(I===null?se.firstBaseUpdate=J:I.next=J,se.lastBaseUpdate=z))}if(v!==null){var ue=m.baseState;w=0,se=J=z=null,I=v;do{var te=I.lane&-536870913,ae=te!==I.lane;if(ae?(st&te)===te:(c&te)===te){te!==0&&te===Jo&&(Ah=!0),se!==null&&(se=se.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var Te=r,Be=I;te=i;var Rt=s;switch(Be.tag){case 1:if(Te=Be.payload,typeof Te=="function"){ue=Te.call(Rt,ue,te);break e}ue=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Be.payload,te=typeof Te=="function"?Te.call(Rt,ue,te):Te,te==null)break e;ue=p({},ue,te);break e;case 2:ii=!0}}te=I.callback,te!==null&&(r.flags|=64,ae&&(r.flags|=8192),ae=m.callbacks,ae===null?m.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:I.tag,payload:I.payload,callback:I.callback,next:null},se===null?(J=se=ae,z=ue):se=se.next=ae,w|=te;if(I=I.next,I===null){if(I=m.shared.pending,I===null)break;ae=I,I=ae.next,ae.next=null,m.lastBaseUpdate=ae,m.shared.pending=null}}while(!0);se===null&&(z=ue),m.baseState=z,m.firstBaseUpdate=J,m.lastBaseUpdate=se,v===null&&(m.shared.lanes=0),fi|=w,r.lanes=w,r.memoizedState=ue}}function Cy(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function Iy(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Cy(s[r],i)}var rs=k(null),lu=k(0);function My(r,i){r=Fa,ee(lu,r),ee(rs,i),Fa=r|i.baseLanes}function Ch(){ee(lu,Fa),ee(rs,rs.current)}function Ih(){Fa=lu.current,Q(rs),Q(lu)}var ir=k(null),Ar=null;function li(r){var i=r.alternate;ee(Ht,Ht.current&1),ee(ir,r),Ar===null&&(i===null||rs.current!==null||i.memoizedState!==null)&&(Ar=r)}function Mh(r){ee(Ht,Ht.current),ee(ir,r),Ar===null&&(Ar=r)}function Ny(r){r.tag===22?(ee(Ht,Ht.current),ee(ir,r),Ar===null&&(Ar=r)):ci()}function ci(){ee(Ht,Ht.current),ee(ir,ir.current)}function or(r){Q(ir),Ar===r&&(Ar=null),Q(Ht)}var Ht=k(0);function cu(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||jp(s)||Up(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Da=0,qe=null,xt=null,Qt=null,uu=!1,as=!1,ao=!1,du=0,vl=0,is=null,JT=0;function zt(){throw Error(a(321))}function Nh(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!rr(r[s],i[s]))return!1;return!0}function Dh(r,i,s,c,m,v){return Da=v,qe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,P.H=r===null||r.memoizedState===null?m1:Kh,ao=!1,v=s(c,m),ao=!1,as&&(v=Ly(i,s,c,m)),Dy(r),v}function Dy(r){P.H=_l;var i=xt!==null&&xt.next!==null;if(Da=0,Qt=xt=qe=null,uu=!1,vl=0,is=null,i)throw Error(a(300));r===null||Xt||(r=r.dependencies,r!==null&&tu(r)&&(Xt=!0))}function Ly(r,i,s,c){qe=r;var m=0;do{if(as&&(is=null),vl=0,as=!1,25<=m)throw Error(a(301));if(m+=1,Qt=xt=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}P.H=g1,v=i(s,c)}while(as);return v}function eA(){var r=P.H,i=r.useState()[0];return i=typeof i.then=="function"?yl(i):i,r=r.useState()[0],(xt!==null?xt.memoizedState:null)!==r&&(qe.flags|=1024),i}function Lh(){var r=du!==0;return du=0,r}function Ph(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function kh(r){if(uu){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}uu=!1}Da=0,Qt=xt=qe=null,as=!1,vl=du=0,is=null}function jn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?qe.memoizedState=Qt=r:Qt=Qt.next=r,Qt}function $t(){if(xt===null){var r=qe.alternate;r=r!==null?r.memoizedState:null}else r=xt.next;var i=Qt===null?qe.memoizedState:Qt.next;if(i!==null)Qt=i,xt=r;else{if(r===null)throw qe.alternate===null?Error(a(467)):Error(a(310));xt=r,r={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},Qt===null?qe.memoizedState=Qt=r:Qt=Qt.next=r}return Qt}function fu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yl(r){var i=vl;return vl+=1,is===null&&(is=[]),r=wy(is,r,i),i=qe,(Qt===null?i.memoizedState:Qt.next)===null&&(i=i.alternate,P.H=i===null||i.memoizedState===null?m1:Kh),r}function hu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return yl(r);if(r.$$typeof===C)return Rn(r)}throw Error(a(438,String(r)))}function jh(r){var i=null,s=qe.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=qe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=fu(),qe.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(r),c=0;c<r;c++)s[c]=Z;return i.index++,s}function La(r,i){return typeof i=="function"?i(r):i}function pu(r){var i=$t();return Uh(i,xt,r)}function Uh(r,i,s){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var m=r.baseQueue,v=c.pending;if(v!==null){if(m!==null){var w=m.next;m.next=v.next,v.next=w}i.baseQueue=m=v,c.pending=null}if(v=r.baseState,m===null)r.memoizedState=v;else{i=m.next;var I=w=null,z=null,J=i,se=!1;do{var ue=J.lane&-536870913;if(ue!==J.lane?(st&ue)===ue:(Da&ue)===ue){var te=J.revertLane;if(te===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ue===Jo&&(se=!0);else if((Da&te)===te){J=J.next,te===Jo&&(se=!0);continue}else ue={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},z===null?(I=z=ue,w=v):z=z.next=ue,qe.lanes|=te,fi|=te;ue=J.action,ao&&s(v,ue),v=J.hasEagerState?J.eagerState:s(v,ue)}else te={lane:ue,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},z===null?(I=z=te,w=v):z=z.next=te,qe.lanes|=ue,fi|=ue;J=J.next}while(J!==null&&J!==i);if(z===null?w=v:z.next=I,!rr(v,r.memoizedState)&&(Xt=!0,se&&(s=es,s!==null)))throw s;r.memoizedState=v,r.baseState=w,r.baseQueue=z,c.lastRenderedState=v}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Bh(r){var i=$t(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,v=i.memoizedState;if(m!==null){s.pending=null;var w=m=m.next;do v=r(v,w.action),w=w.next;while(w!==m);rr(v,i.memoizedState)||(Xt=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),s.lastRenderedState=v}return[v,c]}function Py(r,i,s){var c=qe,m=$t(),v=ct;if(v){if(s===void 0)throw Error(a(407));s=s()}else s=i();var w=!rr((xt||m).memoizedState,s);if(w&&(m.memoizedState=s,Xt=!0),m=m.queue,Vh(Uy.bind(null,c,m,r),[r]),m.getSnapshot!==i||w||Qt!==null&&Qt.memoizedState.tag&1){if(c.flags|=2048,os(9,{destroy:void 0},jy.bind(null,c,m,s,i),null),Ct===null)throw Error(a(349));v||(Da&127)!==0||ky(c,i,s)}return s}function ky(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=qe.updateQueue,i===null?(i=fu(),qe.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function jy(r,i,s,c){i.value=s,i.getSnapshot=c,By(i)&&zy(r)}function Uy(r,i,s){return s(function(){By(i)&&zy(r)})}function By(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!rr(r,s)}catch{return!0}}function zy(r){var i=Wi(r,2);i!==null&&Kn(i,r,2)}function zh(r){var i=jn();if(typeof r=="function"){var s=r;if(r=s(),ao){sn(!0);try{s()}finally{sn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:r},i}function Fy(r,i,s,c){return r.baseState=s,Uh(r,xt,typeof c=="function"?c:La)}function tA(r,i,s,c,m){if(vu(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){v.listeners.push(w)}};P.T!==null?s(!0):v.isTransition=!1,c(v),s=i.pending,s===null?(v.next=i.pending=v,Vy(i,v)):(v.next=s.next,i.pending=s.next=v)}}function Vy(r,i){var s=i.action,c=i.payload,m=r.state;if(i.isTransition){var v=P.T,w={};P.T=w;try{var I=s(m,c),z=P.S;z!==null&&z(w,I),Hy(r,i,I)}catch(J){Fh(r,i,J)}finally{v!==null&&w.types!==null&&(v.types=w.types),P.T=v}}else try{v=s(m,c),Hy(r,i,v)}catch(J){Fh(r,i,J)}}function Hy(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){$y(r,i,c)},function(c){return Fh(r,i,c)}):$y(r,i,s)}function $y(r,i,s){i.status="fulfilled",i.value=s,Gy(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,Vy(r,s)))}function Fh(r,i,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Gy(i),i=i.next;while(i!==c)}r.action=null}function Gy(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function qy(r,i){return i}function Yy(r,i){if(ct){var s=Ct.formState;if(s!==null){e:{var c=qe;if(ct){if(Dt){t:{for(var m=Dt,v=Tr;m.nodeType!==8;){if(!v){m=null;break t}if(m=Cr(m.nextSibling),m===null){m=null;break t}}v=m.data,m=v==="F!"||v==="F"?m:null}if(m){Dt=Cr(m.nextSibling),c=m.data==="F!";break e}}ri(c)}c=!1}c&&(i=s[0])}}return s=jn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qy,lastRenderedState:i},s.queue=c,s=f1.bind(null,qe,c),c.dispatch=s,c=zh(!1),v=Yh.bind(null,qe,!1,c.queue),c=jn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,s=tA.bind(null,qe,m,v,s),m.dispatch=s,c.memoizedState=r,[i,s,!1]}function Ky(r){var i=$t();return Wy(i,xt,r)}function Wy(r,i,s){if(i=Uh(r,i,qy)[0],r=pu(La)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=yl(i)}catch(w){throw w===ts?au:w}else c=i;i=$t();var m=i.queue,v=m.dispatch;return s!==i.memoizedState&&(qe.flags|=2048,os(9,{destroy:void 0},nA.bind(null,m,s),null)),[c,v,r]}function nA(r,i){r.action=i}function Zy(r){var i=$t(),s=xt;if(s!==null)return Wy(i,s,r);$t(),i=i.memoizedState,s=$t();var c=s.queue.dispatch;return s.memoizedState=r,[i,c,!1]}function os(r,i,s,c){return r={tag:r,create:s,deps:c,inst:i,next:null},i=qe.updateQueue,i===null&&(i=fu(),qe.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,i.lastEffect=r),r}function Qy(){return $t().memoizedState}function mu(r,i,s,c){var m=jn();qe.flags|=r,m.memoizedState=os(1|i,{destroy:void 0},s,c===void 0?null:c)}function gu(r,i,s,c){var m=$t();c=c===void 0?null:c;var v=m.memoizedState.inst;xt!==null&&c!==null&&Nh(c,xt.memoizedState.deps)?m.memoizedState=os(i,v,s,c):(qe.flags|=r,m.memoizedState=os(1|i,v,s,c))}function Xy(r,i){mu(8390656,8,r,i)}function Vh(r,i){gu(2048,8,r,i)}function rA(r){qe.flags|=4;var i=qe.updateQueue;if(i===null)i=fu(),qe.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function Jy(r){var i=$t().memoizedState;return rA({ref:i,nextImpl:r}),function(){if((vt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function e1(r,i){return gu(4,2,r,i)}function t1(r,i){return gu(4,4,r,i)}function n1(r,i){if(typeof i=="function"){r=r();var s=i(r);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function r1(r,i,s){s=s!=null?s.concat([r]):null,gu(4,4,n1.bind(null,i,r),s)}function Hh(){}function a1(r,i){var s=$t();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&Nh(i,c[1])?c[0]:(s.memoizedState=[r,i],r)}function i1(r,i){var s=$t();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&Nh(i,c[1]))return c[0];if(c=r(),ao){sn(!0);try{r()}finally{sn(!1)}}return s.memoizedState=[c,i],c}function $h(r,i,s){return s===void 0||(Da&1073741824)!==0&&(st&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=ob(),qe.lanes|=r,fi|=r,s)}function o1(r,i,s,c){return rr(s,i)?s:rs.current!==null?(r=$h(r,s,c),rr(r,i)||(Xt=!0),r):(Da&42)===0||(Da&1073741824)!==0&&(st&261930)===0?(Xt=!0,r.memoizedState=s):(r=ob(),qe.lanes|=r,fi|=r,i)}function s1(r,i,s,c,m){var v=F.p;F.p=v!==0&&8>v?v:8;var w=P.T,I={};P.T=I,Yh(r,!1,i,s);try{var z=m(),J=P.S;if(J!==null&&J(I,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var se=XT(z,c);bl(r,i,se,cr(r))}else bl(r,i,c,cr(r))}catch(ue){bl(r,i,{then:function(){},status:"rejected",reason:ue},cr())}finally{F.p=v,w!==null&&I.types!==null&&(w.types=I.types),P.T=w}}function aA(){}function Gh(r,i,s,c){if(r.tag!==5)throw Error(a(476));var m=l1(r).queue;s1(r,m,i,$,s===null?aA:function(){return c1(r),s(c)})}function l1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:$},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function c1(r){var i=l1(r);i.next===null&&(i=r.alternate.memoizedState),bl(r,i.next.queue,{},cr())}function qh(){return Rn(kl)}function u1(){return $t().memoizedState}function d1(){return $t().memoizedState}function iA(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=cr();r=oi(s);var c=si(i,r,s);c!==null&&(Kn(c,i,s),pl(c,i,s)),i={cache:Eh()},r.payload=i;return}i=i.return}}function oA(r,i,s){var c=cr();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},vu(r)?h1(i,s):(s=uh(r,i,s,c),s!==null&&(Kn(s,r,c),p1(s,i,c)))}function f1(r,i,s){var c=cr();bl(r,i,s,c)}function bl(r,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(vu(r))h1(i,m);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var w=i.lastRenderedState,I=v(w,s);if(m.hasEagerState=!0,m.eagerState=I,rr(I,w))return Qc(r,i,m,0),Ct===null&&Zc(),!1}catch{}if(s=uh(r,i,m,c),s!==null)return Kn(s,r,c),p1(s,i,c),!0}return!1}function Yh(r,i,s,c){if(c={lane:2,revertLane:Rp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},vu(r)){if(i)throw Error(a(479))}else i=uh(r,s,c,2),i!==null&&Kn(i,r,2)}function vu(r){var i=r.alternate;return r===qe||i!==null&&i===qe}function h1(r,i){as=uu=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function p1(r,i,s){if((s&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,Sn(r,s)}}var _l={readContext:Rn,use:hu,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};_l.useEffectEvent=zt;var m1={readContext:Rn,use:hu,useCallback:function(r,i){return jn().memoizedState=[r,i===void 0?null:i],r},useContext:Rn,useEffect:Xy,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,mu(4194308,4,n1.bind(null,i,r),s)},useLayoutEffect:function(r,i){return mu(4194308,4,r,i)},useInsertionEffect:function(r,i){mu(4,2,r,i)},useMemo:function(r,i){var s=jn();i=i===void 0?null:i;var c=r();if(ao){sn(!0);try{r()}finally{sn(!1)}}return s.memoizedState=[c,i],c},useReducer:function(r,i,s){var c=jn();if(s!==void 0){var m=s(i);if(ao){sn(!0);try{s(i)}finally{sn(!1)}}}else m=i;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=oA.bind(null,qe,r),[c.memoizedState,r]},useRef:function(r){var i=jn();return r={current:r},i.memoizedState=r},useState:function(r){r=zh(r);var i=r.queue,s=f1.bind(null,qe,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:Hh,useDeferredValue:function(r,i){var s=jn();return $h(s,r,i)},useTransition:function(){var r=zh(!1);return r=s1.bind(null,qe,r.queue,!0,!1),jn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var c=qe,m=jn();if(ct){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Ct===null)throw Error(a(349));(st&127)!==0||ky(c,i,s)}m.memoizedState=s;var v={value:s,getSnapshot:i};return m.queue=v,Xy(Uy.bind(null,c,v,r),[r]),c.flags|=2048,os(9,{destroy:void 0},jy.bind(null,c,v,s,i),null),s},useId:function(){var r=jn(),i=Ct.identifierPrefix;if(ct){var s=ra,c=na;s=(c&~(1<<32-Wt(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=du++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=JT++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:qh,useFormState:Yy,useActionState:Yy,useOptimistic:function(r){var i=jn();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Yh.bind(null,qe,!0,s),s.dispatch=i,[r,i]},useMemoCache:jh,useCacheRefresh:function(){return jn().memoizedState=iA.bind(null,qe)},useEffectEvent:function(r){var i=jn(),s={impl:r};return i.memoizedState=s,function(){if((vt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},Kh={readContext:Rn,use:hu,useCallback:a1,useContext:Rn,useEffect:Vh,useImperativeHandle:r1,useInsertionEffect:e1,useLayoutEffect:t1,useMemo:i1,useReducer:pu,useRef:Qy,useState:function(){return pu(La)},useDebugValue:Hh,useDeferredValue:function(r,i){var s=$t();return o1(s,xt.memoizedState,r,i)},useTransition:function(){var r=pu(La)[0],i=$t().memoizedState;return[typeof r=="boolean"?r:yl(r),i]},useSyncExternalStore:Py,useId:u1,useHostTransitionStatus:qh,useFormState:Ky,useActionState:Ky,useOptimistic:function(r,i){var s=$t();return Fy(s,xt,r,i)},useMemoCache:jh,useCacheRefresh:d1};Kh.useEffectEvent=Jy;var g1={readContext:Rn,use:hu,useCallback:a1,useContext:Rn,useEffect:Vh,useImperativeHandle:r1,useInsertionEffect:e1,useLayoutEffect:t1,useMemo:i1,useReducer:Bh,useRef:Qy,useState:function(){return Bh(La)},useDebugValue:Hh,useDeferredValue:function(r,i){var s=$t();return xt===null?$h(s,r,i):o1(s,xt.memoizedState,r,i)},useTransition:function(){var r=Bh(La)[0],i=$t().memoizedState;return[typeof r=="boolean"?r:yl(r),i]},useSyncExternalStore:Py,useId:u1,useHostTransitionStatus:qh,useFormState:Zy,useActionState:Zy,useOptimistic:function(r,i){var s=$t();return xt!==null?Fy(s,xt,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:jh,useCacheRefresh:d1};g1.useEffectEvent=Jy;function Wh(r,i,s,c){i=r.memoizedState,s=s(c,i),s=s==null?i:p({},i,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var Zh={enqueueSetState:function(r,i,s){r=r._reactInternals;var c=cr(),m=oi(c);m.payload=i,s!=null&&(m.callback=s),i=si(r,m,c),i!==null&&(Kn(i,r,c),pl(i,r,c))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var c=cr(),m=oi(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=si(r,m,c),i!==null&&(Kn(i,r,c),pl(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=cr(),c=oi(s);c.tag=2,i!=null&&(c.callback=i),i=si(r,c,s),i!==null&&(Kn(i,r,s),pl(i,r,s))}};function v1(r,i,s,c,m,v,w){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,v,w):i.prototype&&i.prototype.isPureReactComponent?!ol(s,c)||!ol(m,v):!0}function y1(r,i,s,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==r&&Zh.enqueueReplaceState(i,i.state,null)}function io(r,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(r=r.defaultProps){s===i&&(s=p({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function b1(r){Wc(r)}function _1(r){console.error(r)}function E1(r){Wc(r)}function yu(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function S1(r,i,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Qh(r,i,s){return s=oi(s),s.tag=3,s.payload={element:null},s.callback=function(){yu(r,i)},s}function x1(r){return r=oi(r),r.tag=3,r}function w1(r,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var v=c.value;r.payload=function(){return m(v)},r.callback=function(){S1(i,s,c)}}var w=s.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(r.callback=function(){S1(i,s,c),typeof m!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var I=c.stack;this.componentDidCatch(c.value,{componentStack:I!==null?I:""})})}function sA(r,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&Xo(i,s,m,!0),s=ir.current,s!==null){switch(s.tag){case 31:case 13:return Ar===null?Iu():s.alternate===null&&Ft===0&&(Ft=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===iu?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Sp(r,c,m)),!1;case 22:return s.flags|=65536,c===iu?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Sp(r,c,m)),!1}throw Error(a(435,s.tag))}return Sp(r,c,m),Iu(),!1}if(ct)return i=ir.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==gh&&(r=Error(a(422),{cause:c}),cl(wr(r,s)))):(c!==gh&&(i=Error(a(423),{cause:c}),cl(wr(i,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=wr(c,s),m=Qh(r.stateNode,c,m),Th(r,m),Ft!==4&&(Ft=2)),!1;var v=Error(a(520),{cause:c});if(v=wr(v,s),Al===null?Al=[v]:Al.push(v),Ft!==4&&(Ft=2),i===null)return!0;c=wr(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=Qh(s.stateNode,c,r),Th(s,r),!1;case 1:if(i=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(hi===null||!hi.has(v))))return s.flags|=65536,m&=-m,s.lanes|=m,m=x1(m),w1(m,r,s,c),Th(s,m),!1}s=s.return}while(s!==null);return!1}var Xh=Error(a(461)),Xt=!1;function On(r,i,s,c){i.child=r===null?Ay(i,null,s,c):ro(i,r.child,s,c)}function R1(r,i,s,c,m){s=s.render;var v=i.ref;if("ref"in c){var w={};for(var I in c)I!=="ref"&&(w[I]=c[I])}else w=c;return Ji(i),c=Dh(r,i,s,w,v,m),I=Lh(),r!==null&&!Xt?(Ph(r,i,m),Pa(r,i,m)):(ct&&I&&ph(i),i.flags|=1,On(r,i,c,m),i.child)}function O1(r,i,s,c,m){if(r===null){var v=s.type;return typeof v=="function"&&!dh(v)&&v.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=v,T1(r,i,v,c,m)):(r=Jc(s.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!op(r,m)){var w=v.memoizedProps;if(s=s.compare,s=s!==null?s:ol,s(w,c)&&r.ref===i.ref)return Pa(r,i,m)}return i.flags|=1,r=Ca(v,c),r.ref=i.ref,r.return=i,i.child=r}function T1(r,i,s,c,m){if(r!==null){var v=r.memoizedProps;if(ol(v,c)&&r.ref===i.ref)if(Xt=!1,i.pendingProps=c=v,op(r,m))(r.flags&131072)!==0&&(Xt=!0);else return i.lanes=r.lanes,Pa(r,i,m)}return Jh(r,i,s,c,m)}function A1(r,i,s,c){var m=c.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,r!==null){for(c=i.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~v}else c=0,i.child=null;return C1(r,i,v,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&ru(i,v!==null?v.cachePool:null),v!==null?My(i,v):Ch(),Ny(i);else return c=i.lanes=536870912,C1(r,i,v!==null?v.baseLanes|s:s,s,c)}else v!==null?(ru(i,v.cachePool),My(i,v),ci(),i.memoizedState=null):(r!==null&&ru(i,null),Ch(),ci());return On(r,i,m,s),i.child}function El(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function C1(r,i,s,c,m){var v=xh();return v=v===null?null:{parent:Zt._currentValue,pool:v},i.memoizedState={baseLanes:s,cachePool:v},r!==null&&ru(i,null),Ch(),Ny(i),r!==null&&Xo(r,i,c,!0),i.childLanes=m,null}function bu(r,i){return i=Eu({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function I1(r,i,s){return ro(i,r.child,null,s),r=bu(i,i.pendingProps),r.flags|=2,or(i),i.memoizedState=null,r}function lA(r,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(ct){if(c.mode==="hidden")return r=bu(i,c),i.lanes=536870912,El(null,r);if(Mh(i),(r=Dt)?(r=Vb(r,Tr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ti!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=hy(r),s.return=i,i.child=s,wn=i,Dt=null)):r=null,r===null)throw ri(i);return i.lanes=536870912,null}return bu(i,c)}var v=r.memoizedState;if(v!==null){var w=v.dehydrated;if(Mh(i),m)if(i.flags&256)i.flags&=-257,i=I1(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Xt||Xo(r,i,s,!1),m=(s&r.childLanes)!==0,Xt||m){if(c=Ct,c!==null&&(w=Fn(c,s),w!==0&&w!==v.retryLane))throw v.retryLane=w,Wi(r,w),Kn(c,r,w),Xh;Iu(),i=I1(r,i,s)}else r=v.treeContext,Dt=Cr(w.nextSibling),wn=i,ct=!0,ni=null,Tr=!1,r!==null&&gy(i,r),i=bu(i,c),i.flags|=4096;return i}return r=Ca(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function _u(r,i){var s=i.ref;if(s===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(i.flags|=4194816)}}function Jh(r,i,s,c,m){return Ji(i),s=Dh(r,i,s,c,void 0,m),c=Lh(),r!==null&&!Xt?(Ph(r,i,m),Pa(r,i,m)):(ct&&c&&ph(i),i.flags|=1,On(r,i,s,m),i.child)}function M1(r,i,s,c,m,v){return Ji(i),i.updateQueue=null,s=Ly(i,c,s,m),Dy(r),c=Lh(),r!==null&&!Xt?(Ph(r,i,v),Pa(r,i,v)):(ct&&c&&ph(i),i.flags|=1,On(r,i,s,v),i.child)}function N1(r,i,s,c,m){if(Ji(i),i.stateNode===null){var v=Ko,w=s.contextType;typeof w=="object"&&w!==null&&(v=Rn(w)),v=new s(c,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Zh,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=c,v.state=i.memoizedState,v.refs={},Rh(i),w=s.contextType,v.context=typeof w=="object"&&w!==null?Rn(w):Ko,v.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Wh(i,s,w,c),v.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(w=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),w!==v.state&&Zh.enqueueReplaceState(v,v.state,null),gl(i,c,v,m),ml(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){v=i.stateNode;var I=i.memoizedProps,z=io(s,I);v.props=z;var J=v.context,se=s.contextType;w=Ko,typeof se=="object"&&se!==null&&(w=Rn(se));var ue=s.getDerivedStateFromProps;se=typeof ue=="function"||typeof v.getSnapshotBeforeUpdate=="function",I=i.pendingProps!==I,se||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(I||J!==w)&&y1(i,v,c,w),ii=!1;var te=i.memoizedState;v.state=te,gl(i,c,v,m),ml(),J=i.memoizedState,I||te!==J||ii?(typeof ue=="function"&&(Wh(i,s,ue,c),J=i.memoizedState),(z=ii||v1(i,s,z,c,te,J,w))?(se||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=J),v.props=c,v.state=J,v.context=w,c=z):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{v=i.stateNode,Oh(r,i),w=i.memoizedProps,se=io(s,w),v.props=se,ue=i.pendingProps,te=v.context,J=s.contextType,z=Ko,typeof J=="object"&&J!==null&&(z=Rn(J)),I=s.getDerivedStateFromProps,(J=typeof I=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(w!==ue||te!==z)&&y1(i,v,c,z),ii=!1,te=i.memoizedState,v.state=te,gl(i,c,v,m),ml();var ae=i.memoizedState;w!==ue||te!==ae||ii||r!==null&&r.dependencies!==null&&tu(r.dependencies)?(typeof I=="function"&&(Wh(i,s,I,c),ae=i.memoizedState),(se=ii||v1(i,s,se,c,te,ae,z)||r!==null&&r.dependencies!==null&&tu(r.dependencies))?(J||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,ae,z),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,ae,z)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||w===r.memoizedProps&&te===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&te===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ae),v.props=c,v.state=ae,v.context=z,c=se):(typeof v.componentDidUpdate!="function"||w===r.memoizedProps&&te===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&te===r.memoizedState||(i.flags|=1024),c=!1)}return v=c,_u(r,i),c=(i.flags&128)!==0,v||c?(v=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&c?(i.child=ro(i,r.child,null,m),i.child=ro(i,null,s,m)):On(r,i,s,m),i.memoizedState=v.state,r=i.child):r=Pa(r,i,m),r}function D1(r,i,s,c){return Qi(),i.flags|=256,On(r,i,s,c),i.child}var ep={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tp(r){return{baseLanes:r,cachePool:Sy()}}function np(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=lr),r}function L1(r,i,s){var c=i.pendingProps,m=!1,v=(i.flags&128)!==0,w;if((w=v)||(w=r!==null&&r.memoizedState===null?!1:(Ht.current&2)!==0),w&&(m=!0,i.flags&=-129),w=(i.flags&32)!==0,i.flags&=-33,r===null){if(ct){if(m?li(i):ci(),(r=Dt)?(r=Vb(r,Tr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ti!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=hy(r),s.return=i,i.child=s,wn=i,Dt=null)):r=null,r===null)throw ri(i);return Up(r)?i.lanes=32:i.lanes=536870912,null}var I=c.children;return c=c.fallback,m?(ci(),m=i.mode,I=Eu({mode:"hidden",children:I},m),c=Zi(c,m,s,null),I.return=i,c.return=i,I.sibling=c,i.child=I,c=i.child,c.memoizedState=tp(s),c.childLanes=np(r,w,s),i.memoizedState=ep,El(null,c)):(li(i),rp(i,I))}var z=r.memoizedState;if(z!==null&&(I=z.dehydrated,I!==null)){if(v)i.flags&256?(li(i),i.flags&=-257,i=ap(r,i,s)):i.memoizedState!==null?(ci(),i.child=r.child,i.flags|=128,i=null):(ci(),I=c.fallback,m=i.mode,c=Eu({mode:"visible",children:c.children},m),I=Zi(I,m,s,null),I.flags|=2,c.return=i,I.return=i,c.sibling=I,i.child=c,ro(i,r.child,null,s),c=i.child,c.memoizedState=tp(s),c.childLanes=np(r,w,s),i.memoizedState=ep,i=El(null,c));else if(li(i),Up(I)){if(w=I.nextSibling&&I.nextSibling.dataset,w)var J=w.dgst;w=J,c=Error(a(419)),c.stack="",c.digest=w,cl({value:c,source:null,stack:null}),i=ap(r,i,s)}else if(Xt||Xo(r,i,s,!1),w=(s&r.childLanes)!==0,Xt||w){if(w=Ct,w!==null&&(c=Fn(w,s),c!==0&&c!==z.retryLane))throw z.retryLane=c,Wi(r,c),Kn(w,r,c),Xh;jp(I)||Iu(),i=ap(r,i,s)}else jp(I)?(i.flags|=192,i.child=r.child,i=null):(r=z.treeContext,Dt=Cr(I.nextSibling),wn=i,ct=!0,ni=null,Tr=!1,r!==null&&gy(i,r),i=rp(i,c.children),i.flags|=4096);return i}return m?(ci(),I=c.fallback,m=i.mode,z=r.child,J=z.sibling,c=Ca(z,{mode:"hidden",children:c.children}),c.subtreeFlags=z.subtreeFlags&65011712,J!==null?I=Ca(J,I):(I=Zi(I,m,s,null),I.flags|=2),I.return=i,c.return=i,c.sibling=I,i.child=c,El(null,c),c=i.child,I=r.child.memoizedState,I===null?I=tp(s):(m=I.cachePool,m!==null?(z=Zt._currentValue,m=m.parent!==z?{parent:z,pool:z}:m):m=Sy(),I={baseLanes:I.baseLanes|s,cachePool:m}),c.memoizedState=I,c.childLanes=np(r,w,s),i.memoizedState=ep,El(r.child,c)):(li(i),s=r.child,r=s.sibling,s=Ca(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,r!==null&&(w=i.deletions,w===null?(i.deletions=[r],i.flags|=16):w.push(r)),i.child=s,i.memoizedState=null,s)}function rp(r,i){return i=Eu({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Eu(r,i){return r=ar(22,r,null,i),r.lanes=0,r}function ap(r,i,s){return ro(i,r.child,null,s),r=rp(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function P1(r,i,s){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),bh(r.return,i,s)}function ip(r,i,s,c,m,v){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:v}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=s,w.tailMode=m,w.treeForkCount=v)}function k1(r,i,s){var c=i.pendingProps,m=c.revealOrder,v=c.tail;c=c.children;var w=Ht.current,I=(w&2)!==0;if(I?(w=w&1|2,i.flags|=128):w&=1,ee(Ht,w),On(r,i,c,s),c=ct?ll:0,!I&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&P1(r,s,i);else if(r.tag===19)P1(r,s,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=i.child,m=null;s!==null;)r=s.alternate,r!==null&&cu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),ip(i,!1,m,s,v,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&cu(r)===null){i.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}ip(i,!0,s,null,v,c);break;case"together":ip(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Pa(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),fi|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(Xo(r,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,s=Ca(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=Ca(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function op(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&tu(r)))}function cA(r,i,s){switch(i.tag){case 3:Se(i,i.stateNode.containerInfo),ai(i,Zt,r.memoizedState.cache),Qi();break;case 27:case 5:ke(i);break;case 4:Se(i,i.stateNode.containerInfo);break;case 10:ai(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Mh(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(li(i),i.flags|=128,null):(s&i.child.childLanes)!==0?L1(r,i,s):(li(i),r=Pa(r,i,s),r!==null?r.sibling:null);li(i);break;case 19:var m=(r.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(Xo(r,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return k1(r,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ee(Ht,Ht.current),c)break;return null;case 22:return i.lanes=0,A1(r,i,s,i.pendingProps);case 24:ai(i,Zt,r.memoizedState.cache)}return Pa(r,i,s)}function j1(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)Xt=!0;else{if(!op(r,s)&&(i.flags&128)===0)return Xt=!1,cA(r,i,s);Xt=(r.flags&131072)!==0}else Xt=!1,ct&&(i.flags&1048576)!==0&&my(i,ll,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=to(i.elementType),i.type=r,typeof r=="function")dh(r)?(c=io(r,c),i.tag=1,i=N1(null,i,r,c,s)):(i.tag=0,i=Jh(null,i,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===O){i.tag=11,i=R1(null,i,r,c,s);break e}else if(m===N){i.tag=14,i=O1(null,i,r,c,s);break e}}throw i=ne(r)||r,Error(a(306,i,""))}}return i;case 0:return Jh(r,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=io(c,i.pendingProps),N1(r,i,c,m,s);case 3:e:{if(Se(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var v=i.memoizedState;m=v.element,Oh(r,i),gl(i,c,null,s);var w=i.memoizedState;if(c=w.cache,ai(i,Zt,c),c!==v.cache&&_h(i,[Zt],s,!0),ml(),c=w.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:w.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=D1(r,i,c,s);break e}else if(c!==m){m=wr(Error(a(424)),i),cl(m),i=D1(r,i,c,s);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,Dt=Cr(r.firstChild),wn=i,ct=!0,ni=null,Tr=!0,s=Ay(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Qi(),c===m){i=Pa(r,i,s);break e}On(r,i,c,s)}i=i.child}return i;case 26:return _u(r,i),r===null?(s=Kb(i.type,null,i.pendingProps,null))?i.memoizedState=s:ct||(s=i.type,r=i.pendingProps,c=ju(be.current).createElement(s),c[xn]=i,c[Vn]=r,Tn(c,s,r),pn(c),i.stateNode=c):i.memoizedState=Kb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return ke(i),r===null&&ct&&(c=i.stateNode=Gb(i.type,i.pendingProps,be.current),wn=i,Tr=!0,m=Dt,vi(i.type)?(Bp=m,Dt=Cr(c.firstChild)):Dt=m),On(r,i,i.pendingProps.children,s),_u(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&ct&&((m=c=Dt)&&(c=BA(c,i.type,i.pendingProps,Tr),c!==null?(i.stateNode=c,wn=i,Dt=Cr(c.firstChild),Tr=!1,m=!0):m=!1),m||ri(i)),ke(i),m=i.type,v=i.pendingProps,w=r!==null?r.memoizedProps:null,c=v.children,Lp(m,v)?c=null:w!==null&&Lp(m,w)&&(i.flags|=32),i.memoizedState!==null&&(m=Dh(r,i,eA,null,null,s),kl._currentValue=m),_u(r,i),On(r,i,c,s),i.child;case 6:return r===null&&ct&&((r=s=Dt)&&(s=zA(s,i.pendingProps,Tr),s!==null?(i.stateNode=s,wn=i,Dt=null,r=!0):r=!1),r||ri(i)),null;case 13:return L1(r,i,s);case 4:return Se(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=ro(i,null,c,s):On(r,i,c,s),i.child;case 11:return R1(r,i,i.type,i.pendingProps,s);case 7:return On(r,i,i.pendingProps,s),i.child;case 8:return On(r,i,i.pendingProps.children,s),i.child;case 12:return On(r,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,ai(i,i.type,c.value),On(r,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,Ji(i),m=Rn(m),c=c(m),i.flags|=1,On(r,i,c,s),i.child;case 14:return O1(r,i,i.type,i.pendingProps,s);case 15:return T1(r,i,i.type,i.pendingProps,s);case 19:return k1(r,i,s);case 31:return lA(r,i,s);case 22:return A1(r,i,s,i.pendingProps);case 24:return Ji(i),c=Rn(Zt),r===null?(m=xh(),m===null&&(m=Ct,v=Eh(),m.pooledCache=v,v.refCount++,v!==null&&(m.pooledCacheLanes|=s),m=v),i.memoizedState={parent:c,cache:m},Rh(i),ai(i,Zt,m)):((r.lanes&s)!==0&&(Oh(r,i),gl(i,null,null,s),ml()),m=r.memoizedState,v=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),ai(i,Zt,c)):(c=v.cache,ai(i,Zt,c),c!==m.cache&&_h(i,[Zt],s,!0))),On(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function ka(r){r.flags|=4}function sp(r,i,s,c,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(ub())r.flags|=8192;else throw no=iu,wh}else r.flags&=-16777217}function U1(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Jb(i))if(ub())r.flags|=8192;else throw no=iu,wh}function Su(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?St():536870912,r.lanes|=i,us|=i)}function Sl(r,i){if(!ct)switch(r.tailMode){case"hidden":i=r.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Lt(r){var i=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(i)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=s,i}function uA(r,i,s){var c=i.pendingProps;switch(mh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(i),null;case 1:return Lt(i),null;case 3:return s=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Na(Zt),Pe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Qo(i)?ka(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,vh())),Lt(i),null;case 26:var m=i.type,v=i.memoizedState;return r===null?(ka(i),v!==null?(Lt(i),U1(i,v)):(Lt(i),sp(i,m,null,c,s))):v?v!==r.memoizedState?(ka(i),Lt(i),U1(i,v)):(Lt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&ka(i),Lt(i),sp(i,m,r,c,s)),null;case 27:if(Ee(i),s=be.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&ka(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Lt(i),null}r=oe.current,Qo(i)?vy(i):(r=Gb(m,c,s),i.stateNode=r,ka(i))}return Lt(i),null;case 5:if(Ee(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&ka(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Lt(i),null}if(v=oe.current,Qo(i))vy(i);else{var w=ju(be.current);switch(v){case 1:v=w.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:v=w.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":v=w.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":v=w.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":v=w.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof c.is=="string"?w.createElement("select",{is:c.is}):w.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?w.createElement(m,{is:c.is}):w.createElement(m)}}v[xn]=i,v[Vn]=c;e:for(w=i.child;w!==null;){if(w.tag===5||w.tag===6)v.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===i)break e;for(;w.sibling===null;){if(w.return===null||w.return===i)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}i.stateNode=v;e:switch(Tn(v,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&ka(i)}}return Lt(i),sp(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&ka(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=be.current,Qo(i)){if(r=i.stateNode,s=i.memoizedProps,c=null,m=wn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[xn]=i,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||Lb(r.nodeValue,s)),r||ri(i,!0)}else r=ju(r).createTextNode(c),r[xn]=i,i.stateNode=r}return Lt(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(c=Qo(i),s!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[xn]=i}else Qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Lt(i),r=!1}else s=vh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(or(i),i):(or(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Lt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Qo(i),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[xn]=i}else Qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Lt(i),m=!1}else m=vh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(or(i),i):(or(i),null)}return or(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==m&&(c.flags|=2048)),s!==r&&s&&(i.child.flags|=8192),Su(i,i.updateQueue),Lt(i),null);case 4:return Pe(),r===null&&Cp(i.stateNode.containerInfo),Lt(i),null;case 10:return Na(i.type),Lt(i),null;case 19:if(Q(Ht),c=i.memoizedState,c===null)return Lt(i),null;if(m=(i.flags&128)!==0,v=c.rendering,v===null)if(m)Sl(c,!1);else{if(Ft!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=cu(r),v!==null){for(i.flags|=128,Sl(c,!1),r=v.updateQueue,i.updateQueue=r,Su(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)fy(s,r),s=s.sibling;return ee(Ht,Ht.current&1|2),ct&&Ia(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&ce()>Tu&&(i.flags|=128,m=!0,Sl(c,!1),i.lanes=4194304)}else{if(!m)if(r=cu(v),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,Su(i,r),Sl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!ct)return Lt(i),null}else 2*ce()-c.renderingStartTime>Tu&&s!==536870912&&(i.flags|=128,m=!0,Sl(c,!1),i.lanes=4194304);c.isBackwards?(v.sibling=i.child,i.child=v):(r=c.last,r!==null?r.sibling=v:i.child=v,c.last=v)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=ce(),r.sibling=null,s=Ht.current,ee(Ht,m?s&1|2:s&1),ct&&Ia(i,c.treeForkCount),r):(Lt(i),null);case 22:case 23:return or(i),Ih(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(Lt(i),i.subtreeFlags&6&&(i.flags|=8192)):Lt(i),s=i.updateQueue,s!==null&&Su(i,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),r!==null&&Q(eo),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Na(Zt),Lt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function dA(r,i){switch(mh(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Na(Zt),Pe(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Ee(i),null;case 31:if(i.memoizedState!==null){if(or(i),i.alternate===null)throw Error(a(340));Qi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(or(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Qi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Q(Ht),null;case 4:return Pe(),null;case 10:return Na(i.type),null;case 22:case 23:return or(i),Ih(),r!==null&&Q(eo),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Na(Zt),null;case 25:return null;default:return null}}function B1(r,i){switch(mh(i),i.tag){case 3:Na(Zt),Pe();break;case 26:case 27:case 5:Ee(i);break;case 4:Pe();break;case 31:i.memoizedState!==null&&or(i);break;case 13:or(i);break;case 19:Q(Ht);break;case 10:Na(i.type);break;case 22:case 23:or(i),Ih(),r!==null&&Q(eo);break;case 24:Na(Zt)}}function xl(r,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&r)===r){c=void 0;var v=s.create,w=s.inst;c=v(),w.destroy=c}s=s.next}while(s!==m)}}catch(I){_t(i,i.return,I)}}function ui(r,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var v=m.next;c=v;do{if((c.tag&r)===r){var w=c.inst,I=w.destroy;if(I!==void 0){w.destroy=void 0,m=i;var z=s,J=I;try{J()}catch(se){_t(m,z,se)}}}c=c.next}while(c!==v)}}catch(se){_t(i,i.return,se)}}function z1(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{Iy(i,s)}catch(c){_t(r,r.return,c)}}}function F1(r,i,s){s.props=io(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){_t(r,i,c)}}function wl(r,i){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof s=="function"?r.refCleanup=s(c):s.current=c}}catch(m){_t(r,i,m)}}function aa(r,i){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){_t(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){_t(r,i,m)}else s.current=null}function V1(r){var i=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){_t(r,r.return,m)}}function lp(r,i,s){try{var c=r.stateNode;DA(c,r.type,s,i),c[Vn]=i}catch(m){_t(r,r.return,m)}}function H1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&vi(r.type)||r.tag===4}function cp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||H1(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&vi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function up(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(r),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Ta));else if(c!==4&&(c===27&&vi(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(up(r,i,s),r=r.sibling;r!==null;)up(r,i,s),r=r.sibling}function xu(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?s.insertBefore(r,i):s.appendChild(r);else if(c!==4&&(c===27&&vi(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(xu(r,i,s),r=r.sibling;r!==null;)xu(r,i,s),r=r.sibling}function $1(r){var i=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Tn(i,c,s),i[xn]=r,i[Vn]=s}catch(v){_t(r,r.return,v)}}var ja=!1,Jt=!1,dp=!1,G1=typeof WeakSet=="function"?WeakSet:Set,mn=null;function fA(r,i){if(r=r.containerInfo,Np=$u,r=ry(r),ah(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var w=0,I=-1,z=-1,J=0,se=0,ue=r,te=null;t:for(;;){for(var ae;ue!==s||m!==0&&ue.nodeType!==3||(I=w+m),ue!==v||c!==0&&ue.nodeType!==3||(z=w+c),ue.nodeType===3&&(w+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)te=ue,ue=ae;for(;;){if(ue===r)break t;if(te===s&&++J===m&&(I=w),te===v&&++se===c&&(z=w),(ae=ue.nextSibling)!==null)break;ue=te,te=ue.parentNode}ue=ae}s=I===-1||z===-1?null:{start:I,end:z}}else s=null}s=s||{start:0,end:0}}else s=null;for(Dp={focusedElem:r,selectionRange:s},$u=!1,mn=i;mn!==null;)if(i=mn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,mn=r;else for(;mn!==null;){switch(i=mn,v=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,s=i,m=v.memoizedProps,v=v.memoizedState,c=s.stateNode;try{var Te=io(s.type,m);r=c.getSnapshotBeforeUpdate(Te,v),c.__reactInternalSnapshotBeforeUpdate=r}catch(Be){_t(s,s.return,Be)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)kp(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":kp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,mn=r;break}mn=i.return}}function q1(r,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Ba(r,s),c&4&&xl(5,s);break;case 1:if(Ba(r,s),c&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(w){_t(s,s.return,w)}else{var m=io(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(w){_t(s,s.return,w)}}c&64&&z1(s),c&512&&wl(s,s.return);break;case 3:if(Ba(r,s),c&64&&(r=s.updateQueue,r!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Iy(r,i)}catch(w){_t(s,s.return,w)}}break;case 27:i===null&&c&4&&$1(s);case 26:case 5:Ba(r,s),i===null&&c&4&&V1(s),c&512&&wl(s,s.return);break;case 12:Ba(r,s);break;case 31:Ba(r,s),c&4&&W1(r,s);break;case 13:Ba(r,s),c&4&&Z1(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=EA.bind(null,s),FA(r,s))));break;case 22:if(c=s.memoizedState!==null||ja,!c){i=i!==null&&i.memoizedState!==null||Jt,m=ja;var v=Jt;ja=c,(Jt=i)&&!v?za(r,s,(s.subtreeFlags&8772)!==0):Ba(r,s),ja=m,Jt=v}break;case 30:break;default:Ba(r,s)}}function Y1(r){var i=r.alternate;i!==null&&(r.alternate=null,Y1(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Ff(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var kt=null,$n=!1;function Ua(r,i,s){for(s=s.child;s!==null;)K1(r,i,s),s=s.sibling}function K1(r,i,s){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Kt,s)}catch{}switch(s.tag){case 26:Jt||aa(s,i),Ua(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Jt||aa(s,i);var c=kt,m=$n;vi(s.type)&&(kt=s.stateNode,$n=!1),Ua(r,i,s),Dl(s.stateNode),kt=c,$n=m;break;case 5:Jt||aa(s,i);case 6:if(c=kt,m=$n,kt=null,Ua(r,i,s),kt=c,$n=m,kt!==null)if($n)try{(kt.nodeType===9?kt.body:kt.nodeName==="HTML"?kt.ownerDocument.body:kt).removeChild(s.stateNode)}catch(v){_t(s,i,v)}else try{kt.removeChild(s.stateNode)}catch(v){_t(s,i,v)}break;case 18:kt!==null&&($n?(r=kt,zb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),ys(r)):zb(kt,s.stateNode));break;case 4:c=kt,m=$n,kt=s.stateNode.containerInfo,$n=!0,Ua(r,i,s),kt=c,$n=m;break;case 0:case 11:case 14:case 15:ui(2,s,i),Jt||ui(4,s,i),Ua(r,i,s);break;case 1:Jt||(aa(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&F1(s,i,c)),Ua(r,i,s);break;case 21:Ua(r,i,s);break;case 22:Jt=(c=Jt)||s.memoizedState!==null,Ua(r,i,s),Jt=c;break;default:Ua(r,i,s)}}function W1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ys(r)}catch(s){_t(i,i.return,s)}}}function Z1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ys(r)}catch(s){_t(i,i.return,s)}}function hA(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new G1),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new G1),i;default:throw Error(a(435,r.tag))}}function wu(r,i){var s=hA(r);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=SA.bind(null,r,c);c.then(m,m)}})}function Gn(r,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],v=r,w=i,I=w;e:for(;I!==null;){switch(I.tag){case 27:if(vi(I.type)){kt=I.stateNode,$n=!1;break e}break;case 5:kt=I.stateNode,$n=!1;break e;case 3:case 4:kt=I.stateNode.containerInfo,$n=!0;break e}I=I.return}if(kt===null)throw Error(a(160));K1(v,w,m),kt=null,$n=!1,v=m.alternate,v!==null&&(v.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Q1(i,r),i=i.sibling}var Vr=null;function Q1(r,i){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Gn(i,r),qn(r),c&4&&(ui(3,r,r.return),xl(3,r),ui(5,r,r.return));break;case 1:Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),c&64&&ja&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Vr;if(Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),c&4){var v=s!==null?s.memoizedState:null;if(c=r.memoizedState,s===null)if(c===null)if(r.stateNode===null){e:{c=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":v=m.getElementsByTagName("title")[0],(!v||v[Qs]||v[xn]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=m.createElement(c),m.head.insertBefore(v,m.querySelector("head > title"))),Tn(v,c,s),v[xn]=r,pn(v),c=v;break e;case"link":var w=Qb("link","href",m).get(c+(s.href||""));if(w){for(var I=0;I<w.length;I++)if(v=w[I],v.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&v.getAttribute("rel")===(s.rel==null?null:s.rel)&&v.getAttribute("title")===(s.title==null?null:s.title)&&v.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){w.splice(I,1);break t}}v=m.createElement(c),Tn(v,c,s),m.head.appendChild(v);break;case"meta":if(w=Qb("meta","content",m).get(c+(s.content||""))){for(I=0;I<w.length;I++)if(v=w[I],v.getAttribute("content")===(s.content==null?null:""+s.content)&&v.getAttribute("name")===(s.name==null?null:s.name)&&v.getAttribute("property")===(s.property==null?null:s.property)&&v.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&v.getAttribute("charset")===(s.charSet==null?null:s.charSet)){w.splice(I,1);break t}}v=m.createElement(c),Tn(v,c,s),m.head.appendChild(v);break;default:throw Error(a(468,c))}v[xn]=r,pn(v),c=v}r.stateNode=c}else Xb(m,r.type,r.stateNode);else r.stateNode=Zb(m,c,r.memoizedProps);else v!==c?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,c===null?Xb(m,r.type,r.stateNode):Zb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&lp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),s!==null&&c&4&&lp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Gn(i,r),qn(r),c&512&&(Jt||s===null||aa(s,s.return)),r.flags&32){m=r.stateNode;try{Fo(m,"")}catch(Te){_t(r,r.return,Te)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,lp(r,m,s!==null?s.memoizedProps:m)),c&1024&&(dp=!0);break;case 6:if(Gn(i,r),qn(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(Te){_t(r,r.return,Te)}}break;case 3:if(zu=null,m=Vr,Vr=Uu(i.containerInfo),Gn(i,r),Vr=m,qn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{ys(i.containerInfo)}catch(Te){_t(r,r.return,Te)}dp&&(dp=!1,X1(r));break;case 4:c=Vr,Vr=Uu(r.stateNode.containerInfo),Gn(i,r),qn(r),Vr=c;break;case 12:Gn(i,r),qn(r);break;case 31:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,wu(r,c)));break;case 13:Gn(i,r),qn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ou=ce()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,wu(r,c)));break;case 22:m=r.memoizedState!==null;var z=s!==null&&s.memoizedState!==null,J=ja,se=Jt;if(ja=J||m,Jt=se||z,Gn(i,r),Jt=se,ja=J,qn(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||z||ja||Jt||oo(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){z=s=i;try{if(v=z.stateNode,m)w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{I=z.stateNode;var ue=z.memoizedProps.style,te=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;I.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Te){_t(z,z.return,Te)}}}else if(i.tag===6){if(s===null){z=i;try{z.stateNode.nodeValue=m?"":z.memoizedProps}catch(Te){_t(z,z.return,Te)}}}else if(i.tag===18){if(s===null){z=i;try{var ae=z.stateNode;m?Fb(ae,!0):Fb(z.stateNode,!1)}catch(Te){_t(z,z.return,Te)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,wu(r,s))));break;case 19:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,wu(r,c)));break;case 30:break;case 21:break;default:Gn(i,r),qn(r)}}function qn(r){var i=r.flags;if(i&2){try{for(var s,c=r.return;c!==null;){if(H1(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,v=cp(r);xu(r,v,m);break;case 5:var w=s.stateNode;s.flags&32&&(Fo(w,""),s.flags&=-33);var I=cp(r);xu(r,I,w);break;case 3:case 4:var z=s.stateNode.containerInfo,J=cp(r);up(r,J,z);break;default:throw Error(a(161))}}catch(se){_t(r,r.return,se)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function X1(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;X1(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Ba(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)q1(r,i.alternate,i),i=i.sibling}function oo(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:ui(4,i,i.return),oo(i);break;case 1:aa(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&F1(i,i.return,s),oo(i);break;case 27:Dl(i.stateNode);case 26:case 5:aa(i,i.return),oo(i);break;case 22:i.memoizedState===null&&oo(i);break;case 30:oo(i);break;default:oo(i)}r=r.sibling}}function za(r,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=r,v=i,w=v.flags;switch(v.tag){case 0:case 11:case 15:za(m,v,s),xl(4,v);break;case 1:if(za(m,v,s),c=v,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(J){_t(c,c.return,J)}if(c=v,m=c.updateQueue,m!==null){var I=c.stateNode;try{var z=m.shared.hiddenCallbacks;if(z!==null)for(m.shared.hiddenCallbacks=null,m=0;m<z.length;m++)Cy(z[m],I)}catch(J){_t(c,c.return,J)}}s&&w&64&&z1(v),wl(v,v.return);break;case 27:$1(v);case 26:case 5:za(m,v,s),s&&c===null&&w&4&&V1(v),wl(v,v.return);break;case 12:za(m,v,s);break;case 31:za(m,v,s),s&&w&4&&W1(m,v);break;case 13:za(m,v,s),s&&w&4&&Z1(m,v);break;case 22:v.memoizedState===null&&za(m,v,s),wl(v,v.return);break;case 30:break;default:za(m,v,s)}i=i.sibling}}function fp(r,i){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&ul(s))}function hp(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&ul(r))}function Hr(r,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)J1(r,i,s,c),i=i.sibling}function J1(r,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Hr(r,i,s,c),m&2048&&xl(9,i);break;case 1:Hr(r,i,s,c);break;case 3:Hr(r,i,s,c),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&ul(r)));break;case 12:if(m&2048){Hr(r,i,s,c),r=i.stateNode;try{var v=i.memoizedProps,w=v.id,I=v.onPostCommit;typeof I=="function"&&I(w,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(z){_t(i,i.return,z)}}else Hr(r,i,s,c);break;case 31:Hr(r,i,s,c);break;case 13:Hr(r,i,s,c);break;case 23:break;case 22:v=i.stateNode,w=i.alternate,i.memoizedState!==null?v._visibility&2?Hr(r,i,s,c):Rl(r,i):v._visibility&2?Hr(r,i,s,c):(v._visibility|=2,ss(r,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&fp(w,i);break;case 24:Hr(r,i,s,c),m&2048&&hp(i.alternate,i);break;default:Hr(r,i,s,c)}}function ss(r,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,w=i,I=s,z=c,J=w.flags;switch(w.tag){case 0:case 11:case 15:ss(v,w,I,z,m),xl(8,w);break;case 23:break;case 22:var se=w.stateNode;w.memoizedState!==null?se._visibility&2?ss(v,w,I,z,m):Rl(v,w):(se._visibility|=2,ss(v,w,I,z,m)),m&&J&2048&&fp(w.alternate,w);break;case 24:ss(v,w,I,z,m),m&&J&2048&&hp(w.alternate,w);break;default:ss(v,w,I,z,m)}i=i.sibling}}function Rl(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=r,c=i,m=c.flags;switch(c.tag){case 22:Rl(s,c),m&2048&&fp(c.alternate,c);break;case 24:Rl(s,c),m&2048&&hp(c.alternate,c);break;default:Rl(s,c)}i=i.sibling}}var Ol=8192;function ls(r,i,s){if(r.subtreeFlags&Ol)for(r=r.child;r!==null;)eb(r,i,s),r=r.sibling}function eb(r,i,s){switch(r.tag){case 26:ls(r,i,s),r.flags&Ol&&r.memoizedState!==null&&JA(s,Vr,r.memoizedState,r.memoizedProps);break;case 5:ls(r,i,s);break;case 3:case 4:var c=Vr;Vr=Uu(r.stateNode.containerInfo),ls(r,i,s),Vr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Ol,Ol=16777216,ls(r,i,s),Ol=c):ls(r,i,s));break;default:ls(r,i,s)}}function tb(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Tl(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];mn=c,rb(c,r)}tb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)nb(r),r=r.sibling}function nb(r){switch(r.tag){case 0:case 11:case 15:Tl(r),r.flags&2048&&ui(9,r,r.return);break;case 3:Tl(r);break;case 12:Tl(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Ru(r)):Tl(r);break;default:Tl(r)}}function Ru(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];mn=c,rb(c,r)}tb(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:ui(8,i,i.return),Ru(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Ru(i));break;default:Ru(i)}r=r.sibling}}function rb(r,i){for(;mn!==null;){var s=mn;switch(s.tag){case 0:case 11:case 15:ui(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:ul(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,mn=c;else e:for(s=r;mn!==null;){c=mn;var m=c.sibling,v=c.return;if(Y1(c),c===s){mn=null;break e}if(m!==null){m.return=v,mn=m;break e}mn=v}}}var pA={getCacheForType:function(r){var i=Rn(Zt),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return Rn(Zt).controller.signal}},mA=typeof WeakMap=="function"?WeakMap:Map,vt=0,Ct=null,rt=null,st=0,bt=0,sr=null,di=!1,cs=!1,pp=!1,Fa=0,Ft=0,fi=0,so=0,mp=0,lr=0,us=0,Al=null,Yn=null,gp=!1,Ou=0,ab=0,Tu=1/0,Au=null,hi=null,ln=0,pi=null,ds=null,Va=0,vp=0,yp=null,ib=null,Cl=0,bp=null;function cr(){return(vt&2)!==0&&st!==0?st&-st:P.T!==null?Rp():Bf()}function ob(){if(lr===0)if((st&536870912)===0||ct){var r=dt;dt<<=1,(dt&3932160)===0&&(dt=262144),lr=r}else lr=536870912;return r=ir.current,r!==null&&(r.flags|=32),lr}function Kn(r,i,s){(r===Ct&&(bt===2||bt===9)||r.cancelPendingCommit!==null)&&(fs(r,0),mi(r,st,lr,!1)),ht(r,s),((vt&2)===0||r!==Ct)&&(r===Ct&&((vt&2)===0&&(so|=s),Ft===4&&mi(r,st,lr,!1)),ia(r))}function sb(r,i,s){if((vt&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&r.expiredLanes)===0||Xe(r,i),m=c?yA(r,i):Ep(r,i,!0),v=c;do{if(m===0){cs&&!c&&mi(r,i,0,!1);break}else{if(s=r.current.alternate,v&&!gA(s)){m=Ep(r,i,!1),v=!1;continue}if(m===2){if(v=i,r.errorRecoveryDisabledLanes&v)var w=0;else w=r.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){i=w;e:{var I=r;m=Al;var z=I.current.memoizedState.isDehydrated;if(z&&(fs(I,w).flags|=256),w=Ep(I,w,!1),w!==2){if(pp&&!z){I.errorRecoveryDisabledLanes|=v,so|=v,m=4;break e}v=Yn,Yn=m,v!==null&&(Yn===null?Yn=v:Yn.push.apply(Yn,v))}m=w}if(v=!1,m!==2)continue}}if(m===1){fs(r,0),mi(r,i,0,!0);break}e:{switch(c=r,v=m,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:mi(c,i,lr,!di);break e;case 2:Yn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=Ou+300-ce(),10<m)){if(mi(c,i,lr,!di),Ne(c,0,!0)!==0)break e;Va=i,c.timeoutHandle=Ub(lb.bind(null,c,s,Yn,Au,gp,i,lr,so,us,di,v,"Throttled",-0,0),m);break e}lb(c,s,Yn,Au,gp,i,lr,so,us,di,v,null,-0,0)}}break}while(!0);ia(r)}function lb(r,i,s,c,m,v,w,I,z,J,se,ue,te,ae){if(r.timeoutHandle=-1,ue=i.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ta},eb(i,v,ue);var Te=(v&62914560)===v?Ou-ce():(v&4194048)===v?ab-ce():0;if(Te=eC(ue,Te),Te!==null){Va=v,r.cancelPendingCommit=Te(gb.bind(null,r,i,v,s,c,m,w,I,z,se,ue,null,te,ae)),mi(r,v,w,!J);return}}gb(r,i,v,s,c,m,w,I,z)}function gA(r){for(var i=r;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],v=m.getSnapshot;m=m.value;try{if(!rr(v(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function mi(r,i,s,c){i&=~mp,i&=~so,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var m=i;0<m;){var v=31-Wt(m),w=1<<v;c[v]=-1,m&=~w}s!==0&&_r(r,s,i)}function Cu(){return(vt&6)===0?(Il(0),!1):!0}function _p(){if(rt!==null){if(bt===0)var r=rt.return;else r=rt,Ma=Xi=null,kh(r),ns=null,fl=0,r=rt;for(;r!==null;)B1(r.alternate,r),r=r.return;rt=null}}function fs(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,kA(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Va=0,_p(),Ct=r,rt=s=Ca(r.current,null),st=i,bt=0,sr=null,di=!1,cs=Xe(r,i),pp=!1,us=lr=mp=so=fi=Ft=0,Yn=Al=null,gp=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var m=31-Wt(c),v=1<<m;i|=r[m],c&=~v}return Fa=i,Zc(),s}function cb(r,i){qe=null,P.H=_l,i===ts||i===au?(i=Ry(),bt=3):i===wh?(i=Ry(),bt=4):bt=i===Xh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,sr=i,rt===null&&(Ft=1,yu(r,wr(i,r.current)))}function ub(){var r=ir.current;return r===null?!0:(st&4194048)===st?Ar===null:(st&62914560)===st||(st&536870912)!==0?r===Ar:!1}function db(){var r=P.H;return P.H=_l,r===null?_l:r}function fb(){var r=P.A;return P.A=pA,r}function Iu(){Ft=4,di||(st&4194048)!==st&&ir.current!==null||(cs=!0),(fi&134217727)===0&&(so&134217727)===0||Ct===null||mi(Ct,st,lr,!1)}function Ep(r,i,s){var c=vt;vt|=2;var m=db(),v=fb();(Ct!==r||st!==i)&&(Au=null,fs(r,i)),i=!1;var w=Ft;e:do try{if(bt!==0&&rt!==null){var I=rt,z=sr;switch(bt){case 8:_p(),w=6;break e;case 3:case 2:case 9:case 6:ir.current===null&&(i=!0);var J=bt;if(bt=0,sr=null,hs(r,I,z,J),s&&cs){w=0;break e}break;default:J=bt,bt=0,sr=null,hs(r,I,z,J)}}vA(),w=Ft;break}catch(se){cb(r,se)}while(!0);return i&&r.shellSuspendCounter++,Ma=Xi=null,vt=c,P.H=m,P.A=v,rt===null&&(Ct=null,st=0,Zc()),w}function vA(){for(;rt!==null;)hb(rt)}function yA(r,i){var s=vt;vt|=2;var c=db(),m=fb();Ct!==r||st!==i?(Au=null,Tu=ce()+500,fs(r,i)):cs=Xe(r,i);e:do try{if(bt!==0&&rt!==null){i=rt;var v=sr;t:switch(bt){case 1:bt=0,sr=null,hs(r,i,v,1);break;case 2:case 9:if(xy(v)){bt=0,sr=null,pb(i);break}i=function(){bt!==2&&bt!==9||Ct!==r||(bt=7),ia(r)},v.then(i,i);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:xy(v)?(bt=0,sr=null,pb(i)):(bt=0,sr=null,hs(r,i,v,7));break;case 5:var w=null;switch(rt.tag){case 26:w=rt.memoizedState;case 5:case 27:var I=rt;if(w?Jb(w):I.stateNode.complete){bt=0,sr=null;var z=I.sibling;if(z!==null)rt=z;else{var J=I.return;J!==null?(rt=J,Mu(J)):rt=null}break t}}bt=0,sr=null,hs(r,i,v,5);break;case 6:bt=0,sr=null,hs(r,i,v,6);break;case 8:_p(),Ft=6;break e;default:throw Error(a(462))}}bA();break}catch(se){cb(r,se)}while(!0);return Ma=Xi=null,P.H=c,P.A=m,vt=s,rt!==null?0:(Ct=null,st=0,Zc(),Ft)}function bA(){for(;rt!==null&&!q();)hb(rt)}function hb(r){var i=j1(r.alternate,r,Fa);r.memoizedProps=r.pendingProps,i===null?Mu(r):rt=i}function pb(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=M1(s,i,i.pendingProps,i.type,void 0,st);break;case 11:i=M1(s,i,i.pendingProps,i.type.render,i.ref,st);break;case 5:kh(i);default:B1(s,i),i=rt=fy(i,Fa),i=j1(s,i,Fa)}r.memoizedProps=r.pendingProps,i===null?Mu(r):rt=i}function hs(r,i,s,c){Ma=Xi=null,kh(i),ns=null,fl=0;var m=i.return;try{if(sA(r,m,i,s,st)){Ft=1,yu(r,wr(s,r.current)),rt=null;return}}catch(v){if(m!==null)throw rt=m,v;Ft=1,yu(r,wr(s,r.current)),rt=null;return}i.flags&32768?(ct||c===1?r=!0:cs||(st&536870912)!==0?r=!1:(di=r=!0,(c===2||c===9||c===3||c===6)&&(c=ir.current,c!==null&&c.tag===13&&(c.flags|=16384))),mb(i,r)):Mu(i)}function Mu(r){var i=r;do{if((i.flags&32768)!==0){mb(i,di);return}r=i.return;var s=uA(i.alternate,i,Fa);if(s!==null){rt=s;return}if(i=i.sibling,i!==null){rt=i;return}rt=i=r}while(i!==null);Ft===0&&(Ft=5)}function mb(r,i){do{var s=dA(r.alternate,r);if(s!==null){s.flags&=32767,rt=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){rt=r;return}rt=r=s}while(r!==null);Ft=6,rt=null}function gb(r,i,s,c,m,v,w,I,z){r.cancelPendingCommit=null;do Nu();while(ln!==0);if((vt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=ch,Nt(r,s,v,w,I,z),r===Ct&&(rt=Ct=null,st=0),ds=i,pi=r,Va=s,vp=v,yp=m,ib=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,xA(He,function(){return Eb(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,m=F.p,F.p=2,w=vt,vt|=4;try{fA(r,i,s)}finally{vt=w,F.p=m,P.T=c}}ln=1,vb(),yb(),bb()}}function vb(){if(ln===1){ln=0;var r=pi,i=ds,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var c=F.p;F.p=2;var m=vt;vt|=4;try{Q1(i,r);var v=Dp,w=ry(r.containerInfo),I=v.focusedElem,z=v.selectionRange;if(w!==I&&I&&I.ownerDocument&&ny(I.ownerDocument.documentElement,I)){if(z!==null&&ah(I)){var J=z.start,se=z.end;if(se===void 0&&(se=J),"selectionStart"in I)I.selectionStart=J,I.selectionEnd=Math.min(se,I.value.length);else{var ue=I.ownerDocument||document,te=ue&&ue.defaultView||window;if(te.getSelection){var ae=te.getSelection(),Te=I.textContent.length,Be=Math.min(z.start,Te),Rt=z.end===void 0?Be:Math.min(z.end,Te);!ae.extend&&Be>Rt&&(w=Rt,Rt=Be,Be=w);var K=ty(I,Be),H=ty(I,Rt);if(K&&H&&(ae.rangeCount!==1||ae.anchorNode!==K.node||ae.anchorOffset!==K.offset||ae.focusNode!==H.node||ae.focusOffset!==H.offset)){var X=ue.createRange();X.setStart(K.node,K.offset),ae.removeAllRanges(),Be>Rt?(ae.addRange(X),ae.extend(H.node,H.offset)):(X.setEnd(H.node,H.offset),ae.addRange(X))}}}}for(ue=[],ae=I;ae=ae.parentNode;)ae.nodeType===1&&ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<ue.length;I++){var le=ue[I];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}$u=!!Np,Dp=Np=null}finally{vt=m,F.p=c,P.T=s}}r.current=i,ln=2}}function yb(){if(ln===2){ln=0;var r=pi,i=ds,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var c=F.p;F.p=2;var m=vt;vt|=4;try{q1(r,i.alternate,i)}finally{vt=m,F.p=c,P.T=s}}ln=3}}function bb(){if(ln===4||ln===3){ln=0,Y();var r=pi,i=ds,s=Va,c=ib;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ln=5:(ln=0,ds=pi=null,_b(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(hi=null),zr(s),i=i.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Kt,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=P.T,m=F.p,F.p=2,P.T=null;try{for(var v=r.onRecoverableError,w=0;w<c.length;w++){var I=c[w];v(I.value,{componentStack:I.stack})}}finally{P.T=i,F.p=m}}(Va&3)!==0&&Nu(),ia(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===bp?Cl++:(Cl=0,bp=r):Cl=0,Il(0)}}function _b(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,ul(i)))}function Nu(){return vb(),yb(),bb(),Eb()}function Eb(){if(ln!==5)return!1;var r=pi,i=vp;vp=0;var s=zr(Va),c=P.T,m=F.p;try{F.p=32>s?32:s,P.T=null,s=yp,yp=null;var v=pi,w=Va;if(ln=0,ds=pi=null,Va=0,(vt&6)!==0)throw Error(a(331));var I=vt;if(vt|=4,nb(v.current),J1(v,v.current,w,s),vt=I,Il(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Kt,v)}catch{}return!0}finally{F.p=m,P.T=c,_b(r,i)}}function Sb(r,i,s){i=wr(s,i),i=Qh(r.stateNode,i,2),r=si(r,i,2),r!==null&&(ht(r,2),ia(r))}function _t(r,i,s){if(r.tag===3)Sb(r,r,s);else for(;i!==null;){if(i.tag===3){Sb(i,r,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(hi===null||!hi.has(c))){r=wr(s,r),s=x1(2),c=si(i,s,2),c!==null&&(w1(s,c,i,r),ht(c,2),ia(c));break}}i=i.return}}function Sp(r,i,s){var c=r.pingCache;if(c===null){c=r.pingCache=new mA;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(pp=!0,m.add(s),r=_A.bind(null,r,i,s),i.then(r,r))}function _A(r,i,s){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Ct===r&&(st&s)===s&&(Ft===4||Ft===3&&(st&62914560)===st&&300>ce()-Ou?(vt&2)===0&&fs(r,0):mp|=s,us===st&&(us=0)),ia(r)}function xb(r,i){i===0&&(i=St()),r=Wi(r,i),r!==null&&(ht(r,i),ia(r))}function EA(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),xb(r,s)}function SA(r,i){var s=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),xb(r,s)}function xA(r,i){return tt(r,i)}var Du=null,ps=null,xp=!1,Lu=!1,wp=!1,gi=0;function ia(r){r!==ps&&r.next===null&&(ps===null?Du=ps=r:ps=ps.next=r),Lu=!0,xp||(xp=!0,RA())}function Il(r,i){if(!wp&&Lu){wp=!0;do for(var s=!1,c=Du;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var v=0;else{var w=c.suspendedLanes,I=c.pingedLanes;v=(1<<31-Wt(42|r)+1)-1,v&=m&~(w&~I),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,Tb(c,v))}else v=st,v=Ne(c,c===Ct?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||Xe(c,v)||(s=!0,Tb(c,v));c=c.next}while(s);wp=!1}}function wA(){wb()}function wb(){Lu=xp=!1;var r=0;gi!==0&&PA()&&(r=gi);for(var i=ce(),s=null,c=Du;c!==null;){var m=c.next,v=Rb(c,i);v===0?(c.next=null,s===null?Du=m:s.next=m,m===null&&(ps=s)):(s=c,(r!==0||(v&3)!==0)&&(Lu=!0)),c=m}ln!==0&&ln!==5||Il(r),gi!==0&&(gi=0)}function Rb(r,i){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var w=31-Wt(v),I=1<<w,z=m[w];z===-1?((I&s)===0||(I&c)!==0)&&(m[w]=At(I,i)):z<=i&&(r.expiredLanes|=I),v&=~I}if(i=Ct,s=st,s=Ne(r,r===i?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===i&&(bt===2||bt===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&B(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Xe(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(c!==null&&B(c),zr(s)){case 2:case 8:s=we;break;case 32:s=He;break;case 268435456:s=Tt;break;default:s=He}return c=Ob.bind(null,r),s=tt(s,c),r.callbackPriority=i,r.callbackNode=s,i}return c!==null&&c!==null&&B(c),r.callbackPriority=2,r.callbackNode=null,2}function Ob(r,i){if(ln!==0&&ln!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Nu()&&r.callbackNode!==s)return null;var c=st;return c=Ne(r,r===Ct?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(sb(r,c,i),Rb(r,ce()),r.callbackNode!=null&&r.callbackNode===s?Ob.bind(null,r):null)}function Tb(r,i){if(Nu())return null;sb(r,i,!0)}function RA(){jA(function(){(vt&6)!==0?tt(fe,wA):wb()})}function Rp(){if(gi===0){var r=Jo;r===0&&(r=ot,ot<<=1,(ot&261888)===0&&(ot=256)),gi=r}return gi}function Ab(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Vc(""+r)}function Cb(r,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,r.id&&s.setAttribute("form",r.id),i.parentNode.insertBefore(s,i),r=new FormData(r),s.parentNode.removeChild(s),r}function OA(r,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var v=Ab((m[Vn]||null).action),w=c.submitter;w&&(i=(i=w[Vn]||null)?Ab(i.formAction):w.getAttribute("formAction"),i!==null&&(v=i,w=null));var I=new qc("action","action",null,c,m);r.push({event:I,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(gi!==0){var z=w?Cb(m,w):new FormData(m);Gh(s,{pending:!0,data:z,method:m.method,action:v},null,z)}}else typeof v=="function"&&(I.preventDefault(),z=w?Cb(m,w):new FormData(m),Gh(s,{pending:!0,data:z,method:m.method,action:v},v,z))},currentTarget:m}]})}}for(var Op=0;Op<lh.length;Op++){var Tp=lh[Op],TA=Tp.toLowerCase(),AA=Tp[0].toUpperCase()+Tp.slice(1);Fr(TA,"on"+AA)}Fr(oy,"onAnimationEnd"),Fr(sy,"onAnimationIteration"),Fr(ly,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr($T,"onTransitionRun"),Fr(GT,"onTransitionStart"),Fr(qT,"onTransitionCancel"),Fr(cy,"onTransitionEnd"),Bo("onMouseEnter",["mouseout","mouseover"]),Bo("onMouseLeave",["mouseout","mouseover"]),Bo("onPointerEnter",["pointerout","pointerover"]),Bo("onPointerLeave",["pointerout","pointerover"]),Gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gi("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(" "),CA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function Ib(r,i){i=(i&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var v=void 0;if(i)for(var w=c.length-1;0<=w;w--){var I=c[w],z=I.instance,J=I.currentTarget;if(I=I.listener,z!==v&&m.isPropagationStopped())break e;v=I,m.currentTarget=J;try{v(m)}catch(se){Wc(se)}m.currentTarget=null,v=z}else for(w=0;w<c.length;w++){if(I=c[w],z=I.instance,J=I.currentTarget,I=I.listener,z!==v&&m.isPropagationStopped())break e;v=I,m.currentTarget=J;try{v(m)}catch(se){Wc(se)}m.currentTarget=null,v=z}}}}function at(r,i){var s=i[zf];s===void 0&&(s=i[zf]=new Set);var c=r+"__bubble";s.has(c)||(Mb(i,r,2,!1),s.add(c))}function Ap(r,i,s){var c=0;i&&(c|=4),Mb(s,r,c,i)}var Pu="_reactListening"+Math.random().toString(36).slice(2);function Cp(r){if(!r[Pu]){r[Pu]=!0,w0.forEach(function(s){s!=="selectionchange"&&(CA.has(s)||Ap(s,!1,r),Ap(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Pu]||(i[Pu]=!0,Ap("selectionchange",!1,i))}}function Mb(r,i,s,c){switch(o_(i)){case 2:var m=rC;break;case 8:m=aC;break;default:m=$p}s=m.bind(null,i,s,r),m=void 0,!Wf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,s,{capture:!0,passive:m}):r.addEventListener(i,s,!0):m!==void 0?r.addEventListener(i,s,{passive:m}):r.addEventListener(i,s,!1)}function Ip(r,i,s,c,m){var v=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var I=c.stateNode.containerInfo;if(I===m)break;if(w===4)for(w=c.return;w!==null;){var z=w.tag;if((z===3||z===4)&&w.stateNode.containerInfo===m)return;w=w.return}for(;I!==null;){if(w=ko(I),w===null)return;if(z=w.tag,z===5||z===6||z===26||z===27){c=v=w;continue e}I=I.parentNode}}c=c.return}k0(function(){var J=v,se=Yf(s),ue=[];e:{var te=uy.get(r);if(te!==void 0){var ae=qc,Te=r;switch(r){case"keypress":if($c(s)===0)break e;case"keydown":case"keyup":ae=ST;break;case"focusin":Te="focus",ae=Jf;break;case"focusout":Te="blur",ae=Jf;break;case"beforeblur":case"afterblur":ae=Jf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=B0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=uT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=RT;break;case oy:case sy:case ly:ae=hT;break;case cy:ae=TT;break;case"scroll":case"scrollend":ae=lT;break;case"wheel":ae=CT;break;case"copy":case"cut":case"paste":ae=mT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=F0;break;case"toggle":case"beforetoggle":ae=MT}var Be=(i&4)!==0,Rt=!Be&&(r==="scroll"||r==="scrollend"),K=Be?te!==null?te+"Capture":null:te;Be=[];for(var H=J,X;H!==null;){var le=H;if(X=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||X===null||K===null||(le=Js(H,K),le!=null&&Be.push(Nl(H,le,X))),Rt)break;H=H.return}0<Be.length&&(te=new ae(te,Te,null,s,se),ue.push({event:te,listeners:Be}))}}if((i&7)===0){e:{if(te=r==="mouseover"||r==="pointerover",ae=r==="mouseout"||r==="pointerout",te&&s!==qf&&(Te=s.relatedTarget||s.fromElement)&&(ko(Te)||Te[Po]))break e;if((ae||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(Te=s.relatedTarget||s.toElement,ae=J,Te=Te?ko(Te):null,Te!==null&&(Rt=l(Te),Be=Te.tag,Te!==Rt||Be!==5&&Be!==27&&Be!==6)&&(Te=null)):(ae=null,Te=J),ae!==Te)){if(Be=B0,le="onMouseLeave",K="onMouseEnter",H="mouse",(r==="pointerout"||r==="pointerover")&&(Be=F0,le="onPointerLeave",K="onPointerEnter",H="pointer"),Rt=ae==null?te:Xs(ae),X=Te==null?te:Xs(Te),te=new Be(le,H+"leave",ae,s,se),te.target=Rt,te.relatedTarget=X,le=null,ko(se)===J&&(Be=new Be(K,H+"enter",Te,s,se),Be.target=X,Be.relatedTarget=Rt,le=Be),Rt=le,ae&&Te)t:{for(Be=IA,K=ae,H=Te,X=0,le=K;le;le=Be(le))X++;le=0;for(var je=H;je;je=Be(je))le++;for(;0<X-le;)K=Be(K),X--;for(;0<le-X;)H=Be(H),le--;for(;X--;){if(K===H||H!==null&&K===H.alternate){Be=K;break t}K=Be(K),H=Be(H)}Be=null}else Be=null;ae!==null&&Nb(ue,te,ae,Be,!1),Te!==null&&Rt!==null&&Nb(ue,Rt,Te,Be,!0)}}e:{if(te=J?Xs(J):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var pt=W0;else if(Y0(te))if(Z0)pt=FT;else{pt=BT;var De=UT}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&Gf(J.elementType)&&(pt=W0):pt=zT;if(pt&&(pt=pt(r,J))){K0(ue,pt,s,se);break e}De&&De(r,te,J),r==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&$f(te,"number",te.value)}switch(De=J?Xs(J):window,r){case"focusin":(Y0(De)||De.contentEditable==="true")&&(Go=De,ih=J,sl=null);break;case"focusout":sl=ih=Go=null;break;case"mousedown":oh=!0;break;case"contextmenu":case"mouseup":case"dragend":oh=!1,ay(ue,s,se);break;case"selectionchange":if(HT)break;case"keydown":case"keyup":ay(ue,s,se)}var Ye;if(th)e:{switch(r){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else $o?G0(r,s)&&(lt="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(lt="onCompositionStart");lt&&(V0&&s.locale!=="ko"&&($o||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&$o&&(Ye=j0()):(ei=se,Zf="value"in ei?ei.value:ei.textContent,$o=!0)),De=ku(J,lt),0<De.length&&(lt=new z0(lt,r,null,s,se),ue.push({event:lt,listeners:De}),Ye?lt.data=Ye:(Ye=q0(s),Ye!==null&&(lt.data=Ye)))),(Ye=DT?LT(r,s):PT(r,s))&&(lt=ku(J,"onBeforeInput"),0<lt.length&&(De=new z0("onBeforeInput","beforeinput",null,s,se),ue.push({event:De,listeners:lt}),De.data=Ye)),OA(ue,r,J,s,se)}Ib(ue,i)})}function Nl(r,i,s){return{instance:r,listener:i,currentTarget:s}}function ku(r,i){for(var s=i+"Capture",c=[];r!==null;){var m=r,v=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||v===null||(m=Js(r,s),m!=null&&c.unshift(Nl(r,m,v)),m=Js(r,i),m!=null&&c.push(Nl(r,m,v))),r.tag===3)return c;r=r.return}return[]}function IA(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Nb(r,i,s,c,m){for(var v=i._reactName,w=[];s!==null&&s!==c;){var I=s,z=I.alternate,J=I.stateNode;if(I=I.tag,z!==null&&z===c)break;I!==5&&I!==26&&I!==27||J===null||(z=J,m?(J=Js(s,v),J!=null&&w.unshift(Nl(s,J,z))):m||(J=Js(s,v),J!=null&&w.push(Nl(s,J,z)))),s=s.return}w.length!==0&&r.push({event:i,listeners:w})}var MA=/\r\n?/g,NA=/\u0000|\uFFFD/g;function Db(r){return(typeof r=="string"?r:""+r).replace(MA,`
10
- `).replace(NA,"")}function Lb(r,i){return i=Db(i),Db(r)===i}function wt(r,i,s,c,m,v){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Fo(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Fo(r,""+c);break;case"className":zc(r,"class",c);break;case"tabIndex":zc(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":zc(r,s,c);break;case"style":L0(r,c,v);break;case"data":if(i!=="object"){zc(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Vc(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(s,"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 v=="function"&&(s==="formAction"?(i!=="input"&&wt(r,i,"name",m.name,m,null),wt(r,i,"formEncType",m.formEncType,m,null),wt(r,i,"formMethod",m.formMethod,m,null),wt(r,i,"formTarget",m.formTarget,m,null)):(wt(r,i,"encType",m.encType,m,null),wt(r,i,"method",m.method,m,null),wt(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Vc(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Ta);break;case"onScroll":c!=null&&at("scroll",r);break;case"onScrollEnd":c!=null&&at("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=Vc(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):r.removeAttribute(s);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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":at("beforetoggle",r),at("toggle",r),Bc(r,"popover",c);break;case"xlinkActuate":Oa(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Oa(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Oa(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Oa(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Oa(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Oa(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Oa(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Oa(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Oa(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Bc(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=oT.get(s)||s,Bc(r,s,c))}}function Mp(r,i,s,c,m,v){switch(s){case"style":L0(r,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Fo(r,c):(typeof c=="number"||typeof c=="bigint")&&Fo(r,""+c);break;case"onScroll":c!=null&&at("scroll",r);break;case"onScrollEnd":c!=null&&at("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!R0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),v=r[Vn]||null,v=v!=null?v[s]:null,typeof v=="function"&&r.removeEventListener(i,v,m),typeof c=="function")){typeof v!="function"&&v!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):Bc(r,s,c)}}}function Tn(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",r),at("load",r);var c=!1,m=!1,v;for(v in s)if(s.hasOwnProperty(v)){var w=s[v];if(w!=null)switch(v){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,v,w,s,null)}}m&&wt(r,i,"srcSet",s.srcSet,s,null),c&&wt(r,i,"src",s.src,s,null);return;case"input":at("invalid",r);var I=v=w=m=null,z=null,J=null;for(c in s)if(s.hasOwnProperty(c)){var se=s[c];if(se!=null)switch(c){case"name":m=se;break;case"type":w=se;break;case"checked":z=se;break;case"defaultChecked":J=se;break;case"value":v=se;break;case"defaultValue":I=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,i));break;default:wt(r,i,c,se,s,null)}}I0(r,v,I,z,J,w,m,!1);return;case"select":at("invalid",r),c=w=v=null;for(m in s)if(s.hasOwnProperty(m)&&(I=s[m],I!=null))switch(m){case"value":v=I;break;case"defaultValue":w=I;break;case"multiple":c=I;default:wt(r,i,m,I,s,null)}i=v,s=w,r.multiple=!!c,i!=null?zo(r,!!c,i,!1):s!=null&&zo(r,!!c,s,!0);return;case"textarea":at("invalid",r),v=m=c=null;for(w in s)if(s.hasOwnProperty(w)&&(I=s[w],I!=null))switch(w){case"value":c=I;break;case"defaultValue":m=I;break;case"children":v=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(91));break;default:wt(r,i,w,I,s,null)}N0(r,c,m,v);return;case"option":for(z in s)s.hasOwnProperty(z)&&(c=s[z],c!=null)&&(z==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":wt(r,i,z,c,s,null));return;case"dialog":at("beforetoggle",r),at("toggle",r),at("cancel",r),at("close",r);break;case"iframe":case"object":at("load",r);break;case"video":case"audio":for(c=0;c<Ml.length;c++)at(Ml[c],r);break;case"image":at("error",r),at("load",r);break;case"details":at("toggle",r);break;case"embed":case"source":case"link":at("error",r),at("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in s)if(s.hasOwnProperty(J)&&(c=s[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,J,c,s,null)}return;default:if(Gf(i)){for(se in s)s.hasOwnProperty(se)&&(c=s[se],c!==void 0&&Mp(r,i,se,c,s,void 0));return}}for(I in s)s.hasOwnProperty(I)&&(c=s[I],c!=null&&wt(r,i,I,c,s,null))}function DA(r,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,v=null,w=null,I=null,z=null,J=null,se=null;for(ae in s){var ue=s[ae];if(s.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":z=ue;default:c.hasOwnProperty(ae)||wt(r,i,ae,null,c,ue)}}for(var te in c){var ae=c[te];if(ue=s[te],c.hasOwnProperty(te)&&(ae!=null||ue!=null))switch(te){case"type":v=ae;break;case"name":m=ae;break;case"checked":J=ae;break;case"defaultChecked":se=ae;break;case"value":w=ae;break;case"defaultValue":I=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(a(137,i));break;default:ae!==ue&&wt(r,i,te,ae,c,ue)}}Hf(r,w,I,z,J,se,v,m);return;case"select":ae=w=I=te=null;for(v in s)if(z=s[v],s.hasOwnProperty(v)&&z!=null)switch(v){case"value":break;case"multiple":ae=z;default:c.hasOwnProperty(v)||wt(r,i,v,null,c,z)}for(m in c)if(v=c[m],z=s[m],c.hasOwnProperty(m)&&(v!=null||z!=null))switch(m){case"value":te=v;break;case"defaultValue":I=v;break;case"multiple":w=v;default:v!==z&&wt(r,i,m,v,c,z)}i=I,s=w,c=ae,te!=null?zo(r,!!s,te,!1):!!c!=!!s&&(i!=null?zo(r,!!s,i,!0):zo(r,!!s,s?[]:"",!1));return;case"textarea":ae=te=null;for(I in s)if(m=s[I],s.hasOwnProperty(I)&&m!=null&&!c.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:wt(r,i,I,null,c,m)}for(w in c)if(m=c[w],v=s[w],c.hasOwnProperty(w)&&(m!=null||v!=null))switch(w){case"value":te=m;break;case"defaultValue":ae=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==v&&wt(r,i,w,m,c,v)}M0(r,te,ae);return;case"option":for(var Te in s)te=s[Te],s.hasOwnProperty(Te)&&te!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:wt(r,i,Te,null,c,te));for(z in c)te=c[z],ae=s[z],c.hasOwnProperty(z)&&te!==ae&&(te!=null||ae!=null)&&(z==="selected"?r.selected=te&&typeof te!="function"&&typeof te!="symbol":wt(r,i,z,te,c,ae));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 Be in s)te=s[Be],s.hasOwnProperty(Be)&&te!=null&&!c.hasOwnProperty(Be)&&wt(r,i,Be,null,c,te);for(J in c)if(te=c[J],ae=s[J],c.hasOwnProperty(J)&&te!==ae&&(te!=null||ae!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(a(137,i));break;default:wt(r,i,J,te,c,ae)}return;default:if(Gf(i)){for(var Rt in s)te=s[Rt],s.hasOwnProperty(Rt)&&te!==void 0&&!c.hasOwnProperty(Rt)&&Mp(r,i,Rt,void 0,c,te);for(se in c)te=c[se],ae=s[se],!c.hasOwnProperty(se)||te===ae||te===void 0&&ae===void 0||Mp(r,i,se,te,c,ae);return}}for(var K in s)te=s[K],s.hasOwnProperty(K)&&te!=null&&!c.hasOwnProperty(K)&&wt(r,i,K,null,c,te);for(ue in c)te=c[ue],ae=s[ue],!c.hasOwnProperty(ue)||te===ae||te==null&&ae==null||wt(r,i,ue,te,c,ae)}function Pb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function LA(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],v=m.transferSize,w=m.initiatorType,I=m.duration;if(v&&I&&Pb(w)){for(w=0,I=m.responseEnd,c+=1;c<s.length;c++){var z=s[c],J=z.startTime;if(J>I)break;var se=z.transferSize,ue=z.initiatorType;se&&Pb(ue)&&(z=z.responseEnd,w+=se*(z<I?1:(I-J)/(z-J)))}if(--c,i+=8*(v+w)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Np=null,Dp=null;function ju(r){return r.nodeType===9?r:r.ownerDocument}function kb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Lp(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Pp=null;function PA(){var r=window.event;return r&&r.type==="popstate"?r===Pp?!1:(Pp=r,!0):(Pp=null,!1)}var Ub=typeof setTimeout=="function"?setTimeout:void 0,kA=typeof clearTimeout=="function"?clearTimeout:void 0,Bb=typeof Promise=="function"?Promise:void 0,jA=typeof queueMicrotask=="function"?queueMicrotask:typeof Bb<"u"?function(r){return Bb.resolve(null).then(r).catch(UA)}:Ub;function UA(r){setTimeout(function(){throw r})}function vi(r){return r==="head"}function zb(r,i){var s=i,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),ys(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Dl(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Dl(s);for(var v=s.firstChild;v;){var w=v.nextSibling,I=v.nodeName;v[Qs]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=w}}else s==="body"&&Dl(r.ownerDocument.body);s=m}while(s);ys(i)}function Fb(r,i){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function kp(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":kp(s),Ff(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function BA(r,i,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Qs])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Cr(r.nextSibling),r===null)break}return null}function zA(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Cr(r.nextSibling),r===null))return null;return r}function Vb(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Cr(r.nextSibling),r===null))return null;return r}function jp(r){return r.data==="$?"||r.data==="$~"}function Up(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function FA(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Cr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Bp=null;function Hb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Cr(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function $b(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function Gb(r,i,s){switch(i=ju(s),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Dl(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Ff(r)}var Ir=new Map,qb=new Set;function Uu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ha=F.d;F.d={f:VA,r:HA,D:$A,C:GA,L:qA,m:YA,X:WA,S:KA,M:ZA};function VA(){var r=Ha.f(),i=Cu();return r||i}function HA(r){var i=jo(r);i!==null&&i.tag===5&&i.type==="form"?c1(i):Ha.r(r)}var ms=typeof document>"u"?null:document;function Yb(r,i,s){var c=ms;if(c&&typeof i=="string"&&i){var m=Sr(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),qb.has(m)||(qb.add(m),r={rel:r,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Tn(i,"link",r),pn(i),c.head.appendChild(i)))}}function $A(r){Ha.D(r),Yb("dns-prefetch",r,null)}function GA(r,i){Ha.C(r,i),Yb("preconnect",r,i)}function qA(r,i,s){Ha.L(r,i,s);var c=ms;if(c&&r&&i){var m='link[rel="preload"][as="'+Sr(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Sr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Sr(s.imageSizes)+'"]')):m+='[href="'+Sr(r)+'"]';var v=m;switch(i){case"style":v=gs(r);break;case"script":v=vs(r)}Ir.has(v)||(r=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),Ir.set(v,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Ll(v))||i==="script"&&c.querySelector(Pl(v))||(i=c.createElement("link"),Tn(i,"link",r),pn(i),c.head.appendChild(i)))}}function YA(r,i){Ha.m(r,i);var s=ms;if(s&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Sr(c)+'"][href="'+Sr(r)+'"]',v=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=vs(r)}if(!Ir.has(v)&&(r=p({rel:"modulepreload",href:r},i),Ir.set(v,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Pl(v)))return}c=s.createElement("link"),Tn(c,"link",r),pn(c),s.head.appendChild(c)}}}function KA(r,i,s){Ha.S(r,i,s);var c=ms;if(c&&r){var m=Uo(c).hoistableStyles,v=gs(r);i=i||"default";var w=m.get(v);if(!w){var I={loading:0,preload:null};if(w=c.querySelector(Ll(v)))I.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":i},s),(s=Ir.get(v))&&zp(r,s);var z=w=c.createElement("link");pn(z),Tn(z,"link",r),z._p=new Promise(function(J,se){z.onload=J,z.onerror=se}),z.addEventListener("load",function(){I.loading|=1}),z.addEventListener("error",function(){I.loading|=2}),I.loading|=4,Bu(w,i,c)}w={type:"stylesheet",instance:w,count:1,state:I},m.set(v,w)}}}function WA(r,i){Ha.X(r,i);var s=ms;if(s&&r){var c=Uo(s).hoistableScripts,m=vs(r),v=c.get(m);v||(v=s.querySelector(Pl(m)),v||(r=p({src:r,async:!0},i),(i=Ir.get(m))&&Fp(r,i),v=s.createElement("script"),pn(v),Tn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function ZA(r,i){Ha.M(r,i);var s=ms;if(s&&r){var c=Uo(s).hoistableScripts,m=vs(r),v=c.get(m);v||(v=s.querySelector(Pl(m)),v||(r=p({src:r,async:!0,type:"module"},i),(i=Ir.get(m))&&Fp(r,i),v=s.createElement("script"),pn(v),Tn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function Kb(r,i,s,c){var m=(m=be.current)?Uu(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=gs(s.href),s=Uo(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=gs(s.href);var v=Uo(m).hoistableStyles,w=v.get(r);if(w||(m=m.ownerDocument||m,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,w),(v=m.querySelector(Ll(r)))&&!v._p&&(w.instance=v,w.state.loading=5),Ir.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Ir.set(r,s),v||QA(m,r,s,w.state))),i&&c===null)throw Error(a(528,""));return w}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=vs(s),s=Uo(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function gs(r){return'href="'+Sr(r)+'"'}function Ll(r){return'link[rel="stylesheet"]['+r+"]"}function Wb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function QA(r,i,s,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Tn(i,"link",s),pn(i),r.head.appendChild(i))}function vs(r){return'[src="'+Sr(r)+'"]'}function Pl(r){return"script[async]"+r}function Zb(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Sr(s.href)+'"]');if(c)return i.instance=c,pn(c),c;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),pn(c),Tn(c,"style",m),Bu(c,s.precedence,r),i.instance=c;case"stylesheet":m=gs(s.href);var v=r.querySelector(Ll(m));if(v)return i.state.loading|=4,i.instance=v,pn(v),v;c=Wb(s),(m=Ir.get(m))&&zp(c,m),v=(r.ownerDocument||r).createElement("link"),pn(v);var w=v;return w._p=new Promise(function(I,z){w.onload=I,w.onerror=z}),Tn(v,"link",c),i.state.loading|=4,Bu(v,s.precedence,r),i.instance=v;case"script":return v=vs(s.src),(m=r.querySelector(Pl(v)))?(i.instance=m,pn(m),m):(c=s,(m=Ir.get(v))&&(c=p({},s),Fp(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),pn(m),Tn(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,Bu(c,s.precedence,r));return i.instance}function Bu(r,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,v=m,w=0;w<c.length;w++){var I=c[w];if(I.dataset.precedence===i)v=I;else if(v!==m)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function zp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Fp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var zu=null;function Qb(r,i,s){if(zu===null){var c=new Map,m=zu=new Map;m.set(s,c)}else m=zu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var v=s[m];if(!(v[Qs]||v[xn]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var w=v.getAttribute(i)||"";w=r+w;var I=c.get(w);I?I.push(v):c.set(w,[v])}}return c}function Xb(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function XA(r,i,s){if(s===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Jb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function JA(r,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=gs(c.href),v=i.querySelector(Ll(m));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Fu.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=v,pn(v);return}v=i.ownerDocument||i,c=Wb(c),(m=Ir.get(m))&&zp(c,m),v=v.createElement("link"),pn(v);var w=v;w._p=new Promise(function(I,z){w.onload=I,w.onerror=z}),Tn(v,"link",c),s.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Fu.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var Vp=0;function eC(r,i){return r.stylesheets&&r.count===0&&Hu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&Hu(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&Vp===0&&(Vp=62500*LA());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Hu(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Vp?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Fu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Vu=null;function Hu(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Vu=new Map,i.forEach(tC,r),Vu=null,Fu.call(r))}function tC(r,i){if(!(i.state.loading&4)){var s=Vu.get(r);if(s)var c=s.get(null);else{s=new Map,Vu.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<m.length;v++){var w=m[v];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(s.set(w.dataset.precedence,w),c=w)}c&&s.set(null,c)}m=i.instance,w=m.getAttribute("data-precedence"),v=s.get(w)||c,v===c&&s.set(null,m),s.set(w,m),this.count++,c=Fu.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),v?v.parentNode.insertBefore(m,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var kl={$$typeof:C,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function nC(r,i,s,c,m,v,w,I,z){this.tag=1,this.containerInfo=r,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=Mn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mn(0),this.hiddenUpdates=Mn(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=v,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function e_(r,i,s,c,m,v,w,I,z,J,se,ue){return r=new nC(r,i,s,w,z,J,se,ue,I),i=1,v===!0&&(i|=24),v=ar(3,null,null,i),r.current=v,v.stateNode=r,i=Eh(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:c,isDehydrated:s,cache:i},Rh(v),r}function t_(r){return r?(r=Ko,r):Ko}function n_(r,i,s,c,m,v){m=t_(m),c.context===null?c.context=m:c.pendingContext=m,c=oi(i),c.payload={element:s},v=v===void 0?null:v,v!==null&&(c.callback=v),s=si(r,c,i),s!==null&&(Kn(s,r,i),pl(s,r,i))}function r_(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function Hp(r,i){r_(r,i),(r=r.alternate)&&r_(r,i)}function a_(r){if(r.tag===13||r.tag===31){var i=Wi(r,67108864);i!==null&&Kn(i,r,67108864),Hp(r,67108864)}}function i_(r){if(r.tag===13||r.tag===31){var i=cr();i=Lo(i);var s=Wi(r,i);s!==null&&Kn(s,r,i),Hp(r,i)}}var $u=!0;function rC(r,i,s,c){var m=P.T;P.T=null;var v=F.p;try{F.p=2,$p(r,i,s,c)}finally{F.p=v,P.T=m}}function aC(r,i,s,c){var m=P.T;P.T=null;var v=F.p;try{F.p=8,$p(r,i,s,c)}finally{F.p=v,P.T=m}}function $p(r,i,s,c){if($u){var m=Gp(c);if(m===null)Ip(r,i,c,Gu,s),s_(r,c);else if(oC(m,r,i,s,c))c.stopPropagation();else if(s_(r,c),i&4&&-1<iC.indexOf(r)){for(;m!==null;){var v=jo(m);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var w=ft(v.pendingLanes);if(w!==0){var I=v;for(I.pendingLanes|=2,I.entangledLanes|=2;w;){var z=1<<31-Wt(w);I.entanglements[1]|=z,w&=~z}ia(v),(vt&6)===0&&(Tu=ce()+500,Il(0))}}break;case 31:case 13:I=Wi(v,2),I!==null&&Kn(I,v,2),Cu(),Hp(v,2)}if(v=Gp(c),v===null&&Ip(r,i,c,Gu,s),v===m)break;m=v}m!==null&&c.stopPropagation()}else Ip(r,i,c,null,s)}}function Gp(r){return r=Yf(r),qp(r)}var Gu=null;function qp(r){if(Gu=null,r=ko(r),r!==null){var i=l(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=u(i),r!==null)return r;r=null}else if(s===31){if(r=d(i),r!==null)return r;r=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Gu=r,null}function o_(r){switch(r){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(he()){case fe:return 2;case we:return 8;case He:case nt:return 32;case Tt:return 268435456;default:return 32}default:return 32}}var Yp=!1,yi=null,bi=null,_i=null,jl=new Map,Ul=new Map,Ei=[],iC="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 s_(r,i){switch(r){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":bi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":jl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ul.delete(i.pointerId)}}function Bl(r,i,s,c,m,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:v,targetContainers:[m]},i!==null&&(i=jo(i),i!==null&&a_(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function oC(r,i,s,c,m){switch(i){case"focusin":return yi=Bl(yi,r,i,s,c,m),!0;case"dragenter":return bi=Bl(bi,r,i,s,c,m),!0;case"mouseover":return _i=Bl(_i,r,i,s,c,m),!0;case"pointerover":var v=m.pointerId;return jl.set(v,Bl(jl.get(v)||null,r,i,s,c,m)),!0;case"gotpointercapture":return v=m.pointerId,Ul.set(v,Bl(Ul.get(v)||null,r,i,s,c,m)),!0}return!1}function l_(r){var i=ko(r.target);if(i!==null){var s=l(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){r.blockedOn=i,S0(r.priority,function(){i_(s)});return}}else if(i===31){if(i=d(s),i!==null){r.blockedOn=i,S0(r.priority,function(){i_(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function qu(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=Gp(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);qf=c,s.target.dispatchEvent(c),qf=null}else return i=jo(s),i!==null&&a_(i),r.blockedOn=s,!1;i.shift()}return!0}function c_(r,i,s){qu(r)&&s.delete(i)}function sC(){Yp=!1,yi!==null&&qu(yi)&&(yi=null),bi!==null&&qu(bi)&&(bi=null),_i!==null&&qu(_i)&&(_i=null),jl.forEach(c_),Ul.forEach(c_)}function Yu(r,i){r.blockedOn===i&&(r.blockedOn=null,Yp||(Yp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,sC)))}var Ku=null;function u_(r){Ku!==r&&(Ku=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ku===r&&(Ku=null);for(var i=0;i<r.length;i+=3){var s=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(qp(c||s)===null)continue;break}var v=jo(s);v!==null&&(r.splice(i,3),i-=3,Gh(v,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function ys(r){function i(z){return Yu(z,r)}yi!==null&&Yu(yi,r),bi!==null&&Yu(bi,r),_i!==null&&Yu(_i,r),jl.forEach(i),Ul.forEach(i);for(var s=0;s<Ei.length;s++){var c=Ei[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Ei.length&&(s=Ei[0],s.blockedOn===null);)l_(s),s.blockedOn===null&&Ei.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],v=s[c+1],w=m[Vn]||null;if(typeof v=="function")w||u_(s);else if(w){var I=null;if(v&&v.hasAttribute("formAction")){if(m=v,w=v[Vn]||null)I=w.formAction;else if(qp(m)!==null)continue}else I=w.action;typeof I=="function"?s[c+1]=I:(s.splice(c,3),c-=3),u_(s)}}}function d_(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(w){return m=w})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function Kp(r){this._internalRoot=r}Wu.prototype.render=Kp.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=cr();n_(s,c,r,i,null,null)},Wu.prototype.unmount=Kp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;n_(r.current,2,null,r,null,null),Cu(),i[Po]=null}};function Wu(r){this._internalRoot=r}Wu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Bf();r={blockedOn:null,target:r,priority:i};for(var s=0;s<Ei.length&&i!==0&&i<Ei[s].priority;s++);Ei.splice(s,0,r),s===0&&l_(r)}};var f_=t.version;if(f_!=="19.2.3")throw Error(a(527,f_,"19.2.3"));F.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var lC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zu.isDisabled&&Zu.supportsFiber)try{Kt=Zu.inject(lC),Mt=Zu}catch{}}return Fl.createRoot=function(r,i){if(!o(r))throw Error(a(299));var s=!1,c="",m=b1,v=_1,w=E1;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError)),i=e_(r,1,!1,null,null,s,c,null,m,v,w,d_),r[Po]=i.current,Cp(r),new Kp(i)},Fl.hydrateRoot=function(r,i,s){if(!o(r))throw Error(a(299));var c=!1,m="",v=b1,w=_1,I=E1,z=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(I=s.onRecoverableError),s.formState!==void 0&&(z=s.formState)),i=e_(r,1,!0,i,s??null,c,m,z,v,w,I,d_),i.context=t_(null),s=i.current,c=cr(),c=Lo(c),m=oi(c),m.callback=null,si(s,m,c),s=c,i.current.lanes=s,ht(i,s),ia(i),r[Po]=i.current,Cp(r),new Wu(i)},Fl.version="19.2.3",Fl}var x_;function _C(){if(x_)return Zp.exports;x_=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(t){console.error(t)}}return e(),Zp.exports=bC(),Zp.exports}var EC=_C(),E=Vi();const V=Io(E),sv=uC({__proto__:null,default:V},[E]);var tm={exports:{}},nm={};var w_;function SC(){if(w_)return nm;w_=1;var e=Vi().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return nm.c=function(t){return e.H.useMemoCache(t)},nm}var R_;function xC(){return R_||(R_=1,tm.exports=SC()),tm.exports}var pf=xC(),wc=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(){}},wC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},RC=class{#e=wC;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},po=new RC;function OC(e){setTimeout(e,0)}var _o=typeof window>"u"||"Deno"in globalThis;function Xn(){}function TC(e,t){return typeof e=="function"?e(t):e}function lg(e){return typeof e=="number"&&e>=0&&e!==1/0}function ux(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Di(e,t){return typeof e=="function"?e(t):e}function Lr(e,t){return typeof e=="function"?e(t):e}function O_(e,t){const{type:n="all",exact:a,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(a){if(t.queryHash!==lv(u,t.options))return!1}else if(!fc(t.queryKey,u))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function T_(e,t){const{exact:n,status:a,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(dc(t.options.mutationKey)!==dc(l))return!1}else if(!fc(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function lv(e,t){return(t?.queryKeyHashFn||dc)(e)}function dc(e){return JSON.stringify(e,(t,n)=>ug(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function fc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>fc(e[n],t[n])):!1}var AC=Object.prototype.hasOwnProperty;function dx(e,t){if(e===t)return e;const n=A_(e)&&A_(t);if(!n&&!(ug(e)&&ug(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),u=l.length,d=n?new Array(u):{};let f=0;for(let h=0;h<u;h++){const g=n?h:l[h],p=e[g],y=t[g];if(p===y){d[g]=p,(n?h<o:AC.call(e,g))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[g]=y;continue}const _=dx(p,y);d[g]=_,_===p&&f++}return o===u&&f===o?e:d}function cg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function A_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ug(e){if(!C_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!C_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function C_(e){return Object.prototype.toString.call(e)==="[object Object]"}function CC(e){return new Promise(t=>{po.setTimeout(t,e)})}function dg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?dx(e,t):t}function IC(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function MC(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var cv=Symbol();function fx(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===cv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hx(e,t){return typeof e=="function"?e(...t):!!e}function NC(e,t,n){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var DC=class extends wc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!_o&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}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(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},uv=new DC;function fg(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},n.reject=o=>{a({status:"rejected",reason:o}),t(o)},n}var LC=OC;function PC(){let e=[],t=0,n=d=>{d()},a=d=>{d()},o=LC;const l=d=>{t?e.push(d):o(()=>{n(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{a(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}var An=PC(),kC=class extends wc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!_o&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",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(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Nd=new kC;function jC(e){return Math.min(1e3*2**e,3e4)}function px(e){return(e??"online")==="online"?Nd.isOnline():!0}var hg=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mx(e){let t=!1,n=0,a;const o=fg(),l=()=>o.status!=="pending",u=x=>{if(!l()){const T=new hg(x);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>uv.isFocused()&&(e.networkMode==="always"||Nd.isOnline())&&e.canRun(),g=()=>px(e.networkMode)&&e.canRun(),p=x=>{l()||(a?.(),o.resolve(x))},y=x=>{l()||(a?.(),o.reject(x))},_=()=>new Promise(x=>{a=T=>{(l()||h())&&x(T)},e.onPause?.()}).then(()=>{a=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let x;const T=n===0?e.initialPromise:void 0;try{x=T??e.fn()}catch(R){x=Promise.reject(R)}Promise.resolve(x).then(p).catch(R=>{if(l())return;const A=e.retry??(_o?0:3),C=e.retryDelay??jC,O=typeof C=="function"?C(n,R):C,M=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!M){y(R);return}n++,e.onFail?.(n,R),CC(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?S():_().then(S),o)}}var gx=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lg(this.gcTime)&&(this.#e=po.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_o?1/0:300*1e3))}clearGcTimeout(){this.#e&&(po.clearTimeout(this.#e),this.#e=void 0)}},UC=class extends gx{#e;#t;#n;#a;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=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=M_(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=M_(this.options);t.data!==void 0&&(this.setState(I_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=dg(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Lr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===cv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Di(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:!ux(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.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(t=>t!==e),this.observers.length||(this.#r&&(this.#o?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,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.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 d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},o=()=>{const d=fx(this.options,t),h=(()=>{const g={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#o=!1,this.options.persister?this.options.persister(d,h,this):d(h)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=mx({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof hg&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof hg){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...vx(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...I_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),An.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function vx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:px(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function M_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var BC=class extends wc{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=fg(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),N_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pg(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!cg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&D_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||Di(this.options.staleTime,this.#t)!==Di(t.staleTime,this.#t))&&this.#g();const o=this.#v();a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return FC(this,n)&&(this.#a=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Xn)),t}#g(){this.#_();const e=Di(this.options.staleTime,this.#t);if(_o||this.#a.isStale||!lg(e))return;const n=ux(this.#a.dataUpdatedAt,e)+1;this.#c=po.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(_o||Lr(this.options.enabled,this.#t)===!1||!lg(this.#l)||this.#l===0)&&(this.#u=po.setInterval(()=>{(this.options.refetchIntervalInBackground||uv.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#_(){this.#c&&(po.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(po.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,a=this.options,o=this.#a,l=this.#r,u=this.#s,f=e!==n?e.state:this.#n,{state:h}=e;let g={...h},p=!1,y;if(t._optimisticResults){const D=this.hasListeners(),U=!D&&N_(e,t),Z=D&&D_(e,n,t,a);(U||Z)&&(g={...g,...vx(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:x}=g;y=g.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&x==="pending"){let D;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(D=o.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(x="success",y=dg(o?.data,D,t),p=!0)}if(t.select&&y!==void 0&&!T)if(o&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=dg(o?.data,y,t),this.#f=y,this.#i=null}catch(D){this.#i=D}this.#i&&(_=this.#i,y=this.#f,S=Date.now(),x="error");const R=g.fetchStatus==="fetching",A=x==="pending",C=x==="error",O=A&&R,M=y!==void 0,N={status:x,fetchStatus:g.fetchStatus,isPending:A,isSuccess:x==="success",isError:C,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:g.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:C&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&M,isStale:dv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Lr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=G=>{N.status==="error"?G.reject(N.error):N.data!==void 0&&G.resolve(N.data)},U=()=>{const G=this.#o=N.promise=fg();D(G)},Z=this.#o;switch(Z.status){case"pending":e.queryHash===n.queryHash&&D(Z);break;case"fulfilled":(N.status==="error"||N.data!==Z.value)&&U();break;case"rejected":(N.status!=="error"||N.error!==Z.reason)&&U();break}}return N}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),cg(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const l=new Set(o??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(u=>{const d=u;return this.#a[d]!==e[d]&&l.has(d)})};this.#x({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#x(e){An.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function zC(e,t){return Lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function N_(e,t){return zC(e,t)||e.state.data!==void 0&&pg(e,t,t.refetchOnMount)}function pg(e,t,n){if(Lr(t.enabled,e)!==!1&&Di(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&dv(e,t)}return!1}function D_(e,t,n,a){return(e!==t||Lr(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&dv(e,n)}function dv(e,t){return Lr(t.enabled,e)!==!1&&e.isStaleByTime(Di(t.staleTime,e))}function FC(e,t){return!cg(e.getCurrentResult(),t)}function L_(e){return{onFetch:(t,n)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let g=!1;const p=S=>{NC(S,()=>t.signal,()=>g=!0)},y=fx(t.options,t.fetchOptions),_=async(S,x,T)=>{if(g)return Promise.reject();if(x==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:x,direction:T?"backward":"forward",meta:t.options.meta};return p(L),L})(),C=await y(A),{maxPages:O}=t.options,M=T?MC:IC;return{pages:M(S.pages,C,O),pageParams:M(S.pageParams,x,O)}};if(o&&l.length){const S=o==="backward",x=S?yx:mg,T={pages:l,pageParams:u},R=x(a,T);d=await _(T,R,S)}else{const S=e??l.length;do{const x=f===0?u[0]??a.initialPageParam:mg(a,d);if(f>0&&x==null)break;d=await _(d,x),f++}while(f<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function mg(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function yx(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function dB(e,t){return t?mg(e,t)!=null:!1}function fB(e,t){return!t||!e.getPreviousPageParam?!1:yx(e,t)!=null}var VC=class extends gx{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||HC(),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.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=mx({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#a.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),An.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function HC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $C=class extends wc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new VC({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=Qu(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Qu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Qu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Qu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){An.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 t={exact:!0,...e};return this.getAll().find(n=>T_(t,n))}findAll(e={}){return this.getAll().filter(t=>T_(e,t))}notify(e){An.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return An.batch(()=>Promise.all(e.map(t=>t.continue().catch(Xn))))}};function Qu(e){return e.options.scope?.id}var GC=class extends wc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,o=t.queryHash??lv(a,t);let l=this.get(o);return l||(l=new UC({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){An.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>O_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>O_(e,n)):t}notify(e){An.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){An.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){An.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qC=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(e={}){this.#e=e.queryCache||new GC,this.#t=e.mutationCache||new $C,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=uv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Nd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=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 t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Di(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(a.queryHash)?.state.data,u=TC(t,l);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return An.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;An.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return An.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=An.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(a).then(Xn).catch(Xn)}invalidateQueries(e,t={}){return An.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=An.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Xn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Di(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=L_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=L_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Nd.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,t){this.#a.set(dc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{fc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(dc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{fc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===cv&&(t.enabled=!1),t}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()}},bx=E.createContext(void 0),YC=e=>{const t=E.useContext(bx);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},KC=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(bx.Provider,{value:e,children:t})),_x=E.createContext(!1),WC=()=>E.useContext(_x);_x.Provider;function ZC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var QC=E.createContext(ZC()),XC=()=>E.useContext(QC),JC=(e,t,n)=>{const a=n?.state.error&&typeof e.throwOnError=="function"?hx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},e4=e=>{E.useEffect(()=>{e.clearReset()},[e])},t4=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||hx(n,[e.error,a])),n4=(e,t)=>t.state.data===void 0,r4=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>n(a(...o)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},a4=(e,t)=>e.isLoading&&e.isFetching&&!t,i4=(e,t)=>e?.suspense&&t.isPending,P_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function o4(e,t,n){const a=WC(),o=XC(),l=YC(n),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const d=l.getQueryCache().get(u.queryHash);u._optimisticResults=a?"isRestoring":"optimistic",r4(u),JC(u,o,d),e4(o);const f=!l.getQueryCache().get(u.queryHash),[h]=E.useState(()=>new t(l,u)),g=h.getOptimisticResult(u),p=!a&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(y=>{const _=p?h.subscribe(An.batchCalls(y)):Xn;return h.updateResult(),_},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),E.useEffect(()=>{h.setOptions(u)},[u,h]),i4(u,g))throw P_(u,h,o);if(t4({result:g,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,g),u.experimental_prefetchInRender&&!_o&&a4(g,a)&&(f?P_(u,h,o):d?.promise)?.catch(Xn).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?g:h.trackResult(g)}function s4(e,t){return o4({...e,enabled:!0,suspense:!0,throwOnError:n4,placeholderData:void 0},BC,t)}const l4={authConfig:()=>["authConfig"],threads:e=>["threads",e],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collectionItem:(e,t,n)=>["collection-item",e,t,n],collectionListPrefix:(e,t)=>["collection-list",e,t],collectionList:(e,t,n)=>["collection-list",e,t,n],collectionListInfinitePrefix:(e,t)=>["collection-list-infinite",e,t],collectionListInfinite:(e,t,n)=>["collection-list-infinite",e,t,n],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],gatewayPrompts:e=>["gateway",e,"prompts"],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"]},Ex=E.createContext(void 0);async function c4(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function u4(e){const t=pf.c(4),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:l4.authConfig(),queryFn:c4,staleTime:1/0},t[0]=a):a=t[0];const{data:o}=s4(a);let l;return t[1]!==o||t[2]!==n?(l=b.jsx(Ex.Provider,{value:o,children:n}),t[1]=o,t[2]=n,t[3]=l):l=t[3],l}function hB(){const e=E.useContext(Ex);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const gg=new WeakMap,d4=new WeakMap,Dd={current:[]};let rm=!1,ac=0;const ec=new Set,Xu=new Map;function Sx(e){for(const t of e){if(Dd.current.includes(t))continue;Dd.current.push(t),t.recompute();const n=d4.get(t);if(n)for(const a of n){const o=gg.get(a);o?.length&&Sx(o)}}}function f4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function h4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function xx(e){if(ac>0&&!Xu.has(e)&&Xu.set(e,e.prevState),ec.add(e),!(ac>0)&&!rm)try{for(rm=!0;ec.size>0;){const t=Array.from(ec);ec.clear();for(const n of t){const a=Xu.get(n)??n.prevState;n.prevState=a,f4(n)}for(const n of t){const a=gg.get(n);a&&(Dd.current.push(n),Sx(a))}for(const n of t){const a=gg.get(n);if(a)for(const o of a)h4(o)}}}finally{rm=!1,Dd.current=[],Xu.clear()}}function ic(e){ac++;try{e()}finally{if(ac--,ac===0){const t=ec.values().next().value;t&&xx(t)}}}function p4(e){return typeof e=="function"}class m4{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var o,l;this.listeners.add(a);const u=(l=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:l.call(o,a,this);return()=>{this.listeners.delete(a),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,o;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):p4(t)?this.state=t(this.prevState):this.state=t,(o=(a=this.options)==null?void 0:a.onUpdate)==null||o.call(a),xx(this)}}const Li="__TSR_index",k_="popstate",j_="beforeunload";function g4(e){let t=e.getLocation();const n=new Set,a=u=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},l=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const g=e.getBlockers?.()??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&g.length&&p)for(const y of g){const _=Ld(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,d,f)=>{const h=t.state[Li];d=U_(h+1,d),l({task:()=>{e.pushState(u,d),a({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const h=t.state[Li];d=U_(h,d),l({task:()=>{e.replaceState(u,d),a({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[Li]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function U_(e,t){t||(t={});const n=fv();return{...t,key:n,__TSR_key:n,[Li]:e}}function v4(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let o=[];const l=()=>o,u=D=>o=D,d=(D=>D),f=(()=>Ld(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=fv();t.history.replaceState({[Li]:0,key:D,__TSR_key:D},"")}let h=f(),g,p=!1,y=!1,_=!1,S=!1;const x=()=>h;let T,R;const A=()=>{T&&(N._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),N._ignoreSubscribers=!1,T=void 0,R=void 0,g=void 0)},C=(D,U,Z)=>{const G=d(U);R||(g=h),h=Ld(U,Z),T={href:G,state:Z,isPush:T?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>A()))},O=D=>{h=f(),N.notify({type:D})},M=async()=>{if(y){y=!1;return}const D=f(),U=D.state[Li]-h.state[Li],Z=U===1,G=U===-1,W=!Z&&!G||p;p=!1;const j=W?"GO":G?"BACK":"FORWARD",ne=W?{type:"GO",index:U}:{type:G?"BACK":"FORWARD"};if(_)_=!1;else{const ie=l();if(typeof document<"u"&&ie.length){for(const P of ie)if(await P.blockerFn({currentLocation:h,nextLocation:D,action:j})){y=!0,t.history.go(1),N.notify(ne);return}}}h=f(),N.notify(ne)},L=D=>{if(S){S=!1;return}let U=!1;const Z=l();if(typeof document<"u"&&Z.length)for(const G of Z){const W=G.enableBeforeUnload??!0;if(W===!0){U=!0;break}if(typeof W=="function"&&W()===!0){U=!0;break}}if(U)return D.preventDefault(),D.returnValue=""},N=g4({getLocation:x,getLength:()=>t.history.length,pushState:(D,U)=>C("push",D,U),replaceState:(D,U)=>C("replace",D,U),back:D=>(D&&(_=!0),S=!0,t.history.back()),forward:D=>{D&&(_=!0),S=!0,t.history.forward()},go:D=>{p=!0,t.history.go(D)},createHref:D=>d(D),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=a,t.removeEventListener(j_,L,{capture:!0}),t.removeEventListener(k_,M)},onBlocked:()=>{g&&h!==g&&(h=g)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(j_,L,{capture:!0}),t.addEventListener(k_,M),t.history.pushState=function(...D){const U=n.apply(t.history,D);return N._ignoreSubscribers||O("PUSH"),U},t.history.replaceState=function(...D){const U=a.apply(t.history,D);return N._ignoreSubscribers||O("REPLACE"),U},N}function Ld(e,t){const n=e.indexOf("#"),a=e.indexOf("?"),o=fv();return{href:e,pathname:e.substring(0,n>0?a>0?Math.min(n,a):n:a>0?a:e.length),hash:n>-1?e.substring(n):"",search:a>-1?e.slice(a,n===-1?void 0:n):"",state:t||{[Li]:0,key:o,__TSR_key:o}}}function fv(){return(Math.random()+1).toString(36).substring(7)}function Pd(e){return e[e.length-1]}function y4(e){return typeof e=="function"}function Mi(e,t){return y4(e)?e(t):e}const b4=Object.prototype.hasOwnProperty;function Dr(e,t){if(e===t)return e;const n=t,a=F_(e)&&F_(n);if(!a&&!(kd(e)&&kd(n)))return n;const o=a?e:B_(e);if(!o)return n;const l=a?n:B_(n);if(!l)return n;const u=o.length,d=l.length,f=a?new Array(d):{};let h=0;for(let g=0;g<d;g++){const p=a?g:l[g],y=e[p],_=n[p];if(y===_){f[p]=y,(a?g<u:b4.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Dr(y,_);f[p]=S,S===y&&h++}return u===d&&h===u?e:f}function B_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const o of n){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}const a=Object.getOwnPropertySymbols(e);for(const o of a){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}return t}function kd(e){if(!z_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!z_(n)||!n.hasOwnProperty("isPrototypeOf"))}function z_(e){return Object.prototype.toString.call(e)==="[object Object]"}function F_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vo(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!vo(e[a],t[a],n))return!1;return!0}if(kd(e)&&kd(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!vo(e[u],t[u],n))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!a||t[u]!==void 0)&&(l++,l>o||!vo(e[u],t[u],n)))return!1;return o===l}return!1}function Us(e){let t,n;const a=new Promise((o,l)=>{t=o,n=l});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",n(o)},a}function _4(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Pi(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function V_(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function H_(e,t){if(!e)return e;const n=/%25|%5C/gi;let a=0,o="",l;for(;(l=n.exec(e))!==null;)o+=V_(e.slice(a,l.index))+l[0],a=n.lastIndex;return o+V_(a?e.slice(a):e)}var E4="Invariant failed";function qa(e,t){if(!e)throw new Error(E4)}function jd(e){const t=new Map;let n,a;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,n=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===a&&(a=void 0)}const d=t.get(l);if(d)d.value=u,o(d);else{const f={key:l,value:u,prev:a};a&&(a.next=f),a=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,a=void 0}}}const Bs=0,Eo=1,So=2,hc=3,Ms=4,S4=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,x4=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,w4=/^([^{]*)\{\$\}([^}]*)$/;function hv(e,t,n=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=Bs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const h=e.length;return n[0]=So,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=Eo,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=l.match(w4);if(u){const g=u[1].length;return n[0]=So,n[1]=t+g,n[2]=t+g+1,n[3]=t+g+2,n[4]=t+g+3,n[5]=e.length,n}const d=l.match(x4);if(d){const h=d[1],g=d[2],p=d[3],y=h.length;return n[0]=hc,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+g.length,n[4]=o-p.length,n[5]=o,n}const f=l.match(S4);if(f){const h=f[1],g=f[2],p=f[3],y=h.length;return n[0]=Eo,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+g.length,n[4]=o-p.length,n[5]=o,n}return n[0]=Bs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function mf(e,t,n,a,o,l,u){u?.(n);let d=a;{const f=n.fullPath??n.from,h=f.length,g=n.options?.caseSensitive??e;for(;d<h;){const y=hv(f,d,t);let _;const S=d,x=y[5];switch(d=x+1,l++,y[0]){case Bs:{const R=f.substring(y[2],y[3]);if(g){const A=o.static?.get(R);if(A)_=A;else{o.static??=new Map;const C=Ds(n.fullPath??n.from);C.parent=o,C.depth=l,_=C,o.static.set(R,C)}}else{const A=R.toLowerCase(),C=o.staticInsensitive?.get(A);if(C)_=C;else{o.staticInsensitive??=new Map;const O=Ds(n.fullPath??n.from);O.parent=o,O.depth=l,_=O,o.staticInsensitive.set(A,O)}}break}case Eo:{const R=f.substring(S,y[1]),A=f.substring(y[4],x),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=o.dynamic?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=im(Eo,n.fullPath??n.from,C,O,M);_=N,N.depth=l,N.parent=o,o.dynamic??=[],o.dynamic.push(N)}break}case hc:{const R=f.substring(S,y[1]),A=f.substring(y[4],x),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=o.optional?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=im(hc,n.fullPath??n.from,C,O,M);_=N,N.parent=o,N.depth=l,o.optional??=[],o.optional.push(N)}break}case So:{const R=f.substring(S,y[1]),A=f.substring(y[4],x),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=im(So,n.fullPath??n.from,C,O,M);_=L,L.parent=o,L.depth=l,o.wildcard??=[],o.wildcard.push(L)}}o=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=Ds(n.fullPath??n.from);y.kind=Ms,y.parent=o,l++,y.depth=l,o.index=y,o=y}p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)mf(e,t,f,d,o,l,u)}function am(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ho(e){if(e.static)for(const t of e.static.values())ho(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ho(t);if(e.dynamic?.length){e.dynamic.sort(am);for(const t of e.dynamic)ho(t)}if(e.optional?.length){e.optional.sort(am);for(const t of e.optional)ho(t)}if(e.wildcard?.length){e.wildcard.sort(am);for(const t of e.wildcard)ho(t)}}function Ds(e){return{kind:Bs,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function im(e,t,n,a,o){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,caseSensitive:n,prefix:a,suffix:o}}function R4(e,t){const n=Ds("/"),a=new Uint16Array(6);for(const o of e)mf(!1,a,o,1,n,0);ho(n),t.masksTree=n,t.flatCache=jd(1e3)}function O4(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const a=pv(e,t.masksTree);return t.flatCache.set(e,a),a}function T4(e,t,n,a,o){e||="/",a||="/";const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);if(!u){u=Ds("/");const d=new Uint16Array(6);mf(t,d,{from:e},1,u,0),o.singleCache.set(l,u)}return pv(a,u,n)}function A4(e,t,n=!1){const a=n?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";const l=pv(e,t.segmentTree,n);return l&&(l.branch=N4(l.route)),t.matchCache.set(a,l),l}function C4(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function I4(e,t=!1,n){const a=Ds(e.fullPath),o=new Uint16Array(6),l={},u={};let d=0;return mf(t,o,e,1,a,0,h=>{if(n?.(h,d),qa(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const g=C4(h.fullPath);(!u[g]||h.fullPath.endsWith("/"))&&(u[g]=h)}d++}),ho(a),{processedTree:{segmentTree:a,singleCache:jd(1e3),matchCache:jd(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function pv(e,t,n=!1){const a=e.split("/"),o=L4(e,a,t,n);if(!o)return null;const l=M4(e,a,o);return"**"in o&&(l["**"]=o["**"]),{route:o.node.route,params:l}}function M4(e,t,n){const a=D4(n.node);let o=null;const l={};for(let u=0,d=0,f=0;d<a.length;u++,d++,f++){const h=a[d],g=t[u],p=f;if(g&&(f+=g.length),h.kind===Eo){o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const x=h.suffix?.length??0,T=y.substring(_+2,y.length-x-1),R=g.substring(_,g.length-x);l[T]=decodeURIComponent(R)}else{const x=y.substring(1);l[x]=decodeURIComponent(g)}}else if(h.kind===hc){if(n.skipped&1<<d){u--;continue}o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0,S=h.suffix?.length??0,x=y.substring(_+3,y.length-S-1),T=h.suffix||h.prefix?g.substring(_,g.length-S):g;T&&(l[x]=decodeURIComponent(T))}else if(h.kind===So){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),S=decodeURIComponent(_);l["*"]=S,l._splat=S;break}}return l}function N4(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function D4(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function L4(e,t,n,a){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Pd(t),l=o&&e!=="/",u=t.length-(o?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,g=null;for(;d.length;){const p=d.pop();let{node:y,index:_,skipped:S,depth:x,statics:T,dynamics:R,optionals:A}=p;a&&y.route&&y.kind!==Ms&&Vl(h,p)&&(h=p);const C=_===u;if(C&&(y.route&&!l&&Vl(g,p)&&(g=p),!y.optional&&!y.wildcard&&!y.index))continue;const O=C?void 0:t[_];let M;if(C&&y.index){const L={node:y.index,index:_,skipped:S,depth:x+1,statics:T,dynamics:R,optionals:A};if(T===u&&!R&&!A&&!S)return L;Vl(g,L)&&(g=L)}if(y.wildcard&&Vl(f,p))for(const L of y.wildcard){const{prefix:N,suffix:D}=L;if(!(N&&(C||!(L.caseSensitive?O:M??=O.toLowerCase()).startsWith(N)))){if(D){if(C)continue;const U=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?U:U.toLowerCase())!==D)continue}f={node:L,index:u,skipped:S,depth:x,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=S|1<<x,N=x+1;for(let D=y.optional.length-1;D>=0;D--){const U=y.optional[D];d.push({node:U,index:_,skipped:L,depth:N,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const U=y.optional[D],{prefix:Z,suffix:G}=U;if(Z||G){const W=U.caseSensitive?O:M??=O.toLowerCase();if(Z&&!W.startsWith(Z)||G&&!W.endsWith(G))continue}d.push({node:U,index:_+1,skipped:S,depth:N,statics:T,dynamics:R,optionals:A+1})}}if(!C&&y.dynamic&&O)for(let L=y.dynamic.length-1;L>=0;L--){const N=y.dynamic[L],{prefix:D,suffix:U}=N;if(D||U){const Z=N.caseSensitive?O:M??=O.toLowerCase();if(D&&!Z.startsWith(D)||U&&!Z.endsWith(U))continue}d.push({node:N,index:_+1,skipped:S,depth:x+1,statics:T,dynamics:R+1,optionals:A})}if(!C&&y.staticInsensitive){const L=y.staticInsensitive.get(M??=O.toLowerCase());L&&d.push({node:L,index:_+1,skipped:S,depth:x+1,statics:T+1,dynamics:R,optionals:A})}if(!C&&y.static){const L=y.static.get(O);L&&d.push({node:L,index:_+1,skipped:S,depth:x+1,statics:T+1,dynamics:R,optionals:A})}}if(g&&f)return Vl(f,g)?g:f;if(g)return g;if(f)return f;if(a&&h){let p=h.index;for(let _=0;_<h.index;_++)p+=t[_].length;const y=p===e.length?"/":e.slice(p);return{node:h.node,skipped:h.skipped,"**":decodeURIComponent(y)}}return null}function Vl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ms)>(e.node.kind===Ms)||t.node.kind===Ms==(e.node.kind===Ms)&&t.depth>e.depth))):!0}function xd(e){return mv(e.filter(t=>t!==void 0).join("/"))}function mv(e){return e.replace(/\/{2,}/g,"/")}function wx(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function yo(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Rx(e){return yo(wx(e))}function Ud(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function P4(e,t,n){return Ud(e,n)===Ud(t,n)}function k4({base:e,to:t,trailingSlash:n="never",cache:a}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(a){u=o?t:l?e:e+"\0"+t;const p=a.get(u);if(p)return p}let d;if(l)d=e.split("/");else if(o)d=t.split("/");else{for(d=e.split("/");d.length>1&&Pd(d)==="";)d.pop();const p=t.split("/");for(let y=0,_=p.length;y<_;y++){const S=p[y];S===""?y?y===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(Pd(d)===""?n==="never"&&d.pop():n==="always"&&d.push(""));let f,h="";for(let p=0;p<d.length;p++){p>0&&(h+="/");const y=d[p];if(!y)continue;f=hv(y,0,f);const _=f[0];if(_===Bs){h+=y;continue}const S=f[5],x=y.substring(0,f[1]),T=y.substring(f[4],S),R=y.substring(f[2],f[3]);_===Eo?h+=x||T?`${x}{$${R}}${T}`:`$${R}`:_===So?h+=x||T?`${x}{$}${T}`:"$":h+=`${x}{-$${R}}${T}`}h=mv(h);const g=h||"/";return u&&a&&a.set(u,g),g}function om(e,t,n){const a=t[e];return typeof a!="string"?a:e==="_splat"?encodeURI(a):j4(a,n)}function sm({path:e,params:t,decodeCharMap:n}){let a=!1;const o={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:a};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:a};const l=e.length;let u=0,d,f="";for(;u<l;){const g=u;d=hv(e,g,d);const p=d[5];if(u=p+1,g===p)continue;const y=d[0];if(y===Bs){f+="/"+e.substring(g,p);continue}if(y===So){const _=t._splat;o._splat=_,o["*"]=_;const S=e.substring(g,d[1]),x=e.substring(d[4],p);if(!_){a=!0,(S||x)&&(f+="/"+S+x);continue}const T=om("_splat",t,n);f+="/"+S+T+x;continue}if(y===Eo){const _=e.substring(d[2],d[3]);!a&&!(_ in t)&&(a=!0),o[_]=t[_];const S=e.substring(g,d[1]),x=e.substring(d[4],p),T=om(_,t,n)??"undefined";f+="/"+S+T+x;continue}if(y===hc){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;o[_]=S;const x=e.substring(g,d[1]),T=e.substring(d[4],p),R=om(_,t,n)??"";f+="/"+x+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:a}}function j4(e,t){let n=encodeURIComponent(e);if(t)for(const[a,o]of t)n=n.replaceAll(a,o);return n}function yr(e){return!!e?.isNotFound}function U4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Bd="tsr-scroll-restoration-v1_3",B4=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function z4(){const e=U4();if(!e)return null;const t=e.getItem(Bd);let n=t?JSON.parse(t):{};return{state:n,set:a=>(n=Mi(a,n)||n,e.setItem(Bd,JSON.stringify(n)))}}const Ju=z4(),vg=e=>e.state.__TSR_key||e.href;function F4(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let zd=!1;function Ox({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:o,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=u[d];zd=!0;e:{if(a&&f&&Object.keys(f).length>0){for(const p in f){const y=f[p];if(p==="window")window.scrollTo({top:y.scrollY,left:y.scrollX,behavior:n});else if(p){const _=document.querySelector(p);_&&(_.scrollLeft=y.scrollX,_.scrollTop=y.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const y=document.getElementById(h);y&&y.scrollIntoView(p)}break e}const g={top:0,left:0,behavior:n};if(window.scrollTo(g),o)for(const p of o){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(g)}}zd=!1}function V4(e,t){if(!Ju&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Ju))return;e.isScrollRestorationSetup=!0,zd=!1;const a=e.options.getScrollRestorationKey||vg;window.history.scrollRestoration="manual";const o=l=>{if(zd||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?u=`[data-scroll-restoration-id="${f}"]`:u=F4(l.target)}const d=a(e.state.location);Ju.set(f=>{const h=f[d]||={},g=h[u]||={};if(u==="window")g.scrollX=window.scrollX||0,g.scrollY=window.scrollY||0;else if(u){const p=document.querySelector(u);p&&(g.scrollX=p.scrollLeft||0,g.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",B4(o,100),!0),e.subscribe("onRendered",l=>{const u=a(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Ox({storageKey:Bd,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Ju.set(d=>(d[u]||={},d)))})}function H4(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function $4(e,t=String){const n=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&n.set(a,t(o))}return n.toString()}function lm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function G4(e){const t=new URLSearchParams(e),n={};for(const[a,o]of t.entries()){const l=n[a];l==null?n[a]=lm(o):Array.isArray(l)?l.push(lm(o)):n[a]=[l,lm(o)]}return n}const q4=K4(JSON.parse),Y4=W4(JSON.stringify,JSON.parse);function K4(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=G4(t);for(const a in n){const o=n[a];if(typeof o=="string")try{n[a]=e(o)}catch{}}return n}}function W4(e,t){const n=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=$4(o,a);return l?`?${l}`:""}}const fr="__root__";function Z4(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function kr(e){return e instanceof Response&&!!e.options}const wd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},gf=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),gv=(e,t,n=!0)=>{const a={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const d=e.router.getMatch(u.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},Tx=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),qa(n.options.notFoundComponent);const a=e.matches.find(o=>o.routeId===n.id);qa(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,o=>({...o,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Tx(e,t))},Ni=(e,t,n)=>{if(!(!kr(n)&&!yr(n))){if(kr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const a=kr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:a,isFetching:!1,error:n})),yr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw kr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Tx(e,n),n)}},Ax=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Hl=(e,t,n,a)=>{const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,Ni(e,e.router.getMatch(o),n);try{u.options.onError?.(n)}catch(d){n=d,Ni(e,e.router.getMatch(o),n)}e.updateMatch(o,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},Q4=(e,t,n,a)=>{const o=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){o.ssr=a.id===fr;return}if(u?.ssr===!1){o.ssr=!1;return}const d=_=>_===!0&&u?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(a.options.ssr===void 0){o.ssr=d(f);return}if(typeof a.options.ssr!="function"){o.ssr=d(a.options.ssr);return}const{search:h,params:g}=o,p={search:ed(h,o.searchError),params:ed(g,o.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:ed(_.search,_.searchError),params:ed(_.params,_.paramsError),ssr:_.ssr}))},y=a.options.ssr(p);if(Pi(y))return y.then(_=>{o.ssr=d(_??f)});o.ssr=d(y??f)},Cx=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!gf(e,t)&&(n.options.loader||n.options.beforeLoad||Nx(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{wd(e)},o);a._nonReactive.pendingTimeout=u}},X4=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Cx(e,t,n,a);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Ni(e,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},J4=(e,t,n,a)=>{const o=e.router.getMatch(t),l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Us(()=>{l?.resolve()});const{paramsError:u,searchError:d}=o;u&&Hl(e,n,u,"PARSE_PARAMS"),d&&Hl(e,n,d,"VALIDATE_SEARCH"),Cx(e,t,a,o);const f=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let p=!1;const y=()=>{p||(p=!0,e.updateMatch(t,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:f})))},_=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){ic(()=>{y(),_()});return}o._nonReactive.beforeLoadPromise=Us();const S={...gv(e,n,!1),...o.__routeContext},{search:x,params:T,cause:R}=o,A=gf(e,t),C={search:x,abortController:f,params:T,preload:A,context:S,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":R,matches:e.matches,...e.router.options.additionalContext},O=L=>{if(L===void 0){ic(()=>{y(),_()});return}(kr(L)||yr(L))&&(y(),Hl(e,n,L,"BEFORE_LOAD")),ic(()=>{y(),e.updateMatch(t,N=>({...N,__beforeLoadContext:L})),_()})};let M;try{if(M=a.options.beforeLoad(C),Pi(M))return y(),M.catch(L=>{Hl(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),Hl(e,n,L,"BEFORE_LOAD")}O(M)},e3=(e,t)=>{const{id:n,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],l=()=>{if(e.router.isServer){const f=Q4(e,n,t,o);if(Pi(f))return f.then(d)}return d()},u=()=>J4(e,n,t,o),d=()=>{if(Ax(e,n))return;const f=X4(e,n,o);return Pi(f)?f.then(u):u()};return l()},t3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([l,u,d])=>{const f=l?.meta,h=l?.links,g=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:g,headers:d,scripts:u,styles:p}})},Ix=(e,t,n,a)=>{const o=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:d,cause:f}=e.router.getMatch(t),h=gv(e,n),g=gf(e,t);return{params:l,deps:u,preload:!!g,parentMatchPromise:o,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:g?"preload":f,route:a,...e.router.options.additionalContext}},$_=async(e,t,n,a)=>{try{const o=e.router.getMatch(t);try{(!e.router.isServer||o.ssr===!0)&&Mx(a);const l=a.options.loader?.(Ix(e,t,n,a)),u=a.options.loader&&Pi(l);if((u||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),a.options.loader){const h=u?await l:l;Ni(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,g=>({...g,loaderData:h}))}a._lazyPromise&&await a._lazyPromise;const f=o._nonReactive.minPendingPromise;f&&await f,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;const d=o._nonReactive.minPendingPromise;d&&await d,yr(l)&&await a.options.notFoundComponent?.preload?.(),Ni(e,e.router.getMatch(t),l);try{a.options.onError?.(l)}catch(f){u=f,Ni(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:u,status:"error",isFetching:!1}))}}catch(o){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Ni(e,l,o)}},n3=async(e,t)=>{const{id:n,routeId:a}=e.matches[t];let o=!1,l=!1;const u=e.router.looseRoutesById[a],d=()=>{e.updateMatch(n,g=>({...g,context:gv(e,t)}))};if(Ax(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const g=e.router.getMatch(n);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload)return g;await g._nonReactive.loaderPromise;const p=e.router.getMatch(n),y=p._nonReactive.error||p.error;y&&Ni(e,p,y)}else{const p=Date.now()-g.updatedAt,y=gf(e,n),_=y?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,S=u.options.shouldReload,x=typeof S=="function"?S(Ix(e,n,t,u)):S,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Us(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;o=A==="success"&&(C||(x??p>_)),y&&u.options.preload===!1||(o&&!e.sync?(l=!0,(async()=>{try{await $_(e,n,t,u),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){kr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||o&&e.sync)&&await $_(e,n,t,u))}}const f=e.router.getMatch(n);l||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,l||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0,l||d();const h=l?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(n)):f};async function G_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&wd(t);try{for(let d=0;d<t.matches.length;d++){const f=e3(t,d);Pi(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(n3(t,d));const o=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of o){if(kr(d))throw d;!l&&yr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,g=t.router.looseRoutesById[h];try{const p=t3(t,f,g);if(p){const y=await p;t.updateMatch(f,_=>({..._,...y}))}}catch(p){console.error(`Error executing head for route ${h}:`,p)}}if(l)throw l;const u=wd(t);Pi(u)&&await u}catch(n){if(yr(n)&&!t.preload){const a=wd(t);throw Pi(a)&&await a,n}if(kr(n))throw n}return t.matches}async function Mx(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const a of Dx){const o=e.options[a]?.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function ed(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Nx(e){for(const t of Dx)if(e.options[t]?.preload)return!0;return!1}const Dx=["component","errorComponent","pendingComponent","notFoundComponent"];function r3(e){return{input:({url:t})=>{for(const n of e)t=Lx(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Px(e[n],t);return t}}}function a3(e){const t=Rx(e.basepath),n=`/${t}`,a=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const d=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===o?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=xd(["/",t,u.pathname]),u)}}function Lx(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Px(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function bo(e){const t=e.resolvedLocation,n=e.location,a=t?.pathname!==n.pathname,o=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:o,hashChanged:l}}class i3{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const a=this.options,o=this.basepath??a?.basepath??"/",l=this.basepath===void 0,u=a?.rewrite;this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(y=>[encodeURIComponent(y),y])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=v4())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new m4(s3(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),V4(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||o!==f||u!==h){this.basepath=f;const y=[];Rx(f)!==""&&y.push(a3({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:r3(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:a,processedTree:o}=I4(this.routeTree,this.options.caseSensitive,(u,d)=>{u.init({originalIndex:d})});this.options.routeMasks&&R4(this.options.routeMasks,o),this.routesById=n,this.routesByPath=a,this.processedTree=o;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,a)=>{const o={eventType:n,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const o=({href:f,state:h})=>{const g=new URL(f,this.origin),p=Lx(this.rewrite,g),y=this.options.parseSearch(p.search),_=this.options.stringifySearch(y);return p.search=_,{href:p.href.replace(p.origin,""),publicHref:f,url:p,pathname:H_(p.pathname),searchStr:_,search:Dr(a?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Dr(a?.state,h)}},l=o(n),{__tempLocation:u,__tempKey:d}=l.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathCache=jd(1e3),this.resolvePathWithBase=(n,a)=>k4({base:n,to:mv(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},o):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>l3({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),a=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...a]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const a=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(u,{_buildLocation:!0}),f=Pd(d);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??f.fullPath,g=this.resolvePathWithBase(h,"."),p=f.search,y={...f.params},_=l.to?this.resolvePathWithBase(g,`${l.to}`):this.resolvePathWithBase(g,"."),S=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,Mi(l.params,y)),x=sm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(x,void 0,{_buildLocation:!0}).map(Z=>this.looseRoutesById[Z.routeId]);if(Object.keys(S).length>0)for(const Z of T){const G=Z.options.params?.stringify??Z.options.stringifyParams;G&&Object.assign(S,G(S))}const R=n.leaveParams?_:H_(sm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const Z={};T.forEach(G=>{if(G.options.validateSearch)try{Object.assign(Z,yg(G.options.validateSearch,{...Z,...A}))}catch{}}),A=Z}A=c3({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Dr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?u.hash:l.hash?Mi(l.hash,u.hash):void 0,M=O?`#${O}`:"";let L=l.state===!0?u.state:l.state?Mi(l.state,u.state):{};L=Dr(u.state,L);const N=`${R}${C}${M}`,D=new URL(N,this.origin),U=Px(this.rewrite,D);return{publicHref:U.pathname+U.search+U.hash,href:N,url:U,pathname:R,search:A,searchStr:C,state:L,hash:O??"",unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const d=a(l);let f=u?a(u):void 0;if(!f){const h={};if(this.options.routeMasks){const g=O4(d.pathname,this.processedTree);if(g){Object.assign(h,g.params);const{from:p,params:y,..._}=g.route,S=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,Mi(y,h));u={from:n.from,..._,params:S},f=a(u)}}}return f&&(d.maskedLocation=f),d};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:a,...o})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const h=vo(o.state,this.latestLocation.state);return f.forEach(g=>{delete o.state[g]}),h},u=yo(this.latestLocation.href)===yo(o.href),d=this.commitLocationPromise;if(this.commitLocationPromise=Us(()=>{d?.resolve()}),u&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:g,...p}=o;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Ld(d,{__TSR_index:n?p:p+1});f.to=y.pathname,f.search=this.options.parseSearch(y.search),f.hash=y.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const g=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:a,href:o,publicHref:l,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(!o||!l&&!d){const h=this.buildLocation({to:n,...u});o=o??h.url.href,l=l??h.url.href}const f=!d&&l?l:o;if(!u.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const p of g)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const a=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==a.publicHref||a.url.origin!==this.origin){const o=this.getParsedLocationHref(a);throw Z4({href:o})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(o=>!n.some(l=>l.id===o.id))}))},this.load=async n=>{let a,o,l;for(l=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...bo({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",...bo({resolvedLocation:h,location:f})}),await G_({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=[],p=[],y=[];ic(()=>{this.__store.setState(_=>{const S=_.matches,x=_.pendingMatches||_.matches;return g=S.filter(T=>!x.some(R=>R.id===T.id)),p=x.filter(T=>!S.some(R=>R.id===T.id)),y=x.filter(T=>S.some(R=>R.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...g.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[g,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,S])=>{_.forEach(x=>{this.looseRoutesById[x.routeId].options[S]?.(x)})})})})}})}catch(f){kr(f)?(a=f,this.isServer||this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):yr(f)&&(o=f),this.__store.setState(h=>({...h,statusCode:a?a.status:o?404:h.matches.some(g=>g.status==="error")?500:200,redirect:a}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(d=>d.status==="error")&&(u=500),u!==void 0&&this.__store.setState(d=>({...d,statusCode:u}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,d=typeof a.types=="function"?a.types(bo({resolvedLocation:u,location:l})):a.types;if(d===!1){n();return}o={update:n,types:d}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{const o=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";o&&this.__store.setState(l=>({...l,[o]:l[o]?.map(u=>u.id===n?a(u):u)}))})},this.getMatch=n=>{const a=o=>o.id===n;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=n=>{const a=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(a),cachedMatches:o.cachedMatches.map(a),pendingMatches:o.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let a=n.url.href;return this.origin&&n.url.origin===this.origin&&(a=a.replace(this.origin,"")||"/"),a},this.resolveRedirect=n=>{if(!n.options.href){const a=this.buildLocation(n.options),o=this.getParsedLocationHref(a);n.options.href=a.href,n.headers.set("Location",o)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(l=>!a(l))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const o=this.looseRoutesById[a.routeId];if(!o.options.loader)return!0;const l=(a.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Mx,this.preloadRoute=async n=>{const a=this.buildLocation(n);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),u=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);ic(()=>{o.forEach(d=>{u.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return o=await G_({router:this,matches:o,location:a,preload:!0,updateMatch:(d,f)=>{l.has(d)?o=o.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),o}catch(d){if(kr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:a});yr(d)||console.error(d);return}},this.matchRoute=(n,a)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(a?.pending&&this.state.status!=="pending")return!1;const d=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=T4(l.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!vo(f.params,n.params,{partial:!0})?!1:a?.includeSearch??!0?vo(d.search,l.search,{partial:!0})?f.params:!1:f.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Y4,parseSearch:t.parseSearch??q4}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const a=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:l}=a;let{matchedRoutes:u}=a,d=!1;(o?o.path!=="/"&&l["**"]:yo(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=u.length-1;p>=0;p--){const y=u[p];if(y.children)return y.id}return fr}})(),h=[],g=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return u.forEach((p,y)=>{const _=h[y-1],[S,x,T]=(()=>{const j=_?.search??t.search,ne=_?._strictSearch??void 0;try{const ie=yg(p.options.validateSearch,{...j})??void 0;return[{...j,...ie},{...ne,...ie},void 0]}catch(ie){let P=ie;if(ie instanceof Fd||(P=new Fd(ie.message,{cause:ie})),n?.throwOnError)throw P;return[j,{},P]}})(),R=p.options.loaderDeps?.({search:S})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=sm({path:p.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),M=p.id+C+A,L=this.getMatch(M),N=this.state.matches.find(j=>j.routeId===p.id),D=L?._strictParams??O;let U;if(!L){const j=p.options.params?.parse??p.options.parseParams;if(j)try{Object.assign(D,j(D))}catch(ne){if(yr(ne)||kr(ne)?U=ne:U=new o3(ne.message,{cause:ne}),n?.throwOnError)throw U}}Object.assign(l,D);const Z=N?"stay":"enter";let G;if(L)G={...L,cause:Z,params:N?Dr(N.params,l):l,_strictParams:D,search:Dr(N?N.search:L.search,S),_strictSearch:x};else{const j=p.options.loader||p.options.beforeLoad||p.lazyFn||Nx(p)?"pending":"success";G={id:M,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:N?Dr(N.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:N?Dr(N.search,S):S,_strictSearch:x,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:U,__routeContext:void 0,_nonReactive:{loadPromise:Us()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Z,loaderDeps:N?Dr(N.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(G.globalNotFound=f===p.id),G.searchError=T;const W=g(_);G.context={...W,...G.__routeContext,...G.__beforeLoadContext},h.push(G)}),h.forEach((p,y)=>{const _=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const x=h[y-1],T=g(x);if(_.options.context){const R={deps:p.loaderDeps,params:p.params,context:T??{},location:t,navigate:A=>this.navigate({...A,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:h};p.__routeContext=_.options.context(R)??void 0}p.context={...T,...p.__routeContext,...p.__beforeLoadContext}}}),h}}class Fd extends Error{}class o3 extends Error{}function s3(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function yg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Fd("Async validation not supported");if(n.issues)throw new Fd(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function l3({pathname:e,routesById:t,processedTree:n}){const a={},o=yo(e);let l;const u=A4(o,n,!0);return u&&(l=u.route,Object.assign(a,u.params)),{matchedRoutes:u?.branch||[t[fr]],routeParams:a,foundRoute:l}}function c3({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){const o=n.reduce((d,f)=>{const h=[];if("search"in f.options)f.options.search?.middlewares&&h.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const g=({search:p,next:y})=>{let _=p;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(_=f.options.preSearchFilters.reduce((x,T)=>T(x),p));const S=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((x,T)=>T(x),S):S};h.push(g)}if(a&&f.options.validateSearch){const g=({search:p,next:y})=>{const _=y(p);try{return{..._,...yg(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(g)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Mi(t.search,d):{};o.push(l);const u=(d,f)=>{if(d>=o.length)return f;const h=o[d];return h({search:f,next:p=>u(d+1,p)})};return u(0,e)}const u3="Error preloading route! ☝️";class kx{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const a=this.options,o=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=fr:this.parentRoute||qa(!1);let l=o?fr:a?.path;l&&l!=="/"&&(l=wx(l));const u=a?.id||l;let d=o?fr:xd([this.parentRoute.id===fr?"":this.parentRoute.id,u]);l===fr&&(l="/"),d!==fr&&(d=xd(["/",d]));const f=d===fr?"/":xd([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=f,this._to=f},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class d3 extends kx{constructor(t){super(t)}}function vv(e){const t=e.errorComponent??vf;return b.jsx(f3,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?E.createElement(t,{error:n,reset:a}):e.children})}class f3 extends E.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function vf({error:e}){const[t,n]=E.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function h3({children:e,fallback:t=null}){return p3()?b.jsx(V.Fragment,{children:e}):b.jsx(V.Fragment,{children:t})}function p3(){return V.useSyncExternalStore(m3,()=>!0,()=>!1)}function m3(){return()=>{}}var cm={exports:{}},um={},dm={exports:{}},fm={};var q_;function g3(){if(q_)return fm;q_=1;var e=Vi();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(p,y){var _=y(),S=a({inst:{value:_,getSnapshot:y}}),x=S[0].inst,T=S[1];return l(function(){x.value=_,x.getSnapshot=y,f(x)&&T({inst:x})},[p,_,y]),o(function(){return f(x)&&T({inst:x}),p(function(){f(x)&&T({inst:x})})},[p]),u(_),_}function f(p){var y=p.getSnapshot;p=p.value;try{var _=y();return!n(p,_)}catch{return!0}}function h(p,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return fm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,fm}var Y_;function jx(){return Y_||(Y_=1,dm.exports=g3()),dm.exports}var K_;function v3(){if(K_)return um;K_=1;var e=Vi(),t=jx();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var a=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return um.useSyncExternalStoreWithSelector=function(h,g,p,y,_){var S=l(null);if(S.current===null){var x={hasValue:!1,value:null};S.current=x}else x=S.current;S=d(function(){function R(L){if(!A){if(A=!0,C=L,L=y(L),_!==void 0&&x.hasValue){var N=x.value;if(_(N,L))return O=N}return O=L}if(N=O,a(C,L))return N;var D=y(L);return _!==void 0&&_(N,D)?(C=L,N):(C=L,O=D)}var A=!1,C,O,M=p===void 0?null:p;return[function(){return R(g())},M===null?void 0:function(){return R(M())}]},[g,p,y,_]);var T=o(h,S[0],S[1]);return u(function(){x.hasValue=!0,x.value=T},[T]),f(T),T},um}var W_;function y3(){return W_||(W_=1,cm.exports=v3()),cm.exports}var Ux=y3();const pB=Io(Ux);function b3(e,t=a=>a,n={}){const a=n.equal??_3;return Ux.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,a)}function _3(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,o]of e)if(!t.has(a)||!Object.is(o,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Z_(e);if(n.length!==Z_(t).length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0}function Z_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const hm=E.createContext(null);function Bx(){return typeof document>"u"?hm:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=hm,hm)}function tr(e){const t=E.useContext(Bx());return e?.warn,t}function er(e){const t=tr({warn:e?.router===void 0}),n=e?.router||t,a=E.useRef(void 0);return b3(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Dr(a.current,e.select(o));return a.current=l,l}return e.select(o)}return o})}const yf=E.createContext(void 0),E3=E.createContext(void 0);function va(e){const t=E.useContext(e.from?E3:yf);return er({select:a=>{const o=a.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(qa(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function yv(e){return va({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function bv(e){const{select:t,...n}=e;return va({...n,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function _v(e){return va({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Ev(e){return va({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const tc=typeof window<"u"?E.useLayoutEffect:E.useEffect;function pm(e){const t=E.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function S3(e,t,n={},a={}){E.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,a.disabled,e])}function x3(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function Rc(e){const t=tr();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function mB(e){const t=tr(),n=Rc(),a=E.useRef(null);return tc(()=>{a.current!==e&&(n(e),a.current=e)},[t,e,n]),null}var bf=cx();const zx=Io(bf);function w3(e,t){const n=tr(),[a,o]=E.useState(!1),l=E.useRef(!1),u=x3(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:g,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:S,startTransition:x,resetScroll:T,viewTransition:R,children:A,target:C,disabled:O,style:M,className:L,onClick:N,onFocus:D,onMouseEnter:U,onMouseLeave:Z,onTouchStart:G,ignoreBlocker:W,params:j,search:ne,hash:ie,state:P,mask:F,reloadDocument:$,unsafeRelative:re,from:ve,_fromLocation:k,...Q}=e,ee=er({select:Y=>Y.location.search,structuralSharing:!0}),oe=e.from,pe=E.useMemo(()=>({...e,from:oe}),[n,ee,oe,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),be=E.useMemo(()=>n.buildLocation({...pe}),[n,pe]),ye=E.useMemo(()=>{if(O)return;let Y=be.maskedLocation?be.maskedLocation.url.href:be.url.href,ce=!1;return n.origin&&(Y.startsWith(n.origin)?Y=n.history.createHref(Y.replace(n.origin,""))||"/":ce=!0),{href:Y,external:ce}},[O,be.maskedLocation,be.url,n.origin,n.history]),Se=E.useMemo(()=>{if(ye?.external)return ye.href;try{return new URL(g),g}catch{}},[g,ye]),Pe=e.reloadDocument||Se?!1:p??n.options.defaultPreload,ke=y??n.options.defaultPreloadDelay??0,Ee=er({select:Y=>{if(Se)return!1;if(h?.exact){if(!P4(Y.location.pathname,be.pathname,n.basepath))return!1}else{const ce=Ud(Y.location.pathname,n.basepath),he=Ud(be.pathname,n.basepath);if(!(ce.startsWith(he)&&(ce.length===he.length||ce[he.length]==="/")))return!1}return(h?.includeSearch??!0)&&!vo(Y.location.search,be.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Y.location.hash===be.hash:!0}}),ze=E.useCallback(()=>{n.preloadRoute({...pe}).catch(Y=>{console.warn(Y),console.warn(u3)})},[n,pe]),Pt=E.useCallback(Y=>{Y?.isIntersecting&&ze()},[ze]);S3(u,Pt,C3,{disabled:!!O||Pe!=="viewport"}),E.useEffect(()=>{l.current||!O&&Pe==="render"&&(ze(),l.current=!0)},[O,ze,Pe]);const ge=Y=>{const ce=Y.currentTarget.getAttribute("target"),he=C!==void 0?C:ce;if(!O&&!I3(Y)&&!Y.defaultPrevented&&(!he||he==="_self")&&Y.button===0){Y.preventDefault(),bf.flushSync(()=>{o(!0)});const fe=n.subscribe("onResolved",()=>{fe(),o(!1)});n.navigate({...pe,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:x,viewTransition:R,ignoreBlocker:W})}};if(Se)return{...Q,ref:u,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...M&&{style:M},...L&&{className:L},...N&&{onClick:N},...D&&{onFocus:D},...U&&{onMouseEnter:U},...Z&&{onMouseLeave:Z},...G&&{onTouchStart:G}};const me=Y=>{O||Pe&&ze()},Re=me,Ue=Y=>{if(!(O||!Pe))if(!ke)ze();else{const ce=Y.target;if($l.has(ce))return;const he=setTimeout(()=>{$l.delete(ce),ze()},ke);$l.set(ce,he)}},it=Y=>{if(O||!Pe||!ke)return;const ce=Y.target,he=$l.get(ce);he&&(clearTimeout(he),$l.delete(ce))},Fe=Ee?Mi(d,{})??R3:mm,tt=Ee?mm:Mi(f,{})??mm,B=[L,Fe.className,tt.className].filter(Boolean).join(" "),q=(M||Fe.style||tt.style)&&{...M,...Fe.style,...tt.style};return{...Q,...Fe,...tt,href:ye?.href,ref:u,onClick:Gl([N,ge]),onFocus:Gl([D,me]),onMouseEnter:Gl([U,Ue]),onMouseLeave:Gl([Z,it]),onTouchStart:Gl([G,Re]),disabled:!!O,target:C,...q&&{style:q},...B&&{className:B},...O&&O3,...Ee&&T3,...a&&A3}}const mm={},R3={className:"active"},O3={role:"link","aria-disabled":!0},T3={"data-status":"active","aria-current":"page"},A3={"data-transitioning":"transitioning"},$l=new WeakMap,C3={rootMargin:"100px"},Gl=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Sv=E.forwardRef((e,t)=>{const{_asChild:n,...a}=e,{type:o,ref:l,...u}=w3(a,t),d=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;return n===void 0&&delete u.disabled,E.createElement(n||"a",{...u,ref:l},d)});function I3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class M3 extends kx{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>Ev({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>_v({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>bv({...n,from:this.id}),this.useLoaderData=n=>yv({...n,from:this.id}),this.useNavigate=()=>Rc({from:this.fullPath}),this.Link=V.forwardRef((n,a)=>b.jsx(Sv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Cn(e){return new M3(e)}class N3 extends d3{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>Ev({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>_v({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>bv({...n,from:this.id}),this.useLoaderData=n=>yv({...n,from:this.id}),this.useNavigate=()=>Rc({from:this.fullPath}),this.Link=V.forwardRef((n,a)=>b.jsx(Sv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function D3(e){return new N3(e)}function Q_(e){return typeof e=="object"?new X_(e,{silent:!0}).createRoute(e):new X_(e,{silent:!0}).createRoute}class X_{constructor(t,n){this.path=t,this.createRoute=a=>{this.silent;const o=Cn(a);return o.isRoot=!1,o},this.silent=n?.silent}}class J_{constructor(t){this.useMatch=n=>va({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({from:this.options.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>Ev({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>_v({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>bv({...n,from:this.options.id}),this.useLoaderData=n=>yv({...n,from:this.options.id}),this.useNavigate=()=>{const n=tr();return Rc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function eE(e){return typeof e=="object"?new J_(e):t=>new J_({id:e,...t})}function Pn(e,t){let n,a,o,l;const u=()=>(n||(n=e().then(f=>{n=void 0,a=f.default}).catch(f=>{if(o=f,_4(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(E.use)E.use(u());else throw u();return E.createElement(a,h)};return d.preload=u,d}function L3(){const e=tr(),t=E.useRef({router:e,mounted:!1}),[n,a]=E.useState(!1),{hasPendingMatches:o,isLoading:l}=er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),u=pm(l),d=l||n||o,f=pm(d),h=l||o,g=pm(h);return e.startTransition=p=>{a(!0),E.startTransition(()=>{p(),a(!1)})},E.useEffect(()=>{const p=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return yo(e.latestLocation.publicHref)!==yo(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),tc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(y){console.error(y)}})()},[e]),tc(()=>{u&&!l&&e.emit({type:"onLoad",...bo(e.state)})},[u,e,l]),tc(()=>{g&&!h&&e.emit({type:"onBeforeRouteMount",...bo(e.state)})},[h,g,e]),tc(()=>{if(f&&!d){const p=bo(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&H4(e)}},[d,f,e]),null}function P3(e){const t=er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(vv,{getResetKey:()=>t,onCatch:(n,a)=>{if(yr(n))e.onCatch?.(n,a);else throw n},errorComponent:({error:n})=>{if(yr(n))return e.fallback?.(n);throw n},children:e.children})}function k3(){return b.jsx("p",{children:"Not Found"})}function As(e){return b.jsx(b.Fragment,{children:e.children})}function Fx(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(k3,{})}function j3({children:e}){const t=tr();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function U3(){const e=tr();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||vg)(e.latestLocation),a=n!==vg(e.latestLocation)?n:void 0,o={storageKey:Bd,shouldScrollRestoration:!0};return a&&(o.key=a),b.jsx(j3,{children:`(${Ox.toString()})(${JSON.stringify(o)})`})}const Vx=E.memo(function({matchId:t}){const n=tr(),a=er({select:R=>{const A=R.matches.find(C=>C.id===t);return qa(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),o=n.routesById[a.routeId],l=o.options.pendingComponent??n.options.defaultPendingComponent,u=l?b.jsx(l,{}):null,d=o.options.errorComponent??n.options.defaultErrorComponent,f=o.options.onCatch??n.options.defaultOnCatch,h=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",p=(!o.isRoot||o.options.wrapInSuspense||g)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||g))?E.Suspense:As,y=d?vv:As,_=h?P3:As,S=er({select:R=>R.loadedAt}),x=er({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=o.isRoot?o.options.shellComponent??As:As;return b.jsxs(T,{children:[b.jsx(yf.Provider,{value:t,children:b.jsx(p,{fallback:u,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||vf,onCatch:(R,A)=>{if(yr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==a.routeId||!R.routeId&&!o.isRoot)throw R;return E.createElement(h,R)},children:g||a._displayPending?b.jsx(h3,{fallback:u,children:b.jsx(tE,{matchId:t})}):b.jsx(tE,{matchId:t})})})})}),x===fr&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(B3,{}),b.jsx(U3,{})]}):null]})});function B3(){const e=tr(),t=E.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...bo(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const tE=E.memo(function({matchId:t}){const n=tr(),{match:a,key:o,routeId:l}=er({select:f=>{const h=f.matches.find(S=>S.id===t),g=h.routeId,y=(n.routesById[g].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:g,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:y?JSON.stringify(y):void 0,routeId:g,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],d=E.useMemo(()=>{const f=u.options.component??n.options.defaultComponent;return f?b.jsx(f,{},o):b.jsx(Hx,{})},[o,u.options.component,n.options.defaultComponent]);if(a._displayPending)throw n.getMatch(a.id)?._nonReactive.displayPendingPromise;if(a._forcePending)throw n.getMatch(a.id)?._nonReactive.minPendingPromise;if(a.status==="pending"){const f=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const g=Us();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(a.id)?._nonReactive.loadPromise}if(a.status==="notFound")return qa(yr(a.error)),Fx(n,u,a.error);if(a.status==="redirected")throw qa(kr(a.error)),n.getMatch(a.id)?._nonReactive.loadPromise;if(a.status==="error"){if(n.isServer){const f=(u.options.errorComponent??n.options.defaultErrorComponent)||vf;return b.jsx(f,{error:a.error,reset:void 0,info:{componentStack:""}})}throw a.error}return d}),Hx=E.memo(function(){const t=tr(),n=E.useContext(yf),a=er({select:h=>h.matches.find(g=>g.id===n)?.routeId}),o=t.routesById[a],l=er({select:h=>{const p=h.matches.find(y=>y.id===n);return qa(p),p.globalNotFound}}),u=er({select:h=>{const g=h.matches,p=g.findIndex(y=>y.id===n);return g[p+1]?.id}}),d=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(l)return Fx(t,o,void 0);if(!u)return null;const f=b.jsx(Vx,{matchId:u});return a===fr?b.jsx(E.Suspense,{fallback:d,children:f}):f});function z3(){const e=tr(),n=e.routesById[fr].options.pendingComponent??e.options.defaultPendingComponent,a=n?b.jsx(n,{}):null,o=e.isServer||typeof document<"u"&&e.ssr?As:E.Suspense,l=b.jsxs(o,{fallback:a,children:[!e.isServer&&b.jsx(L3,{}),b.jsx(F3,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function F3(){const e=tr(),t=er({select:o=>o.matches[0]?.id}),n=er({select:o=>o.loadedAt}),a=t?b.jsx(Vx,{matchId:t}):null;return b.jsx(yf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:b.jsx(vv,{getResetKey:()=>n,errorComponent:vf,onCatch:o=>{o.message||o.toString()},children:a})})}const V3=e=>new H3(e);class H3 extends i3{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Q_,globalThis.createLazyFileRoute=eE):typeof window<"u"&&(window.createFileRoute=Q_,window.createLazyFileRoute=eE);function $3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const a=Bx(),o=b.jsx(a.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:o}):o}function G3({router:e,...t}){return b.jsx($3,{router:e,...t,children:b.jsx(z3,{})})}var q3={},nE={};const Rd=Object.create(null),ql=e=>q3||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Rd:globalThis),Pr=new Proxy(Rd,{get(e,t){return ql()[t]??Rd[t]},has(e,t){return t in ql()||t in Rd},set(e,t,n){const a=ql(!0);return a[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=ql(!0);return delete n[t],!0},ownKeys(){const e=ql(!0);return Object.keys(e)}});function en(e,t){return typeof process<"u"&&nE?nE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Yl=1,vn=4,ca=8,pr=24,rE={eterm:vn,cons25:vn,console:vn,cygwin:vn,dtterm:vn,gnome:vn,hurd:vn,jfbterm:vn,konsole:vn,kterm:vn,mlterm:vn,mosh:pr,putty:vn,st:vn,"rxvt-unicode-24bit":pr,terminator:pr,"xterm-kitty":pr},Y3=new Map(Object.entries({APPVEYOR:ca,BUILDKITE:ca,CIRCLECI:pr,DRONE:ca,GITEA_ACTIONS:pr,GITHUB_ACTIONS:pr,GITLAB_CI:ca,TRAVIS:ca})),K3=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function W3(){if(en("FORCE_COLOR")!==void 0)switch(en("FORCE_COLOR")){case"":case"1":case"true":return vn;case"2":return ca;case"3":return pr;default:return Yl}if(en("NODE_DISABLE_COLORS")!==void 0&&en("NODE_DISABLE_COLORS")!==""||en("NO_COLOR")!==void 0&&en("NO_COLOR")!==""||en("TERM")==="dumb")return Yl;if(en("TMUX"))return pr;if("TF_BUILD"in Pr&&"AGENT_NAME"in Pr)return vn;if("CI"in Pr){for(const{0:e,1:t}of Y3)if(e in Pr)return t;return en("CI_NAME")==="codeship"?ca:Yl}if("TEAMCITY_VERSION"in Pr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(en("TEAMCITY_VERSION"))!==null?vn:Yl;switch(en("TERM_PROGRAM")){case"iTerm.app":return!en("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(en("TERM_PROGRAM_VERSION"))!==null?ca:pr;case"HyperTerm":case"MacTerm":return pr;case"Apple_Terminal":return ca}if(en("COLORTERM")==="truecolor"||en("COLORTERM")==="24bit")return pr;if(en("TERM")){if(/truecolor/.exec(en("TERM"))!==null)return pr;if(/^xterm-256/.exec(en("TERM"))!==null)return ca;const e=en("TERM").toLowerCase();if(rE[e])return rE[e];if(K3.some(t=>t.exec(e)!==null))return vn}return en("COLORTERM")?vn:Yl}const ua={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},bg=["debug","info","success","warn","error"];function Z3(e,t){return bg.indexOf(t)>=bg.indexOf(e)}const Q3={info:ua.fg.blue,success:ua.fg.green,warn:ua.fg.yellow,error:ua.fg.red,debug:ua.fg.magenta},X3=(e,t,n)=>{const a=new Date().toISOString();return n?`${ua.dim}${a}${ua.reset} ${Q3[e]}${e.toUpperCase()}${ua.reset} ${ua.bright}[Better Auth]:${ua.reset} ${t}`:`${a} ${e.toUpperCase()} [Better Auth]: ${t}`},J3=e=>{const t="error",n=W3()!==1,a=(o,l,u=[])=>{if(!Z3(t,o))return;const d=X3(o,l,n);{o==="error"?console.error(d,...u):o==="warn"?console.warn(d,...u):console.log(d,...u);return}};return{...Object.fromEntries(bg.map(o=>[o,(...[l,...u])=>a(o,l,u)])),get level(){return t}}};J3();var oc=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function e5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new oc(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function t5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new oc(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof oc?t:new oc(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function gm(e,t="/api/auth"){if(t5(e),e5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function n5(e,t,n,a,o){if(e)return gm(e,t);{const l=Pr.BETTER_AUTH_URL||Pr.NEXT_PUBLIC_BETTER_AUTH_URL||Pr.PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_AUTH_URL||(Pr.BASE_URL!=="/"?Pr.BASE_URL:void 0);if(l)return gm(l,t)}if(typeof window<"u"&&window.location)return gm(window.location.origin,t)}const r5={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},a5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,aE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},i5=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function o5(e){return e instanceof Date&&!isNaN(e.getTime())}function s5(e){const t=i5.exec(e);if(!t)return null;const[,n,a,o,l,u,d,f,h,g,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(a,10)-1,parseInt(o,10),parseInt(l,10),parseInt(u,10),parseInt(d,10),f?parseInt(f.padEnd(3,"0"),10):0));if(h){const _=(parseInt(g,10)*60+parseInt(p,10))*(h==="+"?-1:1);y.setUTCMinutes(y.getUTCMinutes()+_)}return o5(y)?y:null}function l5(e,t={}){const{strict:n=!1,warnings:a=!1,reviver:o,parseDates:l=!0}=t;if(typeof e!="string")return e;const u=e.trim();if(u.length>0&&u[0]==='"'&&u.endsWith('"')&&!u.slice(1,-1).includes('"'))return u.slice(1,-1);const d=u.toLowerCase();if(d.length<=9&&d in aE)return aE[d];if(!a5.test(u)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(r5).some(([f,h])=>{const g=h.test(u);return g&&a&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${f} pattern`),g})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(u,(h,g)=>{if(h==="__proto__"||h==="constructor"&&g&&typeof g=="object"&&"prototype"in g){a&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof g=="string"){const p=s5(g);if(p)return p}return o?o(h,g):g})}catch(f){if(n)throw f;return e}}function c5(e,t={strict:!0}){return l5(e,t)}let $r=[],xi=0;const td=4,mo=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(a){return n.lc=t.push(a),()=>{for(let l=xi+td;l<$r.length;)$r[l]===a?$r.splice(l,td):l+=td;let o=t.indexOf(a);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(a,o){let l=!$r.length;for(let u of t)$r.push(u,n.value,a,o);if(l){for(xi=0;xi<$r.length;xi+=td)$r[xi]($r[xi+1],$r[xi+2],$r[xi+3]);$r.length=0}},off(){},set(a){let o=n.value;o!==a&&(n.value=a,n.notify(o))},subscribe(a){let o=n.listen(a);return a(n.value),o},value:e};return n},u5=5,nd=6,rd=10;let d5=(e,t,n,a)=>(e.events=e.events||{},e.events[n+rd]||(e.events[n+rd]=a(o=>{e.events[n].reduceRight((l,u)=>(u(l),l),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],l=o.indexOf(t);o.splice(l,1),o.length||(delete e.events[n],e.events[n+rd](),delete e.events[n+rd])}),f5=1e3,$x=(e,t)=>d5(e,a=>{let o=t(a);o&&e.events[nd].push(o)},u5,a=>{let o=e.listen;e.listen=(...u)=>(!e.lc&&!e.active&&(e.active=!0,a()),o(...u));let l=e.off;return e.events[nd]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let u of e.events[nd])u();e.events[nd]=[]}},f5)},()=>{e.listen=o,e.off=l}});function h5(e,t,n){let a=new Set(t).add(void 0);return e.listen((o,l,u)=>{a.has(u)&&n(o,l,u)})}var p5=Object.defineProperty,m5=Object.defineProperties,g5=Object.getOwnPropertyDescriptors,iE=Object.getOwnPropertySymbols,v5=Object.prototype.hasOwnProperty,y5=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?p5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yr=(e,t)=>{for(var n in t||(t={}))v5.call(t,n)&&oE(e,n,t[n]);if(iE)for(var n of iE(t))y5.call(t,n)&&oE(e,n,t[n]);return e},la=(e,t)=>m5(e,g5(t)),b5=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},_5=async(e,t)=>{var n,a,o,l,u,d;let f=t||{};const h={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:f,hooks:h};for(const g of t?.plugins||[]){if(g.init){const p=await((n=g.init)==null?void 0:n.call(g,e.toString(),t));f=p.options||f,e=p.url}h.onRequest.push((a=g.hooks)==null?void 0:a.onRequest),h.onResponse.push((o=g.hooks)==null?void 0:o.onResponse),h.onSuccess.push((l=g.hooks)==null?void 0:l.onSuccess),h.onError.push((u=g.hooks)==null?void 0:u.onError),h.onRetry.push((d=g.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},sE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},E5=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function S5(e){if(typeof e=="number")return new sE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new sE(e);case"exponential":return new E5(e);default:throw new Error("Invalid retry strategy")}}var x5=async e=>{const t={},n=async a=>typeof a=="function"?await a():a;if(e?.auth){if(e.auth.type==="Bearer"){const a=await n(e.auth.token);if(!a)return t;t.authorization=`Bearer ${a}`}else if(e.auth.type==="Basic"){const a=n(e.auth.username),o=n(e.auth.password);if(!a||!o)return t;t.authorization=`Basic ${btoa(`${a}:${o}`)}`}else if(e.auth.type==="Custom"){const a=n(e.auth.value);if(!a)return t;t.authorization=`${n(e.auth.prefix)} ${a}`}}return t},w5=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function R5(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const a=t.split(";").shift()||"";return w5.test(a)?"json":n.has(a)||a.startsWith("text/")?"text":"blob"}function O5(e){try{return JSON.parse(e),!0}catch{return!1}}function Gx(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function lE(e){try{return JSON.parse(e)}catch{return e}}function cE(e){return typeof e=="function"}function T5(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&cE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&cE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function A5(e){const t=new Headers(e?.headers),n=await x5(e);for(const[a,o]of Object.entries(n||{}))t.set(a,o);if(!t.has("content-type")){const a=C5(e?.body);a&&t.set("content-type",a)}return t}function C5(e){return Gx(e)?"application/json":null}function I5(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(Gx(e.body)&&!t.has("content-type")){for(const[n,a]of Object.entries(e?.body))a instanceof Date&&(e.body[n]=a.toISOString());return JSON.stringify(e.body)}return e.body}function M5(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const a=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return Yx.includes(a)?a.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function N5(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var D5=class qx extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,qx.prototype)}};async function Od(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new D5(n.issues);return n.value}var Yx=["get","post","put","patch","delete"],L5=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var a,o,l,u;const d=((o=(a=e.plugins)==null?void 0:a.find(f=>{var h;return(h=f.schema)!=null&&h.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))==null?void 0:o.schema)||e.schema;if(d){let f=t;(l=d.config)!=null&&l.prefix&&f.startsWith(d.config.prefix)&&(f=f.replace(d.config.prefix,""),d.config.baseURL&&(t=t.replace(d.config.prefix,d.config.baseURL))),(u=d.config)!=null&&u.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let g=la(Yr({},n),{method:h.method,output:h.output});return n?.disableValidation||(g=la(Yr({},g),{body:h.input?await Od(h.input,n?.body):n?.body,params:h.params?await Od(h.params,n?.params):n?.params,query:h.query?await Od(h.query,n?.query):n?.query})),{url:t,options:g}}}return{url:t,options:n}}}),P5=e=>{async function t(n,a){const o=la(Yr(Yr({},e),a),{plugins:[...e?.plugins||[],L5(e||{})]});if(e?.catchAllError)try{return await _g(n,o)}catch(l){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:l}}}return await _g(n,o)}return t};function k5(e,t){let{baseURL:n,params:a,query:o}=t||{query:{},params:{},baseURL:""},l=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];Yx.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[u,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(o||{}))y!=null&&f.set(p,String(y));if(a)if(Array.isArray(a)){const p=u.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=a[y];u=u.replace(_,S)}}else for(const[p,y]of Object.entries(a))u=u.replace(`:${p}`,String(y));u=u.split("/").map(encodeURIComponent).join("/"),u.startsWith("/")&&(u=u.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${u}${h}`,l):`${l}${u}${h}`}var _g=async(e,t)=>{var n,a,o,l,u,d,f,h;const{hooks:g,url:p,options:y}=await _5(e,t),_=T5(y),S=new AbortController,x=(n=y.signal)!=null?n:S.signal,T=k5(p,y),R=I5(y),A=await A5(y),C=M5(p,y);let O=la(Yr({},y),{url:T,headers:A,body:R,method:C,signal:x});for(const j of g.onRequest)if(j){const ne=await j(O);ne instanceof Object&&(O=ne)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((a=t?.body)==null?void 0:a.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:M}=N5(y,S);let L=await _(O.url,O);M();const N={response:L,request:O};for(const j of g.onResponse)if(j){const ne=await j(la(Yr({},N),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?L.clone():L}));ne instanceof Response?L=ne:ne instanceof Object&&(L=ne.response)}if(L.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const ne=R5(L),ie={data:"",response:L,request:O};if(ne==="json"||ne==="text"){const P=await L.text(),$=await((l=O.jsonParser)!=null?l:lE)(P);ie.data=$}else ie.data=await L[ne]();O?.output&&O.output&&!O.disableValidation&&(ie.data=await Od(O.output,ie.data));for(const P of g.onSuccess)P&&await P(la(Yr({},ie),{response:(u=t?.hookOptions)!=null&&u.cloneResponse?L.clone():L}));return t?.throw?ie.data:{data:ie.data,error:null}}const D=(d=t?.jsonParser)!=null?d:lE,U=await L.text(),Z=O5(U),G=Z?await D(U):null,W={response:L,responseText:U,request:O,error:la(Yr({},G),{status:L.status,statusText:L.statusText})};for(const j of g.onError)j&&await j(la(Yr({},W),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const j=S5(t.retry),ne=(h=t.retryAttempt)!=null?h:0;if(await j.shouldAttemptRetry(ne,L)){for(const P of g.onRetry)P&&await P(N);const ie=j.getDelay(ne);return await new Promise(P=>setTimeout(P,ie)),await _g(e,la(Yr({},t),{retryAttempt:ne+1}))}}if(t?.throw)throw new b5(L.status,L.statusText,Z?G:U);return{data:null,error:la(Yr({},G),{status:L.status,statusText:L.statusText})}};const vm=Symbol.for("better-auth:broadcast-channel"),j5=()=>Math.floor(Date.now()/1e3);var U5=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:j5()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(a=>a(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function ym(e="better-auth.message"){return globalThis[vm]||(globalThis[vm]=new U5(e)),globalThis[vm]}const bm=Symbol.for("better-auth:focus-manager");var B5=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function uE(){return globalThis[bm]||(globalThis[bm]=new B5),globalThis[bm]}const _m=Symbol.for("better-auth:online-manager");var z5=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function Em(){return globalThis[_m]||(globalThis[_m]=new z5),globalThis[_m]}const F5=()=>typeof window>"u",Ns=(e,t,n,a)=>{const o=mo({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof a=="function"?a({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):a;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(g){o.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onSuccess?.(g)},async onError(g){const{request:p}=g,y=typeof p.retry=="number"?p.retry:p.retry?.attempts,_=p.retryAttempt||0;y&&_<y||(o.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onError?.(g))},async onRequest(g){const p=o.get();o.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await h?.onRequest?.(g)}}).catch(g=>{o.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let u=!1;for(const d of e)d.subscribe(async()=>{F5()||(u?await l():$x(o,()=>{const f=setTimeout(async()=>{u||(await l(),u=!0)},0);return()=>{o.off(),d.off(),clearTimeout(f)}}))});return o},bs=()=>Math.floor(Date.now()/1e3),V5=5;function H5(e){const{sessionAtom:t,sessionSignal:n,$fetch:a,options:o={}}=e,l=o.sessionOptions?.refetchInterval??0,u=o.sessionOptions?.refetchOnWindowFocus??!0,d=o.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Em().isOnline,g=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=bs(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=bs(),a("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=bs(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&bs()-f.lastSessionRequest<V5&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=bs()),f.lastSync=bs(),n.set(!n.get()))},p=A=>{ym().post({event:"session",data:{trigger:A},clientId:Math.random().toString(36).substring(7)})},y=()=>{l&&l>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&g({event:"poll"})},l*1e3))},_=()=>{f.unsubscribeBroadcast=ym().subscribe(()=>{g({event:"storage"})})},S=()=>{u&&(f.unsubscribeFocus=uE().subscribe(()=>{g({event:"visibilitychange"})}))},x=()=>{f.unsubscribeOnline=Em().subscribe(A=>{A&&g({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),x(),ym().setup(),uE().setup(),Em().setup()},cleanup:()=>{f.pollInterval&&(clearInterval(f.pollInterval),f.pollInterval=void 0),f.unsubscribeBroadcast&&(f.unsubscribeBroadcast(),f.unsubscribeBroadcast=void 0),f.unsubscribeFocus&&(f.unsubscribeFocus(),f.unsubscribeFocus=void 0),f.unsubscribeOnline&&(f.unsubscribeOnline(),f.unsubscribeOnline=void 0),f.lastSync=0,f.lastSessionRequest=0,f.cachedSession=void 0},triggerRefetch:g,broadcastSessionUpdate:p}}const $5={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function G5(e,t){const n=mo(!1),a=Ns(n,"/get-session",e,{method:"GET"});return $x(a,()=>{const o=H5({sessionAtom:a,sessionSignal:n,$fetch:e,options:t});return o.init(),()=>{o.cleanup()}}),{session:a,$sessionSignal:n}}const q5=(e,t)=>{const n="credentials"in Request.prototype,a=n5(e?.baseURL,e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],l={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:u,onError:d,onRequest:f,onResponse:h,...g}=e?.fetchOptions||{},p=P5({baseURL:a,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?c5(O,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[l,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[$5],...o]}),{$sessionSignal:y,session:_}=G5(p,e),S=e?.plugins||[];let x={},T={$sessionSignal:y,session:_},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const A=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of S)O.getAtoms&&Object.assign(T,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&A.push(...O.atomListeners);const C={notify:O=>{T[O].set(!T[O].get())},listen:(O,M)=>{T[O].subscribe(M)},atoms:T};for(const O of S)O.getActions&&Object.assign(x,O.getActions?.(p,C,e));return{get baseURL(){return a},pluginsActions:x,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function Y5(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function K5(e,t,n){const a=t[e],{fetchOptions:o,query:l,...u}=n||{};return a||(o?.method?o.method:u&&Object.keys(u).length>0?"POST":"GET")}function W5(e,t,n,a,o){function l(u=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...u,f];let g=e;for(const p of h)if(g&&typeof g=="object"&&p in g)g=g[p];else{g=void 0;break}return typeof g=="function"||Y5(g)?g:l(h)},apply:async(d,f,h)=>{const g="/"+u.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...x}=p,T={...y,...S},R=K5(g,n,p);return await t(g,{...T,body:R==="GET"?void 0:{...x,...T?.body||{}},query:_||T?.query,method:R,async onSuccess(A){if(await T?.onSuccess?.(A),!o||T.disableSignal)return;const C=o.filter(O=>O.matcher(g));if(C.length)for(const O of C){const M=a[O.signal];if(!M)return;const L=M.get();setTimeout(()=>{M.set(!L)},10)}}})}})}return l()}function Z5(e,t={}){let n=E.useRef(e.get());const{keys:a,deps:o=[e,a]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),a?.length?h5(e,a,f):e.listen(f)},o),u=()=>n.current;return E.useSyncExternalStore(l,u,u)}function Q5(e){return`use${X5(e)}`}function X5(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Kx(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:a,$fetch:o,$store:l,atomListeners:u}=q5(e);let d={};for(const[f,h]of Object.entries(a))d[Q5(f)]=()=>Z5(h);return W5({...n,...d,$fetch:o,$store:l},o,t,a,u)}function J5(e){return{authorize(t,n="AND"){let a=!1;for(const[o,l]of Object.entries(t)){const u=e[o];if(!u)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(l))a=l.every(d=>u.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?a=d.actions.some(f=>u.includes(f)):a=d.actions.every(f=>u.includes(f))}else throw new oc("Invalid access control request");if(a&&n==="OR")return{success:a};if(!a&&n==="AND")return{success:!1,error:`unauthorized to access resource "${o}"`}}return a?{success:a}:{success:!1,error:"Not authorized"}},statements:e}}function Wx(e){return{newRole(t){return J5(t)},statements:e}}const eI={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},Zx=Wx(eI),Qx=Zx.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),Xx=Zx.newRole({user:[],session:[]}),tI={admin:Qx,user:Xx},nI=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||tI;for(const a of t)if(n[a]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},rI={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},xv=Wx(rI),Jx=xv.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ew=xv.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),tw=xv.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),aI={admin:Jx,owner:ew,member:tw},iI=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),a=e.options.creatorRole||"owner",o=n.includes(a),l=e.allowCreatorAllPermissions||!1;if(o&&l)return!0;for(const u of n)if(t[u]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},oI=e=>({id:"two-factor",$InferServerPlugin:{},atomListeners:[{matcher:t=>t.startsWith("/two-factor/"),signal:"$sessionSignal"}],pathMethods:{"/two-factor/disable":"POST","/two-factor/enable":"POST","/two-factor/send-otp":"POST","/two-factor/generate-backup-codes":"POST"},fetchPlugins:[{id:"two-factor",name:"two-factor",hooks:{async onSuccess(t){t.data?.twoFactorRedirect}}}]}),sI=e=>{const t={admin:Qx,user:Xx,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>nI({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},lI=()=>({id:"anonymous",$InferServerPlugin:{},pathMethods:{"/sign-in/anonymous":"POST"},atomListeners:[{matcher:e=>e==="/sign-in/anonymous",signal:"$sessionSignal"}]}),cI=()=>({id:"api-key",$InferServerPlugin:{},pathMethods:{"/api-key/create":"POST","/api-key/delete":"POST","/api-key/delete-all-expired-api-keys":"POST"}}),uI=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),dI=()=>({id:"generic-oauth-client",$InferServerPlugin:{}}),nw=()=>({id:"magic-link",$InferServerPlugin:{}}),fI=()=>({id:"multi-session",$InferServerPlugin:{},atomListeners:[{matcher(e){return e==="/multi-session/set-active"},signal:"$sessionSignal"}]});let lo=null;function dE(){return typeof window<"u"&&"IdentityCredential"in window}const hI=e=>({id:"one-tap",fetchPlugins:[{id:"fedcm-signout-handle",name:"FedCM Sign-Out Handler",hooks:{async onResponse(t){t.request.url.toString().includes("/sign-out")&&(e.promptOptions?.fedCM===!1||!dE()||navigator.credentials.preventSilentAccess())}}}],getActions:(t,n)=>({oneTap:async(a,o)=>{if(lo&&!lo.signal.aborted){console.warn("A Google One Tap request is already in progress. Please wait.");return}if(typeof window>"u"||!window.document){console.warn("Google One Tap is only available in browser environments");return}async function l(p){await t("/one-tap/callback",{method:"POST",body:{idToken:p},...a?.fetchOptions,...o}),(!a?.fetchOptions&&!o||a?.callbackURL)&&(window.location.href=a?.callbackURL??"/")}const{autoSelect:u,cancelOnTapOutside:d,context:f}=a??{},h=f??e.context??"signin",g={fedCM:async()=>{try{const p=await navigator.credentials.get({identity:{context:h,providers:[{configURL:"https://accounts.google.com/gsi/fedcm.json",clientId:e.clientId,nonce:a?.nonce}]},mediation:u?"optional":"required",signal:lo?.signal});if(!p?.token){a?.onPromptNotification?.(void 0);return}try{await l(p.token);return}catch(y){throw console.error("Error during FedCM callback:",y),y}}catch(p){if(p?.code&&(p.code===19||p.code===20)){a?.onPromptNotification?.(void 0);return}throw p}},oneTap:()=>new Promise((p,y)=>{let _=!1;const S=e.promptOptions?.baseDelay??1e3,x=e.promptOptions?.maxAttempts??5;window.google?.accounts.id.initialize({client_id:e.clientId,callback:async R=>{_=!0;try{await l(R.credential),p()}catch(A){console.error("Error during One Tap callback:",A),y(A)}},auto_select:u,cancel_on_tap_outside:d,context:h,ux_mode:a?.uxMode||"popup",nonce:a?.nonce,itp_support:!0,...e.additionalOptions});const T=R=>{_||window.google?.accounts.id.prompt(A=>{if(!_){if(A.isDismissedMoment&&A.isDismissedMoment())if(R<x){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A);else if(A.isSkippedMoment&&A.isSkippedMoment())if(R<x){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A)}})};T(0)})};lo&&lo?.abort(),lo=new AbortController;try{const p=e.promptOptions?.fedCM===!1||!dE()?"oneTap":"fedCM";p==="oneTap"&&await pI(),await g[p]()}catch(p){throw console.error("Error during Google One Tap flow:",p),p}finally{lo=null}}}),getAtoms(t){return{}}}),pI=()=>new Promise(e=>{if(window.googleScriptInitialized){e();return}const t=document.createElement("script");t.src="https://accounts.google.com/gsi/client",t.async=!0,t.defer=!0,t.onload=()=>{window.googleScriptInitialized=!0,e()},document.head.appendChild(t)}),mI=e=>iI(e,e.options.roles||aI),rw=e=>{const t=mo(!1),n=mo(!1),a=mo(!1),o=mo(!1),l={admin:Jx,member:tw,owner:ew,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(u,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>mI({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:u=>{const d=Ns(t,"/organization/list",u,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:a,$activeMemberRoleSignal:o,activeOrganization:Ns([n],"/organization/get-full-organization",u,()=>({method:"GET"})),listOrganizations:d,activeMember:Ns([a],"/organization/get-active-member",u,{method:"GET"}),activeMemberRole:Ns([o],"/organization/get-active-member-role",u,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(u){return u==="/organization/create"||u==="/organization/delete"||u==="/organization/update"},signal:"$listOrg"},{matcher(u){return u.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(u){return u.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},gI=()=>({id:"username",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/sign-in/username",signal:"$sessionSignal"}]}),vI=e=>({id:"sso-client",$InferServerPlugin:{}}),yI=Kx({plugins:[rw({}),sI(),vI(),nw()]});function aw(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=aw(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function iw(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=aw(e))&&(a&&(a+=" "),a+=t);return a}const bI=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},_I=(e,t)=>({classGroupId:e,validator:t}),ow=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Vd="-",fE=[],EI="arbitrary..",SI=e=>{const t=wI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return xI(u);const d=u.split(Vd),f=d[0]===""&&d.length>1?1:0;return sw(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=a[u],h=n[u];return f?h?bI(h,f):f:h||fE}return n[u]||fE}}},sw=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const h=sw(e,t+1,l);if(h)return h}const u=n.validators;if(u===null)return;const d=t===0?e.join(Vd):e.slice(t).join(Vd),f=u.length;for(let h=0;h<f;h++){const g=u[h];if(g.validator(d))return g.classGroupId}},xI=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?EI+a:void 0})(),wI=e=>{const{theme:t,classGroups:n}=e;return RI(n,t)},RI=(e,t)=>{const n=ow();for(const a in e){const o=e[a];wv(o,n,a,t)}return n},wv=(e,t,n,a)=>{const o=e.length;for(let l=0;l<o;l++){const u=e[l];OI(u,t,n,a)}},OI=(e,t,n,a)=>{if(typeof e=="string"){TI(e,t,n);return}if(typeof e=="function"){AI(e,t,n,a);return}CI(e,t,n,a)},TI=(e,t,n)=>{const a=e===""?t:lw(t,e);a.classGroupId=n},AI=(e,t,n,a)=>{if(II(e)){wv(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(_I(n,e))},CI=(e,t,n,a)=>{const o=Object.entries(e),l=o.length;for(let u=0;u<l;u++){const[d,f]=o[u];wv(f,lw(t,d),n,a)}},lw=(e,t)=>{let n=e;const a=t.split(Vd),o=a.length;for(let l=0;l<o;l++){const u=a[l];let d=n.nextPart.get(u);d||(d=ow(),n.nextPart.set(u,d)),n=d}return n},II=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,MI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(l,u)=>{n[l]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Eg="!",hE=":",NI=[],pE=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),DI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const l=[];let u=0,d=0,f=0,h;const g=o.length;for(let x=0;x<g;x++){const T=o[x];if(u===0&&d===0){if(T===hE){l.push(o.slice(f,x)),f=x+1;continue}if(T==="/"){h=x;continue}}T==="["?u++:T==="]"?u--:T==="("?d++:T===")"&&d--}const p=l.length===0?o:o.slice(f);let y=p,_=!1;p.endsWith(Eg)?(y=p.slice(0,-1),_=!0):p.startsWith(Eg)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return pE(l,_,y,S)};if(t){const o=t+hE,l=a;a=u=>u.startsWith(o)?l(u.slice(o.length)):pE(NI,!1,u,void 0,!0)}if(n){const o=a;a=l=>n({className:l,parseClassName:o})}return a},LI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",f=t.has(u);d||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},PI=e=>({cache:MI(e.cacheSize),parseClassName:DI(e),sortModifiers:LI(e),...SI(e)}),kI=/\s+/,jI=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:l}=t,u=[],d=e.trim().split(kI);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:x}=n(g);if(p){f=g+(f.length>0?" "+f:f);continue}let T=!!x,R=a(T?S.substring(0,x):S);if(!R){if(!T){f=g+(f.length>0?" "+f:f);continue}if(R=a(S),!R){f=g+(f.length>0?" "+f:f);continue}T=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),C=_?A+Eg:A,O=C+R;if(u.indexOf(O)>-1)continue;u.push(O);const M=o(R,T);for(let L=0;L<M.length;++L){const N=M[L];u.push(C+N)}f=g+(f.length>0?" "+f:f)}return f},UI=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=cw(n))&&(o&&(o+=" "),o+=a);return o},cw=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=cw(e[a]))&&(n&&(n+=" "),n+=t);return n},BI=(e,...t)=>{let n,a,o,l;const u=f=>{const h=t.reduce((g,p)=>p(g),e());return n=PI(h),a=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const h=a(f);if(h)return h;const g=jI(f,n);return o(f,g),g};return l=u,(...f)=>l(UI(...f))},zI=[],cn=e=>{const t=n=>n[e]||zI;return t.isThemeGetter=!0,t},uw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,FI=/^\d+\/\d+$/,VI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HI=/\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$/,$I=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=e=>FI.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),wi=e=>!!e&&Number.isInteger(Number(e)),Sm=e=>e.endsWith("%")&&et(e.slice(0,-1)),$a=e=>VI.test(e),YI=()=>!0,KI=e=>HI.test(e)&&!$I.test(e),fw=()=>!1,WI=e=>GI.test(e),ZI=e=>qI.test(e),QI=e=>!Ae(e)&&!Ce(e),XI=e=>qs(e,mw,fw),Ae=e=>uw.test(e),co=e=>qs(e,gw,KI),xm=e=>qs(e,rM,et),mE=e=>qs(e,hw,fw),JI=e=>qs(e,pw,ZI),ad=e=>qs(e,vw,WI),Ce=e=>dw.test(e),Kl=e=>Ys(e,gw),eM=e=>Ys(e,aM),gE=e=>Ys(e,hw),tM=e=>Ys(e,mw),nM=e=>Ys(e,pw),id=e=>Ys(e,vw,!0),qs=(e,t,n)=>{const a=uw.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ys=(e,t,n=!1)=>{const a=dw.exec(e);return a?a[1]?t(a[1]):n:!1},hw=e=>e==="position"||e==="percentage",pw=e=>e==="image"||e==="url",mw=e=>e==="length"||e==="size"||e==="bg-size",gw=e=>e==="length",rM=e=>e==="number",aM=e=>e==="family-name",vw=e=>e==="shadow",iM=()=>{const e=cn("color"),t=cn("font"),n=cn("text"),a=cn("font-weight"),o=cn("tracking"),l=cn("leading"),u=cn("breakpoint"),d=cn("container"),f=cn("spacing"),h=cn("radius"),g=cn("shadow"),p=cn("inset-shadow"),y=cn("text-shadow"),_=cn("drop-shadow"),S=cn("blur"),x=cn("perspective"),T=cn("aspect"),R=cn("ease"),A=cn("animate"),C=()=>["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"],M=()=>[...O(),Ce,Ae],L=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[Ce,Ae,f],U=()=>[_s,"full","auto",...D()],Z=()=>[wi,"none","subgrid",Ce,Ae],G=()=>["auto",{span:["full",wi,Ce,Ae]},wi,Ce,Ae],W=()=>[wi,"auto",Ce,Ae],j=()=>["auto","min","max","fr",Ce,Ae],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...D()],F=()=>[_s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],$=()=>[e,Ce,Ae],re=()=>[...O(),gE,mE,{position:[Ce,Ae]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",tM,XI,{size:[Ce,Ae]}],Q=()=>[Sm,Kl,co],ee=()=>["","none","full",h,Ce,Ae],oe=()=>["",et,Kl,co],pe=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[et,Sm,gE,mE],Se=()=>["","none",S,Ce,Ae],Pe=()=>["none",et,Ce,Ae],ke=()=>["none",et,Ce,Ae],Ee=()=>[et,Ce,Ae],ze=()=>[_s,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$a],breakpoint:[$a],color:[YI],container:[$a],"drop-shadow":[$a],ease:["in","out","in-out"],font:[QI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$a],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$a],shadow:[$a],spacing:["px",et],text:[$a],"text-shadow":[$a],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_s,Ae,Ce,T]}],container:["container"],columns:[{columns:[et,Ae,Ce,d]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:M()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{start:U()}],end:[{end:U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[wi,"auto",Ce,Ae]}],basis:[{basis:[_s,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,_s,"auto","initial","none",Ae]}],grow:[{grow:["",et,Ce,Ae]}],shrink:[{shrink:["",et,Ce,Ae]}],order:[{order:[wi,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[d,"screen",...F()]}],"min-w":[{"min-w":[d,"screen","none",...F()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Kl,co]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Ce,xm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Sm,Ae]}],"font-family":[{font:[eM,Ae,t]}],"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:[o,Ce,Ae]}],"line-clamp":[{"line-clamp":[et,"none",Ce,xm]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",Ce,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[et,"from-font","auto",Ce,co]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[et,"auto",Ce,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,Ae]}],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",Ce,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wi,Ce,Ae],radial:["",Ce,Ae],conic:[wi,Ce,Ae]},nM,JI]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[et,Ce,Ae]}],"outline-w":[{outline:["",et,Kl,co]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",g,id,ad]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",p,id,ad]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[et,co]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",y,id,ad]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[et,Ce,Ae]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"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":[et]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":[et]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ae]}],filter:[{filter:["","none",Ce,Ae]}],blur:[{blur:Se()}],brightness:[{brightness:[et,Ce,Ae]}],contrast:[{contrast:[et,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",_,id,ad]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",et,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[et,Ce,Ae]}],invert:[{invert:["",et,Ce,Ae]}],saturate:[{saturate:[et,Ce,Ae]}],sepia:[{sepia:["",et,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[et,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[et,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",et,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[et,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[et,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",et,Ce,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",R,Ce,Ae]}],delay:[{delay:[et,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ce,Ae]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[Ce,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",Ce,Ae]}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Ce,Ae]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[et,Kl,co,xm]}],stroke:[{stroke:["none",...$()]}],"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"]}},oM=BI(iM);var gt;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},e.getValidEnumValues=o=>{const l=e.objectKeys(o).filter(d=>typeof o[o[d]]!="number"),u={};for(const d of l)u[d]=o[d];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(l){return o[l]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},e.find=(o,l)=>{for(const u of o)if(l(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}e.joinValues=a,e.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(gt||(gt={}));var vE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(vE||(vE={}));const Ie=gt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ai=e=>{switch(typeof e){case"undefined":return Ie.undefined;case"string":return Ie.string;case"number":return Number.isNaN(e)?Ie.nan:Ie.number;case"boolean":return Ie.boolean;case"function":return Ie.function;case"bigint":return Ie.bigint;case"symbol":return Ie.symbol;case"object":return Array.isArray(e)?Ie.array:e===null?Ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ie.promise:typeof Map<"u"&&e instanceof Map?Ie.map:typeof Set<"u"&&e instanceof Set?Ie.set:typeof Date<"u"&&e instanceof Date?Ie.date:Ie.object;default:return Ie.unknown}},_e=gt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ya extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(this),a}static assert(t){if(!(t instanceof Ya))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,gt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Ya.create=e=>new Ya(e);const Sg=(e,t)=>{let n;switch(e.code){case _e.invalid_type:e.received===Ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case _e.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gt.jsonStringifyReplacer)}`;break;case _e.unrecognized_keys:n=`Unrecognized key(s) in object: ${gt.joinValues(e.keys,", ")}`;break;case _e.invalid_union:n="Invalid input";break;case _e.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gt.joinValues(e.options)}`;break;case _e.invalid_enum_value:n=`Invalid enum value. Expected ${gt.joinValues(e.options)}, received '${e.received}'`;break;case _e.invalid_arguments:n="Invalid function arguments";break;case _e.invalid_return_type:n="Invalid function return type";break;case _e.invalid_date:n="Invalid date";break;case _e.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case _e.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case _e.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case _e.custom:n="Invalid input";break;case _e.invalid_intersection_types:n="Intersection results could not be merged";break;case _e.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case _e.not_finite:n="Number must be finite";break;default:n=t.defaultError,gt.assertNever(e)}return{message:n}};let sM=Sg;function lM(){return sM}const cM=e=>{const{data:t,path:n,errorMaps:a,issueData:o}=e,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let d="";const f=a.filter(h=>!!h).slice().reverse();for(const h of f)d=h(u,{data:t,defaultError:d}).message;return{...o,path:l,message:d}};function Oe(e,t){const n=lM(),a=cM({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sg?void 0:Sg].filter(o=>!!o)});e.common.issues.push(a)}class zn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const o of n){if(o.status==="aborted")return $e;o.status==="dirty"&&t.dirty(),a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const o of n){const l=await o.key,u=await o.value;a.push({key:l,value:u})}return zn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return $e;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(a[l.value]=u.value)}return{status:t.value,value:a}}}const $e=Object.freeze({status:"aborted"}),nc=e=>({status:"dirty",value:e}),Ur=e=>({status:"valid",value:e}),yE=e=>e.status==="aborted",bE=e=>e.status==="dirty",zs=e=>e.status==="valid",Hd=e=>typeof Promise<"u"&&e instanceof Promise;var Le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Le||(Le={}));class ya{constructor(t,n,a,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const _E=(e,t)=>{if(zs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ya(e.common.issues);return this._error=n,this._error}}};function Je(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:o}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,d)=>{const{message:f}=e;return u.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:f??a??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:f??n??d.defaultError}},description:o}}class ut{get description(){return this._def.description}_getType(t){return Ai(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new zn,ctx:{common:t.parent.common,data:t.data,parsedType:Ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Hd(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ai(t)},o=this._parseSync({data:t,path:a.path,parent:a});return _E(a,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ai(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return zs(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>zs(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ai(t)},o=this._parse({data:t,path:a.path,parent:a}),l=await(Hd(o)?o:Promise.resolve(o));return _E(a,l)}refine(t,n){const a=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=t(o),d=()=>l.addIssue({code:_e.custom,...a(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(f=>f?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(t,n){return this._refinement((a,o)=>t(a)?!0:(o.addIssue(typeof n=="function"?n(a,o):n),!1))}_refinement(t){return new Oo({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ki.create(this,this._def)}nullable(){return Hs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ma.create(this)}promise(){return Kd.create(this,this._def)}or(t){return Gd.create([this,t],this._def)}and(t){return qd.create(this,t,this._def)}transform(t){return new Oo({...Je(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Cg({...Je(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new NM({typeName:Ve.ZodBranded,type:this,...Je(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ig({...Je(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Rv.create(this,t)}readonly(){return Mg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uM=/^c[^\s-]{8,}$/i,dM=/^[0-9a-z]+$/,fM=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hM=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pM=/^[a-z0-9_-]{21}$/i,mM=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let wm;const bM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_M=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,EM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,SM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xM=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wM=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yw="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",RM=new RegExp(`^${yw}$`);function bw(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function OM(e){return new RegExp(`^${bw(e)}$`)}function TM(e){let t=`${yw}T${bw(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function AM(e,t){return!!((t==="v4"||!t)&&bM.test(e)||(t==="v6"||!t)&&EM.test(e))}function CM(e,t){if(!mM.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function IM(e,t){return!!((t==="v4"||!t)&&_M.test(e)||(t==="v6"||!t)&&SM.test(e))}class ha extends ut{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ie.string){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_type,expected:Ie.string,received:l.parsedType}),$e}const a=new zn;let o;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="max")t.data.length>l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,d=t.data.length<l.value;(u||d)&&(o=this._getOrReturnCtx(t,o),u?Oe(o,{code:_e.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&Oe(o,{code:_e.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),a.dirty())}else if(l.kind==="email")vM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"email",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="emoji")wm||(wm=new RegExp(yM,"u")),wm.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"emoji",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="uuid")hM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"uuid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="nanoid")pM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"nanoid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid")uM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"cuid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid2")dM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"cuid2",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="ulid")fM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"ulid",code:_e.invalid_string,message:l.message}),a.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),Oe(o,{validation:"url",code:_e.invalid_string,message:l.message}),a.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"regex",code:_e.invalid_string,message:l.message}),a.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()):l.kind==="datetime"?TM(l).test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:"datetime",message:l.message}),a.dirty()):l.kind==="date"?RM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:"date",message:l.message}),a.dirty()):l.kind==="time"?OM(l).test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.invalid_string,validation:"time",message:l.message}),a.dirty()):l.kind==="duration"?gM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"duration",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="ip"?AM(t.data,l.version)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"ip",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="jwt"?CM(t.data,l.alg)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"jwt",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="cidr"?IM(t.data,l.version)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"cidr",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="base64"?xM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"base64",code:_e.invalid_string,message:l.message}),a.dirty()):l.kind==="base64url"?wM.test(t.data)||(o=this._getOrReturnCtx(t,o),Oe(o,{validation:"base64url",code:_e.invalid_string,message:l.message}),a.dirty()):gt.assertNever(l);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(o=>t.test(o),{validation:n,code:_e.invalid_string,...Le.errToObj(a)})}_addCheck(t){return new ha({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Le.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Le.errToObj(n)})}nonempty(t){return this.min(1,Le.errToObj(t))}trim(){return new ha({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ha.create=e=>new ha({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Je(e)});function MM(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}class xo extends ut{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ie.number){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_type,expected:Ie.number,received:l.parsedType}),$e}let a;const o=new zn;for(const l of this._def.checks)l.kind==="int"?gt.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?MM(t.data,l.value)!==0&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.not_finite,message:l.message}),o.dirty()):gt.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,a,o){return new xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Le.toString(o)}]})}_addCheck(t){return new xo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&gt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}xo.create=e=>new xo({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Je(e)});class wo extends ut{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ie.bigint)return this._getInvalidInput(t);let a;const o=new zn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),Oe(a,{code:_e.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):gt.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Oe(n,{code:_e.invalid_type,expected:Ie.bigint,received:n.parsedType}),$e}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,a,o){return new wo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Le.toString(o)}]})}_addCheck(t){return new wo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}wo.create=e=>new wo({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Je(e)});class $d extends ut{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ie.boolean){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Ie.boolean,received:a.parsedType}),$e}return Ur(t.data)}}$d.create=e=>new $d({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Je(e)});class Fs extends ut{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ie.date){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_type,expected:Ie.date,received:l.parsedType}),$e}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return Oe(l,{code:_e.invalid_date}),$e}const a=new zn;let o;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(o=this._getOrReturnCtx(t,o),Oe(o,{code:_e.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()):gt.assertNever(l);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Fs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Fs.create=e=>new Fs({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Je(e)});class EE extends ut{_parse(t){if(this._getType(t)!==Ie.symbol){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Ie.symbol,received:a.parsedType}),$e}return Ur(t.data)}}EE.create=e=>new EE({typeName:Ve.ZodSymbol,...Je(e)});class xg extends ut{_parse(t){if(this._getType(t)!==Ie.undefined){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Ie.undefined,received:a.parsedType}),$e}return Ur(t.data)}}xg.create=e=>new xg({typeName:Ve.ZodUndefined,...Je(e)});class wg extends ut{_parse(t){if(this._getType(t)!==Ie.null){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Ie.null,received:a.parsedType}),$e}return Ur(t.data)}}wg.create=e=>new wg({typeName:Ve.ZodNull,...Je(e)});class pc extends ut{constructor(){super(...arguments),this._any=!0}_parse(t){return Ur(t.data)}}pc.create=e=>new pc({typeName:Ve.ZodAny,...Je(e)});class Rg extends ut{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ur(t.data)}}Rg.create=e=>new Rg({typeName:Ve.ZodUnknown,...Je(e)});class Bi extends ut{_parse(t){const n=this._getOrReturnCtx(t);return Oe(n,{code:_e.invalid_type,expected:Ie.never,received:n.parsedType}),$e}}Bi.create=e=>new Bi({typeName:Ve.ZodNever,...Je(e)});class SE extends ut{_parse(t){if(this._getType(t)!==Ie.undefined){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Ie.void,received:a.parsedType}),$e}return Ur(t.data)}}SE.create=e=>new SE({typeName:Ve.ZodVoid,...Je(e)});class ma extends ut{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ie.array)return Oe(n,{code:_e.invalid_type,expected:Ie.array,received:n.parsedType}),$e;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,d=n.data.length<o.exactLength.value;(u||d)&&(Oe(n,{code:u?_e.too_big:_e.too_small,minimum:d?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Oe(n,{code:_e.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(Oe(n,{code:_e.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,d)=>o.type._parseAsync(new ya(n,u,n.path,d)))).then(u=>zn.mergeArray(a,u));const l=[...n.data].map((u,d)=>o.type._parseSync(new ya(n,u,n.path,d)));return zn.mergeArray(a,l)}get element(){return this._def.type}min(t,n){return new ma({...this._def,minLength:{value:t,message:Le.toString(n)}})}max(t,n){return new ma({...this._def,maxLength:{value:t,message:Le.toString(n)}})}length(t,n){return new ma({...this._def,exactLength:{value:t,message:Le.toString(n)}})}nonempty(t){return this.min(1,t)}}ma.create=(e,t)=>new ma({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Je(t)});function Cs(e){if(e instanceof rn){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=ki.create(Cs(a))}return new rn({...e._def,shape:()=>t})}else return e instanceof ma?new ma({...e._def,type:Cs(e.element)}):e instanceof ki?ki.create(Cs(e.unwrap())):e instanceof Hs?Hs.create(Cs(e.unwrap())):e instanceof Ro?Ro.create(e.items.map(t=>Cs(t))):e}class rn extends ut{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=gt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ie.object){const h=this._getOrReturnCtx(t);return Oe(h,{code:_e.invalid_type,expected:Ie.object,received:h.parsedType}),$e}const{status:a,ctx:o}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof Bi&&this._def.unknownKeys==="strip"))for(const h in o.data)u.includes(h)||d.push(h);const f=[];for(const h of u){const g=l[h],p=o.data[h];f.push({key:{status:"valid",value:h},value:g._parse(new ya(o,p,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof Bi){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of d)f.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(h==="strict")d.length>0&&(Oe(o,{code:_e.unrecognized_keys,keys:d}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of d){const p=o.data[g];f.push({key:{status:"valid",value:g},value:h._parse(new ya(o,p,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of f){const p=await g.key,y=await g.value;h.push({key:p,value:y,alwaysSet:g.alwaysSet})}return h}).then(h=>zn.mergeObjectSync(a,h)):zn.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(t){return Le.errToObj,new rn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const o=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:Le.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new rn({...this._def,unknownKeys:"strip"})}passthrough(){return new rn({...this._def,unknownKeys:"passthrough"})}extend(t){return new rn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new rn({...this._def,catchall:t})}pick(t){const n={};for(const a of gt.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new rn({...this._def,shape:()=>n})}omit(t){const n={};for(const a of gt.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new rn({...this._def,shape:()=>n})}deepPartial(){return Cs(this)}partial(t){const n={};for(const a of gt.objectKeys(this.shape)){const o=this.shape[a];t&&!t[a]?n[a]=o:n[a]=o.optional()}return new rn({...this._def,shape:()=>n})}required(t){const n={};for(const a of gt.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let l=this.shape[a];for(;l instanceof ki;)l=l._def.innerType;n[a]=l}return new rn({...this._def,shape:()=>n})}keyof(){return _w(gt.objectKeys(this.shape))}}rn.create=(e,t)=>new rn({shape:()=>e,unknownKeys:"strip",catchall:Bi.create(),typeName:Ve.ZodObject,...Je(t)});rn.strictCreate=(e,t)=>new rn({shape:()=>e,unknownKeys:"strict",catchall:Bi.create(),typeName:Ve.ZodObject,...Je(t)});rn.lazycreate=(e,t)=>new rn({shape:e,unknownKeys:"strip",catchall:Bi.create(),typeName:Ve.ZodObject,...Je(t)});class Gd extends ut{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function o(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new Ya(d.ctx.common.issues));return Oe(n,{code:_e.invalid_union,unionErrors:u}),$e}if(n.common.async)return Promise.all(a.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const f of a){const h={...n,common:{...n.common,issues:[]},parent:null},g=f._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(f=>new Ya(f));return Oe(n,{code:_e.invalid_union,unionErrors:d}),$e}}get options(){return this._def.options}}Gd.create=(e,t)=>new Gd({options:e,typeName:Ve.ZodUnion,...Je(t)});function Og(e,t){const n=Ai(e),a=Ai(t);if(e===t)return{valid:!0,data:e};if(n===Ie.object&&a===Ie.object){const o=gt.objectKeys(t),l=gt.objectKeys(e).filter(d=>o.indexOf(d)!==-1),u={...e,...t};for(const d of l){const f=Og(e[d],t[d]);if(!f.valid)return{valid:!1};u[d]=f.data}return{valid:!0,data:u}}else if(n===Ie.array&&a===Ie.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let l=0;l<e.length;l++){const u=e[l],d=t[l],f=Og(u,d);if(!f.valid)return{valid:!1};o.push(f.data)}return{valid:!0,data:o}}else return n===Ie.date&&a===Ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class qd extends ut{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=(l,u)=>{if(yE(l)||yE(u))return $e;const d=Og(l.value,u.value);return d.valid?((bE(l)||bE(u))&&n.dirty(),{status:n.value,value:d.data}):(Oe(a,{code:_e.invalid_intersection_types}),$e)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}qd.create=(e,t,n)=>new qd({left:e,right:t,typeName:Ve.ZodIntersection,...Je(n)});class Ro extends ut{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ie.array)return Oe(a,{code:_e.invalid_type,expected:Ie.array,received:a.parsedType}),$e;if(a.data.length<this._def.items.length)return Oe(a,{code:_e.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$e;!this._def.rest&&a.data.length>this._def.items.length&&(Oe(a,{code:_e.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...a.data].map((u,d)=>{const f=this._def.items[d]||this._def.rest;return f?f._parse(new ya(a,u,a.path,d)):null}).filter(u=>!!u);return a.common.async?Promise.all(l).then(u=>zn.mergeArray(n,u)):zn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new Ro({...this._def,rest:t})}}Ro.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ro({items:e,typeName:Ve.ZodTuple,rest:null,...Je(t)})};class Yd extends ut{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ie.object)return Oe(a,{code:_e.invalid_type,expected:Ie.object,received:a.parsedType}),$e;const o=[],l=this._def.keyType,u=this._def.valueType;for(const d in a.data)o.push({key:l._parse(new ya(a,d,a.path,d)),value:u._parse(new ya(a,a.data[d],a.path,d)),alwaysSet:d in a.data});return a.common.async?zn.mergeObjectAsync(n,o):zn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,a){return n instanceof ut?new Yd({keyType:t,valueType:n,typeName:Ve.ZodRecord,...Je(a)}):new Yd({keyType:ha.create(),valueType:t,typeName:Ve.ZodRecord,...Je(n)})}}class xE extends ut{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ie.map)return Oe(a,{code:_e.invalid_type,expected:Ie.map,received:a.parsedType}),$e;const o=this._def.keyType,l=this._def.valueType,u=[...a.data.entries()].map(([d,f],h)=>({key:o._parse(new ya(a,d,a.path,[h,"key"])),value:l._parse(new ya(a,f,a.path,[h,"value"]))}));if(a.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const f of u){const h=await f.key,g=await f.value;if(h.status==="aborted"||g.status==="aborted")return $e;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const f of u){const h=f.key,g=f.value;if(h.status==="aborted"||g.status==="aborted")return $e;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}}}}xE.create=(e,t,n)=>new xE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Je(n)});class mc extends ut{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ie.set)return Oe(a,{code:_e.invalid_type,expected:Ie.set,received:a.parsedType}),$e;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(Oe(a,{code:_e.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(Oe(a,{code:_e.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(f){const h=new Set;for(const g of f){if(g.status==="aborted")return $e;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const d=[...a.data.values()].map((f,h)=>l._parse(new ya(a,f,a.path,h)));return a.common.async?Promise.all(d).then(f=>u(f)):u(d)}min(t,n){return new mc({...this._def,minSize:{value:t,message:Le.toString(n)}})}max(t,n){return new mc({...this._def,maxSize:{value:t,message:Le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}mc.create=(e,t)=>new mc({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Je(t)});class Tg extends ut{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Tg.create=(e,t)=>new Tg({getter:e,typeName:Ve.ZodLazy,...Je(t)});class Ag extends ut{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Oe(n,{received:n.data,code:_e.invalid_literal,expected:this._def.value}),$e}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ag.create=(e,t)=>new Ag({value:e,typeName:Ve.ZodLiteral,...Je(t)});function _w(e,t){return new Vs({values:e,typeName:Ve.ZodEnum,...Je(t)})}class Vs extends ut{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return Oe(n,{expected:gt.joinValues(a),received:n.parsedType,code:_e.invalid_type}),$e}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return Oe(n,{received:n.data,code:_e.invalid_enum_value,options:a}),$e}return Ur(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Vs.create(t,{...this._def,...n})}exclude(t,n=this._def){return Vs.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}Vs.create=_w;class wE extends ut{_parse(t){const n=gt.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==Ie.string&&a.parsedType!==Ie.number){const o=gt.objectValues(n);return Oe(a,{expected:gt.joinValues(o),received:a.parsedType,code:_e.invalid_type}),$e}if(this._cache||(this._cache=new Set(gt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=gt.objectValues(n);return Oe(a,{received:a.data,code:_e.invalid_enum_value,options:o}),$e}return Ur(t.data)}get enum(){return this._def.values}}wE.create=(e,t)=>new wE({values:e,typeName:Ve.ZodNativeEnum,...Je(t)});class Kd extends ut{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ie.promise&&n.common.async===!1)return Oe(n,{code:_e.invalid_type,expected:Ie.promise,received:n.parsedType}),$e;const a=n.parsedType===Ie.promise?n.data:Promise.resolve(n.data);return Ur(a.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Kd.create=(e,t)=>new Kd({type:e,typeName:Ve.ZodPromise,...Je(t)});class Oo extends ut{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:u=>{Oe(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(a.data,l);if(a.common.async)return Promise.resolve(u).then(async d=>{if(n.value==="aborted")return $e;const f=await this._def.schema._parseAsync({data:d,path:a.path,parent:a});return f.status==="aborted"?$e:f.status==="dirty"||n.value==="dirty"?nc(f.value):f});{if(n.value==="aborted")return $e;const d=this._def.schema._parseSync({data:u,path:a.path,parent:a});return d.status==="aborted"?$e:d.status==="dirty"||n.value==="dirty"?nc(d.value):d}}if(o.type==="refinement"){const u=d=>{const f=o.refinement(d,l);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?$e:(d.status==="dirty"&&n.dirty(),u(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>d.status==="aborted"?$e:(d.status==="dirty"&&n.dirty(),u(d.value).then(()=>({status:n.value,value:d.value}))))}if(o.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!zs(u))return $e;const d=o.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>zs(u)?Promise.resolve(o.transform(u.value,l)).then(d=>({status:n.value,value:d})):$e);gt.assertNever(o)}}Oo.create=(e,t,n)=>new Oo({schema:e,typeName:Ve.ZodEffects,effect:t,...Je(n)});Oo.createWithPreprocess=(e,t,n)=>new Oo({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Je(n)});class ki extends ut{_parse(t){return this._getType(t)===Ie.undefined?Ur(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ki.create=(e,t)=>new ki({innerType:e,typeName:Ve.ZodOptional,...Je(t)});class Hs extends ut{_parse(t){return this._getType(t)===Ie.null?Ur(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hs.create=(e,t)=>new Hs({innerType:e,typeName:Ve.ZodNullable,...Je(t)});class Cg extends ut{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===Ie.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Cg.create=(e,t)=>new Cg({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Je(t)});class Ig extends ut{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Hd(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ya(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ya(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ig.create=(e,t)=>new Ig({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Je(t)});class RE extends ut{_parse(t){if(this._getType(t)!==Ie.nan){const a=this._getOrReturnCtx(t);return Oe(a,{code:_e.invalid_type,expected:Ie.nan,received:a.parsedType}),$e}return{status:"valid",value:t.data}}}RE.create=e=>new RE({typeName:Ve.ZodNaN,...Je(e)});class NM extends ut{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class Rv extends ut{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?$e:l.status==="dirty"?(n.dirty(),nc(l.value)):this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?$e:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,n){return new Rv({in:t,out:n,typeName:Ve.ZodPipeline})}}class Mg extends ut{_parse(t){const n=this._def.innerType._parse(t),a=o=>(zs(o)&&(o.value=Object.freeze(o.value)),o);return Hd(n)?n.then(o=>a(o)):a(n)}unwrap(){return this._def.innerType}}Mg.create=(e,t)=>new Mg({innerType:e,typeName:Ve.ZodReadonly,...Je(t)});function OE(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function DM(e,t={},n){return e?pc.create().superRefine((a,o)=>{const l=e(a);if(l instanceof Promise)return l.then(u=>{if(!u){const d=OE(t,a),f=d.fatal??n??!0;o.addIssue({code:"custom",...d,fatal:f})}});if(!l){const u=OE(t,a),d=u.fatal??n??!0;o.addIssue({code:"custom",...u,fatal:d})}}):pc.create()}var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const gB=(e,t={message:`Input not instance of ${e.name}`})=>DM(n=>n instanceof e,t),Ke=ha.create,Ew=xo.create;wo.create;const Ov=$d.create,vB=Fs.create,yB=xg.create,bB=wg.create,_B=pc.create,EB=Rg.create,SB=Bi.create,TE=ma.create,En=rn.create,xB=Gd.create,wB=qd.create;Ro.create;const RB=Yd.create,Hi=Tg.create,OB=Ag.create,Tv=Vs.create;Kd.create;ki.create;Hs.create;const LM=Oo.createWithPreprocess,Rm={string:(e=>ha.create({...e,coerce:!0})),number:(e=>xo.create({...e,coerce:!0})),boolean:(e=>$d.create({...e,coerce:!0})),bigint:(e=>wo.create({...e,coerce:!0})),date:(e=>Fs.create({...e,coerce:!0}))};function de(...e){return oM(iw(e))}function PM(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Ut({error:e,localization:t,localizeErrors:n=!0}){var a;const o="Request failed";if(!n)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:o;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const l=e.error.code;if(t?.[l])return t[l]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||o}function Mo(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Ng(e,t){for(const n in e)if(e[n]===t)return n}function gc(e,t){let n=Ke().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var kM={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},jM={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},UM={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},BM={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},zM={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},FM={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},VM={...zM,...FM},HM={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},$M={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},GM={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},qM={INVALID_SESSION_TOKEN:"Invalid session token"},YM={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},KM={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},WM={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},ZM={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},QM={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},XM={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},JM={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},e6={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...BM,...kM,...jM,...UM,...VM,...HM,...$M,...GM,...qM,...YM,...KM,...WM,...ZM,...QM,...XM,...JM},t6={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},AE={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},CE={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function n6(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const r6=e=>{switch(e){case"success":return o6;case"info":return l6;case"warning":return s6;case"error":return c6;default:return null}},a6=Array(12).fill(0),i6=({visible:e,className:t})=>V.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},V.createElement("div",{className:"sonner-spinner"},a6.map((n,a)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),o6=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),s6=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),l6=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),c6=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),u6=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),d6=()=>{const[e,t]=V.useState(document.hidden);return V.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Dg=1;class f6{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Dg++,u=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:a}),{...f,...t,id:l,dismissible:d,title:a}):f):this.addToast({title:a,...o,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=a!==void 0,u;const d=o.then(async h=>{if(u=["resolve",h],V.isValidElement(h))l=!1,this.create({id:a,type:"default",message:h});else if(p6(h)&&!h.ok){l=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(h instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:a,type:"success",description:y,...S})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){l=!1;const g=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,_=typeof g=="object"&&!V.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,g)=>d.then(()=>u[0]==="reject"?g(u[1]):h(u[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:f}:Object.assign(a,{unwrap:f})},this.custom=(t,n)=>{const a=n?.id||Dg++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qn=new f6,h6=(e,t)=>{const n=t?.id||Dg++;return Qn.addToast({title:e,...t,id:n}),n},p6=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",m6=h6,g6=()=>Qn.toasts,v6=()=>Qn.getActiveToasts(),IE=Object.assign(m6,{success:Qn.success,info:Qn.info,warning:Qn.warning,error:Qn.error,custom:Qn.custom,message:Qn.message,promise:Qn.promise,dismiss:Qn.dismiss,loading:Qn.loading},{getHistory:g6,getToasts:v6});n6("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function od(e){return e.label!==void 0}const y6=3,b6="24px",_6="16px",ME=4e3,E6=356,S6=14,x6=45,w6=200;function oa(...e){return e.filter(Boolean).join(" ")}function R6(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const O6=e=>{var t,n,a,o,l,u,d,f,h;const{invert:g,toast:p,unstyled:y,interacting:_,setHeights:S,visibleToasts:x,heights:T,index:R,toasts:A,expanded:C,removeToast:O,defaultRichColors:M,closeButton:L,style:N,cancelButtonStyle:D,actionButtonStyle:U,className:Z="",descriptionClassName:G="",duration:W,position:j,gap:ne,expandByDefault:ie,classNames:P,icons:F,closeButtonAriaLabel:$="Close toast"}=e,[re,ve]=V.useState(null),[k,Q]=V.useState(null),[ee,oe]=V.useState(!1),[pe,be]=V.useState(!1),[ye,Se]=V.useState(!1),[Pe,ke]=V.useState(!1),[Ee,ze]=V.useState(!1),[Pt,ge]=V.useState(0),[me,Re]=V.useState(0),Ue=V.useRef(p.duration||W||ME),it=V.useRef(null),Fe=V.useRef(null),tt=R===0,B=R+1<=x,q=p.type,Y=p.dismissible!==!1,ce=p.className||"",he=p.descriptionClassName||"",fe=V.useMemo(()=>T.findIndex(Ne=>Ne.toastId===p.id)||0,[T,p.id]),we=V.useMemo(()=>{var Ne;return(Ne=p.closeButton)!=null?Ne:L},[p.closeButton,L]),He=V.useMemo(()=>p.duration||W||ME,[p.duration,W]),nt=V.useRef(0),Tt=V.useRef(0),nr=V.useRef(0),It=V.useRef(null),[Kt,Mt]=j.split("-"),sn=V.useMemo(()=>T.reduce((Ne,Xe,At)=>At>=fe?Ne:Ne+Xe.height,0),[T,fe]),Wt=d6(),Xa=p.invert||g,Ra=q==="loading";Tt.current=V.useMemo(()=>fe*ne+sn,[fe,sn]),V.useEffect(()=>{Ue.current=He},[He]),V.useEffect(()=>{oe(!0)},[]),V.useEffect(()=>{const Ne=Fe.current;if(Ne){const Xe=Ne.getBoundingClientRect().height;return Re(Xe),S(At=>[{toastId:p.id,height:Xe,position:p.position},...At]),()=>S(At=>At.filter(St=>St.toastId!==p.id))}},[S,p.id]),V.useLayoutEffect(()=>{if(!ee)return;const Ne=Fe.current,Xe=Ne.style.height;Ne.style.height="auto";const At=Ne.getBoundingClientRect().height;Ne.style.height=Xe,Re(At),S(St=>St.find(ht=>ht.toastId===p.id)?St.map(ht=>ht.toastId===p.id?{...ht,height:At}:ht):[{toastId:p.id,height:At,position:p.position},...St])},[ee,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Me=V.useCallback(()=>{be(!0),ge(Tt.current),S(Ne=>Ne.filter(Xe=>Xe.toastId!==p.id)),setTimeout(()=>{O(p)},w6)},[p,O,S,Tt]);V.useEffect(()=>{if(p.promise&&q==="loading"||p.duration===1/0||p.type==="loading")return;let Ne;return C||_||Wt?(()=>{if(nr.current<nt.current){const St=new Date().getTime()-nt.current;Ue.current=Ue.current-St}nr.current=new Date().getTime()})():Ue.current!==1/0&&(nt.current=new Date().getTime(),Ne=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Me()},Ue.current)),()=>clearTimeout(Ne)},[C,_,p,q,Wt,Me]),V.useEffect(()=>{p.delete&&(Me(),p.onDismiss==null||p.onDismiss.call(p,p))},[Me,p.delete]);function ot(){var Ne;if(F?.loading){var Xe;return V.createElement("div",{className:oa(P?.loader,p==null||(Xe=p.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":q==="loading"},F.loading)}return V.createElement(i6,{className:oa(P?.loader,p==null||(Ne=p.classNames)==null?void 0:Ne.loader),visible:q==="loading"})}const dt=p.icon||F?.[q]||r6(q);var Qe,ft;return V.createElement("li",{tabIndex:0,ref:Fe,className:oa(Z,ce,P?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,P?.default,P?.[q],p==null||(n=p.classNames)==null?void 0:n[q]),"data-sonner-toast":"","data-rich-colors":(Qe=p.richColors)!=null?Qe:M,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":ee,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":pe,"data-visible":B,"data-y-position":Kt,"data-x-position":Mt,"data-index":R,"data-front":tt,"data-swiping":ye,"data-dismissible":Y,"data-type":q,"data-invert":Xa,"data-swipe-out":Pe,"data-swipe-direction":k,"data-expanded":!!(C||ie&&ee),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":A.length-R,"--offset":`${pe?Pt:Tt.current}px`,"--initial-height":ie?"auto":`${me}px`,...N,...p.style},onDragEnd:()=>{Se(!1),ve(null),It.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Ra||!Y||(it.current=new Date,ge(Tt.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Se(!0),It.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,Xe,At;if(Pe||!Y)return;It.current=null;const St=Number(((Ne=Fe.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mn=Number(((Xe=Fe.current)==null?void 0:Xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ht=new Date().getTime()-((At=it.current)==null?void 0:At.getTime()),Nt=re==="x"?St:Mn,_r=Math.abs(Nt)/ht;if(Math.abs(Nt)>=x6||_r>.11){ge(Tt.current),p.onDismiss==null||p.onDismiss.call(p,p),Q(re==="x"?St>0?"right":"left":Mn>0?"down":"up"),Me(),ke(!0);return}else{var Sn,Fn;(Sn=Fe.current)==null||Sn.style.setProperty("--swipe-amount-x","0px"),(Fn=Fe.current)==null||Fn.style.setProperty("--swipe-amount-y","0px")}ze(!1),Se(!1),ve(null)},onPointerMove:Ne=>{var Xe,At,St;if(!It.current||!Y||((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0)return;const ht=Ne.clientY-It.current.y,Nt=Ne.clientX-It.current.x;var _r;const Sn=(_r=e.swipeDirections)!=null?_r:R6(j);!re&&(Math.abs(Nt)>1||Math.abs(ht)>1)&&ve(Math.abs(Nt)>Math.abs(ht)?"x":"y");let Fn={x:0,y:0};const Lo=zr=>1/(1.5+Math.abs(zr)/20);if(re==="y"){if(Sn.includes("top")||Sn.includes("bottom"))if(Sn.includes("top")&&ht<0||Sn.includes("bottom")&&ht>0)Fn.y=ht;else{const zr=ht*Lo(ht);Fn.y=Math.abs(zr)<Math.abs(ht)?zr:ht}}else if(re==="x"&&(Sn.includes("left")||Sn.includes("right")))if(Sn.includes("left")&&Nt<0||Sn.includes("right")&&Nt>0)Fn.x=Nt;else{const zr=Nt*Lo(Nt);Fn.x=Math.abs(zr)<Math.abs(Nt)?zr:Nt}(Math.abs(Fn.x)>0||Math.abs(Fn.y)>0)&&ze(!0),(At=Fe.current)==null||At.style.setProperty("--swipe-amount-x",`${Fn.x}px`),(St=Fe.current)==null||St.style.setProperty("--swipe-amount-y",`${Fn.y}px`)}},we&&!p.jsx&&q!=="loading"?V.createElement("button",{"aria-label":$,"data-disabled":Ra,"data-close-button":!0,onClick:Ra||!Y?()=>{}:()=>{Me(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oa(P?.closeButton,p==null||(a=p.classNames)==null?void 0:a.closeButton)},(ft=F?.close)!=null?ft:u6):null,(q||p.icon||p.promise)&&p.icon!==null&&(F?.[q]!==null||p.icon)?V.createElement("div",{"data-icon":"",className:oa(P?.icon,p==null||(o=p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ot():null,p.type!=="loading"?dt:null):null,V.createElement("div",{"data-content":"",className:oa(P?.content,p==null||(l=p.classNames)==null?void 0:l.content)},V.createElement("div",{"data-title":"",className:oa(P?.title,p==null||(u=p.classNames)==null?void 0:u.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?V.createElement("div",{"data-description":"",className:oa(G,he,P?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),V.isValidElement(p.cancel)?p.cancel:p.cancel&&od(p.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Ne=>{od(p.cancel)&&Y&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ne),Me())},className:oa(P?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,V.isValidElement(p.action)?p.action:p.action&&od(p.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||U,onClick:Ne=>{od(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ne),!Ne.defaultPrevented&&Me())},className:oa(P?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function NE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function T6(e,t){const n={};return[e,t].forEach((a,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?_6:b6;function f(h){["top","right","bottom","left"].forEach(g=>{n[`${u}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof a=="number"||typeof a=="string"?f(a):typeof a=="object"?["top","right","bottom","left"].forEach(h=>{a[h]===void 0?n[`${u}-${h}`]=d:n[`${u}-${h}`]=typeof a[h]=="number"?`${a[h]}px`:a[h]}):f(d)}),n}const A6=V.forwardRef(function(t,n){const{id:a,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:g,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:x,visibleToasts:T=y6,toastOptions:R,dir:A=NE(),gap:C=S6,icons:O,containerAriaLabel:M="Notifications"}=t,[L,N]=V.useState([]),D=V.useMemo(()=>a?L.filter(ee=>ee.toasterId===a):L.filter(ee=>!ee.toasterId),[L,a]),U=V.useMemo(()=>Array.from(new Set([l].concat(D.filter(ee=>ee.position).map(ee=>ee.position)))),[D,l]),[Z,G]=V.useState([]),[W,j]=V.useState(!1),[ne,ie]=V.useState(!1),[P,F]=V.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=V.useRef(null),re=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=V.useRef(null),k=V.useRef(!1),Q=V.useCallback(ee=>{N(oe=>{var pe;return(pe=oe.find(be=>be.id===ee.id))!=null&&pe.delete||Qn.dismiss(ee.id),oe.filter(({id:be})=>be!==ee.id)})},[]);return V.useEffect(()=>Qn.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{N(oe=>oe.map(pe=>pe.id===ee.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{zx.flushSync(()=>{N(oe=>{const pe=oe.findIndex(be=>be.id===ee.id);return pe!==-1?[...oe.slice(0,pe),{...oe[pe],...ee},...oe.slice(pe+1)]:[ee,...oe]})})})}),[L]),V.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:oe})=>{F(oe?"dark":"light")})}catch{ee.addListener(({matches:pe})=>{try{F(pe?"dark":"light")}catch(be){console.error(be)}})}},[y]),V.useEffect(()=>{L.length<=1&&j(!1)},[L]),V.useEffect(()=>{const ee=oe=>{var pe;if(u.every(Se=>oe[Se]||oe.code===Se)){var ye;j(!0),(ye=$.current)==null||ye.focus()}oe.code==="Escape"&&(document.activeElement===$.current||(pe=$.current)!=null&&pe.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[u]),V.useEffect(()=>{if($.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,k.current=!1)}},[$.current]),V.createElement("section",{ref:n,"aria-label":`${M} ${re}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((ee,oe)=>{var pe;const[be,ye]=ee.split("-");return D.length?V.createElement("ol",{key:ee,dir:A==="auto"?NE():A,tabIndex:-1,ref:$,className:h,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":be,"data-x-position":ye,style:{"--front-toast-height":`${((pe=Z[0])==null?void 0:pe.height)||0}px`,"--width":`${E6}px`,"--gap":`${C}px`,...x,...T6(g,p)},onBlur:Se=>{k.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(k.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||k.current||(k.current=!0,ve.current=Se.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{ne||j(!1)},onDragEnd:()=>j(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},D.filter(Se=>!Se.position&&oe===0||Se.position===ee).map((Se,Pe)=>{var ke,Ee;return V.createElement(O6,{key:Se.id,icons:O,index:Pe,toast:Se,defaultRichColors:_,duration:(ke=R?.duration)!=null?ke:S,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:T,closeButton:(Ee=R?.closeButton)!=null?Ee:f,interacting:ne,position:ee,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:Q,toasts:D.filter(ze=>ze.position==Se.position),heights:Z.filter(ze=>ze.position==Se.position),setHeights:G,expandByDefault:d,gap:C,expanded:W,swipeDirections:t.swipeDirections})})):null}))}),Sw=E.createContext({});function xw(){return E.useContext(Sw)}var Om,DE;function C6(){if(DE)return Om;DE=1;var e=function(){};return Om=e,Om}var I6=C6();const M6=Io(I6);function N6({async:e,appendTo:t,defer:n,id:a,nonce:o,src:l}){const u=document.createElement("script");e!==void 0&&(u.async=e),n!==void 0&&(u.defer=n),a&&(u.id=a),o&&u.setAttribute("nonce",o),u.src=l,(t==="head"?document.head:document.body).appendChild(u)}var D6=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let sc=null,vc=!1;const Wd=new Set,Zd=new Set,L6=typeof window<"u",Ls="___grecaptcha_cfg",ww=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function P6(){if(!L6)return;function e(n){if(vc)n();else{window[Ls]||(window[Ls]={});const a=window[Ls];a.fns||(a.fns=[]),a.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){vc=!0;for(const n of Zd)n();Zd.clear()}window[ww]=t}function k6({language:e,onLoadCallbackName:t,render:n,useEnterprise:a=!1,useRecaptchaNet:o=!1}){const l=o?"recaptcha.net":"google.com",u=a?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${u}?${d.toString()}`}function j6({language:e,render:t,scriptProps:n,useEnterprise:a,useRecaptchaNet:o}){const l={id:"google-recaptcha-v3"},u=k6({language:e,onLoadCallbackName:ww,render:t,useEnterprise:a,useRecaptchaNet:o});if(sc){if(sc!==u)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}sc=u,N6(Object.assign(Object.assign(Object.assign({},l),n),{src:u}))}function U6(e){if(!window[Ls])return;const t=window[Ls];t.clients&&delete t.clients[e]}function B6(e,t){var{onLoadCallback:n,onLoadCallbackName:a}=t,o=D6(t,["onLoadCallback","onLoadCallbackName"]);if(Wd.size===0&&P6(),j6(o),Wd.add(e),n&&(vc?n():Zd.add(n)),a){let l=function(){if(!a)return;const u=window[a];typeof u=="function"&&u()};vc?l():Zd.add(l)}}function z6(e){var t,n,a;Wd.delete(e),Wd.size===0&&(window.grecaptcha=void 0,window[Ls]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${sc}"]`))===null||n===void 0||n.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),sc=null,vc=!1)}let LE=!1;function F6({container:e,children:t,language:n,reCaptchaKey:a,scriptProps:o,useEnterprise:l,useRecaptchaNet:u}){var d,f,h,g,p,y,_;const S=E.useId(),[x,T]=E.useState(null),[R,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function N(){var D;const U=l?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!U)throw new Error("reCAPTCHA not found");if(!U.ready)throw new Error("reCAPTCHA ready callback not found");U.ready(()=>{T(U)})}return B6(S,{language:n,onLoadCallback:N,onLoadCallbackName:o?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:o?.appendTo,async:o?.async,defer:o?.defer,id:o?.id,nonce:o?.nonce},useEnterprise:l,useRecaptchaNet:u}),()=>{z6(S),T(null)}},[e?.element,S,n,a,o?.appendTo,o?.async,o?.defer,o?.id,o?.nonce,o?.onLoadCallbackName,l,u]),E.useEffect(()=>{var N,D,U;if(!e?.element||!x?.render)return;const Z={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((N=e.parameters)===null||N===void 0?void 0:N.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},G=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!G)throw new Error("reCAPTCHA container element not found");const W=x.render(G,Z);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(LE||(M6(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),LE=!0),(U=G.querySelector(".grecaptcha-badge"))===null||U===void 0||U.style.setProperty("display","none")),A(W),C.current=!0,()=>{A(null),C.current=!1,U6(W),G.innerHTML=""}},[e?.element,(d=e?.parameters)===null||d===void 0?void 0:d.badge,(f=e?.parameters)===null||f===void 0?void 0:f.hidden,(h=e?.parameters)===null||h===void 0?void 0:h.callback,(g=e?.parameters)===null||g===void 0?void 0:g.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(y=e?.parameters)===null||y===void 0?void 0:y.tabindex,(_=e?.parameters)===null||_===void 0?void 0:_.theme,x,a]);const O=!!e?.element,M=O?R:a,L=E.useMemo(()=>M!==null&&x?.execute?N=>{if(M===null||!x?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!C.current?(console.warn("Client ID not mounted"),null):x.execute(M,{action:N})}:void 0,[M,x,O]);return b.jsx(Sw.Provider,{value:{container:e?.element,executeRecaptcha:L,reCaptchaInstance:x},children:t})}var V6=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const a of n)a()}}},Mr=new V6;function H6(){return()=>{}}function Za(){return E.useSyncExternalStore(H6,()=>!0,()=>!1)}function Av(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const o=document.documentElement.getAttribute("lang");t(o??void 0)};n();const a=new MutationObserver(o=>{for(const l of o)l.attributeName==="lang"&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function Cv(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var o;const l=document.documentElement.classList.contains("dark")||((o=document.documentElement.getAttribute("style"))==null?void 0:o.includes("color-scheme: dark"));t(l?"dark":"light")};n();const a=new MutationObserver(o=>{for(const l of o)(l.attributeName==="style"||l.attributeName==="class")&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function $6({children:e}){const t=Za(),{captcha:n}=E.useContext(Ze);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(F6,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
11
- .grecaptcha-badge {
12
- visibility: hidden;
13
- border-radius: var(--radius) !important;
14
- --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
15
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
16
- border-style: var(--tw-border-style) !important;
17
- border-width: 1px;
18
- }
19
-
20
- .dark .grecaptcha-badge {
21
- border-color: var(--input) !important;
22
- }
23
- `}),b.jsx(G6,{}),e]})}function G6(){const{executeRecaptcha:e}=xw(),{theme:t}=Cv(),{lang:n}=Av();return E.useEffect(()=>{if(!e)return;(async()=>{const o=document.querySelector("iframe[title='reCAPTCHA']");if(o){const l=new URL(o.src);l.searchParams.set("theme",t),n&&l.searchParams.set("hl",n),o.src=l.toString()}})()},[e,t,n]),null}function q6({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:a}}=E.useContext(Ze),{pathMode:o,slug:l}=t||{};let u,d,f,h;const{data:g,isPending:p,isRefetching:y}=a();if(o==="slug"){const _=e||l;u=g?.find(S=>S.slug===_),d=p,f=y}else{const{data:_,isPending:S,isRefetching:x,refetch:T}=n();h=T,u=_,d=S,f=x}return E.useMemo(()=>({data:u,isPending:d,isRefetching:f,refetch:h}),[u,d,f,h])}var Y6=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:a,redirectTo:o}=E.useContext(Ze),{slug:l,pathMode:u,personalPath:d}=n||{},{data:f}=t(),{data:h,isPending:g,isRefetching:p,refetch:y}=q6(),{refetch:_}=e(),{data:S}=e();return E.useEffect(()=>{f?.user.id&&(h||S)&&(y?.(),_?.())},[f?.user.id]),E.useEffect(()=>{p||g||l&&u==="slug"&&!h&&a(d||o)},[h,p,g,l,u,d,a,o]),null},K6=({href:e,className:t,children:n})=>b.jsx("a",{className:t,href:e,children:n}),W6=e=>{window.location.href=e},Z6=e=>{window.location.replace(e)},Q6=({variant:e="default",message:t})=>{e==="default"?IE(t):IE[e](t)},Ze=E.createContext({}),X6=({children:e,authClient:t,account:n,avatar:a,deleteUser:o,social:l,genericOAuth:u,basePath:d="/auth",baseURL:f="",captcha:h,redirectTo:g="/",credentials:p,changeEmail:y=!0,freshAge:_=3600*24,hooks:S,mutators:x,localization:T,localizeErrors:R=!0,nameRequired:A=!0,organization:C,teams:O,signUp:M=!0,toast:L=Q6,viewPaths:N,navigate:D,replace:U,Link:Z=K6,emailVerification:G,...W})=>{const j=t,ne=E.useMemo(()=>{if(a)return a===!0?{extension:"png",size:128}:{upload:a.upload,delete:a.delete,extension:a.extension||"png",size:a.size||(a.upload?256:128),Image:a.Image}},[a]),ie=E.useMemo(()=>{if(G)return G===!0?{otp:!1}:{otp:G.otp??!1}},[G]),P=E.useMemo(()=>{var Ee;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:AE}:{basePath:((Ee=n.basePath)!=null&&Ee.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...AE,...n.viewPaths}}},[n]),F=E.useMemo(()=>{if(o)return o===!0?{}:o},[o]),$=E.useMemo(()=>{if(l)return l},[l]),re=E.useMemo(()=>{if(u)return u},[u]),ve=E.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),k=E.useMemo(()=>{if(M!==!1)return M===!0||M===void 0?{fields:["name"]}:{fields:M.fields||["name"]}},[M]),Q=E.useMemo(()=>{var Ee;if(!C)return;if(C===!0)return{basePath:"/organization",viewPaths:CE,customRoles:[]};let ze;C.logo===!0?ze={extension:"png",size:128}:C.logo&&(ze={upload:C.logo.upload,delete:C.logo.delete,extension:C.logo.extension||"png",size:C.logo.size||(C.logo.upload?256:128)});const Pt=(Ee=C.basePath)!=null&&Ee.endsWith("/")?C.basePath.slice(0,-1):C.basePath;return{...C,logo:ze,basePath:Pt??"/organization",customRoles:C.customRoles||[],viewPaths:{...CE,...C.viewPaths}}},[C]),ee=E.useMemo(()=>{var Ee,ze;if(!(!O||!Q))return O===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:O.enabled??!0,customRoles:O.customRoles||[],colors:{count:((Ee=O.colors)==null?void 0:Ee.count)??5,prefix:((ze=O.colors)==null?void 0:ze.prefix)??"team"}}},[O,Q]),oe=E.useMemo(()=>({deleteApiKey:Ee=>j.apiKey.delete({...Ee,fetchOptions:{throw:!0}}),deletePasskey:Ee=>j.passkey.deletePasskey({...Ee,fetchOptions:{throw:!0}}),revokeDeviceSession:Ee=>j.multiSession.revoke({...Ee,fetchOptions:{throw:!0}}),revokeSession:Ee=>j.revokeSession({...Ee,fetchOptions:{throw:!0}}),setActiveSession:Ee=>j.multiSession.setActive({...Ee,fetchOptions:{throw:!0}}),updateOrganization:Ee=>j.organization.update({...Ee,fetchOptions:{throw:!0}}),updateTeam:Ee=>j.$fetch("/organization/update-team",{method:"POST",body:Ee,throw:!0}),updateUser:Ee=>j.updateUser({...Ee,fetchOptions:{throw:!0}}),unlinkAccount:Ee=>j.unlinkAccount({...Ee,fetchOptions:{throw:!0}})}),[j]),pe=E.useMemo(()=>({useSession:j.useSession,useListAccounts:()=>ur({queryFn:j.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Ee=>ur({queryFn:()=>j.accountInfo(Ee),cacheKey:`accountInfo:${JSON.stringify(Ee)}`}),useListDeviceSessions:()=>ur({queryFn:j.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>ur({queryFn:j.listSessions,cacheKey:"listSessions"}),useListPasskeys:j.useListPasskeys,useListApiKeys:()=>ur({queryFn:j.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:j.useActiveOrganization,useListOrganizations:j.useListOrganizations,useHasPermission:Ee=>ur({queryFn:()=>j.$fetch("/organization/has-permission",{method:"POST",body:Ee}),cacheKey:`hasPermission:${JSON.stringify(Ee)}`}),useInvitation:Ee=>ur({queryFn:()=>j.organization.getInvitation(Ee),cacheKey:`invitation:${JSON.stringify(Ee)}`}),useListInvitations:Ee=>ur({queryFn:()=>{var ze;return j.$fetch(`/organization/list-invitations?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Ee)}`}),useListUserInvitations:()=>ur({queryFn:()=>j.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Ee=>ur({queryFn:()=>{var ze;return j.$fetch(`/organization/list-members?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Ee)}`}),useListTeams:Ee=>ur({queryFn:()=>j.$fetch(`/organization/list-teams?organizationId=${Ee?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Ee)}`}),useListTeamMembers:Ee=>ur({queryFn:()=>j.$fetch("/organization/list-team-members",{method:"POST",body:Ee?.teamId?{query:{teamId:Ee.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Ee)}`}),useListUserTeams:()=>ur({queryFn:()=>j.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[j]),be=E.useMemo(()=>({...t6,...N}),[N]),ye=E.useMemo(()=>({...e6,...T}),[T]),Se=E.useMemo(()=>({...pe,...S}),[pe,S]),Pe=E.useMemo(()=>({...oe,...x}),[oe,x]);f=f.endsWith("/")?f.slice(0,-1):f,d=d.endsWith("/")?d.slice(0,-1):d;const{data:ke}=Se.useSession();return b.jsxs(Ze.Provider,{value:{authClient:j,avatar:ne,basePath:d==="/"?"":d,baseURL:f,captcha:h,redirectTo:g,changeEmail:y,credentials:ve,deleteUser:F,emailVerification:ie,freshAge:_,genericOAuth:re,hooks:Se,mutators:Pe,localization:ye,localizeErrors:R,nameRequired:A,organization:Q,teams:ee,account:P,signUp:k,social:$,toast:L,navigate:D||W6,replace:U||D||Z6,viewPaths:be,Link:Z,...W},children:[ke&&Q&&b.jsx(Y6,{}),h?.provider==="google-recaptcha-v3"?b.jsx($6,{children:e}):e]})};function ur({queryFn:e,cacheKey:t,staleTime:n=1e4}){var a;const{hooks:{useSession:o},toast:l,localization:u,localizeErrors:d}=E.useContext(Ze),{data:f,isPending:h}=o(),g=E.useRef(e);g.current=e;const p=t||e.toString(),y=E.useSyncExternalStore(E.useCallback(C=>Mr.subscribe(p,C),[p]),E.useCallback(()=>Mr.get(p),[p]),E.useCallback(()=>Mr.get(p),[p])),_=E.useRef(!1),S=E.useRef(void 0),[x,T]=E.useState(null),R=E.useCallback(async()=>{const C=Mr.getInFlightRequest(p);if(C){try{const M=await C;M.error?T(M.error):T(null)}catch(M){T(M)}return}y?.data!==void 0&&Mr.setRefetching(p,!0);const O=g.current();Mr.setInFlightRequest(p,O);try{const{data:M,error:L}=await O;L?(T(L),l({variant:"error",message:Ut({error:L,localization:u,localizeErrors:d})})):T(null),Mr.set(p,M)}catch(M){const L=M;T(L),l({variant:"error",message:Ut({error:L,localization:u,localizeErrors:d})})}finally{Mr.setRefetching(p,!1),Mr.removeInFlightRequest(p)}},[p,l,u,d,y]);E.useEffect(()=>{var C;const O=(C=f?.user)==null?void 0:C.id;if(!f){Mr.setRefetching(p,!1),Mr.clear(p),_.current=!1,S.current=void 0;return}const M=S.current!==void 0&&S.current!==O;M&&Mr.clear(p);const L=y?.data!==void 0,N=!y||Date.now()-y.timestamp>n;(!_.current||!L||M||L&&N)&&(!L||N)&&(_.current=!0,R()),S.current=O},[f,(a=f?.user)==null?void 0:a.id,p,R,y,n]);const A=h||y?.data===void 0&&!x;return{data:y?.data??null,isPending:A,isRefetching:y?.isRefetching??!1,error:x,refetch:R}}const J6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rw=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();var eN={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"};const tN=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:l,iconNode:u,...d},f)=>E.createElement("svg",{ref:f,...eN,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:Rw("lucide",o),...d},[...u.map(([h,g])=>E.createElement(h,g)),...Array.isArray(l)?l:[l]]));const In=(e,t)=>{const n=E.forwardRef(({className:a,...o},l)=>E.createElement(tN,{ref:l,iconNode:t,className:Rw(`lucide-${J6(e)}`,a),...o}));return n.displayName=`${e}`,n};const nN=In("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const rN=In("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const Iv=In("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const aN=In("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const iN=In("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const oN=In("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const sN=In("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const lN=In("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const _n=In("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Ow=In("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Tw=In("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const cN=In("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const uN=In("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const PE=In("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const dN=In("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const fN=In("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const Aw=In("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Oc=e=>e.type==="checkbox",go=e=>e instanceof Date,Jn=e=>e==null;const Cw=e=>typeof e=="object";var on=e=>!Jn(e)&&!Array.isArray(e)&&Cw(e)&&!go(e),Iw=e=>on(e)&&e.target?Oc(e.target)?e.target.checked:e.target.value:e,hN=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Mw=(e,t)=>e.has(hN(t)),pN=e=>{const t=e.constructor&&e.constructor.prototype;return on(t)&&t.hasOwnProperty("isPrototypeOf")},Mv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function un(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Mv&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(on(e)&&pN(e)))return e;const a=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(a[o]=un(e[o]));return a}var _f=e=>/^\w*$/.test(e),Vt=e=>e===void 0,Nv=e=>Array.isArray(e)?e.filter(Boolean):[],Dv=e=>Nv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),xe=(e,t,n)=>{if(!t||!on(e))return n;const a=(_f(t)?[t]:Dv(t)).reduce((o,l)=>Jn(o)?o:o[l],e);return Vt(a)||a===e?Vt(e[t])?n:e[t]:a},hr=e=>typeof e=="boolean",Bn=e=>typeof e=="function",Et=(e,t,n)=>{let a=-1;const o=_f(t)?[t]:Dv(t),l=o.length,u=l-1;for(;++a<l;){const d=o[a];let f=n;if(a!==u){const h=e[d];f=on(h)||Array.isArray(h)?h:isNaN(+o[a+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=f,e=e[d]}};const Qd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Kr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ga={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Lv=V.createContext(null);Lv.displayName="HookFormContext";const Ef=()=>V.useContext(Lv),mN=e=>{const{children:t,...n}=e;return V.createElement(Lv.Provider,{value:n},t)};var Nw=(e,t,n,a=!0)=>{const o={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(o,l,{get:()=>{const u=l;return t._proxyFormState[u]!==Kr.all&&(t._proxyFormState[u]=!a||Kr.all),n&&(n[u]=!0),e[u]}});return o};const Pv=typeof window<"u"?V.useLayoutEffect:V.useEffect;function kv(e){const t=Ef(),{control:n=t.control,disabled:a,name:o,exact:l}=e||{},[u,d]=V.useState(n._formState),f=V.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pv(()=>n._subscribe({name:o,formState:f.current,exact:l,callback:h=>{!a&&d({...n._formState,...h})}}),[o,a,l]),V.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),V.useMemo(()=>Nw(u,n,f.current,!1),[u,n])}var gr=e=>typeof e=="string",Lg=(e,t,n,a,o)=>gr(e)?(a&&t.watch.add(e),xe(n,e,o)):Array.isArray(e)?e.map(l=>(a&&t.watch.add(l),xe(n,l))):(a&&(t.watchAll=!0),n),Pg=e=>Jn(e)||!Cw(e);function Wr(e,t,n=new WeakSet){if(Pg(e)||Pg(t))return Object.is(e,t);if(go(e)&&go(t))return e.getTime()===t.getTime();const a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of a){const u=e[l];if(!o.includes(l))return!1;if(l!=="ref"){const d=t[l];if(go(u)&&go(d)||on(u)&&on(d)||Array.isArray(u)&&Array.isArray(d)?!Wr(u,d,n):!Object.is(u,d))return!1}}return!0}function gN(e){const t=Ef(),{control:n=t.control,name:a,defaultValue:o,disabled:l,exact:u,compute:d}=e||{},f=V.useRef(o),h=V.useRef(d),g=V.useRef(void 0),p=V.useRef(n),y=V.useRef(a);h.current=d;const[_,S]=V.useState(()=>{const O=n._getWatch(a,f.current);return h.current?h.current(O):O}),x=V.useCallback(O=>{const M=Lg(a,n._names,O||n._formValues,!1,f.current);return h.current?h.current(M):M},[n._formValues,n._names,a]),T=V.useCallback(O=>{if(!l){const M=Lg(a,n._names,O||n._formValues,!1,f.current);if(h.current){const L=h.current(M);Wr(L,g.current)||(S(L),g.current=L)}else S(M)}},[n._formValues,n._names,l,a]);Pv(()=>((p.current!==n||!Wr(y.current,a))&&(p.current=n,y.current=a,T()),n._subscribe({name:a,formState:{values:!0},exact:u,callback:O=>{T(O.values)}})),[n,u,a,T]),V.useEffect(()=>n._removeUnmounted());const R=p.current!==n,A=y.current,C=V.useMemo(()=>{if(l)return null;const O=!R&&!Wr(A,a);return R||O?x():null},[l,R,a,A,x]);return C!==null?C:_}function vN(e){const t=Ef(),{name:n,disabled:a,control:o=t.control,shouldUnregister:l,defaultValue:u,exact:d=!0}=e,f=Mw(o._names.array,n),h=V.useMemo(()=>xe(o._formValues,n,xe(o._defaultValues,n,u)),[o,n,u]),g=gN({control:o,name:n,defaultValue:h,exact:d}),p=kv({control:o,name:n,exact:d}),y=V.useRef(e),_=V.useRef(void 0),S=V.useRef(o.register(n,{...e.rules,value:g,...hr(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const x=V.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!xe(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!xe(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!xe(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!xe(p.validatingFields,n)},error:{enumerable:!0,get:()=>xe(p.errors,n)}}),[p,n]),T=V.useCallback(O=>S.current.onChange({target:{value:Iw(O),name:n},type:Qd.CHANGE}),[n]),R=V.useCallback(()=>S.current.onBlur({target:{value:xe(o._formValues,n),name:n},type:Qd.BLUR}),[n,o._formValues]),A=V.useCallback(O=>{const M=xe(o._fields,n);M&&M._f&&O&&(M._f.ref={focus:()=>Bn(O.focus)&&O.focus(),select:()=>Bn(O.select)&&O.select(),setCustomValidity:L=>Bn(O.setCustomValidity)&&O.setCustomValidity(L),reportValidity:()=>Bn(O.reportValidity)&&O.reportValidity()})},[o._fields,n]),C=V.useMemo(()=>({name:n,value:g,...hr(a)||p.disabled?{disabled:p.disabled||a}:{},onChange:T,onBlur:R,ref:A}),[n,a,p.disabled,T,R,A,g]);return V.useEffect(()=>{const O=o._options.shouldUnregister||l,M=_.current;M&&M!==n&&!f&&o.unregister(M),o.register(n,{...y.current.rules,...hr(y.current.disabled)?{disabled:y.current.disabled}:{}});const L=(N,D)=>{const U=xe(o._fields,N);U&&U._f&&(U._f.mount=D)};if(L(n,!0),O){const N=un(xe(o._options.defaultValues,n,y.current.defaultValue));Et(o._defaultValues,n,N),Vt(xe(o._formValues,n))&&Et(o._formValues,n,N)}return!f&&o.register(n),_.current=n,()=>{(f?O&&!o._state.action:O)?o.unregister(n):L(n,!1)}},[n,o,f,l]),V.useEffect(()=>{o._setDisabledField({disabled:a,name:n})},[a,n,o]),V.useMemo(()=>({field:C,formState:p,fieldState:x}),[C,p,x])}const yN=e=>e.render(vN(e));var jv=(e,t,n,a,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[a]:o||!0}}:{},lc=e=>Array.isArray(e)?e:[e],kE=()=>{let e=[];return{get observers(){return e},next:o=>{for(const l of e)l.next&&l.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(l=>l!==o)}}),unsubscribe:()=>{e=[]}}};function Dw(e,t){const n={};for(const a in e)if(e.hasOwnProperty(a)){const o=e[a],l=t[a];if(o&&on(o)&&l){const u=Dw(o,l);on(u)&&(n[a]=u)}else e[a]&&(n[a]=l)}return n}var Un=e=>on(e)&&!Object.keys(e).length,Uv=e=>e.type==="file",Xd=e=>{if(!Mv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Lw=e=>e.type==="select-multiple",Bv=e=>e.type==="radio",bN=e=>Bv(e)||Oc(e),Tm=e=>Xd(e)&&e.isConnected;function _N(e,t){const n=t.slice(0,-1).length;let a=0;for(;a<n;)e=Vt(e)?a++:e[t[a++]];return e}function EN(e){for(const t in e)if(e.hasOwnProperty(t)&&!Vt(e[t]))return!1;return!0}function tn(e,t){const n=Array.isArray(t)?t:_f(t)?[t]:Dv(t),a=n.length===1?e:_N(e,n),o=n.length-1,l=n[o];return a&&delete a[l],o!==0&&(on(a)&&Un(a)||Array.isArray(a)&&EN(a))&&tn(e,n.slice(0,-1)),e}var SN=e=>{for(const t in e)if(Bn(e[t]))return!0;return!1};function Pw(e){return Array.isArray(e)||on(e)&&!SN(e)}function kg(e,t={}){for(const n in e){const a=e[n];Pw(a)?(t[n]=Array.isArray(a)?[]:{},kg(a,t[n])):Vt(a)||(t[n]=!0)}return t}function Is(e,t,n){n||(n=kg(t));for(const a in e){const o=e[a];if(Pw(o))Vt(t)||Pg(n[a])?n[a]=kg(o,Array.isArray(o)?[]:{}):Is(o,Jn(t)?{}:t[a],n[a]);else{const l=t[a];n[a]=!Wr(o,l)}}return n}const jE={value:!1,isValid:!1},UE={value:!0,isValid:!0};var kw=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Vt(e[0].attributes.value)?Vt(e[0].value)||e[0].value===""?UE:{value:e[0].value,isValid:!0}:UE:jE}return jE},jw=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:a})=>Vt(e)?e:t?e===""?NaN:e&&+e:n&&gr(e)?new Date(e):a?a(e):e;const BE={isValid:!1,value:null};var Uw=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,BE):BE;function zE(e){const t=e.ref;return Uv(t)?t.files:Bv(t)?Uw(e.refs).value:Lw(t)?[...t.selectedOptions].map(({value:n})=>n):Oc(t)?kw(e.refs).value:jw(Vt(t.value)?e.ref.value:t.value,e)}var xN=(e,t,n,a)=>{const o={};for(const l of e){const u=xe(t,l);u&&Et(o,l,u._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:a}},Jd=e=>e instanceof RegExp,Wl=e=>Vt(e)?e:Jd(e)?e.source:on(e)?Jd(e.value)?e.value.source:e.value:e,FE=e=>({isOnSubmit:!e||e===Kr.onSubmit,isOnBlur:e===Kr.onBlur,isOnChange:e===Kr.onChange,isOnAll:e===Kr.all,isOnTouch:e===Kr.onTouched});const VE="AsyncFunction";var wN=e=>!!e&&!!e.validate&&!!(Bn(e.validate)&&e.validate.constructor.name===VE||on(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===VE)),RN=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),HE=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const cc=(e,t,n,a)=>{for(const o of n||Object.keys(e)){const l=xe(e,o);if(l){const{_f:u,...d}=l;if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],o)&&!a)return!0;if(u.ref&&t(u.ref,u.name)&&!a)return!0;if(cc(d,t))break}else if(on(d)&&cc(d,t))break}}};function $E(e,t,n){const a=xe(e,n);if(a||_f(n))return{error:a,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),u=xe(t,l),d=xe(e,l);if(u&&!Array.isArray(u)&&n!==l)return{name:n};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};o.pop()}return{name:n}}var ON=(e,t,n,a)=>{n(e);const{name:o,...l}=e;return Un(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(u=>t[u]===(!a||Kr.all))},TN=(e,t,n)=>!e||!t||e===t||lc(e).some(a=>a&&(n?a===t:a.startsWith(t)||t.startsWith(a))),AN=(e,t,n,a,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?a.isOnBlur:o.isOnBlur)?!e:(n?a.isOnChange:o.isOnChange)?e:!0,CN=(e,t)=>!Nv(xe(e,t)).length&&tn(e,t),IN=(e,t,n)=>{const a=lc(xe(e,n));return Et(a,"root",t[n]),Et(e,n,a),e};function GE(e,t,n="validate"){if(gr(e)||Array.isArray(e)&&e.every(gr)||hr(e)&&!e)return{type:n,message:gr(e)?e:"",ref:t}}var Es=e=>on(e)&&!Jd(e)?e:{value:e,message:""},qE=async(e,t,n,a,o,l)=>{const{ref:u,refs:d,required:f,maxLength:h,minLength:g,min:p,max:y,pattern:_,validate:S,name:x,valueAsNumber:T,mount:R}=e._f,A=xe(n,x);if(!R||t.has(x))return{};const C=d?d[0]:u,O=W=>{o&&C.reportValidity&&(C.setCustomValidity(hr(W)?"":W||""),C.reportValidity())},M={},L=Bv(u),N=Oc(u),D=L||N,U=(T||Uv(u))&&Vt(u.value)&&Vt(A)||Xd(u)&&u.value===""||A===""||Array.isArray(A)&&!A.length,Z=jv.bind(null,x,a,M),G=(W,j,ne,ie=Ga.maxLength,P=Ga.minLength)=>{const F=W?j:ne;M[x]={type:W?ie:P,message:F,ref:u,...Z(W?ie:P,F)}};if(l?!Array.isArray(A)||!A.length:f&&(!D&&(U||Jn(A))||hr(A)&&!A||N&&!kw(d).isValid||L&&!Uw(d).isValid)){const{value:W,message:j}=gr(f)?{value:!!f,message:f}:Es(f);if(W&&(M[x]={type:Ga.required,message:j,ref:C,...Z(Ga.required,j)},!a))return O(j),M}if(!U&&(!Jn(p)||!Jn(y))){let W,j;const ne=Es(y),ie=Es(p);if(!Jn(A)&&!isNaN(A)){const P=u.valueAsNumber||A&&+A;Jn(ne.value)||(W=P>ne.value),Jn(ie.value)||(j=P<ie.value)}else{const P=u.valueAsDate||new Date(A),F=ve=>new Date(new Date().toDateString()+" "+ve),$=u.type=="time",re=u.type=="week";gr(ne.value)&&A&&(W=$?F(A)>F(ne.value):re?A>ne.value:P>new Date(ne.value)),gr(ie.value)&&A&&(j=$?F(A)<F(ie.value):re?A<ie.value:P<new Date(ie.value))}if((W||j)&&(G(!!W,ne.message,ie.message,Ga.max,Ga.min),!a))return O(M[x].message),M}if((h||g)&&!U&&(gr(A)||l&&Array.isArray(A))){const W=Es(h),j=Es(g),ne=!Jn(W.value)&&A.length>+W.value,ie=!Jn(j.value)&&A.length<+j.value;if((ne||ie)&&(G(ne,W.message,j.message),!a))return O(M[x].message),M}if(_&&!U&&gr(A)){const{value:W,message:j}=Es(_);if(Jd(W)&&!A.match(W)&&(M[x]={type:Ga.pattern,message:j,ref:u,...Z(Ga.pattern,j)},!a))return O(j),M}if(S){if(Bn(S)){const W=await S(A,n),j=GE(W,C);if(j&&(M[x]={...j,...Z(Ga.validate,j.message)},!a))return O(j.message),M}else if(on(S)){let W={};for(const j in S){if(!Un(W)&&!a)break;const ne=GE(await S[j](A,n),C,j);ne&&(W={...ne,...Z(j,ne.message)},O(ne.message),a&&(M[x]=W))}if(!Un(W)&&(M[x]={ref:C,...W},!a))return M}}return O(!0),M};const MN={mode:Kr.onSubmit,reValidateMode:Kr.onChange,shouldFocusError:!0};function NN(e={}){let t={...MN,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Bn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},a={},o=on(t.defaultValues)||on(t.values)?un(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:un(o),u={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,h=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...g};let y={...p};const _={array:kE(),state:kE()},S=t.criteriaMode===Kr.all,x=B=>q=>{clearTimeout(h),h=setTimeout(B,q)},T=async B=>{if(!u.keepIsValid&&!t.disabled&&(p.isValid||y.isValid||B)){let q;t.resolver?(q=Un((await D()).errors),R()):q=await Z(a,!0),q!==n.isValid&&_.state.next({isValid:q})}},R=(B,q)=>{!t.disabled&&(p.isValidating||p.validatingFields||y.isValidating||y.validatingFields)&&((B||Array.from(d.mount)).forEach(Y=>{Y&&(q?Et(n.validatingFields,Y,q):tn(n.validatingFields,Y))}),_.state.next({validatingFields:n.validatingFields,isValidating:!Un(n.validatingFields)}))},A=(B,q=[],Y,ce,he=!0,fe=!0)=>{if(ce&&Y&&!t.disabled){if(u.action=!0,fe&&Array.isArray(xe(a,B))){const we=Y(xe(a,B),ce.argA,ce.argB);he&&Et(a,B,we)}if(fe&&Array.isArray(xe(n.errors,B))){const we=Y(xe(n.errors,B),ce.argA,ce.argB);he&&Et(n.errors,B,we),CN(n.errors,B)}if((p.touchedFields||y.touchedFields)&&fe&&Array.isArray(xe(n.touchedFields,B))){const we=Y(xe(n.touchedFields,B),ce.argA,ce.argB);he&&Et(n.touchedFields,B,we)}(p.dirtyFields||y.dirtyFields)&&(n.dirtyFields=Is(o,l)),_.state.next({name:B,isDirty:W(B,q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Et(l,B,q)},C=(B,q)=>{Et(n.errors,B,q),_.state.next({errors:n.errors})},O=B=>{n.errors=B,_.state.next({errors:n.errors,isValid:!1})},M=(B,q,Y,ce)=>{const he=xe(a,B);if(he){const fe=xe(l,B,Vt(Y)?xe(o,B):Y);Vt(fe)||ce&&ce.defaultChecked||q?Et(l,B,q?fe:zE(he._f)):ie(B,fe),u.mount&&!u.action&&T()}},L=(B,q,Y,ce,he)=>{let fe=!1,we=!1;const He={name:B};if(!t.disabled){if(!Y||ce){(p.isDirty||y.isDirty)&&(we=n.isDirty,n.isDirty=He.isDirty=W(),fe=we!==He.isDirty);const nt=Wr(xe(o,B),q);we=!!xe(n.dirtyFields,B),nt?tn(n.dirtyFields,B):Et(n.dirtyFields,B,!0),He.dirtyFields=n.dirtyFields,fe=fe||(p.dirtyFields||y.dirtyFields)&&we!==!nt}if(Y){const nt=xe(n.touchedFields,B);nt||(Et(n.touchedFields,B,Y),He.touchedFields=n.touchedFields,fe=fe||(p.touchedFields||y.touchedFields)&&nt!==Y)}fe&&he&&_.state.next(He)}return fe?He:{}},N=(B,q,Y,ce)=>{const he=xe(n.errors,B),fe=(p.isValid||y.isValid)&&hr(q)&&n.isValid!==q;if(t.delayError&&Y?(f=x(()=>C(B,Y)),f(t.delayError)):(clearTimeout(h),f=null,Y?Et(n.errors,B,Y):tn(n.errors,B)),(Y?!Wr(he,Y):he)||!Un(ce)||fe){const we={...ce,...fe&&hr(q)?{isValid:q}:{},errors:n.errors,name:B};n={...n,...we},_.state.next(we)}},D=async B=>(R(B,!0),await t.resolver(l,t.context,xN(B||d.mount,a,t.criteriaMode,t.shouldUseNativeValidation))),U=async B=>{const{errors:q}=await D(B);if(R(B),B)for(const Y of B){const ce=xe(q,Y);ce?Et(n.errors,Y,ce):tn(n.errors,Y)}else n.errors=q;return q},Z=async(B,q,Y={valid:!0})=>{for(const ce in B){const he=B[ce];if(he){const{_f:fe,...we}=he;if(fe){const He=d.array.has(fe.name),nt=he._f&&wN(he._f);nt&&p.validatingFields&&R([fe.name],!0);const Tt=await qE(he,d.disabled,l,S,t.shouldUseNativeValidation&&!q,He);if(nt&&p.validatingFields&&R([fe.name]),Tt[fe.name]&&(Y.valid=!1,q))break;!q&&(xe(Tt,fe.name)?He?IN(n.errors,Tt,fe.name):Et(n.errors,fe.name,Tt[fe.name]):tn(n.errors,fe.name))}!Un(we)&&await Z(we,q,Y)}}return Y.valid},G=()=>{for(const B of d.unMount){const q=xe(a,B);q&&(q._f.refs?q._f.refs.every(Y=>!Tm(Y)):!Tm(q._f.ref))&&Se(B)}d.unMount=new Set},W=(B,q)=>!t.disabled&&(B&&q&&Et(l,B,q),!Wr(k(),o)),j=(B,q,Y)=>Lg(B,d,{...u.mount?l:Vt(q)?o:gr(B)?{[B]:q}:q},Y,q),ne=B=>Nv(xe(u.mount?l:o,B,t.shouldUnregister?xe(o,B,[]):[])),ie=(B,q,Y={})=>{const ce=xe(a,B);let he=q;if(ce){const fe=ce._f;fe&&(!fe.disabled&&Et(l,B,jw(q,fe)),he=Xd(fe.ref)&&Jn(q)?"":q,Lw(fe.ref)?[...fe.ref.options].forEach(we=>we.selected=he.includes(we.value)):fe.refs?Oc(fe.ref)?fe.refs.forEach(we=>{(!we.defaultChecked||!we.disabled)&&(Array.isArray(he)?we.checked=!!he.find(He=>He===we.value):we.checked=he===we.value||!!he)}):fe.refs.forEach(we=>we.checked=we.value===he):Uv(fe.ref)?fe.ref.value="":(fe.ref.value=he,fe.ref.type||_.state.next({name:B,values:un(l)})))}(Y.shouldDirty||Y.shouldTouch)&&L(B,he,Y.shouldTouch,Y.shouldDirty,!0),Y.shouldValidate&&ve(B)},P=(B,q,Y)=>{for(const ce in q){if(!q.hasOwnProperty(ce))return;const he=q[ce],fe=B+"."+ce,we=xe(a,fe);(d.array.has(B)||on(he)||we&&!we._f)&&!go(he)?P(fe,he,Y):ie(fe,he,Y)}},F=(B,q,Y={})=>{const ce=xe(a,B),he=d.array.has(B),fe=un(q);Et(l,B,fe),he?(_.array.next({name:B,values:un(l)}),(p.isDirty||p.dirtyFields||y.isDirty||y.dirtyFields)&&Y.shouldDirty&&_.state.next({name:B,dirtyFields:Is(o,l),isDirty:W(B,fe)})):ce&&!ce._f&&!Jn(fe)?P(B,fe,Y):ie(B,fe,Y),HE(B,d)&&_.state.next({...n,name:B}),_.state.next({name:u.mount?B:void 0,values:un(l)})},$=async B=>{u.mount=!0;const q=B.target;let Y=q.name,ce=!0;const he=xe(a,Y),fe=nt=>{ce=Number.isNaN(nt)||go(nt)&&isNaN(nt.getTime())||Wr(nt,xe(l,Y,nt))},we=FE(t.mode),He=FE(t.reValidateMode);if(he){let nt,Tt;const nr=q.type?zE(he._f):Iw(B),It=B.type===Qd.BLUR||B.type===Qd.FOCUS_OUT,Kt=!RN(he._f)&&!t.resolver&&!xe(n.errors,Y)&&!he._f.deps||AN(It,xe(n.touchedFields,Y),n.isSubmitted,He,we),Mt=HE(Y,d,It);Et(l,Y,nr),It?(!q||!q.readOnly)&&(he._f.onBlur&&he._f.onBlur(B),f&&f(0)):he._f.onChange&&he._f.onChange(B);const sn=L(Y,nr,It),Wt=!Un(sn)||Mt;if(!It&&_.state.next({name:Y,type:B.type,values:un(l)}),Kt)return(p.isValid||y.isValid)&&(t.mode==="onBlur"?It&&T():It||T()),Wt&&_.state.next({name:Y,...Mt?{}:sn});if(!It&&Mt&&_.state.next({...n}),t.resolver){const{errors:Xa}=await D([Y]);if(R([Y]),fe(nr),ce){const Ra=$E(n.errors,a,Y),Me=$E(Xa,a,Ra.name||Y);nt=Me.error,Y=Me.name,Tt=Un(Xa)}}else R([Y],!0),nt=(await qE(he,d.disabled,l,S,t.shouldUseNativeValidation))[Y],R([Y]),fe(nr),ce&&(nt?Tt=!1:(p.isValid||y.isValid)&&(Tt=await Z(a,!0)));ce&&(he._f.deps&&(!Array.isArray(he._f.deps)||he._f.deps.length>0)&&ve(he._f.deps),N(Y,Tt,nt,sn))}},re=(B,q)=>{if(xe(n.errors,q)&&B.focus)return B.focus(),1},ve=async(B,q={})=>{let Y,ce;const he=lc(B);if(t.resolver){const fe=await U(Vt(B)?B:he);Y=Un(fe),ce=B?!he.some(we=>xe(fe,we)):Y}else B?(ce=(await Promise.all(he.map(async fe=>{const we=xe(a,fe);return await Z(we&&we._f?{[fe]:we}:we)}))).every(Boolean),!(!ce&&!n.isValid)&&T()):ce=Y=await Z(a);return _.state.next({...!gr(B)||(p.isValid||y.isValid)&&Y!==n.isValid?{}:{name:B},...t.resolver||!B?{isValid:Y}:{},errors:n.errors}),q.shouldFocus&&!ce&&cc(a,re,B?he:d.mount),ce},k=(B,q)=>{let Y={...u.mount?l:o};return q&&(Y=Dw(q.dirtyFields?n.dirtyFields:n.touchedFields,Y)),Vt(B)?Y:gr(B)?xe(Y,B):B.map(ce=>xe(Y,ce))},Q=(B,q)=>({invalid:!!xe((q||n).errors,B),isDirty:!!xe((q||n).dirtyFields,B),error:xe((q||n).errors,B),isValidating:!!xe(n.validatingFields,B),isTouched:!!xe((q||n).touchedFields,B)}),ee=B=>{B&&lc(B).forEach(q=>tn(n.errors,q)),_.state.next({errors:B?n.errors:{}})},oe=(B,q,Y)=>{const ce=(xe(a,B,{_f:{}})._f||{}).ref,he=xe(n.errors,B)||{},{ref:fe,message:we,type:He,...nt}=he;Et(n.errors,B,{...nt,...q,ref:ce}),_.state.next({name:B,errors:n.errors,isValid:!1}),Y&&Y.shouldFocus&&ce&&ce.focus&&ce.focus()},pe=(B,q)=>Bn(B)?_.state.subscribe({next:Y=>"values"in Y&&B(j(void 0,q),Y)}):j(B,q,!0),be=B=>_.state.subscribe({next:q=>{TN(B.name,q.name,B.exact)&&ON(q,B.formState||p,it,B.reRenderRoot)&&B.callback({values:{...l},...n,...q,defaultValues:o})}}).unsubscribe,ye=B=>(u.mount=!0,y={...y,...B.formState},be({...B,formState:{...g,...B.formState}})),Se=(B,q={})=>{for(const Y of B?lc(B):d.mount)d.mount.delete(Y),d.array.delete(Y),q.keepValue||(tn(a,Y),tn(l,Y)),!q.keepError&&tn(n.errors,Y),!q.keepDirty&&tn(n.dirtyFields,Y),!q.keepTouched&&tn(n.touchedFields,Y),!q.keepIsValidating&&tn(n.validatingFields,Y),!t.shouldUnregister&&!q.keepDefaultValue&&tn(o,Y);_.state.next({values:un(l)}),_.state.next({...n,...q.keepDirty?{isDirty:W()}:{}}),!q.keepIsValid&&T()},Pe=({disabled:B,name:q})=>{(hr(B)&&u.mount||B||d.disabled.has(q))&&(B?d.disabled.add(q):d.disabled.delete(q))},ke=(B,q={})=>{let Y=xe(a,B);const ce=hr(q.disabled)||hr(t.disabled);return Et(a,B,{...Y||{},_f:{...Y&&Y._f?Y._f:{ref:{name:B}},name:B,mount:!0,...q}}),d.mount.add(B),Y?Pe({disabled:hr(q.disabled)?q.disabled:t.disabled,name:B}):M(B,!0,q.value),{...ce?{disabled:q.disabled||t.disabled}:{},...t.progressive?{required:!!q.required,min:Wl(q.min),max:Wl(q.max),minLength:Wl(q.minLength),maxLength:Wl(q.maxLength),pattern:Wl(q.pattern)}:{},name:B,onChange:$,onBlur:$,ref:he=>{if(he){ke(B,q),Y=xe(a,B);const fe=Vt(he.value)&&he.querySelectorAll&&he.querySelectorAll("input,select,textarea")[0]||he,we=bN(fe),He=Y._f.refs||[];if(we?He.find(nt=>nt===fe):fe===Y._f.ref)return;Et(a,B,{_f:{...Y._f,...we?{refs:[...He.filter(Tm),fe,...Array.isArray(xe(o,B))?[{}]:[]],ref:{type:fe.type,name:B}}:{ref:fe}}}),M(B,!1,void 0,fe)}else Y=xe(a,B,{}),Y._f&&(Y._f.mount=!1),(t.shouldUnregister||q.shouldUnregister)&&!(Mw(d.array,B)&&u.action)&&d.unMount.add(B)}}},Ee=()=>t.shouldFocusError&&cc(a,re,d.mount),ze=B=>{hr(B)&&(_.state.next({disabled:B}),cc(a,(q,Y)=>{const ce=xe(a,Y);ce&&(q.disabled=ce._f.disabled||B,Array.isArray(ce._f.refs)&&ce._f.refs.forEach(he=>{he.disabled=ce._f.disabled||B}))},0,!1))},Pt=(B,q)=>async Y=>{let ce;Y&&(Y.preventDefault&&Y.preventDefault(),Y.persist&&Y.persist());let he=un(l);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:fe,values:we}=await D();R(),n.errors=fe,he=un(we)}else await Z(a);if(d.disabled.size)for(const fe of d.disabled)tn(he,fe);if(tn(n.errors,"root"),Un(n.errors)){_.state.next({errors:{}});try{await B(he,Y)}catch(fe){ce=fe}}else q&&await q({...n.errors},Y),Ee(),setTimeout(Ee);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Un(n.errors)&&!ce,submitCount:n.submitCount+1,errors:n.errors}),ce)throw ce},ge=(B,q={})=>{xe(a,B)&&(Vt(q.defaultValue)?F(B,un(xe(o,B))):(F(B,q.defaultValue),Et(o,B,un(q.defaultValue))),q.keepTouched||tn(n.touchedFields,B),q.keepDirty||(tn(n.dirtyFields,B),n.isDirty=q.defaultValue?W(B,un(xe(o,B))):W()),q.keepError||(tn(n.errors,B),p.isValid&&T()),_.state.next({...n}))},me=(B,q={})=>{const Y=B?un(B):o,ce=un(Y),he=Un(B),fe=he?o:ce;if(q.keepDefaultValues||(o=Y),!q.keepValues){if(q.keepDirtyValues){const we=new Set([...d.mount,...Object.keys(Is(o,l))]);for(const He of Array.from(we))xe(n.dirtyFields,He)?Et(fe,He,xe(l,He)):F(He,xe(fe,He))}else{if(Mv&&Vt(B))for(const we of d.mount){const He=xe(a,we);if(He&&He._f){const nt=Array.isArray(He._f.refs)?He._f.refs[0]:He._f.ref;if(Xd(nt)){const Tt=nt.closest("form");if(Tt){Tt.reset();break}}}}if(q.keepFieldsRef)for(const we of d.mount)F(we,xe(fe,we));else a={}}l=t.shouldUnregister?q.keepDefaultValues?un(o):{}:un(fe),_.array.next({values:{...fe}}),_.state.next({values:{...fe}})}d={mount:q.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!p.isValid||!!q.keepIsValid||!!q.keepDirtyValues||!t.shouldUnregister&&!Un(fe),u.watch=!!t.shouldUnregister,u.keepIsValid=!!q.keepIsValid,u.action=!1,q.keepErrors||(n.errors={}),_.state.next({submitCount:q.keepSubmitCount?n.submitCount:0,isDirty:he?!1:q.keepDirty?n.isDirty:!!(q.keepDefaultValues&&!Wr(B,o)),isSubmitted:q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:he?{}:q.keepDirtyValues?q.keepDefaultValues&&l?Is(o,l):n.dirtyFields:q.keepDefaultValues&&B?Is(o,B):q.keepDirty?n.dirtyFields:{},touchedFields:q.keepTouched?n.touchedFields:{},errors:q.keepErrors?n.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Re=(B,q)=>me(Bn(B)?B(l):B,{...t.resetOptions,...q}),Ue=(B,q={})=>{const Y=xe(a,B),ce=Y&&Y._f;if(ce){const he=ce.refs?ce.refs[0]:ce.ref;he.focus&&setTimeout(()=>{he.focus(),q.shouldSelect&&Bn(he.select)&&he.select()})}},it=B=>{n={...n,...B}},tt={control:{register:ke,unregister:Se,getFieldState:Q,handleSubmit:Pt,setError:oe,_subscribe:be,_runSchema:D,_updateIsValidating:R,_focusError:Ee,_getWatch:j,_getDirty:W,_setValid:T,_setFieldArray:A,_setDisabledField:Pe,_setErrors:O,_getFieldArray:ne,_reset:me,_resetDefaultValues:()=>Bn(t.defaultValues)&&t.defaultValues().then(B=>{Re(B,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:G,_disableForm:ze,_subjects:_,_proxyFormState:p,get _fields(){return a},get _formValues(){return l},get _state(){return u},set _state(B){u=B},get _defaultValues(){return o},get _names(){return d},set _names(B){d=B},get _formState(){return n},get _options(){return t},set _options(B){t={...t,...B}}},subscribe:ye,trigger:ve,register:ke,handleSubmit:Pt,watch:pe,setValue:F,getValues:k,reset:Re,resetField:ge,clearErrors:ee,unregister:Se,setError:oe,setFocus:Ue,getFieldState:Q};return{...tt,formControl:tt}}function _a(e={}){const t=V.useRef(void 0),n=V.useRef(void 0),[a,o]=V.useState({isDirty:!1,isValidating:!1,isLoading:Bn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Bn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!Bn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...d}=NN(e);t.current={...d,formState:a}}const l=t.current.control;return l._options=e,Pv(()=>{const u=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(d=>({...d,isReady:!0})),l._formState.isReady=!0,u},[l]),V.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),V.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),V.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),V.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),V.useEffect(()=>{if(l._proxyFormState.isDirty){const u=l._getDirty();u!==a.isDirty&&l._subjects.state.next({isDirty:u})}},[l,a.isDirty]),V.useEffect(()=>{var u;e.values&&!Wr(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((u=l._options.resetOptions)===null||u===void 0)&&u.keepIsValid||l._setValid(),n.current=e.values,o(d=>({...d}))):l._resetDefaultValues()},[l,e.values]),V.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=Nw(a,l),t.current}function YE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tc(...e){return t=>{let n=!1;const a=e.map(o=>{const l=YE(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<a.length;o++){const l=a[o];typeof l=="function"?l():YE(e[o],null)}}}}function hn(...e){return E.useCallback(Tc(...e),e)}var DN=Symbol.for("react.lazy"),ef=sv[" use ".trim().toString()];function LN(e){return typeof e=="object"&&e!==null&&"then"in e}function Bw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===DN&&"_payload"in e&&LN(e._payload)}function zw(e){const t=PN(e),n=E.forwardRef((a,o)=>{let{children:l,...u}=a;Bw(l)&&typeof ef=="function"&&(l=ef(l._payload));const d=E.Children.toArray(l),f=d.find(jN);if(f){const h=f.props.children,g=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...u,ref:o,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var Fw=zw("Slot");function PN(e){const t=E.forwardRef((n,a)=>{let{children:o,...l}=n;if(Bw(o)&&typeof ef=="function"&&(o=ef(o._payload)),E.isValidElement(o)){const u=BN(o),d=UN(l,o.props);return o.type!==E.Fragment&&(d.ref=a?Tc(a,u):u),E.cloneElement(o,d)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kN=Symbol("radix.slottable");function jN(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kN}function UN(e,t){const n={...t};for(const a in t){const o=e[a],l=t[a];/^on[A-Z]/.test(a)?o&&l?n[a]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[a]=o):a==="style"?n[a]={...o,...l}:a==="className"&&(n[a]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function BN(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const KE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,WE=iw,zN=(e,t)=>n=>{var a;if(t?.variants==null)return WE(e,n?.class,n?.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(h=>{const g=n?.[h],p=l?.[h];if(g===null)return null;const y=KE(g)||KE(p);return o[h][y]}),d=n&&Object.entries(n).reduce((h,g)=>{let[p,y]=g;return y===void 0||(h[p]=y),h},{}),f=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,g)=>{let{class:p,className:y,..._}=g;return Object.entries(_).every(S=>{let[x,T]=S;return Array.isArray(T)?T.includes({...l,...d}[x]):{...l,...d}[x]===T})?[...h,p,y]:h},[]);return WE(e,u,f,n?.class,n?.className)},ZE=(e,t,n)=>{if(e&&"reportValidity"in e){const a=xe(n,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},jg=(e,t)=>{for(const n in t.fields){const a=t.fields[n];a&&a.ref&&"reportValidity"in a.ref?ZE(a.ref,n,e):a&&a.refs&&a.refs.forEach(o=>ZE(o,n,e))}},QE=(e,t)=>{t.shouldUseNativeValidation&&jg(e,t);const n={};for(const a in e){const o=xe(t.fields,a),l=Object.assign(e[a]||{},{ref:o&&o.ref});if(FN(t.names||Object.keys(e),a)){const u=Object.assign({},xe(n,a));Et(u,"root",l),Et(n,a,u)}else Et(n,a,l)}return n},FN=(e,t)=>{const n=XE(t);return e.some(a=>XE(a).match(`^${n}\\.\\d+`))};function XE(e){return e.replace(/\]|\[/g,"")}const TB=Object.freeze({status:"aborted"});function Vw(e,t,n){function a(d,f){var h;Object.defineProperty(d,"_zod",{value:d._zod??{},enumerable:!1}),(h=d._zod).traits??(h.traits=new Set),d._zod.traits.add(e),t(d,f);for(const g in u.prototype)g in d||Object.defineProperty(d,g,{value:u.prototype[g].bind(d)});d._zod.constr=u,d._zod.def=f}const o=n?.Parent??Object;class l extends o{}Object.defineProperty(l,"name",{value:e});function u(d){var f;const h=n?.Parent?new l:this;a(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class Hw extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const VN={};function Sf(e){return VN}function AB(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>t.indexOf(+a)===-1).map(([a,o])=>o)}function HN(e,t){return typeof t=="bigint"?t.toString():t}function $N(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function CB(e){return e==null}function IB(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function MB(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}function NB(e,t,n){Object.defineProperty(e,t,{get(){{const a=n();return e[t]=a,a}},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function $w(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function DB(e){return JSON.stringify(e)}const Gw=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function JE(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const LB=$N(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function GN(e){if(JE(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(JE(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const PB=new Set(["string","number","symbol"]);function kB(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ks(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function jB(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function UB(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const BB={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function zB(e,t){const n={},a=e._zod.def;for(const o in t){if(!(o in a.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(n[o]=a.shape[o])}return Ks(e,{...e._zod.def,shape:n,checks:[]})}function FB(e,t){const n={...e._zod.def.shape},a=e._zod.def;for(const o in t){if(!(o in a.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete n[o]}return Ks(e,{...e._zod.def,shape:n,checks:[]})}function VB(e,t){if(!GN(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const a={...e._zod.def.shape,...t};return $w(this,"shape",a),a},checks:[]};return Ks(e,n)}function HB(e,t){return Ks(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return $w(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function $B(e,t,n){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)o[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return Ks(t,{...t._zod.def,shape:o,checks:[]})}function GB(e,t,n){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)o[l]=new e({type:"nonoptional",innerType:a[l]});return Ks(t,{...t._zod.def,shape:o,checks:[]})}function qB(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function YB(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function sd(e){return typeof e=="string"?e:e?.message}function xf(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const o=sd(e.inst?._zod.def?.error?.(e))??sd(t?.error?.(e))??sd(n.customError?.(e))??sd(n.localeError?.(e))??"Invalid input";a.message=o}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function KB(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function WB(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const qw=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,HN,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Yw=Vw("$ZodError",qw),wf=Vw("$ZodError",qw,{Parent:Error});function ZB(e,t=n=>n.message){const n={},a=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):a.push(t(o));return{formErrors:a,fieldErrors:n}}function QB(e,t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>o({issues:d}));else if(u.code==="invalid_key")o({issues:u.issues});else if(u.code==="invalid_element")o({issues:u.issues});else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(e),a}const qN=e=>(t,n,a,o)=>{const l=a?Object.assign(a,{async:!1}):{async:!1},u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise)throw new Hw;if(u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>xf(f,l,Sf())));throw Gw(d,o?.callee),d}return u.value},YN=qN(wf),KN=e=>async(t,n,a,o)=>{const l=a?Object.assign(a,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise&&(u=await u),u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>xf(f,l,Sf())));throw Gw(d,o?.callee),d}return u.value},WN=KN(wf),ZN=e=>(t,n,a)=>{const o=a?{...a,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new Hw;return l.issues.length?{success:!1,error:new(e??Yw)(l.issues.map(u=>xf(u,o,Sf())))}:{success:!0,data:l.value}},XB=ZN(wf),QN=e=>async(t,n,a)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},o);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(u=>xf(u,o,Sf())))}:{success:!0,data:l.value}},JB=QN(wf);function eS(e,t){try{var n=e()}catch(a){return t(a)}return n&&n.then?n.then(void 0,t):n}function XN(e,t){for(var n={};e.length;){var a=e[0],o=a.code,l=a.message,u=a.path.join(".");if(!n[u])if("unionErrors"in a){var d=a.unionErrors[0].errors[0];n[u]={message:d.message,type:d.code}}else n[u]={message:l,type:o};if("unionErrors"in a&&a.unionErrors.forEach(function(g){return g.errors.forEach(function(p){return e.push(p)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=jv(u,t,n,o,h?[].concat(h,a.message):a.message)}e.shift()}return n}function JN(e,t){for(var n={};e.length;){var a=e[0],o=a.code,l=a.message,u=a.path.join(".");if(!n[u])if(a.code==="invalid_union"&&a.errors.length>0){var d=a.errors[0][0];n[u]={message:d.message,type:d.code}}else n[u]={message:l,type:o};if(a.code==="invalid_union"&&a.errors.forEach(function(g){return g.forEach(function(p){return e.push(p)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=jv(u,t,n,o,h?[].concat(h,a.message):a.message)}e.shift()}return n}function Ea(e,t,n){if(n===void 0&&(n={}),(function(a){return"_def"in a&&typeof a._def=="object"&&"typeName"in a._def})(e))return function(a,o,l){try{return Promise.resolve(eS(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(u){return l.shouldUseNativeValidation&&jg({},l),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if((function(d){return Array.isArray(d?.issues)})(u))return{values:{},errors:QE(XN(u.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};if((function(a){return"_zod"in a&&typeof a._zod=="object"})(e))return function(a,o,l){try{return Promise.resolve(eS(function(){return Promise.resolve((n.mode==="sync"?YN:WN)(e,a,t)).then(function(u){return l.shouldUseNativeValidation&&jg({},l),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if((function(d){return d instanceof Yw})(u))return{values:{},errors:QE(JN(u.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};throw new Error("Invalid input: not a Zod schema")}function We(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function eD(e,t){const n=E.createContext(t),a=l=>{const{children:u,...d}=l,f=E.useMemo(()=>d,Object.values(d));return b.jsx(n.Provider,{value:f,children:u})};a.displayName=e+"Provider";function o(l){const u=E.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[a,o]}function No(e,t=[]){let n=[];function a(l,u){const d=E.createContext(u),f=n.length;n=[...n,u];const h=p=>{const{scope:y,children:_,...S}=p,x=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(x.Provider,{value:T,children:_})};h.displayName=l+"Provider";function g(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const o=()=>{const l=n.map(u=>E.createContext(u));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[a,tD(o,...t)]}function tD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=a.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Qr=globalThis?.document?E.useLayoutEffect:()=>{},nD=sv[" useId ".trim().toString()]||(()=>{}),rD=0;function ji(e){const[t,n]=E.useState(nD());return Qr(()=>{n(a=>a??String(rD++))},[e]),e||(t?`radix-${t}`:"")}var aD=sv[" useInsertionEffect ".trim().toString()]||Qr;function Ac({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[o,l,u]=iD({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:o;{const g=E.useRef(e!==void 0);E.useEffect(()=>{const p=g.current;p!==d&&console.warn(`${a} is changing from ${p?"controlled":"uncontrolled"} to ${d?"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.`),g.current=d},[d,a])}const h=E.useCallback(g=>{if(d){const p=oD(g)?g(e):g;p!==e&&u.current?.(p)}else l(g)},[d,e,l,u]);return[f,h]}function iD({defaultProp:e,onChange:t}){const[n,a]=E.useState(e),o=E.useRef(n),l=E.useRef(t);return aD(()=>{l.current=t},[t]),E.useEffect(()=>{o.current!==n&&(l.current?.(n),o.current=n)},[n,o]),[n,a,l]}function oD(e){return typeof e=="function"}function yc(e){const t=sD(e),n=E.forwardRef((a,o)=>{const{children:l,...u}=a,d=E.Children.toArray(l),f=d.find(lD);if(f){const h=f.props.children,g=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...u,ref:o,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function sD(e){const t=E.forwardRef((n,a)=>{const{children:o,...l}=n;if(E.isValidElement(o)){const u=uD(o),d=cD(l,o.props);return o.type!==E.Fragment&&(d.ref=a?Tc(a,u):u),E.cloneElement(o,d)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kw=Symbol("radix.slottable");function ez(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kw,t}function lD(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kw}function cD(e,t){const n={...t};for(const a in t){const o=e[a],l=t[a];/^on[A-Z]/.test(a)?o&&l?n[a]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[a]=o):a==="style"?n[a]={...o,...l}:a==="className"&&(n[a]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function uD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bt=dD.reduce((e,t)=>{const n=yc(`Primitive.${t}`),a=E.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function Ww(e,t){e&&bf.flushSync(()=>e.dispatchEvent(t))}function Xr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>t.current?.(...n),[])}function fD(e,t=globalThis?.document){const n=Xr(e);E.useEffect(()=>{const a=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var hD="DismissableLayer",Ug="dismissableLayer.update",pD="dismissableLayer.pointerDownOutside",mD="dismissableLayer.focusOutside",tS,Zw=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zv=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,h=E.useContext(Zw),[g,p]=E.useState(null),y=g?.ownerDocument??globalThis?.document,[,_]=E.useState({}),S=hn(t,N=>p(N)),x=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=x.indexOf(T),A=g?x.indexOf(g):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,O=A>=R,M=yD(N=>{const D=N.target,U=[...h.branches].some(Z=>Z.contains(D));!O||U||(o?.(N),u?.(N),N.defaultPrevented||d?.())},y),L=bD(N=>{const D=N.target;[...h.branches].some(Z=>Z.contains(D))||(l?.(N),u?.(N),N.defaultPrevented||d?.())},y);return fD(N=>{A===h.layers.size-1&&(a?.(N),!N.defaultPrevented&&d&&(N.preventDefault(),d()))},y),E.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),nS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=tS)}},[g,y,n,h]),E.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),nS())},[g,h]),E.useEffect(()=>{const N=()=>_({});return document.addEventListener(Ug,N),()=>document.removeEventListener(Ug,N)},[]),b.jsx(Bt.div,{...f,ref:S,style:{pointerEvents:C?O?"auto":"none":void 0,...e.style},onFocusCapture:We(e.onFocusCapture,L.onFocusCapture),onBlurCapture:We(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:We(e.onPointerDownCapture,M.onPointerDownCapture)})});zv.displayName=hD;var gD="DismissableLayerBranch",vD=E.forwardRef((e,t)=>{const n=E.useContext(Zw),a=E.useRef(null),o=hn(t,a);return E.useEffect(()=>{const l=a.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),b.jsx(Bt.div,{...e,ref:o})});vD.displayName=gD;function yD(e,t=globalThis?.document){const n=Xr(e),a=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const l=d=>{if(d.target&&!a.current){let f=function(){Qw(pD,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);a.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function bD(e,t=globalThis?.document){const n=Xr(e),a=E.useRef(!1);return E.useEffect(()=>{const o=l=>{l.target&&!a.current&&Qw(mD,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function nS(){const e=new CustomEvent(Ug);document.dispatchEvent(e)}function Qw(e,t,n,{discrete:a}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),a?Ww(o,l):o.dispatchEvent(l)}var Am="focusScope.autoFocusOnMount",Cm="focusScope.autoFocusOnUnmount",rS={bubbles:!1,cancelable:!0},_D="FocusScope",Fv=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...u}=e,[d,f]=E.useState(null),h=Xr(o),g=Xr(l),p=E.useRef(null),y=hn(t,x=>f(x)),_=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(a){let x=function(C){if(_.paused||!d)return;const O=C.target;d.contains(O)?p.current=O:Ti(p.current,{select:!0})},T=function(C){if(_.paused||!d)return;const O=C.relatedTarget;O!==null&&(d.contains(O)||Ti(p.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(const M of C)M.removedNodes.length>0&&Ti(d)};document.addEventListener("focusin",x),document.addEventListener("focusout",T);const A=new MutationObserver(R);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",T),A.disconnect()}}},[a,d,_.paused]),E.useEffect(()=>{if(d){iS.add(_);const x=document.activeElement;if(!d.contains(x)){const R=new CustomEvent(Am,rS);d.addEventListener(Am,h),d.dispatchEvent(R),R.defaultPrevented||(ED(OD(Xw(d)),{select:!0}),document.activeElement===x&&Ti(d))}return()=>{d.removeEventListener(Am,h),setTimeout(()=>{const R=new CustomEvent(Cm,rS);d.addEventListener(Cm,g),d.dispatchEvent(R),R.defaultPrevented||Ti(x??document.body,{select:!0}),d.removeEventListener(Cm,g),iS.remove(_)},0)}}},[d,h,g,_]);const S=E.useCallback(x=>{if(!n&&!a||_.paused)return;const T=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,R=document.activeElement;if(T&&R){const A=x.currentTarget,[C,O]=SD(A);C&&O?!x.shiftKey&&R===O?(x.preventDefault(),n&&Ti(C,{select:!0})):x.shiftKey&&R===C&&(x.preventDefault(),n&&Ti(O,{select:!0})):R===A&&x.preventDefault()}},[n,a,_.paused]);return b.jsx(Bt.div,{tabIndex:-1,...u,ref:y,onKeyDown:S})});Fv.displayName=_D;function ED(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Ti(a,{select:t}),document.activeElement!==n)return}function SD(e){const t=Xw(e),n=aS(t,e),a=aS(t.reverse(),e);return[n,a]}function Xw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function aS(e,t){for(const n of e)if(!xD(n,{upTo:t}))return n}function xD(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wD(e){return e instanceof HTMLInputElement&&"select"in e}function Ti(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wD(e)&&t&&e.select()}}var iS=RD();function RD(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oS(e,t),e.unshift(t)},remove(t){e=oS(e,t),e[0]?.resume()}}}function oS(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function OD(e){return e.filter(t=>t.tagName!=="A")}var TD="Portal",Vv=E.forwardRef((e,t)=>{const{container:n,...a}=e,[o,l]=E.useState(!1);Qr(()=>l(!0),[]);const u=n||o&&globalThis?.document?.body;return u?zx.createPortal(b.jsx(Bt.div,{...a,ref:t}),u):null});Vv.displayName=TD;function AD(e,t){return E.useReducer((n,a)=>t[n][a]??n,e)}var Qa=e=>{const{present:t,children:n}=e,a=CD(t),o=typeof n=="function"?n({present:a.isPresent}):E.Children.only(n),l=hn(a.ref,ID(o));return typeof n=="function"||a.isPresent?E.cloneElement(o,{ref:l}):null};Qa.displayName="Presence";function CD(e){const[t,n]=E.useState(),a=E.useRef(null),o=E.useRef(e),l=E.useRef("none"),u=e?"mounted":"unmounted",[d,f]=AD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=ld(a.current);l.current=d==="mounted"?h:"none"},[d]),Qr(()=>{const h=a.current,g=o.current;if(g!==e){const y=l.current,_=ld(h);e?f("MOUNT"):_==="none"||h?.display==="none"?f("UNMOUNT"):f(g&&y!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Qr(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,p=_=>{const x=ld(a.current).includes(CSS.escape(_.animationName));if(_.target===t&&x&&(f("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},y=_=>{_.target===t&&(l.current=ld(a.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:E.useCallback(h=>{a.current=h?getComputedStyle(h):null,n(h)},[])}}function ld(e){return e?.animationName||"none"}function ID(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Im=0;function Jw(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sS()),document.body.insertAdjacentElement("beforeend",e[1]??sS()),Im++,()=>{Im===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Im--}},[])}function sS(){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 da=function(){return da=Object.assign||function(t){for(var n,a=1,o=arguments.length;a<o;a++){n=arguments[a];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},da.apply(this,arguments)};function eR(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n}function MD(e,t,n){if(n||arguments.length===2)for(var a=0,o=t.length,l;a<o;a++)(l||!(a in t))&&(l||(l=Array.prototype.slice.call(t,0,a)),l[a]=t[a]);return e.concat(l||Array.prototype.slice.call(t))}var Td="right-scroll-bar-position",Ad="width-before-scroll-bar",ND="with-scroll-bars-hidden",DD="--removed-body-scroll-bar-size";function Mm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function LD(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var o=n.value;o!==a&&(n.value=a,n.callback(a,o))}}}})[0];return n.callback=t,n.facade}var PD=typeof window<"u"?E.useLayoutEffect:E.useEffect,lS=new WeakMap;function kD(e,t){var n=LD(null,function(a){return e.forEach(function(o){return Mm(o,a)})});return PD(function(){var a=lS.get(n);if(a){var o=new Set(a),l=new Set(e),u=n.current;o.forEach(function(d){l.has(d)||Mm(d,null)}),l.forEach(function(d){o.has(d)||Mm(d,u)})}lS.set(n,e)},[e]),n}function jD(e){return e}function UD(e,t){t===void 0&&(t=jD);var n=[],a=!1,o={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var u=t(l,a);return n.push(u),function(){n=n.filter(function(d){return d!==u})}},assignSyncMedium:function(l){for(a=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){a=!0;var u=[];if(n.length){var d=n;n=[],d.forEach(l),u=n}var f=function(){var g=u;u=[],g.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(g){u.push(g),h()},filter:function(g){return u=u.filter(g),n}}}};return o}function BD(e){e===void 0&&(e={});var t=UD(null);return t.options=da({async:!0,ssr:!1},e),t}var tR=function(e){var t=e.sideCar,n=eR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return E.createElement(a,da({},n))};tR.isSideCarExport=!0;function zD(e,t){return e.useMedium(t),tR}var nR=BD(),Nm=function(){},Rf=E.forwardRef(function(e,t){var n=E.useRef(null),a=E.useState({onScrollCapture:Nm,onWheelCapture:Nm,onTouchMoveCapture:Nm}),o=a[0],l=a[1],u=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,g=e.enabled,p=e.shards,y=e.sideCar,_=e.noRelative,S=e.noIsolation,x=e.inert,T=e.allowPinchZoom,R=e.as,A=R===void 0?"div":R,C=e.gapMode,O=eR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=y,L=kD([n,t]),N=da(da({},O),o);return E.createElement(E.Fragment,null,g&&E.createElement(M,{sideCar:nR,removeScrollBar:h,shards:p,noRelative:_,noIsolation:S,inert:x,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:C}),u?E.cloneElement(E.Children.only(d),da(da({},N),{ref:L})):E.createElement(A,da({},N,{className:f,ref:L}),d))});Rf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rf.classNames={fullWidth:Ad,zeroRight:Td};var FD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=FD();return t&&e.setAttribute("nonce",t),e}function HD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $D(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=VD())&&(HD(t,n),$D(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qD=function(){var e=GD();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rR=function(){var e=qD(),t=function(n){var a=n.styles,o=n.dynamic;return e(a,o),null};return t},YD={left:0,top:0,right:0,gap:0},Dm=function(e){return parseInt(e||"",10)||0},KD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Dm(n),Dm(a),Dm(o)]},WD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return YD;var t=KD(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},ZD=rR(),Ps="data-scroll-locked",QD=function(e,t,n,a){var o=e.left,l=e.top,u=e.right,d=e.gap;return n===void 0&&(n="margin"),`
24
- .`.concat(ND,` {
25
- overflow: hidden `).concat(a,`;
26
- padding-right: `).concat(d,"px ").concat(a,`;
27
- }
28
- body[`).concat(Ps,`] {
29
- overflow: hidden `).concat(a,`;
30
- overscroll-behavior: contain;
31
- `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
32
- padding-left: `.concat(o,`px;
33
- padding-top: `).concat(l,`px;
34
- padding-right: `).concat(u,`px;
35
- margin-left:0;
36
- margin-top:0;
37
- margin-right: `).concat(d,"px ").concat(a,`;
38
- `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(a,";")].filter(Boolean).join(""),`
39
- }
40
-
41
- .`).concat(Td,` {
42
- right: `).concat(d,"px ").concat(a,`;
43
- }
44
-
45
- .`).concat(Ad,` {
46
- margin-right: `).concat(d,"px ").concat(a,`;
47
- }
48
-
49
- .`).concat(Td," .").concat(Td,` {
50
- right: 0 `).concat(a,`;
51
- }
52
-
53
- .`).concat(Ad," .").concat(Ad,` {
54
- margin-right: 0 `).concat(a,`;
55
- }
56
-
57
- body[`).concat(Ps,`] {
58
- `).concat(DD,": ").concat(d,`px;
59
- }
60
- `)},cS=function(){var e=parseInt(document.body.getAttribute(Ps)||"0",10);return isFinite(e)?e:0},XD=function(){E.useEffect(function(){return document.body.setAttribute(Ps,(cS()+1).toString()),function(){var e=cS()-1;e<=0?document.body.removeAttribute(Ps):document.body.setAttribute(Ps,e.toString())}},[])},JD=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;XD();var l=E.useMemo(function(){return WD(o)},[o]);return E.createElement(ZD,{styles:QD(l,!t,o,n?"":"!important")})},Bg=!1;if(typeof window<"u")try{var cd=Object.defineProperty({},"passive",{get:function(){return Bg=!0,!0}});window.addEventListener("test",cd,cd),window.removeEventListener("test",cd,cd)}catch{Bg=!1}var Ss=Bg?{passive:!1}:!1,eL=function(e){return e.tagName==="TEXTAREA"},aR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!eL(e)&&n[t]==="visible")},tL=function(e){return aR(e,"overflowY")},nL=function(e){return aR(e,"overflowX")},uS=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=iR(e,a);if(o){var l=oR(e,a),u=l[1],d=l[2];if(u>d)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},rL=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},aL=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},iR=function(e,t){return e==="v"?tL(t):nL(t)},oR=function(e,t){return e==="v"?rL(t):aL(t)},iL=function(e,t){return e==="h"&&t==="rtl"?-1:1},oL=function(e,t,n,a,o){var l=iL(e,window.getComputedStyle(t).direction),u=l*a,d=n.target,f=t.contains(d),h=!1,g=u>0,p=0,y=0;do{if(!d)break;var _=oR(e,d),S=_[0],x=_[1],T=_[2],R=x-T-l*S;(S||R)&&iR(e,d)&&(p+=R,y+=S);var A=d.parentNode;d=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(g&&Math.abs(p)<1||!g&&Math.abs(y)<1)&&(h=!0),h},ud=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dS=function(e){return[e.deltaX,e.deltaY]},fS=function(e){return e&&"current"in e?e.current:e},sL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lL=function(e){return`
61
- .block-interactivity-`.concat(e,` {pointer-events: none;}
62
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
63
- `)},cL=0,xs=[];function uL(e){var t=E.useRef([]),n=E.useRef([0,0]),a=E.useRef(),o=E.useState(cL++)[0],l=E.useState(rR)[0],u=E.useRef(e);E.useEffect(function(){u.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=MD([e.lockRef.current],(e.shards||[]).map(fS),!0).filter(Boolean);return x.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var d=E.useCallback(function(x,T){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!u.current.allowPinchZoom;var R=ud(x),A=n.current,C="deltaX"in x?x.deltaX:A[0]-R[0],O="deltaY"in x?x.deltaY:A[1]-R[1],M,L=x.target,N=Math.abs(C)>Math.abs(O)?"h":"v";if("touches"in x&&N==="h"&&L.type==="range")return!1;var D=window.getSelection(),U=D&&D.anchorNode,Z=U?U===L||U.contains(L):!1;if(Z)return!1;var G=uS(N,L);if(!G)return!0;if(G?M=N:(M=N==="v"?"h":"v",G=uS(N,L)),!G)return!1;if(!a.current&&"changedTouches"in x&&(C||O)&&(a.current=M),!M)return!0;var W=a.current||M;return oL(W,T,x,W==="h"?C:O)},[]),f=E.useCallback(function(x){var T=x;if(!(!xs.length||xs[xs.length-1]!==l)){var R="deltaY"in T?dS(T):ud(T),A=t.current.filter(function(M){return M.name===T.type&&(M.target===T.target||T.target===M.shadowParent)&&sL(M.delta,R)})[0];if(A&&A.should){T.cancelable&&T.preventDefault();return}if(!A){var C=(u.current.shards||[]).map(fS).filter(Boolean).filter(function(M){return M.contains(T.target)}),O=C.length>0?d(T,C[0]):!u.current.noIsolation;O&&T.cancelable&&T.preventDefault()}}},[]),h=E.useCallback(function(x,T,R,A){var C={name:x,delta:T,target:R,should:A,shadowParent:dL(R)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(O){return O!==C})},1)},[]),g=E.useCallback(function(x){n.current=ud(x),a.current=void 0},[]),p=E.useCallback(function(x){h(x.type,dS(x),x.target,d(x,e.lockRef.current))},[]),y=E.useCallback(function(x){h(x.type,ud(x),x.target,d(x,e.lockRef.current))},[]);E.useEffect(function(){return xs.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",f,Ss),document.addEventListener("touchmove",f,Ss),document.addEventListener("touchstart",g,Ss),function(){xs=xs.filter(function(x){return x!==l}),document.removeEventListener("wheel",f,Ss),document.removeEventListener("touchmove",f,Ss),document.removeEventListener("touchstart",g,Ss)}},[]);var _=e.removeScrollBar,S=e.inert;return E.createElement(E.Fragment,null,S?E.createElement(l,{styles:lL(o)}):null,_?E.createElement(JD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fL=zD(nR,uL);var Hv=E.forwardRef(function(e,t){return E.createElement(Rf,da({},e,{ref:t,sideCar:fL}))});Hv.classNames=Rf.classNames;var hL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ws=new WeakMap,dd=new WeakMap,fd={},Lm=0,sR=function(e){return e&&(e.host||sR(e.parentNode))},pL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=sR(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mL=function(e,t,n,a){var o=pL(t,Array.isArray(e)?e:[e]);fd[n]||(fd[n]=new WeakMap);var l=fd[n],u=[],d=new Set,f=new Set(o),h=function(p){!p||d.has(p)||(d.add(p),h(p.parentNode))};o.forEach(h);var g=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(y){if(d.has(y))g(y);else try{var _=y.getAttribute(a),S=_!==null&&_!=="false",x=(ws.get(y)||0)+1,T=(l.get(y)||0)+1;ws.set(y,x),l.set(y,T),u.push(y),x===1&&S&&dd.set(y,!0),T===1&&y.setAttribute(n,"true"),S||y.setAttribute(a,"true")}catch(R){console.error("aria-hidden: cannot operate on ",y,R)}})};return g(t),d.clear(),Lm++,function(){u.forEach(function(p){var y=ws.get(p)-1,_=l.get(p)-1;ws.set(p,y),l.set(p,_),y||(dd.has(p)||p.removeAttribute(a),dd.delete(p)),_||p.removeAttribute(n)}),Lm--,Lm||(ws=new WeakMap,ws=new WeakMap,dd=new WeakMap,fd={})}},lR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=hL(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),mL(a,o,n,"aria-hidden")):function(){return null}},Of="Dialog",[cR,tz]=No(Of),[gL,ta]=cR(Of),uR=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,d=E.useRef(null),f=E.useRef(null),[h,g]=Ac({prop:a,defaultProp:o??!1,onChange:l,caller:Of});return b.jsx(gL,{scope:t,triggerRef:d,contentRef:f,contentId:ji(),titleId:ji(),descriptionId:ji(),open:h,onOpenChange:g,onOpenToggle:E.useCallback(()=>g(p=>!p),[g]),modal:u,children:n})};uR.displayName=Of;var dR="DialogTrigger",fR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(dR,n),l=hn(t,o.triggerRef);return b.jsx(Bt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qv(o.open),...a,ref:l,onClick:We(e.onClick,o.onOpenToggle)})});fR.displayName=dR;var $v="DialogPortal",[vL,hR]=cR($v,{forceMount:void 0}),pR=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:o}=e,l=ta($v,t);return b.jsx(vL,{scope:t,forceMount:n,children:E.Children.map(a,u=>b.jsx(Qa,{present:n||l.open,children:b.jsx(Vv,{asChild:!0,container:o,children:u})}))})};pR.displayName=$v;var tf="DialogOverlay",mR=E.forwardRef((e,t)=>{const n=hR(tf,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,l=ta(tf,e.__scopeDialog);return l.modal?b.jsx(Qa,{present:a||l.open,children:b.jsx(bL,{...o,ref:t})}):null});mR.displayName=tf;var yL=yc("DialogOverlay.RemoveScroll"),bL=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(tf,n);return b.jsx(Hv,{as:yL,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(Bt.div,{"data-state":qv(o.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),To="DialogContent",gR=E.forwardRef((e,t)=>{const n=hR(To,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,l=ta(To,e.__scopeDialog);return b.jsx(Qa,{present:a||l.open,children:l.modal?b.jsx(_L,{...o,ref:t}):b.jsx(EL,{...o,ref:t})})});gR.displayName=To;var _L=E.forwardRef((e,t)=>{const n=ta(To,e.__scopeDialog),a=E.useRef(null),o=hn(t,n.contentRef,a);return E.useEffect(()=>{const l=a.current;if(l)return lR(l)},[]),b.jsx(vR,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:We(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:We(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&l.preventDefault()}),onFocusOutside:We(e.onFocusOutside,l=>l.preventDefault())})}),EL=E.forwardRef((e,t)=>{const n=ta(To,e.__scopeDialog),a=E.useRef(!1),o=E.useRef(!1);return b.jsx(vR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(a.current||n.triggerRef.current?.focus(),l.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(a.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;n.triggerRef.current?.contains(u)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),vR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=e,d=ta(To,n),f=E.useRef(null),h=hn(t,f);return Jw(),b.jsxs(b.Fragment,{children:[b.jsx(Fv,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:l,children:b.jsx(zv,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":qv(d.open),...u,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(SL,{titleId:d.titleId}),b.jsx(wL,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Gv="DialogTitle",yR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(Gv,n);return b.jsx(Bt.h2,{id:o.titleId,...a,ref:t})});yR.displayName=Gv;var bR="DialogDescription",_R=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(bR,n);return b.jsx(Bt.p,{id:o.descriptionId,...a,ref:t})});_R.displayName=bR;var ER="DialogClose",SR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(ER,n);return b.jsx(Bt.button,{type:"button",...a,ref:t,onClick:We(e.onClick,()=>o.onOpenChange(!1))})});SR.displayName=ER;function qv(e){return e?"open":"closed"}var xR="DialogTitleWarning",[nz,wR]=eD(xR,{contentName:To,titleName:Gv,docsSlug:"dialog"}),SL=({titleId:e})=>{const t=wR(xR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
64
-
65
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
66
-
67
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},xL="DialogDescriptionWarning",wL=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wR(xL).contentName}}.`;return E.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},RL=uR,OL=fR,TL=pR,AL=mR,CL=gR,IL=yR,rz=_R,az=SR;function RR(e){const t=e+"CollectionProvider",[n,a]=No(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=x=>{const{scope:T,children:R}=x,A=V.useRef(null),C=V.useRef(new Map).current;return b.jsx(o,{scope:T,itemMap:C,collectionRef:A,children:R})};u.displayName=t;const d=e+"CollectionSlot",f=yc(d),h=V.forwardRef((x,T)=>{const{scope:R,children:A}=x,C=l(d,R),O=hn(T,C.collectionRef);return b.jsx(f,{ref:O,children:A})});h.displayName=d;const g=e+"CollectionItemSlot",p="data-radix-collection-item",y=yc(g),_=V.forwardRef((x,T)=>{const{scope:R,children:A,...C}=x,O=V.useRef(null),M=hn(T,O),L=l(g,R);return V.useEffect(()=>(L.itemMap.set(O,{ref:O,...C}),()=>{L.itemMap.delete(O)})),b.jsx(y,{[p]:"",ref:M,children:A})});_.displayName=g;function S(x){const T=l(e+"CollectionConsumer",x);return V.useCallback(()=>{const A=T.collectionRef.current;if(!A)return[];const C=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(T.itemMap.values()).sort((L,N)=>C.indexOf(L.ref.current)-C.indexOf(N.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:u,Slot:h,ItemSlot:_},S,a]}var ML=E.createContext(void 0);function OR(e){const t=E.useContext(ML);return e||t||"ltr"}const NL=["top","right","bottom","left"],zi=Math.min,mr=Math.max,nf=Math.round,hd=Math.floor,ga=e=>({x:e,y:e}),DL={left:"right",right:"left",bottom:"top",top:"bottom"},LL={start:"end",end:"start"};function zg(e,t,n){return mr(e,zi(t,n))}function Ka(e,t){return typeof e=="function"?e(t):e}function Wa(e){return e.split("-")[0]}function Ws(e){return e.split("-")[1]}function Yv(e){return e==="x"?"y":"x"}function Kv(e){return e==="y"?"height":"width"}const PL=new Set(["top","bottom"]);function pa(e){return PL.has(Wa(e))?"y":"x"}function Wv(e){return Yv(pa(e))}function kL(e,t,n){n===void 0&&(n=!1);const a=Ws(e),o=Wv(e),l=Kv(o);let u=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=rf(u)),[u,rf(u)]}function jL(e){const t=rf(e);return[Fg(e),t,Fg(t)]}function Fg(e){return e.replace(/start|end/g,t=>LL[t])}const hS=["left","right"],pS=["right","left"],UL=["top","bottom"],BL=["bottom","top"];function zL(e,t,n){switch(e){case"top":case"bottom":return n?t?pS:hS:t?hS:pS;case"left":case"right":return t?UL:BL;default:return[]}}function FL(e,t,n,a){const o=Ws(e);let l=zL(Wa(e),n==="start",a);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(Fg)))),l}function rf(e){return e.replace(/left|right|bottom|top/g,t=>DL[t])}function VL(e){return{top:0,right:0,bottom:0,left:0,...e}}function TR(e){return typeof e!="number"?VL(e):{top:e,right:e,bottom:e,left:e}}function af(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function mS(e,t,n){let{reference:a,floating:o}=e;const l=pa(t),u=Wv(t),d=Kv(u),f=Wa(t),h=l==="y",g=a.x+a.width/2-o.width/2,p=a.y+a.height/2-o.height/2,y=a[d]/2-o[d]/2;let _;switch(f){case"top":_={x:g,y:a.y-o.height};break;case"bottom":_={x:g,y:a.y+a.height};break;case"right":_={x:a.x+a.width,y:p};break;case"left":_={x:a.x-o.width,y:p};break;default:_={x:a.x,y:a.y}}switch(Ws(t)){case"start":_[u]-=y*(n&&h?-1:1);break;case"end":_[u]+=y*(n&&h?-1:1);break}return _}const HL=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,d=l.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:p}=mS(h,a,f),y=a,_={},S=0;for(let x=0;x<d.length;x++){const{name:T,fn:R}=d[x],{x:A,y:C,data:O,reset:M}=await R({x:g,y:p,initialPlacement:a,placement:y,strategy:o,middlewareData:_,rects:h,platform:u,elements:{reference:e,floating:t}});g=A??g,p=C??p,_={..._,[T]:{..._[T],...O}},M&&S<=50&&(S++,typeof M=="object"&&(M.placement&&(y=M.placement),M.rects&&(h=M.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):M.rects),{x:g,y:p}=mS(h,y,f)),x=-1)}return{x:g,y:p,placement:y,strategy:o,middlewareData:_}};async function bc(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:y=!1,padding:_=0}=Ka(t,e),S=TR(_),T=d[y?p==="floating"?"reference":"floating":p],R=af(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(T)))==null||n?T:T.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:g,strategy:f})),A=p==="floating"?{x:a,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),O=await(l.isElement==null?void 0:l.isElement(C))?await(l.getScale==null?void 0:l.getScale(C))||{x:1,y:1}:{x:1,y:1},M=af(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:C,strategy:f}):A);return{top:(R.top-M.top+S.top)/O.y,bottom:(M.bottom-R.bottom+S.bottom)/O.y,left:(R.left-M.left+S.left)/O.x,right:(M.right-R.right+S.right)/O.x}}const $L=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:h,padding:g=0}=Ka(e,t)||{};if(h==null)return{};const p=TR(g),y={x:n,y:a},_=Wv(o),S=Kv(_),x=await u.getDimensions(h),T=_==="y",R=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",O=l.reference[S]+l.reference[_]-y[_]-l.floating[S],M=y[_]-l.reference[_],L=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let N=L?L[C]:0;(!N||!await(u.isElement==null?void 0:u.isElement(L)))&&(N=d.floating[C]||l.floating[S]);const D=O/2-M/2,U=N/2-x[S]/2-1,Z=zi(p[R],U),G=zi(p[A],U),W=Z,j=N-x[S]-G,ne=N/2-x[S]/2+D,ie=zg(W,ne,j),P=!f.arrow&&Ws(o)!=null&&ne!==ie&&l.reference[S]/2-(ne<W?Z:G)-x[S]/2<0,F=P?ne<W?ne-W:ne-j:0;return{[_]:y[_]+F,data:{[_]:ie,centerOffset:ne-ie-F,...P&&{alignmentOffset:F}},reset:P}}}),GL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:x=!0,...T}=Ka(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const R=Wa(o),A=pa(d),C=Wa(d)===d,O=await(f.isRTL==null?void 0:f.isRTL(h.floating)),M=y||(C||!x?[rf(d)]:jL(d)),L=S!=="none";!y&&L&&M.push(...FL(d,x,S,O));const N=[d,...M],D=await bc(t,T),U=[];let Z=((a=l.flip)==null?void 0:a.overflows)||[];if(g&&U.push(D[R]),p){const ne=kL(o,u,O);U.push(D[ne[0]],D[ne[1]])}if(Z=[...Z,{placement:o,overflows:U}],!U.every(ne=>ne<=0)){var G,W;const ne=(((G=l.flip)==null?void 0:G.index)||0)+1,ie=N[ne];if(ie&&(!(p==="alignment"?A!==pa(ie):!1)||Z.every($=>pa($.placement)===A?$.overflows[0]>0:!0)))return{data:{index:ne,overflows:Z},reset:{placement:ie}};let P=(W=Z.filter(F=>F.overflows[0]<=0).sort((F,$)=>F.overflows[1]-$.overflows[1])[0])==null?void 0:W.placement;if(!P)switch(_){case"bestFit":{var j;const F=(j=Z.filter($=>{if(L){const re=pa($.placement);return re===A||re==="y"}return!0}).map($=>[$.placement,$.overflows.filter(re=>re>0).reduce((re,ve)=>re+ve,0)]).sort(($,re)=>$[1]-re[1])[0])==null?void 0:j[0];F&&(P=F);break}case"initialPlacement":P=d;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function gS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vS(e){return NL.some(t=>e[t]>=0)}const qL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...o}=Ka(e,t);switch(a){case"referenceHidden":{const l=await bc(t,{...o,elementContext:"reference"}),u=gS(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:vS(u)}}}case"escaped":{const l=await bc(t,{...o,altBoundary:!0}),u=gS(l,n.floating);return{data:{escapedOffsets:u,escaped:vS(u)}}}default:return{}}}}},AR=new Set(["left","top"]);async function YL(e,t){const{placement:n,platform:a,elements:o}=e,l=await(a.isRTL==null?void 0:a.isRTL(o.floating)),u=Wa(n),d=Ws(n),f=pa(n)==="y",h=AR.has(u)?-1:1,g=l&&f?-1:1,p=Ka(t,e);let{mainAxis:y,crossAxis:_,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return d&&typeof S=="number"&&(_=d==="end"?S*-1:S),f?{x:_*g,y:y*h}:{x:y*h,y:_*g}}const KL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:o,y:l,placement:u,middlewareData:d}=t,f=await YL(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(a=d.arrow)!=null&&a.alignmentOffset?{}:{x:o+f.x,y:l+f.y,data:{...f,placement:u}}}}},WL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:T=>{let{x:R,y:A}=T;return{x:R,y:A}}},...f}=Ka(e,t),h={x:n,y:a},g=await bc(t,f),p=pa(Wa(o)),y=Yv(p);let _=h[y],S=h[p];if(l){const T=y==="y"?"top":"left",R=y==="y"?"bottom":"right",A=_+g[T],C=_-g[R];_=zg(A,_,C)}if(u){const T=p==="y"?"top":"left",R=p==="y"?"bottom":"right",A=S+g[T],C=S-g[R];S=zg(A,S,C)}const x=d.fn({...t,[y]:_,[p]:S});return{...x,data:{x:x.x-n,y:x.y-a,enabled:{[y]:l,[p]:u}}}}}},ZL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:o,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=Ka(e,t),g={x:n,y:a},p=pa(o),y=Yv(p);let _=g[y],S=g[p];const x=Ka(d,t),T=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const C=y==="y"?"height":"width",O=l.reference[y]-l.floating[C]+T.mainAxis,M=l.reference[y]+l.reference[C]-T.mainAxis;_<O?_=O:_>M&&(_=M)}if(h){var R,A;const C=y==="y"?"width":"height",O=AR.has(Wa(o)),M=l.reference[p]-l.floating[C]+(O&&((R=u.offset)==null?void 0:R[p])||0)+(O?0:T.crossAxis),L=l.reference[p]+l.reference[C]+(O?0:((A=u.offset)==null?void 0:A[p])||0)-(O?T.crossAxis:0);S<M?S=M:S>L&&(S=L)}return{[y]:_,[p]:S}}}},QL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:o,rects:l,platform:u,elements:d}=t,{apply:f=()=>{},...h}=Ka(e,t),g=await bc(t,h),p=Wa(o),y=Ws(o),_=pa(o)==="y",{width:S,height:x}=l.floating;let T,R;p==="top"||p==="bottom"?(T=p,R=y===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(R=p,T=y==="end"?"top":"bottom");const A=x-g.top-g.bottom,C=S-g.left-g.right,O=zi(x-g[T],A),M=zi(S-g[R],C),L=!t.middlewareData.shift;let N=O,D=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=C),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(N=A),L&&!y){const Z=mr(g.left,0),G=mr(g.right,0),W=mr(g.top,0),j=mr(g.bottom,0);_?D=S-2*(Z!==0||G!==0?Z+G:mr(g.left,g.right)):N=x-2*(W!==0||j!==0?W+j:mr(g.top,g.bottom))}await f({...t,availableWidth:D,availableHeight:N});const U=await u.getDimensions(d.floating);return S!==U.width||x!==U.height?{reset:{rects:!0}}:{}}}};function Tf(){return typeof window<"u"}function Zs(e){return CR(e)?(e.nodeName||"").toLowerCase():"#document"}function br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sa(e){var t;return(t=(CR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CR(e){return Tf()?e instanceof Node||e instanceof br(e).Node:!1}function Jr(e){return Tf()?e instanceof Element||e instanceof br(e).Element:!1}function ba(e){return Tf()?e instanceof HTMLElement||e instanceof br(e).HTMLElement:!1}function yS(e){return!Tf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof br(e).ShadowRoot}const XL=new Set(["inline","contents"]);function Cc(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!XL.has(o)}const JL=new Set(["table","td","th"]);function e8(e){return JL.has(Zs(e))}const t8=[":popover-open",":modal"];function Af(e){return t8.some(t=>{try{return e.matches(t)}catch{return!1}})}const n8=["transform","translate","scale","rotate","perspective"],r8=["transform","translate","scale","rotate","perspective","filter"],a8=["paint","layout","strict","content"];function Zv(e){const t=Qv(),n=Jr(e)?ea(e):e;return n8.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||r8.some(a=>(n.willChange||"").includes(a))||a8.some(a=>(n.contain||"").includes(a))}function i8(e){let t=Fi(e);for(;ba(t)&&!$s(t);){if(Zv(t))return t;if(Af(t))return null;t=Fi(t)}return null}function Qv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const o8=new Set(["html","body","#document"]);function $s(e){return o8.has(Zs(e))}function ea(e){return br(e).getComputedStyle(e)}function Cf(e){return Jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(Zs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yS(e)&&e.host||Sa(e);return yS(t)?t.host:t}function IR(e){const t=Fi(e);return $s(t)?e.ownerDocument?e.ownerDocument.body:e.body:ba(t)&&Cc(t)?t:IR(t)}function _c(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=IR(e),l=o===((a=e.ownerDocument)==null?void 0:a.body),u=br(o);if(l){const d=Vg(u);return t.concat(u,u.visualViewport||[],Cc(o)?o:[],d&&n?_c(d):[])}return t.concat(o,_c(o,[],n))}function Vg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function MR(e){const t=ea(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=ba(e),l=o?e.offsetWidth:n,u=o?e.offsetHeight:a,d=nf(n)!==l||nf(a)!==u;return d&&(n=l,a=u),{width:n,height:a,$:d}}function Xv(e){return Jr(e)?e:e.contextElement}function ks(e){const t=Xv(e);if(!ba(t))return ga(1);const n=t.getBoundingClientRect(),{width:a,height:o,$:l}=MR(t);let u=(l?nf(n.width):n.width)/a,d=(l?nf(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const s8=ga(0);function NR(e){const t=br(e);return!Qv()||!t.visualViewport?s8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function l8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==br(e)?!1:t}function Ao(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Xv(e);let u=ga(1);t&&(a?Jr(a)&&(u=ks(a)):u=ks(e));const d=l8(l,n,a)?NR(l):ga(0);let f=(o.left+d.x)/u.x,h=(o.top+d.y)/u.y,g=o.width/u.x,p=o.height/u.y;if(l){const y=br(l),_=a&&Jr(a)?br(a):a;let S=y,x=Vg(S);for(;x&&a&&_!==S;){const T=ks(x),R=x.getBoundingClientRect(),A=ea(x),C=R.left+(x.clientLeft+parseFloat(A.paddingLeft))*T.x,O=R.top+(x.clientTop+parseFloat(A.paddingTop))*T.y;f*=T.x,h*=T.y,g*=T.x,p*=T.y,f+=C,h+=O,S=br(x),x=Vg(S)}}return af({width:g,height:p,x:f,y:h})}function If(e,t){const n=Cf(e).scrollLeft;return t?t.left+n:Ao(Sa(e)).left+n}function DR(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-If(e,n),o=n.top+t.scrollTop;return{x:a,y:o}}function c8(e){let{elements:t,rect:n,offsetParent:a,strategy:o}=e;const l=o==="fixed",u=Sa(a),d=t?Af(t.floating):!1;if(a===u||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=ga(1);const g=ga(0),p=ba(a);if((p||!p&&!l)&&((Zs(a)!=="body"||Cc(u))&&(f=Cf(a)),ba(a))){const _=Ao(a);h=ks(a),g.x=_.x+a.clientLeft,g.y=_.y+a.clientTop}const y=u&&!p&&!l?DR(u,f):ga(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+g.x+y.x,y:n.y*h.y-f.scrollTop*h.y+g.y+y.y}}function u8(e){return Array.from(e.getClientRects())}function d8(e){const t=Sa(e),n=Cf(e),a=e.ownerDocument.body,o=mr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=mr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+If(e);const d=-n.scrollTop;return ea(a).direction==="rtl"&&(u+=mr(t.clientWidth,a.clientWidth)-o),{width:o,height:l,x:u,y:d}}const bS=25;function f8(e,t){const n=br(e),a=Sa(e),o=n.visualViewport;let l=a.clientWidth,u=a.clientHeight,d=0,f=0;if(o){l=o.width,u=o.height;const g=Qv();(!g||g&&t==="fixed")&&(d=o.offsetLeft,f=o.offsetTop)}const h=If(a);if(h<=0){const g=a.ownerDocument,p=g.body,y=getComputedStyle(p),_=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(a.clientWidth-p.clientWidth-_);S<=bS&&(l-=S)}else h<=bS&&(l+=h);return{width:l,height:u,x:d,y:f}}const h8=new Set(["absolute","fixed"]);function p8(e,t){const n=Ao(e,!0,t==="fixed"),a=n.top+e.clientTop,o=n.left+e.clientLeft,l=ba(e)?ks(e):ga(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=o*l.x,h=a*l.y;return{width:u,height:d,x:f,y:h}}function _S(e,t,n){let a;if(t==="viewport")a=f8(e,n);else if(t==="document")a=d8(Sa(e));else if(Jr(t))a=p8(t,n);else{const o=NR(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return af(a)}function LR(e,t){const n=Fi(e);return n===t||!Jr(n)||$s(n)?!1:ea(n).position==="fixed"||LR(n,t)}function m8(e,t){const n=t.get(e);if(n)return n;let a=_c(e,[],!1).filter(d=>Jr(d)&&Zs(d)!=="body"),o=null;const l=ea(e).position==="fixed";let u=l?Fi(e):e;for(;Jr(u)&&!$s(u);){const d=ea(u),f=Zv(u);!f&&d.position==="fixed"&&(o=null),(l?!f&&!o:!f&&d.position==="static"&&!!o&&h8.has(o.position)||Cc(u)&&!f&&LR(e,u))?a=a.filter(g=>g!==u):o=d,u=Fi(u)}return t.set(e,a),a}function g8(e){let{element:t,boundary:n,rootBoundary:a,strategy:o}=e;const u=[...n==="clippingAncestors"?Af(t)?[]:m8(t,this._c):[].concat(n),a],d=u[0],f=u.reduce((h,g)=>{const p=_S(t,g,o);return h.top=mr(p.top,h.top),h.right=zi(p.right,h.right),h.bottom=zi(p.bottom,h.bottom),h.left=mr(p.left,h.left),h},_S(t,d,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function v8(e){const{width:t,height:n}=MR(e);return{width:t,height:n}}function y8(e,t,n){const a=ba(t),o=Sa(t),l=n==="fixed",u=Ao(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=ga(0);function h(){f.x=If(o)}if(a||!a&&!l)if((Zs(t)!=="body"||Cc(o))&&(d=Cf(t)),a){const _=Ao(t,!0,l,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else o&&h();l&&!a&&o&&h();const g=o&&!a&&!l?DR(o,d):ga(0),p=u.left+d.scrollLeft-f.x-g.x,y=u.top+d.scrollTop-f.y-g.y;return{x:p,y,width:u.width,height:u.height}}function Pm(e){return ea(e).position==="static"}function ES(e,t){if(!ba(e)||ea(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Sa(e)===n&&(n=n.ownerDocument.body),n}function PR(e,t){const n=br(e);if(Af(e))return n;if(!ba(e)){let o=Fi(e);for(;o&&!$s(o);){if(Jr(o)&&!Pm(o))return o;o=Fi(o)}return n}let a=ES(e,t);for(;a&&e8(a)&&Pm(a);)a=ES(a,t);return a&&$s(a)&&Pm(a)&&!Zv(a)?n:a||i8(e)||n}const b8=async function(e){const t=this.getOffsetParent||PR,n=this.getDimensions,a=await n(e.floating);return{reference:y8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function _8(e){return ea(e).direction==="rtl"}const E8={convertOffsetParentRelativeRectToViewportRelativeRect:c8,getDocumentElement:Sa,getClippingRect:g8,getOffsetParent:PR,getElementRects:b8,getClientRects:u8,getDimensions:v8,getScale:ks,isElement:Jr,isRTL:_8};function kR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function S8(e,t){let n=null,a;const o=Sa(e);function l(){var d;clearTimeout(a),(d=n)==null||d.disconnect(),n=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:g,top:p,width:y,height:_}=h;if(d||t(),!y||!_)return;const S=hd(p),x=hd(o.clientWidth-(g+y)),T=hd(o.clientHeight-(p+_)),R=hd(g),C={rootMargin:-S+"px "+-x+"px "+-T+"px "+-R+"px",threshold:mr(0,zi(1,f))||1};let O=!0;function M(L){const N=L[0].intersectionRatio;if(N!==f){if(!O)return u();N?u(!1,N):a=setTimeout(()=>{u(!1,1e-7)},1e3)}N===1&&!kR(h,e.getBoundingClientRect())&&u(),O=!1}try{n=new IntersectionObserver(M,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(M,C)}n.observe(e)}return u(!0),l}function x8(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=a,h=Xv(e),g=o||l?[...h?_c(h):[],..._c(t)]:[];g.forEach(R=>{o&&R.addEventListener("scroll",n,{passive:!0}),l&&R.addEventListener("resize",n)});const p=h&&d?S8(h,n):null;let y=-1,_=null;u&&(_=new ResizeObserver(R=>{let[A]=R;A&&A.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=_)==null||C.observe(t)})),n()}),h&&!f&&_.observe(h),_.observe(t));let S,x=f?Ao(e):null;f&&T();function T(){const R=Ao(e);x&&!kR(x,R)&&n(),x=R,S=requestAnimationFrame(T)}return n(),()=>{var R;g.forEach(A=>{o&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),p?.(),(R=_)==null||R.disconnect(),_=null,f&&cancelAnimationFrame(S)}}const w8=KL,R8=WL,O8=GL,T8=QL,A8=qL,SS=$L,C8=ZL,I8=(e,t,n)=>{const a=new Map,o={platform:E8,...n},l={...o.platform,_c:a};return HL(e,t,{...o,platform:l})};var M8=typeof document<"u",N8=function(){},Cd=M8?E.useLayoutEffect:N8;function of(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!of(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=n;a--!==0;){const l=o[a];if(!(l==="_owner"&&e.$$typeof)&&!of(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function jR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xS(e,t){const n=jR(e);return Math.round(t*n)/n}function km(e){const t=E.useRef(e);return Cd(()=>{t.current=e}),t}function D8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[g,p]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,_]=E.useState(a);of(y,a)||_(a);const[S,x]=E.useState(null),[T,R]=E.useState(null),A=E.useCallback($=>{$!==L.current&&(L.current=$,x($))},[]),C=E.useCallback($=>{$!==N.current&&(N.current=$,R($))},[]),O=l||S,M=u||T,L=E.useRef(null),N=E.useRef(null),D=E.useRef(g),U=f!=null,Z=km(f),G=km(o),W=km(h),j=E.useCallback(()=>{if(!L.current||!N.current)return;const $={placement:t,strategy:n,middleware:y};G.current&&($.platform=G.current),I8(L.current,N.current,$).then(re=>{const ve={...re,isPositioned:W.current!==!1};ne.current&&!of(D.current,ve)&&(D.current=ve,bf.flushSync(()=>{p(ve)}))})},[y,t,n,G,W]);Cd(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[h]);const ne=E.useRef(!1);Cd(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Cd(()=>{if(O&&(L.current=O),M&&(N.current=M),O&&M){if(Z.current)return Z.current(O,M,j);j()}},[O,M,j,Z,U]);const ie=E.useMemo(()=>({reference:L,floating:N,setReference:A,setFloating:C}),[A,C]),P=E.useMemo(()=>({reference:O,floating:M}),[O,M]),F=E.useMemo(()=>{const $={position:n,left:0,top:0};if(!P.floating)return $;const re=xS(P.floating,g.x),ve=xS(P.floating,g.y);return d?{...$,transform:"translate("+re+"px, "+ve+"px)",...jR(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:ve}},[n,d,P.floating,g.x,g.y]);return E.useMemo(()=>({...g,update:j,refs:ie,elements:P,floatingStyles:F}),[g,j,ie,P,F])}const L8=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:o}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?SS({element:a.current,padding:o}).fn(n):{}:a?SS({element:a,padding:o}).fn(n):{}}}},P8=(e,t)=>({...w8(e),options:[e,t]}),k8=(e,t)=>({...R8(e),options:[e,t]}),j8=(e,t)=>({...C8(e),options:[e,t]}),U8=(e,t)=>({...O8(e),options:[e,t]}),B8=(e,t)=>({...T8(e),options:[e,t]}),z8=(e,t)=>({...A8(e),options:[e,t]}),F8=(e,t)=>({...L8(e),options:[e,t]});var V8="Arrow",UR=E.forwardRef((e,t)=>{const{children:n,width:a=10,height:o=5,...l}=e;return b.jsx(Bt.svg,{...l,ref:t,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});UR.displayName=V8;var H8=UR;function BR(e){const[t,n]=E.useState(void 0);return Qr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var Jv="Popper",[zR,FR]=No(Jv),[$8,VR]=zR(Jv),HR=e=>{const{__scopePopper:t,children:n}=e,[a,o]=E.useState(null);return b.jsx($8,{scope:t,anchor:a,onAnchorChange:o,children:n})};HR.displayName=Jv;var $R="PopperAnchor",GR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...o}=e,l=VR($R,n),u=E.useRef(null),d=hn(t,u),f=E.useRef(null);return E.useEffect(()=>{const h=f.current;f.current=a?.current||u.current,h!==f.current&&l.onAnchorChange(f.current)}),a?null:b.jsx(Bt.div,{...o,ref:d})});GR.displayName=$R;var e0="PopperContent",[G8,q8]=zR(e0),qR=E.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:S,...x}=e,T=VR(e0,n),[R,A]=E.useState(null),C=hn(t,ye=>A(ye)),[O,M]=E.useState(null),L=BR(O),N=L?.width??0,D=L?.height??0,U=a+(l!=="center"?"-"+l:""),Z=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},G=Array.isArray(h)?h:[h],W=G.length>0,j={padding:Z,boundary:G.filter(K8),altBoundary:W},{refs:ne,floatingStyles:ie,placement:P,isPositioned:F,middlewareData:$}=D8({strategy:"fixed",placement:U,whileElementsMounted:(...ye)=>x8(...ye,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[P8({mainAxis:o+D,alignmentAxis:u}),f&&k8({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?j8():void 0,...j}),f&&U8({...j}),B8({...j,apply:({elements:ye,rects:Se,availableWidth:Pe,availableHeight:ke})=>{const{width:Ee,height:ze}=Se.reference,Pt=ye.floating.style;Pt.setProperty("--radix-popper-available-width",`${Pe}px`),Pt.setProperty("--radix-popper-available-height",`${ke}px`),Pt.setProperty("--radix-popper-anchor-width",`${Ee}px`),Pt.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),O&&F8({element:O,padding:d}),W8({arrowWidth:N,arrowHeight:D}),y&&z8({strategy:"referenceHidden",...j})]}),[re,ve]=WR(P),k=Xr(S);Qr(()=>{F&&k?.()},[F,k]);const Q=$.arrow?.x,ee=$.arrow?.y,oe=$.arrow?.centerOffset!==0,[pe,be]=E.useState();return Qr(()=>{R&&be(window.getComputedStyle(R).zIndex)},[R]),b.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:F?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(G8,{scope:n,placedSide:re,onArrowChange:M,arrowX:Q,arrowY:ee,shouldHideArrow:oe,children:b.jsx(Bt.div,{"data-side":re,"data-align":ve,...x,ref:C,style:{...x.style,animation:F?void 0:"none"}})})})});qR.displayName=e0;var YR="PopperArrow",Y8={top:"bottom",right:"left",bottom:"top",left:"right"},KR=E.forwardRef(function(t,n){const{__scopePopper:a,...o}=t,l=q8(YR,a),u=Y8[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:b.jsx(H8,{...o,ref:n,style:{...o.style,display:"block"}})})});KR.displayName=YR;function K8(e){return e!==null}var W8=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:o}=t,u=o.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[h,g]=WR(n),p={start:"0%",center:"50%",end:"100%"}[g],y=(o.arrow?.x??0)+d/2,_=(o.arrow?.y??0)+f/2;let S="",x="";return h==="bottom"?(S=u?p:`${y}px`,x=`${-f}px`):h==="top"?(S=u?p:`${y}px`,x=`${a.floating.height+f}px`):h==="right"?(S=`${-f}px`,x=u?p:`${_}px`):h==="left"&&(S=`${a.floating.width+f}px`,x=u?p:`${_}px`),{data:{x:S,y:x}}}});function WR(e){const[t,n="center"]=e.split("-");return[t,n]}var ZR=HR,Z8=GR,Q8=qR,X8=KR,jm="rovingFocusGroup.onEntryFocus",J8={bubbles:!1,cancelable:!0},Ic="RovingFocusGroup",[Hg,QR,eP]=RR(Ic),[tP,XR]=No(Ic,[eP]),[nP,rP]=tP(Ic),JR=E.forwardRef((e,t)=>b.jsx(Hg.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(Hg.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(aP,{...e,ref:t})})}));JR.displayName=Ic;var aP=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...p}=e,y=E.useRef(null),_=hn(t,y),S=OR(l),[x,T]=Ac({prop:u,defaultProp:d??null,onChange:f,caller:Ic}),[R,A]=E.useState(!1),C=Xr(h),O=QR(n),M=E.useRef(!1),[L,N]=E.useState(0);return E.useEffect(()=>{const D=y.current;if(D)return D.addEventListener(jm,C),()=>D.removeEventListener(jm,C)},[C]),b.jsx(nP,{scope:n,orientation:a,dir:S,loop:o,currentTabStopId:x,onItemFocus:E.useCallback(D=>T(D),[T]),onItemShiftTab:E.useCallback(()=>A(!0),[]),onFocusableItemAdd:E.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:E.useCallback(()=>N(D=>D-1),[]),children:b.jsx(Bt.div,{tabIndex:R||L===0?-1:0,"data-orientation":a,...p,ref:_,style:{outline:"none",...e.style},onMouseDown:We(e.onMouseDown,()=>{M.current=!0}),onFocus:We(e.onFocus,D=>{const U=!M.current;if(D.target===D.currentTarget&&U&&!R){const Z=new CustomEvent(jm,J8);if(D.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const G=O().filter(P=>P.focusable),W=G.find(P=>P.active),j=G.find(P=>P.id===x),ie=[W,j,...G].filter(Boolean).map(P=>P.ref.current);n2(ie,g)}}M.current=!1}),onBlur:We(e.onBlur,()=>A(!1))})})}),e2="RovingFocusGroupItem",t2=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:l,children:u,...d}=e,f=ji(),h=l||f,g=rP(e2,n),p=g.currentTabStopId===h,y=QR(n),{onFocusableItemAdd:_,onFocusableItemRemove:S,currentTabStopId:x}=g;return E.useEffect(()=>{if(a)return _(),()=>S()},[a,_,S]),b.jsx(Hg.ItemSlot,{scope:n,id:h,focusable:a,active:o,children:b.jsx(Bt.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...d,ref:t,onMouseDown:We(e.onMouseDown,T=>{a?g.onItemFocus(h):T.preventDefault()}),onFocus:We(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:We(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){g.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const R=sP(T,g.orientation,g.dir);if(R!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let C=y().filter(O=>O.focusable).map(O=>O.ref.current);if(R==="last")C.reverse();else if(R==="prev"||R==="next"){R==="prev"&&C.reverse();const O=C.indexOf(T.currentTarget);C=g.loop?lP(C,O+1):C.slice(O+1)}setTimeout(()=>n2(C))}}),children:typeof u=="function"?u({isCurrentTabStop:p,hasTabStop:x!=null}):u})})});t2.displayName=e2;var iP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function sP(e,t,n){const a=oP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return iP[a]}function n2(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function lP(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var cP=JR,uP=t2,$g=["Enter"," "],dP=["ArrowDown","PageUp","Home"],r2=["ArrowUp","PageDown","End"],fP=[...dP,...r2],hP={ltr:[...$g,"ArrowRight"],rtl:[...$g,"ArrowLeft"]},pP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Mc="Menu",[Ec,mP,gP]=RR(Mc),[Do,a2]=No(Mc,[gP,FR,XR]),Nc=FR(),i2=XR(),[o2,$i]=Do(Mc),[vP,Dc]=Do(Mc),s2=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:o,onOpenChange:l,modal:u=!0}=e,d=Nc(t),[f,h]=E.useState(null),g=E.useRef(!1),p=Xr(l),y=OR(o);return E.useEffect(()=>{const _=()=>{g.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>g.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),b.jsx(ZR,{...d,children:b.jsx(o2,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:h,children:b.jsx(vP,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:y,modal:u,children:a})})})};s2.displayName=Mc;var yP="MenuAnchor",t0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=Nc(n);return b.jsx(Z8,{...o,...a,ref:t})});t0.displayName=yP;var n0="MenuPortal",[bP,l2]=Do(n0,{forceMount:void 0}),c2=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:o}=e,l=$i(n0,t);return b.jsx(bP,{scope:t,forceMount:n,children:b.jsx(Qa,{present:n||l.open,children:b.jsx(Vv,{asChild:!0,container:o,children:a})})})};c2.displayName=n0;var jr="MenuContent",[_P,r0]=Do(jr),u2=E.forwardRef((e,t)=>{const n=l2(jr,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,l=$i(jr,e.__scopeMenu),u=Dc(jr,e.__scopeMenu);return b.jsx(Ec.Provider,{scope:e.__scopeMenu,children:b.jsx(Qa,{present:a||l.open,children:b.jsx(Ec.Slot,{scope:e.__scopeMenu,children:u.modal?b.jsx(EP,{...o,ref:t}):b.jsx(SP,{...o,ref:t})})})})}),EP=E.forwardRef((e,t)=>{const n=$i(jr,e.__scopeMenu),a=E.useRef(null),o=hn(t,a);return E.useEffect(()=>{const l=a.current;if(l)return lR(l)},[]),b.jsx(a0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:We(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),SP=E.forwardRef((e,t)=>{const n=$i(jr,e.__scopeMenu);return b.jsx(a0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),xP=yc("MenuContent.ScrollLock"),a0=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,disableOutsideScroll:S,...x}=e,T=$i(jr,n),R=Dc(jr,n),A=Nc(n),C=i2(n),O=mP(n),[M,L]=E.useState(null),N=E.useRef(null),D=hn(t,N,T.onContentChange),U=E.useRef(0),Z=E.useRef(""),G=E.useRef(0),W=E.useRef(null),j=E.useRef("right"),ne=E.useRef(0),ie=S?Hv:E.Fragment,P=S?{as:xP,allowPinchZoom:!0}:void 0,F=re=>{const ve=Z.current+re,k=O().filter(ye=>!ye.disabled),Q=document.activeElement,ee=k.find(ye=>ye.ref.current===Q)?.textValue,oe=k.map(ye=>ye.textValue),pe=PP(oe,ve,ee),be=k.find(ye=>ye.textValue===pe)?.ref.current;(function ye(Se){Z.current=Se,window.clearTimeout(U.current),Se!==""&&(U.current=window.setTimeout(()=>ye(""),1e3))})(ve),be&&setTimeout(()=>be.focus())};E.useEffect(()=>()=>window.clearTimeout(U.current),[]),Jw();const $=E.useCallback(re=>j.current===W.current?.side&&jP(re,W.current?.area),[]);return b.jsx(_P,{scope:n,searchRef:Z,onItemEnter:E.useCallback(re=>{$(re)&&re.preventDefault()},[$]),onItemLeave:E.useCallback(re=>{$(re)||(N.current?.focus(),L(null))},[$]),onTriggerLeave:E.useCallback(re=>{$(re)&&re.preventDefault()},[$]),pointerGraceTimerRef:G,onPointerGraceIntentChange:E.useCallback(re=>{W.current=re},[]),children:b.jsx(ie,{...P,children:b.jsx(Fv,{asChild:!0,trapped:o,onMountAutoFocus:We(l,re=>{re.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:b.jsx(zv,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,children:b.jsx(cP,{asChild:!0,...C,dir:R.dir,orientation:"vertical",loop:a,currentTabStopId:M,onCurrentTabStopIdChange:L,onEntryFocus:We(f,re=>{R.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(Q8,{role:"menu","aria-orientation":"vertical","data-state":T2(T.open),"data-radix-menu-content":"",dir:R.dir,...A,...x,ref:D,style:{outline:"none",...x.style},onKeyDown:We(x.onKeyDown,re=>{const k=re.target.closest("[data-radix-menu-content]")===re.currentTarget,Q=re.ctrlKey||re.altKey||re.metaKey,ee=re.key.length===1;k&&(re.key==="Tab"&&re.preventDefault(),!Q&&ee&&F(re.key));const oe=N.current;if(re.target!==oe||!fP.includes(re.key))return;re.preventDefault();const be=O().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);r2.includes(re.key)&&be.reverse(),DP(be)}),onBlur:We(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(U.current),Z.current="")}),onPointerMove:We(e.onPointerMove,Sc(re=>{const ve=re.target,k=ne.current!==re.clientX;if(re.currentTarget.contains(ve)&&k){const Q=re.clientX>ne.current?"right":"left";j.current=Q,ne.current=re.clientX}}))})})})})})})});u2.displayName=jr;var wP="MenuGroup",i0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(Bt.div,{role:"group",...a,ref:t})});i0.displayName=wP;var RP="MenuLabel",d2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(Bt.div,{...a,ref:t})});d2.displayName=RP;var sf="MenuItem",wS="menu.itemSelect",Mf=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...o}=e,l=E.useRef(null),u=Dc(sf,e.__scopeMenu),d=r0(sf,e.__scopeMenu),f=hn(t,l),h=E.useRef(!1),g=()=>{const p=l.current;if(!n&&p){const y=new CustomEvent(wS,{bubbles:!0,cancelable:!0});p.addEventListener(wS,_=>a?.(_),{once:!0}),Ww(p,y),y.defaultPrevented?h.current=!1:u.onClose()}};return b.jsx(f2,{...o,ref:f,disabled:n,onClick:We(e.onClick,g),onPointerDown:p=>{e.onPointerDown?.(p),h.current=!0},onPointerUp:We(e.onPointerUp,p=>{h.current||p.currentTarget?.click()}),onKeyDown:We(e.onKeyDown,p=>{const y=d.searchRef.current!=="";n||y&&p.key===" "||$g.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Mf.displayName=sf;var f2=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:o,...l}=e,u=r0(sf,n),d=i2(n),f=E.useRef(null),h=hn(t,f),[g,p]=E.useState(!1),[y,_]=E.useState("");return E.useEffect(()=>{const S=f.current;S&&_((S.textContent??"").trim())},[l.children]),b.jsx(Ec.ItemSlot,{scope:n,disabled:a,textValue:o??y,children:b.jsx(uP,{asChild:!0,...d,focusable:!a,children:b.jsx(Bt.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...l,ref:h,onPointerMove:We(e.onPointerMove,Sc(S=>{a?u.onItemLeave(S):(u.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:We(e.onPointerLeave,Sc(S=>u.onItemLeave(S))),onFocus:We(e.onFocus,()=>p(!0)),onBlur:We(e.onBlur,()=>p(!1))})})})}),OP="MenuCheckboxItem",h2=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...o}=e;return b.jsx(y2,{scope:e.__scopeMenu,checked:n,children:b.jsx(Mf,{role:"menuitemcheckbox","aria-checked":lf(n)?"mixed":n,...o,ref:t,"data-state":l0(n),onSelect:We(o.onSelect,()=>a?.(lf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});h2.displayName=OP;var p2="MenuRadioGroup",[TP,AP]=Do(p2,{value:void 0,onValueChange:()=>{}}),m2=E.forwardRef((e,t)=>{const{value:n,onValueChange:a,...o}=e,l=Xr(a);return b.jsx(TP,{scope:e.__scopeMenu,value:n,onValueChange:l,children:b.jsx(i0,{...o,ref:t})})});m2.displayName=p2;var g2="MenuRadioItem",v2=E.forwardRef((e,t)=>{const{value:n,...a}=e,o=AP(g2,e.__scopeMenu),l=n===o.value;return b.jsx(y2,{scope:e.__scopeMenu,checked:l,children:b.jsx(Mf,{role:"menuitemradio","aria-checked":l,...a,ref:t,"data-state":l0(l),onSelect:We(a.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});v2.displayName=g2;var o0="MenuItemIndicator",[y2,CP]=Do(o0,{checked:!1}),b2=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...o}=e,l=CP(o0,n);return b.jsx(Qa,{present:a||lf(l.checked)||l.checked===!0,children:b.jsx(Bt.span,{...o,ref:t,"data-state":l0(l.checked)})})});b2.displayName=o0;var IP="MenuSeparator",_2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(Bt.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});_2.displayName=IP;var MP="MenuArrow",E2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=Nc(n);return b.jsx(X8,{...o,...a,ref:t})});E2.displayName=MP;var s0="MenuSub",[NP,S2]=Do(s0),x2=e=>{const{__scopeMenu:t,children:n,open:a=!1,onOpenChange:o}=e,l=$i(s0,t),u=Nc(t),[d,f]=E.useState(null),[h,g]=E.useState(null),p=Xr(o);return E.useEffect(()=>(l.open===!1&&p(!1),()=>p(!1)),[l.open,p]),b.jsx(ZR,{...u,children:b.jsx(o2,{scope:t,open:a,onOpenChange:p,content:h,onContentChange:g,children:b.jsx(NP,{scope:t,contentId:ji(),triggerId:ji(),trigger:d,onTriggerChange:f,children:n})})})};x2.displayName=s0;var rc="MenuSubTrigger",w2=E.forwardRef((e,t)=>{const n=$i(rc,e.__scopeMenu),a=Dc(rc,e.__scopeMenu),o=S2(rc,e.__scopeMenu),l=r0(rc,e.__scopeMenu),u=E.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,h={__scopeMenu:e.__scopeMenu},g=E.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return E.useEffect(()=>g,[g]),E.useEffect(()=>{const p=d.current;return()=>{window.clearTimeout(p),f(null)}},[d,f]),b.jsx(t0,{asChild:!0,...h,children:b.jsx(f2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":T2(n.open),...e,ref:Tc(t,o.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:We(e.onPointerMove,Sc(p=>{l.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:We(e.onPointerLeave,Sc(p=>{g();const y=n.content?.getBoundingClientRect();if(y){const _=n.content?.dataset.side,S=_==="right",x=S?-5:5,T=y[S?"left":"right"],R=y[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:p.clientX+x,y:p.clientY},{x:T,y:y.top},{x:R,y:y.top},{x:R,y:y.bottom},{x:T,y:y.bottom}],side:_}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(p),p.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:We(e.onKeyDown,p=>{const y=l.searchRef.current!=="";e.disabled||y&&p.key===" "||hP[a.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});w2.displayName=rc;var R2="MenuSubContent",O2=E.forwardRef((e,t)=>{const n=l2(jr,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,l=$i(jr,e.__scopeMenu),u=Dc(jr,e.__scopeMenu),d=S2(R2,e.__scopeMenu),f=E.useRef(null),h=hn(t,f);return b.jsx(Ec.Provider,{scope:e.__scopeMenu,children:b.jsx(Qa,{present:a||l.open,children:b.jsx(Ec.Slot,{scope:e.__scopeMenu,children:b.jsx(a0,{id:d.contentId,"aria-labelledby":d.triggerId,...o,ref:h,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{u.isUsingKeyboardRef.current&&f.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:We(e.onFocusOutside,g=>{g.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:We(e.onEscapeKeyDown,g=>{u.onClose(),g.preventDefault()}),onKeyDown:We(e.onKeyDown,g=>{const p=g.currentTarget.contains(g.target),y=pP[u.dir].includes(g.key);p&&y&&(l.onOpenChange(!1),d.trigger?.focus(),g.preventDefault())})})})})})});O2.displayName=R2;function T2(e){return e?"open":"closed"}function lf(e){return e==="indeterminate"}function l0(e){return lf(e)?"indeterminate":e?"checked":"unchecked"}function DP(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LP(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function PP(e,t,n){const o=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=LP(e,Math.max(l,0));o.length===1&&(u=u.filter(h=>h!==n));const f=u.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function kP(e,t){const{x:n,y:a}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l],f=t[u],h=d.x,g=d.y,p=f.x,y=f.y;g>a!=y>a&&n<(p-h)*(a-g)/(y-g)+h&&(o=!o)}return o}function jP(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return kP(n,t)}function Sc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var UP=s2,BP=t0,zP=c2,FP=u2,VP=i0,HP=d2,$P=Mf,GP=h2,qP=m2,YP=v2,KP=b2,WP=_2,ZP=E2,QP=x2,XP=w2,JP=O2,Nf="DropdownMenu",[e7]=No(Nf,[a2]),kn=a2(),[t7,A2]=e7(Nf),C2=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:o,defaultOpen:l,onOpenChange:u,modal:d=!0}=e,f=kn(t),h=E.useRef(null),[g,p]=Ac({prop:o,defaultProp:l??!1,onChange:u,caller:Nf});return b.jsx(t7,{scope:t,triggerId:ji(),triggerRef:h,contentId:ji(),open:g,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(y=>!y),[p]),modal:d,children:b.jsx(UP,{...f,open:g,onOpenChange:p,dir:a,modal:d,children:n})})};C2.displayName=Nf;var I2="DropdownMenuTrigger",M2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...o}=e,l=A2(I2,n),u=kn(n);return b.jsx(BP,{asChild:!0,...u,children:b.jsx(Bt.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:Tc(t,l.triggerRef),onPointerDown:We(e.onPointerDown,d=>{!a&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:We(e.onKeyDown,d=>{a||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});M2.displayName=I2;var n7="DropdownMenuPortal",N2=e=>{const{__scopeDropdownMenu:t,...n}=e,a=kn(t);return b.jsx(zP,{...a,...n})};N2.displayName=n7;var D2="DropdownMenuContent",L2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=A2(D2,n),l=kn(n),u=E.useRef(!1);return b.jsx(FP,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...a,ref:t,onCloseAutoFocus:We(e.onCloseAutoFocus,d=>{u.current||o.triggerRef.current?.focus(),u.current=!1,d.preventDefault()}),onInteractOutside:We(e.onInteractOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,g=f.button===2||h;(!o.modal||g)&&(u.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)"}})});L2.displayName=D2;var r7="DropdownMenuGroup",a7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(VP,{...o,...a,ref:t})});a7.displayName=r7;var i7="DropdownMenuLabel",o7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(HP,{...o,...a,ref:t})});o7.displayName=i7;var s7="DropdownMenuItem",P2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx($P,{...o,...a,ref:t})});P2.displayName=s7;var l7="DropdownMenuCheckboxItem",c7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(GP,{...o,...a,ref:t})});c7.displayName=l7;var u7="DropdownMenuRadioGroup",d7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(qP,{...o,...a,ref:t})});d7.displayName=u7;var f7="DropdownMenuRadioItem",h7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(YP,{...o,...a,ref:t})});h7.displayName=f7;var p7="DropdownMenuItemIndicator",m7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(KP,{...o,...a,ref:t})});m7.displayName=p7;var g7="DropdownMenuSeparator",k2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(WP,{...o,...a,ref:t})});k2.displayName=g7;var v7="DropdownMenuArrow",y7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(ZP,{...o,...a,ref:t})});y7.displayName=v7;var b7=e=>{const{__scopeDropdownMenu:t,children:n,open:a,onOpenChange:o,defaultOpen:l}=e,u=kn(t),[d,f]=Ac({prop:a,defaultProp:l??!1,onChange:o,caller:"DropdownMenuSub"});return b.jsx(QP,{...u,open:d,onOpenChange:f,children:n})},_7="DropdownMenuSubTrigger",j2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(XP,{...o,...a,ref:t})});j2.displayName=_7;var E7="DropdownMenuSubContent",U2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=kn(n);return b.jsx(JP,{...o,...a,ref:t,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)"}})});U2.displayName=E7;var S7=C2,x7=M2,w7=N2,R7=L2,O7=P2,iz=k2,oz=b7,sz=j2,lz=U2,T7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lc=T7.reduce((e,t)=>{const n=zw(`Primitive.${t}`),a=E.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),A7="Label",B2=E.forwardRef((e,t)=>b.jsx(Lc.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));B2.displayName=A7;var C7=B2;function I7(e,t=[]){let n=[];function a(l,u){const d=E.createContext(u);d.displayName=l+"Context";const f=n.length;n=[...n,u];const h=p=>{const{scope:y,children:_,...S}=p,x=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(x.Provider,{value:T,children:_})};h.displayName=l+"Provider";function g(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const o=()=>{const l=n.map(u=>E.createContext(u));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[a,M7(o,...t)]}function M7(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=a.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var N7=jx();function D7(){return N7.useSyncExternalStore(L7,()=>!0,()=>!1)}function L7(){return()=>{}}var c0="Avatar",[P7]=I7(c0),[k7,z2]=P7(c0),F2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...a}=e,[o,l]=E.useState("idle");return b.jsx(k7,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:l,children:b.jsx(Lc.span,{...a,ref:t})})});F2.displayName=c0;var V2="AvatarImage",H2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:o=()=>{},...l}=e,u=z2(V2,n),d=j7(a,l),f=Xr(h=>{o(h),u.onImageLoadingStatusChange(h)});return Qr(()=>{d!=="idle"&&f(d)},[d,f]),d==="loaded"?b.jsx(Lc.img,{...l,ref:t,src:a}):null});H2.displayName=V2;var $2="AvatarFallback",G2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:a,...o}=e,l=z2($2,n),[u,d]=E.useState(a===void 0);return E.useEffect(()=>{if(a!==void 0){const f=window.setTimeout(()=>d(!0),a);return()=>window.clearTimeout(f)}},[a]),u&&l.imageLoadingStatus!=="loaded"?b.jsx(Lc.span,{...o,ref:t}):null});G2.displayName=$2;function RS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function j7(e,{referrerPolicy:t,crossOrigin:n}){const a=D7(),o=E.useRef(null),l=a?(o.current||(o.current=new window.Image),o.current):null,[u,d]=E.useState(()=>RS(l,e));return Qr(()=>{d(RS(l,e))},[l,e]),Qr(()=>{const f=p=>()=>{d(p)};if(!l)return;const h=f("loaded"),g=f("error");return l.addEventListener("load",h),l.addEventListener("error",g),t&&(l.referrerPolicy=t),typeof n=="string"&&(l.crossOrigin=n),()=>{l.removeEventListener("load",h),l.removeEventListener("error",g)}},[l,n,t]),u}var U7=F2,B7=H2,z7=G2;function F7(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function u0(e,t,n=""){const a=F7(e),o=e?.length;if(!a||t!==void 0){const u=n&&`"${n}" `,d="",f=a?`length=${o}`:`type=${typeof e}`;throw new Error(u+"expected Uint8Array"+d+", got "+f)}return e}function OS(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function V7(e,t){u0(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function Gg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Um(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function sa(e,t){return e<<32-t|e>>>t}const H7=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",$7=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function G7(e){if(u0(e),H7)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=$7[e[n]];return t}function q7(e,t={}){const n=(o,l)=>e(l).update(o).digest(),a=e(void 0);return n.outputLen=a.outputLen,n.blockLen=a.blockLen,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}const Y7=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function K7(e,t,n){return e&t^~e&n}function W7(e,t,n){return e&t^e&n^t&n}class Z7{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,a,o){this.blockLen=t,this.outputLen=n,this.padOffset=a,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Um(this.buffer)}update(t){OS(this),u0(t);const{view:n,buffer:a,blockLen:o}=this,l=t.length;for(let u=0;u<l;){const d=Math.min(o-this.pos,l-u);if(d===o){const f=Um(t);for(;o<=l-u;u+=o)this.process(f,u);continue}a.set(t.subarray(u,u+d),this.pos),this.pos+=d,u+=d,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){OS(this),V7(t,this),this.finished=!0;const{buffer:n,view:a,blockLen:o,isLE:l}=this;let{pos:u}=this;n[u++]=128,Gg(this.buffer.subarray(u)),this.padOffset>o-u&&(this.process(a,0),u=0);for(let p=u;p<o;p++)n[p]=0;a.setBigUint64(o-8,BigInt(this.length*8),l),this.process(a,0);const d=Um(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const h=f/4,g=this.get();if(h>g.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<h;p++)d.setUint32(4*p,g[p],l)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const a=t.slice(0,n);return this.destroy(),a}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:a,length:o,finished:l,destroyed:u,pos:d}=this;return t.destroyed=u,t.finished=l,t.length=o,t.pos=d,o%n&&t.buffer.set(a),t}clone(){return this._cloneInto()}}const Ri=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Q7=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Oi=new Uint32Array(64);class X7 extends Z7{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:a,D:o,E:l,F:u,G:d,H:f}=this;return[t,n,a,o,l,u,d,f]}set(t,n,a,o,l,u,d,f){this.A=t|0,this.B=n|0,this.C=a|0,this.D=o|0,this.E=l|0,this.F=u|0,this.G=d|0,this.H=f|0}process(t,n){for(let p=0;p<16;p++,n+=4)Oi[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const y=Oi[p-15],_=Oi[p-2],S=sa(y,7)^sa(y,18)^y>>>3,x=sa(_,17)^sa(_,19)^_>>>10;Oi[p]=x+Oi[p-7]+S+Oi[p-16]|0}let{A:a,B:o,C:l,D:u,E:d,F:f,G:h,H:g}=this;for(let p=0;p<64;p++){const y=sa(d,6)^sa(d,11)^sa(d,25),_=g+y+K7(d,f,h)+Q7[p]+Oi[p]|0,x=(sa(a,2)^sa(a,13)^sa(a,22))+W7(a,o,l)|0;g=h,h=f,f=d,d=u+_|0,u=l,l=o,o=a,a=_+x|0}a=a+this.A|0,o=o+this.B|0,l=l+this.C|0,u=u+this.D|0,d=d+this.E|0,f=f+this.F|0,h=h+this.G|0,g=g+this.H|0,this.set(a,o,l,u,d,f,h,g)}roundClean(){Gg(Oi)}destroy(){this.set(0,0,0,0,0,0,0,0),Gg(this.buffer)}}class J7 extends X7{A=Ri[0]|0;B=Ri[1]|0;C=Ri[2]|0;D=Ri[3]|0;E=Ri[4]|0;F=Ri[5]|0;G=Ri[6]|0;H=Ri[7]|0;constructor(){super(32)}}const ek=q7(()=>new J7,Y7(1));function tk(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Df="Checkbox",[nk]=No(Df),[rk,d0]=nk(Df);function ak(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:o,disabled:l,form:u,name:d,onCheckedChange:f,required:h,value:g="on",internal_do_not_use_render:p}=e,[y,_]=Ac({prop:n,defaultProp:o??!1,onChange:f,caller:Df}),[S,x]=E.useState(null),[T,R]=E.useState(null),A=E.useRef(!1),C=S?!!u||!!S.closest("form"):!0,O={checked:y,disabled:l,setChecked:_,control:S,setControl:x,name:d,form:u,value:g,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:Ui(o)?!1:o,isFormControl:C,bubbleInput:T,setBubbleInput:R};return b.jsx(rk,{scope:t,...O,children:ik(p)?p(O):a})}var q2="CheckboxTrigger",Y2=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},o)=>{const{control:l,value:u,disabled:d,checked:f,required:h,setControl:g,setChecked:p,hasConsumerStoppedPropagationRef:y,isFormControl:_,bubbleInput:S}=d0(q2,e),x=hn(o,g),T=E.useRef(f);return E.useEffect(()=>{const R=l?.form;if(R){const A=()=>p(T.current);return R.addEventListener("reset",A),()=>R.removeEventListener("reset",A)}},[l,p]),b.jsx(Bt.button,{type:"button",role:"checkbox","aria-checked":Ui(f)?"mixed":f,"aria-required":h,"data-state":J2(f),"data-disabled":d?"":void 0,disabled:d,value:u,...a,ref:x,onKeyDown:We(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:We(n,R=>{p(A=>Ui(A)?!0:!A),S&&_&&(y.current=R.isPropagationStopped(),y.current||R.stopPropagation())})})});Y2.displayName=q2;var K2=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:l,required:u,disabled:d,value:f,onCheckedChange:h,form:g,...p}=e;return b.jsx(ak,{__scopeCheckbox:n,checked:o,defaultChecked:l,disabled:d,required:u,onCheckedChange:h,name:a,form:g,value:f,internal_do_not_use_render:({isFormControl:y})=>b.jsxs(b.Fragment,{children:[b.jsx(Y2,{...p,ref:t,__scopeCheckbox:n}),y&&b.jsx(X2,{__scopeCheckbox:n})]})})});K2.displayName=Df;var W2="CheckboxIndicator",Z2=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...o}=e,l=d0(W2,n);return b.jsx(Qa,{present:a||Ui(l.checked)||l.checked===!0,children:b.jsx(Bt.span,{"data-state":J2(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Z2.displayName=W2;var Q2="CheckboxBubbleInput",X2=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:o,checked:l,defaultChecked:u,required:d,disabled:f,name:h,value:g,form:p,bubbleInput:y,setBubbleInput:_}=d0(Q2,e),S=hn(n,_),x=tk(l),T=BR(a);E.useEffect(()=>{const A=y;if(!A)return;const C=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(C,"checked").set,L=!o.current;if(x!==l&&M){const N=new Event("click",{bubbles:L});A.indeterminate=Ui(l),M.call(A,Ui(l)?!1:l),A.dispatchEvent(N)}},[y,x,l,o]);const R=E.useRef(Ui(l)?!1:l);return b.jsx(Bt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??R.current,required:d,disabled:f,name:h,value:g,form:p,...t,tabIndex:-1,ref:S,style:{...t.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});X2.displayName=Q2;function ik(e){return typeof e=="function"}function Ui(e){return e==="indeterminate"}function J2(e){return Ui(e)?"indeterminate":e?"checked":"unchecked"}var eO={OBJECT:"object",UNDEFINED:"undefined"},pd="browser",TS="cpu",AS="device",Bm="engine",md="os",Ci="name",cf="type",qg="vendor",qr="version",Yg="architecture",Kg="major",Wg="model",ok="console",sk="mobile",lk="tablet",ck="smarttv",uk="wearable",dk="embedded",fk=typeof window!==eO.UNDEFINED,zm=fk&&window.navigator?window.navigator:void 0;zm&&zm.userAgentData&&zm.userAgentData;var Lf=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},gd=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==eO.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return gd.call(e.init,[[pd,[Ci,qr,Kg,cf]],[TS,[Yg]],[AS,[cf,Wg,qg]],[Bm,[Ci,qr]],[md,[Ci,qr]]]),gd.call(e.isIgnore,[[pd,[qr,Kg]],[Bm,[qr]],[md,[qr]]]),gd.call(e.isIgnoreRgx,[[pd,/ ?browser$/i],[md,/ ?os$/i]]),gd.call(e.toString,[[pd,[Ci,qr]],[TS,[Yg]],[AS,[qg,Wg]],[Bm,[Ci,qr]],[md,[Ci,qr]]]),e})();Lf([Ci,qr,Kg,cf]);Lf([Yg]);Lf([Wg,qg,cf,ok,sk,ck,lk,uk,dk]);Lf([Ci,qr]);function fa(e){const t=new Uint8Array(e);let n="";for(const o of t)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function uf(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,a=t.padEnd(t.length+n,"="),o=atob(a),l=new ArrayBuffer(o.length),u=new Uint8Array(l);for(let d=0;d<o.length;d++)u[d]=o.charCodeAt(d);return l}function f0(){return hk.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const hk={stubThis:e=>e};function tO(e){const{id:t}=e;return{...e,id:uf(t),transports:e.transports}}function nO(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class yn extends Error{constructor({message:t,code:n,cause:a,name:o}){super(t,{cause:a}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o??a.name,this.code=n}}function pk({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yn({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(n.authenticatorSelection?.requireResidentKey===!0)return new yn({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&n.authenticatorSelection?.userVerification==="required")return new yn({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(n.authenticatorSelection?.userVerification==="required")return new yn({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new yn({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new yn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new yn({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new yn({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(nO(a)){if(n.rp.id!==a)return new yn({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yn({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new yn({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new yn({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}class mk{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const rO=new mk,gk=["cross-platform","platform"];function aO(e){if(e&&!(gk.indexOf(e)<0))return e}async function vk(e){!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useAutoRegister:n=!1}=e;if(!f0())throw new Error("WebAuthn is not supported in this browser");const a={...t,challenge:uf(t.challenge),user:{...t.user,id:uf(t.user.id)},excludeCredentials:t.excludeCredentials?.map(tO)},o={};n&&(o.mediation="conditional"),o.publicKey=a,o.signal=rO.createNewAbortSignal();let l;try{l=await navigator.credentials.create(o)}catch(S){throw pk({error:S,options:o})}if(!l)throw new Error("Registration was not completed");const{id:u,rawId:d,response:f,type:h}=l;let g;typeof f.getTransports=="function"&&(g=f.getTransports());let p;if(typeof f.getPublicKeyAlgorithm=="function")try{p=f.getPublicKeyAlgorithm()}catch(S){Fm("getPublicKeyAlgorithm()",S)}let y;if(typeof f.getPublicKey=="function")try{const S=f.getPublicKey();S!==null&&(y=fa(S))}catch(S){Fm("getPublicKey()",S)}let _;if(typeof f.getAuthenticatorData=="function")try{_=fa(f.getAuthenticatorData())}catch(S){Fm("getAuthenticatorData()",S)}return{id:u,rawId:fa(d),response:{attestationObject:fa(f.attestationObject),clientDataJSON:fa(f.clientDataJSON),transports:g,publicKeyAlgorithm:p,publicKey:y,authenticatorData:_},type:h,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:aO(l.authenticatorAttachment)}}function Fm(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
68
- `,t)}function yk(){if(!f0())return Vm.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Vm.stubThis(new Promise(t=>t(!1))):Vm.stubThis(e.isConditionalMediationAvailable())}const Vm={stubThis:e=>e};function bk({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yn({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new yn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(nO(a)){if(n.rpId!==a)return new yn({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yn({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new yn({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}async function _k(e){!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:a=!0}=e;if(!f0())throw new Error("WebAuthn is not supported in this browser");let o;t.allowCredentials?.length!==0&&(o=t.allowCredentials?.map(tO));const l={...t,challenge:uf(t.challenge),allowCredentials:o},u={};if(n){if(!await yk())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&a)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');u.mediation="conditional",l.allowCredentials=[]}u.publicKey=l,u.signal=rO.createNewAbortSignal();let d;try{d=await navigator.credentials.get(u)}catch(_){throw bk({error:_,options:u})}if(!d)throw new Error("Authentication was not completed");const{id:f,rawId:h,response:g,type:p}=d;let y;return g.userHandle&&(y=fa(g.userHandle)),{id:f,rawId:fa(h),response:{authenticatorData:fa(g.authenticatorData),clientDataJSON:fa(g.clientDataJSON),signature:fa(g.signature),userHandle:y},type:p,clientExtensionResults:d.getClientExtensionResults(),authenticatorAttachment:aO(d.authenticatorAttachment)}}const Ek=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(l,u)=>{const d=await e("/passkey/generate-authenticate-options",{method:"GET",throw:!1});if(!d.data)return d;try{const f=await e("/passkey/verify-authentication",{body:{response:await _k({optionsJSON:d.data,useBrowserAutofill:l?.autoFill})},...l?.fetchOptions,...u,method:"POST",throw:!1});return t.set(Math.random()),n.notify("$sessionSignal"),f}catch{return{data:null,error:{code:"AUTH_CANCELLED",message:"auth cancelled",status:400,statusText:"BAD_REQUEST"}}}}},passkey:{addPasskey:async(l,u)=>{const d=await e("/passkey/generate-register-options",{method:"GET",query:{...l?.authenticatorAttachment&&{authenticatorAttachment:l.authenticatorAttachment},...l?.name&&{name:l.name}},throw:!1});if(!d.data)return d;try{const f=await vk({optionsJSON:d.data,useAutoRegister:l?.useAutoRegister}),h=await e("/passkey/verify-registration",{...l?.fetchOptions,...u,body:{response:f,name:l?.name},method:"POST",throw:!1});return h.data&&t.set(Math.random()),h}catch(f){return f instanceof yn?f.code==="ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED"?{data:null,error:{code:f.code,message:"previously registered",status:400,statusText:"BAD_REQUEST"}}:f.code==="ERROR_CEREMONY_ABORTED"?{data:null,error:{code:f.code,message:"registration cancelled",status:400,statusText:"BAD_REQUEST"}}:{data:null,error:{code:f.code,message:f.message,status:400,statusText:"BAD_REQUEST"}}:{data:null,error:{code:"UNKNOWN_ERROR",message:f instanceof Error?f.message:"unknown error",status:500,statusText:"INTERNAL_SERVER_ERROR"}}}}},$Infer:{}}),Sk=()=>{const e=mo();return{id:"passkey",$InferServerPlugin:{},getActions:(t,n)=>Ek(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:Ns(e,"/passkey/list-user-passkeys",t,{method:"GET"}),$listPasskeys:e}},pathMethods:{"/passkey/register":"POST","/passkey/authenticate":"POST"},atomListeners:[{matcher(t){return t==="/passkey/verify-registration"||t==="/passkey/delete-passkey"||t==="/passkey/update-passkey"||t==="/sign-out"},signal:"$listPasskeys"},{matcher:t=>t==="/passkey/verify-authentication",signal:"$sessionSignal"}]}};function xk(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const iO=V.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Pc=()=>{const e=V.useContext(iO);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};xk(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
69
- [data-state=closed]
70
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function wk(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Rk(){return h0(/^Mac/)}function Ok(){return h0(/^iPhone/)}function CS(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Tk(){return h0(/^iPad/)||Rk()&&navigator.maxTouchPoints>1}function oO(){return Ok()||Tk()}function h0(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const Ak=24,Ck=typeof window<"u"?E.useLayoutEffect:E.useEffect;function IS(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Hm=typeof document<"u"&&window.visualViewport;function MS(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function sO(e){for(MS(e)&&(e=e.parentElement);e&&!MS(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Ik=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vd=0,$m;function Mk(e={}){let{isDisabled:t}=e;Ck(()=>{if(!t)return vd++,vd===1&&oO()&&($m=Nk()),()=>{vd--,vd===0&&$m?.()}},[t])}function Nk(){let e,t=0,n=p=>{e=sO(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},a=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let y=p.changedTouches[0].pageY,_=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((_<=0&&y>t||_>=S&&y<t)&&p.preventDefault(),t=y)},o=p=>{let y=p.target;Zg(y)&&y!==document.activeElement&&(p.preventDefault(),y.style.transform="translateY(-2000px)",y.focus(),requestAnimationFrame(()=>{y.style.transform=""}))},l=p=>{let y=p.target;Zg(y)&&(y.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{y.style.transform="",Hm&&(Hm.height<window.innerHeight?requestAnimationFrame(()=>{NS(y)}):Hm.addEventListener("resize",()=>NS(y),{once:!0}))}))},u=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset,h=IS(Dk(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let g=IS(Zl(document,"touchstart",n,{passive:!1,capture:!0}),Zl(document,"touchmove",a,{passive:!1,capture:!0}),Zl(document,"touchend",o,{passive:!1,capture:!0}),Zl(document,"focus",l,!0),Zl(window,"scroll",u));return()=>{h(),g(),window.scrollTo(d,f)}}function Dk(e,t,n){let a=e.style[t];return e.style[t]=n,()=>{e.style[t]=a}}function Zl(e,t,n,a){return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}function NS(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=sO(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let a=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const u=n.getBoundingClientRect().bottom+Ak;l>u&&(n.scrollTop+=o-a)}e=n.parentElement}}function Zg(e){return e instanceof HTMLInputElement&&!Ik.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Lk(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Pk(...e){return t=>e.forEach(n=>Lk(n,t))}function lO(...e){return E.useCallback(Pk(...e),e)}const cO=new WeakMap;function dn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let a={};Object.entries(t).forEach(([o,l])=>{if(o.startsWith("--")){e.style.setProperty(o,l);return}a[o]=e.style[o],e.style[o]=l}),!n&&cO.set(e,a)}function kk(e,t){if(!e||!(e instanceof HTMLElement))return;let n=cO.get(e);n&&(e.style[t]=n[t])}const nn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function yd(e,t){if(!e)return null;const n=window.getComputedStyle(e),a=n.transform||n.webkitTransform||n.mozTransform;let o=a.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[nn(t)?13:12]):(o=a.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[nn(t)?5:4]):null)}function jk(e){return 8*(Math.log(e+1)-2)}function Gm(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Uk(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const jt={DURATION:.5,EASE:[.32,.72,0,1]},uO=.4,Bk=.25,zk=100,dO=8,uo=16,Qg=26,qm="vaul-dragging";function fO(e){const t=V.useRef(e);return V.useEffect(()=>{t.current=e}),V.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Fk({defaultProp:e,onChange:t}){const n=V.useState(e),[a]=n,o=V.useRef(a),l=fO(t);return V.useEffect(()=>{o.current!==a&&(l(a),o.current=a)},[a,o,l]),n}function hO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,o]=Fk({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:a,d=fO(n),f=V.useCallback(h=>{if(l){const p=typeof h=="function"?h(e):h;p!==e&&d(p)}else o(h)},[l,e,o,d]);return[u,f]}function Vk({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:a,overlayRef:o,fadeFromIndex:l,onSnapPointChange:u,direction:d="bottom",container:f,snapToSequentialPoint:h}){const[g,p]=hO({prop:e,defaultProp:n?.[0],onChange:t}),[y,_]=V.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);V.useEffect(()=>{function N(){_({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const S=V.useMemo(()=>g===n?.[n.length-1]||null,[n,g]),x=V.useMemo(()=>{var N;return(N=n?.findIndex(D=>D===g))!=null?N:null},[n,g]),T=n&&n.length>0&&(l||l===0)&&!Number.isNaN(l)&&n[l]===g||!n,R=V.useMemo(()=>{const N=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var D;return(D=n?.map(U=>{const Z=typeof U=="string";let G=0;if(Z&&(G=parseInt(U,10)),nn(d)){const j=Z?G:y?U*N.height:0;return y?d==="bottom"?N.height-j:-N.height+j:j}const W=Z?G:y?U*N.width:0;return y?d==="right"?N.width-W:-N.width+W:W}))!=null?D:[]},[n,y,f]),A=V.useMemo(()=>x!==null?R?.[x]:null,[R,x]),C=V.useCallback(N=>{var D;const U=(D=R?.findIndex(Z=>Z===N))!=null?D:null;u(U),dn(a.current,{transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,transform:nn(d)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`}),R&&U!==R.length-1&&l!==void 0&&U!==l&&U<l?dn(o.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,opacity:"0"}):dn(o.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max(U,0)])},[a.current,n,R,l,o,p]);V.useEffect(()=>{if(g||e){var N;const D=(N=n?.findIndex(U=>U===e||U===g))!=null?N:-1;R&&D!==-1&&typeof R[D]=="number"&&C(R[D])}},[g,e,n,R,C]);function O({draggedDistance:N,closeDrawer:D,velocity:U,dismissible:Z}){if(l===void 0)return;const G=d==="bottom"||d==="right"?(A??0)-N:(A??0)+N,W=x===l-1,j=x===0,ne=N>0;if(W&&dn(o.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`}),!h&&U>2&&!ne){Z?D():C(R[0]);return}if(!h&&U>2&&ne&&R&&n){C(R[n.length-1]);return}const ie=R?.reduce((F,$)=>typeof F!="number"||typeof $!="number"?F:Math.abs($-G)<Math.abs(F-G)?$:F),P=nn(d)?window.innerHeight:window.innerWidth;if(U>uO&&Math.abs(N)<P*.4){const F=ne?1:-1;if(F>0&&S&&n){C(R[n.length-1]);return}if(j&&F<0&&Z&&D(),x===null)return;C(R[x+F]);return}C(ie)}function M({draggedDistance:N}){if(A===null)return;const D=d==="bottom"||d==="right"?A-N:A+N;(d==="bottom"||d==="right")&&D<R[R.length-1]||(d==="top"||d==="left")&&D>R[R.length-1]||dn(a.current,{transform:nn(d)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function L(N,D){if(!n||typeof x!="number"||!R||l===void 0)return null;const U=x===l-1;if(x>=l&&D)return 0;if(U&&!D)return 1;if(!T&&!U)return null;const G=U?x+1:x-1,W=U?R[G]-R[G-1]:R[G+1]-R[G],j=N/Math.abs(W);return U?1-j:j}return{isLastSnapPoint:S,activeSnapPoint:g,shouldFade:T,getPercentageDragged:L,setActiveSnapPoint:p,activeSnapPointIndex:x,onRelease:O,onDrag:M,snapPointsOffset:R}}const Hk=()=>()=>{};function $k(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:a,noBodyStyles:o}=Pc(),l=V.useRef(null),u=E.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-Qg)/window.innerWidth}V.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);const f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;Uk(a&&!o?Gm(document.body,{background:"black"}):Hk,Gm(f,{transformOrigin:nn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${jt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${jt.EASE.join(",")})`}));const h=Gm(f,{borderRadius:`${dO}px`,overflow:"hidden",...nn(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),l.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},jt.DURATION*1e3)}}},[t,n,u])}let Ql=null;function Gk({isOpen:e,modal:t,nested:n,hasBeenOpened:a,preventScrollRestoration:o,noBodyStyles:l}){const[u,d]=V.useState(()=>typeof window<"u"?window.location.href:""),f=V.useRef(0),h=V.useCallback(()=>{if(CS()&&Ql===null&&e&&!l){Ql={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:y}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const _=y-window.innerHeight;_&&f.current>=y&&(document.body.style.top=`${-(f.current+_)}px`)}),300)}},[e]),g=V.useCallback(()=>{if(CS()&&Ql!==null&&!l){const p=-parseInt(document.body.style.top,10),y=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Ql),window.requestAnimationFrame(()=>{if(o&&u!==window.location.href){d(window.location.href);return}window.scrollTo(y,p)}),Ql=null}},[u]);return V.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),V.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||g()}},[t,g]),V.useEffect(()=>{n||!a||(e?(!window.matchMedia("(display-mode: standalone)").matches&&h(),t||window.setTimeout(()=>{g()},500)):g())},[e,a,u,t,n,h,g]),{restorePositionSetting:g}}function qk({open:e,onOpenChange:t,children:n,onDrag:a,onRelease:o,snapPoints:l,shouldScaleBackground:u=!1,setBackgroundColorOnScale:d=!0,closeThreshold:f=Bk,scrollLockTimeout:h=zk,dismissible:g=!0,handleOnly:p=!1,fadeFromIndex:y=l&&l.length-1,activeSnapPoint:_,setActiveSnapPoint:S,fixed:x,modal:T=!0,onClose:R,nested:A,noBodyStyles:C=!1,direction:O="bottom",defaultOpen:M=!1,disablePreventScroll:L=!0,snapToSequentialPoint:N=!1,preventScrollRestoration:D=!1,repositionInputs:U=!0,onAnimationEnd:Z,container:G,autoFocus:W=!1}){var j,ne;const[ie=!1,P]=hO({defaultProp:M,prop:e,onChange:Me=>{t?.(Me),!Me&&!A&&we(),setTimeout(()=>{Z?.(Me)},jt.DURATION*1e3),Me&&!T&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Me||(document.body.style.pointerEvents="auto")}}),[F,$]=V.useState(!1),[re,ve]=V.useState(!1),[k,Q]=V.useState(!1),ee=V.useRef(null),oe=V.useRef(null),pe=V.useRef(null),be=V.useRef(null),ye=V.useRef(null),Se=V.useRef(!1),Pe=V.useRef(null),ke=V.useRef(0),Ee=V.useRef(!1),ze=V.useRef(!M),Pt=V.useRef(0),ge=V.useRef(null),me=V.useRef(((j=ge.current)==null?void 0:j.getBoundingClientRect().height)||0),Re=V.useRef(((ne=ge.current)==null?void 0:ne.getBoundingClientRect().width)||0),Ue=V.useRef(0),it=V.useCallback(Me=>{l&&Me===Y.length-1&&(oe.current=new Date)},[]),{activeSnapPoint:Fe,activeSnapPointIndex:tt,setActiveSnapPoint:B,onRelease:q,snapPointsOffset:Y,onDrag:ce,shouldFade:he,getPercentageDragged:fe}=Vk({snapPoints:l,activeSnapPointProp:_,setActiveSnapPointProp:S,drawerRef:ge,fadeFromIndex:y,overlayRef:ee,onSnapPointChange:it,direction:O,container:G,snapToSequentialPoint:N});Mk({isDisabled:!ie||re||!T||k||!F||!U||!L});const{restorePositionSetting:we}=Gk({isOpen:ie,modal:T,nested:A??!1,hasBeenOpened:F,preventScrollRestoration:D,noBodyStyles:C});function He(){return(window.innerWidth-Qg)/window.innerWidth}function nt(Me){var ot,dt;!g&&!l||ge.current&&!ge.current.contains(Me.target)||(me.current=((ot=ge.current)==null?void 0:ot.getBoundingClientRect().height)||0,Re.current=((dt=ge.current)==null?void 0:dt.getBoundingClientRect().width)||0,ve(!0),pe.current=new Date,oO()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),Me.target.setPointerCapture(Me.pointerId),ke.current=nn(O)?Me.pageY:Me.pageX)}function Tt(Me,ot){var dt;let Qe=Me;const ft=(dt=window.getSelection())==null?void 0:dt.toString(),Ne=ge.current?yd(ge.current,O):null,Xe=new Date;if(Qe.tagName==="SELECT"||Qe.hasAttribute("data-vaul-no-drag")||Qe.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(oe.current&&Xe.getTime()-oe.current.getTime()<500)return!1;if(Ne!==null&&(O==="bottom"?Ne>0:Ne<0))return!0;if(ft&&ft.length>0)return!1;if(ye.current&&Xe.getTime()-ye.current.getTime()<h&&Ne===0||ot)return ye.current=Xe,!1;for(;Qe;){if(Qe.scrollHeight>Qe.clientHeight){if(Qe.scrollTop!==0)return ye.current=new Date,!1;if(Qe.getAttribute("role")==="dialog")return!0}Qe=Qe.parentNode}return!0}function nr(Me){if(ge.current&&re){const ot=O==="bottom"||O==="right"?1:-1,dt=(ke.current-(nn(O)?Me.pageY:Me.pageX))*ot,Qe=dt>0,ft=l&&!g&&!Qe;if(ft&&tt===0)return;const Ne=Math.abs(dt),Xe=document.querySelector("[data-vaul-drawer-wrapper]"),At=O==="bottom"||O==="top"?me.current:Re.current;let St=Ne/At;const Mn=fe(Ne,Qe);if(Mn!==null&&(St=Mn),ft&&St>=1||!Se.current&&!Tt(Me.target,Qe))return;if(ge.current.classList.add(qm),Se.current=!0,dn(ge.current,{transition:"none"}),dn(ee.current,{transition:"none"}),l&&ce({draggedDistance:dt}),Qe&&!l){const Nt=jk(dt),_r=Math.min(Nt*-1,0)*ot;dn(ge.current,{transform:nn(O)?`translate3d(0, ${_r}px, 0)`:`translate3d(${_r}px, 0, 0)`});return}const ht=1-St;if((he||y&&tt===y-1)&&(a?.(Me,St),dn(ee.current,{opacity:`${ht}`,transition:"none"},!0)),Xe&&ee.current&&u){const Nt=Math.min(He()+St*(1-He()),1),_r=8-St*8,Sn=Math.max(0,14-St*14);dn(Xe,{borderRadius:`${_r}px`,transform:nn(O)?`scale(${Nt}) translate3d(0, ${Sn}px, 0)`:`scale(${Nt}) translate3d(${Sn}px, 0, 0)`,transition:"none"},!0)}if(!l){const Nt=Ne*ot;dn(ge.current,{transform:nn(O)?`translate3d(0, ${Nt}px, 0)`:`translate3d(${Nt}px, 0, 0)`})}}}V.useEffect(()=>{window.requestAnimationFrame(()=>{ze.current=!0})},[]),V.useEffect(()=>{var Me;function ot(){if(!ge.current||!U)return;const dt=document.activeElement;if(Zg(dt)||Ee.current){var Qe;const ft=((Qe=window.visualViewport)==null?void 0:Qe.height)||0,Ne=window.innerHeight;let Xe=Ne-ft;const At=ge.current.getBoundingClientRect().height||0,St=At>Ne*.8;Ue.current||(Ue.current=At);const Mn=ge.current.getBoundingClientRect().top;if(Math.abs(Pt.current-Xe)>60&&(Ee.current=!Ee.current),l&&l.length>0&&Y&&tt){const ht=Y[tt]||0;Xe+=ht}if(Pt.current=Xe,At>ft||Ee.current){const ht=ge.current.getBoundingClientRect().height;let Nt=ht;ht>ft&&(Nt=ft-(St?Mn:Qg)),x?ge.current.style.height=`${ht-Math.max(Xe,0)}px`:ge.current.style.height=`${Math.max(Nt,ft-Mn)}px`}else wk()||(ge.current.style.height=`${Ue.current}px`);l&&l.length>0&&!Ee.current?ge.current.style.bottom="0px":ge.current.style.bottom=`${Math.max(Xe,0)}px`}}return(Me=window.visualViewport)==null||Me.addEventListener("resize",ot),()=>{var dt;return(dt=window.visualViewport)==null?void 0:dt.removeEventListener("resize",ot)}},[tt,l,Y]);function It(Me){Mt(),R?.(),Me||P(!1),setTimeout(()=>{l&&B(l[0])},jt.DURATION*1e3)}function Kt(){if(!ge.current)return;const Me=document.querySelector("[data-vaul-drawer-wrapper]"),ot=yd(ge.current,O);dn(ge.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`}),dn(ee.current,{transition:`opacity ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,opacity:"1"}),u&&ot&&ot>0&&ie&&dn(Me,{borderRadius:`${dO}px`,overflow:"hidden",...nn(O)?{transform:`scale(${He()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${He()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${jt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${jt.EASE.join(",")})`},!0)}function Mt(){!re||!ge.current||(ge.current.classList.remove(qm),Se.current=!1,ve(!1),be.current=new Date)}function sn(Me){if(!re||!ge.current)return;ge.current.classList.remove(qm),Se.current=!1,ve(!1),be.current=new Date;const ot=yd(ge.current,O);if(!Me||!Tt(Me.target,!1)||!ot||Number.isNaN(ot)||pe.current===null)return;const dt=be.current.getTime()-pe.current.getTime(),Qe=ke.current-(nn(O)?Me.pageY:Me.pageX),ft=Math.abs(Qe)/dt;if(ft>.05&&(Q(!0),setTimeout(()=>{Q(!1)},200)),l){q({draggedDistance:Qe*(O==="bottom"||O==="right"?1:-1),closeDrawer:It,velocity:ft,dismissible:g}),o?.(Me,!0);return}if(O==="bottom"||O==="right"?Qe>0:Qe<0){Kt(),o?.(Me,!0);return}if(ft>uO){It(),o?.(Me,!1);return}var Ne;const Xe=Math.min((Ne=ge.current.getBoundingClientRect().height)!=null?Ne:0,window.innerHeight);var At;const St=Math.min((At=ge.current.getBoundingClientRect().width)!=null?At:0,window.innerWidth),Mn=O==="left"||O==="right";if(Math.abs(ot)>=(Mn?St:Xe)*f){It(),o?.(Me,!1);return}o?.(Me,!0),Kt()}V.useEffect(()=>(ie&&(dn(document.documentElement,{scrollBehavior:"auto"}),oe.current=new Date),()=>{kk(document.documentElement,"scrollBehavior")}),[ie]);function Wt(Me){const ot=Me?(window.innerWidth-uo)/window.innerWidth:1,dt=Me?-uo:0;Pe.current&&window.clearTimeout(Pe.current),dn(ge.current,{transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,transform:nn(O)?`scale(${ot}) translate3d(0, ${dt}px, 0)`:`scale(${ot}) translate3d(${dt}px, 0, 0)`}),!Me&&ge.current&&(Pe.current=setTimeout(()=>{const Qe=yd(ge.current,O);dn(ge.current,{transition:"none",transform:nn(O)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`})},500))}function Xa(Me,ot){if(ot<0)return;const dt=(window.innerWidth-uo)/window.innerWidth,Qe=dt+ot*(1-dt),ft=-uo+ot*uo;dn(ge.current,{transform:nn(O)?`scale(${Qe}) translate3d(0, ${ft}px, 0)`:`scale(${Qe}) translate3d(${ft}px, 0, 0)`,transition:"none"})}function Ra(Me,ot){const dt=nn(O)?window.innerHeight:window.innerWidth,Qe=ot?(dt-uo)/dt:1,ft=ot?-uo:0;ot&&dn(ge.current,{transition:`transform ${jt.DURATION}s cubic-bezier(${jt.EASE.join(",")})`,transform:nn(O)?`scale(${Qe}) translate3d(0, ${ft}px, 0)`:`scale(${Qe}) translate3d(${ft}px, 0, 0)`})}return V.useEffect(()=>{T||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[T]),V.createElement(RL,{defaultOpen:M,onOpenChange:Me=>{!g&&!Me||(Me?$(!0):It(!0),P(Me))},open:ie},V.createElement(iO.Provider,{value:{activeSnapPoint:Fe,snapPoints:l,setActiveSnapPoint:B,drawerRef:ge,overlayRef:ee,onOpenChange:t,onPress:nt,onRelease:sn,onDrag:nr,dismissible:g,shouldAnimate:ze,handleOnly:p,isOpen:ie,isDragging:re,shouldFade:he,closeDrawer:It,onNestedDrag:Xa,onNestedOpenChange:Wt,onNestedRelease:Ra,keyboardIsOpen:Ee,modal:T,snapPointsOffset:Y,activeSnapPointIndex:tt,direction:O,shouldScaleBackground:u,setBackgroundColorOnScale:d,noBodyStyles:C,container:G,autoFocus:W}},n))}const pO=V.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:a,onRelease:o,shouldFade:l,isOpen:u,modal:d,shouldAnimate:f}=Pc(),h=lO(t,n),g=a&&a.length>0;if(!d)return null;const p=V.useCallback(y=>o(y),[o]);return V.createElement(AL,{onMouseUp:p,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":u&&g?"true":"false","data-vaul-snap-points-overlay":u&&l?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});pO.displayName="Drawer.Overlay";const mO=V.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...a},o){const{drawerRef:l,onPress:u,onRelease:d,onDrag:f,keyboardIsOpen:h,snapPointsOffset:g,activeSnapPointIndex:p,modal:y,isOpen:_,direction:S,snapPoints:x,container:T,handleOnly:R,shouldAnimate:A,autoFocus:C}=Pc(),[O,M]=V.useState(!1),L=lO(o,l),N=V.useRef(null),D=V.useRef(null),U=V.useRef(!1),Z=x&&x.length>0;$k();const G=(j,ne,ie=0)=>{if(U.current)return!0;const P=Math.abs(j.y),F=Math.abs(j.x),$=F>P,re=["bottom","right"].includes(ne)?1:-1;if(ne==="left"||ne==="right"){if(!(j.x*re<0)&&F>=0&&F<=ie)return $}else if(!(j.y*re<0)&&P>=0&&P<=ie)return!$;return U.current=!0,!0};V.useEffect(()=>{Z&&window.requestAnimationFrame(()=>{M(!0)})},[]);function W(j){N.current=null,U.current=!1,d(j)}return V.createElement(CL,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":_&&Z?"true":"false","data-vaul-custom-container":T?"true":"false","data-vaul-animate":A?.current?"true":"false",...a,ref:L,style:g&&g.length>0?{"--snap-point-height":`${g[p??0]}px`,...t}:t,onPointerDown:j=>{R||(a.onPointerDown==null||a.onPointerDown.call(a,j),N.current={x:j.pageX,y:j.pageY},u(j))},onOpenAutoFocus:j=>{n?.(j),C||j.preventDefault()},onPointerDownOutside:j=>{if(e?.(j),!y||j.defaultPrevented){j.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:j=>{if(!y){j.preventDefault();return}},onPointerMove:j=>{if(D.current=j,R||(a.onPointerMove==null||a.onPointerMove.call(a,j),!N.current))return;const ne=j.pageY-N.current.y,ie=j.pageX-N.current.x,P=j.pointerType==="touch"?10:2;G({x:ie,y:ne},S,P)?f(j):(Math.abs(ie)>P||Math.abs(ne)>P)&&(N.current=null)},onPointerUp:j=>{a.onPointerUp==null||a.onPointerUp.call(a,j),N.current=null,U.current=!1,d(j)},onPointerOut:j=>{a.onPointerOut==null||a.onPointerOut.call(a,j),W(D.current)},onContextMenu:j=>{a.onContextMenu==null||a.onContextMenu.call(a,j),D.current&&W(D.current)}})});mO.displayName="Drawer.Content";const Yk=250,Kk=120,Wk=V.forwardRef(function({preventCycle:e=!1,children:t,...n},a){const{closeDrawer:o,isDragging:l,snapPoints:u,activeSnapPoint:d,setActiveSnapPoint:f,dismissible:h,handleOnly:g,isOpen:p,onPress:y,onDrag:_}=Pc(),S=V.useRef(null),x=V.useRef(!1);function T(){if(x.current){C();return}window.setTimeout(()=>{R()},Kk)}function R(){if(l||e||x.current){C();return}if(C(),!u||u.length===0){h||o();return}if(d===u[u.length-1]&&h){o();return}const M=u.findIndex(N=>N===d);if(M===-1)return;const L=u[M+1];f(L)}function A(){S.current=window.setTimeout(()=>{x.current=!0},Yk)}function C(){S.current&&window.clearTimeout(S.current),x.current=!1}return V.createElement("div",{onClick:T,onPointerCancel:C,onPointerDown:O=>{g&&y(O),A()},onPointerMove:O=>{g&&_(O)},ref:a,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},V.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Wk.displayName="Drawer.Handle";function Zk(e){const t=Pc(),{container:n=t.container,...a}=e;return V.createElement(TL,{container:n,...a})}const cz={Root:qk,Content:mO,Overlay:pO,Trigger:OL,Portal:Zk,Title:IL};var js=(e,t,n)=>new Promise((a,o)=>{var l=f=>{try{d(n.next(f))}catch(h){o(h)}},u=f=>{try{d(n.throw(f))}catch(h){o(h)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(l,u);d((n=n.apply(e,t)).next())}),Id=class extends Error{},Qk=class extends Error{},Xk=e=>Math.exp(e)*150,Jk=(e,...t)=>js(void 0,[e,...t],function*(n,{attempts:a=4}={}){var o;let l;for(let u=0;u<a;u++)try{return yield n()}catch(d){l=d,yield new Promise(f=>setTimeout(f,Xk(u)))}throw new Id((o=l?.message)!=null?o:"Exhausted all retries")}),Xl,gO="captchaFoxOnLoad",DS=`https://cdn.captchafox.com/api.js?render=explicit&onload=${gO}`;function ej(){return js(this,arguments,function*({nonce:e}={}){return Xl&&document.querySelector(`script[src="${DS}"]`)||(Xl=new Promise((t,n)=>{window[gO]=t;const a=document.createElement("script");a.src=DS,a.async=!0,a.defer=!0,a.onerror=o=>{a.remove(),Xl=void 0,n(o)},e&&(a.nonce=e),document.body.appendChild(a)})),Xl})}function tj(){return js(this,arguments,function*(e={}){return Jk(()=>ej(e))})}var Rs=()=>typeof window?.captchafox<"u",vO=E.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:a,theme:o,className:l,nonce:u,i18n:d,onError:f,onVerify:h,onLoad:g,onFail:p,onClose:y,onChallengeChange:_,onChallengeOpen:S},x)=>{const[T,R]=E.useState(),[A,C]=E.useState(),O=E.useRef(!1),M=E.useRef(),L=E.useRef(),N=E.useRef(),D=E.useRef(!1);E.useImperativeHandle(x,()=>({getResponse(){return!Rs()||!A?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(A)},reset(){if(!Rs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(A)},remove(){if(!Rs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(A)},execute:()=>js(void 0,null,function*(){if(D.current)return Promise.reject(new Id);if(!Rs()||!A)return Z();try{return yield window.captchafox.execute(A)}catch(j){const ne=G(j);return Promise.reject(ne)}})}),[A]),E.useEffect(()=>{A&&g?.()},[A]),E.useEffect(()=>()=>{U()},[]),E.useEffect(()=>{T&&(O.current?Rs()&&W():tj({nonce:u}).then(()=>js(void 0,null,function*(){Rs()&&(O.current=!0,yield W())})).catch(j=>{var ne;f?.(j),D.current=!0,(ne=N.current)==null||ne.call(N),console.error("[CaptchaFox] Could not load script:",j)}))},[T,t,n,a]);const U=()=>{clearTimeout(L.current)},Z=()=>new Promise((j,ne)=>{N.current=()=>{U(),ne(new Id)},L.current=setTimeout(()=>{ne(new Qk("Execute timed out"))},e*1e3),M.current=ie=>{U(),window.captchafox.execute(ie).then(j).catch(P=>{const F=G(P);ne(F)})}}),G=j=>j!=="challenge-aborted"&&j!=="rate-limited"?new Id:j,W=()=>js(void 0,null,function*(){var j,ne,ie;if((j=window.captchafox)==null||j.remove(A),!T||((ne=T?.children)==null?void 0:ne.length)===1)return;const P=yield(ie=window.captchafox)==null?void 0:ie.render(T,{lang:n,sitekey:t,mode:a,theme:o,i18n:d,onError:f,onFail:p,onClose:y,onVerify:h,onChallengeChange:_,onChallengeOpen:S});P&&(C(P),M.current&&(M.current(P),M.current=void 0))});return V.createElement("div",{ref:R,id:A,className:l})});vO.displayName="CaptchaFox";function Nr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xg(e,t){return Xg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xg(e,t)}function nj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xg(e,t)}var rj=Object.defineProperty,aj=Object.defineProperties,ij=Object.getOwnPropertyDescriptors,df=Object.getOwnPropertySymbols,yO=Object.prototype.hasOwnProperty,bO=Object.prototype.propertyIsEnumerable,Jg=(e,t,n)=>t in e?rj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dr=(e,t)=>{for(var n in t||(t={}))yO.call(t,n)&&Jg(e,n,t[n]);if(df)for(var n of df(t))bO.call(t,n)&&Jg(e,n,t[n]);return e},_O=(e,t)=>aj(e,ij(t)),oj=(e,t)=>{var n={};for(var a in e)yO.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&df)for(var a of df(e))t.indexOf(a)<0&&bO.call(e,a)&&(n[a]=e[a]);return n},bn=(e,t,n)=>(Jg(e,typeof t!="symbol"?t+"":t,n),n),Gs=(e,t,n)=>new Promise((a,o)=>{var l=f=>{try{d(n.next(f))}catch(h){o(h)}},u=f=>{try{d(n.throw(f))}catch(h){o(h)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(l,u);d((n=n.apply(e,t)).next())}),sj="hCaptcha-script",Md="hCaptchaOnLoad",LS="script-error",Ii="@hCaptcha/loader";function lj(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function EO(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function SO(e){return e||document.head}function cj(e){var t;e.setTag("source",Ii),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",dr({},uj())),e.setContext("device",_O(dr({},fj()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function uj(){var e,t,n,a,o,l;let u=navigator.userAgent,d,f;return u.indexOf("Firefox")!==-1?(d="Firefox",f=(e=u.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):u.indexOf("Edg")!==-1?(d="Microsoft Edge",f=(t=u.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):u.indexOf("Chrome")!==-1&&u.indexOf("Safari")!==-1?(d="Chrome",f=(n=u.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):u.indexOf("Safari")!==-1&&u.indexOf("Chrome")===-1?(d="Safari",f=(a=u.match(/Version\/([\d.]+)/))==null?void 0:a[1]):u.indexOf("Opera")!==-1||u.indexOf("OPR")!==-1?(d="Opera",f=(o=u.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:o[2]):u.indexOf("MSIE")!==-1||u.indexOf("Trident")!==-1?(d="Internet Explorer",f=(l=u.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:l[2]):(d="Unknown",f="Unknown"),{name:d,version:f}}function dj(e){return new Promise(t=>setTimeout(t,e))}function fj(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var hj=class xO{constructor(t){bn(this,"_parent"),bn(this,"breadcrumbs",[]),bn(this,"context",{}),bn(this,"extra",{}),bn(this,"tags",{}),bn(this,"request"),bn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new xO(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=dr(dr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((a,o)=>{var l;return a.breadcrumbs=[...(l=a.breadcrumbs)!=null?l:[],...o.breadcrumbs],a.extra=dr(dr({},a.extra),o.extra),a.contexts=dr(dr({},a.contexts),o.context),a.tags=dr(dr({},a.tags),o.tags),o.user&&(a.user=o.user),o.request&&(a.request=o.request),a},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},pj=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,mj=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,gj=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,vj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,bd="?",PS="An unknown error occurred",yj="0.0.4";function bj(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function Dn(e){return(e+256).toString(16).substring(1)}function _j(){let e=bj(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Dn(e[0])+Dn(e[1])+Dn(e[2])+Dn(e[3])+"-"+Dn(e[4])+Dn(e[5])+"-"+Dn(e[6])+Dn(e[7])+"-"+Dn(e[8])+Dn(e[9])+"-"+Dn(e[10])+Dn(e[11])+Dn(e[12])+Dn(e[13])+Dn(e[14])+Dn(e[15])}var Ej=[[pj,"chrome"],[gj,"winjs"],[mj,"gecko"]];function Sj(e){var t,n,a,o;if(!e.stack)return null;let l=[],u=(a=(n=(t=e.stack).split)==null?void 0:n.call(t,`
71
- `))!=null?a:[];for(let d=0;d<u.length;++d){let f=null,h=null,g=null;for(let[p,y]of Ej)if(h=p.exec(u[d]),h){g=y;break}if(!(!h||!g)){if(g==="chrome")f={filename:(o=h[2])!=null&&o.startsWith("address at ")?h[2].substring(11):h[2],function:h[1]||bd,lineno:h[3]?+h[3]:null,colno:h[4]?+h[4]:null};else if(g==="winjs")f={filename:h[2],function:h[1]||bd,lineno:+h[3],colno:h[4]?+h[4]:null};else if(g==="gecko")d===0&&!h[5]&&e.columnNumber!==void 0&&l.length>0&&(l[0].column=e.columnNumber+1),f={filename:h[3],function:h[1]||bd,lineno:h[4]?+h[4]:null,colno:h[5]?+h[5]:null};else continue;!f.function&&f.lineno&&(f.function=bd),l.push(f)}}return l.length?l.reverse():null}function xj(e){let t=Sj(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function wj(e){let t=vj.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let a=n[5].split("/"),o=a.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(o?"/"+o:"")+"/api/"+a.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function Rj(e,t,n){var a,o;let l=dr({event_id:_j().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:yj},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){l.message=(o=(a=e.error)==null?void 0:a.message)!=null?o:"Unknown error",l.fingerprint=[l.message];let u=[],d=e.error;for(let f=0;f<5&&d&&(u.push(xj(d)),!(!d.cause||!(d.cause instanceof Error)));f++)d=d.cause;l.exception={values:u.reverse()}}return e.type==="message"&&(l.message=e.message,l.level=e.level),l}function Oj(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:a}=n,o=oj(n,["message"]),l=new Error(typeof a=="string"?a:PS);return Object.assign(l,o)}let t=new Error(PS);return Object.assign(t,{cause:e})}function Tj(e,t,n){return Gs(this,null,function*(){var a,o;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let l;if(n){let f=new AbortController;l=f.signal,setTimeout(()=>f.abort(),n)}let u=yield fetch(e,_O(dr({},t),{signal:l})),d=yield u.text();return{status:u.status,body:d}}return yield new Promise((l,u)=>{var d,f;let h=new XMLHttpRequest;if(h.open((d=t?.method)!=null?d:"GET",e),h.onload=()=>l({status:h.status,body:h.responseText}),h.onerror=()=>u(new Error("XHR Network Error")),t?.headers)for(let[g,p]of Object.entries(t.headers))h.setRequestHeader(g,p);if(n){let g=setTimeout(()=>{h.abort(),u(new Error("Request timed out"))},n);h.onloadend=()=>{clearTimeout(g)}}h.send((f=t?.body)==null?void 0:f.toString())})}catch(l){return{status:0,body:(o=(a=l?.toString)==null?void 0:a.call(l))!=null?o:"Unknown error"}}})}var Wn,ev=(Wn=class{constructor(e){bn(this,"apiURL"),bn(this,"dsn"),bn(this,"environment"),bn(this,"release"),bn(this,"sampleRate"),bn(this,"debug"),bn(this,"_scope"),bn(this,"shouldBuffer",!1),bn(this,"bufferlimit",20),bn(this,"buffer",[]);var t,n,a,o,l;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(a=e.scope)!=null?a:new hj,this.apiURL=wj(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(o=e.buffer)!=null?o:!1,this.bufferlimit=(l=e.bufferLimit)!=null?l:20}static init(e){Wn._instance||(Wn._instance=new Wn(e))}static get instance(){if(!Wn._instance)throw new Error("Sentry has not been initialized");return Wn._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Wn.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Wn.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:Oj(e),scope:t??this._scope})}static captureException(e,t){Wn.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Wn.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return Gs(this,null,function*(){try{this.log("Sending sentry event",e);let n=Rj(e,this.environment,this.release),a={event_id:n.event_id,dsn:this.dsn},o={type:"event"},l=JSON.stringify(a)+`
72
- `+JSON.stringify(o)+`
73
- `+JSON.stringify(n),u=yield Tj(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:l},t);this.log("Sentry response",u.status),u.status!==200&&(console.log(u.body),console.error("Failed to send event to Sentry",u))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return Gs(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Wn.instance.flush(e)}static reset(){Wn._instance=void 0}},bn(Wn,"_instance"),Wn),Aj="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",Cj="2.3.0",Ij="production";function Mj(e=!0){if(!e)return kS();ev.init({dsn:Aj,release:Cj,environment:Ij});let t=ev.scope;return cj(t),kS(t)}function kS(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&ev.captureException(t,e)}}}function Nj({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:a="anonymous",apihost:o="https://js.hcaptcha.com",cleanup:l=!1,secureApi:u=!1,scriptSource:d=""}={},f){let h=SO(e),g=EO(h);return new Promise((p,y)=>{let _=g.document.createElement("script");_.id=sj,d?_.src=`${d}?onload=${Md}`:u?_.src=`${o}/1/secure-api.js?onload=${Md}`:_.src=`${o}/1/api.js?onload=${Md}`,_.crossOrigin=a,_.async=n;let S=(x,T)=>{try{!u&&l&&h.removeChild(_),T(x)}catch(R){y(R)}};_.onload=x=>S(x,p),_.onerror=x=>{f&&f(_.src),S(x,y)},_.src+=t!==""?`&${t}`:"",h.appendChild(_)})}var _d=[];function Dj(e={cleanup:!1},t){try{t.addBreadcrumb({category:Ii,message:"hCaptcha loader params",data:e});let n=SO(e.scriptLocation),a=EO(n),o=_d.find(({scope:u})=>u===a.window);if(o)return t.addBreadcrumb({category:Ii,message:"hCaptcha already loaded"}),o.promise;let l=new Promise((u,d)=>Gs(this,null,function*(){try{a.window[Md]=()=>{t.addBreadcrumb({category:Ii,message:"hCaptcha script called onload function"}),u(a.window.hcaptcha)};let f=lj({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield Nj(dr({query:f},e),h=>{t.captureRequest({url:h,method:"GET"})}),t.addBreadcrumb({category:Ii,message:"hCaptcha loaded",data:o})}catch{t.addBreadcrumb({category:Ii,message:"hCaptcha failed to load"});let h=_d.findIndex(g=>g.scope===a.window);h!==-1&&_d.splice(h,1),d(new Error(LS))}}));return _d.push({promise:l,scope:a.window}),l}catch(n){return t.captureException(n),Promise.reject(new Error(LS))}}function wO(e,t,n=0){return Gs(this,null,function*(){var a,o;let l=(a=e.maxRetries)!=null?a:2,u=(o=e.retryDelay)!=null?o:1e3,d=n<l?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield Dj(e,t)}catch(f){return t.addBreadcrumb({category:Ii,message:d}),n>=l?(t.captureException(f),Promise.reject(f)):(t.addBreadcrumb({category:Ii,message:`Waiting ${u}ms before retry attempt ${n+1}`}),yield dj(u),n+=1,wO(e,t,n))}})}function Lj(){return Gs(this,arguments,function*(e={}){let t=Mj(e.sentry);return yield wO(e,t)})}function jS(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function US(e){return e||document.head}var Pj=(function(e){nj(t,e);function t(a){var o;return o=e.call(this,a)||this,o._hcaptcha=void 0,o.renderCaptcha=o.renderCaptcha.bind(Nr(o)),o.resetCaptcha=o.resetCaptcha.bind(Nr(o)),o.removeCaptcha=o.removeCaptcha.bind(Nr(o)),o.isReady=o.isReady.bind(Nr(o)),o._onReady=null,o.loadCaptcha=o.loadCaptcha.bind(Nr(o)),o.handleOnLoad=o.handleOnLoad.bind(Nr(o)),o.handleSubmit=o.handleSubmit.bind(Nr(o)),o.handleExpire=o.handleExpire.bind(Nr(o)),o.handleError=o.handleError.bind(Nr(o)),o.handleOpen=o.handleOpen.bind(Nr(o)),o.handleClose=o.handleClose.bind(Nr(o)),o.handleChallengeExpired=o.handleChallengeExpired.bind(Nr(o)),o.ref=E.createRef(),o.apiScriptRequested=!1,o.sentryHub=null,o.captchaId="",o._pendingExecute=null,o.state={isApiReady:!1,isRemoved:!1,elementId:a.id},o}var n=t.prototype;return n.componentDidMount=function(){var o=this,l=US(this.props.scriptLocation),u=jS(l);this._hcaptcha=u.window.hcaptcha||void 0;var d=typeof this._hcaptcha<"u";if(d){this.setState({isApiReady:!0},function(){o.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var o=this._hcaptcha,l=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(o.reset(l),o.remove(l))},n.shouldComponentUpdate=function(o,l){return!(this.state.isApiReady!==l.isApiReady||this.state.isRemoved!==l.isRemoved)},n.componentDidUpdate=function(o){var l=this,u=["sitekey","size","theme","tabindex","languageOverride","endpoint"],d=u.every(function(f){return o[f]===l.props[f]});d||this.removeCaptcha(function(){l.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var o=this.props,l=o.apihost,u=o.assethost,d=o.endpoint,f=o.host,h=o.imghost,g=o.languageOverride,p=o.reCaptchaCompat,y=o.reportapi,_=o.sentry,S=o.custom,x=o.loadAsync,T=o.scriptLocation,R=o.scriptSource,A=o.secureApi,C=o.cleanup,O=C===void 0?!0:C,M=o.userJourneys,L={render:"explicit",apihost:l,assethost:u,endpoint:d,hl:g,host:f,imghost:h,recaptchacompat:p===!1?"off":null,reportapi:y,sentry:_,custom:S,loadAsync:x,scriptLocation:T,scriptSource:R,secureApi:A,cleanup:O,uj:M!==void 0?M:!1};Lj(L).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(o){var l=this,u=this.props.onReady,d=this.state.isApiReady,f=this.captchaId;if(!(!d||f)){var h=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),g=this._hcaptcha,p=g.render(this.ref.current,h);this.captchaId=p,this.setState({isRemoved:!1},function(){o&&o(),u&&u(),l._onReady&&l._onReady(p)})}},n.resetCaptcha=function(){var o=this._hcaptcha,l=this.captchaId;this.isReady()&&(o.reset(l),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(o){var l=this,u=this._hcaptcha,d=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){l.captchaId="",u.remove(d),o&&o()})},n.handleOnLoad=function(){var o=this;this.setState({isApiReady:!0},function(){var l=US(o.props.scriptLocation),u=jS(l);o._hcaptcha=u.window.hcaptcha,o.renderCaptcha(function(){var d=o.props.onLoad;d&&d()})})},n.handleSubmit=function(o){var l=this.props.onVerify,u=this.state.isRemoved,d=this._hcaptcha,f=this.captchaId;if(!(typeof d>"u"||u)){var h=d.getResponse(f),g=d.getRespKey(f);l&&l(h,g)}},n.handleExpire=function(){var o=this.props.onExpire,l=this._hcaptcha,u=this.captchaId;this.isReady()&&(l.reset(u),o&&o())},n.handleError=function(o){var l=this.props.onError,u=this._hcaptcha,d=this.captchaId;this.isReady()&&u.reset(d),l&&l(o)},n.isReady=function(){var o=this.state,l=o.isApiReady,u=o.isRemoved;return l&&!u},n._cancelPendingExecute=function(o){if(this._pendingExecute){var l=this._pendingExecute;this._pendingExecute=null;var u=new Error(o);l.reject(u)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(o){var l=this;o===void 0&&(o=null),o=typeof o=="object"?o:null;try{var u=this._hcaptcha,d=this.captchaId;if(o&&o.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return o&&o.async?new Promise(function(h,g){l._pendingExecute={resolve:h,reject:g},l._onReady=function(p){if(l._pendingExecute)try{var y=u.execute(p,o);y&&typeof y.then=="function"?y.then(function(_){l._pendingExecute=null,h(_)}).catch(function(_){l._pendingExecute=null,g(_)}):(l._pendingExecute=null,g(new Error("hcaptcha-execute-no-promise")))}catch(_){l._pendingExecute=null,g(_)}}}):(this._onReady=function(h){u.execute(h,o)},null);var f=u.execute(d,o);return o&&o.async&&f&&typeof f.then=="function"?new Promise(function(h,g){l._pendingExecute={resolve:h,reject:g},f.then(function(p){l._pendingExecute=null,h(p)}).catch(function(p){l._pendingExecute=null,g(p)})}):f}catch(h){return o&&o.async?Promise.reject(h):null}},n.close=function(){var o=this._hcaptcha,l=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return o.close(l)},n.setData=function(o){var l=this._hcaptcha,u=this.captchaId;this.isReady()&&(o&&typeof o!="object"&&(o=null),l.setData(u,o))},n.getResponse=function(){var o=this._hcaptcha;return o.getResponse(this.captchaId)},n.getRespKey=function(){var o=this._hcaptcha;return o.getRespKey(this.captchaId)},n.render=function(){var o=this.state.elementId;return E.createElement("div",{ref:this.ref,id:o})},t})(E.Component),kj=({as:e="div",...t},n)=>b.jsx(e,{...t,ref:n}),jj=E.forwardRef(kj),Uj="https://challenges.cloudflare.com/turnstile/v0/api.js",p0="cf-turnstile-script",Bj="cf-turnstile",m0="onloadTurnstileCallback",RO=e=>!!document.getElementById(e),zj=({render:e="explicit",onLoadCallbackName:t=m0,scriptOptions:{nonce:n="",defer:a=!0,async:o=!0,id:l="",appendTo:u,onError:d,crossOrigin:f=""}={}})=>{let h=l||p0;if(RO(h))return;let g=document.createElement("script");g.id=h,g.src=`${Uj}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${g.src}"]`)&&(g.defer=!!a,g.async=!!o,n&&(g.nonce=n),f&&(g.crossOrigin=f),d&&(g.onerror=d,delete window[t]),(u==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(g))},fo={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function Fj(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function Vj(e=p0){let[t,n]=E.useState(!1);return E.useEffect(()=>{let a=()=>{RO(e)&&n(!0)},o=new MutationObserver(a);return o.observe(document,{childList:!0,subtree:!0}),a(),()=>{o.disconnect()}},[e]),t}var uc="unloaded",OO,Hj=new Promise((e,t)=>{OO={resolve:e,reject:t},uc==="ready"&&e(void 0)}),BS=(e=m0)=>(uc==="unloaded"&&(uc="loading",window[e]=()=>{OO.resolve(),uc="ready",delete window[e]}),Hj),TO=E.forwardRef((e,t)=>{let{scriptOptions:n,options:a={},siteKey:o,onWidgetLoad:l,onSuccess:u,onExpire:d,onError:f,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y,onLoadScript:_,id:S,style:x,as:T="div",injectScript:R=!0,rerenderOnCallbackChange:A=!1,...C}=e,O=a.size,M=E.useCallback(()=>typeof O>"u"?{}:a.execution==="execute"?fo.invisible:a.appearance==="interaction-only"?fo.interactionOnly:fo[O],[a.execution,O,a.appearance]),[L,N]=E.useState(M()),D=E.useRef(null),[U,Z]=E.useState(!1),G=E.useRef(void 0),W=E.useRef(!1),j=S||Bj,ne=E.useRef({onSuccess:u,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y});E.useEffect(()=>{A||(ne.current={onSuccess:u,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y})});let ie=n?.id||p0,P=Vj(ie),F=n?.onLoadCallbackName||m0,$=a.appearance||"always",re=E.useMemo(()=>({sitekey:o,action:a.action,cData:a.cData,theme:a.theme||"auto",language:a.language||"auto",tabindex:a.tabIndex,"response-field":a.responseField,"response-field-name":a.responseFieldName,size:Fj(O),retry:a.retry||"auto","retry-interval":a.retryInterval||8e3,"refresh-expired":a.refreshExpired||"auto","refresh-timeout":a.refreshTimeout||"auto",execution:a.execution||"render",appearance:a.appearance||"always","feedback-enabled":a.feedbackEnabled||!0,callback:k=>{W.current=!0,A?u?.(k):ne.current.onSuccess?.(k)},"error-callback":A?f:(...k)=>ne.current.onError?.(...k),"expired-callback":A?d:(...k)=>ne.current.onExpire?.(...k),"before-interactive-callback":A?h:(...k)=>ne.current.onBeforeInteractive?.(...k),"after-interactive-callback":A?g:(...k)=>ne.current.onAfterInteractive?.(...k),"unsupported-callback":A?p:(...k)=>ne.current.onUnsupported?.(...k),"timeout-callback":A?y:(...k)=>ne.current.onTimeout?.(...k)}),[a.action,a.appearance,a.cData,a.execution,a.language,a.refreshExpired,a.responseField,a.responseFieldName,a.retry,a.retryInterval,a.tabIndex,a.theme,a.feedbackEnabled,a.refreshTimeout,o,O,A,A?u:null,A?f:null,A?d:null,A?h:null,A?g:null,A?p:null,A?y:null]),ve=E.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return E.useEffect(function(){R&&!U&&(BS(F),zj({onLoadCallbackName:F,scriptOptions:{...n,id:ie}}))},[R,U,n,ie,F]),E.useEffect(function(){uc!=="ready"&&BS(F).then(()=>Z(!0)).catch(console.error)},[F]),E.useEffect(function(){if(!D.current||!U)return;let k=!1;return(async()=>{if(k||!D.current)return;let Q=window.turnstile.render(D.current,re);G.current=Q,G.current&&l?.(G.current)})(),()=>{k=!0,G.current&&(window.turnstile.remove(G.current),W.current=!1)}},[j,U,re]),E.useImperativeHandle(t,()=>{let{turnstile:k}=window;return{getResponse(){if(!k?.getResponse||!G.current||!ve()){console.warn("Turnstile has not been loaded");return}return k.getResponse(G.current)},async getResponsePromise(Q=3e4,ee=100){return new Promise((oe,pe)=>{let be,ye=async()=>{if(W.current&&window.turnstile&&G.current)try{let Se=window.turnstile.getResponse(G.current);return be&&clearTimeout(be),Se?oe(Se):pe(new Error("No response received"))}catch(Se){return be&&clearTimeout(be),console.warn("Failed to get response",Se),pe(new Error("Failed to get response"))}be||(be=setTimeout(()=>{be&&clearTimeout(be),pe(new Error("Timeout"))},Q)),await new Promise(Se=>setTimeout(Se,ee)),await ye()};ye()})},reset(){if(!k?.reset||!G.current||!ve()){console.warn("Turnstile has not been loaded");return}a.execution==="execute"&&N(fo.invisible);try{W.current=!1,k.reset(G.current)}catch(Q){console.warn(`Failed to reset Turnstile widget ${G}`,Q)}},remove(){if(!k?.remove||!G.current||!ve()){console.warn("Turnstile has not been loaded");return}N(fo.invisible),W.current=!1,k.remove(G.current),G.current=null},render(){if(!k?.render||!D.current||!ve()||G.current){console.warn("Turnstile has not been loaded or container not found");return}let Q=k.render(D.current,re);return G.current=Q,G.current&&l?.(G.current),a.execution!=="execute"&&N(O?fo[O]:{}),Q},execute(){if(a.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!k?.execute||!D.current||!G.current||!ve()){console.warn("Turnstile has not been loaded or container not found");return}k.execute(D.current,re),N(O?fo[O]:{})},isExpired(){return!k?.isExpired||!G.current||!ve()?(console.warn("Turnstile has not been loaded"),!1):k.isExpired(G.current)}}},[G,a.execution,O,re,D,ve,U,l]),E.useEffect(()=>{if(U||!P)return;if(window.turnstile){Z(!0);return}let k=setInterval(()=>{window.turnstile&&(Z(!0),clearInterval(k))},50);return()=>{clearInterval(k)}},[U,P]),E.useEffect(()=>{N(M())},[a.execution,O,$]),E.useEffect(()=>{!P||typeof _!="function"||_()},[P]),b.jsx(jj,{ref:D,as:T,id:j,style:{...L,...x},...C})});TO.displayName="Turnstile";var Ym={exports:{}},Km,zS;function $j(){if(zS)return Km;zS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Km=e,Km}var Wm,FS;function Gj(){if(FS)return Wm;FS=1;var e=$j();function t(){}function n(){}return n.resetWarningCache=t,Wm=function(){function a(u,d,f,h,g,p){if(p!==e){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}a.isRequired=a;function o(){return a}var l={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},Wm}var VS;function g0(){return VS||(VS=1,Ym.exports=Gj()()),Ym.exports}var qj=g0();const Zn=Io(qj);var Yj=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function tv(){return tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},tv.apply(this,arguments)}function Kj(e,t){if(e==null)return{};var n={},a=Object.keys(e),o,l;for(l=0;l<a.length;l++)o=a[l],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ed(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nv(e,t)}function nv(e,t){return nv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,o){return a.__proto__=o,a},nv(e,t)}var Pf=(function(e){Wj(t,e);function t(){var a;return a=e.call(this)||this,a.handleExpired=a.handleExpired.bind(Ed(a)),a.handleErrored=a.handleErrored.bind(Ed(a)),a.handleChange=a.handleChange.bind(Ed(a)),a.handleRecaptchaRef=a.handleRecaptchaRef.bind(Ed(a)),a}var n=t.prototype;return n.getCaptchaFunction=function(o){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[o]:this.props.grecaptcha[o]:null},n.getValue=function(){var o=this.getCaptchaFunction("getResponse");return o&&this._widgetId!==void 0?o(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var o=this.getCaptchaFunction("execute");if(o&&this._widgetId!==void 0)return o(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var o=this;return new Promise(function(l,u){o.executionResolve=l,o.executionReject=u,o.execute()})},n.reset=function(){var o=this.getCaptchaFunction("reset");o&&this._widgetId!==void 0&&o(this._widgetId)},n.forceReset=function(){var o=this.getCaptchaFunction("reset");o&&o()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(o){this.props.onChange&&this.props.onChange(o),this.executionResolve&&(this.executionResolve(o),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var o=this.getCaptchaFunction("render");if(o&&this._widgetId===void 0){var l=document.createElement("div");this._widgetId=o(l,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(l)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(o){this.captcha=o},n.render=function(){var o=this.props;o.sitekey,o.onChange,o.theme,o.type,o.tabindex,o.onExpired,o.onErrored,o.size,o.stoken,o.grecaptcha,o.badge,o.hl,o.isolated;var l=Kj(o,Yj);return E.createElement("div",tv({},l,{ref:this.handleRecaptchaRef}))},t})(E.Component);Pf.displayName="ReCAPTCHA";Pf.propTypes={sitekey:Zn.string.isRequired,onChange:Zn.func,grecaptcha:Zn.object,theme:Zn.oneOf(["dark","light"]),type:Zn.oneOf(["image","audio"]),tabindex:Zn.number,onExpired:Zn.func,onErrored:Zn.func,size:Zn.oneOf(["compact","normal","invisible"]),stoken:Zn.string,hl:Zn.string,badge:Zn.oneOf(["bottomright","bottomleft","inline"]),isolated:Zn.bool};Pf.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Zm={exports:{}},yt={};var HS;function Zj(){if(HS)return yt;HS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function C(M){if(typeof M=="object"&&M!==null){var L=M.$$typeof;switch(L){case t:switch(M=M.type,M){case f:case h:case a:case l:case o:case p:return M;default:switch(M=M&&M.$$typeof,M){case d:case g:case S:case _:case u:return M;default:return L}}case n:return L}}}function O(M){return C(M)===h}return yt.AsyncMode=f,yt.ConcurrentMode=h,yt.ContextConsumer=d,yt.ContextProvider=u,yt.Element=t,yt.ForwardRef=g,yt.Fragment=a,yt.Lazy=S,yt.Memo=_,yt.Portal=n,yt.Profiler=l,yt.StrictMode=o,yt.Suspense=p,yt.isAsyncMode=function(M){return O(M)||C(M)===f},yt.isConcurrentMode=O,yt.isContextConsumer=function(M){return C(M)===d},yt.isContextProvider=function(M){return C(M)===u},yt.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},yt.isForwardRef=function(M){return C(M)===g},yt.isFragment=function(M){return C(M)===a},yt.isLazy=function(M){return C(M)===S},yt.isMemo=function(M){return C(M)===_},yt.isPortal=function(M){return C(M)===n},yt.isProfiler=function(M){return C(M)===l},yt.isStrictMode=function(M){return C(M)===o},yt.isSuspense=function(M){return C(M)===p},yt.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===a||M===h||M===l||M===o||M===p||M===y||typeof M=="object"&&M!==null&&(M.$$typeof===S||M.$$typeof===_||M.$$typeof===u||M.$$typeof===d||M.$$typeof===g||M.$$typeof===T||M.$$typeof===R||M.$$typeof===A||M.$$typeof===x)},yt.typeOf=C,yt}var $S;function Qj(){return $S||($S=1,Zm.exports=Zj()),Zm.exports}var Qm,GS;function Xj(){if(GS)return Qm;GS=1;var e=Qj(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=a,l[e.Memo]=o;function u(S){return e.isMemo(S)?o:l[S.$$typeof]||t}var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;function _(S,x,T){if(typeof x!="string"){if(y){var R=p(x);R&&R!==y&&_(S,R,T)}var A=f(x);h&&(A=A.concat(h(x)));for(var C=u(S),O=u(x),M=0;M<A.length;++M){var L=A[M];if(!n[L]&&!(T&&T[L])&&!(O&&O[L])&&!(C&&C[L])){var N=g(x,L);try{d(S,L,N)}catch{}}}}return S}return Qm=_,Qm}var Jj=Xj();const e9=Io(Jj);function rv(){return rv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},rv.apply(this,arguments)}function t9(e,t){if(e==null)return{};var n={},a=Object.keys(e),o,l;for(l=0;l<a.length;l++)o=a[l],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function n9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Gr={},r9=0;function a9(e,t){return t=t||{},function(a){var o=a.displayName||a.name||"Component",l=(function(d){n9(f,d);function f(g,p){var y;return y=d.call(this,g,p)||this,y.state={},y.__scriptURL="",y}var h=f.prototype;return h.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+r9++),this.__scriptLoaderID},h.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},h.asyncScriptLoaderHandleLoad=function(p){var y=this;this.setState(p,function(){return y.props.asyncScriptOnLoad&&y.props.asyncScriptOnLoad(y.state)})},h.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Gr[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var y in p.observers)p.observers[y](p);delete window[t.callbackName]},h.componentDidMount=function(){var p=this,y=this.setupScriptURL(),_=this.asyncScriptLoaderGetScriptLoaderID(),S=t,x=S.globalName,T=S.callbackName,R=S.scriptId;if(x&&typeof window[x]<"u"&&(Gr[y]={loaded:!0,observers:{}}),Gr[y]){var A=Gr[y];if(A&&(A.loaded||A.errored)){this.asyncScriptLoaderHandleLoad(A);return}A.observers[_]=function(N){return p.asyncScriptLoaderHandleLoad(N)};return}var C={};C[_]=function(N){return p.asyncScriptLoaderHandleLoad(N)},Gr[y]={loaded:!1,observers:C};var O=document.createElement("script");O.src=y,O.async=!0;for(var M in t.attributes)O.setAttribute(M,t.attributes[M]);R&&(O.id=R);var L=function(D){if(Gr[y]){var U=Gr[y],Z=U.observers;for(var G in Z)D(Z[G])&&delete Z[G]}};T&&typeof window<"u"&&(window[T]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var N=Gr[y];N&&(N.loaded=!0,L(function(D){return T?!1:(D(N),!0)}))},O.onerror=function(){var N=Gr[y];N&&(N.errored=!0,L(function(D){return D(N),!0}))},document.body.appendChild(O)},h.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var y=document.getElementsByTagName("script"),_=0;_<y.length;_+=1)y[_].src.indexOf(p)>-1&&y[_].parentNode&&y[_].parentNode.removeChild(y[_]);var S=Gr[p];S&&(delete S.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Gr[p])},h.render=function(){var p=t.globalName,y=this.props;y.asyncScriptOnLoad;var _=y.forwardedRef,S=t9(y,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(S[p]=typeof window[p]<"u"?window[p]:void 0),S.ref=_,E.createElement(a,S)},f})(E.Component),u=E.forwardRef(function(d,f){return E.createElement(l,rv({},d,{forwardedRef:f}))});return u.displayName="AsyncScriptLoader("+o+")",u.propTypes={asyncScriptOnLoad:Zn.func},e9(u,a)}}var av="onloadcallback",i9="grecaptcha";function iv(){return typeof window<"u"&&window.recaptchaOptions||{}}function o9(){var e=iv(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+av+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+av+"&render=explicit"}const s9=a9(o9,{callbackName:av,globalName:i9,attributes:iv().nonce?{nonce:iv().nonce}:{}})(Pf);var l9=Object.defineProperty,c9=Object.defineProperties,u9=Object.getOwnPropertyDescriptors,ff=Object.getOwnPropertySymbols,AO=Object.prototype.hasOwnProperty,CO=Object.prototype.propertyIsEnumerable,qS=(e,t,n)=>t in e?l9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d9=(e,t)=>{for(var n in t||(t={}))AO.call(t,n)&&qS(e,n,t[n]);if(ff)for(var n of ff(t))CO.call(t,n)&&qS(e,n,t[n]);return e},f9=(e,t)=>c9(e,u9(t)),h9=(e,t)=>{var n={};for(var a in e)AO.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&ff)for(var a of ff(e))t.indexOf(a)<0&&CO.call(e,a)&&(n[a]=e[a]);return n};function p9(e){let t=setTimeout(e,0),n=setTimeout(e,10),a=setTimeout(e,50);return[t,n,a]}function m9(e){let t=E.useRef();return E.useEffect(()=>{t.current=e}),t.current}var g9=18,IO=40,v9=`${IO}px`,y9=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function b9({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:a}){let[o,l]=E.useState(!1),[u,d]=E.useState(!1),[f,h]=E.useState(!1),g=E.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&u,[o,u,n]),p=E.useCallback(()=>{let y=e.current,_=t.current;if(!y||!_||f||n==="none")return;let S=y,x=S.getBoundingClientRect().left+S.offsetWidth,T=S.getBoundingClientRect().top+S.offsetHeight/2,R=x-g9,A=T;document.querySelectorAll(y9).length===0&&document.elementFromPoint(R,A)===y||(l(!0),h(!0))},[e,t,f,n]);return E.useEffect(()=>{let y=e.current;if(!y||n==="none")return;function _(){let x=window.innerWidth-y.getBoundingClientRect().right;d(x>=IO)}_();let S=setInterval(_,1e3);return()=>{clearInterval(S)}},[e,n]),E.useEffect(()=>{let y=a||document.activeElement===t.current;if(n==="none"||!y)return;let _=setTimeout(p,0),S=setTimeout(p,2e3),x=setTimeout(p,5e3),T=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(S),clearTimeout(x),clearTimeout(T)}},[t,a,n,p]),{hasPWMBadge:o,willPushPWMBadge:g,PWM_BADGE_SPACE_WIDTH:v9}}var MO=E.createContext({}),NO=E.forwardRef((e,t)=>{var n=e,{value:a,onChange:o,maxLength:l,textAlign:u="left",pattern:d,placeholder:f,inputMode:h="numeric",onComplete:g,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:y,containerClassName:_,noScriptCSSFallback:S=_9,render:x,children:T}=n,R=h9(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),A,C,O,M,L;let[N,D]=E.useState(typeof R.defaultValue=="string"?R.defaultValue:""),U=a??N,Z=m9(U),G=E.useCallback(ge=>{o?.(ge),D(ge)},[o]),W=E.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),j=E.useRef(null),ne=E.useRef(null),ie=E.useRef({value:U,onChange:G,isIOS:typeof window<"u"&&((C=(A=window?.CSS)==null?void 0:A.supports)==null?void 0:C.call(A,"-webkit-touch-callout","none"))}),P=E.useRef({prev:[(O=j.current)==null?void 0:O.selectionStart,(M=j.current)==null?void 0:M.selectionEnd,(L=j.current)==null?void 0:L.selectionDirection]});E.useImperativeHandle(t,()=>j.current,[]),E.useEffect(()=>{let ge=j.current,me=ne.current;if(!ge||!me)return;ie.current.value!==ge.value&&ie.current.onChange(ge.value),P.current.prev=[ge.selectionStart,ge.selectionEnd,ge.selectionDirection];function Re(){if(document.activeElement!==ge){Q(null),oe(null);return}let Fe=ge.selectionStart,tt=ge.selectionEnd,B=ge.selectionDirection,q=ge.maxLength,Y=ge.value,ce=P.current.prev,he=-1,fe=-1,we;if(Y.length!==0&&Fe!==null&&tt!==null){let nr=Fe===tt,It=Fe===Y.length&&Y.length<q;if(nr&&!It){let Kt=Fe;if(Kt===0)he=0,fe=1,we="forward";else if(Kt===q)he=Kt-1,fe=Kt,we="backward";else if(q>1&&Y.length>1){let Mt=0;if(ce[0]!==null&&ce[1]!==null){we=Kt<ce[1]?"backward":"forward";let sn=ce[0]===ce[1]&&ce[0]<q;we==="backward"&&!sn&&(Mt=-1)}he=Mt+Kt,fe=Mt+Kt+1}}he!==-1&&fe!==-1&&he!==fe&&j.current.setSelectionRange(he,fe,we)}let He=he!==-1?he:Fe,nt=fe!==-1?fe:tt,Tt=we??B;Q(He),oe(nt),P.current.prev=[He,nt,Tt]}if(document.addEventListener("selectionchange",Re,{capture:!0}),Re(),document.activeElement===ge&&ve(!0),!document.getElementById("input-otp-style")){let Fe=document.createElement("style");if(Fe.id="input-otp-style",document.head.appendChild(Fe),Fe.sheet){let tt="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Jl(Fe.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Jl(Fe.sheet,`[data-input-otp]:autofill { ${tt} }`),Jl(Fe.sheet,`[data-input-otp]:-webkit-autofill { ${tt} }`),Jl(Fe.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Jl(Fe.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ue=()=>{me&&me.style.setProperty("--root-height",`${ge.clientHeight}px`)};Ue();let it=new ResizeObserver(Ue);return it.observe(ge),()=>{document.removeEventListener("selectionchange",Re,{capture:!0}),it.disconnect()}},[]);let[F,$]=E.useState(!1),[re,ve]=E.useState(!1),[k,Q]=E.useState(null),[ee,oe]=E.useState(null);E.useEffect(()=>{p9(()=>{var ge,me,Re,Ue;(ge=j.current)==null||ge.dispatchEvent(new Event("input"));let it=(me=j.current)==null?void 0:me.selectionStart,Fe=(Re=j.current)==null?void 0:Re.selectionEnd,tt=(Ue=j.current)==null?void 0:Ue.selectionDirection;it!==null&&Fe!==null&&(Q(it),oe(Fe),P.current.prev=[it,Fe,tt])})},[U,re]),E.useEffect(()=>{Z!==void 0&&U!==Z&&Z.length<l&&U.length===l&&g?.(U)},[l,g,Z,U]);let pe=b9({containerRef:ne,inputRef:j,pushPasswordManagerStrategy:p,isFocused:re}),be=E.useCallback(ge=>{let me=ge.currentTarget.value.slice(0,l);if(me.length>0&&W&&!W.test(me)){ge.preventDefault();return}typeof Z=="string"&&me.length<Z.length&&document.dispatchEvent(new Event("selectionchange")),G(me)},[l,G,Z,W]),ye=E.useCallback(()=>{var ge;if(j.current){let me=Math.min(j.current.value.length,l-1),Re=j.current.value.length;(ge=j.current)==null||ge.setSelectionRange(me,Re),Q(me),oe(Re)}ve(!0)},[l]),Se=E.useCallback(ge=>{var me,Re;let Ue=j.current;if(!y&&(!ie.current.isIOS||!ge.clipboardData||!Ue))return;let it=ge.clipboardData.getData("text/plain"),Fe=y?y(it):it;ge.preventDefault();let tt=(me=j.current)==null?void 0:me.selectionStart,B=(Re=j.current)==null?void 0:Re.selectionEnd,q=(tt!==B?U.slice(0,tt)+Fe+U.slice(B):U.slice(0,tt)+Fe+U.slice(tt)).slice(0,l);if(q.length>0&&W&&!W.test(q))return;Ue.value=q,G(q);let Y=Math.min(q.length,l-1),ce=q.length;Ue.setSelectionRange(Y,ce),Q(Y),oe(ce)},[l,G,W,U]),Pe=E.useMemo(()=>({position:"relative",cursor:R.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[R.disabled]),ke=E.useMemo(()=>({position:"absolute",inset:0,width:pe.willPushPWMBadge?`calc(100% + ${pe.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:pe.willPushPWMBadge?`inset(0 ${pe.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:u,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[pe.PWM_BADGE_SPACE_WIDTH,pe.willPushPWMBadge,u]),Ee=E.useMemo(()=>E.createElement("input",f9(d9({autoComplete:R.autoComplete||"one-time-code"},R),{"data-input-otp":!0,"data-input-otp-placeholder-shown":U.length===0||void 0,"data-input-otp-mss":k,"data-input-otp-mse":ee,inputMode:h,pattern:W?.source,"aria-placeholder":f,style:ke,maxLength:l,value:U,ref:j,onPaste:ge=>{var me;Se(ge),(me=R.onPaste)==null||me.call(R,ge)},onChange:be,onMouseOver:ge=>{var me;$(!0),(me=R.onMouseOver)==null||me.call(R,ge)},onMouseLeave:ge=>{var me;$(!1),(me=R.onMouseLeave)==null||me.call(R,ge)},onFocus:ge=>{var me;ye(),(me=R.onFocus)==null||me.call(R,ge)},onBlur:ge=>{var me;ve(!1),(me=R.onBlur)==null||me.call(R,ge)}})),[be,ye,Se,h,ke,l,ee,k,R,W?.source,U]),ze=E.useMemo(()=>({slots:Array.from({length:l}).map((ge,me)=>{var Re;let Ue=re&&k!==null&&ee!==null&&(k===ee&&me===k||me>=k&&me<ee),it=U[me]!==void 0?U[me]:null,Fe=U[0]!==void 0?null:(Re=f?.[me])!=null?Re:null;return{char:it,placeholderChar:Fe,isActive:Ue,hasFakeCaret:Ue&&it===null}}),isFocused:re,isHovering:!R.disabled&&F}),[re,F,l,ee,k,R.disabled,U]),Pt=E.useMemo(()=>x?x(ze):E.createElement(MO.Provider,{value:ze},T),[T,ze,x]);return E.createElement(E.Fragment,null,S!==null&&E.createElement("noscript",null,E.createElement("style",null,S)),E.createElement("div",{ref:ne,"data-input-otp-container":!0,style:Pe,className:_},Pt,E.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ee)))});NO.displayName="Input";function Jl(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var _9=`
74
- [data-input-otp] {
75
- --nojs-bg: white !important;
76
- --nojs-fg: black !important;
77
-
78
- background-color: var(--nojs-bg) !important;
79
- color: var(--nojs-fg) !important;
80
- caret-color: var(--nojs-fg) !important;
81
- letter-spacing: .25em !important;
82
- text-align: center !important;
83
- border: 1px solid var(--nojs-fg) !important;
84
- border-radius: 4px !important;
85
- width: 100% !important;
86
- }
87
- @media (prefers-color-scheme: dark) {
88
- [data-input-otp] {
89
- --nojs-bg: black !important;
90
- --nojs-fg: white !important;
91
- }
92
- }`,Os={},Xm,YS;function DO(){return YS||(YS=1,Xm={L:1,M:0,Q:3,H:2}),Xm}var Jm,KS;function LO(){return KS||(KS=1,Jm={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),Jm}var eg,WS;function E9(){if(WS)return eg;WS=1;var e=LO();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var a=0;a<this.data.length;a++)n.put(this.data.charCodeAt(a),8)}},eg=t,eg}var tg,ZS;function S9(){if(ZS)return tg;ZS=1;var e=DO();function t(n,a){this.totalCount=n,this.dataCount=a}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,a){var o=t.getRsBlockTable(n,a);if(o==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+a);for(var l=o.length/3,u=new Array,d=0;d<l;d++)for(var f=o[d*3+0],h=o[d*3+1],g=o[d*3+2],p=0;p<f;p++)u.push(new t(h,g));return u},t.getRsBlockTable=function(n,a){switch(a){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},tg=t,tg}var ng,QS;function x9(){if(QS)return ng;QS=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var a=0;a<n;a++)this.putBit((t>>>n-a-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},ng=e,ng}var rg,XS;function PO(){if(XS)return rg;XS=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return rg=e,rg}var ag,JS;function kO(){if(JS)return ag;JS=1;var e=PO();function t(n,a){if(n.length==null)throw new Error(n.length+"/"+a);for(var o=0;o<n.length&&n[o]==0;)o++;this.num=new Array(n.length-o+a);for(var l=0;l<n.length-o;l++)this.num[l]=n[l+o]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var a=new Array(this.getLength()+n.getLength()-1),o=0;o<this.getLength();o++)for(var l=0;l<n.getLength();l++)a[o+l]^=e.gexp(e.glog(this.get(o))+e.glog(n.get(l)));return new t(a,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var a=e.glog(this.get(0))-e.glog(n.get(0)),o=new Array(this.getLength()),l=0;l<this.getLength();l++)o[l]=this.get(l);for(var l=0;l<n.getLength();l++)o[l]^=e.gexp(e.glog(n.get(l))+a);return new t(o,0).mod(n)}},ag=t,ag}var ig,ex;function w9(){if(ex)return ig;ex=1;var e=LO(),t=kO(),n=PO(),a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},o={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(l){for(var u=l<<10;o.getBCHDigit(u)-o.getBCHDigit(o.G15)>=0;)u^=o.G15<<o.getBCHDigit(u)-o.getBCHDigit(o.G15);return(l<<10|u)^o.G15_MASK},getBCHTypeNumber:function(l){for(var u=l<<12;o.getBCHDigit(u)-o.getBCHDigit(o.G18)>=0;)u^=o.G18<<o.getBCHDigit(u)-o.getBCHDigit(o.G18);return l<<12|u},getBCHDigit:function(l){for(var u=0;l!=0;)u++,l>>>=1;return u},getPatternPosition:function(l){return o.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,u,d){switch(l){case a.PATTERN000:return(u+d)%2==0;case a.PATTERN001:return u%2==0;case a.PATTERN010:return d%3==0;case a.PATTERN011:return(u+d)%3==0;case a.PATTERN100:return(Math.floor(u/2)+Math.floor(d/3))%2==0;case a.PATTERN101:return u*d%2+u*d%3==0;case a.PATTERN110:return(u*d%2+u*d%3)%2==0;case a.PATTERN111:return(u*d%3+(u+d)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var u=new t([1],0),d=0;d<l;d++)u=u.multiply(new t([1,n.gexp(d)],0));return u},getLengthInBits:function(l,u){if(1<=u&&u<10)switch(l){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+l)}else if(u<27)switch(l){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+l)}else if(u<41)switch(l){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+l)}else throw new Error("type:"+u)},getLostPoint:function(l){for(var u=l.getModuleCount(),d=0,f=0;f<u;f++)for(var h=0;h<u;h++){for(var g=0,p=l.isDark(f,h),y=-1;y<=1;y++)if(!(f+y<0||u<=f+y))for(var _=-1;_<=1;_++)h+_<0||u<=h+_||y==0&&_==0||p==l.isDark(f+y,h+_)&&g++;g>5&&(d+=3+g-5)}for(var f=0;f<u-1;f++)for(var h=0;h<u-1;h++){var S=0;l.isDark(f,h)&&S++,l.isDark(f+1,h)&&S++,l.isDark(f,h+1)&&S++,l.isDark(f+1,h+1)&&S++,(S==0||S==4)&&(d+=3)}for(var f=0;f<u;f++)for(var h=0;h<u-6;h++)l.isDark(f,h)&&!l.isDark(f,h+1)&&l.isDark(f,h+2)&&l.isDark(f,h+3)&&l.isDark(f,h+4)&&!l.isDark(f,h+5)&&l.isDark(f,h+6)&&(d+=40);for(var h=0;h<u;h++)for(var f=0;f<u-6;f++)l.isDark(f,h)&&!l.isDark(f+1,h)&&l.isDark(f+2,h)&&l.isDark(f+3,h)&&l.isDark(f+4,h)&&!l.isDark(f+5,h)&&l.isDark(f+6,h)&&(d+=40);for(var x=0,h=0;h<u;h++)for(var f=0;f<u;f++)l.isDark(f,h)&&x++;var T=Math.abs(100*x/u/u-50)/5;return d+=T*10,d}};return ig=o,ig}var og,tx;function R9(){if(tx)return og;tx=1;var e=E9(),t=S9(),n=x9(),a=w9(),o=kO();function l(d,f){this.typeNumber=d,this.errorCorrectLevel=f,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=l.prototype;return u.addData=function(d){var f=new e(d);this.dataList.push(f),this.dataCache=null},u.isDark=function(d,f){if(d<0||this.moduleCount<=d||f<0||this.moduleCount<=f)throw new Error(d+","+f);return this.modules[d][f]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var d=1;for(d=1;d<40;d++){for(var f=t.getRSBlocks(d,this.errorCorrectLevel),h=new n,g=0,p=0;p<f.length;p++)g+=f[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),a.getLengthInBits(y.mode,d)),y.write(h)}if(h.getLengthInBits()<=g*8)break}this.typeNumber=d}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(d,f){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++)this.modules[h][g]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(d,f),this.typeNumber>=7&&this.setupTypeNumber(d),this.dataCache==null&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,f)},u.setupPositionProbePattern=function(d,f){for(var h=-1;h<=7;h++)if(!(d+h<=-1||this.moduleCount<=d+h))for(var g=-1;g<=7;g++)f+g<=-1||this.moduleCount<=f+g||(0<=h&&h<=6&&(g==0||g==6)||0<=g&&g<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=g&&g<=4?this.modules[d+h][f+g]=!0:this.modules[d+h][f+g]=!1)},u.getBestMaskPattern=function(){for(var d=0,f=0,h=0;h<8;h++){this.makeImpl(!0,h);var g=a.getLostPoint(this);(h==0||d>g)&&(d=g,f=h)}return f},u.createMovieClip=function(d,f,h){var g=d.createEmptyMovieClip(f,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var _=y*p,S=0;S<this.modules[y].length;S++){var x=S*p,T=this.modules[y][S];T&&(g.beginFill(0,100),g.moveTo(x,_),g.lineTo(x+p,_),g.lineTo(x+p,_+p),g.lineTo(x,_+p),g.endFill())}return g},u.setupTimingPattern=function(){for(var d=8;d<this.moduleCount-8;d++)this.modules[d][6]==null&&(this.modules[d][6]=d%2==0);for(var f=8;f<this.moduleCount-8;f++)this.modules[6][f]==null&&(this.modules[6][f]=f%2==0)},u.setupPositionAdjustPattern=function(){for(var d=a.getPatternPosition(this.typeNumber),f=0;f<d.length;f++)for(var h=0;h<d.length;h++){var g=d[f],p=d[h];if(this.modules[g][p]==null)for(var y=-2;y<=2;y++)for(var _=-2;_<=2;_++)y==-2||y==2||_==-2||_==2||y==0&&_==0?this.modules[g+y][p+_]=!0:this.modules[g+y][p+_]=!1}},u.setupTypeNumber=function(d){for(var f=a.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var g=!d&&(f>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=g}for(var h=0;h<18;h++){var g=!d&&(f>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=g}},u.setupTypeInfo=function(d,f){for(var h=this.errorCorrectLevel<<3|f,g=a.getBCHTypeInfo(h),p=0;p<15;p++){var y=!d&&(g>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!d&&(g>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!d},u.mapData=function(d,f){for(var h=-1,g=this.moduleCount-1,p=7,y=0,_=this.moduleCount-1;_>0;_-=2)for(_==6&&_--;;){for(var S=0;S<2;S++)if(this.modules[g][_-S]==null){var x=!1;y<d.length&&(x=(d[y]>>>p&1)==1);var T=a.getMask(f,g,_-S);T&&(x=!x),this.modules[g][_-S]=x,p--,p==-1&&(y++,p=7)}if(g+=h,g<0||this.moduleCount<=g){g-=h,h=-h;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(d,f,h){for(var g=t.getRSBlocks(d,f),p=new n,y=0;y<h.length;y++){var _=h[y];p.put(_.mode,4),p.put(_.getLength(),a.getLengthInBits(_.mode,d)),_.write(p)}for(var S=0,y=0;y<g.length;y++)S+=g[y].dataCount;if(p.getLengthInBits()>S*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+S*8+")");for(p.getLengthInBits()+4<=S*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=S*8||(p.put(l.PAD0,8),p.getLengthInBits()>=S*8));)p.put(l.PAD1,8);return l.createBytes(p,g)},l.createBytes=function(d,f){for(var h=0,g=0,p=0,y=new Array(f.length),_=new Array(f.length),S=0;S<f.length;S++){var x=f[S].dataCount,T=f[S].totalCount-x;g=Math.max(g,x),p=Math.max(p,T),y[S]=new Array(x);for(var R=0;R<y[S].length;R++)y[S][R]=255&d.buffer[R+h];h+=x;var A=a.getErrorCorrectPolynomial(T),C=new o(y[S],A.getLength()-1),O=C.mod(A);_[S]=new Array(A.getLength()-1);for(var R=0;R<_[S].length;R++){var M=R+O.getLength()-_[S].length;_[S][R]=M>=0?O.get(M):0}}for(var L=0,R=0;R<f.length;R++)L+=f[R].totalCount;for(var N=new Array(L),D=0,R=0;R<g;R++)for(var S=0;S<f.length;S++)R<y[S].length&&(N[D++]=y[S][R]);for(var R=0;R<p;R++)for(var S=0;S<f.length;S++)R<_[S].length&&(N[D++]=_[S][R]);return N},og=l,og}var Sd={},nx;function O9(){if(nx)return Sd;nx=1,Object.defineProperty(Sd,"__esModule",{value:!0});var e=Object.assign||function(h){for(var g=1;g<arguments.length;g++){var p=arguments[g];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},t=g0(),n=l(t),a=Vi(),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function u(h,g){var p={};for(var y in h)g.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var d={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},f=(0,a.forwardRef)(function(h,g){var p=h.bgColor,y=h.bgD,_=h.fgD,S=h.fgColor,x=h.size,T=h.title,R=h.viewBoxSize,A=h.xmlns,C=A===void 0?"http://www.w3.org/2000/svg":A,O=u(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return o.default.createElement("svg",e({},O,{height:x,ref:g,viewBox:"0 0 "+R+" "+R,width:x,xmlns:C}),T?o.default.createElement("title",null,T):null,o.default.createElement("path",{d:y,fill:p}),o.default.createElement("path",{d:_,fill:S}))});return f.displayName="QRCodeSvg",f.propTypes=d,Sd.default=f,Sd}var rx;function T9(){if(rx)return Os;rx=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.QRCode=void 0;var e=Object.assign||function(x){for(var T=1;T<arguments.length;T++){var R=arguments[T];for(var A in R)Object.prototype.hasOwnProperty.call(R,A)&&(x[A]=R[A])}return x},t=g0(),n=p(t),a=DO(),o=p(a),l=R9(),u=p(l),d=Vi(),f=p(d),h=O9(),g=p(h);function p(x){return x&&x.__esModule?x:{default:x}}function y(x,T){var R={};for(var A in x)T.indexOf(A)>=0||Object.prototype.hasOwnProperty.call(x,A)&&(R[A]=x[A]);return R}var _={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},S=(0,d.forwardRef)(function(x,T){var R=x.bgColor,A=R===void 0?"#FFFFFF":R,C=x.fgColor,O=C===void 0?"#000000":C,M=x.level,L=M===void 0?"L":M,N=x.size,D=N===void 0?256:N,U=x.value,Z=y(x,["bgColor","fgColor","level","size","value"]),G=new u.default(-1,o.default[L]);G.addData(U),G.make();var W=G.modules;return f.default.createElement(g.default,e({},Z,{bgColor:A,bgD:W.map(function(j,ne){return j.map(function(ie,P){return ie?"":"M "+P+" "+ne+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:W.map(function(j,ne){return j.map(function(ie,P){return ie?"M "+P+" "+ne+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:T,size:D,viewBoxSize:W.length}))});return Os.QRCode=S,S.displayName="QRCode",S.propTypes=_,Os.default=S,Os}var A9=T9();const C9=Io(A9);var I9="Separator",ax="horizontal",M9=["horizontal","vertical"],jO=E.forwardRef((e,t)=>{const{decorative:n,orientation:a=ax,...o}=e,l=N9(a)?a:ax,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return b.jsx(Lc.div,{"data-orientation":l,...d,...o,ref:t})});jO.displayName=I9;function N9(e){return M9.includes(e)}var D9=jO;function L9(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:a},basePath:o,viewPaths:l,replace:u}=E.useContext(Ze),{data:d,isPending:f,error:h,refetch:g}=a(),p=d;return E.useEffect(()=>{if(!n||f||p)return;const _=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;u(`${o}/${l[t]}?redirectTo=${encodeURIComponent(_)}`)},[f,p,o,l,u,t,n]),{data:p,user:p?.user,isPending:f,error:h,refetch:g}}function Co({className:e,...t}){return b.jsx("div",{"data-slot":"card",className:de("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function kf({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:de("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function v0({className:e,...t}){return b.jsx("div",{"data-slot":"card-title",className:de("leading-none font-semibold",e),...t})}function jf({className:e,...t}){return b.jsx("div",{"data-slot":"card-description",className:de("text-muted-foreground text-sm",e),...t})}function Uf({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:de("px-6",e),...t})}function ov({className:e,...t}){return b.jsx("div",{"data-slot":"card-footer",className:de("flex items-center px-6 [.border-t]:pt-6",e),...t})}function vr({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:de("bg-accent animate-pulse rounded-md",e),...t})}var P9=zN("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ot({className:e,variant:t,size:n,asChild:a=!1,...o}){const l=a?Fw:"button";return b.jsx(l,{"data-slot":"button",className:de(P9({variant:t,size:n,className:e})),...o})}function k9({classNames:e,actionLabel:t,disabled:n,isSubmitting:a,variant:o,onClick:l,...u}){return l||(a=kv().isSubmitting),b.jsxs(Ot,{className:de("md:ms-auto",e?.button,o==="default"&&e?.primaryButton,o==="destructive"&&e?.destructiveButton),disabled:a||n,size:"sm",type:l?"button":"submit",variant:o,onClick:l,...u,children:[a&&b.jsx(_n,{className:"animate-spin"}),t]})}function j9({className:e,classNames:t,actionLabel:n,disabled:a,instructions:o,isPending:l,isSubmitting:u,variant:d,action:f}){return b.jsx(ov,{className:de("flex flex-col justify-between gap-4 rounded-b-xl md:flex-row",(n||o)&&"!py-4 border-t",d==="destructive"?"border-destructive/30 bg-destructive/15":"bg-sidebar",e,t?.footer),children:l?b.jsxs(b.Fragment,{children:[o&&b.jsx(vr,{className:de("my-0.5 h-3 w-48 max-w-full md:h-4 md:w-56",t?.skeleton)}),n&&b.jsx(vr,{className:de("h-8 w-14 md:ms-auto",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[o&&b.jsx(jf,{className:de("text-center text-muted-foreground text-xs md:text-start md:text-sm",t?.instructions),children:o}),n&&b.jsx(k9,{classNames:t,actionLabel:n,disabled:a,isSubmitting:u,variant:d,onClick:f})]})})}function U9({className:e,classNames:t,description:n,isPending:a,title:o}){return b.jsx(kf,{className:de(t?.header,e),children:a?b.jsxs(b.Fragment,{children:[b.jsx(vr,{className:de("my-0.5 h-5 w-1/3 md:h-5.5",t?.skeleton)}),n&&b.jsx(vr,{className:de("mt-1.5 mb-0.5 h-3 w-2/3 md:h-3.5",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx(v0,{className:de("text-lg md:text-xl",t?.title),children:o}),n&&b.jsx(jf,{className:de("text-xs md:text-sm",t?.description),children:n})]})})}function B9({children:e,className:t,classNames:n,title:a,description:o,instructions:l,actionLabel:u,disabled:d,isPending:f,isSubmitting:h,optimistic:g,variant:p,action:y,..._}){return b.jsxs(Co,{className:de("w-full pb-0 text-start",p==="destructive"&&"border-destructive/40",t,n?.base),..._,children:[b.jsx(U9,{classNames:n,description:o,isPending:f,title:a}),e,b.jsx(j9,{classNames:n,actionLabel:u,disabled:d,isPending:f,isSubmitting:h,instructions:l,optimistic:g,variant:p,action:y})]})}async function z9(e,t,n,a){const o=await F9(e),l=document.createElement("canvas");l.width=l.height=n;const u=l.getContext("2d"),d=Math.min(o.width,o.height),f=(o.width-d)/2,h=(o.height-d)/2,g=d,p=d;u?.drawImage(o,f,h,g,p,0,0,n,n);const y=await new Promise(_=>l.toBlob(_,`image/${a}`));return new File([y],`${t}.${a}`,{type:`image/${a}`})}async function F9(e){return new Promise((t,n)=>{const a=new Image,o=new FileReader;o.onload=l=>{var u;a.src=(u=l.target)==null?void 0:u.result},a.onload=()=>t(a),a.onerror=l=>n(l),o.readAsDataURL(e)})}async function V9(e){return new Promise((t,n)=>{const a=new FileReader;a.onloadend=()=>t(a.result),a.onerror=n,a.readAsDataURL(e)})}function UO({...e}){return b.jsx(S7,{"data-slot":"dropdown-menu",...e})}function BO({...e}){return b.jsx(x7,{"data-slot":"dropdown-menu-trigger",...e})}function zO({className:e,sideOffset:t=4,...n}){return b.jsx(w7,{children:b.jsx(R7,{"data-slot":"dropdown-menu-content",sideOffset:t,className:de("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function hf({className:e,inset:t,variant:n="default",...a}){return b.jsx(O7,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:de("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function FO({className:e,...t}){return b.jsx(C7,{"data-slot":"label",className:de("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var xa=mN,VO=E.createContext({}),Gt=({...e})=>b.jsx(VO.Provider,{value:{name:e.name},children:b.jsx(yN,{...e})}),y0=()=>{const e=E.useContext(VO),t=E.useContext(HO),{getFieldState:n}=Ef(),a=kv({name:e.name}),o=n(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:l}=t;return{id:l,name:e.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...o}},HO=E.createContext({});function qt({className:e,...t}){const n=E.useId();return b.jsx(HO.Provider,{value:{id:n},children:b.jsx("div",{"data-slot":"form-item",className:de("grid gap-2",e),...t})})}function Yt({className:e,...t}){const{error:n,formItemId:a}=y0();return b.jsx(FO,{"data-slot":"form-label","data-error":!!n,className:de("data-[error=true]:text-destructive",e),htmlFor:a,...t})}function an({...e}){const{error:t,formItemId:n,formDescriptionId:a,formMessageId:o}=y0();return b.jsx(Fw,{"data-slot":"form-control",id:n,"aria-describedby":t?`${a} ${o}`:`${a}`,"aria-invalid":!!t,...e})}function fn({className:e,...t}){const{error:n,formMessageId:a}=y0(),o=n?String(n?.message??""):t.children;return o?b.jsx("p",{"data-slot":"form-message",id:a,className:de("text-destructive text-sm",e),...t,children:o}):null}function Zr({className:e,type:t,...n}){return b.jsx("input",{type:t,"data-slot":"input",className:de("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function $O({className:e,...t}){return b.jsx(U7,{"data-slot":"avatar",className:de("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function GO({className:e,...t}){return b.jsx(B7,{"data-slot":"avatar-image",className:de("aspect-square size-full",e),...t})}function qO({className:e,...t}){return b.jsx(z7,{"data-slot":"avatar-fallback",className:de("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function H9({className:e,classNames:t,isPending:n,size:a,organization:o,localization:l,...u}){const{localization:d,avatar:f}=E.useContext(Ze),h=E.useMemo(()=>({...d,...l}),[d,l]),g=o?.name,p=o?.logo;return n?b.jsx(vr,{className:de("shrink-0 rounded-full",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs($O,{className:de("bg-muted",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base),...u,children:[f?.Image?b.jsx(f.Image,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||""}):b.jsx(GO,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||void 0}),b.jsx(qO,{className:de("text-foreground",t?.fallback),delayMs:p?600:void 0,children:b.jsx(rN,{className:de("size-[50%]",t?.fallbackIcon)})})]})}function YO({className:e,classNames:t,isPending:n,size:a,organization:o,localization:l}){const{localization:u}=E.useContext(Ze),d={...u,...l};return b.jsxs("div",{className:de("flex items-center gap-2 truncate",e,t?.base),children:[b.jsx(H9,{className:de(a!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:d,organization:o,size:a}),b.jsx("div",{className:de("flex flex-col truncate text-left leading-tight",t?.content),children:n?b.jsxs(b.Fragment,{children:[b.jsx(vr,{className:de("max-w-full",a==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),a!=="sm"&&b.jsx(vr,{className:de("mt-1.5 max-w-full",a==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{className:de("truncate font-semibold",a==="lg"?"text-base":"text-sm",t?.title),children:o?.name||d?.ORGANIZATION}),a!=="sm"&&o?.slug&&b.jsx("span",{className:de("truncate opacity-70",a==="lg"?"text-sm":"text-xs",t?.subtitle),children:o.slug})]})})]})}function $9(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),o=new TextEncoder().encode(n),l=G7(ek(o)),u=t?.jpg?".jpg":"";let d=`https://gravatar.com/avatar/${l}${u}`;const f=new URLSearchParams;t?.size&&f.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&f.append("d",t.d),t?.forceDefault&&f.append("f","y");const h=f.toString();return h&&(d+=`?${h}`),d}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function KO({className:e,classNames:t,isPending:n,size:a,user:o,localization:l,...u}){const{localization:d,gravatar:f,avatar:h}=E.useContext(Ze),g={...d,...l},p=o?.displayName||o?.name||o?.fullName||o?.firstName||o?.displayUsername||o?.username||o?.email,y=o?.image||o?.avatar||o?.avatarUrl,_=f&&o?.email?$9(o.email,f===!0?void 0:f):null,S=f?_:y;return n?b.jsx(vr,{className:de("shrink-0 rounded-full",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs($O,{className:de("bg-muted",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base),...u,children:[h?.Image?b.jsx(h.Image,{alt:p||g?.USER,className:t?.image,src:S||""}):b.jsx(GO,{alt:p||g?.USER,className:t?.image,src:S||void 0}),b.jsx(qO,{className:de("text-foreground uppercase",t?.fallback),delayMs:S?600:void 0,children:G9(p)||b.jsx(fN,{className:de("size-[50%]",t?.fallbackIcon)})})]})}var G9=e=>e?.slice(0,2);function uz({className:e,classNames:t,localization:n,...a}){const{hooks:{useListUserInvitations:o,useListOrganizations:l},localization:u}=E.useContext(Ze),d=E.useMemo(()=>({...u,...n}),[u,n]),{data:f,refetch:h}=o(),{refetch:g}=l(),p=async()=>{await h?.(),await g?.()},y=f?.filter(_=>_.status==="pending");return y?.length?b.jsx(B9,{className:e,classNames:t,title:d.PENDING_INVITATIONS,description:d.PENDING_USER_INVITATIONS_DESCRIPTION||d.PENDING_INVITATIONS_DESCRIPTION,...a,children:b.jsx(Uf,{className:de("grid gap-4",t?.content),children:y.map(_=>b.jsx(q9,{classNames:t,invitation:{id:_.id,email:_.email,role:_.role,status:_.status,expiresAt:_.expiresAt},onChanged:p},_.id))})}):null}function q9({classNames:e,invitation:t,onChanged:n}){const{authClient:a,organization:o,localization:l,toast:u,localizeErrors:d}=E.useContext(Ze),f=l,{lang:h}=Av(),[g,p]=E.useState(!1),S=[...[{role:"owner",label:f.OWNER},{role:"admin",label:f.ADMIN},{role:"member",label:f.MEMBER}],...o?.customRoles||[]].find(R=>R.role===t.role),x=async()=>{p(!0);try{await a.organization.acceptInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),u({variant:"success",message:f.INVITATION_ACCEPTED})}catch(R){u({variant:"error",message:Ut({error:R,localization:f,localizeErrors:d})})}p(!1)},T=async()=>{p(!0);try{await a.organization.rejectInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),u({variant:"success",message:f.INVITATION_REJECTED})}catch(R){u({variant:"error",message:Ut({error:R,localization:f,localizeErrors:d})})}p(!1)};return b.jsxs(Co,{className:de("flex-row items-center p-4",e?.cell),children:[b.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[b.jsx(KO,{className:"my-0.5",user:{email:t.email},localization:f}),b.jsxs("div",{className:"grid flex-1 text-left leading-tight",children:[b.jsx("span",{className:"truncate font-semibold text-sm",children:t.email}),b.jsxs("span",{className:"truncate text-muted-foreground text-xs",children:[f.EXPIRES," ",t.expiresAt.toLocaleDateString(h??"en")]})]})]}),b.jsx("span",{className:"truncate text-sm opacity-70",children:S?.label}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsxs(UO,{children:[b.jsx(BO,{asChild:!0,children:b.jsx(Ot,{className:de("relative ms-auto",e?.button,e?.outlineButton),disabled:g,size:"icon",type:"button",variant:"outline",children:g?b.jsx(_n,{className:"animate-spin"}):b.jsx(iN,{className:e?.icon})})}),b.jsxs(zO,{onCloseAutoFocus:R=>R.preventDefault(),children:[b.jsxs(hf,{onClick:x,disabled:g,children:[b.jsx(Iv,{className:e?.icon}),f.ACCEPT]}),b.jsxs(hf,{onClick:T,disabled:g,variant:"destructive",children:[b.jsx(Aw,{className:e?.icon}),f.REJECT]})]})]})})]})}function b0({className:e,...t}){return b.jsx(K2,{"data-slot":"checkbox",className:de("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b.jsx(Z2,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:b.jsx(Iv,{className:"size-3.5"})})})}function Y9({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:de("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var K9=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),W9=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),Z9=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),Q9=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),b.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),X9=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),J9=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),b.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),b.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),b.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),b.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),eU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),b.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),b.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),b.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),tU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),nU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),rU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),aU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),b.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),iU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),b.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),b.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),b.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),oU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),sU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),b.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),lU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),cU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),uU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),dU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),b.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),b.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),fU=({className:e})=>b.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[b.jsx("style",{type:"text/css",children:`
93
- .st0{fill:#FFFFFF}
94
- .st1{fill:#9146FF}
95
- `}),b.jsx("title",{children:"Asset 2"}),b.jsxs("g",{children:[b.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),b.jsx("g",{children:b.jsxs("g",{children:[b.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),hU=({className:e})=>b.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:b.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),pU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),mU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),gU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:b.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),vU=[{provider:"apple",name:"Apple",icon:K9},{provider:"discord",name:"Discord",icon:W9},{provider:"dropbox",name:"Dropbox",icon:Z9},{provider:"facebook",name:"Facebook",icon:Q9},{provider:"github",name:"GitHub",icon:X9},{provider:"gitlab",name:"GitLab",icon:J9},{provider:"google",name:"Google",icon:eU},{provider:"huggingface",name:"Hugging Face",icon:tU},{provider:"kick",name:"Kick",icon:nU},{provider:"linear",name:"Linear",icon:rU},{provider:"linkedin",name:"LinkedIn",icon:aU},{provider:"microsoft",name:"Microsoft",icon:iU},{provider:"notion",name:"Notion",icon:oU},{provider:"reddit",name:"Reddit",icon:sU},{provider:"roblox",name:"Roblox",icon:lU},{provider:"slack",name:"Slack",icon:cU},{provider:"spotify",name:"Spotify",icon:uU},{provider:"tiktok",name:"TikTok",icon:dU},{provider:"twitch",name:"Twitch",icon:fU},{provider:"vercel",name:"Vercel",icon:hU},{provider:"vk",name:"VK",icon:pU},{provider:"twitter",name:"X",icon:mU},{provider:"zoom",name:"Zoom",icon:gU}];function xc({className:e,enableToggle:t,onChange:n,...a}){const[o,l]=E.useState(!0),[u,d]=E.useState(!1);return b.jsxs("div",{className:"relative",children:[b.jsx(Zr,{className:de(t&&"pr-10",e),...a,type:u&&t?"text":"password",onChange:f=>{l(!f.target.value),n?.(f)}}),t&&b.jsxs(b.Fragment,{children:[b.jsx(Ot,{className:"!bg-transparent absolute top-0 right-0",disabled:o,size:"icon",type:"button",variant:"ghost",onClick:()=>d(!u),children:u?b.jsx(sN,{}):b.jsx(oN,{})}),b.jsx("style",{children:`
96
- .hide-password-toggle::-ms-reveal,
97
- .hide-password-toggle::-ms-clear {
98
- visibility: hidden;
99
- pointer-events: none;
100
- display: none;
101
- }
102
- `})]})]})}Kx({plugins:[cI(),fI(),Sk(),hI({clientId:""}),dI(),lI(),gI(),nw(),uI(),oI(),rw({})]});function wa({redirectTo:e}){const{redirectTo:t}=E.useContext(Ze),n=E.useCallback(()=>e||Mo("redirectTo")||t,[e,t]),[a,o]=E.useState(!1),{navigate:l,hooks:{useSession:u},onSessionChange:d}=E.useContext(Ze),{refetch:f}=u();return{onSuccess:E.useCallback(async()=>{o(!0),await f?.(),d&&await d(),o(!1),l(n())},[f,d,l,n]),isPending:a}}function WO({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=E.useContext(Ze),a=t?.(),o=E.useRef(!1),{onSuccess:l}=wa({redirectTo:e});return E.useEffect(()=>{if(!o.current){if(!n){o.current=!0,l();return}a||(o.current=!0,l())}},[a,n,l]),b.jsx(_n,{className:"animate-spin"})}var yU=["/sign-up/email","/sign-in/email","/forget-password"],bU=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,a)=>a.toUpperCase()).replace(/\/([a-z])/g,(n,a)=>a.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function kc({localization:e}){const{captcha:t,localization:n}=E.useContext(Ze);e={...n,...e};const a=E.useRef(null),{executeRecaptcha:o}=xw(),l=async f=>{if(!t)throw new Error(e.MISSING_RESPONSE);let h;switch(t.provider){case"google-recaptcha-v3":{const g=bU(f);h=await o?.(g);break}case"google-recaptcha-v2-checkbox":{h=a.current.getValue();break}case"google-recaptcha-v2-invisible":{h=await a.current.executeAsync();break}case"cloudflare-turnstile":{h=a.current.getResponse();break}case"hcaptcha":{h=a.current.getResponse();break}case"captchafox":{h=a.current.getResponse();break}}if(!h)throw new Error(e.MISSING_RESPONSE);return h};return{captchaRef:a,getCaptchaHeaders:async f=>{if(!t)return;if((t.endpoints||yU).includes(f))return{"x-captcha-response":await l(f)}},resetCaptcha:()=>{var f,h,g,p,y,_,S,x;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(h=(f=a.current)==null?void 0:f.reset)==null||h.call(f);break}case"cloudflare-turnstile":{(p=(g=a.current)==null?void 0:g.reset)==null||p.call(g);break}case"hcaptcha":{(_=(y=a.current)==null?void 0:y.resetCaptcha)==null||_.call(y);break}case"captchafox":{(x=(S=a.current)==null?void 0:S.reset)==null||x.call(S);break}}}}}function _U({className:e,localization:t}){const n=Za(),{captcha:a,localization:o}=E.useContext(Ze),l={...o,...t};return a?a.hideBadge?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
103
- .grecaptcha-badge { visibility: hidden; }
104
- `}),b.jsxs("p",{className:de("text-muted-foreground text-xs",e),children:[l.PROTECTED_BY_RECAPTCHA," ",l.BY_CONTINUING_YOU_AGREE," Google"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:l.PRIVACY_POLICY})," ","&"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:l.TERMS_OF_SERVICE}),"."]})]}):n?b.jsx("style",{children:`
105
- .grecaptcha-badge { visibility: visible !important; }
106
- `}):null:null}function EU({ref:e}){const{captcha:t}=E.useContext(Ze),{theme:n}=Cv(),{lang:a}=Av();return E.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
107
- .grecaptcha-badge {
108
- border-radius: var(--radius) !important;
109
- --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
110
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
111
- border-style: var(--tw-border-style) !important;
112
- border-width: 1px;
113
- }
114
-
115
- .dark .grecaptcha-badge {
116
- border-color: var(--input) !important;
117
- }
118
- `}),b.jsx(s9,{ref:e,sitekey:t.siteKey,theme:n,hl:a,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:de(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${a}-${t.provider}`)]}):null}var SU=["/sign-up/email","/sign-in/email","/forget-password"];function jc({ref:e,localization:t,action:n}){const{captcha:a}=E.useContext(Ze);if(!a||n&&!(a.endpoints||SU).includes(n))return null;const{theme:o}=Cv(),l=a.provider==="google-recaptcha-v2-checkbox"||a.provider==="google-recaptcha-v2-invisible",u=a.provider==="google-recaptcha-v3"||a.provider==="google-recaptcha-v2-invisible",d=a.provider==="cloudflare-turnstile",f=a.provider==="hcaptcha",h=a.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(EU,{ref:e}),u&&b.jsx(_U,{localization:t}),d&&b.jsx(TO,{className:"mx-auto",ref:e,siteKey:a.siteKey,options:{theme:o,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(Pj,{ref:e,sitekey:a.siteKey,theme:o})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(vO,{ref:e,sitekey:a.siteKey,theme:o})})]})}function _0({className:e,containerClassName:t,...n}){return b.jsx(NO,{"data-slot":"input-otp",containerClassName:de("flex items-center gap-2 has-disabled:opacity-50",t),className:de("disabled:cursor-not-allowed",e),...n})}function Ts({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:de("flex items-center",e),...t})}function gn({index:e,className:t,...n}){const a=E.useContext(MO),{char:o,hasFakeCaret:l,isActive:u}=a?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:de("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,l&&b.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:b.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function sg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(cN,{})})}function E0({otpSeparators:e=0}){return e===0?b.jsxs(Ts,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2}),b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Ts,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2})]}),b.jsx(sg,{}),b.jsxs(Ts,{children:[b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Ts,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1})]}),b.jsx(sg,{}),b.jsxs(Ts,{children:[b.jsx(gn,{index:2}),b.jsx(gn,{index:3})]}),b.jsx(sg,{}),b.jsxs(Ts,{children:[b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]})}function ix(e){const[t,n]=E.useState();return t?b.jsx(wU,{...e,email:t}):b.jsx(xU,{...e,setEmail:n})}function xU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o,setEmail:l}){const u=Za(),{captchaRef:d,getCaptchaHeaders:f}=kc({localization:a}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(Ze);a={...g,...a};const _=En({email:Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),S=_a({resolver:Ea(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{o?.(S.formState.isSubmitting)},[S.formState.isSubmitting,o]);async function x({email:T}){const R={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:R}),p({variant:"success",message:a.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:Ut({error:A,localization:a,localizeErrors:y})})}}return b.jsx(xa,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(x),noValidate:u,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:S.control,name:"email",render:({field:T})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(jc,{ref:d,localization:a,action:"/email-otp/send-verification-otp"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.EMAIL_OTP_SEND_ACTION})]})})}function wU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(Ze);a={...h,...a};const{onSuccess:y,isPending:_}=wa({redirectTo:l}),S=En({code:Ke().min(1,{message:`${a.EMAIL_OTP} ${a.IS_REQUIRED}`}).min(6,{message:`${a.EMAIL_OTP} ${a.IS_INVALID}`})}),x=_a({resolver:Ea(S),defaultValues:{code:""}});n=n||x.formState.isSubmitting||_,E.useEffect(()=>{u?.(x.formState.isSubmitting||_)},[x.formState.isSubmitting,_,u]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){g({variant:"error",message:Ut({error:A,localization:a,localizeErrors:p})}),x.reset()}}return b.jsx(xa,{...x,children:b.jsxs("form",{onSubmit:x.handleSubmit(T),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:x.control,name:"code",render:({field:R})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL_OTP}),b.jsx(an,{children:b.jsx(_0,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&x.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(E0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.EMAIL_OTP_VERIFY_ACTION]})})]})})}function RU({onCancel:e,localization:t,className:n,classNames:a,otpSeparators:o,callbackURL:l,isSubmitting:u,redirectTo:d,setIsSubmitting:f}){const[h,g]=E.useState(!0),[p,y]=E.useState(30),{authClient:_,localization:S,toast:x,localizeErrors:T,navigate:R,basePath:A,viewPaths:C}=E.useContext(Ze);t={...S,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:M,isPending:L}=wa({redirectTo:d}),N=En({code:Ke().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=_a({resolver:Ea(N),defaultValues:{code:""}}),U=u||D.formState.isSubmitting||L;E.useEffect(()=>{f?.(D.formState.isSubmitting||L)},[D.formState.isSubmitting,L,f]),E.useEffect(()=>{if(p>0){const W=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(W)}else g(!1)},[p]);async function Z({code:W}){try{const j=await _.emailOtp.verifyEmail({email:O,otp:W,fetchOptions:{throw:!0}});"token"in j&&j.token?await M():(R(`${A}/${C.SIGN_IN}${window.location.search}`),x({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){x({variant:"error",message:Ut({error:j,localization:t,localizeErrors:T})}),D.reset()}}async function G(){if(!h){g(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),x({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(W){x({variant:"error",message:Ut({error:W,localization:t,localizeErrors:T})}),g(!1),y(0)}}}return O?b.jsx(xa,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(Z),className:de("grid w-full gap-6",n,a?.base),children:[b.jsx(Gt,{control:D.control,name:"code",render:({field:W})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:a?.label,children:t.EMAIL_OTP}),b.jsx(an,{children:b.jsx(_0,{...W,maxLength:6,onChange:j=>{W.onChange(j),j.length===6&&D.handleSubmit(Z)()},containerClassName:a?.otpInputContainer,className:a?.otpInput,disabled:U,children:b.jsx(E0,{otpSeparators:o})})}),b.jsx(fn,{className:a?.error})]})}),b.jsxs("div",{className:"grid gap-4",children:[b.jsxs(Ot,{type:"submit",disabled:U,className:de(a?.button,a?.primaryButton),children:[U&&b.jsx(_n,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),b.jsx(Ot,{type:"button",variant:"outline",onClick:G,disabled:h||U,className:de("w-full",a?.button),children:h?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&b.jsx(Ot,{type:"button",variant:"ghost",onClick:e,disabled:U,className:"w-full",children:t.CANCEL})]})]})}):b.jsx("div",{className:de("grid w-full gap-6",n),children:b.jsxs("div",{className:"text-center",children:[b.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function OU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o}){const l=Za(),{captchaRef:u,getCaptchaHeaders:d,resetCaptcha:f}=kc({localization:a}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:x,localizeErrors:T}=E.useContext(Ze);a={...y,...a};const R=En({email:Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`}).min(1,{message:`${a.EMAIL} ${a.IS_REQUIRED}`})}),A=_a({resolver:Ea(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{o?.(A.formState.isSubmitting)},[A.formState.isSubmitting,o]);async function C({email:O}){try{const M={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${x.RESET_PASSWORD}`,fetchOptions:M}),S({variant:"success",message:a.FORGOT_PASSWORD_EMAIL}),_(`${g}/${x.SIGN_IN}${window.location.search}`)}catch(M){S({variant:"error",message:Ut({error:M,localization:a,localizeErrors:T})}),f()}}return b.jsx(xa,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:A.control,name:"email",render:({field:O})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(jc,{ref:u,localization:a,action:"/forget-password"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.FORGOT_PASSWORD_ACTION})]})})}function ox({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u}){const d=Za(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=kc({localization:o}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:x,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(Ze);o={...x,...o};const O=E.useCallback(()=>l||Mo("redirectTo")||T,[l,T]),M=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=En({email:Ke().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),N=_a({resolver:Ea(L),defaultValues:{email:""}});a=a||N.formState.isSubmitting,E.useEffect(()=>{u?.(N.formState.isSubmitting)},[N.formState.isSubmitting,u]);async function D({email:U}){try{const Z={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:U,callbackURL:M(),fetchOptions:Z}),A({variant:"success",message:o.MAGIC_LINK_EMAIL}),N.reset()}catch(Z){A({variant:"error",message:Ut({error:Z,localization:o,localizeErrors:C})}),g()}}return b.jsx(xa,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:N.control,name:"email",render:({field:U})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...U})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(jc,{ref:f,localization:o,action:"/sign-in/magic-link"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function TU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l}){const{authClient:u,localization:d,toast:f,localizeErrors:h}=E.useContext(Ze);a={...d,...a};const{onSuccess:g,isPending:p}=wa({redirectTo:o}),y=En({code:Ke().min(1,{message:a.BACKUP_CODE_REQUIRED})}),_=_a({resolver:Ea(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:x}){try{await u.twoFactor.verifyBackupCode({code:x,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:Ut({error:T,localization:a,localizeErrors:h})}),_.reset()}}return b.jsx(xa,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:de("grid gap-6",e,t?.base),children:[b.jsx(Gt,{control:_.control,name:"code",render:({field:x})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.BACKUP_CODE}),b.jsx(an,{children:b.jsx(Zr,{placeholder:a.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...x})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.RECOVER_ACCOUNT_ACTION})]})})}function AU({className:e,classNames:t,localization:n,passwordValidation:a}){const o=E.useRef(!1),{authClient:l,basePath:u,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},a={...S,...a};const x=En({newPassword:gc(a,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:_?gc(a,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):Ke().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=_a({resolver:Ea(x),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(o.current)return;o.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${u}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[u,g,p,h,n]);async function A({newPassword:C}){try{const M=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:M,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),g(`${u}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:Ut({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(xa,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),_&&b.jsx(Gt,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:R,className:de("w-full",t?.button,t?.primaryButton),children:R?b.jsx(_n,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function CU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l,passwordValidation:u}){const d=Za(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=kc({localization:a}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:x,navigate:T,toast:R,Link:A,localizeErrors:C,emailVerification:O}=E.useContext(Ze),M=_?.rememberMe,L=_?.username,N=_?.passwordValidation;a={...S,...a},u={...N,...u};const{onSuccess:D,isPending:U}=wa({redirectTo:o}),Z=En({email:L?Ke().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:gc(u,a),rememberMe:Ov().optional()}),G=_a({resolver:Ea(Z),defaultValues:{email:"",password:"",rememberMe:!M}});n=n||G.formState.isSubmitting||U,E.useEffect(()=>{l?.(G.formState.isSubmitting||U)},[G.formState.isSubmitting,U,l]);async function W({email:j,password:ne,rememberMe:ie}){var P;try{let F={};if(L&&!PM(j)){const $={throw:!0,headers:await h("/sign-in/username")};F=await p.signIn.username({username:j,password:ne,rememberMe:ie,fetchOptions:$})}else{const $={throw:!0,headers:await h("/sign-in/email")};F=await p.signIn.email({email:j,password:ne,rememberMe:ie,fetchOptions:$})}F.twoFactorRedirect?T(`${y}/${x.TWO_FACTOR}${window.location.search}`):await D()}catch(F){G.resetField("password"),g(),R({variant:"error",message:Ut({error:F,localization:a,localizeErrors:C})}),O?.otp&&((P=F?.error)==null?void 0:P.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${x.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(xa,{...G,children:b.jsxs("form",{onSubmit:G.handleSubmit(W),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:G.control,name:"email",render:({field:j})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:L?a.USERNAME:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:L?"username":"email",className:t?.input,type:L?"text":"email",placeholder:L?a.SIGN_IN_USERNAME_PLACEHOLDER:a.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:G.control,name:"password",render:({field:j})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${x.FORGOT_PASSWORD}${d?window.location.search:""}`,children:a.FORGOT_PASSWORD_LINK})]}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"current-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),M&&b.jsx(Gt,{control:G.control,name:"rememberMe",render:({field:j})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(b0,{checked:j.value,onCheckedChange:j.onChange,disabled:n})}),b.jsx(Yt,{children:a.REMEMBER_ME})]})}),b.jsx(jc,{ref:f,localization:a,action:"/sign-in/email"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.SIGN_IN_ACTION})]})})}function IU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u,passwordValidation:d}){const f=Za(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=kc({localization:o}),{additionalFields:y,authClient:_,basePath:S,baseURL:x,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:M,viewPaths:L,navigate:N,toast:D,avatar:U,localizeErrors:Z,emailVerification:G}=E.useContext(Ze),W=T?.confirmPassword,j=T?.username,ne=T?.usernameRequired??!0,ie=T?.passwordValidation,P=M?.fields;o={...R,...o},d={...ie,...d};const F=E.useRef(null),[$,re]=E.useState(null),[ve,k]=E.useState(!1),Q=E.useCallback(()=>l||Mo("redirectTo")||O,[l,O]),ee=E.useCallback(()=>`${x}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,S,L,x,Q]),{onSuccess:oe,isPending:pe}=wa({redirectTo:l}),be={email:Ke().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:gc(d,o),name:P?.includes("name")&&A?Ke().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):Ke().optional(),image:Ke().optional(),username:j&&ne?Ke().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Ke().optional(),confirmPassword:W?gc(d,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):Ke().optional()},ye={};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];if(!Re)continue;let Ue;Re.type==="number"?Ue=Re.required?LM(it=>it?Number(it):void 0,Ew({message:`${Re.label} ${o.IS_INVALID}`})):Rm.number({message:`${Re.label} ${o.IS_INVALID}`}).optional():Re.type==="boolean"?Ue=Re.required?Rm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).refine(it=>it===!0,{message:`${Re.label} ${o.IS_REQUIRED}`}):Rm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).optional():Ue=Re.required?Ke().min(1,`${Re.label} ${o.IS_REQUIRED}`):Ke().optional(),ye[me]=Ue}const Se=En(be).extend(ye).refine(me=>W?me.password===me.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Pe={email:"",password:"",...W&&{confirmPassword:""},...P?.includes("name")?{name:""}:{},...j?{username:""}:{},...P?.includes("image")&&U?{image:""}:{}};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];Re&&(Pe[me]=Re.type==="boolean"?!1:"")}const ke=_a({resolver:Ea(Se),defaultValues:Pe});a=a||ke.formState.isSubmitting||pe,E.useEffect(()=>{u?.(ke.formState.isSubmitting||pe)},[ke.formState.isSubmitting,pe,u]);const Ee=async me=>{if(U){k(!0);try{const Re=await z9(me,crypto.randomUUID(),U.size,U.extension);let Ue;U.upload?Ue=await U.upload(Re):Ue=await V9(Re),Ue?(re(Ue),ke.setValue("image",Ue)):(re(null),ke.setValue("image",""))}catch(Re){console.error(Re),D({variant:"error",message:Ut({error:Re,localization:o,localizeErrors:Z})})}k(!1)}},ze=()=>{re(null),ke.setValue("image","")},Pt=()=>{var me;return(me=F.current)==null?void 0:me.click()};async function ge({email:me,password:Re,name:Ue,username:it,confirmPassword:Fe,image:tt,...B}){try{for(const[he,fe]of Object.entries(B)){const we=y?.[he];if(we?.validate&&typeof fe=="string"&&!await we.validate(fe)){ke.setError(he,{message:`${we.label} ${o.IS_INVALID}`});return}}const q={throw:!0,headers:await g("/sign-up/email")},Y={};it!==void 0&&(!ne&&(it===null||it===""||typeof it=="string"&&it.trim()==="")||(Y.username=it)),tt!==void 0&&(Y.image=tt);const ce=await _.signUp.email({email:me,password:Re,name:Ue||"",...Y,...B,callbackURL:ee(),fetchOptions:q});"token"in ce&&ce.token?await oe():G?.otp?N(`${S}/${L.EMAIL_VERIFICATION}?email=${encodeURIComponent(me)}`):(N(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(q){D({variant:"error",message:Ut({error:q,localization:o,localizeErrors:Z})}),ke.resetField("password"),ke.resetField("confirmPassword"),p()}}return b.jsx(xa,{...ke,children:b.jsxs("form",{onSubmit:ke.handleSubmit(ge),noValidate:f,className:de("grid w-full gap-6",e,t?.base),children:[P?.includes("image")&&U&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:F,accept:"image/*",disabled:ve,hidden:!0,type:"file",onChange:me=>{var Re;const Ue=(Re=me.target.files)==null?void 0:Re.item(0);Ue&&Ee(Ue),me.target.value=""}}),b.jsx(Gt,{control:ke.control,name:"image",render:()=>b.jsxs(qt,{children:[b.jsx(Yt,{children:o.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(UO,{children:[b.jsx(BO,{asChild:!0,children:b.jsx(Ot,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(KO,{isPending:ve,className:"size-16",user:$?{name:ke.watch("name"),email:ke.watch("email"),image:$}:null,localization:o})})}),b.jsxs(zO,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[b.jsxs(hf,{onClick:Pt,disabled:ve,children:[b.jsx(aN,{}),o.UPLOAD_AVATAR]}),$&&b.jsxs(hf,{onClick:ze,disabled:ve,variant:"destructive",children:[b.jsx(dN,{}),o.DELETE_AVATAR]})]})]}),b.jsxs(Ot,{type:"button",variant:"outline",onClick:Pt,disabled:ve,children:[ve&&b.jsx(_n,{className:"animate-spin"}),o.UPLOAD]})]}),b.jsx(fn,{})]})})]}),P?.includes("name")&&b.jsx(Gt,{control:ke.control,name:"name",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),j&&b.jsx(Gt,{control:ke.control,name:"username",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.USERNAME,!ne&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"email",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"password",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),W&&b.jsx(Gt,{control:ke.control,name:"confirmPassword",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),P?.filter(me=>me!=="name"&&me!=="image").map(me=>{const Re=y?.[me];return Re?Re.type==="boolean"?b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(b0,{checked:Ue.value,onCheckedChange:Ue.onChange,disabled:a})}),b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(fn,{className:t?.error})]})},me):b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(an,{children:Re.type==="number"?b.jsx(Zr,{className:t?.input,type:"number",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):Re.multiline?b.jsx(Y9,{className:t?.input,placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):b.jsx(Zr,{className:t?.input,type:"text",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value})}),b.jsx(fn,{className:t?.error})]})},me):(console.error(`Additional field ${me} not found`),null)}),b.jsx(jc,{ref:h,localization:o,action:"/sign-up/email"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function MU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u}){var d;const f=Za(),h=f?Mo("totpURI"):null,g=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:x,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Ze);a={...S,...a};const{onSuccess:O,isPending:M}=wa({redirectTo:l}),{data:L}=_(),N=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,U]=E.useState(x?.length===1?x[0]:null),[Z,G]=E.useState(!1),[W,j]=E.useState(0),ne=En({code:Ke().min(1,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_REQUIRED}`}).min(6,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_INVALID}`}),trustDevice:Ov().optional()}),ie=_a({resolver:Ea(ne),defaultValues:{code:""}});n=n||ie.formState.isSubmitting||M,E.useEffect(()=>{u?.(ie.formState.isSubmitting||M)},[ie.formState.isSubmitting,M,u]),E.useEffect(()=>{D==="otp"&&W<=0&&!g.current&&(g.current=!0,P())},[D]),E.useEffect(()=>{if(W<=0)return;const $=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout($)},[W]);const P=async()=>{if(!(Z||W>0)){try{G(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch($){R({variant:"error",message:Ut({error:$,localization:a,localizeErrors:C})}),$.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,G(!1)}};async function F({code:$,trustDevice:re}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:$,trustDevice:re,fetchOptions:{throw:!0}}),await O(),L&&!N&&R({variant:"success",message:a?.TWO_FACTOR_ENABLED})}catch(ve){R({variant:"error",message:Ut({error:ve,localization:a,localizeErrors:C})}),ie.reset()}}return b.jsx(xa,{...ie,children:b.jsxs("form",{onSubmit:ie.handleSubmit(F),className:de("grid w-full gap-6",e,t?.base),children:[x?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(FO,{className:t?.label,children:a.TWO_FACTOR_TOTP_LABEL}),b.jsx(C9,{className:de("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Gt,{control:ie.control,name:"code",render:({field:$})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.ONE_TIME_PASSWORD}),b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:a.FORGOT_AUTHENTICATOR})]}),b.jsx(an,{children:b.jsx(_0,{...$,maxLength:6,onChange:re=>{$.onChange(re),re.length===6&&ie.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(E0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ie.control,name:"trustDevice",render:({field:$})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(b0,{checked:$.value,onCheckedChange:$.onChange,disabled:n,className:t?.checkbox})}),b.jsx(Yt,{className:t?.label,children:a.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.TWO_FACTOR_ACTION]}),D==="otp"&&x?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"outline",onClick:P,disabled:W>0||Z||n,className:de(t?.button,t?.outlineButton),children:[Z?b.jsx(_n,{className:"animate-spin"}):b.jsx(PE,{className:t?.icon}),a.RESEND_CODE,W>0&&` (${W})`]}),D!=="otp"&&x?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("otp"),disabled:n,children:[b.jsx(PE,{className:t?.icon}),a.SEND_VERIFICATION_CODE]}),D!=="totp"&&x?.includes("totp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("totp"),disabled:n,children:[b.jsx(uN,{className:t?.icon}),a.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function ZO({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:a,viewPaths:o}=E.useContext(Ze),{onSuccess:l}=wa({redirectTo:e||`${a}/${o.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(_n,{className:"animate-spin"})}function NU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,pathname:l,redirectTo:u,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:x,twoFactor:T,viewPaths:R,replace:A}=E.useContext(Ze),C=!!x;if(o={...y,...o},E.useEffect(()=>{l&&!Ng(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Ng(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(O=!0),d==="EMAIL_OTP"&&(!S||!p&&!_)&&(O=!0),d==="SIGN_UP"&&!C&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(O=!0),O&&A(`${g}/${R.SIGN_IN}${window.location.search}`)},[g,d,R,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(ZO,{redirectTo:u});if(d==="CALLBACK")return b.jsx(WO,{redirectTo:u});if(d==="SIGN_IN")return p?b.jsx(CU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):_?b.jsx(ox,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):S?b.jsx(ix,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(MU,{className:e,classNames:t,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(TU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(ox,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(ix,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(RU,{className:e,classNames:t,callbackURL:n,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(OU,{className:e,classNames:t,localization:o,isSubmitting:a,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(AU,{className:e,classNames:t,localization:o});if(d==="SIGN_UP")return C&&b.jsx(IU,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h})}function DU({className:e,classNames:t,localization:n}){const{localization:a,redirectTo:o,replace:l,toast:u}=E.useContext(Ze),d=E.useMemo(()=>({...a,...n}),[a,n]),{data:f}=L9(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Mo("invitationId");if(!p){u({variant:"error",message:d.INVITATION_NOT_FOUND}),l(o);return}g(p)},[d.INVITATION_NOT_FOUND,u,l,o]),!f||!h?b.jsx(QO,{className:e,classNames:t}):b.jsx(LU,{className:e,classNames:t,localization:d,invitationId:h})}function LU({className:e,classNames:t,localization:n,invitationId:a}){var o;const{authClient:l,hooks:{useInvitation:u},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,x]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=u({query:{id:a}}),M=E.useCallback(()=>Mo("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!a)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),g(h);return}(C.status!=="pending"||new Date(C.expiresAt)<new Date)&&(p({variant:"error",message:new Date(C.expiresAt)<new Date?_.INVITATION_EXPIRED:_.INVITATION_NOT_FOUND}),g(h))}},[C,O,a,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(M())}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),R(!1)}},N=async()=>{x(!0);try{await l.organization.rejectInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),x(!1)}},Z=((o=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(G=>G.role===C?.role))==null?void 0:o.label)||C?.role;return C?b.jsxs(Co,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs(kf,{className:de("justify-items-center text-center",t?.header),children:[b.jsx(v0,{className:de("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(jf,{className:de("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(Uf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(Co,{className:de("flex-row items-center p-4"),children:[b.jsx(YO,{organization:{id:C.organizationId,name:C.organizationName,slug:C.organizationSlug,logo:C.organizationLogo,createdAt:new Date},localization:_}),b.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:Z})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(Ot,{variant:"outline",className:de(t?.button,t?.outlineButton),onClick:N,disabled:A,children:[S?b.jsx(_n,{className:"animate-spin"}):b.jsx(Aw,{}),_.REJECT]}),b.jsxs(Ot,{className:de(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(_n,{className:"animate-spin"}):b.jsx(Iv,{}),_.ACCEPT]})]})]})]}):b.jsx(QO,{className:e,classNames:t})}var QO=({className:e,classNames:t,localization:n})=>b.jsxs(Co,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs(kf,{className:de("justify-items-center",t?.header),children:[b.jsx(vr,{className:de("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(vr,{className:de("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(Uf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(Co,{className:de("flex-row items-center p-4"),children:[b.jsx(YO,{isPending:!0,localization:n}),b.jsx(vr,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsx(vr,{className:"h-9 w-full"}),b.jsx(vr,{className:"h-9 w-full"})]})]})]});function sx({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return b.jsx(D9,{"data-slot":"separator",decorative:n,orientation:t,className:de("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}function PU({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(Ze);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[a==="EMAIL_OTP"?b.jsx(Ow,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tw,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function kU({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(Ze);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[a==="MAGIC_LINK"?b.jsx(Ow,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tw,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function jU({localization:e,redirectTo:t}){const{authClient:n,localization:a,toast:o,localizeErrors:l}=E.useContext(Ze),u=E.useRef(!1);e=E.useMemo(()=>({...a,...e}),[a,e]);const{onSuccess:d}=wa({redirectTo:t});return E.useEffect(()=>{if(!u.current){u.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){o({variant:"error",message:Ut({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,o]),null}function UU({classNames:e,isSubmitting:t,localization:n,redirectTo:a,setIsSubmitting:o}){var l,u;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(Ze);n={...f,...n};const{onSuccess:p}=wa({redirectTo:a}),y=async()=>{o?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:Ut({error:_.error,localization:n,localizeErrors:g})}),o?.(!1)):p()}catch(_){h({variant:"error",message:Ut({error:_,localization:n,localizeErrors:g})}),o?.(!1)}};return b.jsxs(Ot,{className:de("w-full",(l=e?.form)==null?void 0:l.button,(u=e?.form)==null?void 0:u.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(lN,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function lx({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,other:l,provider:u,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:x,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:M,toast:L,localizeErrors:N}=E.useContext(Ze),D=E.useCallback(()=>d||Mo("redirectTo")||A,[d,A]),U=E.useCallback(()=>`${T}${n||(R?`${x}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,x,C,T,D]),Z=async()=>{h(!0);try{if(l){const G={providerId:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};M?.signIn?(await M.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(G)}else{const G={provider:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(G)}}catch(G){L({variant:"error",message:Ut({error:G,localization:o,localizeErrors:N})}),h(!1)}};return b.jsxs(Ot,{className:de(f==="vertical"?"w-full":"grow",e,(g=t?.form)==null?void 0:g.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:a,variant:"outline",onClick:Z,children:[u.icon&&b.jsx(u.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&u.name,f==="vertical"&&`${o.SIGN_IN_WITH} ${u.name}`]})}function dz({className:e,classNames:t,callbackURL:n,cardHeader:a,cardFooter:o,localization:l,path:u,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,x,T,R;const A=Za(),{basePath:C,credentials:O,localization:M,magicLink:L,emailOTP:N,oneTap:D,passkey:U,signUp:Z,social:G,genericOAuth:W,viewPaths:j,Link:ne}=E.useContext(Ze);l={...M,...l};let ie=h;ie==="auto"&&(ie=O&&G?.providers&&G.providers.length>2?"horizontal":"vertical");const P=u??d?.split("/").pop(),F=g||Ng(j,P)||"SIGN_IN",[$,re]=E.useState(!1);if(E.useEffect(()=>{const k=()=>re(!1);return window.addEventListener("pagehide",k),()=>{re(!1),window.removeEventListener("pagehide",k)}},[]),F==="CALLBACK")return b.jsx(WO,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(ZO,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(DU,{className:e,classNames:t});const ve=!O&&!L&&!N?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(Co,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsx(kf,{className:t?.header,children:a||b.jsxs(b.Fragment,{children:[b.jsx(v0,{className:de("text-lg md:text-xl",t?.title),children:l[F]}),ve&&b.jsx(jf,{className:de("text-xs md:text-sm",t?.description),children:ve})]})}),b.jsxs(Uf,{className:de("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(jU,{localization:l,redirectTo:f}),(O||L||N)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(NU,{classNames:t?.form,callbackURL:n,isSubmitting:$,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:re}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||N&&F==="EMAIL_OTP")&&b.jsx(kU,{classNames:t,localization:l,view:F,isSubmitting:$}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||L&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(PU,{classNames:t,localization:l,view:F,isSubmitting:$})]}),F!=="RESET_PASSWORD"&&F!=="EMAIL_VERIFICATION"&&(((y=G?.providers)==null?void 0:y.length)||((_=W?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&U)&&b.jsxs(b.Fragment,{children:[(O||L||N)&&b.jsxs("div",{className:de("flex items-center gap-2",t?.continueWith),children:[b.jsx(sx,{className:de("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(sx,{className:de("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=G?.providers)==null?void 0:S.length)||((x=W?.providers)==null?void 0:x.length))&&b.jsxs("div",{className:de("flex w-full items-center justify-between gap-4",ie==="horizontal"&&"flex-wrap",ie==="vertical"&&"flex-col",ie==="grid"&&"grid grid-cols-2"),children:[(T=G?.providers)==null?void 0:T.map(k=>{const Q=vU.find(ee=>ee.provider===k);return Q?b.jsx(lx,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:ie},k):null}),(R=W?.providers)==null?void 0:R.map(k=>b.jsx(lx,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:k,redirectTo:f,setIsSubmitting:re,socialLayout:ie,other:!0},k.provider))]}),U&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(UU,{classNames:t,isSubmitting:$,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),o&&b.jsx(ov,{className:t?.footer,children:o}),O&&Z&&b.jsxs(ov,{className:de("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?l.DONT_HAVE_AN_ACCOUNT:F==="SIGN_UP"?l.ALREADY_HAVE_AN_ACCOUNT:b.jsx(nN,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(ne,{className:de("text-foreground underline",t?.footerLink),href:`${C}/${j[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),children:F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?l.SIGN_UP:l.SIGN_IN})}):b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function fz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{isPending:n}=t();return n?e:null}function hz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n}=t();return n?e:null}function pz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n,isPending:a}=t();return!n&&!a?e:null}function BU(e){const t=pf.c(8),{children:n}=e,a=Rc();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let l,u;t[1]!==a?(l=f=>a({to:f}),u=f=>a({to:f,replace:!0}),t[1]=a,t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==u?(d=b.jsx(X6,{authClient:yI,organization:o,navigate:l,replace:u,Link:zU,children:n}),t[4]=n,t[5]=l,t[6]=u,t[7]=d):d=t[7],d}function zU(e){const{href:t,className:n,children:a,...o}=e;return b.jsx(Sv,{to:t,className:n,...o,children:a})}const FU=new qC;function VU(e){const t=pf.c(3),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=b.jsx(A6,{}),t[0]=a):a=t[0];let o;return t[1]!==n?(o=b.jsxs(KC,{client:FU,children:[a,b.jsx(u4,{children:b.jsx(BU,{children:n})})]}),t[1]=n,t[2]=o):o=t[2],o}const HU=function(){return null};function $U(){const e=pf.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Uc=D3({component:()=>b.jsxs(VU,{children:[b.jsx(E.Suspense,{fallback:b.jsx($U,{}),children:b.jsx(Hx,{})}),b.jsx(HU,{})]})}),GU=Cn({getParentRoute:()=>Uc,path:"/login",component:Pn(()=>Ln(()=>import("./login-BP1nMiPU.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Hi(()=>En({next:Ke().optional(),client_id:Ke().optional(),redirect_uri:Ke().optional(),response_type:Ke().optional(),state:Ke().optional(),scope:Ke().optional(),code_challenge:Ke().optional(),code_challenge_method:Ke().optional()}))}),qU=Cn({getParentRoute:()=>Uc,path:"/auth/$pathname",component:Pn(()=>Ln(()=>import("./auth-catchall-BlTDjkLY.js"),[]))}),Br=Cn({getParentRoute:()=>Uc,id:"shell",component:Pn(()=>Ln(()=>import("./shell-layout-BY64qJt8.js"),__vite__mapDeps([4,5,2,6,7,1,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,3,40])))}),YU=Cn({getParentRoute:()=>Br,path:"/",component:Pn(()=>Ln(()=>import("./home-pjEjaP5o.js"),__vite__mapDeps([41,25,2,40,22,12,1,3,37,38,39,27])))}),KU=Cn({getParentRoute:()=>Br,path:"/$org",component:Pn(()=>Ln(()=>import("./page-C1ZOKmwf.js"),__vite__mapDeps([42,6,2,7,1,43,44,15,45,46,35,47,9,48,12,10,20,49,50,21,51,52,53])))}),WU=Cn({getParentRoute:()=>Br,path:"/$org/members",component:Pn(()=>Ln(()=>import("./members-CMW2_o9N.js"),__vite__mapDeps([54,43,44,1,2,15,7,45,46,55,5,3,56,57,6,58,59,60,61,9,40,52,38,16,13,62,11,12,34,35,39,17,18,25,63,64])))}),ZU=Cn({getParentRoute:()=>Br,path:"/$org/mcps",component:Pn(()=>Ln(()=>import("./connections-DmpFPSpw.js"),__vite__mapDeps([65,43,44,1,2,15,7,45,46,55,5,3,56,24,25,6,35,66,19,38,52,16,13,39,63,67,12,34,11,23,17,18,68]))),validateSearch:Hi(()=>En({action:Tv(["create"]).optional()}))}),QU=Cn({getParentRoute:()=>Br,path:"/$org/settings",component:Pn(()=>Ln(()=>import("./settings-9DHfPDgm.js"),__vite__mapDeps([69,43,44,1,2,15,7,45,46,39,3,70,13])))}),XU=Cn({getParentRoute:()=>Br,path:"/$org/monitoring",component:Pn(()=>Ln(()=>import("./monitoring-BcSjVFrb.js"),__vite__mapDeps([71,6,2,7,1,43,44,15,45,46,55,5,3,35,49,50,21,51,52,18,20,60,47,9,58,72,32,17,33,73]))),validateSearch:Hi(()=>En({from:Ke().default("now-24h"),to:Ke().default("now"),connectionId:TE(Ke()).optional().default([]),gatewayId:TE(Ke()).optional().default([]),tool:Ke().default(""),status:Tv(["all","success","errors"]).default("all"),search:Ke().default(""),page:Ew().optional(),streaming:Ov().default(!0)}))}),XO=Cn({getParentRoute:()=>Br,path:"/$org/store",component:Pn(()=>Ln(()=>import("./store-BwXm_Abw.js"),__vite__mapDeps([74,61,43,44,1,2,15,7,45,6,75,76,11,5,55,3,25,77,78,17,18,12,24,30,31,8,9])))}),JU=Cn({getParentRoute:()=>XO,path:"/$appName",component:Pn(()=>Ln(()=>import("./store-app-detail-DJ15hlvl.js"),__vite__mapDeps([79,22,11,1,2,59,6,7,80,18,12,15,26,5,81,9,28,77,44,45,55,3,56,25,82,83,84,52,30,31,47,85,86,68,75,78,29]))),validateSearch:Hi(()=>En({registryId:Ke().optional(),serverName:Ke().optional(),itemId:Ke().optional()}))}),eB=Cn({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId",component:Pn(()=>Ln(()=>import("./connection-detail-DC_zKkGB.js"),__vite__mapDeps([87,5,2,35,1,6,7,30,31,88,89,36,67,3,12,34,47,9,28,64,11,82,59,39,17,18,23,20,15,10,90,86,77,68,50,72,91,84,52,44,45,55,25,21,63,66,19,56,76,38,81,83]))),validateSearch:Hi(()=>En({tab:Ke().optional()}))}),tB=Cn({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Pn(()=>Ln(()=>import("./collection-detail-BnGYzoyo.js"),__vite__mapDeps([92,6,2,7,1,14,15,16,13,10,5,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,35,8,9,39,3,11,12,70,82,59,33,51,62,88,89,36,67,34,47,64,90,86,77,68,50,72,85,45,48,73,52]))),validateSearch:Hi(()=>En({replayId:Ke().optional()}))}),nB=Cn({getParentRoute:()=>Br,path:"/$org/gateways",component:Pn(()=>Ln(()=>import("./gateways-DoXPnx0h.js"),__vite__mapDeps([93,43,44,1,2,15,7,45,46,55,5,3,56,24,25,6,35,20,66,19,38,52,10,63,11,34]))),validateSearch:Hi(()=>En({action:Tv(["create"]).optional()}))}),rB=Cn({getParentRoute:()=>Br,path:"/$org/gateways/$gatewayId",component:Pn(()=>Ln(()=>import("./gateway-detail-CEHicKUV.js"),__vite__mapDeps([94,5,2,35,1,6,7,57,58,59,55,3,12,13,20,91,90,21,10,29,11,39,17,18,84,52,75,82]))),validateSearch:Hi(()=>En({tab:Ke().optional()}))}),aB=Cn({getParentRoute:()=>Uc,path:"/oauth/callback",component:Pn(()=>Ln(()=>import("./oauth-callback-DLDcCDZ7.js"),__vite__mapDeps([95,25,2,22,80,11,89,31])))}),iB=XO.addChildren([JU]),oB=Br.addChildren([YU,KU,WU,ZU,nB,rB,XU,iB,QU,eB,tB]),sB=Uc.addChildren([oB,GU,qU,aB]),lB=V3({routeTree:sB}),cB=document.getElementById("root");EC.createRoot(cB).render(b.jsx(E.StrictMode,{children:b.jsx(G3,{router:lB})}));export{U7 as $,dz as A,We as B,CL as C,rz as D,V as E,No as F,X9 as G,XR as H,uP as I,OR as J,l4 as K,cP as L,pB as M,mB as N,AL as O,TL as P,iw as Q,RL as R,$U as S,IL as T,uz as U,TE as V,RB as W,Ov as X,YC as Y,B7 as Z,z7 as _,yI as a,XB as a$,Tv as a0,hn as a1,Qa as a2,Xr as a3,Qr as a4,FR as a5,ZR as a6,ji as a7,Z8 as a8,Vv as a9,Aw as aA,dN as aB,RR as aC,cN as aD,sN as aE,AB as aF,cz as aG,Ve as aH,OL as aI,Sv as aJ,gN as aK,oM as aL,K2 as aM,Z2 as aN,C7 as aO,tk as aP,BR as aQ,EB as aR,xB as aS,Lc as aT,Tc as aU,OB as aV,bB as aW,_B as aX,Ew as aY,SB as aZ,wB as a_,lR as aa,Hv as ab,yc as ac,Jw as ad,Fv as ae,zv as af,Q8 as ag,X8 as ah,uB as ai,Io as aj,Ux as ak,bf as al,sv as am,Vi as an,qa as ao,BC as ap,L_ as aq,fB as ar,dB as as,o4 as at,n4 as au,tr as av,In as aw,Ln as ax,N7 as ay,zx as az,Ev as b,QB as b$,Hi as b0,vB as b1,yB as b2,gB as b3,tz as b4,nz as b5,ez as b6,S7 as b7,x7 as b8,w7 as b9,hx as bA,Vw as bB,MB as bC,CB as bD,KB as bE,kB as bF,BB as bG,NB as bH,VN as bI,LB as bJ,$N as bK,JE as bL,DB as bM,Hw as bN,JB as bO,qB as bP,UB as bQ,YB as bR,IB as bS,PB as bT,xf as bU,Sf as bV,GN as bW,WB as bX,jB as bY,Yw as bZ,ZB as b_,R7 as ba,O7 as bb,oz as bc,sz as bd,lz as be,iz as bf,wc as bg,An as bh,cg as bi,dx as bj,WC as bk,XC as bl,r4 as bm,JC as bn,e4 as bo,Xn as bp,i4 as bq,P_ as br,a4 as bs,t4 as bt,mN as bu,yN as bv,Ef as bw,kv as bx,dc as by,HC as bz,pf as c,qN as c0,ZN as c1,KN as c2,QN as c3,$w as c4,VB as c5,HB as c6,zB as c7,FB as c8,$B as c9,GB as ca,Ks as cb,TB as cc,_v as d,er as e,Rc as f,az as g,zN as h,Fw as i,b as j,D9 as k,Ze as l,fz as m,hz as n,pz as o,s4 as p,Hx as q,E as r,En as s,IE as t,hB as u,Ke as v,Ea as w,_a as x,Ac as y,Bt as z};