@decocms/mesh 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DaEUMwle.js → AlertCircle-cYjr_0xB.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CvFDkdiU.js → ArrowLeft-CBi8stO3.js} +1 -1
- package/dist/client/assets/{Calendar-DBqzL4c-.js → Calendar-cB-o1wit.js} +1 -1
- package/dist/client/assets/{ChevronDown-g4L12M9A.js → ChevronDown-7kPeUreU.js} +1 -1
- package/dist/client/assets/{Clock-C-uwthk9.js → Clock-D4OCvk0s.js} +1 -1
- package/dist/client/assets/{Copy01-CHjgpWtl.js → Copy01-DmZIDbuC.js} +1 -1
- package/dist/client/assets/{CpuChip02-DlCI7cQJ.js → CpuChip02-CvUOZekE.js} +1 -1
- package/dist/client/assets/{DotsVertical-CIfapH0j.js → DotsVertical-CugHspqx.js} +1 -1
- package/dist/client/assets/{File06-CBkqKj5m.js → File06-B9Csx588.js} +1 -1
- package/dist/client/assets/{GitBranch01-Ci5lqvRi.js → GitBranch01-DGYWk3k6.js} +1 -1
- package/dist/client/assets/{Inbox01-DCkU3Xgq.js → Inbox01-x47sKUjp.js} +1 -1
- package/dist/client/assets/{InfoCircle-BwNsGATl.js → InfoCircle-DXZ2AFmC.js} +1 -1
- package/dist/client/assets/{Key01-5nxXQgMM.js → Key01-BemiGYAL.js} +1 -1
- package/dist/client/assets/{LinkExternal01-ISpHuMJE.js → LinkExternal01-BrZUQjLP.js} +1 -1
- package/dist/client/assets/{Loading01-r04aEG5T.js → Loading01-CZ--C9o4.js} +1 -1
- package/dist/client/assets/{Plus-CS_Y2Vnc.js → Plus-B87V-eUk.js} +1 -1
- package/dist/client/assets/SearchMd-C_x78fQD.js +1 -0
- package/dist/client/assets/{Terminal-DYN6gEAz.js → Terminal-Bp8rdp_p.js} +1 -1
- package/dist/client/assets/{Trash01-DVxmznxT.js → Trash01-kv9nDzIp.js} +1 -1
- package/dist/client/assets/{Upload01-Da0sGkRE.js → Upload01-BkY8x2qR.js} +1 -1
- package/dist/client/assets/{X-BX0rl0N7.js → X-BI6-CrX0.js} +1 -1
- package/dist/client/assets/{XClose-BUuGHVgA.js → XClose-CPlecLXh.js} +1 -1
- package/dist/client/assets/{alert-dialog-DdP064l-.js → alert-dialog-DLlk9oGk.js} +3 -3
- package/dist/client/assets/{auth-AUS48lXs.js → auth-O7mzDtBv.js} +1 -1
- package/dist/client/assets/{auth-catchall-DqCIX1bA.js → auth-catchall-Cj2BmrFb.js} +1 -1
- package/dist/client/assets/avatar-yEkJ_N8H.js +1 -0
- package/dist/client/assets/badge-CzGd9Js-.js +1 -0
- package/dist/client/assets/button-RGWd1X_P.js +1 -0
- package/dist/client/assets/card-Bch45nKF.js +1 -0
- package/dist/client/assets/checkbox-Bkz-wJOC.js +1 -0
- package/dist/client/assets/collection-detail-BrxtwdmN.js +184 -0
- package/dist/client/assets/collection-display-button-s3SUZ2ky.js +1 -0
- package/dist/client/assets/{collection-header-DcpyPzrC.js → collection-header-g7B4v38B.js} +1 -1
- package/dist/client/assets/{collection-page-DpUZNbpd.js → collection-page-CXQu5PW5.js} +1 -1
- package/dist/client/assets/collection-search-B_ze9BPw.js +1 -0
- package/dist/client/assets/collection-table-wrapper-yPDs4QFo.js +1 -0
- package/dist/client/assets/connection-card-B2ZNmA6T.js +1 -0
- package/dist/client/assets/connection-detail-D98NZkPb.js +1 -0
- package/dist/client/assets/connections-CdxYZab0.js +1 -0
- package/dist/client/assets/{core-DJoPglro.js → core-GvCAeL42.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-fbCy_hNu.js → create-organization-dialog-c2EjUvFE.js} +1 -1
- package/dist/client/assets/dialog-xbeC24qR.js +1 -0
- package/dist/client/assets/dropdown-menu-Dz-Cfe4c.js +1 -0
- package/dist/client/assets/{env-vars-editor-DEYac6H7.js → env-vars-editor-B-ADXMkg.js} +1 -1
- package/dist/client/assets/{error-boundary-CdmYlIj7.js → error-boundary-IlI5HY5C.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Ty2DjF1e.js → extract-connection-data-3bWrIOWG.js} +1 -1
- package/dist/client/assets/form-C0miQmjx.js +1 -0
- package/dist/client/assets/formatDistanceToNow-BgvVIEk6.js +1 -0
- package/dist/client/assets/gateway-detail-C1Vlo23c.js +1 -0
- package/dist/client/assets/gateways-BphVjp-r.js +1 -0
- package/dist/client/assets/home-GBkZhhXc.js +1 -0
- package/dist/client/assets/{index-JV0IIYp6.js → index-CbrmpR2c.js} +1 -1
- package/dist/client/assets/index-Ce0bVa0I.js +155 -0
- package/dist/client/assets/index-FEm5nfEy.css +1 -0
- package/dist/client/assets/{index-DDiLOLYT.js → index-KVbZU2bI.js} +1 -1
- package/dist/client/assets/index-RUqw7d0T.js +25 -0
- package/dist/client/assets/input-Cc7Y8Lsj.js +1 -0
- package/dist/client/assets/{json-syntax-highlighter-i1hiMNnF.js → json-syntax-highlighter-Bc0wDiKJ.js} +2 -2
- package/dist/client/assets/json-zc228CLg.js +1 -0
- package/dist/client/assets/{layout-dxbGsEKV.js → layout-k5sx-zLk.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-QDCjbXst.js → lazy-highlighter-tp_1h6Wp.js} +1 -1
- package/dist/client/assets/{localstorage-keys-D7pZSS7H.js → localstorage-keys-C2n4sqaz.js} +1 -1
- package/dist/client/assets/login-BI3qBB8Y.js +1 -0
- package/dist/client/assets/{mcp-oauth-D7V7V-GS.js → mcp-oauth-BrdcIayH.js} +1 -1
- package/dist/client/assets/members-ClQFNkDC.js +3 -0
- package/dist/client/assets/monitoring-BXnIcCQV.js +1 -0
- package/dist/client/assets/oauth-callback-uokDqdRF.js +1 -0
- package/dist/client/assets/{page-C8KGQPlY.js → page-D8Upjw8L.js} +2 -2
- package/dist/client/assets/popover-gYOPU7b5.js +1 -0
- package/dist/client/assets/prism-light-BmyQu-TG.js +1 -0
- package/dist/client/assets/{resizable-B3HA_CX4.js → resizable-0evkHPjb.js} +48 -48
- package/dist/client/assets/resource-tabs-Bp2LCK5n.js +1 -0
- package/dist/client/assets/select-B-74Vw7Q.js +1 -0
- package/dist/client/assets/settings-DZGZ9pQP.js +1 -0
- package/dist/client/assets/shell-layout-CmBAtkbZ.js +17 -0
- package/dist/client/assets/spinner-B6Gpa1lS.js +1 -0
- package/dist/client/assets/store-CZ1oyjvA.js +1 -0
- package/dist/client/assets/store-app-detail-Cr8HLsme.js +1 -0
- package/dist/client/assets/switch-C6VfIG9f.js +1 -0
- package/dist/client/assets/{tools-list-BsHebq88.js → tools-list-6PdjsEP-.js} +1 -1
- package/dist/client/assets/tooltip-B77piVwL.js +1 -0
- package/dist/client/assets/{types-D4T3qWDr.js → types-0U77q4OL.js} +5 -5
- package/dist/client/assets/{use-binding-CapMpNVF.js → use-binding-DOHpn0td.js} +6 -6
- package/dist/client/assets/use-connection-CcfriG4b.js +2 -0
- package/dist/client/assets/{use-connection-resources-FqHsvBSA.js → use-connection-resources-C-ecJARs.js} +1 -1
- package/dist/client/assets/{use-gateway-CseaalWF.js → use-gateway-CCphplYZ.js} +1 -1
- package/dist/client/assets/{use-list-state-7NLbXyOC.js → use-list-state-Bcpc0dEc.js} +1 -1
- package/dist/client/assets/{use-mcp-M6XXMHar.js → use-mcp-B7yS6xB_.js} +1 -1
- package/dist/client/assets/{use-members-DzZB15s9.js → use-members-ii7q5pxE.js} +1 -1
- package/dist/client/assets/{use-mobile-TpeNqylz.js → use-mobile-DYo2aQNt.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BAhAEDx8.js → use-organization-settings-uQsDNKHC.js} +1 -1
- package/dist/client/assets/{use-tool-call-CQCb5PBf.js → use-tool-call-CI1nZAFC.js} +1 -1
- package/dist/client/assets/useQuery-CF3kr9sY.js +1 -0
- package/dist/client/assets/view-mode-toggle-BGpxvqYI.js +1 -0
- package/dist/client/assets/{well-known-mcp-BPQQU1v0.js → well-known-mcp-B16sbKCU.js} +1 -1
- package/dist/client/empty-state-error.svg +19 -0
- package/dist/client/empty-state-logs.svg +80 -0
- package/dist/client/empty-state-success-muted.svg +19 -0
- package/dist/client/empty-state-success.svg +19 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate.js +45 -45
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/CheckCircle-CILz6OCh.js +0 -1
- package/dist/client/assets/SearchMd-1Gq7nypQ.js +0 -1
- package/dist/client/assets/avatar-bcdjVFyi.js +0 -1
- package/dist/client/assets/badge-1WraHGEG.js +0 -1
- package/dist/client/assets/button-DodNLkpL.js +0 -1
- package/dist/client/assets/card-BHz-BqEu.js +0 -1
- package/dist/client/assets/checkbox-Bj9jBMQF.js +0 -1
- package/dist/client/assets/collection-detail-QGbMDWA7.js +0 -184
- package/dist/client/assets/collection-display-button-475jHotV.js +0 -1
- package/dist/client/assets/collection-search-DVBnlN6E.js +0 -1
- package/dist/client/assets/collection-table-wrapper-DQ4F9pbh.js +0 -1
- package/dist/client/assets/connection-card-opsQBUfD.js +0 -1
- package/dist/client/assets/connection-detail-DpiL6xjK.js +0 -1
- package/dist/client/assets/connections-CeDc3J_o.js +0 -1
- package/dist/client/assets/dialog-BqvvzTa7.js +0 -1
- package/dist/client/assets/dropdown-menu-DrQKdl4f.js +0 -1
- package/dist/client/assets/form-Bus-fIfC.js +0 -1
- package/dist/client/assets/formatDistanceToNow-D46rGC8T.js +0 -1
- package/dist/client/assets/gateway-detail-fCVh3_nF.js +0 -1
- package/dist/client/assets/gateways-DQmZoxNy.js +0 -1
- package/dist/client/assets/home-heelYyW2.js +0 -1
- package/dist/client/assets/index-A52jfksK.js +0 -156
- package/dist/client/assets/index-DKrh5SL2.css +0 -1
- package/dist/client/assets/index-td_4XAxf.js +0 -25
- package/dist/client/assets/input-BXHWk19m.js +0 -1
- package/dist/client/assets/json-gPxhilNK.js +0 -1
- package/dist/client/assets/login-CcnR2b1q.js +0 -1
- package/dist/client/assets/members-D5QtYSzf.js +0 -3
- package/dist/client/assets/monitoring-Cp92YRPy.js +0 -1
- package/dist/client/assets/oauth-callback-1_PgXFG_.js +0 -1
- package/dist/client/assets/popover-MhzpcVkW.js +0 -1
- package/dist/client/assets/prism-light-C-ukkBST.js +0 -1
- package/dist/client/assets/resource-tabs-ru5yaRIE.js +0 -1
- package/dist/client/assets/select-Be0LRVWn.js +0 -1
- package/dist/client/assets/settings-gZFi_2QA.js +0 -1
- package/dist/client/assets/shell-layout-adVEIdhn.js +0 -17
- package/dist/client/assets/spinner-oZ2DO2-U.js +0 -1
- package/dist/client/assets/store-DzO4PTg0.js +0 -1
- package/dist/client/assets/store-app-detail-BIXt1EdE.js +0 -1
- package/dist/client/assets/switch-DsCvClV8.js +0 -1
- package/dist/client/assets/tooltip-BjhP6ibY.js +0 -1
- package/dist/client/assets/use-connection-BX5-4xHw.js +0 -2
- package/dist/client/assets/useQuery-ojqdZMTH.js +0 -1
- package/dist/client/assets/utils-DgLfrg3u.js +0 -1
- package/dist/client/assets/view-mode-toggle-DAXMt6ZW.js +0 -1
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-CcnR2b1q.js","assets/button-DodNLkpL.js","assets/utils-DgLfrg3u.js","assets/input-BXHWk19m.js","assets/shell-layout-adVEIdhn.js","assets/SearchMd-1Gq7nypQ.js","assets/use-connection-BX5-4xHw.js","assets/tooltip-BjhP6ibY.js","assets/localstorage-keys-D7pZSS7H.js","assets/useQuery-ojqdZMTH.js","assets/CpuChip02-DlCI7cQJ.js","assets/Loading01-r04aEG5T.js","assets/Plus-CS_Y2Vnc.js","assets/X-BX0rl0N7.js","assets/resizable-B3HA_CX4.js","assets/dropdown-menu-DrQKdl4f.js","assets/dialog-BqvvzTa7.js","assets/select-Be0LRVWn.js","assets/ChevronDown-g4L12M9A.js","assets/use-mobile-TpeNqylz.js","assets/use-gateway-CseaalWF.js","assets/Copy01-CHjgpWtl.js","assets/AlertCircle-DaEUMwle.js","assets/Terminal-DYN6gEAz.js","assets/connection-card-opsQBUfD.js","assets/card-BHz-BqEu.js","assets/LinkExternal01-ISpHuMJE.js","assets/spinner-oZ2DO2-U.js","assets/File06-CBkqKj5m.js","assets/InfoCircle-BwNsGATl.js","assets/use-binding-CapMpNVF.js","assets/auth-AUS48lXs.js","assets/popover-MhzpcVkW.js","assets/Clock-C-uwthk9.js","assets/Trash01-DVxmznxT.js","assets/error-boundary-CdmYlIj7.js","assets/generate-id-Dyweu44Y.js","assets/use-organization-settings-BAhAEDx8.js","assets/create-organization-dialog-fbCy_hNu.js","assets/alert-dialog-DdP064l-.js","assets/form-Bus-fIfC.js","assets/avatar-bcdjVFyi.js","assets/home-heelYyW2.js","assets/page-C8KGQPlY.js","assets/collection-header-DcpyPzrC.js","assets/collection-display-button-475jHotV.js","assets/view-mode-toggle-DAXMt6ZW.js","assets/collection-page-DpUZNbpd.js","assets/use-tool-call-CQCb5PBf.js","assets/GitBranch01-Ci5lqvRi.js","assets/types-D4T3qWDr.js","assets/index-DDiLOLYT.js","assets/json-syntax-highlighter-i1hiMNnF.js","assets/badge-1WraHGEG.js","assets/page-BZV40eAE.css","assets/members-D5QtYSzf.js","assets/collection-search-DVBnlN6E.js","assets/collection-table-wrapper-DQ4F9pbh.js","assets/switch-DsCvClV8.js","assets/checkbox-Bj9jBMQF.js","assets/ArrowLeft-CvFDkdiU.js","assets/use-members-DzZB15s9.js","assets/well-known-mcp-BPQQU1v0.js","assets/XClose-BUuGHVgA.js","assets/DotsVertical-CIfapH0j.js","assets/Key01-5nxXQgMM.js","assets/connections-CeDc3J_o.js","assets/use-list-state-7NLbXyOC.js","assets/env-vars-editor-DEYac6H7.js","assets/settings-gZFi_2QA.js","assets/Upload01-Da0sGkRE.js","assets/monitoring-Cp92YRPy.js","assets/index-JV0IIYp6.js","assets/Calendar-DBqzL4c-.js","assets/store-DzO4PTg0.js","assets/slugify-CEUa2lfQ.js","assets/Inbox01-DCkU3Xgq.js","assets/registry-utils-ulDDT0d8.js","assets/app-name-gTETL9So.js","assets/store-app-detail-BIXt1EdE.js","assets/CheckCircle-CILz6OCh.js","assets/tools-list-BsHebq88.js","assets/layout-dxbGsEKV.js","assets/tools-list-CSRUKxnt.css","assets/resource-tabs-ru5yaRIE.js","assets/use-mcp-M6XXMHar.js","assets/extract-connection-data-Ty2DjF1e.js","assets/connection-detail-DpiL6xjK.js","assets/index-td_4XAxf.js","assets/mcp-oauth-D7V7V-GS.js","assets/formatDistanceToNow-D46rGC8T.js","assets/use-connection-resources-FqHsvBSA.js","assets/collection-detail-QGbMDWA7.js","assets/gateways-DQmZoxNy.js","assets/gateway-detail-fCVh3_nF.js","assets/oauth-callback-1_PgXFG_.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function _4(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(o,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>o[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();const E4="modulepreload",S4=function(e){return"/"+e},v_={},Dn=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let c=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");i=c(n.map(h=>{if(h=S4(h),h in v_)return;v_[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":E4,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(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var LH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jp={exports:{}},Dl={};var y_;function w4(){if(y_)return Dl;y_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:e,type:o,key:c,ref:i!==void 0?i:null,props:l}}return Dl.Fragment=t,Dl.jsx=n,Dl.jsxs=n,Dl}var b_;function x4(){return b_||(b_=1,Jp.exports=w4()),Jp.exports}var b=x4(),em={exports:{}},Ll={},tm={exports:{}},nm={};var __;function R4(){return __||(__=1,(function(e){function t(P,F){var H=P.length;P.push(F);e:for(;0<H;){var re=H-1>>>1,ye=P[re];if(0<i(ye,F))P[re]=F,P[H]=ye,H=re;else break e}}function n(P){return P.length===0?null:P[0]}function o(P){if(P.length===0)return null;var F=P[0],H=P.pop();if(H!==F){P[0]=H;e:for(var re=0,ye=P.length,k=ye>>>1;re<k;){var Q=2*(re+1)-1,ee=P[Q],se=Q+1,me=P[se];if(0>i(ee,H))se<ye&&0>i(me,ee)?(P[re]=me,P[se]=H,re=se):(P[re]=ee,P[Q]=H,re=Q);else if(se<ye&&0>i(me,H))P[re]=me,P[se]=H,re=se;else break e}}return F}function i(P,F){var H=P.sortIndex-F.sortIndex;return H!==0?H: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 c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],g=1,p=null,y=3,_=!1,S=!1,w=!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)o(h);else if(F.startTime<=P)o(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function M(P){if(w=!1,O(P),!S)if(n(f)!==null)S=!0,L||(L=!0,K());else{var F=n(h);F!==null&&ae(M,F.startTime-P)}}var L=!1,N=-1,D=5,z=-1;function W(){return T?!0:!(e.unstable_now()-z<D)}function G(){if(T=!1,L){var P=e.unstable_now();z=P;var F=!0;try{e:{S=!1,w&&(w=!1,A(N),N=-1),_=!0;var H=y;try{t:{for(O(P),p=n(f);p!==null&&!(p.expirationTime>P&&W());){var re=p.callback;if(typeof re=="function"){p.callback=null,y=p.priorityLevel;var ye=re(p.expirationTime<=P);if(P=e.unstable_now(),typeof ye=="function"){p.callback=ye,O(P),F=!0;break t}p===n(f)&&o(f),O(P)}else o(f);p=n(f)}if(p!==null)F=!0;else{var k=n(h);k!==null&&ae(M,k.startTime-P),F=!1}}break e}finally{p=null,y=H,_=!1}F=void 0}}finally{F?K():L=!1}}}var K;if(typeof C=="function")K=function(){C(G)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,ne=j.port2;j.port1.onmessage=G,K=function(){ne.postMessage(null)}}else K=function(){R(G,0)};function ae(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 H=y;y=F;try{return P()}finally{y=H}},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 H=y;y=P;try{return F()}finally{y=H}},e.unstable_scheduleCallback=function(P,F,H){var re=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?re+H:re):H=re,P){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=H+ye,P={id:g++,callback:F,priorityLevel:P,startTime:H,expirationTime:ye,sortIndex:-1},H>re?(P.sortIndex=H,t(h,P),n(f)===null&&P===n(h)&&(w?(A(N),N=-1):w=!0,ae(M,H-re))):(P.sortIndex=ye,t(f,P),S||_||(S=!0,L||(L=!0,K()))),P},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(P){var F=y;return function(){var H=y;y=F;try{return P.apply(this,arguments)}finally{y=H}}}})(nm)),nm}var E_;function O4(){return E_||(E_=1,tm.exports=R4()),tm.exports}var rm={exports:{}},Fe={};var S_;function T4(){if(S_)return Fe;S_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=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(){}},w=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,w(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 z(k,Q,ee){var se=ee.ref;return{$$typeof:e,type:k,key:Q,ref:se!==void 0?se:null,props:ee}}function W(k,Q){return z(k.type,Q,k.props)}function G(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function K(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?K(""+k.key):Q.toString(36)}function ae(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,se,me){var _e=typeof k;(_e==="undefined"||_e==="boolean")&&(k=null);var be=!1;if(k===null)be=!0;else switch(_e){case"bigint":case"string":case"number":be=!0;break;case"object":switch(k.$$typeof){case e:case t:be=!0;break;case g:return be=k._init,P(be(k._payload),Q,ee,se,me)}}if(be)return me=me(k),be=se===""?"."+ne(k,0):se,M(me)?(ee="",be!=null&&(ee=be.replace(j,"$&/")+"/"),P(me,Q,ee,"",function(Le){return Le})):me!=null&&(G(me)&&(me=W(me,ee+(me.key==null||k&&k.key===me.key?"":(""+me.key).replace(j,"$&/")+"/")+be)),Q.push(me)),1;be=0;var Se=se===""?".":se+":";if(M(k))for(var De=0;De<k.length;De++)se=k[De],_e=Se+ne(se,De),be+=P(se,Q,ee,_e,me);else if(De=_(k),typeof De=="function")for(k=De.call(k),De=0;!(se=k.next()).done;)se=se.value,_e=Se+ne(se,De++),be+=P(se,Q,ee,_e,me);else if(_e==="object"){if(typeof k.then=="function")return P(ae(k),Q,ee,se,me);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 be}function F(k,Q,ee){if(k==null)return k;var se=[],me=0;return P(k,se,"","",function(_e){return Q.call(ee,_e,me++)}),se}function H(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)},ye={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 Fe.Activity=p,Fe.Children=ye,Fe.Component=R,Fe.Fragment=n,Fe.Profiler=i,Fe.PureComponent=C,Fe.StrictMode=o,Fe.Suspense=f,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(k){return N.H.useMemoCache(k)}},Fe.cache=function(k){return function(){return k.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function(k,Q,ee){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var se=w({},k.props),me=k.key;if(Q!=null)for(_e in Q.key!==void 0&&(me=""+Q.key),Q)!D.call(Q,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&Q.ref===void 0||(se[_e]=Q[_e]);var _e=arguments.length-2;if(_e===1)se.children=ee;else if(1<_e){for(var be=Array(_e),Se=0;Se<_e;Se++)be[Se]=arguments[Se+2];se.children=be}return z(k.type,me,se)},Fe.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:l,_context:k},k},Fe.createElement=function(k,Q,ee){var se,me={},_e=null;if(Q!=null)for(se in Q.key!==void 0&&(_e=""+Q.key),Q)D.call(Q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=Q[se]);var be=arguments.length-2;if(be===1)me.children=ee;else if(1<be){for(var Se=Array(be),De=0;De<be;De++)Se[De]=arguments[De+2];me.children=Se}if(k&&k.defaultProps)for(se in be=k.defaultProps,be)me[se]===void 0&&(me[se]=be[se]);return z(k,_e,me)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(k){return{$$typeof:d,render:k}},Fe.isValidElement=G,Fe.lazy=function(k){return{$$typeof:g,_payload:{_status:-1,_result:k},_init:H}},Fe.memo=function(k,Q){return{$$typeof:h,type:k,compare:Q===void 0?null:Q}},Fe.startTransition=function(k){var Q=N.T,ee={};N.T=ee;try{var se=k(),me=N.S;me!==null&&me(ee,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(L,re)}catch(_e){re(_e)}finally{Q!==null&&ee.types!==null&&(Q.types=ee.types),N.T=Q}},Fe.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Fe.use=function(k){return N.H.use(k)},Fe.useActionState=function(k,Q,ee){return N.H.useActionState(k,Q,ee)},Fe.useCallback=function(k,Q){return N.H.useCallback(k,Q)},Fe.useContext=function(k){return N.H.useContext(k)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(k,Q){return N.H.useDeferredValue(k,Q)},Fe.useEffect=function(k,Q){return N.H.useEffect(k,Q)},Fe.useEffectEvent=function(k){return N.H.useEffectEvent(k)},Fe.useId=function(){return N.H.useId()},Fe.useImperativeHandle=function(k,Q,ee){return N.H.useImperativeHandle(k,Q,ee)},Fe.useInsertionEffect=function(k,Q){return N.H.useInsertionEffect(k,Q)},Fe.useLayoutEffect=function(k,Q){return N.H.useLayoutEffect(k,Q)},Fe.useMemo=function(k,Q){return N.H.useMemo(k,Q)},Fe.useOptimistic=function(k,Q){return N.H.useOptimistic(k,Q)},Fe.useReducer=function(k,Q,ee){return N.H.useReducer(k,Q,ee)},Fe.useRef=function(k){return N.H.useRef(k)},Fe.useState=function(k){return N.H.useState(k)},Fe.useSyncExternalStore=function(k,Q,ee){return N.H.useSyncExternalStore(k,Q,ee)},Fe.useTransition=function(){return N.H.useTransition()},Fe.version="19.2.3",Fe}var w_;function ja(){return w_||(w_=1,rm.exports=T4()),rm.exports}var om={exports:{}},Mn={};var x_;function A4(){if(x_)return Mn;x_=1;var e=ja();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 o={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},i=Symbol.for("react.portal");function l(f,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:f,containerInfo:h,implementation:g}}var c=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 Mn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Mn.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)},Mn.flushSync=function(f){var h=c.T,g=o.p;try{if(c.T=null,o.p=2,f)return f()}finally{c.T=h,o.p=g,o.d.f()}},Mn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(f,h))},Mn.prefetchDNS=function(f){typeof f=="string"&&o.d.D(f)},Mn.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"?o.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:_}):g==="script"&&o.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Mn.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);o.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&&o.d.M(f)},Mn.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);o.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})}},Mn.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);o.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 o.d.m(f)},Mn.requestFormReset=function(f){o.d.r(f)},Mn.unstable_batchedUpdates=function(f,h){return f(h)},Mn.useFormState=function(f,h,g){return c.H.useFormState(f,h,g)},Mn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Mn.version="19.2.3",Mn}var R_;function ww(){if(R_)return om.exports;R_=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(),om.exports=A4(),om.exports}var O_;function C4(){if(O_)return Ll;O_=1;var e=O4(),t=ja(),n=ww();function o(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,s=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(s=a.return),r=a.return;while(r)}return a.tag===3?s:null}function c(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(o(188))}function h(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(o(188));return a!==r?null:r}for(var s=r,u=a;;){var m=s.return;if(m===null)break;var v=m.alternate;if(v===null){if(u=m.return,u!==null){s=u;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===s)return f(m),r;if(v===u)return f(m),a;v=v.sibling}throw Error(o(188))}if(s.return!==u.return)s=m,u=v;else{for(var x=!1,I=m.child;I;){if(I===s){x=!0,s=m,u=v;break}if(I===u){x=!0,u=m,s=v;break}I=I.sibling}if(!x){for(I=v.child;I;){if(I===s){x=!0,s=v,u=m;break}if(I===u){x=!0,u=v,s=m;break}I=I.sibling}if(!x)throw Error(o(189))}}if(s.alternate!==u)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?r:a}function g(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=g(r),a!==null)return a;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=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"),z=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function K(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 w:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case M:return"Suspense";case L:return"SuspenseList";case z: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 a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case N:return a=r.displayName||null,a!==null?a:ne(r.type)||"Memo";case D:a=r._payload,r=r._init;try{return ne(r(a))}catch{}}return null}var ae=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,H={pending:!1,data:null,method:null,action:null},re=[],ye=-1;function k(r){return{current:r}}function Q(r){0>ye||(r.current=re[ye],re[ye]=null,ye--)}function ee(r,a){ye++,re[ye]=r.current,r.current=a}var se=k(null),me=k(null),_e=k(null),be=k(null);function Se(r,a){switch(ee(_e,a),ee(me,r),ee(se,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?Bb(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=Bb(a),r=Fb(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(se),ee(se,r)}function De(){Q(se),Q(me),Q(_e)}function Le(r){r.memoizedState!==null&&ee(be,r);var a=se.current,s=Fb(a,r.type);a!==s&&(ee(me,r),ee(se,s))}function Ee(r){me.current===r&&(Q(se),Q(me)),be.current===r&&(Q(be),Cl._currentValue=H)}var ze,Nt;function ve(r){if(ze===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);ze=a&&a[1]||"",Nt=-1<s.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+ze+r+Nt}var ge=!1;function Re(r,a){if(!r||ge)return"";ge=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(oe){var te=oe}Reflect.construct(r,[],de)}else{try{de.call()}catch(oe){te=oe}r.call(de.prototype)}}else{try{throw Error()}catch(oe){te=oe}(de=r())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(oe){if(oe&&te&&typeof oe.stack=="string")return[oe.stack,te.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=u.DetermineComponentFrameRoot(),x=v[0],I=v[1];if(x&&I){var B=x.split(`
|
|
5
|
-
`),J=I.split(`
|
|
6
|
-
`);for(m=u=0;u<B.length&&!B[u].includes("DetermineComponentFrameRoot");)u++;for(;m<J.length&&!J[m].includes("DetermineComponentFrameRoot");)m++;if(u===B.length||m===J.length)for(u=B.length-1,m=J.length-1;1<=u&&0<=m&&B[u]!==J[m];)m--;for(;1<=u&&0<=m;u--,m--)if(B[u]!==J[m]){if(u!==1||m!==1)do if(u--,m--,0>m||B[u]!==J[m]){var le=`
|
|
7
|
-
`+B[u].replace(" at new "," at ");return r.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",r.displayName)),le}while(1<=u&&0<=m);break}}}finally{ge=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?ve(s):""}function ke(r,a){switch(r.tag){case 26:case 27:case 5:return ve(r.type);case 16:return ve("Lazy");case 13:return r.child!==a&&a!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("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 ve("Activity");default:return""}}function et(r){try{var a="",s=null;do a+=ke(r,s),s=r,r=r.return;while(r);return a}catch(u){return`
|
|
8
|
-
Error generating stack: `+u.message+`
|
|
9
|
-
`+u.stack}}var Ue=Object.prototype.hasOwnProperty,We=e.unstable_scheduleCallback,U=e.unstable_cancelCallback,q=e.unstable_shouldYield,Z=e.unstable_requestPaint,ue=e.unstable_now,pe=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Be=e.unstable_NormalPriority,Qe=e.unstable_LowPriority,wt=e.unstable_IdlePriority,tr=e.log,Tt=e.unstable_setDisableYieldValue,Zt=null,At=null;function on(r){if(typeof tr=="function"&&Tt(r),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Zt,r)}catch{}}var Yt=Math.clz32?Math.clz32:Ie,Yo=Math.log,So=Math.LN2;function Ie(r){return r>>>=0,r===0?32:31-(Yo(r)/So|0)|0}var tt=256,it=262144,Ze=4194304;function st(r){var a=r&42;if(a!==0)return a;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 Me(r,a,s){var u=r.pendingLanes;if(u===0)return 0;var m=0,v=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var I=u&134217727;return I!==0?(u=I&~v,u!==0?m=st(u):(x&=I,x!==0?m=st(x):s||(s=I&~r,s!==0&&(m=st(s))))):(I=u&~v,I!==0?m=st(I):x!==0?m=st(x):s||(s=u&~r,s!==0&&(m=st(s)))),m===0?0:a!==0&&a!==m&&(a&v)===0&&(v=m&-m,s=a&-a,v>=s||v===32&&(s&4194048)!==0)?a:m}function Ye(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function xt(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yt(){var r=Ze;return Ze<<=1,(Ze&62914560)===0&&(Ze=4194304),r}function In(r){for(var a=[],s=0;31>s;s++)a.push(r);return a}function lt(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ct(r,a,s,u,m,v){var x=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,B=r.expirationTimes,J=r.hiddenUpdates;for(s=x&~s;0<s;){var le=31-Yt(s),de=1<<le;I[le]=0,B[le]=-1;var te=J[le];if(te!==null)for(J[le]=null,le=0;le<te.length;le++){var oe=te[le];oe!==null&&(oe.lane&=-536870913)}s&=~de}u!==0&&br(r,u,0),v!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=v&~(x&~a))}function br(r,a,s){r.pendingLanes|=a,r.suspendedLanes&=~a;var u=31-Yt(a);r.entangledLanes|=a,r.entanglements[u]=r.entanglements[u]|1073741824|s&261930}function _n(r,a){var s=r.entangledLanes|=a;for(r=r.entanglements;s;){var u=31-Yt(s),m=1<<u;m&a|r[u]&a&&(r[u]|=a),s&=~m}}function Bn(r,a){var s=a&-a;return s=(s&42)!==0?1:Ai(s),(s&(r.suspendedLanes|a))!==0?0:s}function Ai(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 Ur(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Vf(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:u_(r.type))}function O0(r,a){var s=F.p;try{return F.p=r,a()}finally{F.p=s}}var Ko=Math.random().toString(36).slice(2),En="__reactFiber$"+Ko,Fn="__reactProps$"+Ko,Ci="__reactContainer$"+Ko,Hf="__reactEvents$"+Ko,cA="__reactListeners$"+Ko,uA="__reactHandles$"+Ko,T0="__reactResources$"+Ko,Hs="__reactMarker$"+Ko;function Gf(r){delete r[En],delete r[Fn],delete r[Hf],delete r[cA],delete r[uA]}function Ii(r){var a=r[En];if(a)return a;for(var s=r.parentNode;s;){if(a=s[Ci]||s[En]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=Yb(r);r!==null;){if(s=r[En])return s;r=Yb(r)}return a}r=s,s=r.parentNode}return null}function Mi(r){if(r=r[En]||r[Ci]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Gs(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(o(33))}function Ni(r){var a=r[T0];return a||(a=r[T0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function fn(r){r[Hs]=!0}var A0=new Set,C0={};function $a(r,a){Di(r,a),Di(r+"Capture",a)}function Di(r,a){for(C0[r]=a,r=0;r<a.length;r++)A0.add(a[r])}var dA=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]*$"),I0={},M0={};function fA(r){return Ue.call(M0,r)?!0:Ue.call(I0,r)?!1:dA.test(r)?M0[r]=!0:(I0[r]=!0,!1)}function Dc(r,a,s){if(fA(a))if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+s)}}function Lc(r,a,s){if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+s)}}function wo(r,a,s,u){if(u===null)r.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(a,s,""+u)}}function _r(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function N0(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function hA(r,a,s){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,v=u.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return m.call(this)},set:function(x){s=""+x,v.call(this,x)}}),Object.defineProperty(r,a,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function qf(r){if(!r._valueTracker){var a=N0(r)?"checked":"value";r._valueTracker=hA(r,a,""+r[a])}}function D0(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),u="";return r&&(u=N0(r)?r.checked?"true":"false":r.value),r=u,r!==s?(a.setValue(r),!0):!1}function Pc(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 pA=/[\n"\\]/g;function Er(r){return r.replace(pA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Zf(r,a,s,u,m,v,x,I){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),a!=null?x==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+_r(a)):r.value!==""+_r(a)&&(r.value=""+_r(a)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),a!=null?Yf(r,x,_r(a)):s!=null?Yf(r,x,_r(s)):u!=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=""+_r(I):r.removeAttribute("name")}function L0(r,a,s,u,m,v,x,I){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),a!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||a!=null)){qf(r);return}s=s!=null?""+_r(s):"",a=a!=null?""+_r(a):s,I||a===r.value||(r.value=a),r.defaultValue=a}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=I?r.checked:!!u,r.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),qf(r)}function Yf(r,a,s){a==="number"&&Pc(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Li(r,a,s,u){if(r=r.options,a){a={};for(var m=0;m<s.length;m++)a["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=a.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&u&&(r[s].defaultSelected=!0)}else{for(s=""+_r(s),a=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,u&&(r[m].defaultSelected=!0);return}a!==null||r[m].disabled||(a=r[m])}a!==null&&(a.selected=!0)}}function P0(r,a,s){if(a!=null&&(a=""+_r(a),a!==r.value&&(r.value=a),s==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=s!=null?""+_r(s):""}function k0(r,a,s,u){if(a==null){if(u!=null){if(s!=null)throw Error(o(92));if(ae(u)){if(1<u.length)throw Error(o(93));u=u[0]}s=u}s==null&&(s=""),a=s}s=_r(a),r.defaultValue=s,u=r.textContent,u===s&&u!==""&&u!==null&&(r.value=u),qf(r)}function Pi(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var mA=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 j0(r,a,s){var u=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":u?r.setProperty(a,s):typeof s!="number"||s===0||mA.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function z0(r,a,s){if(a!=null&&typeof a!="object")throw Error(o(62));if(r=r.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var m in a)u=a[m],a.hasOwnProperty(m)&&s[m]!==u&&j0(r,m,u)}else for(var v in a)a.hasOwnProperty(v)&&j0(r,v,a[v])}function Kf(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 gA=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"]]),vA=/^[\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 kc(r){return vA.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function xo(){}var Wf=null;function Qf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ki=null,ji=null;function U0(r){var a=Mi(r);if(a&&(r=a.stateNode)){var s=r[Fn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Zf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Er(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var u=s[a];if(u!==r&&u.form===r.form){var m=u[Fn]||null;if(!m)throw Error(o(90));Zf(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<s.length;a++)u=s[a],u.form===r.form&&D0(u)}break e;case"textarea":P0(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Li(r,!!s.multiple,a,!1)}}}var Xf=!1;function B0(r,a,s){if(Xf)return r(a,s);Xf=!0;try{var u=r(a);return u}finally{if(Xf=!1,(ki!==null||ji!==null)&&(wu(),ki&&(a=ki,r=ji,ji=ki=null,U0(a),r)))for(a=0;a<r.length;a++)U0(r[a])}}function qs(r,a){var s=r.stateNode;if(s===null)return null;var u=s[Fn]||null;if(u===null)return null;s=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(o(231,a,typeof s));return s}var Ro=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jf=!1;if(Ro)try{var Zs={};Object.defineProperty(Zs,"passive",{get:function(){Jf=!0}}),window.addEventListener("test",Zs,Zs),window.removeEventListener("test",Zs,Zs)}catch{Jf=!1}var Wo=null,eh=null,jc=null;function F0(){if(jc)return jc;var r,a=eh,s=a.length,u,m="value"in Wo?Wo.value:Wo.textContent,v=m.length;for(r=0;r<s&&a[r]===m[r];r++);var x=s-r;for(u=1;u<=x&&a[s-u]===m[v-u];u++);return jc=m.slice(r,1<u?1-u:void 0)}function zc(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Uc(){return!0}function $0(){return!1}function $n(r){function a(s,u,m,v,x){this._reactName=s,this._targetInst=m,this.type=u,this.nativeEvent=v,this.target=x,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)?Uc:$0,this.isPropagationStopped=$0,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Uc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Uc)},persist:function(){},isPersistent:Uc}),a}var Va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bc=$n(Va),Ys=p({},Va,{view:0,detail:0}),yA=$n(Ys),th,nh,Ks,Fc=p({},Ys,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oh,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!==Ks&&(Ks&&r.type==="mousemove"?(th=r.screenX-Ks.screenX,nh=r.screenY-Ks.screenY):nh=th=0,Ks=r),th)},movementY:function(r){return"movementY"in r?r.movementY:nh}}),V0=$n(Fc),bA=p({},Fc,{dataTransfer:0}),_A=$n(bA),EA=p({},Ys,{relatedTarget:0}),rh=$n(EA),SA=p({},Va,{animationName:0,elapsedTime:0,pseudoElement:0}),wA=$n(SA),xA=p({},Va,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),RA=$n(xA),OA=p({},Va,{data:0}),H0=$n(OA),TA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AA={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"},CA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IA(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=CA[r])?!!a[r]:!1}function oh(){return IA}var MA=p({},Ys,{key:function(r){if(r.key){var a=TA[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=zc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?AA[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oh,charCode:function(r){return r.type==="keypress"?zc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?zc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),NA=$n(MA),DA=p({},Fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),G0=$n(DA),LA=p({},Ys,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oh}),PA=$n(LA),kA=p({},Va,{propertyName:0,elapsedTime:0,pseudoElement:0}),jA=$n(kA),zA=p({},Fc,{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}),UA=$n(zA),BA=p({},Va,{newState:0,oldState:0}),FA=$n(BA),$A=[9,13,27,32],ah=Ro&&"CompositionEvent"in window,Ws=null;Ro&&"documentMode"in document&&(Ws=document.documentMode);var VA=Ro&&"TextEvent"in window&&!Ws,q0=Ro&&(!ah||Ws&&8<Ws&&11>=Ws),Z0=" ",Y0=!1;function K0(r,a){switch(r){case"keyup":return $A.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var zi=!1;function HA(r,a){switch(r){case"compositionend":return W0(a);case"keypress":return a.which!==32?null:(Y0=!0,Z0);case"textInput":return r=a.data,r===Z0&&Y0?null:r;default:return null}}function GA(r,a){if(zi)return r==="compositionend"||!ah&&K0(r,a)?(r=F0(),jc=eh=Wo=null,zi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return q0&&a.locale!=="ko"?null:a.data;default:return null}}var qA={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 Q0(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!qA[r.type]:a==="textarea"}function X0(r,a,s,u){ki?ji?ji.push(u):ji=[u]:ki=u,a=Iu(a,"onChange"),0<a.length&&(s=new Bc("onChange","change",null,s,u),r.push({event:s,listeners:a}))}var Qs=null,Xs=null;function ZA(r){Lb(r,0)}function $c(r){var a=Gs(r);if(D0(a))return r}function J0(r,a){if(r==="change")return a}var ey=!1;if(Ro){var ih;if(Ro){var sh="oninput"in document;if(!sh){var ty=document.createElement("div");ty.setAttribute("oninput","return;"),sh=typeof ty.oninput=="function"}ih=sh}else ih=!1;ey=ih&&(!document.documentMode||9<document.documentMode)}function ny(){Qs&&(Qs.detachEvent("onpropertychange",ry),Xs=Qs=null)}function ry(r){if(r.propertyName==="value"&&$c(Xs)){var a=[];X0(a,Xs,r,Qf(r)),B0(ZA,a)}}function YA(r,a,s){r==="focusin"?(ny(),Qs=a,Xs=s,Qs.attachEvent("onpropertychange",ry)):r==="focusout"&&ny()}function KA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return $c(Xs)}function WA(r,a){if(r==="click")return $c(a)}function QA(r,a){if(r==="input"||r==="change")return $c(a)}function XA(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var nr=typeof Object.is=="function"?Object.is:XA;function Js(r,a){if(nr(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var s=Object.keys(r),u=Object.keys(a);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var m=s[u];if(!Ue.call(a,m)||!nr(r[m],a[m]))return!1}return!0}function oy(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function ay(r,a){var s=oy(r);r=0;for(var u;s;){if(s.nodeType===3){if(u=r+s.textContent.length,r<=a&&u>=a)return{node:s,offset:a-r};r=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=oy(s)}}function iy(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?iy(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function sy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Pc(r.document);a instanceof r.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)r=a.contentWindow;else break;a=Pc(r.document)}return a}function lh(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var JA=Ro&&"documentMode"in document&&11>=document.documentMode,Ui=null,ch=null,el=null,uh=!1;function ly(r,a,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;uh||Ui==null||Ui!==Pc(u)||(u=Ui,"selectionStart"in u&&lh(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),el&&Js(el,u)||(el=u,u=Iu(ch,"onSelect"),0<u.length&&(a=new Bc("onSelect","select",null,a,s),r.push({event:a,listeners:u}),a.target=Ui)))}function Ha(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var Bi={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionrun:Ha("Transition","TransitionRun"),transitionstart:Ha("Transition","TransitionStart"),transitioncancel:Ha("Transition","TransitionCancel"),transitionend:Ha("Transition","TransitionEnd")},dh={},cy={};Ro&&(cy=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);function Ga(r){if(dh[r])return dh[r];if(!Bi[r])return r;var a=Bi[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in cy)return dh[r]=a[s];return r}var uy=Ga("animationend"),dy=Ga("animationiteration"),fy=Ga("animationstart"),eC=Ga("transitionrun"),tC=Ga("transitionstart"),nC=Ga("transitioncancel"),hy=Ga("transitionend"),py=new Map,fh="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(" ");fh.push("scrollEnd");function Br(r,a){py.set(r,a),$a(a,[r])}var Vc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Sr=[],Fi=0,hh=0;function Hc(){for(var r=Fi,a=hh=Fi=0;a<r;){var s=Sr[a];Sr[a++]=null;var u=Sr[a];Sr[a++]=null;var m=Sr[a];Sr[a++]=null;var v=Sr[a];if(Sr[a++]=null,u!==null&&m!==null){var x=u.pending;x===null?m.next=m:(m.next=x.next,x.next=m),u.pending=m}v!==0&&my(s,m,v)}}function Gc(r,a,s,u){Sr[Fi++]=r,Sr[Fi++]=a,Sr[Fi++]=s,Sr[Fi++]=u,hh|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function ph(r,a,s,u){return Gc(r,a,s,u),qc(r)}function qa(r,a){return Gc(r,null,null,a),qc(r)}function my(r,a,s){r.lanes|=s;var u=r.alternate;u!==null&&(u.lanes|=s);for(var m=!1,v=r.return;v!==null;)v.childLanes|=s,u=v.alternate,u!==null&&(u.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&&a!==null&&(m=31-Yt(s),r=v.hiddenUpdates,u=r[m],u===null?r[m]=[a]:u.push(a),a.lane=s|536870912),v):null}function qc(r){if(50<Sl)throw Sl=0,wp=null,Error(o(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var $i={};function rC(r,a,s,u){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=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(r,a,s,u){return new rC(r,a,s,u)}function mh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Oo(r,a){var s=r.alternate;return s===null?(s=rr(r.tag,a,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=a,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,a=r.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function gy(r,a){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=a,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,a=s.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Zc(r,a,s,u,m,v){var x=0;if(u=r,typeof r=="function")mh(r)&&(x=1);else if(typeof r=="string")x=l4(r,s,se.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case z:return r=rr(31,s,a,m),r.elementType=z,r.lanes=v,r;case w:return Za(s.children,m,v,a);case T:x=8,m|=24;break;case R:return r=rr(12,s,a,m|2),r.elementType=R,r.lanes=v,r;case M:return r=rr(13,s,a,m),r.elementType=M,r.lanes=v,r;case L:return r=rr(19,s,a,m),r.elementType=L,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:x=10;break e;case A:x=9;break e;case O:x=11;break e;case N:x=14;break e;case D:x=16,u=null;break e}x=29,s=Error(o(130,r===null?"null":typeof r,"")),u=null}return a=rr(x,s,a,m),a.elementType=r,a.type=u,a.lanes=v,a}function Za(r,a,s,u){return r=rr(7,r,u,a),r.lanes=s,r}function gh(r,a,s){return r=rr(6,r,null,a),r.lanes=s,r}function vy(r){var a=rr(18,null,null,0);return a.stateNode=r,a}function vh(r,a,s){return a=rr(4,r.children!==null?r.children:[],r.key,a),a.lanes=s,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var yy=new WeakMap;function wr(r,a){if(typeof r=="object"&&r!==null){var s=yy.get(r);return s!==void 0?s:(a={value:r,source:a,stack:et(a)},yy.set(r,a),a)}return{value:r,source:a,stack:et(a)}}var Vi=[],Hi=0,Yc=null,tl=0,xr=[],Rr=0,Qo=null,to=1,no="";function To(r,a){Vi[Hi++]=tl,Vi[Hi++]=Yc,Yc=r,tl=a}function by(r,a,s){xr[Rr++]=to,xr[Rr++]=no,xr[Rr++]=Qo,Qo=r;var u=to;r=no;var m=32-Yt(u)-1;u&=~(1<<m),s+=1;var v=32-Yt(a)+m;if(30<v){var x=m-m%5;v=(u&(1<<x)-1).toString(32),u>>=x,m-=x,to=1<<32-Yt(a)+m|s<<m|u,no=v+r}else to=1<<v|s<<m|u,no=r}function yh(r){r.return!==null&&(To(r,1),by(r,1,0))}function bh(r){for(;r===Yc;)Yc=Vi[--Hi],Vi[Hi]=null,tl=Vi[--Hi],Vi[Hi]=null;for(;r===Qo;)Qo=xr[--Rr],xr[Rr]=null,no=xr[--Rr],xr[Rr]=null,to=xr[--Rr],xr[Rr]=null}function _y(r,a){xr[Rr++]=to,xr[Rr++]=no,xr[Rr++]=Qo,to=a.id,no=a.overflow,Qo=r}var Sn=null,It=null,ot=!1,Xo=null,Or=!1,_h=Error(o(519));function Jo(r){var a=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nl(wr(a,r)),_h}function Ey(r){var a=r.stateNode,s=r.type,u=r.memoizedProps;switch(a[En]=r,a[Fn]=u,s){case"dialog":Je("cancel",a),Je("close",a);break;case"iframe":case"object":case"embed":Je("load",a);break;case"video":case"audio":for(s=0;s<xl.length;s++)Je(xl[s],a);break;case"source":Je("error",a);break;case"img":case"image":case"link":Je("error",a),Je("load",a);break;case"details":Je("toggle",a);break;case"input":Je("invalid",a),L0(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Je("invalid",a);break;case"textarea":Je("invalid",a),k0(a,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||u.suppressHydrationWarning===!0||zb(a.textContent,s)?(u.popover!=null&&(Je("beforetoggle",a),Je("toggle",a)),u.onScroll!=null&&Je("scroll",a),u.onScrollEnd!=null&&Je("scrollend",a),u.onClick!=null&&(a.onclick=xo),a=!0):a=!1,a||Jo(r,!0)}function Sy(r){for(Sn=r.return;Sn;)switch(Sn.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:Sn=Sn.return}}function Gi(r){if(r!==Sn)return!1;if(!ot)return Sy(r),ot=!0,!1;var a=r.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||zp(r.type,r.memoizedProps)),s=!s),s&&It&&Jo(r),Sy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Zb(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Zb(r)}else a===27?(a=It,ha(r.type)?(r=Vp,Vp=null,It=r):It=a):It=Sn?Ar(r.stateNode.nextSibling):null;return!0}function Ya(){It=Sn=null,ot=!1}function Eh(){var r=Xo;return r!==null&&(qn===null?qn=r:qn.push.apply(qn,r),Xo=null),r}function nl(r){Xo===null?Xo=[r]:Xo.push(r)}var Sh=k(null),Ka=null,Ao=null;function ea(r,a,s){ee(Sh,a._currentValue),a._currentValue=s}function Co(r){r._currentValue=Sh.current,Q(Sh)}function wh(r,a,s){for(;r!==null;){var u=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),r===s)break;r=r.return}}function xh(r,a,s,u){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var v=m.dependencies;if(v!==null){var x=m.child;v=v.firstContext;e:for(;v!==null;){var I=v;v=m;for(var B=0;B<a.length;B++)if(I.context===a[B]){v.lanes|=s,I=v.alternate,I!==null&&(I.lanes|=s),wh(v.return,s,r),u||(x=null);break e}v=I.next}}else if(m.tag===18){if(x=m.return,x===null)throw Error(o(341));x.lanes|=s,v=x.alternate,v!==null&&(v.lanes|=s),wh(x,s,r),x=null}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===r){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}}function qi(r,a,s,u){r=null;for(var m=a,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 x=m.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var I=m.type;nr(m.pendingProps.value,x.value)||(r!==null?r.push(I):r=[I])}}else if(m===be.current){if(x=m.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Cl):r=[Cl])}m=m.return}r!==null&&xh(a,r,s,u),a.flags|=262144}function Kc(r){for(r=r.firstContext;r!==null;){if(!nr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Wa(r){Ka=r,Ao=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function wn(r){return wy(Ka,r)}function Wc(r,a){return Ka===null&&Wa(r),wy(r,a)}function wy(r,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Ao===null){if(r===null)throw Error(o(308));Ao=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Ao=Ao.next=a;return s}var oC=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(s,u){r.push(u)}};this.abort=function(){a.aborted=!0,r.forEach(function(s){return s()})}},aC=e.unstable_scheduleCallback,iC=e.unstable_NormalPriority,Kt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rh(){return{controller:new oC,data:new Map,refCount:0}}function rl(r){r.refCount--,r.refCount===0&&aC(iC,function(){r.controller.abort()})}var ol=null,Oh=0,Zi=0,Yi=null;function sC(r,a){if(ol===null){var s=ol=[];Oh=0,Zi=Cp(),Yi={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Oh++,a.then(xy,xy),a}function xy(){if(--Oh===0&&ol!==null){Yi!==null&&(Yi.status="fulfilled");var r=ol;ol=null,Zi=0,Yi=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function lC(r,a){var s=[],u={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){u.status="fulfilled",u.value=a;for(var m=0;m<s.length;m++)(0,s[m])(a)},function(m){for(u.status="rejected",u.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),u}var Ry=P.S;P.S=function(r,a){lb=ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&sC(r,a),Ry!==null&&Ry(r,a)};var Qa=k(null);function Th(){var r=Qa.current;return r!==null?r:Rt.pooledCache}function Qc(r,a){a===null?ee(Qa,Qa.current):ee(Qa,a.pool)}function Oy(){var r=Th();return r===null?null:{parent:Kt._currentValue,pool:r}}var Ki=Error(o(460)),Ah=Error(o(474)),Xc=Error(o(542)),Jc={then:function(){}};function Ty(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Ay(r,a,s){switch(s=r[s],s===void 0?r.push(a):s!==a&&(a.then(xo,xo),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Iy(r),r;default:if(typeof a.status=="string")a.then(xo,xo);else{if(r=Rt,r!==null&&100<r.shellSuspendCounter)throw Error(o(482));r=a,r.status="pending",r.then(function(u){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=u}},function(u){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Iy(r),r}throw Ja=a,Ki}}function Xa(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ja=s,Ki):s}}var Ja=null;function Cy(){if(Ja===null)throw Error(o(459));var r=Ja;return Ja=null,r}function Iy(r){if(r===Ki||r===Xc)throw Error(o(483))}var Wi=null,al=0;function eu(r){var a=al;return al+=1,Wi===null&&(Wi=[]),Ay(Wi,r,a)}function il(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function tu(r,a){throw a.$$typeof===y?Error(o(525)):(r=Object.prototype.toString.call(a),Error(o(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function My(r){function a(Y,V){if(r){var X=Y.deletions;X===null?(Y.deletions=[V],Y.flags|=16):X.push(V)}}function s(Y,V){if(!r)return null;for(;V!==null;)a(Y,V),V=V.sibling;return null}function u(Y){for(var V=new Map;Y!==null;)Y.key!==null?V.set(Y.key,Y):V.set(Y.index,Y),Y=Y.sibling;return V}function m(Y,V){return Y=Oo(Y,V),Y.index=0,Y.sibling=null,Y}function v(Y,V,X){return Y.index=X,r?(X=Y.alternate,X!==null?(X=X.index,X<V?(Y.flags|=67108866,V):X):(Y.flags|=67108866,V)):(Y.flags|=1048576,V)}function x(Y){return r&&Y.alternate===null&&(Y.flags|=67108866),Y}function I(Y,V,X,ce){return V===null||V.tag!==6?(V=gh(X,Y.mode,ce),V.return=Y,V):(V=m(V,X),V.return=Y,V)}function B(Y,V,X,ce){var Pe=X.type;return Pe===w?le(Y,V,X.props.children,ce,X.key):V!==null&&(V.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Xa(Pe)===V.type)?(V=m(V,X.props),il(V,X),V.return=Y,V):(V=Zc(X.type,X.key,X.props,null,Y.mode,ce),il(V,X),V.return=Y,V)}function J(Y,V,X,ce){return V===null||V.tag!==4||V.stateNode.containerInfo!==X.containerInfo||V.stateNode.implementation!==X.implementation?(V=vh(X,Y.mode,ce),V.return=Y,V):(V=m(V,X.children||[]),V.return=Y,V)}function le(Y,V,X,ce,Pe){return V===null||V.tag!==7?(V=Za(X,Y.mode,ce,Pe),V.return=Y,V):(V=m(V,X),V.return=Y,V)}function de(Y,V,X){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=gh(""+V,Y.mode,X),V.return=Y,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return X=Zc(V.type,V.key,V.props,null,Y.mode,X),il(X,V),X.return=Y,X;case S:return V=vh(V,Y.mode,X),V.return=Y,V;case D:return V=Xa(V),de(Y,V,X)}if(ae(V)||K(V))return V=Za(V,Y.mode,X,null),V.return=Y,V;if(typeof V.then=="function")return de(Y,eu(V),X);if(V.$$typeof===C)return de(Y,Wc(Y,V),X);tu(Y,V)}return null}function te(Y,V,X,ce){var Pe=V!==null?V.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:I(Y,V,""+X,ce);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case _:return X.key===Pe?B(Y,V,X,ce):null;case S:return X.key===Pe?J(Y,V,X,ce):null;case D:return X=Xa(X),te(Y,V,X,ce)}if(ae(X)||K(X))return Pe!==null?null:le(Y,V,X,ce,null);if(typeof X.then=="function")return te(Y,V,eu(X),ce);if(X.$$typeof===C)return te(Y,V,Wc(Y,X),ce);tu(Y,X)}return null}function oe(Y,V,X,ce,Pe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Y=Y.get(X)||null,I(V,Y,""+ce,Pe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return Y=Y.get(ce.key===null?X:ce.key)||null,B(V,Y,ce,Pe);case S:return Y=Y.get(ce.key===null?X:ce.key)||null,J(V,Y,ce,Pe);case D:return ce=Xa(ce),oe(Y,V,X,ce,Pe)}if(ae(ce)||K(ce))return Y=Y.get(X)||null,le(V,Y,ce,Pe,null);if(typeof ce.then=="function")return oe(Y,V,X,eu(ce),Pe);if(ce.$$typeof===C)return oe(Y,V,X,Wc(V,ce),Pe);tu(V,ce)}return null}function Te(Y,V,X,ce){for(var Pe=null,ct=null,Ne=V,Ve=V=0,rt=null;Ne!==null&&Ve<X.length;Ve++){Ne.index>Ve?(rt=Ne,Ne=null):rt=Ne.sibling;var ut=te(Y,Ne,X[Ve],ce);if(ut===null){Ne===null&&(Ne=rt);break}r&&Ne&&ut.alternate===null&&a(Y,Ne),V=v(ut,V,Ve),ct===null?Pe=ut:ct.sibling=ut,ct=ut,Ne=rt}if(Ve===X.length)return s(Y,Ne),ot&&To(Y,Ve),Pe;if(Ne===null){for(;Ve<X.length;Ve++)Ne=de(Y,X[Ve],ce),Ne!==null&&(V=v(Ne,V,Ve),ct===null?Pe=Ne:ct.sibling=Ne,ct=Ne);return ot&&To(Y,Ve),Pe}for(Ne=u(Ne);Ve<X.length;Ve++)rt=oe(Ne,Y,Ve,X[Ve],ce),rt!==null&&(r&&rt.alternate!==null&&Ne.delete(rt.key===null?Ve:rt.key),V=v(rt,V,Ve),ct===null?Pe=rt:ct.sibling=rt,ct=rt);return r&&Ne.forEach(function(ya){return a(Y,ya)}),ot&&To(Y,Ve),Pe}function je(Y,V,X,ce){if(X==null)throw Error(o(151));for(var Pe=null,ct=null,Ne=V,Ve=V=0,rt=null,ut=X.next();Ne!==null&&!ut.done;Ve++,ut=X.next()){Ne.index>Ve?(rt=Ne,Ne=null):rt=Ne.sibling;var ya=te(Y,Ne,ut.value,ce);if(ya===null){Ne===null&&(Ne=rt);break}r&&Ne&&ya.alternate===null&&a(Y,Ne),V=v(ya,V,Ve),ct===null?Pe=ya:ct.sibling=ya,ct=ya,Ne=rt}if(ut.done)return s(Y,Ne),ot&&To(Y,Ve),Pe;if(Ne===null){for(;!ut.done;Ve++,ut=X.next())ut=de(Y,ut.value,ce),ut!==null&&(V=v(ut,V,Ve),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return ot&&To(Y,Ve),Pe}for(Ne=u(Ne);!ut.done;Ve++,ut=X.next())ut=oe(Ne,Y,Ve,ut.value,ce),ut!==null&&(r&&ut.alternate!==null&&Ne.delete(ut.key===null?Ve:ut.key),V=v(ut,V,Ve),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return r&&Ne.forEach(function(b4){return a(Y,b4)}),ot&&To(Y,Ve),Pe}function Et(Y,V,X,ce){if(typeof X=="object"&&X!==null&&X.type===w&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case _:e:{for(var Pe=X.key;V!==null;){if(V.key===Pe){if(Pe=X.type,Pe===w){if(V.tag===7){s(Y,V.sibling),ce=m(V,X.props.children),ce.return=Y,Y=ce;break e}}else if(V.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Xa(Pe)===V.type){s(Y,V.sibling),ce=m(V,X.props),il(ce,X),ce.return=Y,Y=ce;break e}s(Y,V);break}else a(Y,V);V=V.sibling}X.type===w?(ce=Za(X.props.children,Y.mode,ce,X.key),ce.return=Y,Y=ce):(ce=Zc(X.type,X.key,X.props,null,Y.mode,ce),il(ce,X),ce.return=Y,Y=ce)}return x(Y);case S:e:{for(Pe=X.key;V!==null;){if(V.key===Pe)if(V.tag===4&&V.stateNode.containerInfo===X.containerInfo&&V.stateNode.implementation===X.implementation){s(Y,V.sibling),ce=m(V,X.children||[]),ce.return=Y,Y=ce;break e}else{s(Y,V);break}else a(Y,V);V=V.sibling}ce=vh(X,Y.mode,ce),ce.return=Y,Y=ce}return x(Y);case D:return X=Xa(X),Et(Y,V,X,ce)}if(ae(X))return Te(Y,V,X,ce);if(K(X)){if(Pe=K(X),typeof Pe!="function")throw Error(o(150));return X=Pe.call(X),je(Y,V,X,ce)}if(typeof X.then=="function")return Et(Y,V,eu(X),ce);if(X.$$typeof===C)return Et(Y,V,Wc(Y,X),ce);tu(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,V!==null&&V.tag===6?(s(Y,V.sibling),ce=m(V,X),ce.return=Y,Y=ce):(s(Y,V),ce=gh(X,Y.mode,ce),ce.return=Y,Y=ce),x(Y)):s(Y,V)}return function(Y,V,X,ce){try{al=0;var Pe=Et(Y,V,X,ce);return Wi=null,Pe}catch(Ne){if(Ne===Ki||Ne===Xc)throw Ne;var ct=rr(29,Ne,null,Y.mode);return ct.lanes=ce,ct.return=Y,ct}}}var ei=My(!0),Ny=My(!1),ta=!1;function Ch(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ih(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function na(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ra(r,a,s){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(dt&2)!==0){var m=u.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),u.pending=a,a=qc(r),my(r,null,s),a}return Gc(r,u,a,s),qc(r)}function sl(r,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var u=a.lanes;u&=r.pendingLanes,s|=u,a.lanes=s,_n(r,s)}}function Mh(r,a){var s=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var m=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};v===null?m=v=x:v=v.next=x,s=s.next}while(s!==null);v===null?m=v=a:v=v.next=a}else m=v=a;s={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=a:r.next=a,s.lastBaseUpdate=a}var Nh=!1;function ll(){if(Nh){var r=Yi;if(r!==null)throw r}}function cl(r,a,s,u){Nh=!1;var m=r.updateQueue;ta=!1;var v=m.firstBaseUpdate,x=m.lastBaseUpdate,I=m.shared.pending;if(I!==null){m.shared.pending=null;var B=I,J=B.next;B.next=null,x===null?v=J:x.next=J,x=B;var le=r.alternate;le!==null&&(le=le.updateQueue,I=le.lastBaseUpdate,I!==x&&(I===null?le.firstBaseUpdate=J:I.next=J,le.lastBaseUpdate=B))}if(v!==null){var de=m.baseState;x=0,le=J=B=null,I=v;do{var te=I.lane&-536870913,oe=te!==I.lane;if(oe?(nt&te)===te:(u&te)===te){te!==0&&te===Zi&&(Nh=!0),le!==null&&(le=le.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var Te=r,je=I;te=a;var Et=s;switch(je.tag){case 1:if(Te=je.payload,typeof Te=="function"){de=Te.call(Et,de,te);break e}de=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=je.payload,te=typeof Te=="function"?Te.call(Et,de,te):Te,te==null)break e;de=p({},de,te);break e;case 2:ta=!0}}te=I.callback,te!==null&&(r.flags|=64,oe&&(r.flags|=8192),oe=m.callbacks,oe===null?m.callbacks=[te]:oe.push(te))}else oe={lane:te,tag:I.tag,payload:I.payload,callback:I.callback,next:null},le===null?(J=le=oe,B=de):le=le.next=oe,x|=te;if(I=I.next,I===null){if(I=m.shared.pending,I===null)break;oe=I,I=oe.next,oe.next=null,m.lastBaseUpdate=oe,m.shared.pending=null}}while(!0);le===null&&(B=de),m.baseState=B,m.firstBaseUpdate=J,m.lastBaseUpdate=le,v===null&&(m.shared.lanes=0),la|=x,r.lanes=x,r.memoizedState=de}}function Dy(r,a){if(typeof r!="function")throw Error(o(191,r));r.call(a)}function Ly(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Dy(s[r],a)}var Qi=k(null),nu=k(0);function Py(r,a){r=zo,ee(nu,r),ee(Qi,a),zo=r|a.baseLanes}function Dh(){ee(nu,zo),ee(Qi,Qi.current)}function Lh(){zo=nu.current,Q(Qi),Q(nu)}var or=k(null),Tr=null;function oa(r){var a=r.alternate;ee($t,$t.current&1),ee(or,r),Tr===null&&(a===null||Qi.current!==null||a.memoizedState!==null)&&(Tr=r)}function Ph(r){ee($t,$t.current),ee(or,r),Tr===null&&(Tr=r)}function ky(r){r.tag===22?(ee($t,$t.current),ee(or,r),Tr===null&&(Tr=r)):aa()}function aa(){ee($t,$t.current),ee(or,or.current)}function ar(r){Q(or),Tr===r&&(Tr=null),Q($t)}var $t=k(0);function ru(r){for(var a=r;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Fp(s)||$p(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Io=0,$e=null,bt=null,Wt=null,ou=!1,Xi=!1,ti=!1,au=0,ul=0,Ji=null,cC=0;function Ut(){throw Error(o(321))}function kh(r,a){if(a===null)return!1;for(var s=0;s<a.length&&s<r.length;s++)if(!nr(r[s],a[s]))return!1;return!0}function jh(r,a,s,u,m,v){return Io=v,$e=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,P.H=r===null||r.memoizedState===null?b1:Xh,ti=!1,v=s(u,m),ti=!1,Xi&&(v=zy(a,s,u,m)),jy(r),v}function jy(r){P.H=hl;var a=bt!==null&&bt.next!==null;if(Io=0,Wt=bt=$e=null,ou=!1,ul=0,Ji=null,a)throw Error(o(300));r===null||Qt||(r=r.dependencies,r!==null&&Kc(r)&&(Qt=!0))}function zy(r,a,s,u){$e=r;var m=0;do{if(Xi&&(Ji=null),ul=0,Xi=!1,25<=m)throw Error(o(301));if(m+=1,Wt=bt=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=_1,v=a(s,u)}while(Xi);return v}function uC(){var r=P.H,a=r.useState()[0];return a=typeof a.then=="function"?dl(a):a,r=r.useState()[0],(bt!==null?bt.memoizedState:null)!==r&&($e.flags|=1024),a}function zh(){var r=au!==0;return au=0,r}function Uh(r,a,s){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~s}function Bh(r){if(ou){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}ou=!1}Io=0,Wt=bt=$e=null,Xi=!1,ul=au=0,Ji=null}function kn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?$e.memoizedState=Wt=r:Wt=Wt.next=r,Wt}function Vt(){if(bt===null){var r=$e.alternate;r=r!==null?r.memoizedState:null}else r=bt.next;var a=Wt===null?$e.memoizedState:Wt.next;if(a!==null)Wt=a,bt=r;else{if(r===null)throw $e.alternate===null?Error(o(467)):Error(o(310));bt=r,r={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Wt===null?$e.memoizedState=Wt=r:Wt=Wt.next=r}return Wt}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dl(r){var a=ul;return ul+=1,Ji===null&&(Ji=[]),r=Ay(Ji,r,a),a=$e,(Wt===null?a.memoizedState:Wt.next)===null&&(a=a.alternate,P.H=a===null||a.memoizedState===null?b1:Xh),r}function su(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return dl(r);if(r.$$typeof===C)return wn(r)}throw Error(o(438,String(r)))}function Fh(r){var a=null,s=$e.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var u=$e.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=iu(),$e.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(r),u=0;u<r;u++)s[u]=W;return a.index++,s}function Mo(r,a){return typeof a=="function"?a(r):a}function lu(r){var a=Vt();return $h(a,bt,r)}function $h(r,a,s){var u=r.queue;if(u===null)throw Error(o(311));u.lastRenderedReducer=s;var m=r.baseQueue,v=u.pending;if(v!==null){if(m!==null){var x=m.next;m.next=v.next,v.next=x}a.baseQueue=m=v,u.pending=null}if(v=r.baseState,m===null)r.memoizedState=v;else{a=m.next;var I=x=null,B=null,J=a,le=!1;do{var de=J.lane&-536870913;if(de!==J.lane?(nt&de)===de:(Io&de)===de){var te=J.revertLane;if(te===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),de===Zi&&(le=!0);else if((Io&te)===te){J=J.next,te===Zi&&(le=!0);continue}else de={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},B===null?(I=B=de,x=v):B=B.next=de,$e.lanes|=te,la|=te;de=J.action,ti&&s(v,de),v=J.hasEagerState?J.eagerState:s(v,de)}else te={lane:de,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},B===null?(I=B=te,x=v):B=B.next=te,$e.lanes|=de,la|=de;J=J.next}while(J!==null&&J!==a);if(B===null?x=v:B.next=I,!nr(v,r.memoizedState)&&(Qt=!0,le&&(s=Yi,s!==null)))throw s;r.memoizedState=v,r.baseState=x,r.baseQueue=B,u.lastRenderedState=v}return m===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Vh(r){var a=Vt(),s=a.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=r;var u=s.dispatch,m=s.pending,v=a.memoizedState;if(m!==null){s.pending=null;var x=m=m.next;do v=r(v,x.action),x=x.next;while(x!==m);nr(v,a.memoizedState)||(Qt=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),s.lastRenderedState=v}return[v,u]}function Uy(r,a,s){var u=$e,m=Vt(),v=ot;if(v){if(s===void 0)throw Error(o(407));s=s()}else s=a();var x=!nr((bt||m).memoizedState,s);if(x&&(m.memoizedState=s,Qt=!0),m=m.queue,qh($y.bind(null,u,m,r),[r]),m.getSnapshot!==a||x||Wt!==null&&Wt.memoizedState.tag&1){if(u.flags|=2048,es(9,{destroy:void 0},Fy.bind(null,u,m,s,a),null),Rt===null)throw Error(o(349));v||(Io&127)!==0||By(u,a,s)}return s}function By(r,a,s){r.flags|=16384,r={getSnapshot:a,value:s},a=$e.updateQueue,a===null?(a=iu(),$e.updateQueue=a,a.stores=[r]):(s=a.stores,s===null?a.stores=[r]:s.push(r))}function Fy(r,a,s,u){a.value=s,a.getSnapshot=u,Vy(a)&&Hy(r)}function $y(r,a,s){return s(function(){Vy(a)&&Hy(r)})}function Vy(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!nr(r,s)}catch{return!0}}function Hy(r){var a=qa(r,2);a!==null&&Zn(a,r,2)}function Hh(r){var a=kn();if(typeof r=="function"){var s=r;if(r=s(),ti){on(!0);try{s()}finally{on(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:r},a}function Gy(r,a,s,u){return r.baseState=s,$h(r,bt,typeof u=="function"?u:Mo)}function dC(r,a,s,u,m){if(du(r))throw Error(o(485));if(r=a.action,r!==null){var v={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){v.listeners.push(x)}};P.T!==null?s(!0):v.isTransition=!1,u(v),s=a.pending,s===null?(v.next=a.pending=v,qy(a,v)):(v.next=s.next,a.pending=s.next=v)}}function qy(r,a){var s=a.action,u=a.payload,m=r.state;if(a.isTransition){var v=P.T,x={};P.T=x;try{var I=s(m,u),B=P.S;B!==null&&B(x,I),Zy(r,a,I)}catch(J){Gh(r,a,J)}finally{v!==null&&x.types!==null&&(v.types=x.types),P.T=v}}else try{v=s(m,u),Zy(r,a,v)}catch(J){Gh(r,a,J)}}function Zy(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){Yy(r,a,u)},function(u){return Gh(r,a,u)}):Yy(r,a,s)}function Yy(r,a,s){a.status="fulfilled",a.value=s,Ky(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,qy(r,s)))}function Gh(r,a,s){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=s,Ky(a),a=a.next;while(a!==u)}r.action=null}function Ky(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function Wy(r,a){return a}function Qy(r,a){if(ot){var s=Rt.formState;if(s!==null){e:{var u=$e;if(ot){if(It){t:{for(var m=It,v=Or;m.nodeType!==8;){if(!v){m=null;break t}if(m=Ar(m.nextSibling),m===null){m=null;break t}}v=m.data,m=v==="F!"||v==="F"?m:null}if(m){It=Ar(m.nextSibling),u=m.data==="F!";break e}}Jo(u)}u=!1}u&&(a=s[0])}}return s=kn(),s.memoizedState=s.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wy,lastRenderedState:a},s.queue=u,s=g1.bind(null,$e,u),u.dispatch=s,u=Hh(!1),v=Qh.bind(null,$e,!1,u.queue),u=kn(),m={state:a,dispatch:null,action:r,pending:null},u.queue=m,s=dC.bind(null,$e,m,v,s),m.dispatch=s,u.memoizedState=r,[a,s,!1]}function Xy(r){var a=Vt();return Jy(a,bt,r)}function Jy(r,a,s){if(a=$h(r,a,Wy)[0],r=lu(Mo)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=dl(a)}catch(x){throw x===Ki?Xc:x}else u=a;a=Vt();var m=a.queue,v=m.dispatch;return s!==a.memoizedState&&($e.flags|=2048,es(9,{destroy:void 0},fC.bind(null,m,s),null)),[u,v,r]}function fC(r,a){r.action=a}function e1(r){var a=Vt(),s=bt;if(s!==null)return Jy(a,s,r);Vt(),a=a.memoizedState,s=Vt();var u=s.queue.dispatch;return s.memoizedState=r,[a,u,!1]}function es(r,a,s,u){return r={tag:r,create:s,deps:u,inst:a,next:null},a=$e.updateQueue,a===null&&(a=iu(),$e.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=r.next=r:(u=s.next,s.next=r,r.next=u,a.lastEffect=r),r}function t1(){return Vt().memoizedState}function cu(r,a,s,u){var m=kn();$e.flags|=r,m.memoizedState=es(1|a,{destroy:void 0},s,u===void 0?null:u)}function uu(r,a,s,u){var m=Vt();u=u===void 0?null:u;var v=m.memoizedState.inst;bt!==null&&u!==null&&kh(u,bt.memoizedState.deps)?m.memoizedState=es(a,v,s,u):($e.flags|=r,m.memoizedState=es(1|a,v,s,u))}function n1(r,a){cu(8390656,8,r,a)}function qh(r,a){uu(2048,8,r,a)}function hC(r){$e.flags|=4;var a=$e.updateQueue;if(a===null)a=iu(),$e.updateQueue=a,a.events=[r];else{var s=a.events;s===null?a.events=[r]:s.push(r)}}function r1(r){var a=Vt().memoizedState;return hC({ref:a,nextImpl:r}),function(){if((dt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}function o1(r,a){return uu(4,2,r,a)}function a1(r,a){return uu(4,4,r,a)}function i1(r,a){if(typeof a=="function"){r=r();var s=a(r);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function s1(r,a,s){s=s!=null?s.concat([r]):null,uu(4,4,i1.bind(null,a,r),s)}function Zh(){}function l1(r,a){var s=Vt();a=a===void 0?null:a;var u=s.memoizedState;return a!==null&&kh(a,u[1])?u[0]:(s.memoizedState=[r,a],r)}function c1(r,a){var s=Vt();a=a===void 0?null:a;var u=s.memoizedState;if(a!==null&&kh(a,u[1]))return u[0];if(u=r(),ti){on(!0);try{r()}finally{on(!1)}}return s.memoizedState=[u,a],u}function Yh(r,a,s){return s===void 0||(Io&1073741824)!==0&&(nt&261930)===0?r.memoizedState=a:(r.memoizedState=s,r=ub(),$e.lanes|=r,la|=r,s)}function u1(r,a,s,u){return nr(s,a)?s:Qi.current!==null?(r=Yh(r,s,u),nr(r,a)||(Qt=!0),r):(Io&42)===0||(Io&1073741824)!==0&&(nt&261930)===0?(Qt=!0,r.memoizedState=s):(r=ub(),$e.lanes|=r,la|=r,a)}function d1(r,a,s,u,m){var v=F.p;F.p=v!==0&&8>v?v:8;var x=P.T,I={};P.T=I,Qh(r,!1,a,s);try{var B=m(),J=P.S;if(J!==null&&J(I,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var le=lC(B,u);fl(r,a,le,lr(r))}else fl(r,a,u,lr(r))}catch(de){fl(r,a,{then:function(){},status:"rejected",reason:de},lr())}finally{F.p=v,x!==null&&I.types!==null&&(x.types=I.types),P.T=x}}function pC(){}function Kh(r,a,s,u){if(r.tag!==5)throw Error(o(476));var m=f1(r).queue;d1(r,m,a,H,s===null?pC:function(){return h1(r),s(u)})}function f1(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:H},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:s},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function h1(r){var a=f1(r);a.next===null&&(a=r.alternate.memoizedState),fl(r,a.next.queue,{},lr())}function Wh(){return wn(Cl)}function p1(){return Vt().memoizedState}function m1(){return Vt().memoizedState}function mC(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var s=lr();r=na(s);var u=ra(a,r,s);u!==null&&(Zn(u,a,s),sl(u,a,s)),a={cache:Rh()},r.payload=a;return}a=a.return}}function gC(r,a,s){var u=lr();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},du(r)?v1(a,s):(s=ph(r,a,s,u),s!==null&&(Zn(s,r,u),y1(s,a,u)))}function g1(r,a,s){var u=lr();fl(r,a,s,u)}function fl(r,a,s,u){var m={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(du(r))v1(a,m);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null))try{var x=a.lastRenderedState,I=v(x,s);if(m.hasEagerState=!0,m.eagerState=I,nr(I,x))return Gc(r,a,m,0),Rt===null&&Hc(),!1}catch{}if(s=ph(r,a,m,u),s!==null)return Zn(s,r,u),y1(s,a,u),!0}return!1}function Qh(r,a,s,u){if(u={lane:2,revertLane:Cp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},du(r)){if(a)throw Error(o(479))}else a=ph(r,s,u,2),a!==null&&Zn(a,r,2)}function du(r){var a=r.alternate;return r===$e||a!==null&&a===$e}function v1(r,a){Xi=ou=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function y1(r,a,s){if((s&4194048)!==0){var u=a.lanes;u&=r.pendingLanes,s|=u,a.lanes=s,_n(r,s)}}var hl={readContext:wn,use:su,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useLayoutEffect:Ut,useInsertionEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useSyncExternalStore:Ut,useId:Ut,useHostTransitionStatus:Ut,useFormState:Ut,useActionState:Ut,useOptimistic:Ut,useMemoCache:Ut,useCacheRefresh:Ut};hl.useEffectEvent=Ut;var b1={readContext:wn,use:su,useCallback:function(r,a){return kn().memoizedState=[r,a===void 0?null:a],r},useContext:wn,useEffect:n1,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,cu(4194308,4,i1.bind(null,a,r),s)},useLayoutEffect:function(r,a){return cu(4194308,4,r,a)},useInsertionEffect:function(r,a){cu(4,2,r,a)},useMemo:function(r,a){var s=kn();a=a===void 0?null:a;var u=r();if(ti){on(!0);try{r()}finally{on(!1)}}return s.memoizedState=[u,a],u},useReducer:function(r,a,s){var u=kn();if(s!==void 0){var m=s(a);if(ti){on(!0);try{s(a)}finally{on(!1)}}}else m=a;return u.memoizedState=u.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},u.queue=r,r=r.dispatch=gC.bind(null,$e,r),[u.memoizedState,r]},useRef:function(r){var a=kn();return r={current:r},a.memoizedState=r},useState:function(r){r=Hh(r);var a=r.queue,s=g1.bind(null,$e,a);return a.dispatch=s,[r.memoizedState,s]},useDebugValue:Zh,useDeferredValue:function(r,a){var s=kn();return Yh(s,r,a)},useTransition:function(){var r=Hh(!1);return r=d1.bind(null,$e,r.queue,!0,!1),kn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,s){var u=$e,m=kn();if(ot){if(s===void 0)throw Error(o(407));s=s()}else{if(s=a(),Rt===null)throw Error(o(349));(nt&127)!==0||By(u,a,s)}m.memoizedState=s;var v={value:s,getSnapshot:a};return m.queue=v,n1($y.bind(null,u,v,r),[r]),u.flags|=2048,es(9,{destroy:void 0},Fy.bind(null,u,v,s,a),null),s},useId:function(){var r=kn(),a=Rt.identifierPrefix;if(ot){var s=no,u=to;s=(u&~(1<<32-Yt(u)-1)).toString(32)+s,a="_"+a+"R_"+s,s=au++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=cC++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Wh,useFormState:Qy,useActionState:Qy,useOptimistic:function(r){var a=kn();a.memoizedState=a.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Qh.bind(null,$e,!0,s),s.dispatch=a,[r,a]},useMemoCache:Fh,useCacheRefresh:function(){return kn().memoizedState=mC.bind(null,$e)},useEffectEvent:function(r){var a=kn(),s={impl:r};return a.memoizedState=s,function(){if((dt&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Xh={readContext:wn,use:su,useCallback:l1,useContext:wn,useEffect:qh,useImperativeHandle:s1,useInsertionEffect:o1,useLayoutEffect:a1,useMemo:c1,useReducer:lu,useRef:t1,useState:function(){return lu(Mo)},useDebugValue:Zh,useDeferredValue:function(r,a){var s=Vt();return u1(s,bt.memoizedState,r,a)},useTransition:function(){var r=lu(Mo)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:dl(r),a]},useSyncExternalStore:Uy,useId:p1,useHostTransitionStatus:Wh,useFormState:Xy,useActionState:Xy,useOptimistic:function(r,a){var s=Vt();return Gy(s,bt,r,a)},useMemoCache:Fh,useCacheRefresh:m1};Xh.useEffectEvent=r1;var _1={readContext:wn,use:su,useCallback:l1,useContext:wn,useEffect:qh,useImperativeHandle:s1,useInsertionEffect:o1,useLayoutEffect:a1,useMemo:c1,useReducer:Vh,useRef:t1,useState:function(){return Vh(Mo)},useDebugValue:Zh,useDeferredValue:function(r,a){var s=Vt();return bt===null?Yh(s,r,a):u1(s,bt.memoizedState,r,a)},useTransition:function(){var r=Vh(Mo)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:dl(r),a]},useSyncExternalStore:Uy,useId:p1,useHostTransitionStatus:Wh,useFormState:e1,useActionState:e1,useOptimistic:function(r,a){var s=Vt();return bt!==null?Gy(s,bt,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:Fh,useCacheRefresh:m1};_1.useEffectEvent=r1;function Jh(r,a,s,u){a=r.memoizedState,s=s(u,a),s=s==null?a:p({},a,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var ep={enqueueSetState:function(r,a,s){r=r._reactInternals;var u=lr(),m=na(u);m.payload=a,s!=null&&(m.callback=s),a=ra(r,m,u),a!==null&&(Zn(a,r,u),sl(a,r,u))},enqueueReplaceState:function(r,a,s){r=r._reactInternals;var u=lr(),m=na(u);m.tag=1,m.payload=a,s!=null&&(m.callback=s),a=ra(r,m,u),a!==null&&(Zn(a,r,u),sl(a,r,u))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var s=lr(),u=na(s);u.tag=2,a!=null&&(u.callback=a),a=ra(r,u,s),a!==null&&(Zn(a,r,s),sl(a,r,s))}};function E1(r,a,s,u,m,v,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,v,x):a.prototype&&a.prototype.isPureReactComponent?!Js(s,u)||!Js(m,v):!0}function S1(r,a,s,u){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,u),a.state!==r&&ep.enqueueReplaceState(a,a.state,null)}function ni(r,a){var s=a;if("ref"in a){s={};for(var u in a)u!=="ref"&&(s[u]=a[u])}if(r=r.defaultProps){s===a&&(s=p({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function w1(r){Vc(r)}function x1(r){console.error(r)}function R1(r){Vc(r)}function fu(r,a){try{var s=r.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function O1(r,a,s){try{var u=r.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function tp(r,a,s){return s=na(s),s.tag=3,s.payload={element:null},s.callback=function(){fu(r,a)},s}function T1(r){return r=na(r),r.tag=3,r}function A1(r,a,s,u){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var v=u.value;r.payload=function(){return m(v)},r.callback=function(){O1(a,s,u)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){O1(a,s,u),typeof m!="function"&&(ca===null?ca=new Set([this]):ca.add(this));var I=u.stack;this.componentDidCatch(u.value,{componentStack:I!==null?I:""})})}function vC(r,a,s,u,m){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=s.alternate,a!==null&&qi(a,s,m,!0),s=or.current,s!==null){switch(s.tag){case 31:case 13:return Tr===null?xu():s.alternate===null&&Bt===0&&(Bt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,u===Jc?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([u]):a.add(u),Op(r,u,m)),!1;case 22:return s.flags|=65536,u===Jc?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([u]):s.add(u)),Op(r,u,m)),!1}throw Error(o(435,s.tag))}return Op(r,u,m),xu(),!1}if(ot)return a=or.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,u!==_h&&(r=Error(o(422),{cause:u}),nl(wr(r,s)))):(u!==_h&&(a=Error(o(423),{cause:u}),nl(wr(a,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,u=wr(u,s),m=tp(r.stateNode,u,m),Mh(r,m),Bt!==4&&(Bt=2)),!1;var v=Error(o(520),{cause:u});if(v=wr(v,s),El===null?El=[v]:El.push(v),Bt!==4&&(Bt=2),a===null)return!0;u=wr(u,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=tp(s.stateNode,u,r),Mh(s,r),!1;case 1:if(a=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ca===null||!ca.has(v))))return s.flags|=65536,m&=-m,s.lanes|=m,m=T1(m),A1(m,r,s,u),Mh(s,m),!1}s=s.return}while(s!==null);return!1}var np=Error(o(461)),Qt=!1;function xn(r,a,s,u){a.child=r===null?Ny(a,null,s,u):ei(a,r.child,s,u)}function C1(r,a,s,u,m){s=s.render;var v=a.ref;if("ref"in u){var x={};for(var I in u)I!=="ref"&&(x[I]=u[I])}else x=u;return Wa(a),u=jh(r,a,s,x,v,m),I=zh(),r!==null&&!Qt?(Uh(r,a,m),No(r,a,m)):(ot&&I&&yh(a),a.flags|=1,xn(r,a,u,m),a.child)}function I1(r,a,s,u,m){if(r===null){var v=s.type;return typeof v=="function"&&!mh(v)&&v.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=v,M1(r,a,v,u,m)):(r=Zc(s.type,null,u,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(v=r.child,!up(r,m)){var x=v.memoizedProps;if(s=s.compare,s=s!==null?s:Js,s(x,u)&&r.ref===a.ref)return No(r,a,m)}return a.flags|=1,r=Oo(v,u),r.ref=a.ref,r.return=a,a.child=r}function M1(r,a,s,u,m){if(r!==null){var v=r.memoizedProps;if(Js(v,u)&&r.ref===a.ref)if(Qt=!1,a.pendingProps=u=v,up(r,m))(r.flags&131072)!==0&&(Qt=!0);else return a.lanes=r.lanes,No(r,a,m)}return rp(r,a,s,u,m)}function N1(r,a,s,u){var m=u.children,v=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,r!==null){for(u=a.child=r.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~v}else u=0,a.child=null;return D1(r,a,v,s,u)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Qc(a,v!==null?v.cachePool:null),v!==null?Py(a,v):Dh(),ky(a);else return u=a.lanes=536870912,D1(r,a,v!==null?v.baseLanes|s:s,s,u)}else v!==null?(Qc(a,v.cachePool),Py(a,v),aa(),a.memoizedState=null):(r!==null&&Qc(a,null),Dh(),aa());return xn(r,a,m,s),a.child}function pl(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function D1(r,a,s,u,m){var v=Th();return v=v===null?null:{parent:Kt._currentValue,pool:v},a.memoizedState={baseLanes:s,cachePool:v},r!==null&&Qc(a,null),Dh(),ky(a),r!==null&&qi(r,a,u,!0),a.childLanes=m,null}function hu(r,a){return a=mu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function L1(r,a,s){return ei(a,r.child,null,s),r=hu(a,a.pendingProps),r.flags|=2,ar(a),a.memoizedState=null,r}function yC(r,a,s){var u=a.pendingProps,m=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(ot){if(u.mode==="hidden")return r=hu(a,u),a.lanes=536870912,pl(null,r);if(Ph(a),(r=It)?(r=qb(r,Or),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Qo!==null?{id:to,overflow:no}:null,retryLane:536870912,hydrationErrors:null},s=vy(r),s.return=a,a.child=s,Sn=a,It=null)):r=null,r===null)throw Jo(a);return a.lanes=536870912,null}return hu(a,u)}var v=r.memoizedState;if(v!==null){var x=v.dehydrated;if(Ph(a),m)if(a.flags&256)a.flags&=-257,a=L1(r,a,s);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(o(558));else if(Qt||qi(r,a,s,!1),m=(s&r.childLanes)!==0,Qt||m){if(u=Rt,u!==null&&(x=Bn(u,s),x!==0&&x!==v.retryLane))throw v.retryLane=x,qa(r,x),Zn(u,r,x),np;xu(),a=L1(r,a,s)}else r=v.treeContext,It=Ar(x.nextSibling),Sn=a,ot=!0,Xo=null,Or=!1,r!==null&&_y(a,r),a=hu(a,u),a.flags|=4096;return a}return r=Oo(r.child,{mode:u.mode,children:u.children}),r.ref=a.ref,a.child=r,r.return=a,r}function pu(r,a){var s=a.ref;if(s===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(r===null||r.ref!==s)&&(a.flags|=4194816)}}function rp(r,a,s,u,m){return Wa(a),s=jh(r,a,s,u,void 0,m),u=zh(),r!==null&&!Qt?(Uh(r,a,m),No(r,a,m)):(ot&&u&&yh(a),a.flags|=1,xn(r,a,s,m),a.child)}function P1(r,a,s,u,m,v){return Wa(a),a.updateQueue=null,s=zy(a,u,s,m),jy(r),u=zh(),r!==null&&!Qt?(Uh(r,a,v),No(r,a,v)):(ot&&u&&yh(a),a.flags|=1,xn(r,a,s,v),a.child)}function k1(r,a,s,u,m){if(Wa(a),a.stateNode===null){var v=$i,x=s.contextType;typeof x=="object"&&x!==null&&(v=wn(x)),v=new s(u,v),a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=ep,a.stateNode=v,v._reactInternals=a,v=a.stateNode,v.props=u,v.state=a.memoizedState,v.refs={},Ch(a),x=s.contextType,v.context=typeof x=="object"&&x!==null?wn(x):$i,v.state=a.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(Jh(a,s,x,u),v.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(x=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),x!==v.state&&ep.enqueueReplaceState(v,v.state,null),cl(a,u,v,m),ll(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(r===null){v=a.stateNode;var I=a.memoizedProps,B=ni(s,I);v.props=B;var J=v.context,le=s.contextType;x=$i,typeof le=="object"&&le!==null&&(x=wn(le));var de=s.getDerivedStateFromProps;le=typeof de=="function"||typeof v.getSnapshotBeforeUpdate=="function",I=a.pendingProps!==I,le||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(I||J!==x)&&S1(a,v,u,x),ta=!1;var te=a.memoizedState;v.state=te,cl(a,u,v,m),ll(),J=a.memoizedState,I||te!==J||ta?(typeof de=="function"&&(Jh(a,s,de,u),J=a.memoizedState),(B=ta||E1(a,s,B,u,te,J,x))?(le||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"&&(a.flags|=4194308)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=J),v.props=u,v.state=J,v.context=x,u=B):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{v=a.stateNode,Ih(r,a),x=a.memoizedProps,le=ni(s,x),v.props=le,de=a.pendingProps,te=v.context,J=s.contextType,B=$i,typeof J=="object"&&J!==null&&(B=wn(J)),I=s.getDerivedStateFromProps,(J=typeof I=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(x!==de||te!==B)&&S1(a,v,u,B),ta=!1,te=a.memoizedState,v.state=te,cl(a,u,v,m),ll();var oe=a.memoizedState;x!==de||te!==oe||ta||r!==null&&r.dependencies!==null&&Kc(r.dependencies)?(typeof I=="function"&&(Jh(a,s,I,u),oe=a.memoizedState),(le=ta||E1(a,s,le,u,te,oe,B)||r!==null&&r.dependencies!==null&&Kc(r.dependencies))?(J||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(u,oe,B),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(u,oe,B)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=oe),v.props=u,v.state=oe,v.context=B,u=le):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(a.flags|=1024),u=!1)}return v=u,pu(r,a),u=(a.flags&128)!==0,v||u?(v=a.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:v.render(),a.flags|=1,r!==null&&u?(a.child=ei(a,r.child,null,m),a.child=ei(a,null,s,m)):xn(r,a,s,m),a.memoizedState=v.state,r=a.child):r=No(r,a,m),r}function j1(r,a,s,u){return Ya(),a.flags|=256,xn(r,a,s,u),a.child}var op={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ap(r){return{baseLanes:r,cachePool:Oy()}}function ip(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=sr),r}function z1(r,a,s){var u=a.pendingProps,m=!1,v=(a.flags&128)!==0,x;if((x=v)||(x=r!==null&&r.memoizedState===null?!1:($t.current&2)!==0),x&&(m=!0,a.flags&=-129),x=(a.flags&32)!==0,a.flags&=-33,r===null){if(ot){if(m?oa(a):aa(),(r=It)?(r=qb(r,Or),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Qo!==null?{id:to,overflow:no}:null,retryLane:536870912,hydrationErrors:null},s=vy(r),s.return=a,a.child=s,Sn=a,It=null)):r=null,r===null)throw Jo(a);return $p(r)?a.lanes=32:a.lanes=536870912,null}var I=u.children;return u=u.fallback,m?(aa(),m=a.mode,I=mu({mode:"hidden",children:I},m),u=Za(u,m,s,null),I.return=a,u.return=a,I.sibling=u,a.child=I,u=a.child,u.memoizedState=ap(s),u.childLanes=ip(r,x,s),a.memoizedState=op,pl(null,u)):(oa(a),sp(a,I))}var B=r.memoizedState;if(B!==null&&(I=B.dehydrated,I!==null)){if(v)a.flags&256?(oa(a),a.flags&=-257,a=lp(r,a,s)):a.memoizedState!==null?(aa(),a.child=r.child,a.flags|=128,a=null):(aa(),I=u.fallback,m=a.mode,u=mu({mode:"visible",children:u.children},m),I=Za(I,m,s,null),I.flags|=2,u.return=a,I.return=a,u.sibling=I,a.child=u,ei(a,r.child,null,s),u=a.child,u.memoizedState=ap(s),u.childLanes=ip(r,x,s),a.memoizedState=op,a=pl(null,u));else if(oa(a),$p(I)){if(x=I.nextSibling&&I.nextSibling.dataset,x)var J=x.dgst;x=J,u=Error(o(419)),u.stack="",u.digest=x,nl({value:u,source:null,stack:null}),a=lp(r,a,s)}else if(Qt||qi(r,a,s,!1),x=(s&r.childLanes)!==0,Qt||x){if(x=Rt,x!==null&&(u=Bn(x,s),u!==0&&u!==B.retryLane))throw B.retryLane=u,qa(r,u),Zn(x,r,u),np;Fp(I)||xu(),a=lp(r,a,s)}else Fp(I)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,It=Ar(I.nextSibling),Sn=a,ot=!0,Xo=null,Or=!1,r!==null&&_y(a,r),a=sp(a,u.children),a.flags|=4096);return a}return m?(aa(),I=u.fallback,m=a.mode,B=r.child,J=B.sibling,u=Oo(B,{mode:"hidden",children:u.children}),u.subtreeFlags=B.subtreeFlags&65011712,J!==null?I=Oo(J,I):(I=Za(I,m,s,null),I.flags|=2),I.return=a,u.return=a,u.sibling=I,a.child=u,pl(null,u),u=a.child,I=r.child.memoizedState,I===null?I=ap(s):(m=I.cachePool,m!==null?(B=Kt._currentValue,m=m.parent!==B?{parent:B,pool:B}:m):m=Oy(),I={baseLanes:I.baseLanes|s,cachePool:m}),u.memoizedState=I,u.childLanes=ip(r,x,s),a.memoizedState=op,pl(r.child,u)):(oa(a),s=r.child,r=s.sibling,s=Oo(s,{mode:"visible",children:u.children}),s.return=a,s.sibling=null,r!==null&&(x=a.deletions,x===null?(a.deletions=[r],a.flags|=16):x.push(r)),a.child=s,a.memoizedState=null,s)}function sp(r,a){return a=mu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function mu(r,a){return r=rr(22,r,null,a),r.lanes=0,r}function lp(r,a,s){return ei(a,r.child,null,s),r=sp(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function U1(r,a,s){r.lanes|=a;var u=r.alternate;u!==null&&(u.lanes|=a),wh(r.return,a,s)}function cp(r,a,s,u,m,v){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:m,treeForkCount:v}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=s,x.tailMode=m,x.treeForkCount=v)}function B1(r,a,s){var u=a.pendingProps,m=u.revealOrder,v=u.tail;u=u.children;var x=$t.current,I=(x&2)!==0;if(I?(x=x&1|2,a.flags|=128):x&=1,ee($t,x),xn(r,a,u,s),u=ot?tl:0,!I&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&U1(r,s,a);else if(r.tag===19)U1(r,s,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=a.child,m=null;s!==null;)r=s.alternate,r!==null&&ru(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=a.child,a.child=null):(m=s.sibling,s.sibling=null),cp(a,!1,m,s,v,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=a.child,a.child=null;m!==null;){if(r=m.alternate,r!==null&&ru(r)===null){a.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}cp(a,!0,s,null,v,u);break;case"together":cp(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function No(r,a,s){if(r!==null&&(a.dependencies=r.dependencies),la|=a.lanes,(s&a.childLanes)===0)if(r!==null){if(qi(r,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(o(153));if(a.child!==null){for(r=a.child,s=Oo(r,r.pendingProps),a.child=s,s.return=a;r.sibling!==null;)r=r.sibling,s=s.sibling=Oo(r,r.pendingProps),s.return=a;s.sibling=null}return a.child}function up(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Kc(r)))}function bC(r,a,s){switch(a.tag){case 3:Se(a,a.stateNode.containerInfo),ea(a,Kt,r.memoizedState.cache),Ya();break;case 27:case 5:Le(a);break;case 4:Se(a,a.stateNode.containerInfo);break;case 10:ea(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Ph(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(oa(a),a.flags|=128,null):(s&a.child.childLanes)!==0?z1(r,a,s):(oa(a),r=No(r,a,s),r!==null?r.sibling:null);oa(a);break;case 19:var m=(r.flags&128)!==0;if(u=(s&a.childLanes)!==0,u||(qi(r,a,s,!1),u=(s&a.childLanes)!==0),m){if(u)return B1(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ee($t,$t.current),u)break;return null;case 22:return a.lanes=0,N1(r,a,s,a.pendingProps);case 24:ea(a,Kt,r.memoizedState.cache)}return No(r,a,s)}function F1(r,a,s){if(r!==null)if(r.memoizedProps!==a.pendingProps)Qt=!0;else{if(!up(r,s)&&(a.flags&128)===0)return Qt=!1,bC(r,a,s);Qt=(r.flags&131072)!==0}else Qt=!1,ot&&(a.flags&1048576)!==0&&by(a,tl,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(r=Xa(a.elementType),a.type=r,typeof r=="function")mh(r)?(u=ni(r,u),a.tag=1,a=k1(null,a,r,u,s)):(a.tag=0,a=rp(null,a,r,u,s));else{if(r!=null){var m=r.$$typeof;if(m===O){a.tag=11,a=C1(null,a,r,u,s);break e}else if(m===N){a.tag=14,a=I1(null,a,r,u,s);break e}}throw a=ne(r)||r,Error(o(306,a,""))}}return a;case 0:return rp(r,a,a.type,a.pendingProps,s);case 1:return u=a.type,m=ni(u,a.pendingProps),k1(r,a,u,m,s);case 3:e:{if(Se(a,a.stateNode.containerInfo),r===null)throw Error(o(387));u=a.pendingProps;var v=a.memoizedState;m=v.element,Ih(r,a),cl(a,u,null,s);var x=a.memoizedState;if(u=x.cache,ea(a,Kt,u),u!==v.cache&&xh(a,[Kt],s,!0),ll(),u=x.element,v.isDehydrated)if(v={element:u,isDehydrated:!1,cache:x.cache},a.updateQueue.baseState=v,a.memoizedState=v,a.flags&256){a=j1(r,a,u,s);break e}else if(u!==m){m=wr(Error(o(424)),a),nl(m),a=j1(r,a,u,s);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,It=Ar(r.firstChild),Sn=a,ot=!0,Xo=null,Or=!0,s=Ny(a,null,u,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ya(),u===m){a=No(r,a,s);break e}xn(r,a,u,s)}a=a.child}return a;case 26:return pu(r,a),r===null?(s=Xb(a.type,null,a.pendingProps,null))?a.memoizedState=s:ot||(s=a.type,r=a.pendingProps,u=Mu(_e.current).createElement(s),u[En]=a,u[Fn]=r,Rn(u,s,r),fn(u),a.stateNode=u):a.memoizedState=Xb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Le(a),r===null&&ot&&(u=a.stateNode=Kb(a.type,a.pendingProps,_e.current),Sn=a,Or=!0,m=It,ha(a.type)?(Vp=m,It=Ar(u.firstChild)):It=m),xn(r,a,a.pendingProps.children,s),pu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&ot&&((m=u=It)&&(u=KC(u,a.type,a.pendingProps,Or),u!==null?(a.stateNode=u,Sn=a,It=Ar(u.firstChild),Or=!1,m=!0):m=!1),m||Jo(a)),Le(a),m=a.type,v=a.pendingProps,x=r!==null?r.memoizedProps:null,u=v.children,zp(m,v)?u=null:x!==null&&zp(m,x)&&(a.flags|=32),a.memoizedState!==null&&(m=jh(r,a,uC,null,null,s),Cl._currentValue=m),pu(r,a),xn(r,a,u,s),a.child;case 6:return r===null&&ot&&((r=s=It)&&(s=WC(s,a.pendingProps,Or),s!==null?(a.stateNode=s,Sn=a,It=null,r=!0):r=!1),r||Jo(a)),null;case 13:return z1(r,a,s);case 4:return Se(a,a.stateNode.containerInfo),u=a.pendingProps,r===null?a.child=ei(a,null,u,s):xn(r,a,u,s),a.child;case 11:return C1(r,a,a.type,a.pendingProps,s);case 7:return xn(r,a,a.pendingProps,s),a.child;case 8:return xn(r,a,a.pendingProps.children,s),a.child;case 12:return xn(r,a,a.pendingProps.children,s),a.child;case 10:return u=a.pendingProps,ea(a,a.type,u.value),xn(r,a,u.children,s),a.child;case 9:return m=a.type._context,u=a.pendingProps.children,Wa(a),m=wn(m),u=u(m),a.flags|=1,xn(r,a,u,s),a.child;case 14:return I1(r,a,a.type,a.pendingProps,s);case 15:return M1(r,a,a.type,a.pendingProps,s);case 19:return B1(r,a,s);case 31:return yC(r,a,s);case 22:return N1(r,a,s,a.pendingProps);case 24:return Wa(a),u=wn(Kt),r===null?(m=Th(),m===null&&(m=Rt,v=Rh(),m.pooledCache=v,v.refCount++,v!==null&&(m.pooledCacheLanes|=s),m=v),a.memoizedState={parent:u,cache:m},Ch(a),ea(a,Kt,m)):((r.lanes&s)!==0&&(Ih(r,a),cl(a,null,null,s),ll()),m=r.memoizedState,v=a.memoizedState,m.parent!==u?(m={parent:u,cache:u},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),ea(a,Kt,u)):(u=v.cache,ea(a,Kt,u),u!==m.cache&&xh(a,[Kt],s,!0))),xn(r,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(o(156,a.tag))}function Do(r){r.flags|=4}function dp(r,a,s,u,m){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(pb())r.flags|=8192;else throw Ja=Jc,Ah}else r.flags&=-16777217}function $1(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!r_(a))if(pb())r.flags|=8192;else throw Ja=Jc,Ah}function gu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?yt():536870912,r.lanes|=a,os|=a)}function ml(r,a){if(!ot)switch(r.tailMode){case"hidden":a=r.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function Mt(r){var a=r.alternate!==null&&r.alternate.child===r.child,s=0,u=0;if(a)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=u,r.childLanes=s,a}function _C(r,a,s){var u=a.pendingProps;switch(bh(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(a),null;case 1:return Mt(a),null;case 3:return s=a.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Co(Kt),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Gi(a)?Do(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Eh())),Mt(a),null;case 26:var m=a.type,v=a.memoizedState;return r===null?(Do(a),v!==null?(Mt(a),$1(a,v)):(Mt(a),dp(a,m,null,u,s))):v?v!==r.memoizedState?(Do(a),Mt(a),$1(a,v)):(Mt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==u&&Do(a),Mt(a),dp(a,m,r,u,s)),null;case 27:if(Ee(a),s=_e.current,m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&Do(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return Mt(a),null}r=se.current,Gi(a)?Ey(a):(r=Kb(m,u,s),a.stateNode=r,Do(a))}return Mt(a),null;case 5:if(Ee(a),m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&Do(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return Mt(a),null}if(v=se.current,Gi(a))Ey(a);else{var x=Mu(_e.current);switch(v){case 1:v=x.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:v=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":v=x.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":v=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":v=x.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof u.is=="string"?x.createElement("select",{is:u.is}):x.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?x.createElement(m,{is:u.is}):x.createElement(m)}}v[En]=a,v[Fn]=u;e:for(x=a.child;x!==null;){if(x.tag===5||x.tag===6)v.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===a)break e;for(;x.sibling===null;){if(x.return===null||x.return===a)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}a.stateNode=v;e:switch(Rn(v,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Do(a)}}return Mt(a),dp(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,s),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==u&&Do(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(o(166));if(r=_e.current,Gi(a)){if(r=a.stateNode,s=a.memoizedProps,u=null,m=Sn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}r[En]=a,r=!!(r.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||zb(r.nodeValue,s)),r||Jo(a,!0)}else r=Mu(r).createTextNode(u),r[En]=a,a.stateNode=r}return Mt(a),null;case 31:if(s=a.memoizedState,r===null||r.memoizedState!==null){if(u=Gi(a),s!==null){if(r===null){if(!u)throw Error(o(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(557));r[En]=a}else Ya(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),r=!1}else s=Eh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return a.flags&256?(ar(a),a):(ar(a),null);if((a.flags&128)!==0)throw Error(o(558))}return Mt(a),null;case 13:if(u=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Gi(a),u!==null&&u.dehydrated!==null){if(r===null){if(!m)throw Error(o(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[En]=a}else Ya(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),m=!1}else m=Eh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(ar(a),a):(ar(a),null)}return ar(a),(a.flags&128)!==0?(a.lanes=s,a):(s=u!==null,r=r!==null&&r.memoizedState!==null,s&&(u=a.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==m&&(u.flags|=2048)),s!==r&&s&&(a.child.flags|=8192),gu(a,a.updateQueue),Mt(a),null);case 4:return De(),r===null&&Dp(a.stateNode.containerInfo),Mt(a),null;case 10:return Co(a.type),Mt(a),null;case 19:if(Q($t),u=a.memoizedState,u===null)return Mt(a),null;if(m=(a.flags&128)!==0,v=u.rendering,v===null)if(m)ml(u,!1);else{if(Bt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(v=ru(r),v!==null){for(a.flags|=128,ml(u,!1),r=v.updateQueue,a.updateQueue=r,gu(a,r),a.subtreeFlags=0,r=s,s=a.child;s!==null;)gy(s,r),s=s.sibling;return ee($t,$t.current&1|2),ot&&To(a,u.treeForkCount),a.child}r=r.sibling}u.tail!==null&&ue()>Eu&&(a.flags|=128,m=!0,ml(u,!1),a.lanes=4194304)}else{if(!m)if(r=ru(v),r!==null){if(a.flags|=128,m=!0,r=r.updateQueue,a.updateQueue=r,gu(a,r),ml(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!ot)return Mt(a),null}else 2*ue()-u.renderingStartTime>Eu&&s!==536870912&&(a.flags|=128,m=!0,ml(u,!1),a.lanes=4194304);u.isBackwards?(v.sibling=a.child,a.child=v):(r=u.last,r!==null?r.sibling=v:a.child=v,u.last=v)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=ue(),r.sibling=null,s=$t.current,ee($t,m?s&1|2:s&1),ot&&To(a,u.treeForkCount),r):(Mt(a),null);case 22:case 23:return ar(a),Lh(),u=a.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(s&536870912)!==0&&(a.flags&128)===0&&(Mt(a),a.subtreeFlags&6&&(a.flags|=8192)):Mt(a),s=a.updateQueue,s!==null&&gu(a,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==s&&(a.flags|=2048),r!==null&&Q(Qa),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Co(Kt),Mt(a),null;case 25:return null;case 30:return null}throw Error(o(156,a.tag))}function EC(r,a){switch(bh(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Co(Kt),De(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return Ee(a),null;case 31:if(a.memoizedState!==null){if(ar(a),a.alternate===null)throw Error(o(340));Ya()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(ar(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(o(340));Ya()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return Q($t),null;case 4:return De(),null;case 10:return Co(a.type),null;case 22:case 23:return ar(a),Lh(),r!==null&&Q(Qa),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Co(Kt),null;case 25:return null;default:return null}}function V1(r,a){switch(bh(a),a.tag){case 3:Co(Kt),De();break;case 26:case 27:case 5:Ee(a);break;case 4:De();break;case 31:a.memoizedState!==null&&ar(a);break;case 13:ar(a);break;case 19:Q($t);break;case 10:Co(a.type);break;case 22:case 23:ar(a),Lh(),r!==null&&Q(Qa);break;case 24:Co(Kt)}}function gl(r,a){try{var s=a.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var m=u.next;s=m;do{if((s.tag&r)===r){u=void 0;var v=s.create,x=s.inst;u=v(),x.destroy=u}s=s.next}while(s!==m)}}catch(I){gt(a,a.return,I)}}function ia(r,a,s){try{var u=a.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var v=m.next;u=v;do{if((u.tag&r)===r){var x=u.inst,I=x.destroy;if(I!==void 0){x.destroy=void 0,m=a;var B=s,J=I;try{J()}catch(le){gt(m,B,le)}}}u=u.next}while(u!==v)}}catch(le){gt(a,a.return,le)}}function H1(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{Ly(a,s)}catch(u){gt(r,r.return,u)}}}function G1(r,a,s){s.props=ni(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(u){gt(r,a,u)}}function vl(r,a){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof s=="function"?r.refCleanup=s(u):s.current=u}}catch(m){gt(r,a,m)}}function ro(r,a){var s=r.ref,u=r.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(m){gt(r,a,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){gt(r,a,m)}else s.current=null}function q1(r){var a=r.type,s=r.memoizedProps,u=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(m){gt(r,r.return,m)}}function fp(r,a,s){try{var u=r.stateNode;VC(u,r.type,s,a),u[Fn]=a}catch(m){gt(r,r.return,m)}}function Z1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ha(r.type)||r.tag===4}function hp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Z1(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&&ha(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 pp(r,a,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(r),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=xo));else if(u!==4&&(u===27&&ha(r.type)&&(s=r.stateNode,a=null),r=r.child,r!==null))for(pp(r,a,s),r=r.sibling;r!==null;)pp(r,a,s),r=r.sibling}function vu(r,a,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?s.insertBefore(r,a):s.appendChild(r);else if(u!==4&&(u===27&&ha(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(vu(r,a,s),r=r.sibling;r!==null;)vu(r,a,s),r=r.sibling}function Y1(r){var a=r.stateNode,s=r.memoizedProps;try{for(var u=r.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);Rn(a,u,s),a[En]=r,a[Fn]=s}catch(v){gt(r,r.return,v)}}var Lo=!1,Xt=!1,mp=!1,K1=typeof WeakSet=="function"?WeakSet:Set,hn=null;function SC(r,a){if(r=r.containerInfo,kp=zu,r=sy(r),lh(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var m=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var x=0,I=-1,B=-1,J=0,le=0,de=r,te=null;t:for(;;){for(var oe;de!==s||m!==0&&de.nodeType!==3||(I=x+m),de!==v||u!==0&&de.nodeType!==3||(B=x+u),de.nodeType===3&&(x+=de.nodeValue.length),(oe=de.firstChild)!==null;)te=de,de=oe;for(;;){if(de===r)break t;if(te===s&&++J===m&&(I=x),te===v&&++le===u&&(B=x),(oe=de.nextSibling)!==null)break;de=te,te=de.parentNode}de=oe}s=I===-1||B===-1?null:{start:I,end:B}}else s=null}s=s||{start:0,end:0}}else s=null;for(jp={focusedElem:r,selectionRange:s},zu=!1,hn=a;hn!==null;)if(a=hn,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,hn=r;else for(;hn!==null;){switch(a=hn,v=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.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=a,m=v.memoizedProps,v=v.memoizedState,u=s.stateNode;try{var Te=ni(s.type,m);r=u.getSnapshotBeforeUpdate(Te,v),u.__reactInternalSnapshotBeforeUpdate=r}catch(je){gt(s,s.return,je)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,s=r.nodeType,s===9)Bp(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Bp(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(o(163))}if(r=a.sibling,r!==null){r.return=a.return,hn=r;break}hn=a.return}}function W1(r,a,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:ko(r,s),u&4&&gl(5,s);break;case 1:if(ko(r,s),u&4)if(r=s.stateNode,a===null)try{r.componentDidMount()}catch(x){gt(s,s.return,x)}else{var m=ni(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(x){gt(s,s.return,x)}}u&64&&H1(s),u&512&&vl(s,s.return);break;case 3:if(ko(r,s),u&64&&(r=s.updateQueue,r!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Ly(r,a)}catch(x){gt(s,s.return,x)}}break;case 27:a===null&&u&4&&Y1(s);case 26:case 5:ko(r,s),a===null&&u&4&&q1(s),u&512&&vl(s,s.return);break;case 12:ko(r,s);break;case 31:ko(r,s),u&4&&J1(r,s);break;case 13:ko(r,s),u&4&&eb(r,s),u&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=MC.bind(null,s),QC(r,s))));break;case 22:if(u=s.memoizedState!==null||Lo,!u){a=a!==null&&a.memoizedState!==null||Xt,m=Lo;var v=Xt;Lo=u,(Xt=a)&&!v?jo(r,s,(s.subtreeFlags&8772)!==0):ko(r,s),Lo=m,Xt=v}break;case 30:break;default:ko(r,s)}}function Q1(r){var a=r.alternate;a!==null&&(r.alternate=null,Q1(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&Gf(a)),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 Dt=null,Vn=!1;function Po(r,a,s){for(s=s.child;s!==null;)X1(r,a,s),s=s.sibling}function X1(r,a,s){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Zt,s)}catch{}switch(s.tag){case 26:Xt||ro(s,a),Po(r,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Xt||ro(s,a);var u=Dt,m=Vn;ha(s.type)&&(Dt=s.stateNode,Vn=!1),Po(r,a,s),Ol(s.stateNode),Dt=u,Vn=m;break;case 5:Xt||ro(s,a);case 6:if(u=Dt,m=Vn,Dt=null,Po(r,a,s),Dt=u,Vn=m,Dt!==null)if(Vn)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(s.stateNode)}catch(v){gt(s,a,v)}else try{Dt.removeChild(s.stateNode)}catch(v){gt(s,a,v)}break;case 18:Dt!==null&&(Vn?(r=Dt,Hb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),fs(r)):Hb(Dt,s.stateNode));break;case 4:u=Dt,m=Vn,Dt=s.stateNode.containerInfo,Vn=!0,Po(r,a,s),Dt=u,Vn=m;break;case 0:case 11:case 14:case 15:ia(2,s,a),Xt||ia(4,s,a),Po(r,a,s);break;case 1:Xt||(ro(s,a),u=s.stateNode,typeof u.componentWillUnmount=="function"&&G1(s,a,u)),Po(r,a,s);break;case 21:Po(r,a,s);break;case 22:Xt=(u=Xt)||s.memoizedState!==null,Po(r,a,s),Xt=u;break;default:Po(r,a,s)}}function J1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{fs(r)}catch(s){gt(a,a.return,s)}}}function eb(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{fs(r)}catch(s){gt(a,a.return,s)}}function wC(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new K1),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new K1),a;default:throw Error(o(435,r.tag))}}function yu(r,a){var s=wC(r);a.forEach(function(u){if(!s.has(u)){s.add(u);var m=NC.bind(null,r,u);u.then(m,m)}})}function Hn(r,a){var s=a.deletions;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u],v=r,x=a,I=x;e:for(;I!==null;){switch(I.tag){case 27:if(ha(I.type)){Dt=I.stateNode,Vn=!1;break e}break;case 5:Dt=I.stateNode,Vn=!1;break e;case 3:case 4:Dt=I.stateNode.containerInfo,Vn=!0;break e}I=I.return}if(Dt===null)throw Error(o(160));X1(v,x,m),Dt=null,Vn=!1,v=m.alternate,v!==null&&(v.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)tb(a,r),a=a.sibling}var Fr=null;function tb(r,a){var s=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Hn(a,r),Gn(r),u&4&&(ia(3,r,r.return),gl(3,r),ia(5,r,r.return));break;case 1:Hn(a,r),Gn(r),u&512&&(Xt||s===null||ro(s,s.return)),u&64&&Lo&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var m=Fr;if(Hn(a,r),Gn(r),u&512&&(Xt||s===null||ro(s,s.return)),u&4){var v=s!==null?s.memoizedState:null;if(u=r.memoizedState,s===null)if(u===null)if(r.stateNode===null){e:{u=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(u){case"title":v=m.getElementsByTagName("title")[0],(!v||v[Hs]||v[En]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=m.createElement(u),m.head.insertBefore(v,m.querySelector("head > title"))),Rn(v,u,s),v[En]=r,fn(v),u=v;break e;case"link":var x=t_("link","href",m).get(u+(s.href||""));if(x){for(var I=0;I<x.length;I++)if(v=x[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)){x.splice(I,1);break t}}v=m.createElement(u),Rn(v,u,s),m.head.appendChild(v);break;case"meta":if(x=t_("meta","content",m).get(u+(s.content||""))){for(I=0;I<x.length;I++)if(v=x[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)){x.splice(I,1);break t}}v=m.createElement(u),Rn(v,u,s),m.head.appendChild(v);break;default:throw Error(o(468,u))}v[En]=r,fn(v),u=v}r.stateNode=u}else n_(m,r.type,r.stateNode);else r.stateNode=e_(m,u,r.memoizedProps);else v!==u?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,u===null?n_(m,r.type,r.stateNode):e_(m,u,r.memoizedProps)):u===null&&r.stateNode!==null&&fp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Hn(a,r),Gn(r),u&512&&(Xt||s===null||ro(s,s.return)),s!==null&&u&4&&fp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Hn(a,r),Gn(r),u&512&&(Xt||s===null||ro(s,s.return)),r.flags&32){m=r.stateNode;try{Pi(m,"")}catch(Te){gt(r,r.return,Te)}}u&4&&r.stateNode!=null&&(m=r.memoizedProps,fp(r,m,s!==null?s.memoizedProps:m)),u&1024&&(mp=!0);break;case 6:if(Hn(a,r),Gn(r),u&4){if(r.stateNode===null)throw Error(o(162));u=r.memoizedProps,s=r.stateNode;try{s.nodeValue=u}catch(Te){gt(r,r.return,Te)}}break;case 3:if(Lu=null,m=Fr,Fr=Nu(a.containerInfo),Hn(a,r),Fr=m,Gn(r),u&4&&s!==null&&s.memoizedState.isDehydrated)try{fs(a.containerInfo)}catch(Te){gt(r,r.return,Te)}mp&&(mp=!1,nb(r));break;case 4:u=Fr,Fr=Nu(r.stateNode.containerInfo),Hn(a,r),Gn(r),Fr=u;break;case 12:Hn(a,r),Gn(r);break;case 31:Hn(a,r),Gn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,yu(r,u)));break;case 13:Hn(a,r),Gn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(_u=ue()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,yu(r,u)));break;case 22:m=r.memoizedState!==null;var B=s!==null&&s.memoizedState!==null,J=Lo,le=Xt;if(Lo=J||m,Xt=le||B,Hn(a,r),Xt=le,Lo=J,Gn(r),u&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||B||Lo||Xt||ri(r)),s=null,a=r;;){if(a.tag===5||a.tag===26){if(s===null){B=s=a;try{if(v=B.stateNode,m)x=v.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{I=B.stateNode;var de=B.memoizedProps.style,te=de!=null&&de.hasOwnProperty("display")?de.display:null;I.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Te){gt(B,B.return,Te)}}}else if(a.tag===6){if(s===null){B=a;try{B.stateNode.nodeValue=m?"":B.memoizedProps}catch(Te){gt(B,B.return,Te)}}}else if(a.tag===18){if(s===null){B=a;try{var oe=B.stateNode;m?Gb(oe,!0):Gb(B.stateNode,!1)}catch(Te){gt(B,B.return,Te)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=r.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,yu(r,s))));break;case 19:Hn(a,r),Gn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,yu(r,u)));break;case 30:break;case 21:break;default:Hn(a,r),Gn(r)}}function Gn(r){var a=r.flags;if(a&2){try{for(var s,u=r.return;u!==null;){if(Z1(u)){s=u;break}u=u.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var m=s.stateNode,v=hp(r);vu(r,v,m);break;case 5:var x=s.stateNode;s.flags&32&&(Pi(x,""),s.flags&=-33);var I=hp(r);vu(r,I,x);break;case 3:case 4:var B=s.stateNode.containerInfo,J=hp(r);pp(r,J,B);break;default:throw Error(o(161))}}catch(le){gt(r,r.return,le)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function nb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;nb(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function ko(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)W1(r,a.alternate,a),a=a.sibling}function ri(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:ia(4,a,a.return),ri(a);break;case 1:ro(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&G1(a,a.return,s),ri(a);break;case 27:Ol(a.stateNode);case 26:case 5:ro(a,a.return),ri(a);break;case 22:a.memoizedState===null&&ri(a);break;case 30:ri(a);break;default:ri(a)}r=r.sibling}}function jo(r,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,m=r,v=a,x=v.flags;switch(v.tag){case 0:case 11:case 15:jo(m,v,s),gl(4,v);break;case 1:if(jo(m,v,s),u=v,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(J){gt(u,u.return,J)}if(u=v,m=u.updateQueue,m!==null){var I=u.stateNode;try{var B=m.shared.hiddenCallbacks;if(B!==null)for(m.shared.hiddenCallbacks=null,m=0;m<B.length;m++)Dy(B[m],I)}catch(J){gt(u,u.return,J)}}s&&x&64&&H1(v),vl(v,v.return);break;case 27:Y1(v);case 26:case 5:jo(m,v,s),s&&u===null&&x&4&&q1(v),vl(v,v.return);break;case 12:jo(m,v,s);break;case 31:jo(m,v,s),s&&x&4&&J1(m,v);break;case 13:jo(m,v,s),s&&x&4&&eb(m,v);break;case 22:v.memoizedState===null&&jo(m,v,s),vl(v,v.return);break;case 30:break;default:jo(m,v,s)}a=a.sibling}}function gp(r,a){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&rl(s))}function vp(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&rl(r))}function $r(r,a,s,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)rb(r,a,s,u),a=a.sibling}function rb(r,a,s,u){var m=a.flags;switch(a.tag){case 0:case 11:case 15:$r(r,a,s,u),m&2048&&gl(9,a);break;case 1:$r(r,a,s,u);break;case 3:$r(r,a,s,u),m&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&rl(r)));break;case 12:if(m&2048){$r(r,a,s,u),r=a.stateNode;try{var v=a.memoizedProps,x=v.id,I=v.onPostCommit;typeof I=="function"&&I(x,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){gt(a,a.return,B)}}else $r(r,a,s,u);break;case 31:$r(r,a,s,u);break;case 13:$r(r,a,s,u);break;case 23:break;case 22:v=a.stateNode,x=a.alternate,a.memoizedState!==null?v._visibility&2?$r(r,a,s,u):yl(r,a):v._visibility&2?$r(r,a,s,u):(v._visibility|=2,ts(r,a,s,u,(a.subtreeFlags&10256)!==0||!1)),m&2048&&gp(x,a);break;case 24:$r(r,a,s,u),m&2048&&vp(a.alternate,a);break;default:$r(r,a,s,u)}}function ts(r,a,s,u,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var v=r,x=a,I=s,B=u,J=x.flags;switch(x.tag){case 0:case 11:case 15:ts(v,x,I,B,m),gl(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?ts(v,x,I,B,m):yl(v,x):(le._visibility|=2,ts(v,x,I,B,m)),m&&J&2048&&gp(x.alternate,x);break;case 24:ts(v,x,I,B,m),m&&J&2048&&vp(x.alternate,x);break;default:ts(v,x,I,B,m)}a=a.sibling}}function yl(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=r,u=a,m=u.flags;switch(u.tag){case 22:yl(s,u),m&2048&&gp(u.alternate,u);break;case 24:yl(s,u),m&2048&&vp(u.alternate,u);break;default:yl(s,u)}a=a.sibling}}var bl=8192;function ns(r,a,s){if(r.subtreeFlags&bl)for(r=r.child;r!==null;)ob(r,a,s),r=r.sibling}function ob(r,a,s){switch(r.tag){case 26:ns(r,a,s),r.flags&bl&&r.memoizedState!==null&&c4(s,Fr,r.memoizedState,r.memoizedProps);break;case 5:ns(r,a,s);break;case 3:case 4:var u=Fr;Fr=Nu(r.stateNode.containerInfo),ns(r,a,s),Fr=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=bl,bl=16777216,ns(r,a,s),bl=u):ns(r,a,s));break;default:ns(r,a,s)}}function ab(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function _l(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];hn=u,sb(u,r)}ab(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ib(r),r=r.sibling}function ib(r){switch(r.tag){case 0:case 11:case 15:_l(r),r.flags&2048&&ia(9,r,r.return);break;case 3:_l(r);break;case 12:_l(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,bu(r)):_l(r);break;default:_l(r)}}function bu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];hn=u,sb(u,r)}ab(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:ia(8,a,a.return),bu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,bu(a));break;default:bu(a)}r=r.sibling}}function sb(r,a){for(;hn!==null;){var s=hn;switch(s.tag){case 0:case 11:case 15:ia(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:rl(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,hn=u;else e:for(s=r;hn!==null;){u=hn;var m=u.sibling,v=u.return;if(Q1(u),u===s){hn=null;break e}if(m!==null){m.return=v,hn=m;break e}hn=v}}}var xC={getCacheForType:function(r){var a=wn(Kt),s=a.data.get(r);return s===void 0&&(s=r(),a.data.set(r,s)),s},cacheSignal:function(){return wn(Kt).controller.signal}},RC=typeof WeakMap=="function"?WeakMap:Map,dt=0,Rt=null,Xe=null,nt=0,mt=0,ir=null,sa=!1,rs=!1,yp=!1,zo=0,Bt=0,la=0,oi=0,bp=0,sr=0,os=0,El=null,qn=null,_p=!1,_u=0,lb=0,Eu=1/0,Su=null,ca=null,an=0,ua=null,as=null,Uo=0,Ep=0,Sp=null,cb=null,Sl=0,wp=null;function lr(){return(dt&2)!==0&&nt!==0?nt&-nt:P.T!==null?Cp():Vf()}function ub(){if(sr===0)if((nt&536870912)===0||ot){var r=it;it<<=1,(it&3932160)===0&&(it=262144),sr=r}else sr=536870912;return r=or.current,r!==null&&(r.flags|=32),sr}function Zn(r,a,s){(r===Rt&&(mt===2||mt===9)||r.cancelPendingCommit!==null)&&(is(r,0),da(r,nt,sr,!1)),lt(r,s),((dt&2)===0||r!==Rt)&&(r===Rt&&((dt&2)===0&&(oi|=s),Bt===4&&da(r,nt,sr,!1)),oo(r))}function db(r,a,s){if((dt&6)!==0)throw Error(o(327));var u=!s&&(a&127)===0&&(a&r.expiredLanes)===0||Ye(r,a),m=u?AC(r,a):Rp(r,a,!0),v=u;do{if(m===0){rs&&!u&&da(r,a,0,!1);break}else{if(s=r.current.alternate,v&&!OC(s)){m=Rp(r,a,!1),v=!1;continue}if(m===2){if(v=a,r.errorRecoveryDisabledLanes&v)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){a=x;e:{var I=r;m=El;var B=I.current.memoizedState.isDehydrated;if(B&&(is(I,x).flags|=256),x=Rp(I,x,!1),x!==2){if(yp&&!B){I.errorRecoveryDisabledLanes|=v,oi|=v,m=4;break e}v=qn,qn=m,v!==null&&(qn===null?qn=v:qn.push.apply(qn,v))}m=x}if(v=!1,m!==2)continue}}if(m===1){is(r,0),da(r,a,0,!0);break}e:{switch(u=r,v=m,v){case 0:case 1:throw Error(o(345));case 4:if((a&4194048)!==a)break;case 6:da(u,a,sr,!sa);break e;case 2:qn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((a&62914560)===a&&(m=_u+300-ue(),10<m)){if(da(u,a,sr,!sa),Me(u,0,!0)!==0)break e;Uo=a,u.timeoutHandle=$b(fb.bind(null,u,s,qn,Su,_p,a,sr,oi,os,sa,v,"Throttled",-0,0),m);break e}fb(u,s,qn,Su,_p,a,sr,oi,os,sa,v,null,-0,0)}}break}while(!0);oo(r)}function fb(r,a,s,u,m,v,x,I,B,J,le,de,te,oe){if(r.timeoutHandle=-1,de=a.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xo},ob(a,v,de);var Te=(v&62914560)===v?_u-ue():(v&4194048)===v?lb-ue():0;if(Te=u4(de,Te),Te!==null){Uo=v,r.cancelPendingCommit=Te(_b.bind(null,r,a,v,s,u,m,x,I,B,le,de,null,te,oe)),da(r,v,x,!J);return}}_b(r,a,v,s,u,m,x,I,B)}function OC(r){for(var a=r;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var m=s[u],v=m.getSnapshot;m=m.value;try{if(!nr(v(),m))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function da(r,a,s,u){a&=~bp,a&=~oi,r.suspendedLanes|=a,r.pingedLanes&=~a,u&&(r.warmLanes|=a),u=r.expirationTimes;for(var m=a;0<m;){var v=31-Yt(m),x=1<<v;u[v]=-1,m&=~x}s!==0&&br(r,s,a)}function wu(){return(dt&6)===0?(wl(0),!1):!0}function xp(){if(Xe!==null){if(mt===0)var r=Xe.return;else r=Xe,Ao=Ka=null,Bh(r),Wi=null,al=0,r=Xe;for(;r!==null;)V1(r.alternate,r),r=r.return;Xe=null}}function is(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,qC(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Uo=0,xp(),Rt=r,Xe=s=Oo(r.current,null),nt=a,mt=0,ir=null,sa=!1,rs=Ye(r,a),yp=!1,os=sr=bp=oi=la=Bt=0,qn=El=null,_p=!1,(a&8)!==0&&(a|=a&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=a;0<u;){var m=31-Yt(u),v=1<<m;a|=r[m],u&=~v}return zo=a,Hc(),s}function hb(r,a){$e=null,P.H=hl,a===Ki||a===Xc?(a=Cy(),mt=3):a===Ah?(a=Cy(),mt=4):mt=a===np?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ir=a,Xe===null&&(Bt=1,fu(r,wr(a,r.current)))}function pb(){var r=or.current;return r===null?!0:(nt&4194048)===nt?Tr===null:(nt&62914560)===nt||(nt&536870912)!==0?r===Tr:!1}function mb(){var r=P.H;return P.H=hl,r===null?hl:r}function gb(){var r=P.A;return P.A=xC,r}function xu(){Bt=4,sa||(nt&4194048)!==nt&&or.current!==null||(rs=!0),(la&134217727)===0&&(oi&134217727)===0||Rt===null||da(Rt,nt,sr,!1)}function Rp(r,a,s){var u=dt;dt|=2;var m=mb(),v=gb();(Rt!==r||nt!==a)&&(Su=null,is(r,a)),a=!1;var x=Bt;e:do try{if(mt!==0&&Xe!==null){var I=Xe,B=ir;switch(mt){case 8:xp(),x=6;break e;case 3:case 2:case 9:case 6:or.current===null&&(a=!0);var J=mt;if(mt=0,ir=null,ss(r,I,B,J),s&&rs){x=0;break e}break;default:J=mt,mt=0,ir=null,ss(r,I,B,J)}}TC(),x=Bt;break}catch(le){hb(r,le)}while(!0);return a&&r.shellSuspendCounter++,Ao=Ka=null,dt=u,P.H=m,P.A=v,Xe===null&&(Rt=null,nt=0,Hc()),x}function TC(){for(;Xe!==null;)vb(Xe)}function AC(r,a){var s=dt;dt|=2;var u=mb(),m=gb();Rt!==r||nt!==a?(Su=null,Eu=ue()+500,is(r,a)):rs=Ye(r,a);e:do try{if(mt!==0&&Xe!==null){a=Xe;var v=ir;t:switch(mt){case 1:mt=0,ir=null,ss(r,a,v,1);break;case 2:case 9:if(Ty(v)){mt=0,ir=null,yb(a);break}a=function(){mt!==2&&mt!==9||Rt!==r||(mt=7),oo(r)},v.then(a,a);break e;case 3:mt=7;break e;case 4:mt=5;break e;case 7:Ty(v)?(mt=0,ir=null,yb(a)):(mt=0,ir=null,ss(r,a,v,7));break;case 5:var x=null;switch(Xe.tag){case 26:x=Xe.memoizedState;case 5:case 27:var I=Xe;if(x?r_(x):I.stateNode.complete){mt=0,ir=null;var B=I.sibling;if(B!==null)Xe=B;else{var J=I.return;J!==null?(Xe=J,Ru(J)):Xe=null}break t}}mt=0,ir=null,ss(r,a,v,5);break;case 6:mt=0,ir=null,ss(r,a,v,6);break;case 8:xp(),Bt=6;break e;default:throw Error(o(462))}}CC();break}catch(le){hb(r,le)}while(!0);return Ao=Ka=null,P.H=u,P.A=m,dt=s,Xe!==null?0:(Rt=null,nt=0,Hc(),Bt)}function CC(){for(;Xe!==null&&!q();)vb(Xe)}function vb(r){var a=F1(r.alternate,r,zo);r.memoizedProps=r.pendingProps,a===null?Ru(r):Xe=a}function yb(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=P1(s,a,a.pendingProps,a.type,void 0,nt);break;case 11:a=P1(s,a,a.pendingProps,a.type.render,a.ref,nt);break;case 5:Bh(a);default:V1(s,a),a=Xe=gy(a,zo),a=F1(s,a,zo)}r.memoizedProps=r.pendingProps,a===null?Ru(r):Xe=a}function ss(r,a,s,u){Ao=Ka=null,Bh(a),Wi=null,al=0;var m=a.return;try{if(vC(r,m,a,s,nt)){Bt=1,fu(r,wr(s,r.current)),Xe=null;return}}catch(v){if(m!==null)throw Xe=m,v;Bt=1,fu(r,wr(s,r.current)),Xe=null;return}a.flags&32768?(ot||u===1?r=!0:rs||(nt&536870912)!==0?r=!1:(sa=r=!0,(u===2||u===9||u===3||u===6)&&(u=or.current,u!==null&&u.tag===13&&(u.flags|=16384))),bb(a,r)):Ru(a)}function Ru(r){var a=r;do{if((a.flags&32768)!==0){bb(a,sa);return}r=a.return;var s=_C(a.alternate,a,zo);if(s!==null){Xe=s;return}if(a=a.sibling,a!==null){Xe=a;return}Xe=a=r}while(a!==null);Bt===0&&(Bt=5)}function bb(r,a){do{var s=EC(r.alternate,r);if(s!==null){s.flags&=32767,Xe=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(r=r.sibling,r!==null)){Xe=r;return}Xe=r=s}while(r!==null);Bt=6,Xe=null}function _b(r,a,s,u,m,v,x,I,B){r.cancelPendingCommit=null;do Ou();while(an!==0);if((dt&6)!==0)throw Error(o(327));if(a!==null){if(a===r.current)throw Error(o(177));if(v=a.lanes|a.childLanes,v|=hh,Ct(r,s,v,x,I,B),r===Rt&&(Xe=Rt=null,nt=0),as=a,ua=r,Uo=s,Ep=v,Sp=m,cb=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,DC(Be,function(){return Rb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=P.T,P.T=null,m=F.p,F.p=2,x=dt,dt|=4;try{SC(r,a,s)}finally{dt=x,F.p=m,P.T=u}}an=1,Eb(),Sb(),wb()}}function Eb(){if(an===1){an=0;var r=ua,a=as,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{tb(a,r);var v=jp,x=sy(r.containerInfo),I=v.focusedElem,B=v.selectionRange;if(x!==I&&I&&I.ownerDocument&&iy(I.ownerDocument.documentElement,I)){if(B!==null&&lh(I)){var J=B.start,le=B.end;if(le===void 0&&(le=J),"selectionStart"in I)I.selectionStart=J,I.selectionEnd=Math.min(le,I.value.length);else{var de=I.ownerDocument||document,te=de&&de.defaultView||window;if(te.getSelection){var oe=te.getSelection(),Te=I.textContent.length,je=Math.min(B.start,Te),Et=B.end===void 0?je:Math.min(B.end,Te);!oe.extend&&je>Et&&(x=Et,Et=je,je=x);var Y=ay(I,je),V=ay(I,Et);if(Y&&V&&(oe.rangeCount!==1||oe.anchorNode!==Y.node||oe.anchorOffset!==Y.offset||oe.focusNode!==V.node||oe.focusOffset!==V.offset)){var X=de.createRange();X.setStart(Y.node,Y.offset),oe.removeAllRanges(),je>Et?(oe.addRange(X),oe.extend(V.node,V.offset)):(X.setEnd(V.node,V.offset),oe.addRange(X))}}}}for(de=[],oe=I;oe=oe.parentNode;)oe.nodeType===1&&de.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<de.length;I++){var ce=de[I];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}zu=!!kp,jp=kp=null}finally{dt=m,F.p=u,P.T=s}}r.current=a,an=2}}function Sb(){if(an===2){an=0;var r=ua,a=as,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{W1(r,a.alternate,a)}finally{dt=m,F.p=u,P.T=s}}an=3}}function wb(){if(an===4||an===3){an=0,Z();var r=ua,a=as,s=Uo,u=cb;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?an=5:(an=0,as=ua=null,xb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(ca=null),Ur(s),a=a.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Zt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=P.T,m=F.p,F.p=2,P.T=null;try{for(var v=r.onRecoverableError,x=0;x<u.length;x++){var I=u[x];v(I.value,{componentStack:I.stack})}}finally{P.T=a,F.p=m}}(Uo&3)!==0&&Ou(),oo(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===wp?Sl++:(Sl=0,wp=r):Sl=0,wl(0)}}function xb(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,rl(a)))}function Ou(){return Eb(),Sb(),wb(),Rb()}function Rb(){if(an!==5)return!1;var r=ua,a=Ep;Ep=0;var s=Ur(Uo),u=P.T,m=F.p;try{F.p=32>s?32:s,P.T=null,s=Sp,Sp=null;var v=ua,x=Uo;if(an=0,as=ua=null,Uo=0,(dt&6)!==0)throw Error(o(331));var I=dt;if(dt|=4,ib(v.current),rb(v,v.current,x,s),dt=I,wl(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Zt,v)}catch{}return!0}finally{F.p=m,P.T=u,xb(r,a)}}function Ob(r,a,s){a=wr(s,a),a=tp(r.stateNode,a,2),r=ra(r,a,2),r!==null&&(lt(r,2),oo(r))}function gt(r,a,s){if(r.tag===3)Ob(r,r,s);else for(;a!==null;){if(a.tag===3){Ob(a,r,s);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ca===null||!ca.has(u))){r=wr(s,r),s=T1(2),u=ra(a,s,2),u!==null&&(A1(s,u,a,r),lt(u,2),oo(u));break}}a=a.return}}function Op(r,a,s){var u=r.pingCache;if(u===null){u=r.pingCache=new RC;var m=new Set;u.set(a,m)}else m=u.get(a),m===void 0&&(m=new Set,u.set(a,m));m.has(s)||(yp=!0,m.add(s),r=IC.bind(null,r,a,s),a.then(r,r))}function IC(r,a,s){var u=r.pingCache;u!==null&&u.delete(a),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Rt===r&&(nt&s)===s&&(Bt===4||Bt===3&&(nt&62914560)===nt&&300>ue()-_u?(dt&2)===0&&is(r,0):bp|=s,os===nt&&(os=0)),oo(r)}function Tb(r,a){a===0&&(a=yt()),r=qa(r,a),r!==null&&(lt(r,a),oo(r))}function MC(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),Tb(r,s)}function NC(r,a){var s=0;switch(r.tag){case 31:case 13:var u=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(o(314))}u!==null&&u.delete(a),Tb(r,s)}function DC(r,a){return We(r,a)}var Tu=null,ls=null,Tp=!1,Au=!1,Ap=!1,fa=0;function oo(r){r!==ls&&r.next===null&&(ls===null?Tu=ls=r:ls=ls.next=r),Au=!0,Tp||(Tp=!0,PC())}function wl(r,a){if(!Ap&&Au){Ap=!0;do for(var s=!1,u=Tu;u!==null;){if(r!==0){var m=u.pendingLanes;if(m===0)var v=0;else{var x=u.suspendedLanes,I=u.pingedLanes;v=(1<<31-Yt(42|r)+1)-1,v&=m&~(x&~I),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,Mb(u,v))}else v=nt,v=Me(u,u===Rt?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||Ye(u,v)||(s=!0,Mb(u,v));u=u.next}while(s);Ap=!1}}function LC(){Ab()}function Ab(){Au=Tp=!1;var r=0;fa!==0&&GC()&&(r=fa);for(var a=ue(),s=null,u=Tu;u!==null;){var m=u.next,v=Cb(u,a);v===0?(u.next=null,s===null?Tu=m:s.next=m,m===null&&(ls=s)):(s=u,(r!==0||(v&3)!==0)&&(Au=!0)),u=m}an!==0&&an!==5||wl(r),fa!==0&&(fa=0)}function Cb(r,a){for(var s=r.suspendedLanes,u=r.pingedLanes,m=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var x=31-Yt(v),I=1<<x,B=m[x];B===-1?((I&s)===0||(I&u)!==0)&&(m[x]=xt(I,a)):B<=a&&(r.expiredLanes|=I),v&=~I}if(a=Rt,s=nt,s=Me(r,r===a?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,s===0||r===a&&(mt===2||mt===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&U(u),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Ye(r,s)){if(a=s&-s,a===r.callbackPriority)return a;switch(u!==null&&U(u),Ur(s)){case 2:case 8:s=xe;break;case 32:s=Be;break;case 268435456:s=wt;break;default:s=Be}return u=Ib.bind(null,r),s=We(s,u),r.callbackPriority=a,r.callbackNode=s,a}return u!==null&&u!==null&&U(u),r.callbackPriority=2,r.callbackNode=null,2}function Ib(r,a){if(an!==0&&an!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Ou()&&r.callbackNode!==s)return null;var u=nt;return u=Me(r,r===Rt?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(db(r,u,a),Cb(r,ue()),r.callbackNode!=null&&r.callbackNode===s?Ib.bind(null,r):null)}function Mb(r,a){if(Ou())return null;db(r,a,!0)}function PC(){ZC(function(){(dt&6)!==0?We(he,LC):Ab()})}function Cp(){if(fa===0){var r=Zi;r===0&&(r=tt,tt<<=1,(tt&261888)===0&&(tt=256)),fa=r}return fa}function Nb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:kc(""+r)}function Db(r,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,r.id&&s.setAttribute("form",r.id),a.parentNode.insertBefore(s,a),r=new FormData(r),s.parentNode.removeChild(s),r}function kC(r,a,s,u,m){if(a==="submit"&&s&&s.stateNode===m){var v=Nb((m[Fn]||null).action),x=u.submitter;x&&(a=(a=x[Fn]||null)?Nb(a.formAction):x.getAttribute("formAction"),a!==null&&(v=a,x=null));var I=new Bc("action","action",null,u,m);r.push({event:I,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(fa!==0){var B=x?Db(m,x):new FormData(m);Kh(s,{pending:!0,data:B,method:m.method,action:v},null,B)}}else typeof v=="function"&&(I.preventDefault(),B=x?Db(m,x):new FormData(m),Kh(s,{pending:!0,data:B,method:m.method,action:v},v,B))},currentTarget:m}]})}}for(var Ip=0;Ip<fh.length;Ip++){var Mp=fh[Ip],jC=Mp.toLowerCase(),zC=Mp[0].toUpperCase()+Mp.slice(1);Br(jC,"on"+zC)}Br(uy,"onAnimationEnd"),Br(dy,"onAnimationIteration"),Br(fy,"onAnimationStart"),Br("dblclick","onDoubleClick"),Br("focusin","onFocus"),Br("focusout","onBlur"),Br(eC,"onTransitionRun"),Br(tC,"onTransitionStart"),Br(nC,"onTransitionCancel"),Br(hy,"onTransitionEnd"),Di("onMouseEnter",["mouseout","mouseover"]),Di("onMouseLeave",["mouseout","mouseover"]),Di("onPointerEnter",["pointerout","pointerover"]),Di("onPointerLeave",["pointerout","pointerover"]),$a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$a("onBeforeInput",["compositionend","keypress","textInput","paste"]),$a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xl="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(" "),UC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xl));function Lb(r,a){a=(a&4)!==0;for(var s=0;s<r.length;s++){var u=r[s],m=u.event;u=u.listeners;e:{var v=void 0;if(a)for(var x=u.length-1;0<=x;x--){var I=u[x],B=I.instance,J=I.currentTarget;if(I=I.listener,B!==v&&m.isPropagationStopped())break e;v=I,m.currentTarget=J;try{v(m)}catch(le){Vc(le)}m.currentTarget=null,v=B}else for(x=0;x<u.length;x++){if(I=u[x],B=I.instance,J=I.currentTarget,I=I.listener,B!==v&&m.isPropagationStopped())break e;v=I,m.currentTarget=J;try{v(m)}catch(le){Vc(le)}m.currentTarget=null,v=B}}}}function Je(r,a){var s=a[Hf];s===void 0&&(s=a[Hf]=new Set);var u=r+"__bubble";s.has(u)||(Pb(a,r,2,!1),s.add(u))}function Np(r,a,s){var u=0;a&&(u|=4),Pb(s,r,u,a)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function Dp(r){if(!r[Cu]){r[Cu]=!0,A0.forEach(function(s){s!=="selectionchange"&&(UC.has(s)||Np(s,!1,r),Np(s,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Cu]||(a[Cu]=!0,Np("selectionchange",!1,a))}}function Pb(r,a,s,u){switch(u_(a)){case 2:var m=h4;break;case 8:m=p4;break;default:m=Yp}s=m.bind(null,a,s,r),m=void 0,!Jf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),u?m!==void 0?r.addEventListener(a,s,{capture:!0,passive:m}):r.addEventListener(a,s,!0):m!==void 0?r.addEventListener(a,s,{passive:m}):r.addEventListener(a,s,!1)}function Lp(r,a,s,u,m){var v=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var I=u.stateNode.containerInfo;if(I===m)break;if(x===4)for(x=u.return;x!==null;){var B=x.tag;if((B===3||B===4)&&x.stateNode.containerInfo===m)return;x=x.return}for(;I!==null;){if(x=Ii(I),x===null)return;if(B=x.tag,B===5||B===6||B===26||B===27){u=v=x;continue e}I=I.parentNode}}u=u.return}B0(function(){var J=v,le=Qf(s),de=[];e:{var te=py.get(r);if(te!==void 0){var oe=Bc,Te=r;switch(r){case"keypress":if(zc(s)===0)break e;case"keydown":case"keyup":oe=NA;break;case"focusin":Te="focus",oe=rh;break;case"focusout":Te="blur",oe=rh;break;case"beforeblur":case"afterblur":oe=rh;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":oe=V0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=_A;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=PA;break;case uy:case dy:case fy:oe=wA;break;case hy:oe=jA;break;case"scroll":case"scrollend":oe=yA;break;case"wheel":oe=UA;break;case"copy":case"cut":case"paste":oe=RA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=G0;break;case"toggle":case"beforetoggle":oe=FA}var je=(a&4)!==0,Et=!je&&(r==="scroll"||r==="scrollend"),Y=je?te!==null?te+"Capture":null:te;je=[];for(var V=J,X;V!==null;){var ce=V;if(X=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||X===null||Y===null||(ce=qs(V,Y),ce!=null&&je.push(Rl(V,ce,X))),Et)break;V=V.return}0<je.length&&(te=new oe(te,Te,null,s,le),de.push({event:te,listeners:je}))}}if((a&7)===0){e:{if(te=r==="mouseover"||r==="pointerover",oe=r==="mouseout"||r==="pointerout",te&&s!==Wf&&(Te=s.relatedTarget||s.fromElement)&&(Ii(Te)||Te[Ci]))break e;if((oe||te)&&(te=le.window===le?le:(te=le.ownerDocument)?te.defaultView||te.parentWindow:window,oe?(Te=s.relatedTarget||s.toElement,oe=J,Te=Te?Ii(Te):null,Te!==null&&(Et=l(Te),je=Te.tag,Te!==Et||je!==5&&je!==27&&je!==6)&&(Te=null)):(oe=null,Te=J),oe!==Te)){if(je=V0,ce="onMouseLeave",Y="onMouseEnter",V="mouse",(r==="pointerout"||r==="pointerover")&&(je=G0,ce="onPointerLeave",Y="onPointerEnter",V="pointer"),Et=oe==null?te:Gs(oe),X=Te==null?te:Gs(Te),te=new je(ce,V+"leave",oe,s,le),te.target=Et,te.relatedTarget=X,ce=null,Ii(le)===J&&(je=new je(Y,V+"enter",Te,s,le),je.target=X,je.relatedTarget=Et,ce=je),Et=ce,oe&&Te)t:{for(je=BC,Y=oe,V=Te,X=0,ce=Y;ce;ce=je(ce))X++;ce=0;for(var Pe=V;Pe;Pe=je(Pe))ce++;for(;0<X-ce;)Y=je(Y),X--;for(;0<ce-X;)V=je(V),ce--;for(;X--;){if(Y===V||V!==null&&Y===V.alternate){je=Y;break t}Y=je(Y),V=je(V)}je=null}else je=null;oe!==null&&kb(de,te,oe,je,!1),Te!==null&&Et!==null&&kb(de,Et,Te,je,!0)}}e:{if(te=J?Gs(J):window,oe=te.nodeName&&te.nodeName.toLowerCase(),oe==="select"||oe==="input"&&te.type==="file")var ct=J0;else if(Q0(te))if(ey)ct=QA;else{ct=KA;var Ne=YA}else oe=te.nodeName,!oe||oe.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&Kf(J.elementType)&&(ct=J0):ct=WA;if(ct&&(ct=ct(r,J))){X0(de,ct,s,le);break e}Ne&&Ne(r,te,J),r==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&Yf(te,"number",te.value)}switch(Ne=J?Gs(J):window,r){case"focusin":(Q0(Ne)||Ne.contentEditable==="true")&&(Ui=Ne,ch=J,el=null);break;case"focusout":el=ch=Ui=null;break;case"mousedown":uh=!0;break;case"contextmenu":case"mouseup":case"dragend":uh=!1,ly(de,s,le);break;case"selectionchange":if(JA)break;case"keydown":case"keyup":ly(de,s,le)}var Ve;if(ah)e:{switch(r){case"compositionstart":var rt="onCompositionStart";break e;case"compositionend":rt="onCompositionEnd";break e;case"compositionupdate":rt="onCompositionUpdate";break e}rt=void 0}else zi?K0(r,s)&&(rt="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(rt="onCompositionStart");rt&&(q0&&s.locale!=="ko"&&(zi||rt!=="onCompositionStart"?rt==="onCompositionEnd"&&zi&&(Ve=F0()):(Wo=le,eh="value"in Wo?Wo.value:Wo.textContent,zi=!0)),Ne=Iu(J,rt),0<Ne.length&&(rt=new H0(rt,r,null,s,le),de.push({event:rt,listeners:Ne}),Ve?rt.data=Ve:(Ve=W0(s),Ve!==null&&(rt.data=Ve)))),(Ve=VA?HA(r,s):GA(r,s))&&(rt=Iu(J,"onBeforeInput"),0<rt.length&&(Ne=new H0("onBeforeInput","beforeinput",null,s,le),de.push({event:Ne,listeners:rt}),Ne.data=Ve)),kC(de,r,J,s,le)}Lb(de,a)})}function Rl(r,a,s){return{instance:r,listener:a,currentTarget:s}}function Iu(r,a){for(var s=a+"Capture",u=[];r!==null;){var m=r,v=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||v===null||(m=qs(r,s),m!=null&&u.unshift(Rl(r,m,v)),m=qs(r,a),m!=null&&u.push(Rl(r,m,v))),r.tag===3)return u;r=r.return}return[]}function BC(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function kb(r,a,s,u,m){for(var v=a._reactName,x=[];s!==null&&s!==u;){var I=s,B=I.alternate,J=I.stateNode;if(I=I.tag,B!==null&&B===u)break;I!==5&&I!==26&&I!==27||J===null||(B=J,m?(J=qs(s,v),J!=null&&x.unshift(Rl(s,J,B))):m||(J=qs(s,v),J!=null&&x.push(Rl(s,J,B)))),s=s.return}x.length!==0&&r.push({event:a,listeners:x})}var FC=/\r\n?/g,$C=/\u0000|\uFFFD/g;function jb(r){return(typeof r=="string"?r:""+r).replace(FC,`
|
|
10
|
-
`).replace($C,"")}function zb(r,a){return a=jb(a),jb(r)===a}function _t(r,a,s,u,m,v){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Pi(r,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Pi(r,""+u);break;case"className":Lc(r,"class",u);break;case"tabIndex":Lc(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Lc(r,s,u);break;case"style":z0(r,u,v);break;case"data":if(a!=="object"){Lc(r,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||s!=="href")){r.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=kc(""+u),r.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="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"?(a!=="input"&&_t(r,a,"name",m.name,m,null),_t(r,a,"formEncType",m.formEncType,m,null),_t(r,a,"formMethod",m.formMethod,m,null),_t(r,a,"formTarget",m.formTarget,m,null)):(_t(r,a,"encType",m.encType,m,null),_t(r,a,"method",m.method,m,null),_t(r,a,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=kc(""+u),r.setAttribute(s,u);break;case"onClick":u!=null&&(r.onclick=xo);break;case"onScroll":u!=null&&Je("scroll",r);break;case"onScrollEnd":u!=null&&Je("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=s}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}s=kc(""+u),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":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""+u):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":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":u===!0?r.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,u):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(s,u):r.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(s):r.setAttribute(s,u);break;case"popover":Je("beforetoggle",r),Je("toggle",r),Dc(r,"popover",u);break;case"xlinkActuate":wo(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":wo(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":wo(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":wo(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":wo(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":wo(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":wo(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":wo(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":wo(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Dc(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=gA.get(s)||s,Dc(r,s,u))}}function Pp(r,a,s,u,m,v){switch(s){case"style":z0(r,u,v);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=s}}break;case"children":typeof u=="string"?Pi(r,u):(typeof u=="number"||typeof u=="bigint")&&Pi(r,""+u);break;case"onScroll":u!=null&&Je("scroll",r);break;case"onScrollEnd":u!=null&&Je("scrollend",r);break;case"onClick":u!=null&&(r.onclick=xo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!C0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),a=s.slice(2,m?s.length-7:void 0),v=r[Fn]||null,v=v!=null?v[s]:null,typeof v=="function"&&r.removeEventListener(a,v,m),typeof u=="function")){typeof v!="function"&&v!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(a,u,m);break e}s in r?r[s]=u:u===!0?r.setAttribute(s,""):Dc(r,s,u)}}}function Rn(r,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",r),Je("load",r);var u=!1,m=!1,v;for(v in s)if(s.hasOwnProperty(v)){var x=s[v];if(x!=null)switch(v){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:_t(r,a,v,x,s,null)}}m&&_t(r,a,"srcSet",s.srcSet,s,null),u&&_t(r,a,"src",s.src,s,null);return;case"input":Je("invalid",r);var I=v=x=m=null,B=null,J=null;for(u in s)if(s.hasOwnProperty(u)){var le=s[u];if(le!=null)switch(u){case"name":m=le;break;case"type":x=le;break;case"checked":B=le;break;case"defaultChecked":J=le;break;case"value":v=le;break;case"defaultValue":I=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,a));break;default:_t(r,a,u,le,s,null)}}L0(r,v,I,B,J,x,m,!1);return;case"select":Je("invalid",r),u=x=v=null;for(m in s)if(s.hasOwnProperty(m)&&(I=s[m],I!=null))switch(m){case"value":v=I;break;case"defaultValue":x=I;break;case"multiple":u=I;default:_t(r,a,m,I,s,null)}a=v,s=x,r.multiple=!!u,a!=null?Li(r,!!u,a,!1):s!=null&&Li(r,!!u,s,!0);return;case"textarea":Je("invalid",r),v=m=u=null;for(x in s)if(s.hasOwnProperty(x)&&(I=s[x],I!=null))switch(x){case"value":u=I;break;case"defaultValue":m=I;break;case"children":v=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(91));break;default:_t(r,a,x,I,s,null)}k0(r,u,m,v);return;case"option":for(B in s)s.hasOwnProperty(B)&&(u=s[B],u!=null)&&(B==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":_t(r,a,B,u,s,null));return;case"dialog":Je("beforetoggle",r),Je("toggle",r),Je("cancel",r),Je("close",r);break;case"iframe":case"object":Je("load",r);break;case"video":case"audio":for(u=0;u<xl.length;u++)Je(xl[u],r);break;case"image":Je("error",r),Je("load",r);break;case"details":Je("toggle",r);break;case"embed":case"source":case"link":Je("error",r),Je("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)&&(u=s[J],u!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:_t(r,a,J,u,s,null)}return;default:if(Kf(a)){for(le in s)s.hasOwnProperty(le)&&(u=s[le],u!==void 0&&Pp(r,a,le,u,s,void 0));return}}for(I in s)s.hasOwnProperty(I)&&(u=s[I],u!=null&&_t(r,a,I,u,s,null))}function VC(r,a,s,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,v=null,x=null,I=null,B=null,J=null,le=null;for(oe in s){var de=s[oe];if(s.hasOwnProperty(oe)&&de!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":B=de;default:u.hasOwnProperty(oe)||_t(r,a,oe,null,u,de)}}for(var te in u){var oe=u[te];if(de=s[te],u.hasOwnProperty(te)&&(oe!=null||de!=null))switch(te){case"type":v=oe;break;case"name":m=oe;break;case"checked":J=oe;break;case"defaultChecked":le=oe;break;case"value":x=oe;break;case"defaultValue":I=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,a));break;default:oe!==de&&_t(r,a,te,oe,u,de)}}Zf(r,x,I,B,J,le,v,m);return;case"select":oe=x=I=te=null;for(v in s)if(B=s[v],s.hasOwnProperty(v)&&B!=null)switch(v){case"value":break;case"multiple":oe=B;default:u.hasOwnProperty(v)||_t(r,a,v,null,u,B)}for(m in u)if(v=u[m],B=s[m],u.hasOwnProperty(m)&&(v!=null||B!=null))switch(m){case"value":te=v;break;case"defaultValue":I=v;break;case"multiple":x=v;default:v!==B&&_t(r,a,m,v,u,B)}a=I,s=x,u=oe,te!=null?Li(r,!!s,te,!1):!!u!=!!s&&(a!=null?Li(r,!!s,a,!0):Li(r,!!s,s?[]:"",!1));return;case"textarea":oe=te=null;for(I in s)if(m=s[I],s.hasOwnProperty(I)&&m!=null&&!u.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:_t(r,a,I,null,u,m)}for(x in u)if(m=u[x],v=s[x],u.hasOwnProperty(x)&&(m!=null||v!=null))switch(x){case"value":te=m;break;case"defaultValue":oe=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==v&&_t(r,a,x,m,u,v)}P0(r,te,oe);return;case"option":for(var Te in s)te=s[Te],s.hasOwnProperty(Te)&&te!=null&&!u.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:_t(r,a,Te,null,u,te));for(B in u)te=u[B],oe=s[B],u.hasOwnProperty(B)&&te!==oe&&(te!=null||oe!=null)&&(B==="selected"?r.selected=te&&typeof te!="function"&&typeof te!="symbol":_t(r,a,B,te,u,oe));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 je in s)te=s[je],s.hasOwnProperty(je)&&te!=null&&!u.hasOwnProperty(je)&&_t(r,a,je,null,u,te);for(J in u)if(te=u[J],oe=s[J],u.hasOwnProperty(J)&&te!==oe&&(te!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(o(137,a));break;default:_t(r,a,J,te,u,oe)}return;default:if(Kf(a)){for(var Et in s)te=s[Et],s.hasOwnProperty(Et)&&te!==void 0&&!u.hasOwnProperty(Et)&&Pp(r,a,Et,void 0,u,te);for(le in u)te=u[le],oe=s[le],!u.hasOwnProperty(le)||te===oe||te===void 0&&oe===void 0||Pp(r,a,le,te,u,oe);return}}for(var Y in s)te=s[Y],s.hasOwnProperty(Y)&&te!=null&&!u.hasOwnProperty(Y)&&_t(r,a,Y,null,u,te);for(de in u)te=u[de],oe=s[de],!u.hasOwnProperty(de)||te===oe||te==null&&oe==null||_t(r,a,de,te,u,oe)}function Ub(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function HC(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var m=s[u],v=m.transferSize,x=m.initiatorType,I=m.duration;if(v&&I&&Ub(x)){for(x=0,I=m.responseEnd,u+=1;u<s.length;u++){var B=s[u],J=B.startTime;if(J>I)break;var le=B.transferSize,de=B.initiatorType;le&&Ub(de)&&(B=B.responseEnd,x+=le*(B<I?1:(I-J)/(B-J)))}if(--u,a+=8*(v+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var kp=null,jp=null;function Mu(r){return r.nodeType===9?r:r.ownerDocument}function Bb(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 Fb(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function zp(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Up=null;function GC(){var r=window.event;return r&&r.type==="popstate"?r===Up?!1:(Up=r,!0):(Up=null,!1)}var $b=typeof setTimeout=="function"?setTimeout:void 0,qC=typeof clearTimeout=="function"?clearTimeout:void 0,Vb=typeof Promise=="function"?Promise:void 0,ZC=typeof queueMicrotask=="function"?queueMicrotask:typeof Vb<"u"?function(r){return Vb.resolve(null).then(r).catch(YC)}:$b;function YC(r){setTimeout(function(){throw r})}function ha(r){return r==="head"}function Hb(r,a){var s=a,u=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(u===0){r.removeChild(m),fs(a);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Ol(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ol(s);for(var v=s.firstChild;v;){var x=v.nextSibling,I=v.nodeName;v[Hs]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=x}}else s==="body"&&Ol(r.ownerDocument.body);s=m}while(s);fs(a)}function Gb(r,a){var s=r;r=0;do{var u=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=u}while(s)}function Bp(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Bp(s),Gf(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function KC(r,a,s,u){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[Hs])switch(a){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(a==="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=Ar(r.nextSibling),r===null)break}return null}function WC(r,a,s){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Ar(r.nextSibling),r===null))return null;return r}function qb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Ar(r.nextSibling),r===null))return null;return r}function Fp(r){return r.data==="$?"||r.data==="$~"}function $p(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function QC(r,a){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||s.readyState!=="loading")a();else{var u=function(){a(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function Ar(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Vp=null;function Zb(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(a===0)return Ar(r.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}r=r.nextSibling}return null}function Yb(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return r;a--}else s!=="/$"&&s!=="/&"||a++}r=r.previousSibling}return null}function Kb(r,a,s){switch(a=Mu(s),r){case"html":if(r=a.documentElement,!r)throw Error(o(452));return r;case"head":if(r=a.head,!r)throw Error(o(453));return r;case"body":if(r=a.body,!r)throw Error(o(454));return r;default:throw Error(o(451))}}function Ol(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);Gf(r)}var Cr=new Map,Wb=new Set;function Nu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Bo=F.d;F.d={f:XC,r:JC,D:e4,C:t4,L:n4,m:r4,X:a4,S:o4,M:i4};function XC(){var r=Bo.f(),a=wu();return r||a}function JC(r){var a=Mi(r);a!==null&&a.tag===5&&a.type==="form"?h1(a):Bo.r(r)}var cs=typeof document>"u"?null:document;function Qb(r,a,s){var u=cs;if(u&&typeof a=="string"&&a){var m=Er(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Wb.has(m)||(Wb.add(m),r={rel:r,crossOrigin:s,href:a},u.querySelector(m)===null&&(a=u.createElement("link"),Rn(a,"link",r),fn(a),u.head.appendChild(a)))}}function e4(r){Bo.D(r),Qb("dns-prefetch",r,null)}function t4(r,a){Bo.C(r,a),Qb("preconnect",r,a)}function n4(r,a,s){Bo.L(r,a,s);var u=cs;if(u&&r&&a){var m='link[rel="preload"][as="'+Er(a)+'"]';a==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Er(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Er(s.imageSizes)+'"]')):m+='[href="'+Er(r)+'"]';var v=m;switch(a){case"style":v=us(r);break;case"script":v=ds(r)}Cr.has(v)||(r=p({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:r,as:a},s),Cr.set(v,r),u.querySelector(m)!==null||a==="style"&&u.querySelector(Tl(v))||a==="script"&&u.querySelector(Al(v))||(a=u.createElement("link"),Rn(a,"link",r),fn(a),u.head.appendChild(a)))}}function r4(r,a){Bo.m(r,a);var s=cs;if(s&&r){var u=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Er(u)+'"][href="'+Er(r)+'"]',v=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=ds(r)}if(!Cr.has(v)&&(r=p({rel:"modulepreload",href:r},a),Cr.set(v,r),s.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Al(v)))return}u=s.createElement("link"),Rn(u,"link",r),fn(u),s.head.appendChild(u)}}}function o4(r,a,s){Bo.S(r,a,s);var u=cs;if(u&&r){var m=Ni(u).hoistableStyles,v=us(r);a=a||"default";var x=m.get(v);if(!x){var I={loading:0,preload:null};if(x=u.querySelector(Tl(v)))I.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":a},s),(s=Cr.get(v))&&Hp(r,s);var B=x=u.createElement("link");fn(B),Rn(B,"link",r),B._p=new Promise(function(J,le){B.onload=J,B.onerror=le}),B.addEventListener("load",function(){I.loading|=1}),B.addEventListener("error",function(){I.loading|=2}),I.loading|=4,Du(x,a,u)}x={type:"stylesheet",instance:x,count:1,state:I},m.set(v,x)}}}function a4(r,a){Bo.X(r,a);var s=cs;if(s&&r){var u=Ni(s).hoistableScripts,m=ds(r),v=u.get(m);v||(v=s.querySelector(Al(m)),v||(r=p({src:r,async:!0},a),(a=Cr.get(m))&&Gp(r,a),v=s.createElement("script"),fn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(m,v))}}function i4(r,a){Bo.M(r,a);var s=cs;if(s&&r){var u=Ni(s).hoistableScripts,m=ds(r),v=u.get(m);v||(v=s.querySelector(Al(m)),v||(r=p({src:r,async:!0,type:"module"},a),(a=Cr.get(m))&&Gp(r,a),v=s.createElement("script"),fn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(m,v))}}function Xb(r,a,s,u){var m=(m=_e.current)?Nu(m):null;if(!m)throw Error(o(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=us(s.href),s=Ni(m).hoistableStyles,u=s.get(a),u||(u={type:"style",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=us(s.href);var v=Ni(m).hoistableStyles,x=v.get(r);if(x||(m=m.ownerDocument||m,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,x),(v=m.querySelector(Tl(r)))&&!v._p&&(x.instance=v,x.state.loading=5),Cr.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},Cr.set(r,s),v||s4(m,r,s,x.state))),a&&u===null)throw Error(o(528,""));return x}if(a&&u!==null)throw Error(o(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ds(s),s=Ni(m).hoistableScripts,u=s.get(a),u||(u={type:"script",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,r))}}function us(r){return'href="'+Er(r)+'"'}function Tl(r){return'link[rel="stylesheet"]['+r+"]"}function Jb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function s4(r,a,s,u){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=r.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Rn(a,"link",s),fn(a),r.head.appendChild(a))}function ds(r){return'[src="'+Er(r)+'"]'}function Al(r){return"script[async]"+r}function e_(r,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var u=r.querySelector('style[data-href~="'+Er(s.href)+'"]');if(u)return a.instance=u,fn(u),u;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),fn(u),Rn(u,"style",m),Du(u,s.precedence,r),a.instance=u;case"stylesheet":m=us(s.href);var v=r.querySelector(Tl(m));if(v)return a.state.loading|=4,a.instance=v,fn(v),v;u=Jb(s),(m=Cr.get(m))&&Hp(u,m),v=(r.ownerDocument||r).createElement("link"),fn(v);var x=v;return x._p=new Promise(function(I,B){x.onload=I,x.onerror=B}),Rn(v,"link",u),a.state.loading|=4,Du(v,s.precedence,r),a.instance=v;case"script":return v=ds(s.src),(m=r.querySelector(Al(v)))?(a.instance=m,fn(m),m):(u=s,(m=Cr.get(v))&&(u=p({},s),Gp(u,m)),r=r.ownerDocument||r,m=r.createElement("script"),fn(m),Rn(m,"link",u),r.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(o(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Du(u,s.precedence,r));return a.instance}function Du(r,a,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,v=m,x=0;x<u.length;x++){var I=u[x];if(I.dataset.precedence===a)v=I;else if(v!==m)break}v?v.parentNode.insertBefore(r,v.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(r,a.firstChild))}function Hp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function Gp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Lu=null;function t_(r,a,s){if(Lu===null){var u=new Map,m=Lu=new Map;m.set(s,u)}else m=Lu,u=m.get(s),u||(u=new Map,m.set(s,u));if(u.has(r))return u;for(u.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var v=s[m];if(!(v[Hs]||v[En]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var x=v.getAttribute(a)||"";x=r+x;var I=u.get(x);I?I.push(v):u.set(x,[v])}}return u}function n_(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function l4(r,a,s){if(s===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function r_(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function c4(r,a,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=us(u.href),v=a.querySelector(Tl(m));if(v){a=v._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Pu.bind(r),a.then(r,r)),s.state.loading|=4,s.instance=v,fn(v);return}v=a.ownerDocument||a,u=Jb(u),(m=Cr.get(m))&&Hp(u,m),v=v.createElement("link"),fn(v);var x=v;x._p=new Promise(function(I,B){x.onload=I,x.onerror=B}),Rn(v,"link",u),s.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Pu.bind(r),a.addEventListener("load",s),a.addEventListener("error",s))}}var qp=0;function u4(r,a){return r.stylesheets&&r.count===0&&ju(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var u=setTimeout(function(){if(r.stylesheets&&ju(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+a);0<r.imgBytes&&qp===0&&(qp=62500*HC());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&ju(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>qp?50:800)+a);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function Pu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ju(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var ku=null;function ju(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ku=new Map,a.forEach(d4,r),ku=null,Pu.call(r))}function d4(r,a){if(!(a.state.loading&4)){var s=ku.get(r);if(s)var u=s.get(null);else{s=new Map,ku.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<m.length;v++){var x=m[v];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),u=x)}u&&s.set(null,u)}m=a.instance,x=m.getAttribute("data-precedence"),v=s.get(x)||u,v===u&&s.set(null,m),s.set(x,m),this.count++,u=Pu.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),v?v.parentNode.insertBefore(m,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),a.state.loading|=4}}var Cl={$$typeof:C,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function f4(r,a,s,u,m,v,x,I,B){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=In(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=In(0),this.hiddenUpdates=In(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=v,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function o_(r,a,s,u,m,v,x,I,B,J,le,de){return r=new f4(r,a,s,x,B,J,le,de,I),a=1,v===!0&&(a|=24),v=rr(3,null,null,a),r.current=v,v.stateNode=r,a=Rh(),a.refCount++,r.pooledCache=a,a.refCount++,v.memoizedState={element:u,isDehydrated:s,cache:a},Ch(v),r}function a_(r){return r?(r=$i,r):$i}function i_(r,a,s,u,m,v){m=a_(m),u.context===null?u.context=m:u.pendingContext=m,u=na(a),u.payload={element:s},v=v===void 0?null:v,v!==null&&(u.callback=v),s=ra(r,u,a),s!==null&&(Zn(s,r,a),sl(s,r,a))}function s_(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<a?s:a}}function Zp(r,a){s_(r,a),(r=r.alternate)&&s_(r,a)}function l_(r){if(r.tag===13||r.tag===31){var a=qa(r,67108864);a!==null&&Zn(a,r,67108864),Zp(r,67108864)}}function c_(r){if(r.tag===13||r.tag===31){var a=lr();a=Ai(a);var s=qa(r,a);s!==null&&Zn(s,r,a),Zp(r,a)}}var zu=!0;function h4(r,a,s,u){var m=P.T;P.T=null;var v=F.p;try{F.p=2,Yp(r,a,s,u)}finally{F.p=v,P.T=m}}function p4(r,a,s,u){var m=P.T;P.T=null;var v=F.p;try{F.p=8,Yp(r,a,s,u)}finally{F.p=v,P.T=m}}function Yp(r,a,s,u){if(zu){var m=Kp(u);if(m===null)Lp(r,a,u,Uu,s),d_(r,u);else if(g4(m,r,a,s,u))u.stopPropagation();else if(d_(r,u),a&4&&-1<m4.indexOf(r)){for(;m!==null;){var v=Mi(m);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var x=st(v.pendingLanes);if(x!==0){var I=v;for(I.pendingLanes|=2,I.entangledLanes|=2;x;){var B=1<<31-Yt(x);I.entanglements[1]|=B,x&=~B}oo(v),(dt&6)===0&&(Eu=ue()+500,wl(0))}}break;case 31:case 13:I=qa(v,2),I!==null&&Zn(I,v,2),wu(),Zp(v,2)}if(v=Kp(u),v===null&&Lp(r,a,u,Uu,s),v===m)break;m=v}m!==null&&u.stopPropagation()}else Lp(r,a,u,null,s)}}function Kp(r){return r=Qf(r),Wp(r)}var Uu=null;function Wp(r){if(Uu=null,r=Ii(r),r!==null){var a=l(r);if(a===null)r=null;else{var s=a.tag;if(s===13){if(r=c(a),r!==null)return r;r=null}else if(s===31){if(r=d(a),r!==null)return r;r=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Uu=r,null}function u_(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(pe()){case he:return 2;case xe:return 8;case Be:case Qe:return 32;case wt:return 268435456;default:return 32}default:return 32}}var Qp=!1,pa=null,ma=null,ga=null,Il=new Map,Ml=new Map,va=[],m4="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 d_(r,a){switch(r){case"focusin":case"focusout":pa=null;break;case"dragenter":case"dragleave":ma=null;break;case"mouseover":case"mouseout":ga=null;break;case"pointerover":case"pointerout":Il.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ml.delete(a.pointerId)}}function Nl(r,a,s,u,m,v){return r===null||r.nativeEvent!==v?(r={blockedOn:a,domEventName:s,eventSystemFlags:u,nativeEvent:v,targetContainers:[m]},a!==null&&(a=Mi(a),a!==null&&l_(a)),r):(r.eventSystemFlags|=u,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function g4(r,a,s,u,m){switch(a){case"focusin":return pa=Nl(pa,r,a,s,u,m),!0;case"dragenter":return ma=Nl(ma,r,a,s,u,m),!0;case"mouseover":return ga=Nl(ga,r,a,s,u,m),!0;case"pointerover":var v=m.pointerId;return Il.set(v,Nl(Il.get(v)||null,r,a,s,u,m)),!0;case"gotpointercapture":return v=m.pointerId,Ml.set(v,Nl(Ml.get(v)||null,r,a,s,u,m)),!0}return!1}function f_(r){var a=Ii(r.target);if(a!==null){var s=l(a);if(s!==null){if(a=s.tag,a===13){if(a=c(s),a!==null){r.blockedOn=a,O0(r.priority,function(){c_(s)});return}}else if(a===31){if(a=d(s),a!==null){r.blockedOn=a,O0(r.priority,function(){c_(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Bu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var s=Kp(r.nativeEvent);if(s===null){s=r.nativeEvent;var u=new s.constructor(s.type,s);Wf=u,s.target.dispatchEvent(u),Wf=null}else return a=Mi(s),a!==null&&l_(a),r.blockedOn=s,!1;a.shift()}return!0}function h_(r,a,s){Bu(r)&&s.delete(a)}function v4(){Qp=!1,pa!==null&&Bu(pa)&&(pa=null),ma!==null&&Bu(ma)&&(ma=null),ga!==null&&Bu(ga)&&(ga=null),Il.forEach(h_),Ml.forEach(h_)}function Fu(r,a){r.blockedOn===a&&(r.blockedOn=null,Qp||(Qp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,v4)))}var $u=null;function p_(r){$u!==r&&($u=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){$u===r&&($u=null);for(var a=0;a<r.length;a+=3){var s=r[a],u=r[a+1],m=r[a+2];if(typeof u!="function"){if(Wp(u||s)===null)continue;break}var v=Mi(s);v!==null&&(r.splice(a,3),a-=3,Kh(v,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function fs(r){function a(B){return Fu(B,r)}pa!==null&&Fu(pa,r),ma!==null&&Fu(ma,r),ga!==null&&Fu(ga,r),Il.forEach(a),Ml.forEach(a);for(var s=0;s<va.length;s++){var u=va[s];u.blockedOn===r&&(u.blockedOn=null)}for(;0<va.length&&(s=va[0],s.blockedOn===null);)f_(s),s.blockedOn===null&&va.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var m=s[u],v=s[u+1],x=m[Fn]||null;if(typeof v=="function")x||p_(s);else if(x){var I=null;if(v&&v.hasAttribute("formAction")){if(m=v,x=v[Fn]||null)I=x.formAction;else if(Wp(m)!==null)continue}else I=x.action;typeof I=="function"?s[u+1]=I:(s.splice(u,3),u-=3),p_(s)}}}function m_(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(x){return m=x})},focusReset:"manual",scroll:"manual"})}function a(){m!==null&&(m(),m=null),u||setTimeout(s,20)}function s(){if(!u&&!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 u=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),m!==null&&(m(),m=null)}}}function Xp(r){this._internalRoot=r}Vu.prototype.render=Xp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(o(409));var s=a.current,u=lr();i_(s,u,r,a,null,null)},Vu.prototype.unmount=Xp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;i_(r.current,2,null,r,null,null),wu(),a[Ci]=null}};function Vu(r){this._internalRoot=r}Vu.prototype.unstable_scheduleHydration=function(r){if(r){var a=Vf();r={blockedOn:null,target:r,priority:a};for(var s=0;s<va.length&&a!==0&&a<va[s].priority;s++);va.splice(s,0,r),s===0&&f_(r)}};var g_=t.version;if(g_!=="19.2.3")throw Error(o(527,g_,"19.2.3"));F.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(o(188)):(r=Object.keys(r).join(","),Error(o(268,r)));return r=h(a),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var y4={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{Zt=Hu.inject(y4),At=Hu}catch{}}return Ll.createRoot=function(r,a){if(!i(r))throw Error(o(299));var s=!1,u="",m=w1,v=x1,x=R1;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=o_(r,1,!1,null,null,s,u,null,m,v,x,m_),r[Ci]=a.current,Dp(r),new Xp(a)},Ll.hydrateRoot=function(r,a,s){if(!i(r))throw Error(o(299));var u=!1,m="",v=w1,x=x1,I=R1,B=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(I=s.onRecoverableError),s.formState!==void 0&&(B=s.formState)),a=o_(r,1,!0,a,s??null,u,m,B,v,x,I,m_),a.context=a_(null),s=a.current,u=lr(),u=Ai(u),m=na(u),m.callback=null,ra(s,m,u),s=u,a.current.lanes=s,lt(a,s),oo(a),r[Ci]=a.current,Dp(r),new Vu(a)},Ll.version="19.2.3",Ll}var T_;function I4(){if(T_)return em.exports;T_=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=C4(),em.exports}var M4=I4(),E=ja();const $=wi(E),av=_4({__proto__:null,default:$},[E]);var am={exports:{}},im={};var A_;function N4(){if(A_)return im;A_=1;var e=ja().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return im.c=function(t){return e.H.useMemoCache(t)},im}var C_;function D4(){return C_||(C_=1,am.exports=N4()),am.exports}var hf=D4(),vc=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(){}},L4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},P4=class{#e=L4;#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)}},ui=new P4;function k4(e){setTimeout(e,0)}var vi=typeof window>"u"||"Deno"in globalThis;function Qn(){}function j4(e,t){return typeof e=="function"?e(t):e}function ug(e){return typeof e=="number"&&e>=0&&e!==1/0}function xw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Aa(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function I_(e,t){const{type:n="all",exact:o,fetchStatus:i,predicate:l,queryKey:c,stale:d}=e;if(c){if(o){if(t.queryHash!==iv(c,t.options))return!1}else if(!ac(t.queryKey,c))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||i&&i!==t.state.fetchStatus||l&&!l(t))}function M_(e,t){const{exact:n,status:o,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(oc(t.options.mutationKey)!==oc(l))return!1}else if(!ac(t.options.mutationKey,l))return!1}return!(o&&t.state.status!==o||i&&!i(t))}function iv(e,t){return(t?.queryKeyHashFn||oc)(e)}function oc(e){return JSON.stringify(e,(t,n)=>fg(n)?Object.keys(n).sort().reduce((o,i)=>(o[i]=n[i],o),{}):n)}function ac(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ac(e[n],t[n])):!1}var z4=Object.prototype.hasOwnProperty;function Rw(e,t){if(e===t)return e;const n=N_(e)&&N_(t);if(!n&&!(fg(e)&&fg(t)))return t;const i=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),c=l.length,d=n?new Array(c):{};let f=0;for(let h=0;h<c;h++){const g=n?h:l[h],p=e[g],y=t[g];if(p===y){d[g]=p,(n?h<i:z4.call(e,g))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[g]=y;continue}const _=Rw(p,y);d[g]=_,_===p&&f++}return i===c&&f===i?e:d}function dg(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 N_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fg(e){if(!D_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!D_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function D_(e){return Object.prototype.toString.call(e)==="[object Object]"}function U4(e){return new Promise(t=>{ui.setTimeout(t,e)})}function hg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Rw(e,t):t}function B4(e,t,n=0){const o=[...e,t];return n&&o.length>n?o.slice(1):o}function F4(e,t,n=0){const o=[t,...e];return n&&o.length>n?o.slice(0,-1):o}var sv=Symbol();function Ow(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===sv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Tw(e,t){return typeof e=="function"?e(...t):!!e}function $4(e,t,n){let o=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),o||(o=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var V4=class extends vc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!vi&&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"}},lv=new V4;function pg(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function o(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{o({status:"fulfilled",value:i}),e(i)},n.reject=i=>{o({status:"rejected",reason:i}),t(i)},n}var H4=k4;function G4(){let e=[],t=0,n=d=>{d()},o=d=>{d()},i=H4;const l=d=>{t?e.push(d):i(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&i(()=>{o(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{o=d},setScheduler:d=>{i=d}}}var On=G4(),q4=class extends vc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!vi&&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}},Md=new q4;function Z4(e){return Math.min(1e3*2**e,3e4)}function Aw(e){return(e??"online")==="online"?Md.isOnline():!0}var mg=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Cw(e){let t=!1,n=0,o;const i=pg(),l=()=>i.status!=="pending",c=w=>{if(!l()){const T=new mg(w);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>lv.isFocused()&&(e.networkMode==="always"||Md.isOnline())&&e.canRun(),g=()=>Aw(e.networkMode)&&e.canRun(),p=w=>{l()||(o?.(),i.resolve(w))},y=w=>{l()||(o?.(),i.reject(w))},_=()=>new Promise(w=>{o=T=>{(l()||h())&&w(T)},e.onPause?.()}).then(()=>{o=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let w;const T=n===0?e.initialPromise:void 0;try{w=T??e.fn()}catch(R){w=Promise.reject(R)}Promise.resolve(w).then(p).catch(R=>{if(l())return;const A=e.retry??(vi?0:3),C=e.retryDelay??Z4,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),U4(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):S()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(o?.(),i),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?S():_().then(S),i)}}var Iw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ug(this.gcTime)&&(this.#e=ui.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ui.clearTimeout(this.#e),this.#e=void 0)}},Y4=class extends Iw{#e;#t;#n;#o;#r;#s;#i;constructor(e){super(),this.#i=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=P_(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=P_(this.options);t.data!==void 0&&(this.setState(L_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=hg(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Qn).catch(Qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Dr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Aa(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:!xw(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.#i?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.#a({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,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},i=()=>{const d=Ow(this.options,t),h=(()=>{const g={client:this.#o,queryKey:this.queryKey,meta:this.meta};return o(g),g})();return this.#i=!1,this.options.persister?this.options.persister(d,h,this):d(h)},c=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:i};return o(d),d})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=Cw({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof mg&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#a({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.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 mg){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(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,...Mw(n.data,this.options),fetchMeta:e.meta??null};case"success":const o={...n,...L_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?o:void 0,o;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),On.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Mw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Aw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function L_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function P_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,o=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var K4=class extends vc{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#i=pg(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#s;#i;#a;#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),k_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gg(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 Dr(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&&!dg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&j_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),o&&(this.#t!==n||Dr(this.options.enabled,this.#t)!==Dr(t.enabled,this.#t)||Aa(this.options.staleTime,this.#t)!==Aa(t.staleTime,this.#t))&&this.#g();const i=this.#v();o&&(this.#t!==n||Dr(this.options.enabled,this.#t)!==Dr(t.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Q4(this,n)&&(this.#o=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,o)=>(this.trackProp(o),t?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}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.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Qn)),t}#g(){this.#_();const e=Aa(this.options.staleTime,this.#t);if(vi||this.#o.isStale||!ug(e))return;const n=xw(this.#o.dataUpdatedAt,e)+1;this.#c=ui.setTimeout(()=>{this.#o.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,!(vi||Dr(this.options.enabled,this.#t)===!1||!ug(this.#l)||this.#l===0)&&(this.#u=ui.setInterval(()=>{(this.options.refetchIntervalInBackground||lv.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#_(){this.#c&&(ui.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(ui.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,o=this.options,i=this.#o,l=this.#r,c=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(),z=!D&&k_(e,t),W=D&&j_(e,n,t,o);(z||W)&&(g={...g,...Mw(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:w}=g;y=g.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let D;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=i.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(w="success",y=hg(i?.data,D,t),p=!0)}if(t.select&&y!==void 0&&!T)if(i&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=hg(i?.data,y,t),this.#f=y,this.#a=null}catch(D){this.#a=D}this.#a&&(_=this.#a,y=this.#f,S=Date.now(),w="error");const R=g.fetchStatus==="fetching",A=w==="pending",C=w==="error",O=A&&R,M=y!==void 0,N={status:w,fetchStatus:g.fetchStatus,isPending:A,isSuccess:w==="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:cv(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Dr(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)},z=()=>{const G=this.#i=N.promise=pg();D(G)},W=this.#i;switch(W.status){case"pending":e.queryHash===n.queryHash&&D(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&z();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&z();break}}return N}updateResult(){const e=this.#o,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),dg(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!this.#p.size)return!0;const l=new Set(i??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#o).some(c=>{const d=c;return this.#o[d]!==e[d]&&l.has(d)})};this.#w({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()}#w(e){On.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function W4(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function k_(e,t){return W4(e,t)||e.state.data!==void 0&&gg(e,t,t.refetchOnMount)}function gg(e,t,n){if(Dr(t.enabled,e)!==!1&&Aa(t.staleTime,e)!=="static"){const o=typeof n=="function"?n(e):n;return o==="always"||o!==!1&&cv(e,t)}return!1}function j_(e,t,n,o){return(e!==t||Dr(o.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&cv(e,n)}function cv(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(Aa(t.staleTime,e))}function Q4(e,t){return!dg(e.getCurrentResult(),t)}function z_(e){return{onFetch:(t,n)=>{const o=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let g=!1;const p=S=>{$4(S,()=>t.signal,()=>g=!0)},y=Ow(t.options,t.fetchOptions),_=async(S,w,T)=>{if(g)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:w,direction:T?"backward":"forward",meta:t.options.meta};return p(L),L})(),C=await y(A),{maxPages:O}=t.options,M=T?F4:B4;return{pages:M(S.pages,C,O),pageParams:M(S.pageParams,w,O)}};if(i&&l.length){const S=i==="backward",w=S?Nw:vg,T={pages:l,pageParams:c},R=w(o,T);d=await _(T,R,S)}else{const S=e??l.length;do{const w=f===0?c[0]??o.initialPageParam:vg(o,d);if(f>0&&w==null)break;d=await _(d,w),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 vg(e,{pages:t,pageParams:n}){const o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,n[o],n):void 0}function Nw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function PH(e,t){return t?vg(e,t)!=null:!1}function kH(e,t){return!t||!e.getPreviousPageParam?!1:Nw(e,t)!=null}var X4=class extends Iw{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||J4(),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.#o?.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.#o=Cw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},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 o=this.state.status==="pending",i=!this.#o.canStart();try{if(o)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:i})}const l=await this.#o.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(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(c){Promise.reject(c)}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),On.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function J4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var e3=class extends vc{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 o=new X4({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(o),o}add(e){this.#e.add(e);const t=Gu(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=Gu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const o=n.indexOf(e);o!==-1&&n.splice(o,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Gu(e);if(typeof t=="string"){const o=this.#t.get(t)?.find(i=>i.state.status==="pending");return!o||o===e}else return!0}runNext(e){const t=Gu(e);return typeof t=="string"?this.#t.get(t)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){On.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=>M_(t,n))}findAll(e={}){return this.getAll().filter(t=>M_(e,t))}notify(e){On.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return On.batch(()=>Promise.all(e.map(t=>t.continue().catch(Qn))))}};function Gu(e){return e.options.scope?.id}var t3=class extends vc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const o=t.queryKey,i=t.queryHash??iv(o,t);let l=this.get(i);return l||(l=new Y4({client:e,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),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(){On.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=>I_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>I_(e,n)):t}notify(e){On.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){On.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){On.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},n3=class{#e;#t;#n;#o;#r;#s;#i;#a;constructor(e={}){this.#e=e.queryCache||new t3,this.#t=e.mutationCache||new e3,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=lv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Md.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#i?.(),this.#i=void 0,this.#a?.(),this.#a=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),o=n.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Aa(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const o=n.data;return[t,o]})}setQueryData(e,t,n){const o=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(o.queryHash)?.state.data,c=j4(t,l);if(c!==void 0)return this.#e.build(this,o).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return On.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;On.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return On.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},o=On.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(o).then(Qn).catch(Qn)}invalidateQueries(e,t={}){return On.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},o=On.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(Qn)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(o).then(Qn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Aa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qn).catch(Qn)}fetchInfiniteQuery(e){return e.behavior=z_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=z_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Md.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.#o.set(oc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(o=>{ac(e,o.queryKey)&&Object.assign(n,o.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(oc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(o=>{ac(e,o.mutationKey)&&Object.assign(n,o.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=iv(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===sv&&(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()}},Dw=E.createContext(void 0),r3=e=>{const t=E.useContext(Dw);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},o3=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(Dw.Provider,{value:e,children:t})),Lw=E.createContext(!1),a3=()=>E.useContext(Lw);Lw.Provider;function i3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var s3=E.createContext(i3()),l3=()=>E.useContext(s3),c3=(e,t,n)=>{const o=n?.state.error&&typeof e.throwOnError=="function"?Tw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(t.isReset()||(e.retryOnMount=!1))},u3=e=>{E.useEffect(()=>{e.clearReset()},[e])},d3=({result:e,errorResetBoundary:t,throwOnError:n,query:o,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(i&&e.data===void 0||Tw(n,[e.error,o])),f3=(e,t)=>t.state.data===void 0,h3=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...i)=>n(o(...i)):n(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},p3=(e,t)=>e.isLoading&&e.isFetching&&!t,m3=(e,t)=>e?.suspense&&t.isPending,U_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function g3(e,t,n){const o=a3(),i=l3(),l=r3(n),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=o?"isRestoring":"optimistic",h3(c),c3(c,i,d),u3(i);const f=!l.getQueryCache().get(c.queryHash),[h]=E.useState(()=>new t(l,c)),g=h.getOptimisticResult(c),p=!o&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(y=>{const _=p?h.subscribe(On.batchCalls(y)):Qn;return h.updateResult(),_},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),E.useEffect(()=>{h.setOptions(c)},[c,h]),m3(c,g))throw U_(c,h,i);if(d3({result:g,errorResetBoundary:i,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!vi&&p3(g,o)&&(f?U_(c,h,i):d?.promise)?.catch(Qn).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?g:h.trackResult(g)}function v3(e,t){return g3({...e,enabled:!0,suspense:!0,throwOnError:f3,placeholderData:void 0},K4,t)}const y3={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"]},Pw=E.createContext(void 0);async function b3(){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 _3(e){const t=hf.c(4),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:y3.authConfig(),queryFn:b3,staleTime:1/0},t[0]=o):o=t[0];const{data:i}=v3(o);let l;return t[1]!==i||t[2]!==n?(l=b.jsx(Pw.Provider,{value:i,children:n}),t[1]=i,t[2]=n,t[3]=l):l=t[3],l}function jH(){const e=E.useContext(Pw);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const yg=new WeakMap,E3=new WeakMap,Nd={current:[]};let sm=!1,Ql=0;const Zl=new Set,qu=new Map;function kw(e){for(const t of e){if(Nd.current.includes(t))continue;Nd.current.push(t),t.recompute();const n=E3.get(t);if(n)for(const o of n){const i=yg.get(o);i?.length&&kw(i)}}}function S3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function w3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function jw(e){if(Ql>0&&!qu.has(e)&&qu.set(e,e.prevState),Zl.add(e),!(Ql>0)&&!sm)try{for(sm=!0;Zl.size>0;){const t=Array.from(Zl);Zl.clear();for(const n of t){const o=qu.get(n)??n.prevState;n.prevState=o,S3(n)}for(const n of t){const o=yg.get(n);o&&(Nd.current.push(n),kw(o))}for(const n of t){const o=yg.get(n);if(o)for(const i of o)w3(i)}}}finally{sm=!1,Nd.current=[],qu.clear()}}function Xl(e){Ql++;try{e()}finally{if(Ql--,Ql===0){const t=Zl.values().next().value;t&&jw(t)}}}function x3(e){return typeof e=="function"}class R3{constructor(t,n){this.listeners=new Set,this.subscribe=o=>{var i,l;this.listeners.add(o);const c=(l=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:l.call(i,o,this);return()=>{this.listeners.delete(o),c?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,o,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):x3(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),jw(this)}}const Ca="__TSR_index",B_="popstate",F_="beforeunload";function O3(e){let t=e.getLocation();const n=new Set,o=c=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:c}))},i=c=>{e.notifyOnIndexChange??!0?o(c):t=e.getLocation()},l=async({task:c,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){c();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 _=Dd(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,d,f)=>{const h=t.state[Ca];d=$_(h+1,d),l({task:()=>{e.pushState(c,d),o({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:c,state:d})},replace:(c,d,f)=>{const h=t.state[Ca];d=$_(h,d),l({task:()=>{e.replaceState(c,d),o({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:c,state:d})},go:(c,d)=>{l({task:()=>{e.go(c),i({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{l({task:()=>{e.back(c?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{l({task:()=>{e.forward(c?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[Ca]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,c]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:o}}function $_(e,t){t||(t={});const n=uv();return{...t,key:n,__TSR_key:n,[Ca]:e}}function T3(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,o=t.history.replaceState;let i=[];const l=()=>i,c=D=>i=D,d=(D=>D),f=(()=>Dd(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=uv();t.history.replaceState({[Ca]:0,key:D,__TSR_key:D},"")}let h=f(),g,p=!1,y=!1,_=!1,S=!1;const w=()=>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,z,W)=>{const G=d(z);R||(g=h),h=Dd(z,W),T={href:G,state:W,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(),z=D.state[Ca]-h.state[Ca],W=z===1,G=z===-1,K=!W&&!G||p;p=!1;const j=K?"GO":G?"BACK":"FORWARD",ne=K?{type:"GO",index:z}:{type:G?"BACK":"FORWARD"};if(_)_=!1;else{const ae=l();if(typeof document<"u"&&ae.length){for(const P of ae)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 z=!1;const W=l();if(typeof document<"u"&&W.length)for(const G of W){const K=G.enableBeforeUnload??!0;if(K===!0){z=!0;break}if(typeof K=="function"&&K()===!0){z=!0;break}}if(z)return D.preventDefault(),D.returnValue=""},N=O3({getLocation:w,getLength:()=>t.history.length,pushState:(D,z)=>C("push",D,z),replaceState:(D,z)=>C("replace",D,z),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=o,t.removeEventListener(F_,L,{capture:!0}),t.removeEventListener(B_,M)},onBlocked:()=>{g&&h!==g&&(h=g)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(F_,L,{capture:!0}),t.addEventListener(B_,M),t.history.pushState=function(...D){const z=n.apply(t.history,D);return N._ignoreSubscribers||O("PUSH"),z},t.history.replaceState=function(...D){const z=o.apply(t.history,D);return N._ignoreSubscribers||O("REPLACE"),z},N}function Dd(e,t){const n=e.indexOf("#"),o=e.indexOf("?"),i=uv();return{href:e,pathname:e.substring(0,n>0?o>0?Math.min(n,o):n:o>0?o:e.length),hash:n>-1?e.substring(n):"",search:o>-1?e.slice(o,n===-1?void 0:n):"",state:t||{[Ca]:0,key:i,__TSR_key:i}}}function uv(){return(Math.random()+1).toString(36).substring(7)}function Ld(e){return e[e.length-1]}function A3(e){return typeof e=="function"}function Oa(e,t){return A3(e)?e(t):e}const C3=Object.prototype.hasOwnProperty;function Nr(e,t){if(e===t)return e;const n=t,o=G_(e)&&G_(n);if(!o&&!(Pd(e)&&Pd(n)))return n;const i=o?e:V_(e);if(!i)return n;const l=o?n:V_(n);if(!l)return n;const c=i.length,d=l.length,f=o?new Array(d):{};let h=0;for(let g=0;g<d;g++){const p=o?g:l[g],y=e[p],_=n[p];if(y===_){f[p]=y,(o?g<c:C3.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Nr(y,_);f[p]=S,S===y&&h++}return c===d&&h===c?e:f}function V_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const i of n){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}const o=Object.getOwnPropertySymbols(e);for(const i of o){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}return t}function Pd(e){if(!H_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!H_(n)||!n.hasOwnProperty("isPrototypeOf"))}function H_(e){return Object.prototype.toString.call(e)==="[object Object]"}function G_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pi(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 o=0,i=e.length;o<i;o++)if(!pi(e[o],t[o],n))return!1;return!0}if(Pd(e)&&Pd(t)){const o=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!o||t[c]!==void 0)&&!pi(e[c],t[c],n))return!1;return!0}let i=0;if(!o)i=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&i++;let l=0;for(const c in t)if((!o||t[c]!==void 0)&&(l++,l>i||!pi(e[c],t[c],n)))return!1;return i===l}return!1}function Ds(e){let t,n;const o=new Promise((i,l)=>{t=i,n=l});return o.status="pending",o.resolve=i=>{o.status="resolved",o.value=i,t(i),e?.(i)},o.reject=i=>{o.status="rejected",n(i)},o}function I3(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 Ia(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function q_(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function Z_(e,t){if(!e)return e;const n=/%25|%5C/gi;let o=0,i="",l;for(;(l=n.exec(e))!==null;)i+=q_(e.slice(o,l.index))+l[0],o=n.lastIndex;return i+q_(o?e.slice(o):e)}var M3="Invariant failed";function Vo(e,t){if(!e)throw new Error(M3)}function kd(e){const t=new Map;let n,o;const i=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,o&&(o.next=l,l.prev=o)):(l.next.prev=void 0,n=l.next,l.next=void 0,o&&(l.prev=o,o.next=l)),o=l)};return{get(l){const c=t.get(l);if(c)return i(c),c.value},set(l,c){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===o&&(o=void 0)}const d=t.get(l);if(d)d.value=c,i(d);else{const f={key:l,value:c,prev:o};o&&(o.next=f),o=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,o=void 0}}}const Ls=0,yi=1,bi=2,ic=3,xs=4,N3=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,D3=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,L3=/^([^{]*)\{\$\}([^}]*)$/;function dv(e,t,n=new Uint16Array(6)){const o=e.indexOf("/",t),i=o===-1?e.length:o,l=e.substring(t,i);if(!l||!l.includes("$"))return n[0]=Ls,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(l==="$"){const h=e.length;return n[0]=bi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=yi,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const c=l.match(L3);if(c){const g=c[1].length;return n[0]=bi,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(D3);if(d){const h=d[1],g=d[2],p=d[3],y=h.length;return n[0]=ic,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+g.length,n[4]=i-p.length,n[5]=i,n}const f=l.match(N3);if(f){const h=f[1],g=f[2],p=f[3],y=h.length;return n[0]=yi,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+g.length,n[4]=i-p.length,n[5]=i,n}return n[0]=Ls,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function pf(e,t,n,o,i,l,c){c?.(n);let d=o;{const f=n.fullPath??n.from,h=f.length,g=n.options?.caseSensitive??e;for(;d<h;){const y=dv(f,d,t);let _;const S=d,w=y[5];switch(d=w+1,l++,y[0]){case Ls:{const R=f.substring(y[2],y[3]);if(g){const A=i.static?.get(R);if(A)_=A;else{i.static??=new Map;const C=Ts(n.fullPath??n.from);C.parent=i,C.depth=l,_=C,i.static.set(R,C)}}else{const A=R.toLowerCase(),C=i.staticInsensitive?.get(A);if(C)_=C;else{i.staticInsensitive??=new Map;const O=Ts(n.fullPath??n.from);O.parent=i,O.depth=l,_=O,i.staticInsensitive.set(A,O)}}break}case yi:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=i.dynamic?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=cm(yi,n.fullPath??n.from,C,O,M);_=N,N.depth=l,N.parent=i,i.dynamic??=[],i.dynamic.push(N)}break}case ic:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=i.optional?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=cm(ic,n.fullPath??n.from,C,O,M);_=N,N.parent=i,N.depth=l,i.optional??=[],i.optional.push(N)}break}case bi:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=cm(bi,n.fullPath??n.from,C,O,M);_=L,L.parent=i,L.depth=l,i.wildcard??=[],i.wildcard.push(L)}}i=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=Ts(n.fullPath??n.from);y.kind=xs,y.parent=i,l++,y.depth=l,i.index=y,i=y}p&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)pf(e,t,f,d,i,l,c)}function lm(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 ci(e){if(e.static)for(const t of e.static.values())ci(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ci(t);if(e.dynamic?.length){e.dynamic.sort(lm);for(const t of e.dynamic)ci(t)}if(e.optional?.length){e.optional.sort(lm);for(const t of e.optional)ci(t)}if(e.wildcard?.length){e.wildcard.sort(lm);for(const t of e.wildcard)ci(t)}}function Ts(e){return{kind:Ls,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function cm(e,t,n,o,i){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:o,suffix:i}}function P3(e,t){const n=Ts("/"),o=new Uint16Array(6);for(const i of e)pf(!1,o,i,1,n,0);ci(n),t.masksTree=n,t.flatCache=kd(1e3)}function k3(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const o=fv(e,t.masksTree);return t.flatCache.set(e,o),o}function j3(e,t,n,o,i){e||="/",o||="/";const l=t?`case\0${e}`:e;let c=i.singleCache.get(l);if(!c){c=Ts("/");const d=new Uint16Array(6);pf(t,d,{from:e},1,c,0),i.singleCache.set(l,c)}return fv(o,c,n)}function z3(e,t,n=!1){const o=n?e:`nofuzz\0${e}`,i=t.matchCache.get(o);if(i!==void 0)return i;e||="/";const l=fv(e,t.segmentTree,n);return l&&(l.branch=$3(l.route)),t.matchCache.set(o,l),l}function U3(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function B3(e,t=!1,n){const o=Ts(e.fullPath),i=new Uint16Array(6),l={},c={};let d=0;return pf(t,i,e,1,o,0,h=>{if(n?.(h,d),Vo(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const g=U3(h.fullPath);(!c[g]||h.fullPath.endsWith("/"))&&(c[g]=h)}d++}),ci(o),{processedTree:{segmentTree:o,singleCache:kd(1e3),matchCache:kd(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function fv(e,t,n=!1){const o=e.split("/"),i=H3(e,o,t,n);if(!i)return null;const l=F3(e,o,i);return"**"in i&&(l["**"]=i["**"]),{route:i.node.route,params:l}}function F3(e,t,n){const o=V3(n.node);let i=null;const l={};for(let c=0,d=0,f=0;d<o.length;c++,d++,f++){const h=o[d],g=t[c],p=f;if(g&&(f+=g.length),h.kind===yi){i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const w=h.suffix?.length??0,T=y.substring(_+2,y.length-w-1),R=g.substring(_,g.length-w);l[T]=decodeURIComponent(R)}else{const w=y.substring(1);l[w]=decodeURIComponent(g)}}else if(h.kind===ic){if(n.skipped&1<<d){c--;continue}i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0,S=h.suffix?.length??0,w=y.substring(_+3,y.length-S-1),T=h.suffix||h.prefix?g.substring(_,g.length-S):g;T&&(l[w]=decodeURIComponent(T))}else if(h.kind===bi){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 $3(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function V3(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function H3(e,t,n,o){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Ld(t),l=i&&e!=="/",c=t.length-(i?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:w,statics:T,dynamics:R,optionals:A}=p;o&&y.route&&y.kind!==xs&&Pl(h,p)&&(h=p);const C=_===c;if(C&&(y.route&&!l&&Pl(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:w+1,statics:T,dynamics:R,optionals:A};if(T===c&&!R&&!A&&!S)return L;Pl(g,L)&&(g=L)}if(y.wildcard&&Pl(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 z=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?z:z.toLowerCase())!==D)continue}f={node:L,index:c,skipped:S,depth:w,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=S|1<<w,N=w+1;for(let D=y.optional.length-1;D>=0;D--){const z=y.optional[D];d.push({node:z,index:_,skipped:L,depth:N,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const z=y.optional[D],{prefix:W,suffix:G}=z;if(W||G){const K=z.caseSensitive?O:M??=O.toLowerCase();if(W&&!K.startsWith(W)||G&&!K.endsWith(G))continue}d.push({node:z,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:z}=N;if(D||z){const W=N.caseSensitive?O:M??=O.toLowerCase();if(D&&!W.startsWith(D)||z&&!W.endsWith(z))continue}d.push({node:N,index:_+1,skipped:S,depth:w+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:w+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:w+1,statics:T+1,dynamics:R,optionals:A})}}if(g&&f)return Pl(f,g)?g:f;if(g)return g;if(f)return f;if(o&&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 Pl(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===xs)>(e.node.kind===xs)||t.node.kind===xs==(e.node.kind===xs)&&t.depth>e.depth))):!0}function _d(e){return hv(e.filter(t=>t!==void 0).join("/"))}function hv(e){return e.replace(/\/{2,}/g,"/")}function zw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function mi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Uw(e){return mi(zw(e))}function jd(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function G3(e,t,n){return jd(e,n)===jd(t,n)}function q3({base:e,to:t,trailingSlash:n="never",cache:o}){const i=t.startsWith("/"),l=!i&&t===".";let c;if(o){c=i?t:l?e:e+"\0"+t;const p=o.get(c);if(p)return p}let d;if(l)d=e.split("/");else if(i)d=t.split("/");else{for(d=e.split("/");d.length>1&&Ld(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&&(Ld(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=dv(y,0,f);const _=f[0];if(_===Ls){h+=y;continue}const S=f[5],w=y.substring(0,f[1]),T=y.substring(f[4],S),R=y.substring(f[2],f[3]);_===yi?h+=w||T?`${w}{$${R}}${T}`:`$${R}`:_===bi?h+=w||T?`${w}{$}${T}`:"$":h+=`${w}{-$${R}}${T}`}h=hv(h);const g=h||"/";return c&&o&&o.set(c,g),g}function um(e,t,n){const o=t[e];return typeof o!="string"?o:e==="_splat"?encodeURI(o):Z3(o,n)}function dm({path:e,params:t,decodeCharMap:n}){let o=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:o};const l=e.length;let c=0,d,f="";for(;c<l;){const g=c;d=dv(e,g,d);const p=d[5];if(c=p+1,g===p)continue;const y=d[0];if(y===Ls){f+="/"+e.substring(g,p);continue}if(y===bi){const _=t._splat;i._splat=_,i["*"]=_;const S=e.substring(g,d[1]),w=e.substring(d[4],p);if(!_){o=!0,(S||w)&&(f+="/"+S+w);continue}const T=um("_splat",t,n);f+="/"+S+T+w;continue}if(y===yi){const _=e.substring(d[2],d[3]);!o&&!(_ in t)&&(o=!0),i[_]=t[_];const S=e.substring(g,d[1]),w=e.substring(d[4],p),T=um(_,t,n)??"undefined";f+="/"+S+T+w;continue}if(y===ic){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;i[_]=S;const w=e.substring(g,d[1]),T=e.substring(d[4],p),R=um(_,t,n)??"";f+="/"+w+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:i,interpolatedPath:f||"/",isMissingParams:o}}function Z3(e,t){let n=encodeURIComponent(e);if(t)for(const[o,i]of t)n=n.replaceAll(o,i);return n}function vr(e){return!!e?.isNotFound}function Y3(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const zd="tsr-scroll-restoration-v1_3",K3=(e,t)=>{let n;return(...o)=>{n||(n=setTimeout(()=>{e(...o),n=null},t))}};function W3(){const e=Y3();if(!e)return null;const t=e.getItem(zd);let n=t?JSON.parse(t):{};return{state:n,set:o=>(n=Oa(o,n)||n,e.setItem(zd,JSON.stringify(n)))}}const Zu=W3(),bg=e=>e.state.__TSR_key||e.href;function Q3(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 Ud=!1;function Bw({storageKey:e,key:t,behavior:n,shouldScrollRestoration:o,scrollToTopSelectors:i,location:l}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=c[d];Ud=!0;e:{if(o&&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),i)for(const p of i){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(g)}}Ud=!1}function X3(e,t){if(!Zu&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Zu))return;e.isScrollRestorationSetup=!0,Ud=!1;const o=e.options.getScrollRestorationKey||bg;window.history.scrollRestoration="manual";const i=l=>{if(Ud||!e.isScrollRestoring)return;let c="";if(l.target===document||l.target===window)c="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?c=`[data-scroll-restoration-id="${f}"]`:c=Q3(l.target)}const d=o(e.state.location);Zu.set(f=>{const h=f[d]||={},g=h[c]||={};if(c==="window")g.scrollX=window.scrollX||0,g.scrollY=window.scrollY||0;else if(c){const p=document.querySelector(c);p&&(g.scrollX=p.scrollLeft||0,g.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",K3(i,100),!0),e.subscribe("onRendered",l=>{const c=o(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Bw({storageKey:zd,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Zu.set(d=>(d[c]||={},d)))})}function J3(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 eI(e,t=String){const n=new URLSearchParams;for(const o in e){const i=e[o];i!==void 0&&n.set(o,t(i))}return n.toString()}function fm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function tI(e){const t=new URLSearchParams(e),n={};for(const[o,i]of t.entries()){const l=n[o];l==null?n[o]=fm(i):Array.isArray(l)?l.push(fm(i)):n[o]=[l,fm(i)]}return n}const nI=oI(JSON.parse),rI=aI(JSON.stringify,JSON.parse);function oI(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=tI(t);for(const o in n){const i=n[o];if(typeof i=="string")try{n[o]=e(i)}catch{}}return n}}function aI(e,t){const n=typeof t=="function";function o(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const l=eI(i,o);return l?`?${l}`:""}}const dr="__root__";function iI(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 Pr(e){return e instanceof Response&&!!e.options}const Ed=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},mf=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),pv=(e,t,n=!0)=>{const o={...e.router.options.context??{}},i=n?t:t-1;for(let l=0;l<=i;l++){const c=e.matches[l];if(!c)continue;const d=e.router.getMatch(c.id);d&&Object.assign(o,d.__routeContext,d.__beforeLoadContext)}return o},Fw=(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),Vo(n.options.notFoundComponent);const o=e.matches.find(i=>i.routeId===n.id);Vo(o,"Could not find match for route: "+n.id),e.updateMatch(o.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Fw(e,t))},Ta=(e,t,n)=>{if(!(!Pr(n)&&!vr(n))){if(Pr(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 o=Pr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:o,isFetching:!1,error:n})),vr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Pr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Fw(e,n),n)}},$w=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},kl=(e,t,n,o)=>{const{id:i,routeId:l}=e.matches[t],c=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=o,e.firstBadMatchIndex??=t,Ta(e,e.router.getMatch(i),n);try{c.options.onError?.(n)}catch(d){n=d,Ta(e,e.router.getMatch(i),n)}e.updateMatch(i,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}))},sI=(e,t,n,o)=>{const i=e.router.getMatch(t),l=e.matches[n-1]?.id,c=l?e.router.getMatch(l):void 0;if(e.router.isShell()){i.ssr=o.id===dr;return}if(c?.ssr===!1){i.ssr=!1;return}const d=_=>_===!0&&c?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(o.options.ssr===void 0){i.ssr=d(f);return}if(typeof o.options.ssr!="function"){i.ssr=d(o.options.ssr);return}const{search:h,params:g}=i,p={search:Yu(h,i.searchError),params:Yu(g,i.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:Yu(_.search,_.searchError),params:Yu(_.params,_.paramsError),ssr:_.ssr}))},y=o.options.ssr(p);if(Ia(y))return y.then(_=>{i.ssr=d(_??f)});i.ssr=d(y??f)},Vw=(e,t,n,o)=>{if(o._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!mf(e,t)&&(n.options.loader||n.options.beforeLoad||qw(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{Ed(e)},i);o._nonReactive.pendingTimeout=c}},lI=(e,t,n)=>{const o=e.router.getMatch(t);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;Vw(e,t,n,o);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Ta(e,l,l.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(i):i()},cI=(e,t,n,o)=>{const i=e.router.getMatch(t),l=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Ds(()=>{l?.resolve()});const{paramsError:c,searchError:d}=i;c&&kl(e,n,c,"PARSE_PARAMS"),d&&kl(e,n,d,"VALIDATE_SEARCH"),Vw(e,t,o,i);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})))},_=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!o.options.beforeLoad){Xl(()=>{y(),_()});return}i._nonReactive.beforeLoadPromise=Ds();const S={...pv(e,n,!1),...i.__routeContext},{search:w,params:T,cause:R}=i,A=mf(e,t),C={search:w,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){Xl(()=>{y(),_()});return}(Pr(L)||vr(L))&&(y(),kl(e,n,L,"BEFORE_LOAD")),Xl(()=>{y(),e.updateMatch(t,N=>({...N,__beforeLoadContext:L})),_()})};let M;try{if(M=o.options.beforeLoad(C),Ia(M))return y(),M.catch(L=>{kl(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),kl(e,n,L,"BEFORE_LOAD")}O(M)},uI=(e,t)=>{const{id:n,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o],l=()=>{if(e.router.isServer){const f=sI(e,n,t,i);if(Ia(f))return f.then(d)}return d()},c=()=>cI(e,n,t,i),d=()=>{if($w(e,n))return;const f=lI(e,n,i);return Ia(f)?f.then(c):c()};return l()},dI=(e,t,n)=>{const o=e.router.getMatch(t);if(!o||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={matches:e.matches,match:o,params:o.params,loaderData:o.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([l,c,d])=>{const f=l?.meta,h=l?.links,g=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:g,headers:d,scripts:c,styles:p}})},Hw=(e,t,n,o)=>{const i=e.matchPromises[n-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(t),h=pv(e,n),g=mf(e,t);return{params:l,deps:c,preload:!!g,parentMatchPromise:i,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:g?"preload":f,route:o,...e.router.options.additionalContext}},Y_=async(e,t,n,o)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&Gw(o);const l=o.options.loader?.(Hw(e,t,n,o)),c=o.options.loader&&Ia(l);if((c||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),o.options.loader){const h=c?await l:l;Ta(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,g=>({...g,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const f=i._nonReactive.minPendingPromise;f&&await f,o._componentsPromise&&await o._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;const d=i._nonReactive.minPendingPromise;d&&await d,vr(l)&&await o.options.notFoundComponent?.preload?.(),Ta(e,e.router.getMatch(t),l);try{o.options.onError?.(l)}catch(f){c=f,Ta(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:c,status:"error",isFetching:!1}))}}catch(i){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Ta(e,l,i)}},fI=async(e,t)=>{const{id:n,routeId:o}=e.matches[t];let i=!1,l=!1;const c=e.router.looseRoutesById[o],d=()=>{e.updateMatch(n,g=>({...g,context:pv(e,t)}))};if($w(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&&Ta(e,p,y)}else{const p=Date.now()-g.updatedAt,y=mf(e,n),_=y?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,S=c.options.shouldReload,w=typeof S=="function"?S(Hw(e,n,t,c)):S,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Ds(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;i=A==="success"&&(C||(w??p>_)),y&&c.options.preload===!1||(i&&!e.sync?(l=!0,(async()=>{try{await Y_(e,n,t,c),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){Pr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||i&&e.sync)&&await Y_(e,n,t,c))}}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 K_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Ed(t);try{for(let d=0;d<t.matches.length;d++){const f=uI(t,d);Ia(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(fI(t,d));const i=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of i){if(Pr(d))throw d;!l&&vr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,g=t.router.looseRoutesById[h];try{const p=dI(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 c=Ed(t);Ia(c)&&await c}catch(n){if(vr(n)&&!t.preload){const o=Ed(t);throw Ia(o)&&await o,n}if(Pr(n))throw n}return t.matches}async function Gw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...o}=t.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const o of Zw){const i=e.options[o]?.preload;i&&n.push(i())}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 Yu(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function qw(e){for(const t of Zw)if(e.options[t]?.preload)return!0;return!1}const Zw=["component","errorComponent","pendingComponent","notFoundComponent"];function hI(e){return{input:({url:t})=>{for(const n of e)t=Yw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Kw(e[n],t);return t}}}function pI(e){const t=Uw(e.basepath),n=`/${t}`,o=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?o:o.toLowerCase();return{input:({url:c})=>{const d=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===i?c.pathname="/":d.startsWith(l)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=_d(["/",t,c.pathname]),c)}}function Yw(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 Kw(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 gi(e){const t=e.resolvedLocation,n=e.location,o=t?.pathname!==n.pathname,i=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:o,hrefChanged:i,hashChanged:l}}class mI{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 o=this.options,i=this.basepath??o?.basepath??"/",l=this.basepath===void 0,c=o?.rewrite;this.options={...o,...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=T3())),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 R3(vI(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),X3(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||i!==f||c!==h){this.basepath=f;const y=[];Uw(f)!==""&&y.push(pI({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:hI(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:o,processedTree:i}=B3(this.routeTree,this.options.caseSensitive,(c,d)=>{c.init({originalIndex:d})});this.options.routeMasks&&P3(this.options.routeMasks,i),this.routesById=n,this.routesByPath=o,this.processedTree=i;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,o)=>{const i={eventType:n,fn:o};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(o=>{o.eventType===n.type&&o.fn(n)})},this.parseLocation=(n,o)=>{const i=({href:f,state:h})=>{const g=new URL(f,this.origin),p=Yw(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:Z_(p.pathname),searchStr:_,search:Nr(o?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Nr(o?.state,h)}},l=i(n),{__tempLocation:c,__tempKey:d}=l.state;if(c&&(!d||d===this.tempLocationKey)){const f=i(c);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=kd(1e3),this.resolvePathWithBase=(n,o)=>q3({base:n,to:hv(o),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,o,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:o},i):this.matchRoutesInternal(n,o),this.getMatchedRoutes=n=>yI({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const o=this.getMatch(n);o&&(o.abortController.abort(),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),o=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...o]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const o=(l={})=>{const c=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(c,{_buildLocation:!0}),f=Ld(d);l.from;const h=l.unsafeRelative==="path"?c.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,Oa(l.params,y)),w=dm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(S).length>0)for(const W of T){const G=W.options.params?.stringify??W.options.stringifyParams;G&&Object.assign(S,G(S))}const R=n.leaveParams?_:Z_(dm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};T.forEach(G=>{if(G.options.validateSearch)try{Object.assign(W,_g(G.options.validateSearch,{...W,...A}))}catch{}}),A=W}A=bI({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Nr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?c.hash:l.hash?Oa(l.hash,c.hash):void 0,M=O?`#${O}`:"";let L=l.state===!0?c.state:l.state?Oa(l.state,c.state):{};L=Nr(c.state,L);const N=`${R}${C}${M}`,D=new URL(N,this.origin),z=Kw(this.rewrite,D);return{publicHref:z.pathname+z.search+z.hash,href:N,url:z,pathname:R,search:A,searchStr:C,state:L,hash:O??"",unmaskOnReload:l.unmaskOnReload}},i=(l={},c)=>{const d=o(l);let f=c?o(c):void 0;if(!f){const h={};if(this.options.routeMasks){const g=k3(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,Oa(y,h));c={from:n.from,..._,params:S},f=o(c)}}}return f&&(d.maskedLocation=f),d};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:o,...i})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{i.state[g]=this.latestLocation.state[g]});const h=pi(i.state,this.latestLocation.state);return f.forEach(g=>{delete i.state[g]}),h},c=mi(this.latestLocation.href)===mi(i.href),d=this.commitLocationPromise;if(this.commitLocationPromise=Ds(()=>{d?.resolve()}),c&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:g,...p}=i;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[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:o})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:o,hashScrollIntoView:i,viewTransition:l,ignoreBlocker:c,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Dd(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:o,hashScrollIntoView:i,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:o,href:i,publicHref:l,...c})=>{let d=!1;if(i)try{new URL(`${i}`),d=!0}catch{}if(d&&!o&&(o=!0),o){if(!i||!l&&!d){const h=this.buildLocation({to:n,...c});i=i??h.url.href,l=l??h.url.href}const f=!d&&l?l:i;if(!c.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 c.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...c,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const o=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==o.publicHref||o.url.origin!==this.origin){const i=this.getParsedLocationHref(o);throw iI({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(o=>({...o,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:o.cachedMatches.filter(i=>!n.some(l=>l.id===i.id))}))},this.load=async n=>{let o,i,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",...gi({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",...gi({resolvedLocation:h,location:f})}),await K_({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=[];Xl(()=>{this.__store.setState(_=>{const S=_.matches,w=_.pendingMatches||_.matches;return g=S.filter(T=>!w.some(R=>R.id===T.id)),p=w.filter(T=>!S.some(R=>R.id===T.id)),y=w.filter(T=>S.some(R=>R.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:w,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(w=>{this.looseRoutesById[w.routeId].options[S]?.(w)})})})})}})}catch(f){Pr(f)?(o=f,this.isServer||this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):vr(f)&&(i=f),this.__store.setState(h=>({...h,statusCode:o?o.status:i?404:h.matches.some(g=>g.status==="error")?500:200,redirect:o}))}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 c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(d=>d.status==="error")&&(c=500),c!==void 0&&this.__store.setState(d=>({...d,statusCode:c}))},this.startViewTransition=n=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof o=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,c=this.state.resolvedLocation,d=typeof o.types=="function"?o.types(gi({resolvedLocation:c,location:l})):o.types;if(d===!1){n();return}i={update:n,types:d}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,o)=>{this.startTransition(()=>{const i=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":"";i&&this.__store.setState(l=>({...l,[i]:l[i]?.map(c=>c.id===n?o(c):c)}))})},this.getMatch=n=>{const o=i=>i.id===n;return this.state.cachedMatches.find(o)??this.state.pendingMatches?.find(o)??this.state.matches.find(o)},this.invalidate=n=>{const o=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(o),cachedMatches:i.cachedMatches.map(o),pendingMatches:i.pendingMatches?.map(o)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let o=n.url.href;return this.origin&&n.url.origin===this.origin&&(o=o.replace(this.origin,"")||"/"),o},this.resolveRedirect=n=>{if(!n.options.href){const o=this.buildLocation(n.options),i=this.getParsedLocationHref(o);n.options.href=o.href,n.headers.set("Location",i)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const o=n?.filter;o!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(l=>!o(l))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=o=>{const i=this.looseRoutesById[o.routeId];if(!i.options.loader)return!0;const l=(o.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:Date.now()-o.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Gw,this.preloadRoute=async n=>{const o=this.buildLocation(n);let i=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),c=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);Xl(()=>{i.forEach(d=>{c.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return i=await K_({router:this,matches:i,location:o,preload:!0,updateMatch:(d,f)=>{l.has(d)?i=i.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),i}catch(d){if(Pr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:o});vr(d)||console.error(d);return}},this.matchRoute=(n,o)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(i);if(o?.pending&&this.state.status!=="pending")return!1;const d=(o?.pending===void 0?!this.state.isLoading:o.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=j3(l.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!pi(f.params,n.params,{partial:!0})?!1:o?.includeSearch??!0?pi(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??rI,parseSearch:t.parseSearch??nI}),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 o=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:l}=o;let{matchedRoutes:c}=o,d=!1;(i?i.path!=="/"&&l["**"]:mi(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=c.length-1;p>=0;p--){const y=c[p];if(y.children)return y.id}return dr}})(),h=[],g=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return c.forEach((p,y)=>{const _=h[y-1],[S,w,T]=(()=>{const j=_?.search??t.search,ne=_?._strictSearch??void 0;try{const ae=_g(p.options.validateSearch,{...j})??void 0;return[{...j,...ae},{...ne,...ae},void 0]}catch(ae){let P=ae;if(ae instanceof Bd||(P=new Bd(ae.message,{cause:ae})),n?.throwOnError)throw P;return[j,{},P]}})(),R=p.options.loaderDeps?.({search:S})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=dm({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 z;if(!L){const j=p.options.params?.parse??p.options.parseParams;if(j)try{Object.assign(D,j(D))}catch(ne){if(vr(ne)||Pr(ne)?z=ne:z=new gI(ne.message,{cause:ne}),n?.throwOnError)throw z}}Object.assign(l,D);const W=N?"stay":"enter";let G;if(L)G={...L,cause:W,params:N?Nr(N.params,l):l,_strictParams:D,search:Nr(N?N.search:L.search,S),_strictSearch:w};else{const j=p.options.loader||p.options.beforeLoad||p.lazyFn||qw(p)?"pending":"success";G={id:M,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:N?Nr(N.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:N?Nr(N.search,S):S,_strictSearch:w,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:z,__routeContext:void 0,_nonReactive:{loadPromise:Ds()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:N?Nr(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 K=g(_);G.context={...K,...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 w=h[y-1],T=g(w);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 Bd extends Error{}class gI extends Error{}function vI(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function _g(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Bd("Async validation not supported");if(n.issues)throw new Bd(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 yI({pathname:e,routesById:t,processedTree:n}){const o={},i=mi(e);let l;const c=z3(i,n,!0);return c&&(l=c.route,Object.assign(o,c.params)),{matchedRoutes:c?.branch||[t[dr]],routeParams:o,foundRoute:l}}function bI({search:e,dest:t,destRoutes:n,_includeValidateSearch:o}){const i=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((w,T)=>T(w),p));const S=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((w,T)=>T(w),S):S};h.push(g)}if(o&&f.options.validateSearch){const g=({search:p,next:y})=>{const _=y(p);try{return{..._,..._g(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(g)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Oa(t.search,d):{};i.push(l);const c=(d,f)=>{if(d>=i.length)return f;const h=i[d];return h({search:f,next:p=>c(d+1,p)})};return c(0,e)}const _I="Error preloading route! ☝️";class Ww{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const o=this.options,i=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=dr:this.parentRoute||Vo(!1);let l=i?dr:o?.path;l&&l!=="/"&&(l=zw(l));const c=o?.id||l;let d=i?dr:_d([this.parentRoute.id===dr?"":this.parentRoute.id,c]);l===dr&&(l="/"),d!==dr&&(d=_d(["/",d]));const f=d===dr?"/":_d([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 EI extends Ww{constructor(t){super(t)}}function mv(e){const t=e.errorComponent??gf;return b.jsx(SI,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:o})=>n?E.createElement(t,{error:n,reset:o}):e.children})}class SI 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 gf({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(o=>!o),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 wI({children:e,fallback:t=null}){return xI()?b.jsx($.Fragment,{children:e}):b.jsx($.Fragment,{children:t})}function xI(){return $.useSyncExternalStore(RI,()=>!0,()=>!1)}function RI(){return()=>{}}var hm={exports:{}},pm={},mm={exports:{}},gm={};var W_;function OI(){if(W_)return gm;W_=1;var e=ja();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,o=e.useState,i=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function d(p,y){var _=y(),S=o({inst:{value:_,getSnapshot:y}}),w=S[0].inst,T=S[1];return l(function(){w.value=_,w.getSnapshot=y,f(w)&&T({inst:w})},[p,_,y]),i(function(){return f(w)&&T({inst:w}),p(function(){f(w)&&T({inst:w})})},[p]),c(_),_}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 gm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,gm}var Q_;function Qw(){return Q_||(Q_=1,mm.exports=OI()),mm.exports}var X_;function TI(){if(X_)return pm;X_=1;var e=ja(),t=Qw();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var o=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,d=e.useMemo,f=e.useDebugValue;return pm.useSyncExternalStoreWithSelector=function(h,g,p,y,_){var S=l(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=d(function(){function R(L){if(!A){if(A=!0,C=L,L=y(L),_!==void 0&&w.hasValue){var N=w.value;if(_(N,L))return O=N}return O=L}if(N=O,o(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=i(h,S[0],S[1]);return c(function(){w.hasValue=!0,w.value=T},[T]),f(T),T},pm}var J_;function AI(){return J_||(J_=1,hm.exports=TI()),hm.exports}var Xw=AI();const zH=wi(Xw);function CI(e,t=o=>o,n={}){const o=n.equal??II;return Xw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,o)}function II(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[o,i]of e)if(!t.has(o)||!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=eE(e);if(n.length!==eE(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}function eE(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const vm=E.createContext(null);function Jw(){return typeof document>"u"?vm:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=vm,vm)}function er(e){const t=E.useContext(Jw());return e?.warn,t}function Jn(e){const t=er({warn:e?.router===void 0}),n=e?.router||t,o=E.useRef(void 0);return CI(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Nr(o.current,e.select(i));return o.current=l,l}return e.select(i)}return i})}const vf=E.createContext(void 0),MI=E.createContext(void 0);function mo(e){const t=E.useContext(e.from?MI:vf);return Jn({select:o=>{const i=o.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Vo(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function gv(e){return mo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vv(e){const{select:t,...n}=e;return mo({...n,select:o=>t?t(o.loaderDeps):o.loaderDeps})}function yv(e){return mo({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 bv(e){return mo({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Yl=typeof window<"u"?E.useLayoutEffect:E.useEffect;function ym(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 NI(e,t,n={},o={}){E.useEffect(()=>{if(!e.current||o.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([l])=>{t(l)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,o.disabled,e])}function DI(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function yc(e){const t=er();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function UH(e){const t=er(),n=yc(),o=E.useRef(null);return Yl(()=>{o.current!==e&&(n(e),o.current=e)},[t,e,n]),null}var yf=ww();const ex=wi(yf);function LI(e,t){const n=er(),[o,i]=E.useState(!1),l=E.useRef(!1),c=DI(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:g,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:S,startTransition:w,resetScroll:T,viewTransition:R,children:A,target:C,disabled:O,style:M,className:L,onClick:N,onFocus:D,onMouseEnter:z,onMouseLeave:W,onTouchStart:G,ignoreBlocker:K,params:j,search:ne,hash:ae,state:P,mask:F,reloadDocument:H,unsafeRelative:re,from:ye,_fromLocation:k,...Q}=e,ee=Jn({select:Z=>Z.location.search,structuralSharing:!0}),se=e.from,me=E.useMemo(()=>({...e,from:se}),[n,ee,se,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),_e=E.useMemo(()=>n.buildLocation({...me}),[n,me]),be=E.useMemo(()=>{if(O)return;let Z=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,ue=!1;return n.origin&&(Z.startsWith(n.origin)?Z=n.history.createHref(Z.replace(n.origin,""))||"/":ue=!0),{href:Z,external:ue}},[O,_e.maskedLocation,_e.url,n.origin,n.history]),Se=E.useMemo(()=>{if(be?.external)return be.href;try{return new URL(g),g}catch{}},[g,be]),De=e.reloadDocument||Se?!1:p??n.options.defaultPreload,Le=y??n.options.defaultPreloadDelay??0,Ee=Jn({select:Z=>{if(Se)return!1;if(h?.exact){if(!G3(Z.location.pathname,_e.pathname,n.basepath))return!1}else{const ue=jd(Z.location.pathname,n.basepath),pe=jd(_e.pathname,n.basepath);if(!(ue.startsWith(pe)&&(ue.length===pe.length||ue[pe.length]==="/")))return!1}return(h?.includeSearch??!0)&&!pi(Z.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Z.location.hash===_e.hash:!0}}),ze=E.useCallback(()=>{n.preloadRoute({...me}).catch(Z=>{console.warn(Z),console.warn(_I)})},[n,me]),Nt=E.useCallback(Z=>{Z?.isIntersecting&&ze()},[ze]);NI(c,Nt,UI,{disabled:!!O||De!=="viewport"}),E.useEffect(()=>{l.current||!O&&De==="render"&&(ze(),l.current=!0)},[O,ze,De]);const ve=Z=>{const ue=Z.currentTarget.getAttribute("target"),pe=C!==void 0?C:ue;if(!O&&!BI(Z)&&!Z.defaultPrevented&&(!pe||pe==="_self")&&Z.button===0){Z.preventDefault(),yf.flushSync(()=>{i(!0)});const he=n.subscribe("onResolved",()=>{he(),i(!1)});n.navigate({...me,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:w,viewTransition:R,ignoreBlocker:K})}};if(Se)return{...Q,ref:c,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...M&&{style:M},...L&&{className:L},...N&&{onClick:N},...D&&{onFocus:D},...z&&{onMouseEnter:z},...W&&{onMouseLeave:W},...G&&{onTouchStart:G}};const ge=Z=>{O||De&&ze()},Re=ge,ke=Z=>{if(!(O||!De))if(!Le)ze();else{const ue=Z.target;if(jl.has(ue))return;const pe=setTimeout(()=>{jl.delete(ue),ze()},Le);jl.set(ue,pe)}},et=Z=>{if(O||!De||!Le)return;const ue=Z.target,pe=jl.get(ue);pe&&(clearTimeout(pe),jl.delete(ue))},Ue=Ee?Oa(d,{})??PI:bm,We=Ee?bm:Oa(f,{})??bm,U=[L,Ue.className,We.className].filter(Boolean).join(" "),q=(M||Ue.style||We.style)&&{...M,...Ue.style,...We.style};return{...Q,...Ue,...We,href:be?.href,ref:c,onClick:zl([N,ve]),onFocus:zl([D,ge]),onMouseEnter:zl([z,ke]),onMouseLeave:zl([W,et]),onTouchStart:zl([G,Re]),disabled:!!O,target:C,...q&&{style:q},...U&&{className:U},...O&&kI,...Ee&&jI,...o&&zI}}const bm={},PI={className:"active"},kI={role:"link","aria-disabled":!0},jI={"data-status":"active","aria-current":"page"},zI={"data-transitioning":"transitioning"},jl=new WeakMap,UI={rootMargin:"100px"},zl=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},_v=E.forwardRef((e,t)=>{const{_asChild:n,...o}=e,{type:i,ref:l,...c}=LI(o,t),d=typeof o.children=="function"?o.children({isActive:c["data-status"]==="active"}):o.children;return n===void 0&&delete c.disabled,E.createElement(n||"a",{...c,ref:l},d)});function BI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class FI extends Ww{constructor(t){super(t),this.useMatch=n=>mo({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>mo({...n,from:this.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>bv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>yv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>vv({...n,from:this.id}),this.useLoaderData=n=>gv({...n,from:this.id}),this.useNavigate=()=>yc({from:this.fullPath}),this.Link=$.forwardRef((n,o)=>b.jsx(_v,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Tn(e){return new FI(e)}class $I extends EI{constructor(t){super(t),this.useMatch=n=>mo({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>mo({...n,from:this.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>bv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>yv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>vv({...n,from:this.id}),this.useLoaderData=n=>gv({...n,from:this.id}),this.useNavigate=()=>yc({from:this.fullPath}),this.Link=$.forwardRef((n,o)=>b.jsx(_v,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function VI(e){return new $I(e)}function tE(e){return typeof e=="object"?new nE(e,{silent:!0}).createRoute(e):new nE(e,{silent:!0}).createRoute}class nE{constructor(t,n){this.path=t,this.createRoute=o=>{this.silent;const i=Tn(o);return i.isRoot=!1,i},this.silent=n?.silent}}class rE{constructor(t){this.useMatch=n=>mo({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>mo({from:this.options.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>bv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>yv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>vv({...n,from:this.options.id}),this.useLoaderData=n=>gv({...n,from:this.options.id}),this.useNavigate=()=>{const n=er();return yc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function oE(e){return typeof e=="object"?new rE(e):t=>new rE({id:e,...t})}function Ln(e,t){let n,o,i,l;const c=()=>(n||(n=e().then(f=>{n=void 0,o=f.default}).catch(f=>{if(i=f,I3(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!o)if(E.use)E.use(c());else throw c();return E.createElement(o,h)};return d.preload=c,d}function HI(){const e=er(),t=E.useRef({router:e,mounted:!1}),[n,o]=E.useState(!1),{hasPendingMatches:i,isLoading:l}=Jn({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),c=ym(l),d=l||n||i,f=ym(d),h=l||i,g=ym(h);return e.startTransition=p=>{o(!0),E.startTransition(()=>{p(),o(!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 mi(e.latestLocation.publicHref)!==mi(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),Yl(()=>{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]),Yl(()=>{c&&!l&&e.emit({type:"onLoad",...gi(e.state)})},[c,e,l]),Yl(()=>{g&&!h&&e.emit({type:"onBeforeRouteMount",...gi(e.state)})},[h,g,e]),Yl(()=>{if(f&&!d){const p=gi(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&J3(e)}},[d,f,e]),null}function GI(e){const t=Jn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(mv,{getResetKey:()=>t,onCatch:(n,o)=>{if(vr(n))e.onCatch?.(n,o);else throw n},errorComponent:({error:n})=>{if(vr(n))return e.fallback?.(n);throw n},children:e.children})}function qI(){return b.jsx("p",{children:"Not Found"})}function Ss(e){return b.jsx(b.Fragment,{children:e.children})}function tx(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(qI,{})}function ZI({children:e}){const t=er();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function YI(){const e=er();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||bg)(e.latestLocation),o=n!==bg(e.latestLocation)?n:void 0,i={storageKey:zd,shouldScrollRestoration:!0};return o&&(i.key=o),b.jsx(ZI,{children:`(${Bw.toString()})(${JSON.stringify(i)})`})}const nx=E.memo(function({matchId:t}){const n=er(),o=Jn({select:R=>{const A=R.matches.find(C=>C.id===t);return Vo(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[o.routeId],l=i.options.pendingComponent??n.options.defaultPendingComponent,c=l?b.jsx(l,{}):null,d=i.options.errorComponent??n.options.defaultErrorComponent,f=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,g=o.ssr===!1||o.ssr==="data-only",p=(!i.isRoot||i.options.wrapInSuspense||g)&&(i.options.wrapInSuspense??l??(i.options.errorComponent?.preload||g))?E.Suspense:Ss,y=d?mv:Ss,_=h?GI:Ss,S=Jn({select:R=>R.loadedAt}),w=Jn({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=i.isRoot?i.options.shellComponent??Ss:Ss;return b.jsxs(T,{children:[b.jsx(vf.Provider,{value:t,children:b.jsx(p,{fallback:c,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||gf,onCatch:(R,A)=>{if(vr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==o.routeId||!R.routeId&&!i.isRoot)throw R;return E.createElement(h,R)},children:g||o._displayPending?b.jsx(wI,{fallback:c,children:b.jsx(aE,{matchId:t})}):b.jsx(aE,{matchId:t})})})})}),w===dr&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(KI,{}),b.jsx(YI,{})]}):null]})});function KI(){const e=er(),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",...gi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const aE=E.memo(function({matchId:t}){const n=er(),{match:o,key:i,routeId:l}=Jn({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}),c=n.routesById[l],d=E.useMemo(()=>{const f=c.options.component??n.options.defaultComponent;return f?b.jsx(f,{},i):b.jsx(rx,{})},[i,c.options.component,n.options.defaultComponent]);if(o._displayPending)throw n.getMatch(o.id)?._nonReactive.displayPendingPromise;if(o._forcePending)throw n.getMatch(o.id)?._nonReactive.minPendingPromise;if(o.status==="pending"){const f=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(o.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const g=Ds();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(o.id)?._nonReactive.loadPromise}if(o.status==="notFound")return Vo(vr(o.error)),tx(n,c,o.error);if(o.status==="redirected")throw Vo(Pr(o.error)),n.getMatch(o.id)?._nonReactive.loadPromise;if(o.status==="error"){if(n.isServer){const f=(c.options.errorComponent??n.options.defaultErrorComponent)||gf;return b.jsx(f,{error:o.error,reset:void 0,info:{componentStack:""}})}throw o.error}return d}),rx=E.memo(function(){const t=er(),n=E.useContext(vf),o=Jn({select:h=>h.matches.find(g=>g.id===n)?.routeId}),i=t.routesById[o],l=Jn({select:h=>{const p=h.matches.find(y=>y.id===n);return Vo(p),p.globalNotFound}}),c=Jn({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 tx(t,i,void 0);if(!c)return null;const f=b.jsx(nx,{matchId:c});return o===dr?b.jsx(E.Suspense,{fallback:d,children:f}):f});function WI(){const e=er(),n=e.routesById[dr].options.pendingComponent??e.options.defaultPendingComponent,o=n?b.jsx(n,{}):null,i=e.isServer||typeof document<"u"&&e.ssr?Ss:E.Suspense,l=b.jsxs(i,{fallback:o,children:[!e.isServer&&b.jsx(HI,{}),b.jsx(QI,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function QI(){const e=er(),t=Jn({select:i=>i.matches[0]?.id}),n=Jn({select:i=>i.loadedAt}),o=t?b.jsx(nx,{matchId:t}):null;return b.jsx(vf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?o:b.jsx(mv,{getResetKey:()=>n,errorComponent:gf,onCatch:i=>{i.message||i.toString()},children:o})})}const XI=e=>new JI(e);class JI extends mI{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=tE,globalThis.createLazyFileRoute=oE):typeof window<"u"&&(window.createFileRoute=tE,window.createLazyFileRoute=oE);function e5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const o=Jw(),i=b.jsx(o.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:i}):i}function t5({router:e,...t}){return b.jsx(e5,{router:e,...t,children:b.jsx(WI,{})})}var n5={},iE={};const Sd=Object.create(null),Ul=e=>n5||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Sd:globalThis),Lr=new Proxy(Sd,{get(e,t){return Ul()[t]??Sd[t]},has(e,t){return t in Ul()||t in Sd},set(e,t,n){const o=Ul(!0);return o[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Ul(!0);return delete n[t],!0},ownKeys(){const e=Ul(!0);return Object.keys(e)}});function Jt(e,t){return typeof process<"u"&&iE?iE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Bl=1,mn=4,lo=8,hr=24,sE={eterm:mn,cons25:mn,console:mn,cygwin:mn,dtterm:mn,gnome:mn,hurd:mn,jfbterm:mn,konsole:mn,kterm:mn,mlterm:mn,mosh:hr,putty:mn,st:mn,"rxvt-unicode-24bit":hr,terminator:hr,"xterm-kitty":hr},r5=new Map(Object.entries({APPVEYOR:lo,BUILDKITE:lo,CIRCLECI:hr,DRONE:lo,GITEA_ACTIONS:hr,GITHUB_ACTIONS:hr,GITLAB_CI:lo,TRAVIS:lo})),o5=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function a5(){if(Jt("FORCE_COLOR")!==void 0)switch(Jt("FORCE_COLOR")){case"":case"1":case"true":return mn;case"2":return lo;case"3":return hr;default:return Bl}if(Jt("NODE_DISABLE_COLORS")!==void 0&&Jt("NODE_DISABLE_COLORS")!==""||Jt("NO_COLOR")!==void 0&&Jt("NO_COLOR")!==""||Jt("TERM")==="dumb")return Bl;if(Jt("TMUX"))return hr;if("TF_BUILD"in Lr&&"AGENT_NAME"in Lr)return mn;if("CI"in Lr){for(const{0:e,1:t}of r5)if(e in Lr)return t;return Jt("CI_NAME")==="codeship"?lo:Bl}if("TEAMCITY_VERSION"in Lr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Jt("TEAMCITY_VERSION"))!==null?mn:Bl;switch(Jt("TERM_PROGRAM")){case"iTerm.app":return!Jt("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Jt("TERM_PROGRAM_VERSION"))!==null?lo:hr;case"HyperTerm":case"MacTerm":return hr;case"Apple_Terminal":return lo}if(Jt("COLORTERM")==="truecolor"||Jt("COLORTERM")==="24bit")return hr;if(Jt("TERM")){if(/truecolor/.exec(Jt("TERM"))!==null)return hr;if(/^xterm-256/.exec(Jt("TERM"))!==null)return lo;const e=Jt("TERM").toLowerCase();if(sE[e])return sE[e];if(o5.some(t=>t.exec(e)!==null))return mn}return Jt("COLORTERM")?mn:Bl}const co={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"}},Eg=["debug","info","success","warn","error"];function i5(e,t){return Eg.indexOf(t)>=Eg.indexOf(e)}const s5={info:co.fg.blue,success:co.fg.green,warn:co.fg.yellow,error:co.fg.red,debug:co.fg.magenta},l5=(e,t,n)=>{const o=new Date().toISOString();return n?`${co.dim}${o}${co.reset} ${s5[e]}${e.toUpperCase()}${co.reset} ${co.bright}[Better Auth]:${co.reset} ${t}`:`${o} ${e.toUpperCase()} [Better Auth]: ${t}`},c5=e=>{const t="error",n=a5()!==1,o=(i,l,c=[])=>{if(!i5(t,i))return;const d=l5(i,l,n);{i==="error"?console.error(d,...c):i==="warn"?console.warn(d,...c):console.log(d,...c);return}};return{...Object.fromEntries(Eg.map(i=>[i,(...[l,...c])=>o(i,l,c)])),get level(){return t}}};c5();var Jl=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function u5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Jl(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function d5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Jl(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Jl?t:new Jl(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function _m(e,t="/api/auth"){if(d5(e),u5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function f5(e,t,n,o,i){if(e)return _m(e,t);{const l=Lr.BETTER_AUTH_URL||Lr.NEXT_PUBLIC_BETTER_AUTH_URL||Lr.PUBLIC_BETTER_AUTH_URL||Lr.NUXT_PUBLIC_BETTER_AUTH_URL||Lr.NUXT_PUBLIC_AUTH_URL||(Lr.BASE_URL!=="/"?Lr.BASE_URL:void 0);if(l)return _m(l,t)}if(typeof window<"u"&&window.location)return _m(window.location.origin,t)}const h5={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*:/},p5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,lE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},m5=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function g5(e){return e instanceof Date&&!isNaN(e.getTime())}function v5(e){const t=m5.exec(e);if(!t)return null;const[,n,o,i,l,c,d,f,h,g,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(o,10)-1,parseInt(i,10),parseInt(l,10),parseInt(c,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 g5(y)?y:null}function y5(e,t={}){const{strict:n=!1,warnings:o=!1,reviver:i,parseDates:l=!0}=t;if(typeof e!="string")return e;const c=e.trim();if(c.length>0&&c[0]==='"'&&c.endsWith('"')&&!c.slice(1,-1).includes('"'))return c.slice(1,-1);const d=c.toLowerCase();if(d.length<=9&&d in lE)return lE[d];if(!p5.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(h5).some(([f,h])=>{const g=h.test(c);return g&&o&&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(c,(h,g)=>{if(h==="__proto__"||h==="constructor"&&g&&typeof g=="object"&&"prototype"in g){o&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof g=="string"){const p=v5(g);if(p)return p}return i?i(h,g):g})}catch(f){if(n)throw f;return e}}function b5(e,t={strict:!0}){return y5(e,t)}let Vr=[],ba=0;const Ku=4,di=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(o){return n.lc=t.push(o),()=>{for(let l=ba+Ku;l<Vr.length;)Vr[l]===o?Vr.splice(l,Ku):l+=Ku;let i=t.indexOf(o);~i&&(t.splice(i,1),--n.lc||n.off())}},notify(o,i){let l=!Vr.length;for(let c of t)Vr.push(c,n.value,o,i);if(l){for(ba=0;ba<Vr.length;ba+=Ku)Vr[ba](Vr[ba+1],Vr[ba+2],Vr[ba+3]);Vr.length=0}},off(){},set(o){let i=n.value;i!==o&&(n.value=o,n.notify(i))},subscribe(o){let i=n.listen(o);return o(n.value),i},value:e};return n},_5=5,Wu=6,Qu=10;let E5=(e,t,n,o)=>(e.events=e.events||{},e.events[n+Qu]||(e.events[n+Qu]=o(i=>{e.events[n].reduceRight((l,c)=>(c(l),l),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],l=i.indexOf(t);i.splice(l,1),i.length||(delete e.events[n],e.events[n+Qu](),delete e.events[n+Qu])}),S5=1e3,ox=(e,t)=>E5(e,o=>{let i=t(o);i&&e.events[Wu].push(i)},_5,o=>{let i=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,o()),i(...c));let l=e.off;return e.events[Wu]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[Wu])c();e.events[Wu]=[]}},S5)},()=>{e.listen=i,e.off=l}});function w5(e,t,n){let o=new Set(t).add(void 0);return e.listen((i,l,c)=>{o.has(c)&&n(i,l,c)})}var x5=Object.defineProperty,R5=Object.defineProperties,O5=Object.getOwnPropertyDescriptors,cE=Object.getOwnPropertySymbols,T5=Object.prototype.hasOwnProperty,A5=Object.prototype.propertyIsEnumerable,uE=(e,t,n)=>t in e?x5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qr=(e,t)=>{for(var n in t||(t={}))T5.call(t,n)&&uE(e,n,t[n]);if(cE)for(var n of cE(t))A5.call(t,n)&&uE(e,n,t[n]);return e},so=(e,t)=>R5(e,O5(t)),C5=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},I5=async(e,t)=>{var n,o,i,l,c,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((o=g.hooks)==null?void 0:o.onRequest),h.onResponse.push((i=g.hooks)==null?void 0:i.onResponse),h.onSuccess.push((l=g.hooks)==null?void 0:l.onSuccess),h.onError.push((c=g.hooks)==null?void 0:c.onError),h.onRetry.push((d=g.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},dE=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}},M5=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 N5(e){if(typeof e=="number")return new dE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new dE(e);case"exponential":return new M5(e);default:throw new Error("Invalid retry strategy")}}var D5=async e=>{const t={},n=async o=>typeof o=="function"?await o():o;if(e?.auth){if(e.auth.type==="Bearer"){const o=await n(e.auth.token);if(!o)return t;t.authorization=`Bearer ${o}`}else if(e.auth.type==="Basic"){const o=n(e.auth.username),i=n(e.auth.password);if(!o||!i)return t;t.authorization=`Basic ${btoa(`${o}:${i}`)}`}else if(e.auth.type==="Custom"){const o=n(e.auth.value);if(!o)return t;t.authorization=`${n(e.auth.prefix)} ${o}`}}return t},L5=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function P5(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const o=t.split(";").shift()||"";return L5.test(o)?"json":n.has(o)||o.startsWith("text/")?"text":"blob"}function k5(e){try{return JSON.parse(e),!0}catch{return!1}}function ax(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 fE(e){try{return JSON.parse(e)}catch{return e}}function hE(e){return typeof e=="function"}function j5(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&hE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&hE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function z5(e){const t=new Headers(e?.headers),n=await D5(e);for(const[o,i]of Object.entries(n||{}))t.set(o,i);if(!t.has("content-type")){const o=U5(e?.body);o&&t.set("content-type",o)}return t}function U5(e){return ax(e)?"application/json":null}function B5(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(ax(e.body)&&!t.has("content-type")){for(const[n,o]of Object.entries(e?.body))o instanceof Date&&(e.body[n]=o.toISOString());return JSON.stringify(e.body)}return e.body}function F5(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const o=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return sx.includes(o)?o.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function $5(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var V5=class ix extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,ix.prototype)}};async function wd(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new V5(n.issues);return n.value}var sx=["get","post","put","patch","delete"],H5=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var o,i,l,c;const d=((i=(o=e.plugins)==null?void 0:o.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:i.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))),(c=d.config)!=null&&c.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let g=so(qr({},n),{method:h.method,output:h.output});return n?.disableValidation||(g=so(qr({},g),{body:h.input?await wd(h.input,n?.body):n?.body,params:h.params?await wd(h.params,n?.params):n?.params,query:h.query?await wd(h.query,n?.query):n?.query})),{url:t,options:g}}}return{url:t,options:n}}}),G5=e=>{async function t(n,o){const i=so(qr(qr({},e),o),{plugins:[...e?.plugins||[],H5(e||{})]});if(e?.catchAllError)try{return await Sg(n,i)}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 Sg(n,i)}return t};function q5(e,t){let{baseURL:n,params:o,query:i}=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];sx.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[c,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(i||{}))y!=null&&f.set(p,String(y));if(o)if(Array.isArray(o)){const p=c.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=o[y];c=c.replace(_,S)}}else for(const[p,y]of Object.entries(o))c=c.replace(`:${p}`,String(y));c=c.split("/").map(encodeURIComponent).join("/"),c.startsWith("/")&&(c=c.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${c}${h}`,l):`${l}${c}${h}`}var Sg=async(e,t)=>{var n,o,i,l,c,d,f,h;const{hooks:g,url:p,options:y}=await I5(e,t),_=j5(y),S=new AbortController,w=(n=y.signal)!=null?n:S.signal,T=q5(p,y),R=B5(y),A=await z5(y),C=F5(p,y);let O=so(qr({},y),{url:T,headers:A,body:R,method:C,signal:w});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((o=t?.body)==null?void 0:o.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:M}=$5(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(so(qr({},N),{response:(i=t?.hookOptions)!=null&&i.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=P5(L),ae={data:"",response:L,request:O};if(ne==="json"||ne==="text"){const P=await L.text(),H=await((l=O.jsonParser)!=null?l:fE)(P);ae.data=H}else ae.data=await L[ne]();O?.output&&O.output&&!O.disableValidation&&(ae.data=await wd(O.output,ae.data));for(const P of g.onSuccess)P&&await P(so(qr({},ae),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?L.clone():L}));return t?.throw?ae.data:{data:ae.data,error:null}}const D=(d=t?.jsonParser)!=null?d:fE,z=await L.text(),W=k5(z),G=W?await D(z):null,K={response:L,responseText:z,request:O,error:so(qr({},G),{status:L.status,statusText:L.statusText})};for(const j of g.onError)j&&await j(so(qr({},K),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const j=N5(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 ae=j.getDelay(ne);return await new Promise(P=>setTimeout(P,ae)),await Sg(e,so(qr({},t),{retryAttempt:ne+1}))}}if(t?.throw)throw new C5(L.status,L.statusText,W?G:z);return{data:null,error:so(qr({},G),{status:L.status,statusText:L.statusText})}};const Em=Symbol.for("better-auth:broadcast-channel"),Z5=()=>Math.floor(Date.now()/1e3);var Y5=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:Z5()}))}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(o=>o(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Sm(e="better-auth.message"){return globalThis[Em]||(globalThis[Em]=new Y5(e)),globalThis[Em]}const wm=Symbol.for("better-auth:focus-manager");var K5=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 pE(){return globalThis[wm]||(globalThis[wm]=new K5),globalThis[wm]}const xm=Symbol.for("better-auth:online-manager");var W5=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 Rm(){return globalThis[xm]||(globalThis[xm]=new W5),globalThis[xm]}const Q5=()=>typeof window>"u",Rs=(e,t,n,o)=>{const i=di({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof o=="function"?o({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):o;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(g){i.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:i.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||(i.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await h?.onError?.(g))},async onRequest(g){const p=i.get();i.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await h?.onRequest?.(g)}}).catch(g=>{i.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let c=!1;for(const d of e)d.subscribe(async()=>{Q5()||(c?await l():ox(i,()=>{const f=setTimeout(async()=>{c||(await l(),c=!0)},0);return()=>{i.off(),d.off(),clearTimeout(f)}}))});return i},hs=()=>Math.floor(Date.now()/1e3),X5=5;function J5(e){const{sessionAtom:t,sessionSignal:n,$fetch:o,options:i={}}=e,l=i.sessionOptions?.refetchInterval??0,c=i.sessionOptions?.refetchOnWindowFocus??!0,d=i.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Rm().isOnline,g=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=hs(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=hs(),o("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=hs(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&hs()-f.lastSessionRequest<X5&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=hs()),f.lastSync=hs(),n.set(!n.get()))},p=A=>{Sm().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=Sm().subscribe(()=>{g({event:"storage"})})},S=()=>{c&&(f.unsubscribeFocus=pE().subscribe(()=>{g({event:"visibilitychange"})}))},w=()=>{f.unsubscribeOnline=Rm().subscribe(A=>{A&&g({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),w(),Sm().setup(),pE().setup(),Rm().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 e6={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 t6(e,t){const n=di(!1),o=Rs(n,"/get-session",e,{method:"GET"});return ox(o,()=>{const i=J5({sessionAtom:o,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:o,$sessionSignal:n}}const n6=(e,t)=>{const n="credentials"in Request.prototype,o=f5(e?.baseURL,e?.basePath)??"/api/auth",i=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:c,onError:d,onRequest:f,onResponse:h,...g}=e?.fetchOptions||{},p=G5({baseURL:o,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?b5(O,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[l,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[e6],...i]}),{$sessionSignal:y,session:_}=t6(p,e),S=e?.plugins||[];let w={},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(w,O.getActions?.(p,C,e));return{get baseURL(){return o},pluginsActions:w,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function r6(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function o6(e,t,n){const o=t[e],{fetchOptions:i,query:l,...c}=n||{};return o||(i?.method?i.method:c&&Object.keys(c).length>0?"POST":"GET")}function a6(e,t,n,o,i){function l(c=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...c,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"||r6(g)?g:l(h)},apply:async(d,f,h)=>{const g="/"+c.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...w}=p,T={...y,...S},R=o6(g,n,p);return await t(g,{...T,body:R==="GET"?void 0:{...w,...T?.body||{}},query:_||T?.query,method:R,async onSuccess(A){if(await T?.onSuccess?.(A),!i||T.disableSignal)return;const C=i.filter(O=>O.matcher(g));if(C.length)for(const O of C){const M=o[O.signal];if(!M)return;const L=M.get();setTimeout(()=>{M.set(!L)},10)}}})}})}return l()}function i6(e,t={}){let n=E.useRef(e.get());const{keys:o,deps:i=[e,o]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),o?.length?w5(e,o,f):e.listen(f)},i),c=()=>n.current;return E.useSyncExternalStore(l,c,c)}function s6(e){return`use${l6(e)}`}function l6(e){return e.charAt(0).toUpperCase()+e.slice(1)}function lx(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:o,$fetch:i,$store:l,atomListeners:c}=n6(e);let d={};for(const[f,h]of Object.entries(o))d[s6(f)]=()=>i6(h);return a6({...n,...d,$fetch:i,$store:l},i,t,o,c)}function c6(e){return{authorize(t,n="AND"){let o=!1;for(const[i,l]of Object.entries(t)){const c=e[i];if(!c)return{success:!1,error:`You are not allowed to access resource: ${i}`};if(Array.isArray(l))o=l.every(d=>c.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?o=d.actions.some(f=>c.includes(f)):o=d.actions.every(f=>c.includes(f))}else throw new Jl("Invalid access control request");if(o&&n==="OR")return{success:o};if(!o&&n==="AND")return{success:!1,error:`unauthorized to access resource "${i}"`}}return o?{success:o}:{success:!1,error:"Not authorized"}},statements:e}}function cx(e){return{newRole(t){return c6(t)},statements:e}}const u6={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},ux=cx(u6),dx=ux.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),fx=ux.newRole({user:[],session:[]}),d6={admin:dx,user:fx},f6=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||d6;for(const o of t)if(n[o]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},h6={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Ev=cx(h6),hx=Ev.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),px=Ev.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),mx=Ev.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),p6={admin:hx,owner:px,member:mx},m6=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),o=e.options.creatorRole||"owner",i=n.includes(o),l=e.allowCreatorAllPermissions||!1;if(i&&l)return!0;for(const c of n)if(t[c]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},g6=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}}}]}),v6=e=>{const t={admin:dx,user:fx,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>f6({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},y6=()=>({id:"anonymous",$InferServerPlugin:{},pathMethods:{"/sign-in/anonymous":"POST"},atomListeners:[{matcher:e=>e==="/sign-in/anonymous",signal:"$sessionSignal"}]}),b6=()=>({id:"api-key",$InferServerPlugin:{},pathMethods:{"/api-key/create":"POST","/api-key/delete":"POST","/api-key/delete-all-expired-api-keys":"POST"}}),_6=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),E6=()=>({id:"generic-oauth-client",$InferServerPlugin:{}}),gx=()=>({id:"magic-link",$InferServerPlugin:{}}),S6=()=>({id:"multi-session",$InferServerPlugin:{},atomListeners:[{matcher(e){return e==="/multi-session/set-active"},signal:"$sessionSignal"}]});let ai=null;function mE(){return typeof window<"u"&&"IdentityCredential"in window}const w6=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||!mE()||navigator.credentials.preventSilentAccess())}}}],getActions:(t,n)=>({oneTap:async(o,i)=>{if(ai&&!ai.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},...o?.fetchOptions,...i}),(!o?.fetchOptions&&!i||o?.callbackURL)&&(window.location.href=o?.callbackURL??"/")}const{autoSelect:c,cancelOnTapOutside:d,context:f}=o??{},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:o?.nonce}]},mediation:c?"optional":"required",signal:ai?.signal});if(!p?.token){o?.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)){o?.onPromptNotification?.(void 0);return}throw p}},oneTap:()=>new Promise((p,y)=>{let _=!1;const S=e.promptOptions?.baseDelay??1e3,w=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:c,cancel_on_tap_outside:d,context:h,ux_mode:o?.uxMode||"popup",nonce:o?.nonce,itp_support:!0,...e.additionalOptions});const T=R=>{_||window.google?.accounts.id.prompt(A=>{if(!_){if(A.isDismissedMoment&&A.isDismissedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else o?.onPromptNotification?.(A);else if(A.isSkippedMoment&&A.isSkippedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else o?.onPromptNotification?.(A)}})};T(0)})};ai&&ai?.abort(),ai=new AbortController;try{const p=e.promptOptions?.fedCM===!1||!mE()?"oneTap":"fedCM";p==="oneTap"&&await x6(),await g[p]()}catch(p){throw console.error("Error during Google One Tap flow:",p),p}finally{ai=null}}}),getAtoms(t){return{}}}),x6=()=>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)}),R6=e=>m6(e,e.options.roles||p6),vx=e=>{const t=di(!1),n=di(!1),o=di(!1),i=di(!1),l={admin:hx,member:mx,owner:px,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>R6({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:c=>{const d=Rs(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:o,$activeMemberRoleSignal:i,activeOrganization:Rs([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:d,activeMember:Rs([o],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:Rs([i],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},O6=()=>({id:"username",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/sign-in/username",signal:"$sessionSignal"}]}),T6=e=>({id:"sso-client",$InferServerPlugin:{}}),A6=lx({plugins:[vx({}),v6(),T6(),gx()]});function yx(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yx(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function bx(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yx(e))&&(o&&(o+=" "),o+=t);return o}const C6=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},I6=(e,t)=>({classGroupId:e,validator:t}),_x=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Fd="-",gE=[],M6="arbitrary..",N6=e=>{const t=L6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return D6(c);const d=c.split(Fd),f=d[0]===""&&d.length>1?1:0;return Ex(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=o[c],h=n[c];return f?h?C6(h,f):f:h||gE}return n[c]||gE}}},Ex=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const h=Ex(e,t+1,l);if(h)return h}const c=n.validators;if(c===null)return;const d=t===0?e.join(Fd):e.slice(t).join(Fd),f=c.length;for(let h=0;h<f;h++){const g=c[h];if(g.validator(d))return g.classGroupId}},D6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?M6+o:void 0})(),L6=e=>{const{theme:t,classGroups:n}=e;return P6(n,t)},P6=(e,t)=>{const n=_x();for(const o in e){const i=e[o];Sv(i,n,o,t)}return n},Sv=(e,t,n,o)=>{const i=e.length;for(let l=0;l<i;l++){const c=e[l];k6(c,t,n,o)}},k6=(e,t,n,o)=>{if(typeof e=="string"){j6(e,t,n);return}if(typeof e=="function"){z6(e,t,n,o);return}U6(e,t,n,o)},j6=(e,t,n)=>{const o=e===""?t:Sx(t,e);o.classGroupId=n},z6=(e,t,n,o)=>{if(B6(e)){Sv(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(I6(n,e))},U6=(e,t,n,o)=>{const i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){const[d,f]=i[c];Sv(f,Sx(t,d),n,o)}},Sx=(e,t)=>{let n=e;const o=t.split(Fd),i=o.length;for(let l=0;l<i;l++){const c=o[l];let d=n.nextPart.get(c);d||(d=_x(),n.nextPart.set(c,d)),n=d}return n},B6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,F6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const i=(l,c)=>{n[l]=c,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=o[l])!==void 0)return i(l,c),c},set(l,c){l in n?n[l]=c:i(l,c)}}},wg="!",vE=":",$6=[],yE=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),V6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=i=>{const l=[];let c=0,d=0,f=0,h;const g=i.length;for(let w=0;w<g;w++){const T=i[w];if(c===0&&d===0){if(T===vE){l.push(i.slice(f,w)),f=w+1;continue}if(T==="/"){h=w;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const p=l.length===0?i:i.slice(f);let y=p,_=!1;p.endsWith(wg)?(y=p.slice(0,-1),_=!0):p.startsWith(wg)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return yE(l,_,y,S)};if(t){const i=t+vE,l=o;o=c=>c.startsWith(i)?l(c.slice(i.length)):yE($6,!1,c,void 0,!0)}if(n){const i=o;o=l=>n({className:l,parseClassName:i})}return o},H6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let i=[];for(let l=0;l<n.length;l++){const c=n[l],d=c[0]==="[",f=t.has(c);d||f?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(c)):i.push(c)}return i.length>0&&(i.sort(),o.push(...i)),o}},G6=e=>({cache:F6(e.cacheSize),parseClassName:V6(e),sortModifiers:H6(e),...N6(e)}),q6=/\s+/,Z6=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:l}=t,c=[],d=e.trim().split(q6);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:w}=n(g);if(p){f=g+(f.length>0?" "+f:f);continue}let T=!!w,R=o(T?S.substring(0,w):S);if(!R){if(!T){f=g+(f.length>0?" "+f:f);continue}if(R=o(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+wg:A,O=C+R;if(c.indexOf(O)>-1)continue;c.push(O);const M=i(R,T);for(let L=0;L<M.length;++L){const N=M[L];c.push(C+N)}f=g+(f.length>0?" "+f:f)}return f},Y6=(...e)=>{let t=0,n,o,i="";for(;t<e.length;)(n=e[t++])&&(o=wx(n))&&(i&&(i+=" "),i+=o);return i},wx=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=wx(e[o]))&&(n&&(n+=" "),n+=t);return n},K6=(e,...t)=>{let n,o,i,l;const c=f=>{const h=t.reduce((g,p)=>p(g),e());return n=G6(h),o=n.cache.get,i=n.cache.set,l=d,d(f)},d=f=>{const h=o(f);if(h)return h;const g=Z6(f,n);return i(f,g),g};return l=c,(...f)=>l(Y6(...f))},W6=[],sn=e=>{const t=n=>n[e]||W6;return t.isThemeGetter=!0,t},xx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Q6=/^\d+\/\d+$/,X6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,J6=/\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$/,eM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ps=e=>Q6.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),_a=e=>!!e&&Number.isInteger(Number(e)),Om=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),Fo=e=>X6.test(e),rM=()=>!0,oM=e=>J6.test(e)&&!eM.test(e),Ox=()=>!1,aM=e=>tM.test(e),iM=e=>nM.test(e),sM=e=>!Ae(e)&&!Ce(e),lM=e=>Us(e,Cx,Ox),Ae=e=>xx.test(e),ii=e=>Us(e,Ix,oM),Tm=e=>Us(e,hM,Ke),bE=e=>Us(e,Tx,Ox),cM=e=>Us(e,Ax,iM),Xu=e=>Us(e,Mx,aM),Ce=e=>Rx.test(e),Fl=e=>Bs(e,Ix),uM=e=>Bs(e,pM),_E=e=>Bs(e,Tx),dM=e=>Bs(e,Cx),fM=e=>Bs(e,Ax),Ju=e=>Bs(e,Mx,!0),Us=(e,t,n)=>{const o=xx.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},Bs=(e,t,n=!1)=>{const o=Rx.exec(e);return o?o[1]?t(o[1]):n:!1},Tx=e=>e==="position"||e==="percentage",Ax=e=>e==="image"||e==="url",Cx=e=>e==="length"||e==="size"||e==="bg-size",Ix=e=>e==="length",hM=e=>e==="number",pM=e=>e==="family-name",Mx=e=>e==="shadow",mM=()=>{const e=sn("color"),t=sn("font"),n=sn("text"),o=sn("font-weight"),i=sn("tracking"),l=sn("leading"),c=sn("breakpoint"),d=sn("container"),f=sn("spacing"),h=sn("radius"),g=sn("shadow"),p=sn("inset-shadow"),y=sn("text-shadow"),_=sn("drop-shadow"),S=sn("blur"),w=sn("perspective"),T=sn("aspect"),R=sn("ease"),A=sn("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],z=()=>[ps,"full","auto",...D()],W=()=>[_a,"none","subgrid",Ce,Ae],G=()=>["auto",{span:["full",_a,Ce,Ae]},_a,Ce,Ae],K=()=>[_a,"auto",Ce,Ae],j=()=>["auto","min","max","fr",Ce,Ae],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...D()],F=()=>[ps,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],H=()=>[e,Ce,Ae],re=()=>[...O(),_E,bE,{position:[Ce,Ae]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",dM,lM,{size:[Ce,Ae]}],Q=()=>[Om,Fl,ii],ee=()=>["","none","full",h,Ce,Ae],se=()=>["",Ke,Fl,ii],me=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[Ke,Om,_E,bE],Se=()=>["","none",S,Ce,Ae],De=()=>["none",Ke,Ce,Ae],Le=()=>["none",Ke,Ce,Ae],Ee=()=>[Ke,Ce,Ae],ze=()=>[ps,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fo],breakpoint:[Fo],color:[rM],container:[Fo],"drop-shadow":[Fo],ease:["in","out","in-out"],font:[sM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fo],shadow:[Fo],spacing:["px",Ke],text:[Fo],"text-shadow":[Fo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ps,Ae,Ce,T]}],container:["container"],columns:[{columns:[Ke,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:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[_a,"auto",Ce,Ae]}],basis:[{basis:[ps,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,ps,"auto","initial","none",Ae]}],grow:[{grow:["",Ke,Ce,Ae]}],shrink:[{shrink:["",Ke,Ce,Ae]}],order:[{order:[_a,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"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":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],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:[c]},...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,Fl,ii]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ce,Tm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Om,Ae]}],"font-family":[{font:[uM,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:[i,Ce,Ae]}],"line-clamp":[{"line-clamp":[Ke,"none",Ce,Tm]}],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:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",Ce,ii]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[Ke,"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:ye()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_a,Ce,Ae],radial:["",Ce,Ae],conic:[_a,Ce,Ae]},fM,cM]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],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:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,Ce,Ae]}],"outline-w":[{outline:["",Ke,Fl,ii]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",g,Ju,Xu]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,Ju,Xu]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[Ke,ii]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",y,Ju,Xu]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[Ke,Ce,Ae]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":[Ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":[Ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ye()}],"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:[Ke,Ce,Ae]}],contrast:[{contrast:[Ke,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",_,Ju,Xu]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",Ke,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[Ke,Ce,Ae]}],invert:[{invert:["",Ke,Ce,Ae]}],saturate:[{saturate:[Ke,Ce,Ae]}],sepia:[{sepia:["",Ke,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",Ke,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,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:[Ke,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",R,Ce,Ae]}],delay:[{delay:[Ke,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ce,Ae]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Le()}],"scale-x":[{"scale-x":Le()}],"scale-y":[{"scale-y":Le()}],"scale-z":[{"scale-z":Le()}],"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:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",...H()]}],"stroke-w":[{stroke:[Ke,Fl,ii,Tm]}],stroke:[{stroke:["none",...H()]}],"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"]}},gM=K6(mM),BH=Object.freeze({status:"aborted"});function ie(e,t,n){function o(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);const h=c.prototype,g=Object.keys(h);for(let p=0;p<g.length;p++){const y=g[p];y in d||(d[y]=h[y].bind(d))}}const i=n?.Parent??Object;class l extends i{}Object.defineProperty(l,"name",{value:e});function c(d){var f;const h=n?.Parent?new l:this;o(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(c,"init",{value:o}),Object.defineProperty(c,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class As extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Nx extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Dx={};function Da(e){return Dx}function Lx(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,i])=>t.indexOf(+o)===-1).map(([o,i])=>i)}function xg(e,t){return typeof t=="bigint"?t.toString():t}function bf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function bc(e){return e==null}function wv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function vM(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let i=(o.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(o)){const f=o.match(/\d?e-(\d?)/);f?.[1]&&(i=Number.parseInt(f[1]))}const l=n>i?n:i,c=Number.parseInt(e.toFixed(l).replace(".","")),d=Number.parseInt(t.toFixed(l).replace(".",""));return c%d/10**l}const EE=Symbol("evaluating");function at(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==EE)return o===void 0&&(o=EE,o=n()),o},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function xi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function za(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function SE(e){return JSON.stringify(e)}function yM(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Px="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const bM=bf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ps(e){if(sc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(sc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function kx(e){return Ps(e)?{...e}:Array.isArray(e)?[...e]:e}const _M=new Set(["string","number","symbol"]);function ks(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ua(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function Oe(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 EM(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const SM={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 wM(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=za(e._zod.def,{get shape(){const c={};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(c[d]=n.shape[d])}return xi(this,"shape",c),c},checks:[]});return Ua(e,l)}function xM(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=za(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete c[d]}return xi(this,"shape",c),c},checks:[]});return Ua(e,l)}function RM(e,t){if(!Ps(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const l=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=za(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return xi(this,"shape",l),l}});return Ua(e,i)}function OM(e,t){if(!Ps(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=za(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return xi(this,"shape",o),o}});return Ua(e,n)}function TM(e,t){const n=za(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return xi(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Ua(e,n)}function AM(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=za(t._zod.def,{get shape(){const d=t._zod.def.shape,f={...d};if(n)for(const h in n){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(f[h]=e?new e({type:"optional",innerType:d[h]}):d[h])}else for(const h in d)f[h]=e?new e({type:"optional",innerType:d[h]}):d[h];return xi(this,"shape",f),f},checks:[]});return Ua(t,c)}function CM(e,t,n){const o=za(t._zod.def,{get shape(){const i=t._zod.def.shape,l={...i};if(n)for(const c in n){if(!(c in l))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=new e({type:"nonoptional",innerType:i[c]}))}else for(const c in i)l[c]=new e({type:"nonoptional",innerType:i[c]});return xi(this,"shape",l),l}});return Ua(t,o)}function Os(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function fi(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function ed(e){return typeof e=="string"?e:e?.message}function La(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const i=ed(e.inst?._zod.def?.error?.(e))??ed(t?.error?.(e))??ed(n.customError?.(e))??ed(n.localeError?.(e))??"Invalid input";o.message=i}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function jx(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function xv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function lc(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const zx=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xg,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rv=ie("$ZodError",zx),_f=ie("$ZodError",zx,{Parent:Error});function IM(e,t=n=>n.message){const n={},o=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):o.push(t(i));return{formErrors:o,fieldErrors:n}}function MM(e,t=n=>n.message){const n={_errors:[]},o=i=>{for(const l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>o({issues:c}));else if(l.code==="invalid_key")o({issues:l.issues});else if(l.code==="invalid_element")o({issues:l.issues});else if(l.path.length===0)n._errors.push(t(l));else{let c=n,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(t(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return o(e),n}const Ef=e=>(t,n,o,i)=>{const l=o?Object.assign(o,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},l);if(c instanceof Promise)throw new As;if(c.issues.length){const d=new(i?.Err??e)(c.issues.map(f=>La(f,l,Da())));throw Px(d,i?.callee),d}return c.value},NM=Ef(_f),Sf=e=>async(t,n,o,i)=>{const l=o?Object.assign(o,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},l);if(c instanceof Promise&&(c=await c),c.issues.length){const d=new(i?.Err??e)(c.issues.map(f=>La(f,l,Da())));throw Px(d,i?.callee),d}return c.value},DM=Sf(_f),wf=e=>(t,n,o)=>{const i=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new As;return l.issues.length?{success:!1,error:new(e??Rv)(l.issues.map(c=>La(c,i,Da())))}:{success:!0,data:l.value}},LM=wf(_f),xf=e=>async(t,n,o)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>La(c,i,Da())))}:{success:!0,data:l.value}},PM=xf(_f),kM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ef(e)(t,n,i)},jM=e=>(t,n,o)=>Ef(e)(t,n,o),zM=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Sf(e)(t,n,i)},UM=e=>async(t,n,o)=>Sf(e)(t,n,o),BM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return wf(e)(t,n,i)},FM=e=>(t,n,o)=>wf(e)(t,n,o),$M=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return xf(e)(t,n,i)},VM=e=>async(t,n,o)=>xf(e)(t,n,o),HM=/^[cC][^\s-]{8,}$/,GM=/^[0-9a-z]+$/,qM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ZM=/^[0-9a-vA-V]{20}$/,YM=/^[A-Za-z0-9]{27}$/,KM=/^[a-zA-Z0-9_-]{21}$/,WM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,QM=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wE=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,XM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,JM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function eN(){return new RegExp(JM,"u")}const tN=/^(?:(?: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])$/,nN=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,rN=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,oN=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,aN=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ux=/^[A-Za-z0-9_-]*$/,iN=/^\+[1-9]\d{6,14}$/,Bx="(?:(?:\\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])))",sN=new RegExp(`^${Bx}$`);function Fx(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function lN(e){return new RegExp(`^${Fx(e)}$`)}function cN(e){const t=Fx({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Bx}T(?:${o})$`)}const uN=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},dN=/^-?\d+$/,$x=/^-?\d+(?:\.\d+)?$/,fN=/^(?:true|false)$/i,hN=/^null$/i,pN=/^undefined$/i,mN=/^[^A-Z]*$/,gN=/^[^a-z]*$/,An=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vx={number:"number",bigint:"bigint",object:"date"},Hx=ie("$ZodCheckLessThan",(e,t)=>{An.init(e,t);const n=Vx[typeof t.value];e._zod.onattach.push(o=>{const i=o._zod.bag,l=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gx=ie("$ZodCheckGreaterThan",(e,t)=>{An.init(e,t);const n=Vx[typeof t.value];e._zod.onattach.push(o=>{const i=o._zod.bag,l=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vN=ie("$ZodCheckMultipleOf",(e,t)=>{An.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):vM(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yN=ie("$ZodCheckNumberFormat",(e,t)=>{An.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[i,l]=SM[t.format];e._zod.onattach.push(c=>{const d=c._zod.bag;d.format=t.format,d.minimum=i,d.maximum=l,n&&(d.pattern=dN)}),e._zod.check=c=>{const d=c.value;if(n){if(!Number.isInteger(d)){c.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?c.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):c.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}d<i&&c.issues.push({origin:"number",input:d,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),d>l&&c.issues.push({origin:"number",input:d,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),bN=ie("$ZodCheckMaxSize",(e,t)=>{var n;An.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!bc(i)&&i.size!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const i=o.value;i.size<=t.maximum||o.issues.push({origin:jx(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),_N=ie("$ZodCheckMinSize",(e,t)=>{var n;An.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!bc(i)&&i.size!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const i=o.value;i.size>=t.minimum||o.issues.push({origin:jx(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),EN=ie("$ZodCheckMaxLength",(e,t)=>{var n;An.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!bc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const i=o.value;if(i.length<=t.maximum)return;const c=xv(i);o.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),SN=ie("$ZodCheckMinLength",(e,t)=>{var n;An.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!bc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const i=o.value;if(i.length>=t.minimum)return;const c=xv(i);o.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),wN=ie("$ZodCheckLengthEquals",(e,t)=>{var n;An.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!bc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=o=>{const i=o.value,l=i.length;if(l===t.length)return;const c=xv(i),d=l>t.length;o.issues.push({origin:c,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Rf=ie("$ZodCheckStringFormat",(e,t)=>{var n,o;An.init(e,t),e._zod.onattach.push(i=>{const l=i._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),xN=ie("$ZodCheckRegex",(e,t)=>{Rf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),RN=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mN),Rf.init(e,t)}),ON=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=gN),Rf.init(e,t)}),TN=ie("$ZodCheckIncludes",(e,t)=>{An.init(e,t);const n=ks(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(i=>{const l=i._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(o)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),AN=ie("$ZodCheckStartsWith",(e,t)=>{An.init(e,t);const n=new RegExp(`^${ks(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),CN=ie("$ZodCheckEndsWith",(e,t)=>{An.init(e,t);const n=new RegExp(`.*${ks(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),IN=ie("$ZodCheckMimeType",(e,t)=>{An.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),MN=ie("$ZodCheckOverwrite",(e,t)=>{An.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class NN{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
|
|
11
|
-
`).filter(c=>c),i=Math.min(...o.map(c=>c.length-c.trimStart().length)),l=o.map(c=>c.slice(i)).map(c=>" ".repeat(this.indent*2)+c);for(const c of l)this.content.push(c)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...n,i.join(`
|
|
12
|
-
`))}}const DN={major:4,minor:3,patch:4},ft=ie("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=DN;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const i of o)for(const l of i._zod.onattach)l(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(c,d,f)=>{let h=Os(c),g;for(const p of d){if(p._zod.def.when){if(!p._zod.def.when(c))continue}else if(h)continue;const y=c.issues.length,_=p._zod.check(c);if(_ instanceof Promise&&f?.async===!1)throw new As;if(g||_ instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await _,c.issues.length!==y&&(h||(h=Os(c,y)))});else{if(c.issues.length===y)continue;h||(h=Os(c,y))}}return g?g.then(()=>c):c},l=(c,d,f)=>{if(Os(c))return c.aborted=!0,c;const h=i(d,o,f);if(h instanceof Promise){if(f.async===!1)throw new As;return h.then(g=>e._zod.parse(g,f))}return e._zod.parse(h,f)};e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(g=>l(g,c,d)):l(h,c,d)}const f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new As;return f.then(h=>i(h,o,d))}return i(f,o,d)}}at(e,"~standard",()=>({validate:i=>{try{const l=LM(e,i);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return PM(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Ov=ie("$ZodString",(e,t)=>{ft.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??uN(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Lt=ie("$ZodStringFormat",(e,t)=>{Rf.init(e,t),Ov.init(e,t)}),LN=ie("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=QM),Lt.init(e,t)}),PN=ie("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wE(o))}else t.pattern??(t.pattern=wE());Lt.init(e,t)}),kN=ie("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=XM),Lt.init(e,t)}),jN=ie("$ZodURL",(e,t)=>{Lt.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),i=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),zN=ie("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=eN()),Lt.init(e,t)}),UN=ie("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=KM),Lt.init(e,t)}),BN=ie("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=HM),Lt.init(e,t)}),FN=ie("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=GM),Lt.init(e,t)}),$N=ie("$ZodULID",(e,t)=>{t.pattern??(t.pattern=qM),Lt.init(e,t)}),VN=ie("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ZM),Lt.init(e,t)}),HN=ie("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=YM),Lt.init(e,t)}),GN=ie("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=cN(t)),Lt.init(e,t)}),qN=ie("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=sN),Lt.init(e,t)}),ZN=ie("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=lN(t)),Lt.init(e,t)}),YN=ie("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=WM),Lt.init(e,t)}),KN=ie("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tN),Lt.init(e,t),e._zod.bag.format="ipv4"}),WN=ie("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nN),Lt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),QN=ie("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=rN),Lt.init(e,t)}),XN=ie("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=oN),Lt.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[i,l]=o;if(!l)throw new Error;const c=Number(l);if(`${c}`!==l)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function qx(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const JN=ie("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=aN),Lt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{qx(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function eD(e){if(!Ux.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return qx(n)}const tD=ie("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ux),Lt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{eD(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),nD=ie("$ZodE164",(e,t)=>{t.pattern??(t.pattern=iN),Lt.init(e,t)});function rD(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const i=JSON.parse(atob(o));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const oD=ie("$ZodJWT",(e,t)=>{Lt.init(e,t),e._zod.check=n=>{rD(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Zx=ie("$ZodNumber",(e,t)=>{ft.init(e,t),e._zod.pattern=e._zod.bag.pattern??$x,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const l=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...l?{received:l}:{}}),n}}),aD=ie("$ZodNumberFormat",(e,t)=>{yN.init(e,t),Zx.init(e,t)}),iD=ie("$ZodBoolean",(e,t)=>{ft.init(e,t),e._zod.pattern=fN,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),sD=ie("$ZodUndefined",(e,t)=>{ft.init(e,t),e._zod.pattern=pN,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{const i=n.value;return typeof i>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),n}}),lD=ie("$ZodNull",(e,t)=>{ft.init(e,t),e._zod.pattern=hN,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),cD=ie("$ZodAny",(e,t)=>{ft.init(e,t),e._zod.parse=n=>n}),uD=ie("$ZodUnknown",(e,t)=>{ft.init(e,t),e._zod.parse=n=>n}),dD=ie("$ZodNever",(e,t)=>{ft.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),fD=ie("$ZodDate",(e,t)=>{ft.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const i=n.value,l=i instanceof Date;return l&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...l?{received:"Invalid Date"}:{},inst:e}),n}});function xE(e,t,n){e.issues.length&&t.issues.push(...fi(n,e.issues)),t.value[n]=e.value}const hD=ie("$ZodArray",(e,t)=>{ft.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const l=[];for(let c=0;c<i.length;c++){const d=i[c],f=t.element._zod.run({value:d,issues:[]},o);f instanceof Promise?l.push(f.then(h=>xE(h,n,c))):xE(f,n,c)}return l.length?Promise.all(l).then(()=>n):n}});function $d(e,t,n,o,i){if(e.issues.length){if(i&&!(n in o))return;t.issues.push(...fi(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Yx(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=EM(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Kx(e,t,n,o,i,l){const c=[],d=i.keySet,f=i.catchall._zod,h=f.def.type,g=f.optout==="optional";for(const p in t){if(d.has(p))continue;if(h==="never"){c.push(p);continue}const y=f.run({value:t[p],issues:[]},o);y instanceof Promise?e.push(y.then(_=>$d(_,n,p,t,g))):$d(y,n,p,t,g)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:l}),e.length?Promise.all(e).then(()=>n):n}const pD=ie("$ZodObject",(e,t)=>{if(ft.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const d=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...d};return Object.defineProperty(t,"shape",{value:f}),f}})}const o=bf(()=>Yx(t));at(e._zod,"propValues",()=>{const d=t.shape,f={};for(const h in d){const g=d[h]._zod;if(g.values){f[h]??(f[h]=new Set);for(const p of g.values)f[h].add(p)}}return f});const i=sc,l=t.catchall;let c;e._zod.parse=(d,f)=>{c??(c=o.value);const h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};const g=[],p=c.shape;for(const y of c.keys){const _=p[y],S=_._zod.optout==="optional",w=_._zod.run({value:h[y],issues:[]},f);w instanceof Promise?g.push(w.then(T=>$d(T,d,y,h,S))):$d(w,d,y,h,S)}return l?Kx(g,h,d,f,o.value,e):g.length?Promise.all(g).then(()=>d):d}}),mD=ie("$ZodObjectJIT",(e,t)=>{pD.init(e,t);const n=e._zod.parse,o=bf(()=>Yx(t)),i=y=>{const _=new NN(["shape","payload","ctx"]),S=o.value,w=C=>{const O=SE(C);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};_.write("const input = payload.value;");const T=Object.create(null);let R=0;for(const C of S.keys)T[C]=`key_${R++}`;_.write("const newResult = {};");for(const C of S.keys){const O=T[C],M=SE(C),N=y[C]?._zod?.optout==="optional";_.write(`const ${O} = ${w(C)};`),N?_.write(`
|
|
13
|
-
if (${O}.issues.length) {
|
|
14
|
-
if (${M} in input) {
|
|
15
|
-
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
16
|
-
...iss,
|
|
17
|
-
path: iss.path ? [${M}, ...iss.path] : [${M}]
|
|
18
|
-
})));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (${O}.value === undefined) {
|
|
23
|
-
if (${M} in input) {
|
|
24
|
-
newResult[${M}] = undefined;
|
|
25
|
-
}
|
|
26
|
-
} else {
|
|
27
|
-
newResult[${M}] = ${O}.value;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
`):_.write(`
|
|
31
|
-
if (${O}.issues.length) {
|
|
32
|
-
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
33
|
-
...iss,
|
|
34
|
-
path: iss.path ? [${M}, ...iss.path] : [${M}]
|
|
35
|
-
})));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (${O}.value === undefined) {
|
|
39
|
-
if (${M} in input) {
|
|
40
|
-
newResult[${M}] = undefined;
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
newResult[${M}] = ${O}.value;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
`)}_.write("payload.value = newResult;"),_.write("return payload;");const A=_.compile();return(C,O)=>A(y,C,O)};let l;const c=sc,d=!Dx.jitless,h=d&&bM.value,g=t.catchall;let p;e._zod.parse=(y,_)=>{p??(p=o.value);const S=y.value;return c(S)?d&&h&&_?.async===!1&&_.jitless!==!0?(l||(l=i(t.shape)),y=l(y,_),g?Kx([],S,y,_,p,e):y):n(y,_):(y.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),y)}});function RE(e,t,n,o){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const i=e.filter(l=>!Os(l));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(l=>l.issues.map(c=>La(c,o,Da())))}),t)}const Wx=ie("$ZodUnion",(e,t)=>{ft.init(e,t),at(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),at(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),at(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),at(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${i.map(l=>wv(l.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(i,l)=>{if(n)return o(i,l);let c=!1;const d=[];for(const f of t.options){const h=f._zod.run({value:i.value,issues:[]},l);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(f=>RE(f,i,e,l)):RE(d,i,e,l)}}),gD=ie("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Wx.init(e,t);const n=e._zod.parse;at(e._zod,"propValues",()=>{const i={};for(const l of t.options){const c=l._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(const h of f)i[d].add(h)}}return i});const o=bf(()=>{const i=t.options,l=new Map;for(const c of i){const d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const f of d){if(l.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);l.set(f,c)}}return l});e._zod.parse=(i,l)=>{const c=i.value;if(!sc(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;const d=o.value.get(c?.[t.discriminator]);return d?d._zod.run(i,l):t.unionFallback?n(i,l):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}}),vD=ie("$ZodIntersection",(e,t)=>{ft.init(e,t),e._zod.parse=(n,o)=>{const i=n.value,l=t.left._zod.run({value:i,issues:[]},o),c=t.right._zod.run({value:i,issues:[]},o);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([f,h])=>OE(n,f,h)):OE(n,l,c)}});function Rg(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ps(e)&&Ps(t)){const n=Object.keys(t),o=Object.keys(e).filter(l=>n.indexOf(l)!==-1),i={...e,...t};for(const l of o){const c=Rg(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};i[l]=c.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const i=e[o],l=t[o],c=Rg(i,l);if(!c.valid)return{valid:!1,mergeErrorPath:[o,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function OE(e,t,n){const o=new Map;let i;for(const d of t.issues)if(d.code==="unrecognized_keys"){i??(i=d);for(const f of d.keys)o.has(f)||o.set(f,{}),o.get(f).l=!0}else e.issues.push(d);for(const d of n.issues)if(d.code==="unrecognized_keys")for(const f of d.keys)o.has(f)||o.set(f,{}),o.get(f).r=!0;else e.issues.push(d);const l=[...o].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(l.length&&i&&e.issues.push({...i,keys:l}),Os(e))return e;const c=Rg(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const yD=ie("$ZodTuple",(e,t)=>{ft.init(e,t);const n=t.items;e._zod.parse=(o,i)=>{const l=o.value;if(!Array.isArray(l))return o.issues.push({input:l,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const c=[],d=[...n].reverse().findIndex(g=>g._zod.optin!=="optional"),f=d===-1?0:n.length-d;if(!t.rest){const g=l.length>n.length,p=l.length<f-1;if(g||p)return o.issues.push({...g?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:l,inst:e,origin:"array"}),o}let h=-1;for(const g of n){if(h++,h>=l.length&&h>=f)continue;const p=g._zod.run({value:l[h],issues:[]},i);p instanceof Promise?c.push(p.then(y=>td(y,o,h))):td(p,o,h)}if(t.rest){const g=l.slice(n.length);for(const p of g){h++;const y=t.rest._zod.run({value:p,issues:[]},i);y instanceof Promise?c.push(y.then(_=>td(_,o,h))):td(y,o,h)}}return c.length?Promise.all(c).then(()=>o):o}});function td(e,t,n){e.issues.length&&t.issues.push(...fi(n,e.issues)),t.value[n]=e.value}const bD=ie("$ZodRecord",(e,t)=>{ft.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;if(!Ps(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const l=[],c=t.keyType._zod.values;if(c){n.value={};const d=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);const g=t.valueType._zod.run({value:i[h],issues:[]},o);g instanceof Promise?l.push(g.then(p=>{p.issues.length&&n.issues.push(...fi(h,p.issues)),n.value[h]=p.value})):(g.issues.length&&n.issues.push(...fi(h,g.issues)),n.value[h]=g.value)}let f;for(const h in i)d.has(h)||(f=f??[],f.push(h));f&&f.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{n.value={};for(const d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&$x.test(d)&&f.issues.length&&f.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){const p=t.keyType._zod.run({value:Number(d),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(f=p)}if(f.issues.length){t.mode==="loose"?n.value[d]=i[d]:n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(p=>La(p,o,Da())),input:d,path:[d],inst:e});continue}const g=t.valueType._zod.run({value:i[d],issues:[]},o);g instanceof Promise?l.push(g.then(p=>{p.issues.length&&n.issues.push(...fi(d,p.issues)),n.value[f.value]=p.value})):(g.issues.length&&n.issues.push(...fi(d,g.issues)),n.value[f.value]=g.value)}}return l.length?Promise.all(l).then(()=>n):n}}),_D=ie("$ZodEnum",(e,t)=>{ft.init(e,t);const n=Lx(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(i=>_M.has(typeof i)).map(i=>typeof i=="string"?ks(i):i.toString()).join("|")})$`),e._zod.parse=(i,l)=>{const c=i.value;return o.has(c)||i.issues.push({code:"invalid_value",values:n,input:c,inst:e}),i}}),ED=ie("$ZodLiteral",(e,t)=>{if(ft.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?ks(o):o?ks(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,i)=>{const l=o.value;return n.has(l)||o.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),o}}),SD=ie("$ZodFile",(e,t)=>{ft.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),wD=ie("$ZodTransform",(e,t)=>{ft.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Nx(e.constructor.name);const i=t.transform(n.value,n);if(o.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(n.value=c,n));if(i instanceof Promise)throw new As;return n.value=i,n}});function TE(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Qx=ie("$ZodOptional",(e,t)=>{ft.init(e,t),e._zod.optin="optional",e._zod.optout="optional",at(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),at(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wv(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>TE(l,n.value)):TE(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),xD=ie("$ZodExactOptional",(e,t)=>{Qx.init(e,t),at(e._zod,"values",()=>t.innerType._zod.values),at(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),RD=ie("$ZodNullable",(e,t)=>{ft.init(e,t),at(e._zod,"optin",()=>t.innerType._zod.optin),at(e._zod,"optout",()=>t.innerType._zod.optout),at(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wv(n.source)}|null)$`):void 0}),at(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),OD=ie("$ZodDefault",(e,t)=>{ft.init(e,t),e._zod.optin="optional",at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>AE(l,t)):AE(i,t)}});function AE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const TD=ie("$ZodPrefault",(e,t)=>{ft.init(e,t),e._zod.optin="optional",at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),AD=ie("$ZodNonOptional",(e,t)=>{ft.init(e,t),at(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>CE(l,e)):CE(i,e)}});function CE(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const CD=ie("$ZodCatch",(e,t)=>{ft.init(e,t),at(e._zod,"optin",()=>t.innerType._zod.optin),at(e._zod,"optout",()=>t.innerType._zod.optout),at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>(n.value=l.value,l.issues.length&&(n.value=t.catchValue({...n,error:{issues:l.issues.map(c=>La(c,o,Da()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>La(l,o,Da()))},input:n.value}),n.issues=[]),n)}}),ID=ie("$ZodPipe",(e,t)=>{ft.init(e,t),at(e._zod,"values",()=>t.in._zod.values),at(e._zod,"optin",()=>t.in._zod.optin),at(e._zod,"optout",()=>t.out._zod.optout),at(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const l=t.out._zod.run(n,o);return l instanceof Promise?l.then(c=>nd(c,t.in,o)):nd(l,t.in,o)}const i=t.in._zod.run(n,o);return i instanceof Promise?i.then(l=>nd(l,t.out,o)):nd(i,t.out,o)}});function nd(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const MD=ie("$ZodReadonly",(e,t)=>{ft.init(e,t),at(e._zod,"propValues",()=>t.innerType._zod.propValues),at(e._zod,"values",()=>t.innerType._zod.values),at(e._zod,"optin",()=>t.innerType?._zod?.optin),at(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(IE):IE(i)}});function IE(e){return e.value=Object.freeze(e.value),e}const ND=ie("$ZodLazy",(e,t)=>{ft.init(e,t),at(e._zod,"innerType",()=>t.getter()),at(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),at(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),at(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),at(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),DD=ie("$ZodCustom",(e,t)=>{An.init(e,t),ft.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,i=t.fn(o);if(i instanceof Promise)return i.then(l=>ME(l,n,o,e));ME(i,n,o,e)}});function ME(e,t,n,o){if(!e){const i={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(i.params=o._zod.def.params),t.issues.push(lc(i))}}var NE;class LD{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const i={...o,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function PD(){return new LD}(NE=globalThis).__zod_globalRegistry??(NE.__zod_globalRegistry=PD());const Kl=globalThis.__zod_globalRegistry;function kD(e,t){return new e({type:"string",...Oe(t)})}function jD(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Oe(t)})}function DE(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(t)})}function zD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(t)})}function UD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(t)})}function BD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(t)})}function FD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(t)})}function Xx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Oe(t)})}function $D(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(t)})}function VD(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(t)})}function HD(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(t)})}function GD(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(t)})}function qD(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(t)})}function ZD(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(t)})}function YD(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(t)})}function KD(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(t)})}function WD(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(t)})}function QD(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(t)})}function XD(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(t)})}function JD(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(t)})}function eL(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(t)})}function tL(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(t)})}function nL(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(t)})}function rL(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(t)})}function oL(e,t){return new e({type:"string",format:"date",check:"string_format",...Oe(t)})}function aL(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Oe(t)})}function iL(e,t){return new e({type:"string",format:"duration",check:"string_format",...Oe(t)})}function sL(e,t){return new e({type:"number",checks:[],...Oe(t)})}function lL(e,t){return new e({type:"number",coerce:!0,checks:[],...Oe(t)})}function cL(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Oe(t)})}function uL(e,t){return new e({type:"boolean",...Oe(t)})}function dL(e,t){return new e({type:"boolean",coerce:!0,...Oe(t)})}function fL(e,t){return new e({type:"undefined",...Oe(t)})}function hL(e,t){return new e({type:"null",...Oe(t)})}function pL(e){return new e({type:"any"})}function mL(e){return new e({type:"unknown"})}function gL(e,t){return new e({type:"never",...Oe(t)})}function vL(e,t){return new e({type:"date",...Oe(t)})}function LE(e,t){return new Hx({check:"less_than",...Oe(t),value:e,inclusive:!1})}function xd(e,t){return new Hx({check:"less_than",...Oe(t),value:e,inclusive:!0})}function PE(e,t){return new Gx({check:"greater_than",...Oe(t),value:e,inclusive:!1})}function Rd(e,t){return new Gx({check:"greater_than",...Oe(t),value:e,inclusive:!0})}function kE(e,t){return new vN({check:"multiple_of",...Oe(t),value:e})}function yL(e,t){return new bN({check:"max_size",...Oe(t),maximum:e})}function bL(e,t){return new _N({check:"min_size",...Oe(t),minimum:e})}function Jx(e,t){return new EN({check:"max_length",...Oe(t),maximum:e})}function Vd(e,t){return new SN({check:"min_length",...Oe(t),minimum:e})}function eR(e,t){return new wN({check:"length_equals",...Oe(t),length:e})}function _L(e,t){return new xN({check:"string_format",format:"regex",...Oe(t),pattern:e})}function EL(e){return new RN({check:"string_format",format:"lowercase",...Oe(e)})}function SL(e){return new ON({check:"string_format",format:"uppercase",...Oe(e)})}function wL(e,t){return new TN({check:"string_format",format:"includes",...Oe(t),includes:e})}function xL(e,t){return new AN({check:"string_format",format:"starts_with",...Oe(t),prefix:e})}function RL(e,t){return new CN({check:"string_format",format:"ends_with",...Oe(t),suffix:e})}function OL(e,t){return new IN({check:"mime_type",mime:e,...Oe(t)})}function Fs(e){return new MN({check:"overwrite",tx:e})}function TL(e){return Fs(t=>t.normalize(e))}function AL(){return Fs(e=>e.trim())}function CL(){return Fs(e=>e.toLowerCase())}function IL(){return Fs(e=>e.toUpperCase())}function ML(){return Fs(e=>yM(e))}function NL(e,t,n){return new e({type:"array",element:t,...Oe(n)})}function DL(e,t){return new e({type:"file",...Oe(t)})}function LL(e,t,n){const o=Oe(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function PL(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Oe(n)})}function kL(e){const t=jL(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(lc(o,n.value,t._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(lc(i))}},e(n.value,n)));return t}function jL(e,t){const n=new An({check:"custom",...Oe(t)});return n._zod.check=e,n}function Hd(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Kl,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ot(e,t,n={path:[],schemaPath:[]}){var o;const i=e._zod.def,l=t.seen.get(e);if(l)return l.count++,n.schemaPath.includes(e)&&(l.cycle=n.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const d=e._zod.toJSONSchema?.();if(d)c.schema=d;else{const g={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,g);else{const y=c.schema,_=t.processors[i.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);_(e,t,y,g)}const p=e._zod.parent;p&&(c.ref||(c.ref=p),Ot(p,t,g),t.seen.get(p).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(c.schema,f),t.io==="input"&&jn(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((o=c.schema).default??(o.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function Gd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const c of e.seen.entries()){const d=e.metadataRegistry.get(c[0])?.id;if(d){const f=o.get(d);if(f&&f!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(d,c[0])}}const i=c=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(c[0])?.id,y=e.external.uri??(S=>S);if(p)return{ref:y(p)};const _=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=_,{defId:_,ref:`${y("__shared")}#/${d}/${_}`}}if(c[1]===n)return{ref:"#"};const h=`#/${d}/`,g=c[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:h+g}},l=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:f,defId:h}=i(c);d.def={...d.schema},h&&(d.defId=h);const g=d.schema;for(const p in g)delete g[p];g.$ref=f};if(e.cycles==="throw")for(const c of e.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
47
|
-
|
|
48
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const d=c[1];if(t===c[0]){l(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(t!==c[0]&&h){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(d.cycle){l(c);continue}if(d.count>1&&e.reused==="ref"){l(c);continue}}}function qd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=c=>{const d=e.seen.get(c);if(d.ref===null)return;const f=d.def??d.schema,h={...f},g=d.ref;if(d.ref=null,g){o(g);const y=e.seen.get(g),_=y.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(_)):Object.assign(f,_),Object.assign(f,h),c._zod.parent===g)for(const w in f)w==="$ref"||w==="allOf"||w in h||delete f[w];if(_.$ref)for(const w in f)w==="$ref"||w==="allOf"||w in y.def&&JSON.stringify(f[w])===JSON.stringify(y.def[w])&&delete f[w]}const p=c._zod.parent;if(p&&p!==g){o(p);const y=e.seen.get(p);if(y?.schema.$ref&&(f.$ref=y.schema.$ref,y.def))for(const _ in f)_==="$ref"||_==="allOf"||_ in y.def&&JSON.stringify(f[_])===JSON.stringify(y.def[_])&&delete f[_]}e.override({zodSchema:c,jsonSchema:f,path:d.path??[]})};for(const c of[...e.seen.entries()].reverse())o(c[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(c)}Object.assign(i,n.def??n.schema);const l=e.external?.defs??{};for(const c of e.seen.entries()){const d=c[1];d.def&&d.defId&&(l[d.defId]=d.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?i.$defs=l:i.definitions=l);try{const c=JSON.parse(JSON.stringify(i));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Zd(t,"input",e.processors),output:Zd(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function jn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return jn(o.element,n);if(o.type==="set")return jn(o.valueType,n);if(o.type==="lazy")return jn(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return jn(o.innerType,n);if(o.type==="intersection")return jn(o.left,n)||jn(o.right,n);if(o.type==="record"||o.type==="map")return jn(o.keyType,n)||jn(o.valueType,n);if(o.type==="pipe")return jn(o.in,n)||jn(o.out,n);if(o.type==="object"){for(const i in o.shape)if(jn(o.shape[i],n))return!0;return!1}if(o.type==="union"){for(const i of o.options)if(jn(i,n))return!0;return!1}if(o.type==="tuple"){for(const i of o.items)if(jn(i,n))return!0;return!!(o.rest&&jn(o.rest,n))}return!1}const zL=(e,t={})=>n=>{const o=Hd({...n,processors:t});return Ot(e,o),Gd(o,e),qd(o,e)},Zd=(e,t,n={})=>o=>{const{libraryOptions:i,target:l}=o??{},c=Hd({...i??{},target:l,io:t,processors:n});return Ot(e,c),Gd(c,e),qd(c,e)},UL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tR=(e,t,n,o)=>{const i=n;i.type="string";const{minimum:l,maximum:c,format:d,patterns:f,contentEncoding:h}=e._zod.bag;if(typeof l=="number"&&(i.minLength=l),typeof c=="number"&&(i.maxLength=c),d&&(i.format=UL[d]??d,i.format===""&&delete i.format,d==="time"&&delete i.format),h&&(i.contentEncoding=h),f&&f.size>0){const g=[...f];g.length===1?i.pattern=g[0].source:g.length>1&&(i.allOf=[...g.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},nR=(e,t,n,o)=>{const i=n,{minimum:l,maximum:c,format:d,multipleOf:f,exclusiveMaximum:h,exclusiveMinimum:g}=e._zod.bag;typeof d=="string"&&d.includes("int")?i.type="integer":i.type="number",typeof g=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=g,i.exclusiveMinimum=!0):i.exclusiveMinimum=g),typeof l=="number"&&(i.minimum=l,typeof g=="number"&&t.target!=="draft-04"&&(g>=l?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof c=="number"&&(i.maximum=c,typeof h=="number"&&t.target!=="draft-04"&&(h<=c?delete i.maximum:delete i.exclusiveMaximum)),typeof f=="number"&&(i.multipleOf=f)},rR=(e,t,n,o)=>{n.type="boolean"},BL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},FL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},oR=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},aR=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$L=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},iR=(e,t,n,o)=>{n.not={}},sR=(e,t,n,o)=>{},lR=(e,t,n,o)=>{},cR=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},uR=(e,t,n,o)=>{const i=e._zod.def,l=Lx(i.entries);l.every(c=>typeof c=="number")&&(n.type="number"),l.every(c=>typeof c=="string")&&(n.type="string"),n.enum=l},dR=(e,t,n,o)=>{const i=e._zod.def,l=[];for(const c of i.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(c))}else l.push(c);if(l.length!==0)if(l.length===1){const c=l[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else l.every(c=>typeof c=="number")&&(n.type="number"),l.every(c=>typeof c=="string")&&(n.type="string"),l.every(c=>typeof c=="boolean")&&(n.type="boolean"),l.every(c=>c===null)&&(n.type="null"),n.enum=l},VL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},HL=(e,t,n,o)=>{const i=n,l=e._zod.pattern;if(!l)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=l.source},fR=(e,t,n,o)=>{const i=n,l={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:d,mime:f}=e._zod.bag;c!==void 0&&(l.minLength=c),d!==void 0&&(l.maxLength=d),f?f.length===1?(l.contentMediaType=f[0],Object.assign(i,l)):(Object.assign(i,l),i.anyOf=f.map(h=>({contentMediaType:h}))):Object.assign(i,l)},GL=(e,t,n,o)=>{n.type="boolean"},hR=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},qL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},pR=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ZL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},YL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},mR=(e,t,n,o)=>{const i=n,l=e._zod.def,{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(i.minItems=c),typeof d=="number"&&(i.maxItems=d),i.type="array",i.items=Ot(l.element,t,{...o,path:[...o.path,"items"]})},gR=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="object",i.properties={};const c=l.shape;for(const h in c)i.properties[h]=Ot(c[h],t,{...o,path:[...o.path,"properties",h]});const d=new Set(Object.keys(c)),f=new Set([...d].filter(h=>{const g=l.shape[h]._zod;return t.io==="input"?g.optin===void 0:g.optout===void 0}));f.size>0&&(i.required=Array.from(f)),l.catchall?._zod.def.type==="never"?i.additionalProperties=!1:l.catchall?l.catchall&&(i.additionalProperties=Ot(l.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},vR=(e,t,n,o)=>{const i=e._zod.def,l=i.inclusive===!1,c=i.options.map((d,f)=>Ot(d,t,{...o,path:[...o.path,l?"oneOf":"anyOf",f]}));l?n.oneOf=c:n.anyOf=c},yR=(e,t,n,o)=>{const i=e._zod.def,l=Ot(i.left,t,{...o,path:[...o.path,"allOf",0]}),c=Ot(i.right,t,{...o,path:[...o.path,"allOf",1]}),d=h=>"allOf"in h&&Object.keys(h).length===1,f=[...d(l)?l.allOf:[l],...d(c)?c.allOf:[c]];n.allOf=f},bR=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="array";const c=t.target==="draft-2020-12"?"prefixItems":"items",d=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",f=l.items.map((y,_)=>Ot(y,t,{...o,path:[...o.path,c,_]})),h=l.rest?Ot(l.rest,t,{...o,path:[...o.path,d,...t.target==="openapi-3.0"?[l.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=f,h&&(i.items=h)):t.target==="openapi-3.0"?(i.items={anyOf:f},h&&i.items.anyOf.push(h),i.minItems=f.length,h||(i.maxItems=f.length)):(i.items=f,h&&(i.additionalItems=h));const{minimum:g,maximum:p}=e._zod.bag;typeof g=="number"&&(i.minItems=g),typeof p=="number"&&(i.maxItems=p)},_R=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="object";const c=l.keyType,f=c._zod.bag?.patterns;if(l.mode==="loose"&&f&&f.size>0){const g=Ot(l.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});i.patternProperties={};for(const p of f)i.patternProperties[p.source]=g}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Ot(l.keyType,t,{...o,path:[...o.path,"propertyNames"]})),i.additionalProperties=Ot(l.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const h=c._zod.values;if(h){const g=[...h].filter(p=>typeof p=="string"||typeof p=="number");g.length>0&&(i.required=g)}},ER=(e,t,n,o)=>{const i=e._zod.def,l=Ot(i.innerType,t,o),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=i.innerType,n.nullable=!0):n.anyOf=[l,{type:"null"}]},SR=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},wR=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},xR=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},RR=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType;let c;try{c=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},OR=(e,t,n,o)=>{const i=e._zod.def,l=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Ot(l,t,o);const c=t.seen.get(e);c.ref=l},TR=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,n.readOnly=!0},KL=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},Tv=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},AR=(e,t,n,o)=>{const i=e._zod.innerType;Ot(i,t,o);const l=t.seen.get(e);l.ref=i},jE={string:tR,number:nR,boolean:rR,bigint:BL,symbol:FL,null:oR,undefined:aR,void:$L,never:iR,any:sR,unknown:lR,date:cR,enum:uR,literal:dR,nan:VL,template_literal:HL,file:fR,success:GL,custom:hR,function:qL,transform:pR,map:ZL,set:YL,array:mR,object:gR,union:vR,intersection:yR,tuple:bR,record:_R,nullable:ER,nonoptional:SR,default:wR,prefault:xR,catch:RR,pipe:OR,readonly:TR,promise:KL,optional:Tv,lazy:AR};function FH(e,t){if("_idmap"in e){const o=e,i=Hd({...t,processors:jE}),l={};for(const f of o._idmap.entries()){const[h,g]=f;Ot(g,i)}const c={},d={registry:o,uri:t?.uri,defs:l};i.external=d;for(const f of o._idmap.entries()){const[h,g]=f;Gd(i,g),c[h]=qd(i,g)}if(Object.keys(l).length>0){const f=i.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[f]:l}}return{schemas:c}}const n=Hd({...t,processors:jE});return Ot(e,n),Gd(n,e),qd(n,e)}const WL=ie("ZodISODateTime",(e,t)=>{GN.init(e,t),jt.init(e,t)});function QL(e){return rL(WL,e)}const XL=ie("ZodISODate",(e,t)=>{qN.init(e,t),jt.init(e,t)});function JL(e){return oL(XL,e)}const eP=ie("ZodISOTime",(e,t)=>{ZN.init(e,t),jt.init(e,t)});function tP(e){return aL(eP,e)}const nP=ie("ZodISODuration",(e,t)=>{YN.init(e,t),jt.init(e,t)});function rP(e){return iL(nP,e)}const oP=(e,t)=>{Rv.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>MM(e,n)},flatten:{value:n=>IM(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xg,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xg,2)}},isEmpty:{get(){return e.issues.length===0}}})},jr=ie("ZodError",oP,{Parent:Error}),aP=Ef(jr),iP=Sf(jr),sP=wf(jr),lP=xf(jr),cP=kM(jr),uP=jM(jr),dP=zM(jr),fP=UM(jr),hP=BM(jr),pP=FM(jr),mP=$M(jr),gP=VM(jr),pt=ie("ZodType",(e,t)=>(ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Zd(e,"input"),output:Zd(e,"output")}}),e.toJSONSchema=zL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(za(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>Ua(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>aP(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>sP(e,n,o),e.parseAsync=async(n,o)=>iP(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>lP(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>cP(e,n,o),e.decode=(n,o)=>uP(e,n,o),e.encodeAsync=async(n,o)=>dP(e,n,o),e.decodeAsync=async(n,o)=>fP(e,n,o),e.safeEncode=(n,o)=>hP(e,n,o),e.safeDecode=(n,o)=>pP(e,n,o),e.safeEncodeAsync=async(n,o)=>mP(e,n,o),e.safeDecodeAsync=async(n,o)=>gP(e,n,o),e.refine=(n,o)=>e.check(d8(n,o)),e.superRefine=n=>e.check(f8(n)),e.overwrite=n=>e.check(Fs(n)),e.optional=()=>BE(e),e.exactOptional=()=>XP(e),e.nullable=()=>FE(e),e.nullish=()=>BE(FE(e)),e.nonoptional=n=>o8(e,n),e.array=()=>Tg(e),e.or=n=>$P([e,n]),e.and=n=>GP(e,n),e.transform=n=>Cg(e,PR(n)),e.default=n=>t8(e,n),e.prefault=n=>r8(e,n),e.catch=n=>i8(e,n),e.pipe=n=>Cg(e,n),e.readonly=()=>c8(e),e.describe=n=>{const o=e.clone();return Kl.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Kl.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Kl.get(e);const o=e.clone();return Kl.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),CR=ie("_ZodString",(e,t)=>{Ov.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>tR(e,o,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(_L(...o)),e.includes=(...o)=>e.check(wL(...o)),e.startsWith=(...o)=>e.check(xL(...o)),e.endsWith=(...o)=>e.check(RL(...o)),e.min=(...o)=>e.check(Vd(...o)),e.max=(...o)=>e.check(Jx(...o)),e.length=(...o)=>e.check(eR(...o)),e.nonempty=(...o)=>e.check(Vd(1,...o)),e.lowercase=o=>e.check(EL(o)),e.uppercase=o=>e.check(SL(o)),e.trim=()=>e.check(AL()),e.normalize=(...o)=>e.check(TL(...o)),e.toLowerCase=()=>e.check(CL()),e.toUpperCase=()=>e.check(IL()),e.slugify=()=>e.check(ML())}),vP=ie("ZodString",(e,t)=>{Ov.init(e,t),CR.init(e,t),e.email=n=>e.check(jD(yP,n)),e.url=n=>e.check(Xx(IR,n)),e.jwt=n=>e.check(nL(DP,n)),e.emoji=n=>e.check($D(bP,n)),e.guid=n=>e.check(DE(zE,n)),e.uuid=n=>e.check(zD(rd,n)),e.uuidv4=n=>e.check(UD(rd,n)),e.uuidv6=n=>e.check(BD(rd,n)),e.uuidv7=n=>e.check(FD(rd,n)),e.nanoid=n=>e.check(VD(_P,n)),e.guid=n=>e.check(DE(zE,n)),e.cuid=n=>e.check(HD(EP,n)),e.cuid2=n=>e.check(GD(SP,n)),e.ulid=n=>e.check(qD(wP,n)),e.base64=n=>e.check(JD(IP,n)),e.base64url=n=>e.check(eL(MP,n)),e.xid=n=>e.check(ZD(xP,n)),e.ksuid=n=>e.check(YD(RP,n)),e.ipv4=n=>e.check(KD(OP,n)),e.ipv6=n=>e.check(WD(TP,n)),e.cidrv4=n=>e.check(QD(AP,n)),e.cidrv6=n=>e.check(XD(CP,n)),e.e164=n=>e.check(tL(NP,n)),e.datetime=n=>e.check(QL(n)),e.date=n=>e.check(JL(n)),e.time=n=>e.check(tP(n)),e.duration=n=>e.check(rP(n))});function He(e){return kD(vP,e)}const jt=ie("ZodStringFormat",(e,t)=>{Lt.init(e,t),CR.init(e,t)}),yP=ie("ZodEmail",(e,t)=>{kN.init(e,t),jt.init(e,t)}),zE=ie("ZodGUID",(e,t)=>{LN.init(e,t),jt.init(e,t)}),rd=ie("ZodUUID",(e,t)=>{PN.init(e,t),jt.init(e,t)}),IR=ie("ZodURL",(e,t)=>{jN.init(e,t),jt.init(e,t)});function $H(e){return Xx(IR,e)}const bP=ie("ZodEmoji",(e,t)=>{zN.init(e,t),jt.init(e,t)}),_P=ie("ZodNanoID",(e,t)=>{UN.init(e,t),jt.init(e,t)}),EP=ie("ZodCUID",(e,t)=>{BN.init(e,t),jt.init(e,t)}),SP=ie("ZodCUID2",(e,t)=>{FN.init(e,t),jt.init(e,t)}),wP=ie("ZodULID",(e,t)=>{$N.init(e,t),jt.init(e,t)}),xP=ie("ZodXID",(e,t)=>{VN.init(e,t),jt.init(e,t)}),RP=ie("ZodKSUID",(e,t)=>{HN.init(e,t),jt.init(e,t)}),OP=ie("ZodIPv4",(e,t)=>{KN.init(e,t),jt.init(e,t)}),TP=ie("ZodIPv6",(e,t)=>{WN.init(e,t),jt.init(e,t)}),AP=ie("ZodCIDRv4",(e,t)=>{QN.init(e,t),jt.init(e,t)}),CP=ie("ZodCIDRv6",(e,t)=>{XN.init(e,t),jt.init(e,t)}),IP=ie("ZodBase64",(e,t)=>{JN.init(e,t),jt.init(e,t)}),MP=ie("ZodBase64URL",(e,t)=>{tD.init(e,t),jt.init(e,t)}),NP=ie("ZodE164",(e,t)=>{nD.init(e,t),jt.init(e,t)}),DP=ie("ZodJWT",(e,t)=>{oD.init(e,t),jt.init(e,t)}),Av=ie("ZodNumber",(e,t)=>{Zx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>nR(e,o,i),e.gt=(o,i)=>e.check(PE(o,i)),e.gte=(o,i)=>e.check(Rd(o,i)),e.min=(o,i)=>e.check(Rd(o,i)),e.lt=(o,i)=>e.check(LE(o,i)),e.lte=(o,i)=>e.check(xd(o,i)),e.max=(o,i)=>e.check(xd(o,i)),e.int=o=>e.check(UE(o)),e.safe=o=>e.check(UE(o)),e.positive=o=>e.check(PE(0,o)),e.nonnegative=o=>e.check(Rd(0,o)),e.negative=o=>e.check(LE(0,o)),e.nonpositive=o=>e.check(xd(0,o)),e.multipleOf=(o,i)=>e.check(kE(o,i)),e.step=(o,i)=>e.check(kE(o,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function MR(e){return sL(Av,e)}const LP=ie("ZodNumberFormat",(e,t)=>{aD.init(e,t),Av.init(e,t)});function UE(e){return cL(LP,e)}const NR=ie("ZodBoolean",(e,t)=>{iD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>rR(e,n,o)});function Cv(e){return uL(NR,e)}const PP=ie("ZodUndefined",(e,t)=>{sD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>aR(e,n)});function VH(e){return fL(PP,e)}const kP=ie("ZodNull",(e,t)=>{lD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>oR(e,n,o)});function HH(e){return hL(kP,e)}const jP=ie("ZodAny",(e,t)=>{cD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>sR()});function GH(){return pL(jP)}const zP=ie("ZodUnknown",(e,t)=>{uD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>lR()});function Og(){return mL(zP)}const UP=ie("ZodNever",(e,t)=>{dD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>iR(e,n,o)});function DR(e){return gL(UP,e)}const BP=ie("ZodDate",(e,t)=>{fD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>cR(e,o),e.min=(o,i)=>e.check(Rd(o,i)),e.max=(o,i)=>e.check(xd(o,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qH(e){return vL(BP,e)}const FP=ie("ZodArray",(e,t)=>{hD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>mR(e,n,o,i),e.element=t.element,e.min=(n,o)=>e.check(Vd(n,o)),e.nonempty=n=>e.check(Vd(1,n)),e.max=(n,o)=>e.check(Jx(n,o)),e.length=(n,o)=>e.check(eR(n,o)),e.unwrap=()=>e.element});function Tg(e,t){return NL(FP,e,t)}const Iv=ie("ZodObject",(e,t)=>{mD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>gR(e,n,o,i),at(e,"shape",()=>t.shape),e.keyof=()=>Of(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Og()}),e.loose=()=>e.clone({...e._zod.def,catchall:Og()}),e.strict=()=>e.clone({...e._zod.def,catchall:DR()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>RM(e,n),e.safeExtend=n=>OM(e,n),e.merge=n=>TM(e,n),e.pick=n=>wM(e,n),e.omit=n=>xM(e,n),e.partial=(...n)=>AM(kR,e,n[0]),e.required=(...n)=>CM(jR,e,n[0])});function bn(e,t){const n={type:"object",shape:e??{},...Oe(t)};return new Iv(n)}function ZH(e,t){return new Iv({type:"object",shape:e,catchall:DR(),...Oe(t)})}function YH(e,t){return new Iv({type:"object",shape:e,catchall:Og(),...Oe(t)})}const LR=ie("ZodUnion",(e,t)=>{Wx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>vR(e,n,o,i),e.options=t.options});function $P(e,t){return new LR({type:"union",options:e,...Oe(t)})}const VP=ie("ZodDiscriminatedUnion",(e,t)=>{LR.init(e,t),gD.init(e,t)});function KH(e,t,n){return new VP({type:"union",options:t,discriminator:e,...Oe(n)})}const HP=ie("ZodIntersection",(e,t)=>{vD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>yR(e,n,o,i)});function GP(e,t){return new HP({type:"intersection",left:e,right:t})}const qP=ie("ZodTuple",(e,t)=>{yD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>bR(e,n,o,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function WH(e,t,n){const o=t instanceof ft,i=o?n:t,l=o?t:null;return new qP({type:"tuple",items:e,rest:l,...Oe(i)})}const ZP=ie("ZodRecord",(e,t)=>{bD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>_R(e,n,o,i),e.keyType=t.keyType,e.valueType=t.valueType});function QH(e,t,n){return new ZP({type:"record",keyType:e,valueType:t,...Oe(n)})}const Ag=ie("ZodEnum",(e,t)=>{_D.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>uR(e,o,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,i)=>{const l={};for(const c of o)if(n.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new Ag({...t,checks:[],...Oe(i),entries:l})},e.exclude=(o,i)=>{const l={...t.entries};for(const c of o)if(n.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new Ag({...t,checks:[],...Oe(i),entries:l})}});function Of(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Ag({type:"enum",entries:n,...Oe(t)})}const YP=ie("ZodLiteral",(e,t)=>{ED.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>dR(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function XH(e,t){return new YP({type:"literal",values:Array.isArray(e)?e:[e],...Oe(t)})}const KP=ie("ZodFile",(e,t)=>{SD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>fR(e,n,o),e.min=(n,o)=>e.check(bL(n,o)),e.max=(n,o)=>e.check(yL(n,o)),e.mime=(n,o)=>e.check(OL(Array.isArray(n)?n:[n],o))});function JH(e){return DL(KP,e)}const WP=ie("ZodTransform",(e,t)=>{wD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>pR(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Nx(e.constructor.name);n.addIssue=l=>{if(typeof l=="string")n.issues.push(lc(l,n.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(lc(c))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(l=>(n.value=l,n)):(n.value=i,n)}});function PR(e){return new WP({type:"transform",transform:e})}const kR=ie("ZodOptional",(e,t)=>{Qx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Tv(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function BE(e){return new kR({type:"optional",innerType:e})}const QP=ie("ZodExactOptional",(e,t)=>{xD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Tv(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function XP(e){return new QP({type:"optional",innerType:e})}const JP=ie("ZodNullable",(e,t)=>{RD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>ER(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function FE(e){return new JP({type:"nullable",innerType:e})}const e8=ie("ZodDefault",(e,t)=>{OD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>wR(e,n,o,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function t8(e,t){return new e8({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():kx(t)}})}const n8=ie("ZodPrefault",(e,t)=>{TD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>xR(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function r8(e,t){return new n8({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():kx(t)}})}const jR=ie("ZodNonOptional",(e,t)=>{AD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>SR(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function o8(e,t){return new jR({type:"nonoptional",innerType:e,...Oe(t)})}const a8=ie("ZodCatch",(e,t)=>{CD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>RR(e,n,o,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function i8(e,t){return new a8({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const s8=ie("ZodPipe",(e,t)=>{ID.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>OR(e,n,o,i),e.in=t.in,e.out=t.out});function Cg(e,t){return new s8({type:"pipe",in:e,out:t})}const l8=ie("ZodReadonly",(e,t)=>{MD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>TR(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function c8(e){return new l8({type:"readonly",innerType:e})}const u8=ie("ZodLazy",(e,t)=>{ND.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>AR(e,n,o,i),e.unwrap=()=>e._zod.def.getter()});function Ba(e){return new u8({type:"lazy",getter:e})}const Mv=ie("ZodCustom",(e,t)=>{DD.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>hR(e,n)});function eG(e,t){return LL(Mv,e??(()=>!0),t)}function d8(e,t={}){return PL(Mv,e,t)}function f8(e){return kL(e)}function tG(e,t={}){const n=new Mv({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...Oe(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}function h8(e,t){return Cg(PR(e),t)}function p8(e){return lL(Av,e)}function $E(e){return dL(NR,e)}function fe(...e){return gM(bx(e))}function m8(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function kt({error:e,localization:t,localizeErrors:n=!0}){var o;const i="Request failed";if(!n)return e?.message?e.message:(o=e?.error)!=null&&o.message?e.error.message:i;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||i}function Ri(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Ig(e,t){for(const n in e)if(e[n]===t)return n}function cc(e,t){let n=He().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 g8={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"},v8={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"},y8={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."},b8={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."},_8={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},E8={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},S8={..._8,...E8},w8={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},x8={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},R8={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},O8={INVALID_SESSION_TOKEN:"Invalid session token"},T8={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"},A8={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"},C8={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"},I8={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"},M8={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"},N8={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"},D8={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"},L8={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_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",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",...b8,...g8,...v8,...y8,...S8,...w8,...x8,...R8,...O8,...T8,...A8,...C8,...I8,...M8,...N8,...D8},P8={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"},VE={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},HE={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function k8(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 j8=e=>{switch(e){case"success":return B8;case"info":return $8;case"warning":return F8;case"error":return V8;default:return null}},z8=Array(12).fill(0),U8=({visible:e,className:t})=>$.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},$.createElement("div",{className:"sonner-spinner"},z8.map((n,o)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),B8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),F8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.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"})),$8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),V8=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),H8=$.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"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),G8=()=>{const[e,t]=$.useState(document.hidden);return $.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Mg=1;class q8{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:o,...i}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Mg++,c=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:o}),{...f,...t,id:l,dismissible:d,title:o}):f):this.addToast({title:o,...i,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(o=>o({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 o;n.loading!==void 0&&(o=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let l=o!==void 0,c;const d=i.then(async h=>{if(c=["resolve",h],$.isValidElement(h))l=!1,this.create({id:o,type:"default",message:h});else if(Y8(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"&&!$.isValidElement(p)?p:{message:p};this.create({id:o,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"&&!$.isValidElement(p)?p:{message:p};this.create({id:o,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"&&!$.isValidElement(p)?p:{message:p};this.create({id:o,type:"success",description:y,...S})}}).catch(async h=>{if(c=["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"&&!$.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(o),o=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,g)=>d.then(()=>c[0]==="reject"?g(c[1]):h(c[1])).catch(g));return typeof o!="string"&&typeof o!="number"?{unwrap:f}:Object.assign(o,{unwrap:f})},this.custom=(t,n)=>{const o=n?.id||Mg++;return this.create({jsx:t(o),id:o,...n}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Wn=new q8,Z8=(e,t)=>{const n=t?.id||Mg++;return Wn.addToast({title:e,...t,id:n}),n},Y8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",K8=Z8,W8=()=>Wn.toasts,Q8=()=>Wn.getActiveToasts(),GE=Object.assign(K8,{success:Wn.success,info:Wn.info,warning:Wn.warning,error:Wn.error,custom:Wn.custom,message:Wn.message,promise:Wn.promise,dismiss:Wn.dismiss,loading:Wn.loading},{getHistory:W8,getToasts:Q8});k8("[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 X8=3,J8="24px",e7="16px",qE=4e3,t7=356,n7=14,r7=45,o7=200;function ao(...e){return e.filter(Boolean).join(" ")}function a7(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}const i7=e=>{var t,n,o,i,l,c,d,f,h;const{invert:g,toast:p,unstyled:y,interacting:_,setHeights:S,visibleToasts:w,heights:T,index:R,toasts:A,expanded:C,removeToast:O,defaultRichColors:M,closeButton:L,style:N,cancelButtonStyle:D,actionButtonStyle:z,className:W="",descriptionClassName:G="",duration:K,position:j,gap:ne,expandByDefault:ae,classNames:P,icons:F,closeButtonAriaLabel:H="Close toast"}=e,[re,ye]=$.useState(null),[k,Q]=$.useState(null),[ee,se]=$.useState(!1),[me,_e]=$.useState(!1),[be,Se]=$.useState(!1),[De,Le]=$.useState(!1),[Ee,ze]=$.useState(!1),[Nt,ve]=$.useState(0),[ge,Re]=$.useState(0),ke=$.useRef(p.duration||K||qE),et=$.useRef(null),Ue=$.useRef(null),We=R===0,U=R+1<=w,q=p.type,Z=p.dismissible!==!1,ue=p.className||"",pe=p.descriptionClassName||"",he=$.useMemo(()=>T.findIndex(Me=>Me.toastId===p.id)||0,[T,p.id]),xe=$.useMemo(()=>{var Me;return(Me=p.closeButton)!=null?Me:L},[p.closeButton,L]),Be=$.useMemo(()=>p.duration||K||qE,[p.duration,K]),Qe=$.useRef(0),wt=$.useRef(0),tr=$.useRef(0),Tt=$.useRef(null),[Zt,At]=j.split("-"),on=$.useMemo(()=>T.reduce((Me,Ye,xt)=>xt>=he?Me:Me+Ye.height,0),[T,he]),Yt=G8(),Yo=p.invert||g,So=q==="loading";wt.current=$.useMemo(()=>he*ne+on,[he,on]),$.useEffect(()=>{ke.current=Be},[Be]),$.useEffect(()=>{se(!0)},[]),$.useEffect(()=>{const Me=Ue.current;if(Me){const Ye=Me.getBoundingClientRect().height;return Re(Ye),S(xt=>[{toastId:p.id,height:Ye,position:p.position},...xt]),()=>S(xt=>xt.filter(yt=>yt.toastId!==p.id))}},[S,p.id]),$.useLayoutEffect(()=>{if(!ee)return;const Me=Ue.current,Ye=Me.style.height;Me.style.height="auto";const xt=Me.getBoundingClientRect().height;Me.style.height=Ye,Re(xt),S(yt=>yt.find(lt=>lt.toastId===p.id)?yt.map(lt=>lt.toastId===p.id?{...lt,height:xt}:lt):[{toastId:p.id,height:xt,position:p.position},...yt])},[ee,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Ie=$.useCallback(()=>{_e(!0),ve(wt.current),S(Me=>Me.filter(Ye=>Ye.toastId!==p.id)),setTimeout(()=>{O(p)},o7)},[p,O,S,wt]);$.useEffect(()=>{if(p.promise&&q==="loading"||p.duration===1/0||p.type==="loading")return;let Me;return C||_||Yt?(()=>{if(tr.current<Qe.current){const yt=new Date().getTime()-Qe.current;ke.current=ke.current-yt}tr.current=new Date().getTime()})():ke.current!==1/0&&(Qe.current=new Date().getTime(),Me=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ie()},ke.current)),()=>clearTimeout(Me)},[C,_,p,q,Yt,Ie]),$.useEffect(()=>{p.delete&&(Ie(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ie,p.delete]);function tt(){var Me;if(F?.loading){var Ye;return $.createElement("div",{className:ao(P?.loader,p==null||(Ye=p.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":q==="loading"},F.loading)}return $.createElement(U8,{className:ao(P?.loader,p==null||(Me=p.classNames)==null?void 0:Me.loader),visible:q==="loading"})}const it=p.icon||F?.[q]||j8(q);var Ze,st;return $.createElement("li",{tabIndex:0,ref:Ue,className:ao(W,ue,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":(Ze=p.richColors)!=null?Ze:M,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":ee,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":me,"data-visible":U,"data-y-position":Zt,"data-x-position":At,"data-index":R,"data-front":We,"data-swiping":be,"data-dismissible":Z,"data-type":q,"data-invert":Yo,"data-swipe-out":De,"data-swipe-direction":k,"data-expanded":!!(C||ae&&ee),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":A.length-R,"--offset":`${me?Nt:wt.current}px`,"--initial-height":ae?"auto":`${ge}px`,...N,...p.style},onDragEnd:()=>{Se(!1),ye(null),Tt.current=null},onPointerDown:Me=>{Me.button!==2&&(So||!Z||(et.current=new Date,ve(wt.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(Se(!0),Tt.current={x:Me.clientX,y:Me.clientY})))},onPointerUp:()=>{var Me,Ye,xt;if(De||!Z)return;Tt.current=null;const yt=Number(((Me=Ue.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),In=Number(((Ye=Ue.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),lt=new Date().getTime()-((xt=et.current)==null?void 0:xt.getTime()),Ct=re==="x"?yt:In,br=Math.abs(Ct)/lt;if(Math.abs(Ct)>=r7||br>.11){ve(wt.current),p.onDismiss==null||p.onDismiss.call(p,p),Q(re==="x"?yt>0?"right":"left":In>0?"down":"up"),Ie(),Le(!0);return}else{var _n,Bn;(_n=Ue.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(Bn=Ue.current)==null||Bn.style.setProperty("--swipe-amount-y","0px")}ze(!1),Se(!1),ye(null)},onPointerMove:Me=>{var Ye,xt,yt;if(!Tt.current||!Z||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;const lt=Me.clientY-Tt.current.y,Ct=Me.clientX-Tt.current.x;var br;const _n=(br=e.swipeDirections)!=null?br:a7(j);!re&&(Math.abs(Ct)>1||Math.abs(lt)>1)&&ye(Math.abs(Ct)>Math.abs(lt)?"x":"y");let Bn={x:0,y:0};const Ai=Ur=>1/(1.5+Math.abs(Ur)/20);if(re==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&<<0||_n.includes("bottom")&<>0)Bn.y=lt;else{const Ur=lt*Ai(lt);Bn.y=Math.abs(Ur)<Math.abs(lt)?Ur:lt}}else if(re==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Ct<0||_n.includes("right")&&Ct>0)Bn.x=Ct;else{const Ur=Ct*Ai(Ct);Bn.x=Math.abs(Ur)<Math.abs(Ct)?Ur:Ct}(Math.abs(Bn.x)>0||Math.abs(Bn.y)>0)&&ze(!0),(xt=Ue.current)==null||xt.style.setProperty("--swipe-amount-x",`${Bn.x}px`),(yt=Ue.current)==null||yt.style.setProperty("--swipe-amount-y",`${Bn.y}px`)}},xe&&!p.jsx&&q!=="loading"?$.createElement("button",{"aria-label":H,"data-disabled":So,"data-close-button":!0,onClick:So||!Z?()=>{}:()=>{Ie(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ao(P?.closeButton,p==null||(o=p.classNames)==null?void 0:o.closeButton)},(st=F?.close)!=null?st:H8):null,(q||p.icon||p.promise)&&p.icon!==null&&(F?.[q]!==null||p.icon)?$.createElement("div",{"data-icon":"",className:ao(P?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tt():null,p.type!=="loading"?it:null):null,$.createElement("div",{"data-content":"",className:ao(P?.content,p==null||(l=p.classNames)==null?void 0:l.content)},$.createElement("div",{"data-title":"",className:ao(P?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?$.createElement("div",{"data-description":"",className:ao(G,pe,P?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),$.isValidElement(p.cancel)?p.cancel:p.cancel&&od(p.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Me=>{od(p.cancel)&&Z&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Me),Ie())},className:ao(P?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,$.isValidElement(p.action)?p.action:p.action&&od(p.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:Me=>{od(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Me),!Me.defaultPrevented&&Ie())},className:ao(P?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function ZE(){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 s7(e,t){const n={};return[e,t].forEach((o,i)=>{const l=i===1,c=l?"--mobile-offset":"--offset",d=l?e7:J8;function f(h){["top","right","bottom","left"].forEach(g=>{n[`${c}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof o=="number"||typeof o=="string"?f(o):typeof o=="object"?["top","right","bottom","left"].forEach(h=>{o[h]===void 0?n[`${c}-${h}`]=d:n[`${c}-${h}`]=typeof o[h]=="number"?`${o[h]}px`:o[h]}):f(d)}),n}const l7=$.forwardRef(function(t,n){const{id:o,invert:i,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:g,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:w,visibleToasts:T=X8,toastOptions:R,dir:A=ZE(),gap:C=n7,icons:O,containerAriaLabel:M="Notifications"}=t,[L,N]=$.useState([]),D=$.useMemo(()=>o?L.filter(ee=>ee.toasterId===o):L.filter(ee=>!ee.toasterId),[L,o]),z=$.useMemo(()=>Array.from(new Set([l].concat(D.filter(ee=>ee.position).map(ee=>ee.position)))),[D,l]),[W,G]=$.useState([]),[K,j]=$.useState(!1),[ne,ae]=$.useState(!1),[P,F]=$.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=$.useRef(null),re=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=$.useRef(null),k=$.useRef(!1),Q=$.useCallback(ee=>{N(se=>{var me;return(me=se.find(_e=>_e.id===ee.id))!=null&&me.delete||Wn.dismiss(ee.id),se.filter(({id:_e})=>_e!==ee.id)})},[]);return $.useEffect(()=>Wn.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{N(se=>se.map(me=>me.id===ee.id?{...me,delete:!0}:me))});return}setTimeout(()=>{ex.flushSync(()=>{N(se=>{const me=se.findIndex(_e=>_e.id===ee.id);return me!==-1?[...se.slice(0,me),{...se[me],...ee},...se.slice(me+1)]:[ee,...se]})})})}),[L]),$.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:se})=>{F(se?"dark":"light")})}catch{ee.addListener(({matches:me})=>{try{F(me?"dark":"light")}catch(_e){console.error(_e)}})}},[y]),$.useEffect(()=>{L.length<=1&&j(!1)},[L]),$.useEffect(()=>{const ee=se=>{var me;if(c.every(Se=>se[Se]||se.code===Se)){var be;j(!0),(be=H.current)==null||be.focus()}se.code==="Escape"&&(document.activeElement===H.current||(me=H.current)!=null&&me.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[c]),$.useEffect(()=>{if(H.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,k.current=!1)}},[H.current]),$.createElement("section",{ref:n,"aria-label":`${M} ${re}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((ee,se)=>{var me;const[_e,be]=ee.split("-");return D.length?$.createElement("ol",{key:ee,dir:A==="auto"?ZE():A,tabIndex:-1,ref:H,className:h,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":_e,"data-x-position":be,style:{"--front-toast-height":`${((me=W[0])==null?void 0:me.height)||0}px`,"--width":`${t7}px`,"--gap":`${C}px`,...w,...s7(g,p)},onBlur:Se=>{k.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(k.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||k.current||(k.current=!0,ye.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"||ae(!0)},onPointerUp:()=>ae(!1)},D.filter(Se=>!Se.position&&se===0||Se.position===ee).map((Se,De)=>{var Le,Ee;return $.createElement(i7,{key:Se.id,icons:O,index:De,toast:Se,defaultRichColors:_,duration:(Le=R?.duration)!=null?Le:S,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:i,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:W.filter(ze=>ze.position==Se.position),setHeights:G,expandByDefault:d,gap:C,expanded:K,swipeDirections:t.swipeDirections})})):null}))}),zR=E.createContext({});function UR(){return E.useContext(zR)}var Am,YE;function c7(){if(YE)return Am;YE=1;var e=function(){};return Am=e,Am}var u7=c7();const d7=wi(u7);function f7({async:e,appendTo:t,defer:n,id:o,nonce:i,src:l}){const c=document.createElement("script");e!==void 0&&(c.async=e),n!==void 0&&(c.defer=n),o&&(c.id=o),i&&c.setAttribute("nonce",i),c.src=l,(t==="head"?document.head:document.body).appendChild(c)}var h7=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};let ec=null,uc=!1;const Yd=new Set,Kd=new Set,p7=typeof window<"u",Cs="___grecaptcha_cfg",BR=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function m7(){if(!p7)return;function e(n){if(uc)n();else{window[Cs]||(window[Cs]={});const o=window[Cs];o.fns||(o.fns=[]),o.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){uc=!0;for(const n of Kd)n();Kd.clear()}window[BR]=t}function g7({language:e,onLoadCallbackName:t,render:n,useEnterprise:o=!1,useRecaptchaNet:i=!1}){const l=i?"recaptcha.net":"google.com",c=o?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${c}?${d.toString()}`}function v7({language:e,render:t,scriptProps:n,useEnterprise:o,useRecaptchaNet:i}){const l={id:"google-recaptcha-v3"},c=g7({language:e,onLoadCallbackName:BR,render:t,useEnterprise:o,useRecaptchaNet:i});if(ec){if(ec!==c)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}ec=c,f7(Object.assign(Object.assign(Object.assign({},l),n),{src:c}))}function y7(e){if(!window[Cs])return;const t=window[Cs];t.clients&&delete t.clients[e]}function b7(e,t){var{onLoadCallback:n,onLoadCallbackName:o}=t,i=h7(t,["onLoadCallback","onLoadCallbackName"]);if(Yd.size===0&&m7(),v7(i),Yd.add(e),n&&(uc?n():Kd.add(n)),o){let l=function(){if(!o)return;const c=window[o];typeof c=="function"&&c()};uc?l():Kd.add(l)}}function _7(e){var t,n,o;Yd.delete(e),Yd.size===0&&(window.grecaptcha=void 0,window[Cs]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${ec}"]`))===null||n===void 0||n.remove(),(o=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||o===void 0||o.remove(),ec=null,uc=!1)}let KE=!1;function E7({container:e,children:t,language:n,reCaptchaKey:o,scriptProps:i,useEnterprise:l,useRecaptchaNet:c}){var d,f,h,g,p,y,_;const S=E.useId(),[w,T]=E.useState(null),[R,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function N(){var D;const z=l?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!z)throw new Error("reCAPTCHA not found");if(!z.ready)throw new Error("reCAPTCHA ready callback not found");z.ready(()=>{T(z)})}return b7(S,{language:n,onLoadCallback:N,onLoadCallbackName:i?.onLoadCallbackName,render:e?.element?"explicit":o,scriptProps:{appendTo:i?.appendTo,async:i?.async,defer:i?.defer,id:i?.id,nonce:i?.nonce},useEnterprise:l,useRecaptchaNet:c}),()=>{_7(S),T(null)}},[e?.element,S,n,o,i?.appendTo,i?.async,i?.defer,i?.id,i?.nonce,i?.onLoadCallbackName,l,c]),E.useEffect(()=>{var N,D,z;if(!e?.element||!w?.render)return;const W={"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:o,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 K=w.render(G,W);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(KE||(d7(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),KE=!0),(z=G.querySelector(".grecaptcha-badge"))===null||z===void 0||z.style.setProperty("display","none")),A(K),C.current=!0,()=>{A(null),C.current=!1,y7(K),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,w,o]);const O=!!e?.element,M=O?R:o,L=E.useMemo(()=>M!==null&&w?.execute?N=>{if(M===null||!w?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!C.current?(console.warn("Client ID not mounted"),null):w.execute(M,{action:N})}:void 0,[M,w,O]);return b.jsx(zR.Provider,{value:{container:e?.element,executeRecaptcha:L,reCaptchaInstance:w},children:t})}var S7=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 o of n)o()}}},Ir=new S7;function w7(){return()=>{}}function qo(){return E.useSyncExternalStore(w7,()=>!0,()=>!1)}function Nv(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const i=document.documentElement.getAttribute("lang");t(i??void 0)};n();const o=new MutationObserver(i=>{for(const l of i)l.attributeName==="lang"&&n()});return o.observe(document.documentElement,{attributes:!0}),()=>{o.disconnect()}},[]),{lang:e}}function Dv(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var i;const l=document.documentElement.classList.contains("dark")||((i=document.documentElement.getAttribute("style"))==null?void 0:i.includes("color-scheme: dark"));t(l?"dark":"light")};n();const o=new MutationObserver(i=>{for(const l of i)(l.attributeName==="style"||l.attributeName==="class")&&n()});return o.observe(document.documentElement,{attributes:!0}),()=>{o.disconnect()}},[]),{theme:e}}function x7({children:e}){const t=qo(),{captcha:n}=E.useContext(qe);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(E7,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
|
|
49
|
-
.grecaptcha-badge {
|
|
50
|
-
visibility: hidden;
|
|
51
|
-
border-radius: var(--radius) !important;
|
|
52
|
-
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
53
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
54
|
-
border-style: var(--tw-border-style) !important;
|
|
55
|
-
border-width: 1px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.dark .grecaptcha-badge {
|
|
59
|
-
border-color: var(--input) !important;
|
|
60
|
-
}
|
|
61
|
-
`}),b.jsx(R7,{}),e]})}function R7(){const{executeRecaptcha:e}=UR(),{theme:t}=Dv(),{lang:n}=Nv();return E.useEffect(()=>{if(!e)return;(async()=>{const i=document.querySelector("iframe[title='reCAPTCHA']");if(i){const l=new URL(i.src);l.searchParams.set("theme",t),n&&l.searchParams.set("hl",n),i.src=l.toString()}})()},[e,t,n]),null}function O7({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:o}}=E.useContext(qe),{pathMode:i,slug:l}=t||{};let c,d,f,h;const{data:g,isPending:p,isRefetching:y}=o();if(i==="slug"){const _=e||l;c=g?.find(S=>S.slug===_),d=p,f=y}else{const{data:_,isPending:S,isRefetching:w,refetch:T}=n();h=T,c=_,d=S,f=w}return E.useMemo(()=>({data:c,isPending:d,isRefetching:f,refetch:h}),[c,d,f,h])}var T7=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:o,redirectTo:i}=E.useContext(qe),{slug:l,pathMode:c,personalPath:d}=n||{},{data:f}=t(),{data:h,isPending:g,isRefetching:p,refetch:y}=O7(),{refetch:_}=e(),{data:S}=e();return E.useEffect(()=>{f?.user.id&&(h||S)&&(y?.(),_?.())},[f?.user.id]),E.useEffect(()=>{p||g||l&&c==="slug"&&!h&&o(d||i)},[h,p,g,l,c,d,o,i]),null},A7=({href:e,className:t,children:n})=>b.jsx("a",{className:t,href:e,children:n}),C7=e=>{window.location.href=e},I7=e=>{window.location.replace(e)},M7=({variant:e="default",message:t})=>{e==="default"?GE(t):GE[e](t)},qe=E.createContext({}),N7=({children:e,authClient:t,account:n,avatar:o,deleteUser:i,social:l,genericOAuth:c,basePath:d="/auth",baseURL:f="",captcha:h,redirectTo:g="/",credentials:p,changeEmail:y=!0,freshAge:_=3600*24,hooks:S,mutators:w,localization:T,localizeErrors:R=!0,nameRequired:A=!0,organization:C,teams:O,signUp:M=!0,toast:L=M7,viewPaths:N,navigate:D,replace:z,Link:W=A7,emailVerification:G,...K})=>{const j=t,ne=E.useMemo(()=>{if(o)return o===!0?{extension:"png",size:128}:{upload:o.upload,delete:o.delete,extension:o.extension||"png",size:o.size||(o.upload?256:128),Image:o.Image}},[o]),ae=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:VE}:{basePath:((Ee=n.basePath)!=null&&Ee.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...VE,...n.viewPaths}}},[n]),F=E.useMemo(()=>{if(i)return i===!0?{}:i},[i]),H=E.useMemo(()=>{if(l)return l},[l]),re=E.useMemo(()=>{if(c)return c},[c]),ye=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:HE,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 Nt=(Ee=C.basePath)!=null&&Ee.endsWith("/")?C.basePath.slice(0,-1):C.basePath;return{...C,logo:ze,basePath:Nt??"/organization",customRoles:C.customRoles||[],viewPaths:{...HE,...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]),se=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]),me=E.useMemo(()=>({useSession:j.useSession,useListAccounts:()=>cr({queryFn:j.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Ee=>cr({queryFn:()=>j.accountInfo(Ee),cacheKey:`accountInfo:${JSON.stringify(Ee)}`}),useListDeviceSessions:()=>cr({queryFn:j.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>cr({queryFn:j.listSessions,cacheKey:"listSessions"}),useListPasskeys:j.useListPasskeys,useListApiKeys:()=>cr({queryFn:j.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:j.useActiveOrganization,useListOrganizations:j.useListOrganizations,useHasPermission:Ee=>cr({queryFn:()=>j.$fetch("/organization/has-permission",{method:"POST",body:Ee}),cacheKey:`hasPermission:${JSON.stringify(Ee)}`}),useInvitation:Ee=>cr({queryFn:()=>j.organization.getInvitation(Ee),cacheKey:`invitation:${JSON.stringify(Ee)}`}),useListInvitations:Ee=>cr({queryFn:()=>{var ze;return j.$fetch(`/organization/list-invitations?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Ee)}`}),useListUserInvitations:()=>cr({queryFn:()=>j.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Ee=>cr({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=>cr({queryFn:()=>j.$fetch(`/organization/list-teams?organizationId=${Ee?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Ee)}`}),useListTeamMembers:Ee=>cr({queryFn:()=>j.$fetch("/organization/list-team-members",{method:"POST",body:Ee?.teamId?{query:{teamId:Ee.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Ee)}`}),useListUserTeams:()=>cr({queryFn:()=>j.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[j]),_e=E.useMemo(()=>({...P8,...N}),[N]),be=E.useMemo(()=>({...L8,...T}),[T]),Se=E.useMemo(()=>({...me,...S}),[me,S]),De=E.useMemo(()=>({...se,...w}),[se,w]);f=f.endsWith("/")?f.slice(0,-1):f,d=d.endsWith("/")?d.slice(0,-1):d;const{data:Le}=Se.useSession();return b.jsxs(qe.Provider,{value:{authClient:j,avatar:ne,basePath:d==="/"?"":d,baseURL:f,captcha:h,redirectTo:g,changeEmail:y,credentials:ye,deleteUser:F,emailVerification:ae,freshAge:_,genericOAuth:re,hooks:Se,mutators:De,localization:be,localizeErrors:R,nameRequired:A,organization:Q,teams:ee,account:P,signUp:k,social:H,toast:L,navigate:D||C7,replace:z||D||I7,viewPaths:_e,Link:W,...K},children:[Le&&Q&&b.jsx(T7,{}),h?.provider==="google-recaptcha-v3"?b.jsx(x7,{children:e}):e]})};function cr({queryFn:e,cacheKey:t,staleTime:n=1e4}){var o;const{hooks:{useSession:i},toast:l,localization:c,localizeErrors:d}=E.useContext(qe),{data:f,isPending:h}=i(),g=E.useRef(e);g.current=e;const p=t||e.toString(),y=E.useSyncExternalStore(E.useCallback(C=>Ir.subscribe(p,C),[p]),E.useCallback(()=>Ir.get(p),[p]),E.useCallback(()=>Ir.get(p),[p])),_=E.useRef(!1),S=E.useRef(void 0),[w,T]=E.useState(null),R=E.useCallback(async()=>{const C=Ir.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&&Ir.setRefetching(p,!0);const O=g.current();Ir.setInFlightRequest(p,O);try{const{data:M,error:L}=await O;L?(T(L),l({variant:"error",message:kt({error:L,localization:c,localizeErrors:d})})):T(null),Ir.set(p,M)}catch(M){const L=M;T(L),l({variant:"error",message:kt({error:L,localization:c,localizeErrors:d})})}finally{Ir.setRefetching(p,!1),Ir.removeInFlightRequest(p)}},[p,l,c,d,y]);E.useEffect(()=>{var C;const O=(C=f?.user)==null?void 0:C.id;if(!f){Ir.setRefetching(p,!1),Ir.clear(p),_.current=!1,S.current=void 0;return}const M=S.current!==void 0&&S.current!==O;M&&Ir.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,(o=f?.user)==null?void 0:o.id,p,R,y,n]);const A=h||y?.data===void 0&&!w;return{data:y?.data??null,isPending:A,isRefetching:y?.isRefetching??!1,error:w,refetch:R}}const D7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),FR=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();var L7={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 P7=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:c,...d},f)=>E.createElement("svg",{ref:f,...L7,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:FR("lucide",i),...d},[...c.map(([h,g])=>E.createElement(h,g)),...Array.isArray(l)?l:[l]]));const Cn=(e,t)=>{const n=E.forwardRef(({className:o,...i},l)=>E.createElement(P7,{ref:l,iconNode:t,className:FR(`lucide-${D7(e)}`,o),...i}));return n.displayName=`${e}`,n};const k7=Cn("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const j7=Cn("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 Lv=Cn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const z7=Cn("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 U7=Cn("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 B7=Cn("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 F7=Cn("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 $7=Cn("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 yn=Cn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const $R=Cn("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 VR=Cn("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 V7=Cn("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const H7=Cn("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 WE=Cn("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 G7=Cn("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 q7=Cn("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const HR=Cn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var _c=e=>e.type==="checkbox",hi=e=>e instanceof Date,Xn=e=>e==null;const GR=e=>typeof e=="object";var rn=e=>!Xn(e)&&!Array.isArray(e)&&GR(e)&&!hi(e),qR=e=>rn(e)&&e.target?_c(e.target)?e.target.checked:e.target.value:e,Z7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ZR=(e,t)=>e.has(Z7(t)),Y7=e=>{const t=e.constructor&&e.constructor.prototype;return rn(t)&&t.hasOwnProperty("isPrototypeOf")},Pv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ln(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Pv&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(rn(e)&&Y7(e)))return e;const o=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=ln(e[i]));return o}var Tf=e=>/^\w*$/.test(e),Ft=e=>e===void 0,kv=e=>Array.isArray(e)?e.filter(Boolean):[],jv=e=>kv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),we=(e,t,n)=>{if(!t||!rn(e))return n;const o=(Tf(t)?[t]:jv(t)).reduce((i,l)=>Xn(i)?i:i[l],e);return Ft(o)||o===e?Ft(e[t])?n:e[t]:o},fr=e=>typeof e=="boolean",Un=e=>typeof e=="function",vt=(e,t,n)=>{let o=-1;const i=Tf(t)?[t]:jv(t),l=i.length,c=l-1;for(;++o<l;){const d=i[o];let f=n;if(o!==c){const h=e[d];f=rn(h)||Array.isArray(h)?h:isNaN(+i[o+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=f,e=e[d]}};const Wd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Zr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},$o={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zv=$.createContext(null);zv.displayName="HookFormContext";const Af=()=>$.useContext(zv),K7=e=>{const{children:t,...n}=e;return $.createElement(zv.Provider,{value:n},t)};var YR=(e,t,n,o=!0)=>{const i={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(i,l,{get:()=>{const c=l;return t._proxyFormState[c]!==Zr.all&&(t._proxyFormState[c]=!o||Zr.all),n&&(n[c]=!0),e[c]}});return i};const Uv=typeof window<"u"?$.useLayoutEffect:$.useEffect;function Bv(e){const t=Af(),{control:n=t.control,disabled:o,name:i,exact:l}=e||{},[c,d]=$.useState(n._formState),f=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Uv(()=>n._subscribe({name:i,formState:f.current,exact:l,callback:h=>{!o&&d({...n._formState,...h})}}),[i,o,l]),$.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),$.useMemo(()=>YR(c,n,f.current,!1),[c,n])}var mr=e=>typeof e=="string",Ng=(e,t,n,o,i)=>mr(e)?(o&&t.watch.add(e),we(n,e,i)):Array.isArray(e)?e.map(l=>(o&&t.watch.add(l),we(n,l))):(o&&(t.watchAll=!0),n),Dg=e=>Xn(e)||!GR(e);function Yr(e,t,n=new WeakSet){if(Dg(e)||Dg(t))return Object.is(e,t);if(hi(e)&&hi(t))return e.getTime()===t.getTime();const o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of o){const c=e[l];if(!i.includes(l))return!1;if(l!=="ref"){const d=t[l];if(hi(c)&&hi(d)||rn(c)&&rn(d)||Array.isArray(c)&&Array.isArray(d)?!Yr(c,d,n):!Object.is(c,d))return!1}}return!0}function W7(e){const t=Af(),{control:n=t.control,name:o,defaultValue:i,disabled:l,exact:c,compute:d}=e||{},f=$.useRef(i),h=$.useRef(d),g=$.useRef(void 0),p=$.useRef(n),y=$.useRef(o);h.current=d;const[_,S]=$.useState(()=>{const O=n._getWatch(o,f.current);return h.current?h.current(O):O}),w=$.useCallback(O=>{const M=Ng(o,n._names,O||n._formValues,!1,f.current);return h.current?h.current(M):M},[n._formValues,n._names,o]),T=$.useCallback(O=>{if(!l){const M=Ng(o,n._names,O||n._formValues,!1,f.current);if(h.current){const L=h.current(M);Yr(L,g.current)||(S(L),g.current=L)}else S(M)}},[n._formValues,n._names,l,o]);Uv(()=>((p.current!==n||!Yr(y.current,o))&&(p.current=n,y.current=o,T()),n._subscribe({name:o,formState:{values:!0},exact:c,callback:O=>{T(O.values)}})),[n,c,o,T]),$.useEffect(()=>n._removeUnmounted());const R=p.current!==n,A=y.current,C=$.useMemo(()=>{if(l)return null;const O=!R&&!Yr(A,o);return R||O?w():null},[l,R,o,A,w]);return C!==null?C:_}function Q7(e){const t=Af(),{name:n,disabled:o,control:i=t.control,shouldUnregister:l,defaultValue:c,exact:d=!0}=e,f=ZR(i._names.array,n),h=$.useMemo(()=>we(i._formValues,n,we(i._defaultValues,n,c)),[i,n,c]),g=W7({control:i,name:n,defaultValue:h,exact:d}),p=Bv({control:i,name:n,exact:d}),y=$.useRef(e),_=$.useRef(void 0),S=$.useRef(i.register(n,{...e.rules,value:g,...fr(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const w=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!we(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!we(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!we(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!we(p.validatingFields,n)},error:{enumerable:!0,get:()=>we(p.errors,n)}}),[p,n]),T=$.useCallback(O=>S.current.onChange({target:{value:qR(O),name:n},type:Wd.CHANGE}),[n]),R=$.useCallback(()=>S.current.onBlur({target:{value:we(i._formValues,n),name:n},type:Wd.BLUR}),[n,i._formValues]),A=$.useCallback(O=>{const M=we(i._fields,n);M&&M._f&&O&&(M._f.ref={focus:()=>Un(O.focus)&&O.focus(),select:()=>Un(O.select)&&O.select(),setCustomValidity:L=>Un(O.setCustomValidity)&&O.setCustomValidity(L),reportValidity:()=>Un(O.reportValidity)&&O.reportValidity()})},[i._fields,n]),C=$.useMemo(()=>({name:n,value:g,...fr(o)||p.disabled?{disabled:p.disabled||o}:{},onChange:T,onBlur:R,ref:A}),[n,o,p.disabled,T,R,A,g]);return $.useEffect(()=>{const O=i._options.shouldUnregister||l,M=_.current;M&&M!==n&&!f&&i.unregister(M),i.register(n,{...y.current.rules,...fr(y.current.disabled)?{disabled:y.current.disabled}:{}});const L=(N,D)=>{const z=we(i._fields,N);z&&z._f&&(z._f.mount=D)};if(L(n,!0),O){const N=ln(we(i._options.defaultValues,n,y.current.defaultValue));vt(i._defaultValues,n,N),Ft(we(i._formValues,n))&&vt(i._formValues,n,N)}return!f&&i.register(n),_.current=n,()=>{(f?O&&!i._state.action:O)?i.unregister(n):L(n,!1)}},[n,i,f,l]),$.useEffect(()=>{i._setDisabledField({disabled:o,name:n})},[o,n,i]),$.useMemo(()=>({field:C,formState:p,fieldState:w}),[C,p,w])}const X7=e=>e.render(Q7(e));var Fv=(e,t,n,o,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[o]:i||!0}}:{},tc=e=>Array.isArray(e)?e:[e],QE=()=>{let e=[];return{get observers(){return e},next:i=>{for(const l of e)l.next&&l.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(l=>l!==i)}}),unsubscribe:()=>{e=[]}}};function KR(e,t){const n={};for(const o in e)if(e.hasOwnProperty(o)){const i=e[o],l=t[o];if(i&&rn(i)&&l){const c=KR(i,l);rn(c)&&(n[o]=c)}else e[o]&&(n[o]=l)}return n}var zn=e=>rn(e)&&!Object.keys(e).length,$v=e=>e.type==="file",Qd=e=>{if(!Pv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},WR=e=>e.type==="select-multiple",Vv=e=>e.type==="radio",J7=e=>Vv(e)||_c(e),Cm=e=>Qd(e)&&e.isConnected;function ek(e,t){const n=t.slice(0,-1).length;let o=0;for(;o<n;)e=Ft(e)?o++:e[t[o++]];return e}function tk(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function en(e,t){const n=Array.isArray(t)?t:Tf(t)?[t]:jv(t),o=n.length===1?e:ek(e,n),i=n.length-1,l=n[i];return o&&delete o[l],i!==0&&(rn(o)&&zn(o)||Array.isArray(o)&&tk(o))&&en(e,n.slice(0,-1)),e}var nk=e=>{for(const t in e)if(Un(e[t]))return!0;return!1};function QR(e){return Array.isArray(e)||rn(e)&&!nk(e)}function Lg(e,t={}){for(const n in e){const o=e[n];QR(o)?(t[n]=Array.isArray(o)?[]:{},Lg(o,t[n])):Ft(o)||(t[n]=!0)}return t}function ws(e,t,n){n||(n=Lg(t));for(const o in e){const i=e[o];if(QR(i))Ft(t)||Dg(n[o])?n[o]=Lg(i,Array.isArray(i)?[]:{}):ws(i,Xn(t)?{}:t[o],n[o]);else{const l=t[o];n[o]=!Yr(i,l)}}return n}const XE={value:!1,isValid:!1},JE={value:!0,isValid:!0};var XR=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&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?JE:{value:e[0].value,isValid:!0}:JE:XE}return XE},JR=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:o})=>Ft(e)?e:t?e===""?NaN:e&&+e:n&&mr(e)?new Date(e):o?o(e):e;const eS={isValid:!1,value:null};var e2=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,eS):eS;function tS(e){const t=e.ref;return $v(t)?t.files:Vv(t)?e2(e.refs).value:WR(t)?[...t.selectedOptions].map(({value:n})=>n):_c(t)?XR(e.refs).value:JR(Ft(t.value)?e.ref.value:t.value,e)}var rk=(e,t,n,o)=>{const i={};for(const l of e){const c=we(t,l);c&&vt(i,l,c._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:o}},Xd=e=>e instanceof RegExp,$l=e=>Ft(e)?e:Xd(e)?e.source:rn(e)?Xd(e.value)?e.value.source:e.value:e,nS=e=>({isOnSubmit:!e||e===Zr.onSubmit,isOnBlur:e===Zr.onBlur,isOnChange:e===Zr.onChange,isOnAll:e===Zr.all,isOnTouch:e===Zr.onTouched});const rS="AsyncFunction";var ok=e=>!!e&&!!e.validate&&!!(Un(e.validate)&&e.validate.constructor.name===rS||rn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===rS)),ak=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),oS=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const nc=(e,t,n,o)=>{for(const i of n||Object.keys(e)){const l=we(e,i);if(l){const{_f:c,...d}=l;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],i)&&!o)return!0;if(c.ref&&t(c.ref,c.name)&&!o)return!0;if(nc(d,t))break}else if(rn(d)&&nc(d,t))break}}};function aS(e,t,n){const o=we(e,n);if(o||Tf(n))return{error:o,name:n};const i=n.split(".");for(;i.length;){const l=i.join("."),c=we(t,l),d=we(e,l);if(c&&!Array.isArray(c)&&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};i.pop()}return{name:n}}var ik=(e,t,n,o)=>{n(e);const{name:i,...l}=e;return zn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(c=>t[c]===(!o||Zr.all))},sk=(e,t,n)=>!e||!t||e===t||tc(e).some(o=>o&&(n?o===t:o.startsWith(t)||t.startsWith(o))),lk=(e,t,n,o,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?o.isOnBlur:i.isOnBlur)?!e:(n?o.isOnChange:i.isOnChange)?e:!0,ck=(e,t)=>!kv(we(e,t)).length&&en(e,t),uk=(e,t,n)=>{const o=tc(we(e,n));return vt(o,"root",t[n]),vt(e,n,o),e};function iS(e,t,n="validate"){if(mr(e)||Array.isArray(e)&&e.every(mr)||fr(e)&&!e)return{type:n,message:mr(e)?e:"",ref:t}}var ms=e=>rn(e)&&!Xd(e)?e:{value:e,message:""},sS=async(e,t,n,o,i,l)=>{const{ref:c,refs:d,required:f,maxLength:h,minLength:g,min:p,max:y,pattern:_,validate:S,name:w,valueAsNumber:T,mount:R}=e._f,A=we(n,w);if(!R||t.has(w))return{};const C=d?d[0]:c,O=K=>{i&&C.reportValidity&&(C.setCustomValidity(fr(K)?"":K||""),C.reportValidity())},M={},L=Vv(c),N=_c(c),D=L||N,z=(T||$v(c))&&Ft(c.value)&&Ft(A)||Qd(c)&&c.value===""||A===""||Array.isArray(A)&&!A.length,W=Fv.bind(null,w,o,M),G=(K,j,ne,ae=$o.maxLength,P=$o.minLength)=>{const F=K?j:ne;M[w]={type:K?ae:P,message:F,ref:c,...W(K?ae:P,F)}};if(l?!Array.isArray(A)||!A.length:f&&(!D&&(z||Xn(A))||fr(A)&&!A||N&&!XR(d).isValid||L&&!e2(d).isValid)){const{value:K,message:j}=mr(f)?{value:!!f,message:f}:ms(f);if(K&&(M[w]={type:$o.required,message:j,ref:C,...W($o.required,j)},!o))return O(j),M}if(!z&&(!Xn(p)||!Xn(y))){let K,j;const ne=ms(y),ae=ms(p);if(!Xn(A)&&!isNaN(A)){const P=c.valueAsNumber||A&&+A;Xn(ne.value)||(K=P>ne.value),Xn(ae.value)||(j=P<ae.value)}else{const P=c.valueAsDate||new Date(A),F=ye=>new Date(new Date().toDateString()+" "+ye),H=c.type=="time",re=c.type=="week";mr(ne.value)&&A&&(K=H?F(A)>F(ne.value):re?A>ne.value:P>new Date(ne.value)),mr(ae.value)&&A&&(j=H?F(A)<F(ae.value):re?A<ae.value:P<new Date(ae.value))}if((K||j)&&(G(!!K,ne.message,ae.message,$o.max,$o.min),!o))return O(M[w].message),M}if((h||g)&&!z&&(mr(A)||l&&Array.isArray(A))){const K=ms(h),j=ms(g),ne=!Xn(K.value)&&A.length>+K.value,ae=!Xn(j.value)&&A.length<+j.value;if((ne||ae)&&(G(ne,K.message,j.message),!o))return O(M[w].message),M}if(_&&!z&&mr(A)){const{value:K,message:j}=ms(_);if(Xd(K)&&!A.match(K)&&(M[w]={type:$o.pattern,message:j,ref:c,...W($o.pattern,j)},!o))return O(j),M}if(S){if(Un(S)){const K=await S(A,n),j=iS(K,C);if(j&&(M[w]={...j,...W($o.validate,j.message)},!o))return O(j.message),M}else if(rn(S)){let K={};for(const j in S){if(!zn(K)&&!o)break;const ne=iS(await S[j](A,n),C,j);ne&&(K={...ne,...W(j,ne.message)},O(ne.message),o&&(M[w]=K))}if(!zn(K)&&(M[w]={ref:C,...K},!o))return M}}return O(!0),M};const dk={mode:Zr.onSubmit,reValidateMode:Zr.onChange,shouldFocusError:!0};function fk(e={}){let t={...dk,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Un(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},o={},i=rn(t.defaultValues)||rn(t.values)?ln(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:ln(i),c={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:QE(),state:QE()},S=t.criteriaMode===Zr.all,w=U=>q=>{clearTimeout(h),h=setTimeout(U,q)},T=async U=>{if(!c.keepIsValid&&!t.disabled&&(p.isValid||y.isValid||U)){let q;t.resolver?(q=zn((await D()).errors),R()):q=await W(o,!0),q!==n.isValid&&_.state.next({isValid:q})}},R=(U,q)=>{!t.disabled&&(p.isValidating||p.validatingFields||y.isValidating||y.validatingFields)&&((U||Array.from(d.mount)).forEach(Z=>{Z&&(q?vt(n.validatingFields,Z,q):en(n.validatingFields,Z))}),_.state.next({validatingFields:n.validatingFields,isValidating:!zn(n.validatingFields)}))},A=(U,q=[],Z,ue,pe=!0,he=!0)=>{if(ue&&Z&&!t.disabled){if(c.action=!0,he&&Array.isArray(we(o,U))){const xe=Z(we(o,U),ue.argA,ue.argB);pe&&vt(o,U,xe)}if(he&&Array.isArray(we(n.errors,U))){const xe=Z(we(n.errors,U),ue.argA,ue.argB);pe&&vt(n.errors,U,xe),ck(n.errors,U)}if((p.touchedFields||y.touchedFields)&&he&&Array.isArray(we(n.touchedFields,U))){const xe=Z(we(n.touchedFields,U),ue.argA,ue.argB);pe&&vt(n.touchedFields,U,xe)}(p.dirtyFields||y.dirtyFields)&&(n.dirtyFields=ws(i,l)),_.state.next({name:U,isDirty:K(U,q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else vt(l,U,q)},C=(U,q)=>{vt(n.errors,U,q),_.state.next({errors:n.errors})},O=U=>{n.errors=U,_.state.next({errors:n.errors,isValid:!1})},M=(U,q,Z,ue)=>{const pe=we(o,U);if(pe){const he=we(l,U,Ft(Z)?we(i,U):Z);Ft(he)||ue&&ue.defaultChecked||q?vt(l,U,q?he:tS(pe._f)):ae(U,he),c.mount&&!c.action&&T()}},L=(U,q,Z,ue,pe)=>{let he=!1,xe=!1;const Be={name:U};if(!t.disabled){if(!Z||ue){(p.isDirty||y.isDirty)&&(xe=n.isDirty,n.isDirty=Be.isDirty=K(),he=xe!==Be.isDirty);const Qe=Yr(we(i,U),q);xe=!!we(n.dirtyFields,U),Qe?en(n.dirtyFields,U):vt(n.dirtyFields,U,!0),Be.dirtyFields=n.dirtyFields,he=he||(p.dirtyFields||y.dirtyFields)&&xe!==!Qe}if(Z){const Qe=we(n.touchedFields,U);Qe||(vt(n.touchedFields,U,Z),Be.touchedFields=n.touchedFields,he=he||(p.touchedFields||y.touchedFields)&&Qe!==Z)}he&&pe&&_.state.next(Be)}return he?Be:{}},N=(U,q,Z,ue)=>{const pe=we(n.errors,U),he=(p.isValid||y.isValid)&&fr(q)&&n.isValid!==q;if(t.delayError&&Z?(f=w(()=>C(U,Z)),f(t.delayError)):(clearTimeout(h),f=null,Z?vt(n.errors,U,Z):en(n.errors,U)),(Z?!Yr(pe,Z):pe)||!zn(ue)||he){const xe={...ue,...he&&fr(q)?{isValid:q}:{},errors:n.errors,name:U};n={...n,...xe},_.state.next(xe)}},D=async U=>(R(U,!0),await t.resolver(l,t.context,rk(U||d.mount,o,t.criteriaMode,t.shouldUseNativeValidation))),z=async U=>{const{errors:q}=await D(U);if(R(U),U)for(const Z of U){const ue=we(q,Z);ue?vt(n.errors,Z,ue):en(n.errors,Z)}else n.errors=q;return q},W=async(U,q,Z={valid:!0})=>{for(const ue in U){const pe=U[ue];if(pe){const{_f:he,...xe}=pe;if(he){const Be=d.array.has(he.name),Qe=pe._f&&ok(pe._f);Qe&&p.validatingFields&&R([he.name],!0);const wt=await sS(pe,d.disabled,l,S,t.shouldUseNativeValidation&&!q,Be);if(Qe&&p.validatingFields&&R([he.name]),wt[he.name]&&(Z.valid=!1,q))break;!q&&(we(wt,he.name)?Be?uk(n.errors,wt,he.name):vt(n.errors,he.name,wt[he.name]):en(n.errors,he.name))}!zn(xe)&&await W(xe,q,Z)}}return Z.valid},G=()=>{for(const U of d.unMount){const q=we(o,U);q&&(q._f.refs?q._f.refs.every(Z=>!Cm(Z)):!Cm(q._f.ref))&&Se(U)}d.unMount=new Set},K=(U,q)=>!t.disabled&&(U&&q&&vt(l,U,q),!Yr(k(),i)),j=(U,q,Z)=>Ng(U,d,{...c.mount?l:Ft(q)?i:mr(U)?{[U]:q}:q},Z,q),ne=U=>kv(we(c.mount?l:i,U,t.shouldUnregister?we(i,U,[]):[])),ae=(U,q,Z={})=>{const ue=we(o,U);let pe=q;if(ue){const he=ue._f;he&&(!he.disabled&&vt(l,U,JR(q,he)),pe=Qd(he.ref)&&Xn(q)?"":q,WR(he.ref)?[...he.ref.options].forEach(xe=>xe.selected=pe.includes(xe.value)):he.refs?_c(he.ref)?he.refs.forEach(xe=>{(!xe.defaultChecked||!xe.disabled)&&(Array.isArray(pe)?xe.checked=!!pe.find(Be=>Be===xe.value):xe.checked=pe===xe.value||!!pe)}):he.refs.forEach(xe=>xe.checked=xe.value===pe):$v(he.ref)?he.ref.value="":(he.ref.value=pe,he.ref.type||_.state.next({name:U,values:ln(l)})))}(Z.shouldDirty||Z.shouldTouch)&&L(U,pe,Z.shouldTouch,Z.shouldDirty,!0),Z.shouldValidate&&ye(U)},P=(U,q,Z)=>{for(const ue in q){if(!q.hasOwnProperty(ue))return;const pe=q[ue],he=U+"."+ue,xe=we(o,he);(d.array.has(U)||rn(pe)||xe&&!xe._f)&&!hi(pe)?P(he,pe,Z):ae(he,pe,Z)}},F=(U,q,Z={})=>{const ue=we(o,U),pe=d.array.has(U),he=ln(q);vt(l,U,he),pe?(_.array.next({name:U,values:ln(l)}),(p.isDirty||p.dirtyFields||y.isDirty||y.dirtyFields)&&Z.shouldDirty&&_.state.next({name:U,dirtyFields:ws(i,l),isDirty:K(U,he)})):ue&&!ue._f&&!Xn(he)?P(U,he,Z):ae(U,he,Z),oS(U,d)&&_.state.next({...n,name:U}),_.state.next({name:c.mount?U:void 0,values:ln(l)})},H=async U=>{c.mount=!0;const q=U.target;let Z=q.name,ue=!0;const pe=we(o,Z),he=Qe=>{ue=Number.isNaN(Qe)||hi(Qe)&&isNaN(Qe.getTime())||Yr(Qe,we(l,Z,Qe))},xe=nS(t.mode),Be=nS(t.reValidateMode);if(pe){let Qe,wt;const tr=q.type?tS(pe._f):qR(U),Tt=U.type===Wd.BLUR||U.type===Wd.FOCUS_OUT,Zt=!ak(pe._f)&&!t.resolver&&!we(n.errors,Z)&&!pe._f.deps||lk(Tt,we(n.touchedFields,Z),n.isSubmitted,Be,xe),At=oS(Z,d,Tt);vt(l,Z,tr),Tt?(!q||!q.readOnly)&&(pe._f.onBlur&&pe._f.onBlur(U),f&&f(0)):pe._f.onChange&&pe._f.onChange(U);const on=L(Z,tr,Tt),Yt=!zn(on)||At;if(!Tt&&_.state.next({name:Z,type:U.type,values:ln(l)}),Zt)return(p.isValid||y.isValid)&&(t.mode==="onBlur"?Tt&&T():Tt||T()),Yt&&_.state.next({name:Z,...At?{}:on});if(!Tt&&At&&_.state.next({...n}),t.resolver){const{errors:Yo}=await D([Z]);if(R([Z]),he(tr),ue){const So=aS(n.errors,o,Z),Ie=aS(Yo,o,So.name||Z);Qe=Ie.error,Z=Ie.name,wt=zn(Yo)}}else R([Z],!0),Qe=(await sS(pe,d.disabled,l,S,t.shouldUseNativeValidation))[Z],R([Z]),he(tr),ue&&(Qe?wt=!1:(p.isValid||y.isValid)&&(wt=await W(o,!0)));ue&&(pe._f.deps&&(!Array.isArray(pe._f.deps)||pe._f.deps.length>0)&&ye(pe._f.deps),N(Z,wt,Qe,on))}},re=(U,q)=>{if(we(n.errors,q)&&U.focus)return U.focus(),1},ye=async(U,q={})=>{let Z,ue;const pe=tc(U);if(t.resolver){const he=await z(Ft(U)?U:pe);Z=zn(he),ue=U?!pe.some(xe=>we(he,xe)):Z}else U?(ue=(await Promise.all(pe.map(async he=>{const xe=we(o,he);return await W(xe&&xe._f?{[he]:xe}:xe)}))).every(Boolean),!(!ue&&!n.isValid)&&T()):ue=Z=await W(o);return _.state.next({...!mr(U)||(p.isValid||y.isValid)&&Z!==n.isValid?{}:{name:U},...t.resolver||!U?{isValid:Z}:{},errors:n.errors}),q.shouldFocus&&!ue&&nc(o,re,U?pe:d.mount),ue},k=(U,q)=>{let Z={...c.mount?l:i};return q&&(Z=KR(q.dirtyFields?n.dirtyFields:n.touchedFields,Z)),Ft(U)?Z:mr(U)?we(Z,U):U.map(ue=>we(Z,ue))},Q=(U,q)=>({invalid:!!we((q||n).errors,U),isDirty:!!we((q||n).dirtyFields,U),error:we((q||n).errors,U),isValidating:!!we(n.validatingFields,U),isTouched:!!we((q||n).touchedFields,U)}),ee=U=>{U&&tc(U).forEach(q=>en(n.errors,q)),_.state.next({errors:U?n.errors:{}})},se=(U,q,Z)=>{const ue=(we(o,U,{_f:{}})._f||{}).ref,pe=we(n.errors,U)||{},{ref:he,message:xe,type:Be,...Qe}=pe;vt(n.errors,U,{...Qe,...q,ref:ue}),_.state.next({name:U,errors:n.errors,isValid:!1}),Z&&Z.shouldFocus&&ue&&ue.focus&&ue.focus()},me=(U,q)=>Un(U)?_.state.subscribe({next:Z=>"values"in Z&&U(j(void 0,q),Z)}):j(U,q,!0),_e=U=>_.state.subscribe({next:q=>{sk(U.name,q.name,U.exact)&&ik(q,U.formState||p,et,U.reRenderRoot)&&U.callback({values:{...l},...n,...q,defaultValues:i})}}).unsubscribe,be=U=>(c.mount=!0,y={...y,...U.formState},_e({...U,formState:{...g,...U.formState}})),Se=(U,q={})=>{for(const Z of U?tc(U):d.mount)d.mount.delete(Z),d.array.delete(Z),q.keepValue||(en(o,Z),en(l,Z)),!q.keepError&&en(n.errors,Z),!q.keepDirty&&en(n.dirtyFields,Z),!q.keepTouched&&en(n.touchedFields,Z),!q.keepIsValidating&&en(n.validatingFields,Z),!t.shouldUnregister&&!q.keepDefaultValue&&en(i,Z);_.state.next({values:ln(l)}),_.state.next({...n,...q.keepDirty?{isDirty:K()}:{}}),!q.keepIsValid&&T()},De=({disabled:U,name:q})=>{(fr(U)&&c.mount||U||d.disabled.has(q))&&(U?d.disabled.add(q):d.disabled.delete(q))},Le=(U,q={})=>{let Z=we(o,U);const ue=fr(q.disabled)||fr(t.disabled);return vt(o,U,{...Z||{},_f:{...Z&&Z._f?Z._f:{ref:{name:U}},name:U,mount:!0,...q}}),d.mount.add(U),Z?De({disabled:fr(q.disabled)?q.disabled:t.disabled,name:U}):M(U,!0,q.value),{...ue?{disabled:q.disabled||t.disabled}:{},...t.progressive?{required:!!q.required,min:$l(q.min),max:$l(q.max),minLength:$l(q.minLength),maxLength:$l(q.maxLength),pattern:$l(q.pattern)}:{},name:U,onChange:H,onBlur:H,ref:pe=>{if(pe){Le(U,q),Z=we(o,U);const he=Ft(pe.value)&&pe.querySelectorAll&&pe.querySelectorAll("input,select,textarea")[0]||pe,xe=J7(he),Be=Z._f.refs||[];if(xe?Be.find(Qe=>Qe===he):he===Z._f.ref)return;vt(o,U,{_f:{...Z._f,...xe?{refs:[...Be.filter(Cm),he,...Array.isArray(we(i,U))?[{}]:[]],ref:{type:he.type,name:U}}:{ref:he}}}),M(U,!1,void 0,he)}else Z=we(o,U,{}),Z._f&&(Z._f.mount=!1),(t.shouldUnregister||q.shouldUnregister)&&!(ZR(d.array,U)&&c.action)&&d.unMount.add(U)}}},Ee=()=>t.shouldFocusError&&nc(o,re,d.mount),ze=U=>{fr(U)&&(_.state.next({disabled:U}),nc(o,(q,Z)=>{const ue=we(o,Z);ue&&(q.disabled=ue._f.disabled||U,Array.isArray(ue._f.refs)&&ue._f.refs.forEach(pe=>{pe.disabled=ue._f.disabled||U}))},0,!1))},Nt=(U,q)=>async Z=>{let ue;Z&&(Z.preventDefault&&Z.preventDefault(),Z.persist&&Z.persist());let pe=ln(l);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:he,values:xe}=await D();R(),n.errors=he,pe=ln(xe)}else await W(o);if(d.disabled.size)for(const he of d.disabled)en(pe,he);if(en(n.errors,"root"),zn(n.errors)){_.state.next({errors:{}});try{await U(pe,Z)}catch(he){ue=he}}else q&&await q({...n.errors},Z),Ee(),setTimeout(Ee);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:zn(n.errors)&&!ue,submitCount:n.submitCount+1,errors:n.errors}),ue)throw ue},ve=(U,q={})=>{we(o,U)&&(Ft(q.defaultValue)?F(U,ln(we(i,U))):(F(U,q.defaultValue),vt(i,U,ln(q.defaultValue))),q.keepTouched||en(n.touchedFields,U),q.keepDirty||(en(n.dirtyFields,U),n.isDirty=q.defaultValue?K(U,ln(we(i,U))):K()),q.keepError||(en(n.errors,U),p.isValid&&T()),_.state.next({...n}))},ge=(U,q={})=>{const Z=U?ln(U):i,ue=ln(Z),pe=zn(U),he=pe?i:ue;if(q.keepDefaultValues||(i=Z),!q.keepValues){if(q.keepDirtyValues){const xe=new Set([...d.mount,...Object.keys(ws(i,l))]);for(const Be of Array.from(xe))we(n.dirtyFields,Be)?vt(he,Be,we(l,Be)):F(Be,we(he,Be))}else{if(Pv&&Ft(U))for(const xe of d.mount){const Be=we(o,xe);if(Be&&Be._f){const Qe=Array.isArray(Be._f.refs)?Be._f.refs[0]:Be._f.ref;if(Qd(Qe)){const wt=Qe.closest("form");if(wt){wt.reset();break}}}}if(q.keepFieldsRef)for(const xe of d.mount)F(xe,we(he,xe));else o={}}l=t.shouldUnregister?q.keepDefaultValues?ln(i):{}:ln(he),_.array.next({values:{...he}}),_.state.next({values:{...he}})}d={mount:q.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!p.isValid||!!q.keepIsValid||!!q.keepDirtyValues||!t.shouldUnregister&&!zn(he),c.watch=!!t.shouldUnregister,c.keepIsValid=!!q.keepIsValid,c.action=!1,q.keepErrors||(n.errors={}),_.state.next({submitCount:q.keepSubmitCount?n.submitCount:0,isDirty:pe?!1:q.keepDirty?n.isDirty:!!(q.keepDefaultValues&&!Yr(U,i)),isSubmitted:q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:pe?{}:q.keepDirtyValues?q.keepDefaultValues&&l?ws(i,l):n.dirtyFields:q.keepDefaultValues&&U?ws(i,U):q.keepDirty?n.dirtyFields:{},touchedFields:q.keepTouched?n.touchedFields:{},errors:q.keepErrors?n.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Re=(U,q)=>ge(Un(U)?U(l):U,{...t.resetOptions,...q}),ke=(U,q={})=>{const Z=we(o,U),ue=Z&&Z._f;if(ue){const pe=ue.refs?ue.refs[0]:ue.ref;pe.focus&&setTimeout(()=>{pe.focus(),q.shouldSelect&&Un(pe.select)&&pe.select()})}},et=U=>{n={...n,...U}},We={control:{register:Le,unregister:Se,getFieldState:Q,handleSubmit:Nt,setError:se,_subscribe:_e,_runSchema:D,_updateIsValidating:R,_focusError:Ee,_getWatch:j,_getDirty:K,_setValid:T,_setFieldArray:A,_setDisabledField:De,_setErrors:O,_getFieldArray:ne,_reset:ge,_resetDefaultValues:()=>Un(t.defaultValues)&&t.defaultValues().then(U=>{Re(U,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:G,_disableForm:ze,_subjects:_,_proxyFormState:p,get _fields(){return o},get _formValues(){return l},get _state(){return c},set _state(U){c=U},get _defaultValues(){return i},get _names(){return d},set _names(U){d=U},get _formState(){return n},get _options(){return t},set _options(U){t={...t,...U}}},subscribe:be,trigger:ye,register:Le,handleSubmit:Nt,watch:me,setValue:F,getValues:k,reset:Re,resetField:ve,clearErrors:ee,unregister:Se,setError:se,setFocus:ke,getFieldState:Q};return{...We,formControl:We}}function vo(e={}){const t=$.useRef(void 0),n=$.useRef(void 0),[o,i]=$.useState({isDirty:!1,isValidating:!1,isLoading:Un(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:Un(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!Un(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...d}=fk(e);t.current={...d,formState:o}}const l=t.current.control;return l._options=e,Uv(()=>{const c=l._subscribe({formState:l._proxyFormState,callback:()=>i({...l._formState}),reRenderRoot:!0});return i(d=>({...d,isReady:!0})),l._formState.isReady=!0,c},[l]),$.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),$.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),$.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),$.useEffect(()=>{if(l._proxyFormState.isDirty){const c=l._getDirty();c!==o.isDirty&&l._subjects.state.next({isDirty:c})}},[l,o.isDirty]),$.useEffect(()=>{var c;e.values&&!Yr(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((c=l._options.resetOptions)===null||c===void 0)&&c.keepIsValid||l._setValid(),n.current=e.values,i(d=>({...d}))):l._resetDefaultValues()},[l,e.values]),$.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=YR(o,l),t.current}function lS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ec(...e){return t=>{let n=!1;const o=e.map(i=>{const l=lS(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():lS(e[i],null)}}}}function dn(...e){return E.useCallback(Ec(...e),e)}var hk=Symbol.for("react.lazy"),Jd=av[" use ".trim().toString()];function pk(e){return typeof e=="object"&&e!==null&&"then"in e}function t2(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===hk&&"_payload"in e&&pk(e._payload)}function n2(e){const t=mk(e),n=E.forwardRef((o,i)=>{let{children:l,...c}=o;t2(l)&&typeof Jd=="function"&&(l=Jd(l._payload));const d=E.Children.toArray(l),f=d.find(vk);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,{...c,ref:i,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}var r2=n2("Slot");function mk(e){const t=E.forwardRef((n,o)=>{let{children:i,...l}=n;if(t2(i)&&typeof Jd=="function"&&(i=Jd(i._payload)),E.isValidElement(i)){const c=bk(i),d=yk(l,i.props);return i.type!==E.Fragment&&(d.ref=o?Ec(o,c):c),E.cloneElement(i,d)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gk=Symbol("radix.slottable");function vk(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gk}function yk(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function bk(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 cS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,uS=bx,_k=(e,t)=>n=>{var o;if(t?.variants==null)return uS(e,n?.class,n?.className);const{variants:i,defaultVariants:l}=t,c=Object.keys(i).map(h=>{const g=n?.[h],p=l?.[h];if(g===null)return null;const y=cS(g)||cS(p);return i[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||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((h,g)=>{let{class:p,className:y,..._}=g;return Object.entries(_).every(S=>{let[w,T]=S;return Array.isArray(T)?T.includes({...l,...d}[w]):{...l,...d}[w]===T})?[...h,p,y]:h},[]);return uS(e,c,f,n?.class,n?.className)},dS=(e,t,n)=>{if(e&&"reportValidity"in e){const o=we(n,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},Pg=(e,t)=>{for(const n in t.fields){const o=t.fields[n];o&&o.ref&&"reportValidity"in o.ref?dS(o.ref,n,e):o&&o.refs&&o.refs.forEach(i=>dS(i,n,e))}},fS=(e,t)=>{t.shouldUseNativeValidation&&Pg(e,t);const n={};for(const o in e){const i=we(t.fields,o),l=Object.assign(e[o]||{},{ref:i&&i.ref});if(Ek(t.names||Object.keys(e),o)){const c=Object.assign({},we(n,o));vt(c,"root",l),vt(n,o,c)}else vt(n,o,l)}return n},Ek=(e,t)=>{const n=hS(t);return e.some(o=>hS(o).match(`^${n}\\.\\d+`))};function hS(e){return e.replace(/\]|\[/g,"")}function pS(e,t){try{var n=e()}catch(o){return t(o)}return n&&n.then?n.then(void 0,t):n}function Sk(e,t){for(var n={};e.length;){var o=e[0],i=o.code,l=o.message,c=o.path.join(".");if(!n[c])if("unionErrors"in o){var d=o.unionErrors[0].errors[0];n[c]={message:d.message,type:d.code}}else n[c]={message:l,type:i};if("unionErrors"in o&&o.unionErrors.forEach(function(g){return g.errors.forEach(function(p){return e.push(p)})}),t){var f=n[c].types,h=f&&f[o.code];n[c]=Fv(c,t,n,i,h?[].concat(h,o.message):o.message)}e.shift()}return n}function wk(e,t){for(var n={};e.length;){var o=e[0],i=o.code,l=o.message,c=o.path.join(".");if(!n[c])if(o.code==="invalid_union"&&o.errors.length>0){var d=o.errors[0][0];n[c]={message:d.message,type:d.code}}else n[c]={message:l,type:i};if(o.code==="invalid_union"&&o.errors.forEach(function(g){return g.forEach(function(p){return e.push(p)})}),t){var f=n[c].types,h=f&&f[o.code];n[c]=Fv(c,t,n,i,h?[].concat(h,o.message):o.message)}e.shift()}return n}function yo(e,t,n){if(n===void 0&&(n={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,i,l){try{return Promise.resolve(pS(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](o,t)).then(function(c){return l.shouldUseNativeValidation&&Pg({},l),{errors:{},values:n.raw?Object.assign({},o):c}})},function(c){if((function(d){return Array.isArray(d?.issues)})(c))return{values:{},errors:fS(Sk(c.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw c}))}catch(c){return Promise.reject(c)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,i,l){try{return Promise.resolve(pS(function(){return Promise.resolve((n.mode==="sync"?NM:DM)(e,o,t)).then(function(c){return l.shouldUseNativeValidation&&Pg({},l),{errors:{},values:n.raw?Object.assign({},o):c}})},function(c){if((function(d){return d instanceof Rv})(c))return{values:{},errors:fS(wk(c.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function xk(e,t){const n=E.createContext(t),o=l=>{const{children:c,...d}=l,f=E.useMemo(()=>d,Object.values(d));return b.jsx(n.Provider,{value:f,children:c})};o.displayName=e+"Provider";function i(l){const c=E.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[o,i]}function Oi(e,t=[]){let n=[];function o(l,c){const d=E.createContext(c),f=n.length;n=[...n,c];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.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(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const i=()=>{const l=n.map(c=>E.createContext(c));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[o,Rk(i,...t)]}function Rk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Wr=globalThis?.document?E.useLayoutEffect:()=>{},Ok=av[" useId ".trim().toString()]||(()=>{}),Tk=0;function Ma(e){const[t,n]=E.useState(Ok());return Wr(()=>{n(o=>o??String(Tk++))},[e]),e||(t?`radix-${t}`:"")}var Ak=av[" useInsertionEffect ".trim().toString()]||Wr;function Sc({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,l,c]=Ck({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:i;{const g=E.useRef(e!==void 0);E.useEffect(()=>{const p=g.current;p!==d&&console.warn(`${o} 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,o])}const h=E.useCallback(g=>{if(d){const p=Ik(g)?g(e):g;p!==e&&c.current?.(p)}else l(g)},[d,e,l,c]);return[f,h]}function Ck({defaultProp:e,onChange:t}){const[n,o]=E.useState(e),i=E.useRef(n),l=E.useRef(t);return Ak(()=>{l.current=t},[t]),E.useEffect(()=>{i.current!==n&&(l.current?.(n),i.current=n)},[n,i]),[n,o,l]}function Ik(e){return typeof e=="function"}function dc(e){const t=Mk(e),n=E.forwardRef((o,i)=>{const{children:l,...c}=o,d=E.Children.toArray(l),f=d.find(Nk);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,{...c,ref:i,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function Mk(e){const t=E.forwardRef((n,o)=>{const{children:i,...l}=n;if(E.isValidElement(i)){const c=Lk(i),d=Dk(l,i.props);return i.type!==E.Fragment&&(d.ref=o?Ec(o,c):c),E.cloneElement(i,d)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var o2=Symbol("radix.slottable");function nG(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=o2,t}function Nk(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===o2}function Dk(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function Lk(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 Pk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=Pk.reduce((e,t)=>{const n=dc(`Primitive.${t}`),o=E.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function a2(e,t){e&&yf.flushSync(()=>e.dispatchEvent(t))}function Qr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>t.current?.(...n),[])}function kk(e,t=globalThis?.document){const n=Qr(e);E.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var jk="DismissableLayer",kg="dismissableLayer.update",zk="dismissableLayer.pointerDownOutside",Uk="dismissableLayer.focusOutside",mS,i2=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hv=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...f}=e,h=E.useContext(i2),[g,p]=E.useState(null),y=g?.ownerDocument??globalThis?.document,[,_]=E.useState({}),S=dn(t,N=>p(N)),w=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=w.indexOf(T),A=g?w.indexOf(g):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,O=A>=R,M=$k(N=>{const D=N.target,z=[...h.branches].some(W=>W.contains(D));!O||z||(i?.(N),c?.(N),N.defaultPrevented||d?.())},y),L=Vk(N=>{const D=N.target;[...h.branches].some(W=>W.contains(D))||(l?.(N),c?.(N),N.defaultPrevented||d?.())},y);return kk(N=>{A===h.layers.size-1&&(o?.(N),!N.defaultPrevented&&d&&(N.preventDefault(),d()))},y),E.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(mS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),gS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=mS)}},[g,y,n,h]),E.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),gS())},[g,h]),E.useEffect(()=>{const N=()=>_({});return document.addEventListener(kg,N),()=>document.removeEventListener(kg,N)},[]),b.jsx(zt.div,{...f,ref:S,style:{pointerEvents:C?O?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,M.onPointerDownCapture)})});Hv.displayName=jk;var Bk="DismissableLayerBranch",Fk=E.forwardRef((e,t)=>{const n=E.useContext(i2),o=E.useRef(null),i=dn(t,o);return E.useEffect(()=>{const l=o.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),b.jsx(zt.div,{...e,ref:i})});Fk.displayName=Bk;function $k(e,t=globalThis?.document){const n=Qr(e),o=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const l=d=>{if(d.target&&!o.current){let f=function(){s2(zk,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Vk(e,t=globalThis?.document){const n=Qr(e),o=E.useRef(!1);return E.useEffect(()=>{const i=l=>{l.target&&!o.current&&s2(Uk,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function gS(){const e=new CustomEvent(kg);document.dispatchEvent(e)}function s2(e,t,n,{discrete:o}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?a2(i,l):i.dispatchEvent(l)}var Im="focusScope.autoFocusOnMount",Mm="focusScope.autoFocusOnUnmount",vS={bubbles:!1,cancelable:!0},Hk="FocusScope",Gv=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[d,f]=E.useState(null),h=Qr(i),g=Qr(l),p=E.useRef(null),y=dn(t,w=>f(w)),_=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(o){let w=function(C){if(_.paused||!d)return;const O=C.target;d.contains(O)?p.current=O:wa(p.current,{select:!0})},T=function(C){if(_.paused||!d)return;const O=C.relatedTarget;O!==null&&(d.contains(O)||wa(p.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(const M of C)M.removedNodes.length>0&&wa(d)};document.addEventListener("focusin",w),document.addEventListener("focusout",T);const A=new MutationObserver(R);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T),A.disconnect()}}},[o,d,_.paused]),E.useEffect(()=>{if(d){bS.add(_);const w=document.activeElement;if(!d.contains(w)){const R=new CustomEvent(Im,vS);d.addEventListener(Im,h),d.dispatchEvent(R),R.defaultPrevented||(Gk(Wk(l2(d)),{select:!0}),document.activeElement===w&&wa(d))}return()=>{d.removeEventListener(Im,h),setTimeout(()=>{const R=new CustomEvent(Mm,vS);d.addEventListener(Mm,g),d.dispatchEvent(R),R.defaultPrevented||wa(w??document.body,{select:!0}),d.removeEventListener(Mm,g),bS.remove(_)},0)}}},[d,h,g,_]);const S=E.useCallback(w=>{if(!n&&!o||_.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,R=document.activeElement;if(T&&R){const A=w.currentTarget,[C,O]=qk(A);C&&O?!w.shiftKey&&R===O?(w.preventDefault(),n&&wa(C,{select:!0})):w.shiftKey&&R===C&&(w.preventDefault(),n&&wa(O,{select:!0})):R===A&&w.preventDefault()}},[n,o,_.paused]);return b.jsx(zt.div,{tabIndex:-1,...c,ref:y,onKeyDown:S})});Gv.displayName=Hk;function Gk(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(wa(o,{select:t}),document.activeElement!==n)return}function qk(e){const t=l2(e),n=yS(t,e),o=yS(t.reverse(),e);return[n,o]}function l2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yS(e,t){for(const n of e)if(!Zk(n,{upTo:t}))return n}function Zk(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 Yk(e){return e instanceof HTMLInputElement&&"select"in e}function wa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Yk(e)&&t&&e.select()}}var bS=Kk();function Kk(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_S(e,t),e.unshift(t)},remove(t){e=_S(e,t),e[0]?.resume()}}}function _S(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Wk(e){return e.filter(t=>t.tagName!=="A")}var Qk="Portal",qv=E.forwardRef((e,t)=>{const{container:n,...o}=e,[i,l]=E.useState(!1);Wr(()=>l(!0),[]);const c=n||i&&globalThis?.document?.body;return c?ex.createPortal(b.jsx(zt.div,{...o,ref:t}),c):null});qv.displayName=Qk;function Xk(e,t){return E.useReducer((n,o)=>t[n][o]??n,e)}var Zo=e=>{const{present:t,children:n}=e,o=Jk(t),i=typeof n=="function"?n({present:o.isPresent}):E.Children.only(n),l=dn(o.ref,ej(i));return typeof n=="function"||o.isPresent?E.cloneElement(i,{ref:l}):null};Zo.displayName="Presence";function Jk(e){const[t,n]=E.useState(),o=E.useRef(null),i=E.useRef(e),l=E.useRef("none"),c=e?"mounted":"unmounted",[d,f]=Xk(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=ad(o.current);l.current=d==="mounted"?h:"none"},[d]),Wr(()=>{const h=o.current,g=i.current;if(g!==e){const y=l.current,_=ad(h);e?f("MOUNT"):_==="none"||h?.display==="none"?f("UNMOUNT"):f(g&&y!==_?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Wr(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,p=_=>{const w=ad(o.current).includes(CSS.escape(_.animationName));if(_.target===t&&w&&(f("ANIMATION_END"),!i.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=ad(o.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=>{o.current=h?getComputedStyle(h):null,n(h)},[])}}function ad(e){return e?.animationName||"none"}function ej(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 Nm=0;function c2(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ES()),document.body.insertAdjacentElement("beforeend",e[1]??ES()),Nm++,()=>{Nm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nm--}},[])}function ES(){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 uo=function(){return uo=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},uo.apply(this,arguments)};function u2(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function tj(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,l;o<i;o++)(l||!(o in t))&&(l||(l=Array.prototype.slice.call(t,0,o)),l[o]=t[o]);return e.concat(l||Array.prototype.slice.call(t))}var Od="right-scroll-bar-position",Td="width-before-scroll-bar",nj="with-scroll-bars-hidden",rj="--removed-body-scroll-bar-size";function Dm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oj(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var aj=typeof window<"u"?E.useLayoutEffect:E.useEffect,SS=new WeakMap;function ij(e,t){var n=oj(null,function(o){return e.forEach(function(i){return Dm(i,o)})});return aj(function(){var o=SS.get(n);if(o){var i=new Set(o),l=new Set(e),c=n.current;i.forEach(function(d){l.has(d)||Dm(d,null)}),l.forEach(function(d){i.has(d)||Dm(d,c)})}SS.set(n,e)},[e]),n}function sj(e){return e}function lj(e,t){t===void 0&&(t=sj);var n=[],o=!1,i={read:function(){if(o)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 c=t(l,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(o=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var f=function(){var g=c;c=[],g.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(g){c.push(g),h()},filter:function(g){return c=c.filter(g),n}}}};return i}function cj(e){e===void 0&&(e={});var t=lj(null);return t.options=uo({async:!0,ssr:!1},e),t}var d2=function(e){var t=e.sideCar,n=u2(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return E.createElement(o,uo({},n))};d2.isSideCarExport=!0;function uj(e,t){return e.useMedium(t),d2}var f2=cj(),Lm=function(){},Cf=E.forwardRef(function(e,t){var n=E.useRef(null),o=E.useState({onScrollCapture:Lm,onWheelCapture:Lm,onTouchMoveCapture:Lm}),i=o[0],l=o[1],c=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,w=e.inert,T=e.allowPinchZoom,R=e.as,A=R===void 0?"div":R,C=e.gapMode,O=u2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=y,L=ij([n,t]),N=uo(uo({},O),i);return E.createElement(E.Fragment,null,g&&E.createElement(M,{sideCar:f2,removeScrollBar:h,shards:p,noRelative:_,noIsolation:S,inert:w,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:C}),c?E.cloneElement(E.Children.only(d),uo(uo({},N),{ref:L})):E.createElement(A,uo({},N,{className:f,ref:L}),d))});Cf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cf.classNames={fullWidth:Td,zeroRight:Od};var dj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dj();return t&&e.setAttribute("nonce",t),e}function hj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fj())&&(hj(t,n),pj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gj=function(){var e=mj();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},h2=function(){var e=gj(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},vj={left:0,top:0,right:0,gap:0},Pm=function(e){return parseInt(e||"",10)||0},yj=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Pm(n),Pm(o),Pm(i)]},bj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vj;var t=yj(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},_j=h2(),Is="data-scroll-locked",Ej=function(e,t,n,o){var i=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
62
|
-
.`.concat(nj,` {
|
|
63
|
-
overflow: hidden `).concat(o,`;
|
|
64
|
-
padding-right: `).concat(d,"px ").concat(o,`;
|
|
65
|
-
}
|
|
66
|
-
body[`).concat(Is,`] {
|
|
67
|
-
overflow: hidden `).concat(o,`;
|
|
68
|
-
overscroll-behavior: contain;
|
|
69
|
-
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
70
|
-
padding-left: `.concat(i,`px;
|
|
71
|
-
padding-top: `).concat(l,`px;
|
|
72
|
-
padding-right: `).concat(c,`px;
|
|
73
|
-
margin-left:0;
|
|
74
|
-
margin-top:0;
|
|
75
|
-
margin-right: `).concat(d,"px ").concat(o,`;
|
|
76
|
-
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.`).concat(Od,` {
|
|
80
|
-
right: `).concat(d,"px ").concat(o,`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.`).concat(Td,` {
|
|
84
|
-
margin-right: `).concat(d,"px ").concat(o,`;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.`).concat(Od," .").concat(Od,` {
|
|
88
|
-
right: 0 `).concat(o,`;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.`).concat(Td," .").concat(Td,` {
|
|
92
|
-
margin-right: 0 `).concat(o,`;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
body[`).concat(Is,`] {
|
|
96
|
-
`).concat(rj,": ").concat(d,`px;
|
|
97
|
-
}
|
|
98
|
-
`)},wS=function(){var e=parseInt(document.body.getAttribute(Is)||"0",10);return isFinite(e)?e:0},Sj=function(){E.useEffect(function(){return document.body.setAttribute(Is,(wS()+1).toString()),function(){var e=wS()-1;e<=0?document.body.removeAttribute(Is):document.body.setAttribute(Is,e.toString())}},[])},wj=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;Sj();var l=E.useMemo(function(){return bj(i)},[i]);return E.createElement(_j,{styles:Ej(l,!t,i,n?"":"!important")})},jg=!1;if(typeof window<"u")try{var id=Object.defineProperty({},"passive",{get:function(){return jg=!0,!0}});window.addEventListener("test",id,id),window.removeEventListener("test",id,id)}catch{jg=!1}var gs=jg?{passive:!1}:!1,xj=function(e){return e.tagName==="TEXTAREA"},p2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!xj(e)&&n[t]==="visible")},Rj=function(e){return p2(e,"overflowY")},Oj=function(e){return p2(e,"overflowX")},xS=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=m2(e,o);if(i){var l=g2(e,o),c=l[1],d=l[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Tj=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Aj=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},m2=function(e,t){return e==="v"?Rj(t):Oj(t)},g2=function(e,t){return e==="v"?Tj(t):Aj(t)},Cj=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ij=function(e,t,n,o,i){var l=Cj(e,window.getComputedStyle(t).direction),c=l*o,d=n.target,f=t.contains(d),h=!1,g=c>0,p=0,y=0;do{if(!d)break;var _=g2(e,d),S=_[0],w=_[1],T=_[2],R=w-T-l*S;(S||R)&&m2(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},sd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RS=function(e){return[e.deltaX,e.deltaY]},OS=function(e){return e&&"current"in e?e.current:e},Mj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nj=function(e){return`
|
|
99
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
100
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
101
|
-
`)},Dj=0,vs=[];function Lj(e){var t=E.useRef([]),n=E.useRef([0,0]),o=E.useRef(),i=E.useState(Dj++)[0],l=E.useState(h2)[0],c=E.useRef(e);E.useEffect(function(){c.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=tj([e.lockRef.current],(e.shards||[]).map(OS),!0).filter(Boolean);return w.forEach(function(T){return T.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=E.useCallback(function(w,T){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!c.current.allowPinchZoom;var R=sd(w),A=n.current,C="deltaX"in w?w.deltaX:A[0]-R[0],O="deltaY"in w?w.deltaY:A[1]-R[1],M,L=w.target,N=Math.abs(C)>Math.abs(O)?"h":"v";if("touches"in w&&N==="h"&&L.type==="range")return!1;var D=window.getSelection(),z=D&&D.anchorNode,W=z?z===L||z.contains(L):!1;if(W)return!1;var G=xS(N,L);if(!G)return!0;if(G?M=N:(M=N==="v"?"h":"v",G=xS(N,L)),!G)return!1;if(!o.current&&"changedTouches"in w&&(C||O)&&(o.current=M),!M)return!0;var K=o.current||M;return Ij(K,T,w,K==="h"?C:O)},[]),f=E.useCallback(function(w){var T=w;if(!(!vs.length||vs[vs.length-1]!==l)){var R="deltaY"in T?RS(T):sd(T),A=t.current.filter(function(M){return M.name===T.type&&(M.target===T.target||T.target===M.shadowParent)&&Mj(M.delta,R)})[0];if(A&&A.should){T.cancelable&&T.preventDefault();return}if(!A){var C=(c.current.shards||[]).map(OS).filter(Boolean).filter(function(M){return M.contains(T.target)}),O=C.length>0?d(T,C[0]):!c.current.noIsolation;O&&T.cancelable&&T.preventDefault()}}},[]),h=E.useCallback(function(w,T,R,A){var C={name:w,delta:T,target:R,should:A,shadowParent:Pj(R)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(O){return O!==C})},1)},[]),g=E.useCallback(function(w){n.current=sd(w),o.current=void 0},[]),p=E.useCallback(function(w){h(w.type,RS(w),w.target,d(w,e.lockRef.current))},[]),y=E.useCallback(function(w){h(w.type,sd(w),w.target,d(w,e.lockRef.current))},[]);E.useEffect(function(){return vs.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",f,gs),document.addEventListener("touchmove",f,gs),document.addEventListener("touchstart",g,gs),function(){vs=vs.filter(function(w){return w!==l}),document.removeEventListener("wheel",f,gs),document.removeEventListener("touchmove",f,gs),document.removeEventListener("touchstart",g,gs)}},[]);var _=e.removeScrollBar,S=e.inert;return E.createElement(E.Fragment,null,S?E.createElement(l,{styles:Nj(i)}):null,_?E.createElement(wj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Pj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const kj=uj(f2,Lj);var Zv=E.forwardRef(function(e,t){return E.createElement(Cf,uo({},e,{ref:t,sideCar:kj}))});Zv.classNames=Cf.classNames;var jj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ys=new WeakMap,ld=new WeakMap,cd={},km=0,v2=function(e){return e&&(e.host||v2(e.parentNode))},zj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=v2(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Uj=function(e,t,n,o){var i=zj(t,Array.isArray(e)?e:[e]);cd[n]||(cd[n]=new WeakMap);var l=cd[n],c=[],d=new Set,f=new Set(i),h=function(p){!p||d.has(p)||(d.add(p),h(p.parentNode))};i.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(o),S=_!==null&&_!=="false",w=(ys.get(y)||0)+1,T=(l.get(y)||0)+1;ys.set(y,w),l.set(y,T),c.push(y),w===1&&S&&ld.set(y,!0),T===1&&y.setAttribute(n,"true"),S||y.setAttribute(o,"true")}catch(R){console.error("aria-hidden: cannot operate on ",y,R)}})};return g(t),d.clear(),km++,function(){c.forEach(function(p){var y=ys.get(p)-1,_=l.get(p)-1;ys.set(p,y),l.set(p,_),y||(ld.has(p)||p.removeAttribute(o),ld.delete(p)),_||p.removeAttribute(n)}),km--,km||(ys=new WeakMap,ys=new WeakMap,ld=new WeakMap,cd={})}},y2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=jj(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),Uj(o,i,n,"aria-hidden")):function(){return null}},If="Dialog",[b2,rG]=Oi(If),[Bj,eo]=b2(If),_2=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,d=E.useRef(null),f=E.useRef(null),[h,g]=Sc({prop:o,defaultProp:i??!1,onChange:l,caller:If});return b.jsx(Bj,{scope:t,triggerRef:d,contentRef:f,contentId:Ma(),titleId:Ma(),descriptionId:Ma(),open:h,onOpenChange:g,onOpenToggle:E.useCallback(()=>g(p=>!p),[g]),modal:c,children:n})};_2.displayName=If;var E2="DialogTrigger",S2=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=eo(E2,n),l=dn(t,i.triggerRef);return b.jsx(zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Wv(i.open),...o,ref:l,onClick:Ge(e.onClick,i.onOpenToggle)})});S2.displayName=E2;var Yv="DialogPortal",[Fj,w2]=b2(Yv,{forceMount:void 0}),x2=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,l=eo(Yv,t);return b.jsx(Fj,{scope:t,forceMount:n,children:E.Children.map(o,c=>b.jsx(Zo,{present:n||l.open,children:b.jsx(qv,{asChild:!0,container:i,children:c})}))})};x2.displayName=Yv;var ef="DialogOverlay",R2=E.forwardRef((e,t)=>{const n=w2(ef,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=eo(ef,e.__scopeDialog);return l.modal?b.jsx(Zo,{present:o||l.open,children:b.jsx(Vj,{...i,ref:t})}):null});R2.displayName=ef;var $j=dc("DialogOverlay.RemoveScroll"),Vj=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=eo(ef,n);return b.jsx(Zv,{as:$j,allowPinchZoom:!0,shards:[i.contentRef],children:b.jsx(zt.div,{"data-state":Wv(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),_i="DialogContent",O2=E.forwardRef((e,t)=>{const n=w2(_i,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=eo(_i,e.__scopeDialog);return b.jsx(Zo,{present:o||l.open,children:l.modal?b.jsx(Hj,{...i,ref:t}):b.jsx(Gj,{...i,ref:t})})});O2.displayName=_i;var Hj=E.forwardRef((e,t)=>{const n=eo(_i,e.__scopeDialog),o=E.useRef(null),i=dn(t,n.contentRef,o);return E.useEffect(()=>{const l=o.current;if(l)return y2(l)},[]),b.jsx(T2,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,l=>l.preventDefault())})}),Gj=E.forwardRef((e,t)=>{const n=eo(_i,e.__scopeDialog),o=E.useRef(!1),i=E.useRef(!1);return b.jsx(T2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(o.current||n.triggerRef.current?.focus(),l.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(o.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;n.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),T2=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,...c}=e,d=eo(_i,n),f=E.useRef(null),h=dn(t,f);return c2(),b.jsxs(b.Fragment,{children:[b.jsx(Gv,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:l,children:b.jsx(Hv,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Wv(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(qj,{titleId:d.titleId}),b.jsx(Yj,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Kv="DialogTitle",A2=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=eo(Kv,n);return b.jsx(zt.h2,{id:i.titleId,...o,ref:t})});A2.displayName=Kv;var C2="DialogDescription",I2=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=eo(C2,n);return b.jsx(zt.p,{id:i.descriptionId,...o,ref:t})});I2.displayName=C2;var M2="DialogClose",N2=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=eo(M2,n);return b.jsx(zt.button,{type:"button",...o,ref:t,onClick:Ge(e.onClick,()=>i.onOpenChange(!1))})});N2.displayName=M2;function Wv(e){return e?"open":"closed"}var D2="DialogTitleWarning",[oG,L2]=xk(D2,{contentName:_i,titleName:Kv,docsSlug:"dialog"}),qj=({titleId:e})=>{const t=L2(D2),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
102
|
-
|
|
103
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
104
|
-
|
|
105
|
-
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},Zj="DialogDescriptionWarning",Yj=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${L2(Zj).contentName}}.`;return E.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Kj=_2,Wj=S2,Qj=x2,Xj=R2,Jj=O2,e9=A2,aG=I2,iG=N2;function P2(e){const t=e+"CollectionProvider",[n,o]=Oi(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=w=>{const{scope:T,children:R}=w,A=$.useRef(null),C=$.useRef(new Map).current;return b.jsx(i,{scope:T,itemMap:C,collectionRef:A,children:R})};c.displayName=t;const d=e+"CollectionSlot",f=dc(d),h=$.forwardRef((w,T)=>{const{scope:R,children:A}=w,C=l(d,R),O=dn(T,C.collectionRef);return b.jsx(f,{ref:O,children:A})});h.displayName=d;const g=e+"CollectionItemSlot",p="data-radix-collection-item",y=dc(g),_=$.forwardRef((w,T)=>{const{scope:R,children:A,...C}=w,O=$.useRef(null),M=dn(T,O),L=l(g,R);return $.useEffect(()=>(L.itemMap.set(O,{ref:O,...C}),()=>{L.itemMap.delete(O)})),b.jsx(y,{[p]:"",ref:M,children:A})});_.displayName=g;function S(w){const T=l(e+"CollectionConsumer",w);return $.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:c,Slot:h,ItemSlot:_},S,o]}var t9=E.createContext(void 0);function k2(e){const t=E.useContext(t9);return e||t||"ltr"}const n9=["top","right","bottom","left"],Pa=Math.min,pr=Math.max,tf=Math.round,ud=Math.floor,po=e=>({x:e,y:e}),r9={left:"right",right:"left",bottom:"top",top:"bottom"},o9={start:"end",end:"start"};function zg(e,t,n){return pr(e,Pa(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function Go(e){return e.split("-")[0]}function $s(e){return e.split("-")[1]}function Qv(e){return e==="x"?"y":"x"}function Xv(e){return e==="y"?"height":"width"}const a9=new Set(["top","bottom"]);function ho(e){return a9.has(Go(e))?"y":"x"}function Jv(e){return Qv(ho(e))}function i9(e,t,n){n===void 0&&(n=!1);const o=$s(e),i=Jv(e),l=Xv(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=nf(c)),[c,nf(c)]}function s9(e){const t=nf(e);return[Ug(e),t,Ug(t)]}function Ug(e){return e.replace(/start|end/g,t=>o9[t])}const TS=["left","right"],AS=["right","left"],l9=["top","bottom"],c9=["bottom","top"];function u9(e,t,n){switch(e){case"top":case"bottom":return n?t?AS:TS:t?TS:AS;case"left":case"right":return t?l9:c9;default:return[]}}function d9(e,t,n,o){const i=$s(e);let l=u9(Go(e),n==="start",o);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(Ug)))),l}function nf(e){return e.replace(/left|right|bottom|top/g,t=>r9[t])}function f9(e){return{top:0,right:0,bottom:0,left:0,...e}}function j2(e){return typeof e!="number"?f9(e):{top:e,right:e,bottom:e,left:e}}function rf(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function CS(e,t,n){let{reference:o,floating:i}=e;const l=ho(t),c=Jv(t),d=Xv(c),f=Go(t),h=l==="y",g=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,y=o[d]/2-i[d]/2;let _;switch(f){case"top":_={x:g,y:o.y-i.height};break;case"bottom":_={x:g,y:o.y+o.height};break;case"right":_={x:o.x+o.width,y:p};break;case"left":_={x:o.x-i.width,y:p};break;default:_={x:o.x,y:o.y}}switch($s(t)){case"start":_[c]-=y*(n&&h?-1:1);break;case"end":_[c]+=y*(n&&h?-1:1);break}return _}const h9=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,d=l.filter(Boolean),f=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:p}=CS(h,o,f),y=o,_={},S=0;for(let w=0;w<d.length;w++){const{name:T,fn:R}=d[w],{x:A,y:C,data:O,reset:M}=await R({x:g,y:p,initialPlacement:o,placement:y,strategy:i,middlewareData:_,rects:h,platform:c,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 c.getElementRects({reference:e,floating:t,strategy:i}):M.rects),{x:g,y:p}=CS(h,y,f)),w=-1)}return{x:g,y:p,placement:y,strategy:i,middlewareData:_}};async function fc(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:l,rects:c,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:y=!1,padding:_=0}=Ho(t,e),S=j2(_),T=d[y?p==="floating"?"reference":"floating":p],R=rf(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:o,y:i,width:c.floating.width,height:c.floating.height}:c.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=rf(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 p9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:c,elements:d,middlewareData:f}=t,{element:h,padding:g=0}=Ho(e,t)||{};if(h==null)return{};const p=j2(g),y={x:n,y:o},_=Jv(i),S=Xv(_),w=await c.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(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let N=L?L[C]:0;(!N||!await(c.isElement==null?void 0:c.isElement(L)))&&(N=d.floating[C]||l.floating[S]);const D=O/2-M/2,z=N/2-w[S]/2-1,W=Pa(p[R],z),G=Pa(p[A],z),K=W,j=N-w[S]-G,ne=N/2-w[S]/2+D,ae=zg(K,ne,j),P=!f.arrow&&$s(i)!=null&&ne!==ae&&l.reference[S]/2-(ne<K?W:G)-w[S]/2<0,F=P?ne<K?ne-K:ne-j:0;return{[_]:y[_]+F,data:{[_]:ae,centerOffset:ne-ae-F,...P&&{alignmentOffset:F}},reset:P}}}),m9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:c,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...T}=Ho(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const R=Go(i),A=ho(d),C=Go(d)===d,O=await(f.isRTL==null?void 0:f.isRTL(h.floating)),M=y||(C||!w?[nf(d)]:s9(d)),L=S!=="none";!y&&L&&M.push(...d9(d,w,S,O));const N=[d,...M],D=await fc(t,T),z=[];let W=((o=l.flip)==null?void 0:o.overflows)||[];if(g&&z.push(D[R]),p){const ne=i9(i,c,O);z.push(D[ne[0]],D[ne[1]])}if(W=[...W,{placement:i,overflows:z}],!z.every(ne=>ne<=0)){var G,K;const ne=(((G=l.flip)==null?void 0:G.index)||0)+1,ae=N[ne];if(ae&&(!(p==="alignment"?A!==ho(ae):!1)||W.every(H=>ho(H.placement)===A?H.overflows[0]>0:!0)))return{data:{index:ne,overflows:W},reset:{placement:ae}};let P=(K=W.filter(F=>F.overflows[0]<=0).sort((F,H)=>F.overflows[1]-H.overflows[1])[0])==null?void 0:K.placement;if(!P)switch(_){case"bestFit":{var j;const F=(j=W.filter(H=>{if(L){const re=ho(H.placement);return re===A||re==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(re=>re>0).reduce((re,ye)=>re+ye,0)]).sort((H,re)=>H[1]-re[1])[0])==null?void 0:j[0];F&&(P=F);break}case"initialPlacement":P=d;break}if(i!==P)return{reset:{placement:P}}}return{}}}};function IS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MS(e){return n9.some(t=>e[t]>=0)}const g9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=Ho(e,t);switch(o){case"referenceHidden":{const l=await fc(t,{...i,elementContext:"reference"}),c=IS(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:MS(c)}}}case"escaped":{const l=await fc(t,{...i,altBoundary:!0}),c=IS(l,n.floating);return{data:{escapedOffsets:c,escaped:MS(c)}}}default:return{}}}}},z2=new Set(["left","top"]);async function v9(e,t){const{placement:n,platform:o,elements:i}=e,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=Go(n),d=$s(n),f=ho(n)==="y",h=z2.has(c)?-1:1,g=l&&f?-1:1,p=Ho(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 y9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:l,placement:c,middlewareData:d}=t,f=await v9(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:l+f.y,data:{...f,placement:c}}}}},b9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:T=>{let{x:R,y:A}=T;return{x:R,y:A}}},...f}=Ho(e,t),h={x:n,y:o},g=await fc(t,f),p=ho(Go(i)),y=Qv(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(c){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 w=d.fn({...t,[y]:_,[p]:S});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[y]:l,[p]:c}}}}}},_9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=Ho(e,t),g={x:n,y:o},p=ho(i),y=Qv(p);let _=g[y],S=g[p];const w=Ho(d,t),T=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};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=z2.has(Go(i)),M=l.reference[p]-l.floating[C]+(O&&((R=c.offset)==null?void 0:R[p])||0)+(O?0:T.crossAxis),L=l.reference[p]+l.reference[C]+(O?0:((A=c.offset)==null?void 0:A[p])||0)-(O?T.crossAxis:0);S<M?S=M:S>L&&(S=L)}return{[y]:_,[p]:S}}}},E9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:c,elements:d}=t,{apply:f=()=>{},...h}=Ho(e,t),g=await fc(t,h),p=Go(i),y=$s(i),_=ho(i)==="y",{width:S,height:w}=l.floating;let T,R;p==="top"||p==="bottom"?(T=p,R=y===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(R=p,T=y==="end"?"top":"bottom");const A=w-g.top-g.bottom,C=S-g.left-g.right,O=Pa(w-g[T],A),M=Pa(S-g[R],C),L=!t.middlewareData.shift;let N=O,D=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(N=A),L&&!y){const W=pr(g.left,0),G=pr(g.right,0),K=pr(g.top,0),j=pr(g.bottom,0);_?D=S-2*(W!==0||G!==0?W+G:pr(g.left,g.right)):N=w-2*(K!==0||j!==0?K+j:pr(g.top,g.bottom))}await f({...t,availableWidth:D,availableHeight:N});const z=await c.getDimensions(d.floating);return S!==z.width||w!==z.height?{reset:{rects:!0}}:{}}}};function Mf(){return typeof window<"u"}function Vs(e){return U2(e)?(e.nodeName||"").toLowerCase():"#document"}function yr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bo(e){var t;return(t=(U2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function U2(e){return Mf()?e instanceof Node||e instanceof yr(e).Node:!1}function Xr(e){return Mf()?e instanceof Element||e instanceof yr(e).Element:!1}function go(e){return Mf()?e instanceof HTMLElement||e instanceof yr(e).HTMLElement:!1}function NS(e){return!Mf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yr(e).ShadowRoot}const S9=new Set(["inline","contents"]);function wc(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Jr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!S9.has(i)}const w9=new Set(["table","td","th"]);function x9(e){return w9.has(Vs(e))}const R9=[":popover-open",":modal"];function Nf(e){return R9.some(t=>{try{return e.matches(t)}catch{return!1}})}const O9=["transform","translate","scale","rotate","perspective"],T9=["transform","translate","scale","rotate","perspective","filter"],A9=["paint","layout","strict","content"];function e0(e){const t=t0(),n=Xr(e)?Jr(e):e;return O9.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||T9.some(o=>(n.willChange||"").includes(o))||A9.some(o=>(n.contain||"").includes(o))}function C9(e){let t=ka(e);for(;go(t)&&!js(t);){if(e0(t))return t;if(Nf(t))return null;t=ka(t)}return null}function t0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const I9=new Set(["html","body","#document"]);function js(e){return I9.has(Vs(e))}function Jr(e){return yr(e).getComputedStyle(e)}function Df(e){return Xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ka(e){if(Vs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||NS(e)&&e.host||bo(e);return NS(t)?t.host:t}function B2(e){const t=ka(e);return js(t)?e.ownerDocument?e.ownerDocument.body:e.body:go(t)&&wc(t)?t:B2(t)}function hc(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=B2(e),l=i===((o=e.ownerDocument)==null?void 0:o.body),c=yr(i);if(l){const d=Bg(c);return t.concat(c,c.visualViewport||[],wc(i)?i:[],d&&n?hc(d):[])}return t.concat(i,hc(i,[],n))}function Bg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function F2(e){const t=Jr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=go(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=tf(n)!==l||tf(o)!==c;return d&&(n=l,o=c),{width:n,height:o,$:d}}function n0(e){return Xr(e)?e:e.contextElement}function Ms(e){const t=n0(e);if(!go(t))return po(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:l}=F2(t);let c=(l?tf(n.width):n.width)/o,d=(l?tf(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const M9=po(0);function $2(e){const t=yr(e);return!t0()||!t.visualViewport?M9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function N9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yr(e)?!1:t}function Ei(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=n0(e);let c=po(1);t&&(o?Xr(o)&&(c=Ms(o)):c=Ms(e));const d=N9(l,n,o)?$2(l):po(0);let f=(i.left+d.x)/c.x,h=(i.top+d.y)/c.y,g=i.width/c.x,p=i.height/c.y;if(l){const y=yr(l),_=o&&Xr(o)?yr(o):o;let S=y,w=Bg(S);for(;w&&o&&_!==S;){const T=Ms(w),R=w.getBoundingClientRect(),A=Jr(w),C=R.left+(w.clientLeft+parseFloat(A.paddingLeft))*T.x,O=R.top+(w.clientTop+parseFloat(A.paddingTop))*T.y;f*=T.x,h*=T.y,g*=T.x,p*=T.y,f+=C,h+=O,S=yr(w),w=Bg(S)}}return rf({width:g,height:p,x:f,y:h})}function Lf(e,t){const n=Df(e).scrollLeft;return t?t.left+n:Ei(bo(e)).left+n}function V2(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Lf(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function D9(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const l=i==="fixed",c=bo(o),d=t?Nf(t.floating):!1;if(o===c||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=po(1);const g=po(0),p=go(o);if((p||!p&&!l)&&((Vs(o)!=="body"||wc(c))&&(f=Df(o)),go(o))){const _=Ei(o);h=Ms(o),g.x=_.x+o.clientLeft,g.y=_.y+o.clientTop}const y=c&&!p&&!l?V2(c,f):po(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 L9(e){return Array.from(e.getClientRects())}function P9(e){const t=bo(e),n=Df(e),o=e.ownerDocument.body,i=pr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=pr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Lf(e);const d=-n.scrollTop;return Jr(o).direction==="rtl"&&(c+=pr(t.clientWidth,o.clientWidth)-i),{width:i,height:l,x:c,y:d}}const DS=25;function k9(e,t){const n=yr(e),o=bo(e),i=n.visualViewport;let l=o.clientWidth,c=o.clientHeight,d=0,f=0;if(i){l=i.width,c=i.height;const g=t0();(!g||g&&t==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}const h=Lf(o);if(h<=0){const g=o.ownerDocument,p=g.body,y=getComputedStyle(p),_=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(o.clientWidth-p.clientWidth-_);S<=DS&&(l-=S)}else h<=DS&&(l+=h);return{width:l,height:c,x:d,y:f}}const j9=new Set(["absolute","fixed"]);function z9(e,t){const n=Ei(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,l=go(e)?Ms(e):po(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,f=i*l.x,h=o*l.y;return{width:c,height:d,x:f,y:h}}function LS(e,t,n){let o;if(t==="viewport")o=k9(e,n);else if(t==="document")o=P9(bo(e));else if(Xr(t))o=z9(t,n);else{const i=$2(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return rf(o)}function H2(e,t){const n=ka(e);return n===t||!Xr(n)||js(n)?!1:Jr(n).position==="fixed"||H2(n,t)}function U9(e,t){const n=t.get(e);if(n)return n;let o=hc(e,[],!1).filter(d=>Xr(d)&&Vs(d)!=="body"),i=null;const l=Jr(e).position==="fixed";let c=l?ka(e):e;for(;Xr(c)&&!js(c);){const d=Jr(c),f=e0(c);!f&&d.position==="fixed"&&(i=null),(l?!f&&!i:!f&&d.position==="static"&&!!i&&j9.has(i.position)||wc(c)&&!f&&H2(e,c))?o=o.filter(g=>g!==c):i=d,c=ka(c)}return t.set(e,o),o}function B9(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Nf(t)?[]:U9(t,this._c):[].concat(n),o],d=c[0],f=c.reduce((h,g)=>{const p=LS(t,g,i);return h.top=pr(p.top,h.top),h.right=Pa(p.right,h.right),h.bottom=Pa(p.bottom,h.bottom),h.left=pr(p.left,h.left),h},LS(t,d,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function F9(e){const{width:t,height:n}=F2(e);return{width:t,height:n}}function $9(e,t,n){const o=go(t),i=bo(t),l=n==="fixed",c=Ei(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=po(0);function h(){f.x=Lf(i)}if(o||!o&&!l)if((Vs(t)!=="body"||wc(i))&&(d=Df(t)),o){const _=Ei(t,!0,l,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else i&&h();l&&!o&&i&&h();const g=i&&!o&&!l?V2(i,d):po(0),p=c.left+d.scrollLeft-f.x-g.x,y=c.top+d.scrollTop-f.y-g.y;return{x:p,y,width:c.width,height:c.height}}function jm(e){return Jr(e).position==="static"}function PS(e,t){if(!go(e)||Jr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return bo(e)===n&&(n=n.ownerDocument.body),n}function G2(e,t){const n=yr(e);if(Nf(e))return n;if(!go(e)){let i=ka(e);for(;i&&!js(i);){if(Xr(i)&&!jm(i))return i;i=ka(i)}return n}let o=PS(e,t);for(;o&&x9(o)&&jm(o);)o=PS(o,t);return o&&js(o)&&jm(o)&&!e0(o)?n:o||C9(e)||n}const V9=async function(e){const t=this.getOffsetParent||G2,n=this.getDimensions,o=await n(e.floating);return{reference:$9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function H9(e){return Jr(e).direction==="rtl"}const G9={convertOffsetParentRelativeRectToViewportRelativeRect:D9,getDocumentElement:bo,getClippingRect:B9,getOffsetParent:G2,getElementRects:V9,getClientRects:L9,getDimensions:F9,getScale:Ms,isElement:Xr,isRTL:H9};function q2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function q9(e,t){let n=null,o;const i=bo(e);function l(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(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=ud(p),w=ud(i.clientWidth-(g+y)),T=ud(i.clientHeight-(p+_)),R=ud(g),C={rootMargin:-S+"px "+-w+"px "+-T+"px "+-R+"px",threshold:pr(0,Pa(1,f))||1};let O=!0;function M(L){const N=L[0].intersectionRatio;if(N!==f){if(!O)return c();N?c(!1,N):o=setTimeout(()=>{c(!1,1e-7)},1e3)}N===1&&!q2(h,e.getBoundingClientRect())&&c(),O=!1}try{n=new IntersectionObserver(M,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(M,C)}n.observe(e)}return c(!0),l}function Z9(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,h=n0(e),g=i||l?[...h?hc(h):[],...hc(t)]:[];g.forEach(R=>{i&&R.addEventListener("scroll",n,{passive:!0}),l&&R.addEventListener("resize",n)});const p=h&&d?q9(h,n):null;let y=-1,_=null;c&&(_=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,w=f?Ei(e):null;f&&T();function T(){const R=Ei(e);w&&!q2(w,R)&&n(),w=R,S=requestAnimationFrame(T)}return n(),()=>{var R;g.forEach(A=>{i&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),p?.(),(R=_)==null||R.disconnect(),_=null,f&&cancelAnimationFrame(S)}}const Y9=y9,K9=b9,W9=m9,Q9=E9,X9=g9,kS=p9,J9=_9,ez=(e,t,n)=>{const o=new Map,i={platform:G9,...n},l={...i.platform,_c:o};return h9(e,t,{...i,platform:l})};var tz=typeof document<"u",nz=function(){},Ad=tz?E.useLayoutEffect:nz;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,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!of(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const l=i[o];if(!(l==="_owner"&&e.$$typeof)&&!of(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Z2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jS(e,t){const n=Z2(e);return Math.round(t*n)/n}function zm(e){const t=E.useRef(e);return Ad(()=>{t.current=e}),t}function rz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},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(o);of(y,o)||_(o);const[S,w]=E.useState(null),[T,R]=E.useState(null),A=E.useCallback(H=>{H!==L.current&&(L.current=H,w(H))},[]),C=E.useCallback(H=>{H!==N.current&&(N.current=H,R(H))},[]),O=l||S,M=c||T,L=E.useRef(null),N=E.useRef(null),D=E.useRef(g),z=f!=null,W=zm(f),G=zm(i),K=zm(h),j=E.useCallback(()=>{if(!L.current||!N.current)return;const H={placement:t,strategy:n,middleware:y};G.current&&(H.platform=G.current),ez(L.current,N.current,H).then(re=>{const ye={...re,isPositioned:K.current!==!1};ne.current&&!of(D.current,ye)&&(D.current=ye,yf.flushSync(()=>{p(ye)}))})},[y,t,n,G,K]);Ad(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[h]);const ne=E.useRef(!1);Ad(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Ad(()=>{if(O&&(L.current=O),M&&(N.current=M),O&&M){if(W.current)return W.current(O,M,j);j()}},[O,M,j,W,z]);const ae=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 H={position:n,left:0,top:0};if(!P.floating)return H;const re=jS(P.floating,g.x),ye=jS(P.floating,g.y);return d?{...H,transform:"translate("+re+"px, "+ye+"px)",...Z2(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:ye}},[n,d,P.floating,g.x,g.y]);return E.useMemo(()=>({...g,update:j,refs:ae,elements:P,floatingStyles:F}),[g,j,ae,P,F])}const oz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?kS({element:o.current,padding:i}).fn(n):{}:o?kS({element:o,padding:i}).fn(n):{}}}},az=(e,t)=>({...Y9(e),options:[e,t]}),iz=(e,t)=>({...K9(e),options:[e,t]}),sz=(e,t)=>({...J9(e),options:[e,t]}),lz=(e,t)=>({...W9(e),options:[e,t]}),cz=(e,t)=>({...Q9(e),options:[e,t]}),uz=(e,t)=>({...X9(e),options:[e,t]}),dz=(e,t)=>({...oz(e),options:[e,t]});var fz="Arrow",Y2=E.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...l}=e;return b.jsx(zt.svg,{...l,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});Y2.displayName=fz;var hz=Y2;function K2(e){const[t,n]=E.useState(void 0);return Wr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let c,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;c=h.inlineSize,d=h.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var r0="Popper",[W2,Q2]=Oi(r0),[pz,X2]=W2(r0),J2=e=>{const{__scopePopper:t,children:n}=e,[o,i]=E.useState(null);return b.jsx(pz,{scope:t,anchor:o,onAnchorChange:i,children:n})};J2.displayName=r0;var eO="PopperAnchor",tO=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,l=X2(eO,n),c=E.useRef(null),d=dn(t,c),f=E.useRef(null);return E.useEffect(()=>{const h=f.current;f.current=o?.current||c.current,h!==f.current&&l.onAnchorChange(f.current)}),o?null:b.jsx(zt.div,{...i,ref:d})});tO.displayName=eO;var o0="PopperContent",[mz,gz]=W2(o0),nO=E.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:S,...w}=e,T=X2(o0,n),[R,A]=E.useState(null),C=dn(t,be=>A(be)),[O,M]=E.useState(null),L=K2(O),N=L?.width??0,D=L?.height??0,z=o+(l!=="center"?"-"+l:""),W=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},G=Array.isArray(h)?h:[h],K=G.length>0,j={padding:W,boundary:G.filter(yz),altBoundary:K},{refs:ne,floatingStyles:ae,placement:P,isPositioned:F,middlewareData:H}=rz({strategy:"fixed",placement:z,whileElementsMounted:(...be)=>Z9(...be,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[az({mainAxis:i+D,alignmentAxis:c}),f&&iz({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?sz():void 0,...j}),f&&lz({...j}),cz({...j,apply:({elements:be,rects:Se,availableWidth:De,availableHeight:Le})=>{const{width:Ee,height:ze}=Se.reference,Nt=be.floating.style;Nt.setProperty("--radix-popper-available-width",`${De}px`),Nt.setProperty("--radix-popper-available-height",`${Le}px`),Nt.setProperty("--radix-popper-anchor-width",`${Ee}px`),Nt.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),O&&dz({element:O,padding:d}),bz({arrowWidth:N,arrowHeight:D}),y&&uz({strategy:"referenceHidden",...j})]}),[re,ye]=aO(P),k=Qr(S);Wr(()=>{F&&k?.()},[F,k]);const Q=H.arrow?.x,ee=H.arrow?.y,se=H.arrow?.centerOffset!==0,[me,_e]=E.useState();return Wr(()=>{R&&_e(window.getComputedStyle(R).zIndex)},[R]),b.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:F?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(mz,{scope:n,placedSide:re,onArrowChange:M,arrowX:Q,arrowY:ee,shouldHideArrow:se,children:b.jsx(zt.div,{"data-side":re,"data-align":ye,...w,ref:C,style:{...w.style,animation:F?void 0:"none"}})})})});nO.displayName=o0;var rO="PopperArrow",vz={top:"bottom",right:"left",bottom:"top",left:"right"},oO=E.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,l=gz(rO,o),c=vz[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]: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(hz,{...i,ref:n,style:{...i.style,display:"block"}})})});oO.displayName=rO;function yz(e){return e!==null}var bz=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:i}=t,c=i.arrow?.centerOffset!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,g]=aO(n),p={start:"0%",center:"50%",end:"100%"}[g],y=(i.arrow?.x??0)+d/2,_=(i.arrow?.y??0)+f/2;let S="",w="";return h==="bottom"?(S=c?p:`${y}px`,w=`${-f}px`):h==="top"?(S=c?p:`${y}px`,w=`${o.floating.height+f}px`):h==="right"?(S=`${-f}px`,w=c?p:`${_}px`):h==="left"&&(S=`${o.floating.width+f}px`,w=c?p:`${_}px`),{data:{x:S,y:w}}}});function aO(e){const[t,n="center"]=e.split("-");return[t,n]}var iO=J2,_z=tO,Ez=nO,Sz=oO,Um="rovingFocusGroup.onEntryFocus",wz={bubbles:!1,cancelable:!0},xc="RovingFocusGroup",[Fg,sO,xz]=P2(xc),[Rz,lO]=Oi(xc,[xz]),[Oz,Tz]=Rz(xc),cO=E.forwardRef((e,t)=>b.jsx(Fg.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(Fg.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(Az,{...e,ref:t})})}));cO.displayName=xc;var Az=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...p}=e,y=E.useRef(null),_=dn(t,y),S=k2(l),[w,T]=Sc({prop:c,defaultProp:d??null,onChange:f,caller:xc}),[R,A]=E.useState(!1),C=Qr(h),O=sO(n),M=E.useRef(!1),[L,N]=E.useState(0);return E.useEffect(()=>{const D=y.current;if(D)return D.addEventListener(Um,C),()=>D.removeEventListener(Um,C)},[C]),b.jsx(Oz,{scope:n,orientation:o,dir:S,loop:i,currentTabStopId:w,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(zt.div,{tabIndex:R||L===0?-1:0,"data-orientation":o,...p,ref:_,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{M.current=!0}),onFocus:Ge(e.onFocus,D=>{const z=!M.current;if(D.target===D.currentTarget&&z&&!R){const W=new CustomEvent(Um,wz);if(D.currentTarget.dispatchEvent(W),!W.defaultPrevented){const G=O().filter(P=>P.focusable),K=G.find(P=>P.active),j=G.find(P=>P.id===w),ae=[K,j,...G].filter(Boolean).map(P=>P.ref.current);fO(ae,g)}}M.current=!1}),onBlur:Ge(e.onBlur,()=>A(!1))})})}),uO="RovingFocusGroupItem",dO=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:l,children:c,...d}=e,f=Ma(),h=l||f,g=Tz(uO,n),p=g.currentTabStopId===h,y=sO(n),{onFocusableItemAdd:_,onFocusableItemRemove:S,currentTabStopId:w}=g;return E.useEffect(()=>{if(o)return _(),()=>S()},[o,_,S]),b.jsx(Fg.ItemSlot,{scope:n,id:h,focusable:o,active:i,children:b.jsx(zt.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...d,ref:t,onMouseDown:Ge(e.onMouseDown,T=>{o?g.onItemFocus(h):T.preventDefault()}),onFocus:Ge(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:Ge(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){g.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const R=Mz(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?Nz(C,O+1):C.slice(O+1)}setTimeout(()=>fO(C))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:w!=null}):c})})});dO.displayName=uO;var Cz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Iz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mz(e,t,n){const o=Iz(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Cz[o]}function fO(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Nz(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Dz=cO,Lz=dO,$g=["Enter"," "],Pz=["ArrowDown","PageUp","Home"],hO=["ArrowUp","PageDown","End"],kz=[...Pz,...hO],jz={ltr:[...$g,"ArrowRight"],rtl:[...$g,"ArrowLeft"]},zz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rc="Menu",[pc,Uz,Bz]=P2(Rc),[Ti,pO]=Oi(Rc,[Bz,Q2,lO]),Oc=Q2(),mO=lO(),[gO,Fa]=Ti(Rc),[Fz,Tc]=Ti(Rc),vO=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:i,onOpenChange:l,modal:c=!0}=e,d=Oc(t),[f,h]=E.useState(null),g=E.useRef(!1),p=Qr(l),y=k2(i);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(iO,{...d,children:b.jsx(gO,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:h,children:b.jsx(Fz,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:y,modal:c,children:o})})})};vO.displayName=Rc;var $z="MenuAnchor",a0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,i=Oc(n);return b.jsx(_z,{...i,...o,ref:t})});a0.displayName=$z;var i0="MenuPortal",[Vz,yO]=Ti(i0,{forceMount:void 0}),bO=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:i}=e,l=Fa(i0,t);return b.jsx(Vz,{scope:t,forceMount:n,children:b.jsx(Zo,{present:n||l.open,children:b.jsx(qv,{asChild:!0,container:i,children:o})})})};bO.displayName=i0;var kr="MenuContent",[Hz,s0]=Ti(kr),_O=E.forwardRef((e,t)=>{const n=yO(kr,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,l=Fa(kr,e.__scopeMenu),c=Tc(kr,e.__scopeMenu);return b.jsx(pc.Provider,{scope:e.__scopeMenu,children:b.jsx(Zo,{present:o||l.open,children:b.jsx(pc.Slot,{scope:e.__scopeMenu,children:c.modal?b.jsx(Gz,{...i,ref:t}):b.jsx(qz,{...i,ref:t})})})})}),Gz=E.forwardRef((e,t)=>{const n=Fa(kr,e.__scopeMenu),o=E.useRef(null),i=dn(t,o);return E.useEffect(()=>{const l=o.current;if(l)return y2(l)},[]),b.jsx(l0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ge(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),qz=E.forwardRef((e,t)=>{const n=Fa(kr,e.__scopeMenu);return b.jsx(l0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Zz=dc("MenuContent.ScrollLock"),l0=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,disableOutsideScroll:S,...w}=e,T=Fa(kr,n),R=Tc(kr,n),A=Oc(n),C=mO(n),O=Uz(n),[M,L]=E.useState(null),N=E.useRef(null),D=dn(t,N,T.onContentChange),z=E.useRef(0),W=E.useRef(""),G=E.useRef(0),K=E.useRef(null),j=E.useRef("right"),ne=E.useRef(0),ae=S?Zv:E.Fragment,P=S?{as:Zz,allowPinchZoom:!0}:void 0,F=re=>{const ye=W.current+re,k=O().filter(be=>!be.disabled),Q=document.activeElement,ee=k.find(be=>be.ref.current===Q)?.textValue,se=k.map(be=>be.textValue),me=aU(se,ye,ee),_e=k.find(be=>be.textValue===me)?.ref.current;(function be(Se){W.current=Se,window.clearTimeout(z.current),Se!==""&&(z.current=window.setTimeout(()=>be(""),1e3))})(ye),_e&&setTimeout(()=>_e.focus())};E.useEffect(()=>()=>window.clearTimeout(z.current),[]),c2();const H=E.useCallback(re=>j.current===K.current?.side&&sU(re,K.current?.area),[]);return b.jsx(Hz,{scope:n,searchRef:W,onItemEnter:E.useCallback(re=>{H(re)&&re.preventDefault()},[H]),onItemLeave:E.useCallback(re=>{H(re)||(N.current?.focus(),L(null))},[H]),onTriggerLeave:E.useCallback(re=>{H(re)&&re.preventDefault()},[H]),pointerGraceTimerRef:G,onPointerGraceIntentChange:E.useCallback(re=>{K.current=re},[]),children:b.jsx(ae,{...P,children:b.jsx(Gv,{asChild:!0,trapped:i,onMountAutoFocus:Ge(l,re=>{re.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:b.jsx(Hv,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,children:b.jsx(Dz,{asChild:!0,...C,dir:R.dir,orientation:"vertical",loop:o,currentTabStopId:M,onCurrentTabStopIdChange:L,onEntryFocus:Ge(f,re=>{R.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(Ez,{role:"menu","aria-orientation":"vertical","data-state":jO(T.open),"data-radix-menu-content":"",dir:R.dir,...A,...w,ref:D,style:{outline:"none",...w.style},onKeyDown:Ge(w.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 se=N.current;if(re.target!==se||!kz.includes(re.key))return;re.preventDefault();const _e=O().filter(be=>!be.disabled).map(be=>be.ref.current);hO.includes(re.key)&&_e.reverse(),rU(_e)}),onBlur:Ge(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(z.current),W.current="")}),onPointerMove:Ge(e.onPointerMove,mc(re=>{const ye=re.target,k=ne.current!==re.clientX;if(re.currentTarget.contains(ye)&&k){const Q=re.clientX>ne.current?"right":"left";j.current=Q,ne.current=re.clientX}}))})})})})})})});_O.displayName=kr;var Yz="MenuGroup",c0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(zt.div,{role:"group",...o,ref:t})});c0.displayName=Yz;var Kz="MenuLabel",EO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(zt.div,{...o,ref:t})});EO.displayName=Kz;var af="MenuItem",zS="menu.itemSelect",Pf=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...i}=e,l=E.useRef(null),c=Tc(af,e.__scopeMenu),d=s0(af,e.__scopeMenu),f=dn(t,l),h=E.useRef(!1),g=()=>{const p=l.current;if(!n&&p){const y=new CustomEvent(zS,{bubbles:!0,cancelable:!0});p.addEventListener(zS,_=>o?.(_),{once:!0}),a2(p,y),y.defaultPrevented?h.current=!1:c.onClose()}};return b.jsx(SO,{...i,ref:f,disabled:n,onClick:Ge(e.onClick,g),onPointerDown:p=>{e.onPointerDown?.(p),h.current=!0},onPointerUp:Ge(e.onPointerUp,p=>{h.current||p.currentTarget?.click()}),onKeyDown:Ge(e.onKeyDown,p=>{const y=d.searchRef.current!=="";n||y&&p.key===" "||$g.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Pf.displayName=af;var SO=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:i,...l}=e,c=s0(af,n),d=mO(n),f=E.useRef(null),h=dn(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(pc.ItemSlot,{scope:n,disabled:o,textValue:i??y,children:b.jsx(Lz,{asChild:!0,...d,focusable:!o,children:b.jsx(zt.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...l,ref:h,onPointerMove:Ge(e.onPointerMove,mc(S=>{o?c.onItemLeave(S):(c.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ge(e.onPointerLeave,mc(S=>c.onItemLeave(S))),onFocus:Ge(e.onFocus,()=>p(!0)),onBlur:Ge(e.onBlur,()=>p(!1))})})})}),Wz="MenuCheckboxItem",wO=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...i}=e;return b.jsx(AO,{scope:e.__scopeMenu,checked:n,children:b.jsx(Pf,{role:"menuitemcheckbox","aria-checked":sf(n)?"mixed":n,...i,ref:t,"data-state":f0(n),onSelect:Ge(i.onSelect,()=>o?.(sf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wO.displayName=Wz;var xO="MenuRadioGroup",[Qz,Xz]=Ti(xO,{value:void 0,onValueChange:()=>{}}),RO=E.forwardRef((e,t)=>{const{value:n,onValueChange:o,...i}=e,l=Qr(o);return b.jsx(Qz,{scope:e.__scopeMenu,value:n,onValueChange:l,children:b.jsx(c0,{...i,ref:t})})});RO.displayName=xO;var OO="MenuRadioItem",TO=E.forwardRef((e,t)=>{const{value:n,...o}=e,i=Xz(OO,e.__scopeMenu),l=n===i.value;return b.jsx(AO,{scope:e.__scopeMenu,checked:l,children:b.jsx(Pf,{role:"menuitemradio","aria-checked":l,...o,ref:t,"data-state":f0(l),onSelect:Ge(o.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});TO.displayName=OO;var u0="MenuItemIndicator",[AO,Jz]=Ti(u0,{checked:!1}),CO=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...i}=e,l=Jz(u0,n);return b.jsx(Zo,{present:o||sf(l.checked)||l.checked===!0,children:b.jsx(zt.span,{...i,ref:t,"data-state":f0(l.checked)})})});CO.displayName=u0;var eU="MenuSeparator",IO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(zt.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});IO.displayName=eU;var tU="MenuArrow",MO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,i=Oc(n);return b.jsx(Sz,{...i,...o,ref:t})});MO.displayName=tU;var d0="MenuSub",[nU,NO]=Ti(d0),DO=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:i}=e,l=Fa(d0,t),c=Oc(t),[d,f]=E.useState(null),[h,g]=E.useState(null),p=Qr(i);return E.useEffect(()=>(l.open===!1&&p(!1),()=>p(!1)),[l.open,p]),b.jsx(iO,{...c,children:b.jsx(gO,{scope:t,open:o,onOpenChange:p,content:h,onContentChange:g,children:b.jsx(nU,{scope:t,contentId:Ma(),triggerId:Ma(),trigger:d,onTriggerChange:f,children:n})})})};DO.displayName=d0;var Wl="MenuSubTrigger",LO=E.forwardRef((e,t)=>{const n=Fa(Wl,e.__scopeMenu),o=Tc(Wl,e.__scopeMenu),i=NO(Wl,e.__scopeMenu),l=s0(Wl,e.__scopeMenu),c=E.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,h={__scopeMenu:e.__scopeMenu},g=E.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return E.useEffect(()=>g,[g]),E.useEffect(()=>{const p=d.current;return()=>{window.clearTimeout(p),f(null)}},[d,f]),b.jsx(a0,{asChild:!0,...h,children:b.jsx(SO,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":jO(n.open),...e,ref:Ec(t,i.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ge(e.onPointerMove,mc(p=>{l.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(l.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Ge(e.onPointerLeave,mc(p=>{g();const y=n.content?.getBoundingClientRect();if(y){const _=n.content?.dataset.side,S=_==="right",w=S?-5:5,T=y[S?"left":"right"],R=y[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:p.clientX+w,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:Ge(e.onKeyDown,p=>{const y=l.searchRef.current!=="";e.disabled||y&&p.key===" "||jz[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});LO.displayName=Wl;var PO="MenuSubContent",kO=E.forwardRef((e,t)=>{const n=yO(kr,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,l=Fa(kr,e.__scopeMenu),c=Tc(kr,e.__scopeMenu),d=NO(PO,e.__scopeMenu),f=E.useRef(null),h=dn(t,f);return b.jsx(pc.Provider,{scope:e.__scopeMenu,children:b.jsx(Zo,{present:o||l.open,children:b.jsx(pc.Slot,{scope:e.__scopeMenu,children:b.jsx(l0,{id:d.contentId,"aria-labelledby":d.triggerId,...i,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{c.isUsingKeyboardRef.current&&f.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Ge(e.onFocusOutside,g=>{g.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Ge(e.onEscapeKeyDown,g=>{c.onClose(),g.preventDefault()}),onKeyDown:Ge(e.onKeyDown,g=>{const p=g.currentTarget.contains(g.target),y=zz[c.dir].includes(g.key);p&&y&&(l.onOpenChange(!1),d.trigger?.focus(),g.preventDefault())})})})})})});kO.displayName=PO;function jO(e){return e?"open":"closed"}function sf(e){return e==="indeterminate"}function f0(e){return sf(e)?"indeterminate":e?"checked":"unchecked"}function rU(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function oU(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function aU(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=oU(e,Math.max(l,0));i.length===1&&(c=c.filter(h=>h!==n));const f=c.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function iU(e,t){const{x:n,y:o}=e;let i=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],f=t[c],h=d.x,g=d.y,p=f.x,y=f.y;g>o!=y>o&&n<(p-h)*(o-g)/(y-g)+h&&(i=!i)}return i}function sU(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return iU(n,t)}function mc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var lU=vO,cU=a0,uU=bO,dU=_O,fU=c0,hU=EO,pU=Pf,mU=wO,gU=RO,vU=TO,yU=CO,bU=IO,_U=MO,EU=DO,SU=LO,wU=kO,kf="DropdownMenu",[xU]=Oi(kf,[pO]),Pn=pO(),[RU,zO]=xU(kf),UO=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:i,defaultOpen:l,onOpenChange:c,modal:d=!0}=e,f=Pn(t),h=E.useRef(null),[g,p]=Sc({prop:i,defaultProp:l??!1,onChange:c,caller:kf});return b.jsx(RU,{scope:t,triggerId:Ma(),triggerRef:h,contentId:Ma(),open:g,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(y=>!y),[p]),modal:d,children:b.jsx(lU,{...f,open:g,onOpenChange:p,dir:o,modal:d,children:n})})};UO.displayName=kf;var BO="DropdownMenuTrigger",FO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...i}=e,l=zO(BO,n),c=Pn(n);return b.jsx(cU,{asChild:!0,...c,children:b.jsx(zt.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":o?"":void 0,disabled:o,...i,ref:Ec(t,l.triggerRef),onPointerDown:Ge(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:Ge(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});FO.displayName=BO;var OU="DropdownMenuPortal",$O=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Pn(t);return b.jsx(uU,{...o,...n})};$O.displayName=OU;var VO="DropdownMenuContent",HO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=zO(VO,n),l=Pn(n),c=E.useRef(!1);return b.jsx(dU,{id:i.contentId,"aria-labelledby":i.triggerId,...l,...o,ref:t,onCloseAutoFocus:Ge(e.onCloseAutoFocus,d=>{c.current||i.triggerRef.current?.focus(),c.current=!1,d.preventDefault()}),onInteractOutside:Ge(e.onInteractOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,g=f.button===2||h;(!i.modal||g)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});HO.displayName=VO;var TU="DropdownMenuGroup",AU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(fU,{...i,...o,ref:t})});AU.displayName=TU;var CU="DropdownMenuLabel",IU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(hU,{...i,...o,ref:t})});IU.displayName=CU;var MU="DropdownMenuItem",GO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(pU,{...i,...o,ref:t})});GO.displayName=MU;var NU="DropdownMenuCheckboxItem",DU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(mU,{...i,...o,ref:t})});DU.displayName=NU;var LU="DropdownMenuRadioGroup",PU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(gU,{...i,...o,ref:t})});PU.displayName=LU;var kU="DropdownMenuRadioItem",jU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(vU,{...i,...o,ref:t})});jU.displayName=kU;var zU="DropdownMenuItemIndicator",UU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(yU,{...i,...o,ref:t})});UU.displayName=zU;var BU="DropdownMenuSeparator",qO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(bU,{...i,...o,ref:t})});qO.displayName=BU;var FU="DropdownMenuArrow",$U=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(_U,{...i,...o,ref:t})});$U.displayName=FU;var VU=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:i,defaultOpen:l}=e,c=Pn(t),[d,f]=Sc({prop:o,defaultProp:l??!1,onChange:i,caller:"DropdownMenuSub"});return b.jsx(EU,{...c,open:d,onOpenChange:f,children:n})},HU="DropdownMenuSubTrigger",ZO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(SU,{...i,...o,ref:t})});ZO.displayName=HU;var GU="DropdownMenuSubContent",YO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(wU,{...i,...o,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)"}})});YO.displayName=GU;var qU=UO,ZU=FO,YU=$O,KU=HO,WU=GO,sG=qO,lG=VU,cG=ZO,uG=YO,QU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ac=QU.reduce((e,t)=>{const n=n2(`Primitive.${t}`),o=E.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),XU="Label",KO=E.forwardRef((e,t)=>b.jsx(Ac.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));KO.displayName=XU;var JU=KO;function eB(e,t=[]){let n=[];function o(l,c){const d=E.createContext(c);d.displayName=l+"Context";const f=n.length;n=[...n,c];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.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(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const i=()=>{const l=n.map(c=>E.createContext(c));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[o,tB(i,...t)]}function tB(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var nB=Qw();function rB(){return nB.useSyncExternalStore(oB,()=>!0,()=>!1)}function oB(){return()=>{}}var h0="Avatar",[aB]=eB(h0),[iB,WO]=aB(h0),QO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[i,l]=E.useState("idle");return b.jsx(iB,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:l,children:b.jsx(Ac.span,{...o,ref:t})})});QO.displayName=h0;var XO="AvatarImage",JO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:i=()=>{},...l}=e,c=WO(XO,n),d=sB(o,l),f=Qr(h=>{i(h),c.onImageLoadingStatusChange(h)});return Wr(()=>{d!=="idle"&&f(d)},[d,f]),d==="loaded"?b.jsx(Ac.img,{...l,ref:t,src:o}):null});JO.displayName=XO;var eT="AvatarFallback",tT=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...i}=e,l=WO(eT,n),[c,d]=E.useState(o===void 0);return E.useEffect(()=>{if(o!==void 0){const f=window.setTimeout(()=>d(!0),o);return()=>window.clearTimeout(f)}},[o]),c&&l.imageLoadingStatus!=="loaded"?b.jsx(Ac.span,{...i,ref:t}):null});tT.displayName=eT;function US(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function sB(e,{referrerPolicy:t,crossOrigin:n}){const o=rB(),i=E.useRef(null),l=o?(i.current||(i.current=new window.Image),i.current):null,[c,d]=E.useState(()=>US(l,e));return Wr(()=>{d(US(l,e))},[l,e]),Wr(()=>{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]),c}var lB=QO,cB=JO,uB=tT;function dB(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function p0(e,t,n=""){const o=dB(e),i=e?.length;if(!o||t!==void 0){const c=n&&`"${n}" `,d="",f=o?`length=${i}`:`type=${typeof e}`;throw new Error(c+"expected Uint8Array"+d+", got "+f)}return e}function BS(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 fB(e,t){p0(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 Vg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Bm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function io(e,t){return e<<32-t|e>>>t}const hB=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",pB=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function mB(e){if(p0(e),hB)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=pB[e[n]];return t}function gB(e,t={}){const n=(i,l)=>e(l).update(i).digest(),o=e(void 0);return n.outputLen=o.outputLen,n.blockLen=o.blockLen,n.create=i=>e(i),Object.assign(n,t),Object.freeze(n)}const vB=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function yB(e,t,n){return e&t^~e&n}function bB(e,t,n){return e&t^e&n^t&n}class _B{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,o,i){this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=i,this.buffer=new Uint8Array(t),this.view=Bm(this.buffer)}update(t){BS(this),p0(t);const{view:n,buffer:o,blockLen:i}=this,l=t.length;for(let c=0;c<l;){const d=Math.min(i-this.pos,l-c);if(d===i){const f=Bm(t);for(;i<=l-c;c+=i)this.process(f,c);continue}o.set(t.subarray(c,c+d),this.pos),this.pos+=d,c+=d,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){BS(this),fB(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:i,isLE:l}=this;let{pos:c}=this;n[c++]=128,Vg(this.buffer.subarray(c)),this.padOffset>i-c&&(this.process(o,0),c=0);for(let p=c;p<i;p++)n[p]=0;o.setBigUint64(i-8,BigInt(this.length*8),l),this.process(o,0);const d=Bm(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 o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:o,length:i,finished:l,destroyed:c,pos:d}=this;return t.destroyed=c,t.finished=l,t.length=i,t.pos=d,i%n&&t.buffer.set(o),t}clone(){return this._cloneInto()}}const Ea=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),EB=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]),Sa=new Uint32Array(64);class SB extends _B{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:o,D:i,E:l,F:c,G:d,H:f}=this;return[t,n,o,i,l,c,d,f]}set(t,n,o,i,l,c,d,f){this.A=t|0,this.B=n|0,this.C=o|0,this.D=i|0,this.E=l|0,this.F=c|0,this.G=d|0,this.H=f|0}process(t,n){for(let p=0;p<16;p++,n+=4)Sa[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const y=Sa[p-15],_=Sa[p-2],S=io(y,7)^io(y,18)^y>>>3,w=io(_,17)^io(_,19)^_>>>10;Sa[p]=w+Sa[p-7]+S+Sa[p-16]|0}let{A:o,B:i,C:l,D:c,E:d,F:f,G:h,H:g}=this;for(let p=0;p<64;p++){const y=io(d,6)^io(d,11)^io(d,25),_=g+y+yB(d,f,h)+EB[p]+Sa[p]|0,w=(io(o,2)^io(o,13)^io(o,22))+bB(o,i,l)|0;g=h,h=f,f=d,d=c+_|0,c=l,l=i,i=o,o=_+w|0}o=o+this.A|0,i=i+this.B|0,l=l+this.C|0,c=c+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(o,i,l,c,d,f,h,g)}roundClean(){Vg(Sa)}destroy(){this.set(0,0,0,0,0,0,0,0),Vg(this.buffer)}}class wB extends SB{A=Ea[0]|0;B=Ea[1]|0;C=Ea[2]|0;D=Ea[3]|0;E=Ea[4]|0;F=Ea[5]|0;G=Ea[6]|0;H=Ea[7]|0;constructor(){super(32)}}const xB=gB(()=>new wB,vB(1));function RB(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 jf="Checkbox",[OB]=Oi(jf),[TB,m0]=OB(jf);function AB(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:i,disabled:l,form:c,name:d,onCheckedChange:f,required:h,value:g="on",internal_do_not_use_render:p}=e,[y,_]=Sc({prop:n,defaultProp:i??!1,onChange:f,caller:jf}),[S,w]=E.useState(null),[T,R]=E.useState(null),A=E.useRef(!1),C=S?!!c||!!S.closest("form"):!0,O={checked:y,disabled:l,setChecked:_,control:S,setControl:w,name:d,form:c,value:g,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:Na(i)?!1:i,isFormControl:C,bubbleInput:T,setBubbleInput:R};return b.jsx(TB,{scope:t,...O,children:CB(p)?p(O):o})}var nT="CheckboxTrigger",rT=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},i)=>{const{control:l,value:c,disabled:d,checked:f,required:h,setControl:g,setChecked:p,hasConsumerStoppedPropagationRef:y,isFormControl:_,bubbleInput:S}=m0(nT,e),w=dn(i,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(zt.button,{type:"button",role:"checkbox","aria-checked":Na(f)?"mixed":f,"aria-required":h,"data-state":cT(f),"data-disabled":d?"":void 0,disabled:d,value:c,...o,ref:w,onKeyDown:Ge(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:Ge(n,R=>{p(A=>Na(A)?!0:!A),S&&_&&(y.current=R.isPropagationStopped(),y.current||R.stopPropagation())})})});rT.displayName=nT;var oT=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:i,defaultChecked:l,required:c,disabled:d,value:f,onCheckedChange:h,form:g,...p}=e;return b.jsx(AB,{__scopeCheckbox:n,checked:i,defaultChecked:l,disabled:d,required:c,onCheckedChange:h,name:o,form:g,value:f,internal_do_not_use_render:({isFormControl:y})=>b.jsxs(b.Fragment,{children:[b.jsx(rT,{...p,ref:t,__scopeCheckbox:n}),y&&b.jsx(lT,{__scopeCheckbox:n})]})})});oT.displayName=jf;var aT="CheckboxIndicator",iT=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...i}=e,l=m0(aT,n);return b.jsx(Zo,{present:o||Na(l.checked)||l.checked===!0,children:b.jsx(zt.span,{"data-state":cT(l.checked),"data-disabled":l.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});iT.displayName=aT;var sT="CheckboxBubbleInput",lT=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:l,defaultChecked:c,required:d,disabled:f,name:h,value:g,form:p,bubbleInput:y,setBubbleInput:_}=m0(sT,e),S=dn(n,_),w=RB(l),T=K2(o);E.useEffect(()=>{const A=y;if(!A)return;const C=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(C,"checked").set,L=!i.current;if(w!==l&&M){const N=new Event("click",{bubbles:L});A.indeterminate=Na(l),M.call(A,Na(l)?!1:l),A.dispatchEvent(N)}},[y,w,l,i]);const R=E.useRef(Na(l)?!1:l);return b.jsx(zt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??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%)"}})});lT.displayName=sT;function CB(e){return typeof e=="function"}function Na(e){return e==="indeterminate"}function cT(e){return Na(e)?"indeterminate":e?"checked":"unchecked"}var uT={OBJECT:"object",UNDEFINED:"undefined"},dd="browser",FS="cpu",$S="device",Fm="engine",fd="os",xa="name",lf="type",Hg="vendor",Gr="version",Gg="architecture",qg="major",Zg="model",IB="console",MB="mobile",NB="tablet",DB="smarttv",LB="wearable",PB="embedded",kB=typeof window!==uT.UNDEFINED,$m=kB&&window.navigator?window.navigator:void 0;$m&&$m.userAgentData&&$m.userAgentData;var zf=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},hd=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==uT.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return hd.call(e.init,[[dd,[xa,Gr,qg,lf]],[FS,[Gg]],[$S,[lf,Zg,Hg]],[Fm,[xa,Gr]],[fd,[xa,Gr]]]),hd.call(e.isIgnore,[[dd,[Gr,qg]],[Fm,[Gr]],[fd,[Gr]]]),hd.call(e.isIgnoreRgx,[[dd,/ ?browser$/i],[fd,/ ?os$/i]]),hd.call(e.toString,[[dd,[xa,Gr]],[FS,[Gg]],[$S,[Hg,Zg]],[Fm,[xa,Gr]],[fd,[xa,Gr]]]),e})();zf([xa,Gr,qg,lf]);zf([Gg]);zf([Zg,Hg,lf,IB,MB,DB,NB,LB,PB]);zf([xa,Gr]);function fo(e){const t=new Uint8Array(e);let n="";for(const i of t)n+=String.fromCharCode(i);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function cf(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,o=t.padEnd(t.length+n,"="),i=atob(o),l=new ArrayBuffer(i.length),c=new Uint8Array(l);for(let d=0;d<i.length;d++)c[d]=i.charCodeAt(d);return l}function g0(){return jB.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const jB={stubThis:e=>e};function dT(e){const{id:t}=e;return{...e,id:cf(t),transports:e.transports}}function fT(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class gn extends Error{constructor({message:t,code:n,cause:o,name:i}){super(t,{cause:o}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i??o.name,this.code=n}}function zB({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 gn({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 gn({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 gn({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 gn({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 gn({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new gn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(i=>i.type==="public-key").length===0?new gn({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new gn({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 o=globalThis.location.hostname;if(fT(o)){if(n.rp.id!==o)return new gn({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new gn({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 gn({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 gn({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 UB{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 hT=new UB,BB=["cross-platform","platform"];function pT(e){if(e&&!(BB.indexOf(e)<0))return e}async function FB(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(!g0())throw new Error("WebAuthn is not supported in this browser");const o={...t,challenge:cf(t.challenge),user:{...t.user,id:cf(t.user.id)},excludeCredentials:t.excludeCredentials?.map(dT)},i={};n&&(i.mediation="conditional"),i.publicKey=o,i.signal=hT.createNewAbortSignal();let l;try{l=await navigator.credentials.create(i)}catch(S){throw zB({error:S,options:i})}if(!l)throw new Error("Registration was not completed");const{id:c,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){Vm("getPublicKeyAlgorithm()",S)}let y;if(typeof f.getPublicKey=="function")try{const S=f.getPublicKey();S!==null&&(y=fo(S))}catch(S){Vm("getPublicKey()",S)}let _;if(typeof f.getAuthenticatorData=="function")try{_=fo(f.getAuthenticatorData())}catch(S){Vm("getAuthenticatorData()",S)}return{id:c,rawId:fo(d),response:{attestationObject:fo(f.attestationObject),clientDataJSON:fo(f.clientDataJSON),transports:g,publicKeyAlgorithm:p,publicKey:y,authenticatorData:_},type:h,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:pT(l.authenticatorAttachment)}}function Vm(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
106
|
-
`,t)}function $B(){if(!g0())return Hm.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Hm.stubThis(new Promise(t=>t(!1))):Hm.stubThis(e.isConditionalMediationAvailable())}const Hm={stubThis:e=>e};function VB({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 gn({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new gn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const o=globalThis.location.hostname;if(fT(o)){if(n.rpId!==o)return new gn({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new gn({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new gn({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 HB(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:o=!0}=e;if(!g0())throw new Error("WebAuthn is not supported in this browser");let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(dT));const l={...t,challenge:cf(t.challenge),allowCredentials:i},c={};if(n){if(!await $B())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&o)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');c.mediation="conditional",l.allowCredentials=[]}c.publicKey=l,c.signal=hT.createNewAbortSignal();let d;try{d=await navigator.credentials.get(c)}catch(_){throw VB({error:_,options:c})}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=fo(g.userHandle)),{id:f,rawId:fo(h),response:{authenticatorData:fo(g.authenticatorData),clientDataJSON:fo(g.clientDataJSON),signature:fo(g.signature),userHandle:y},type:p,clientExtensionResults:d.getClientExtensionResults(),authenticatorAttachment:pT(d.authenticatorAttachment)}}const GB=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(l,c)=>{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 HB({optionsJSON:d.data,useBrowserAutofill:l?.autoFill})},...l?.fetchOptions,...c,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,c)=>{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 FB({optionsJSON:d.data,useAutoRegister:l?.useAutoRegister}),h=await e("/passkey/verify-registration",{...l?.fetchOptions,...c,body:{response:f,name:l?.name},method:"POST",throw:!1});return h.data&&t.set(Math.random()),h}catch(f){return f instanceof gn?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:{}}),qB=()=>{const e=di();return{id:"passkey",$InferServerPlugin:{},getActions:(t,n)=>GB(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:Rs(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 ZB(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 mT=$.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}),Cc=()=>{const e=$.useContext(mT);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ZB(`[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(
|
|
107
|
-
[data-state=closed]
|
|
108
|
-
){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 YB(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function KB(){return v0(/^Mac/)}function WB(){return v0(/^iPhone/)}function VS(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function QB(){return v0(/^iPad/)||KB()&&navigator.maxTouchPoints>1}function gT(){return WB()||QB()}function v0(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const XB=24,JB=typeof window<"u"?E.useLayoutEffect:E.useEffect;function HS(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Gm=typeof document<"u"&&window.visualViewport;function GS(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function vT(e){for(GS(e)&&(e=e.parentElement);e&&!GS(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const eF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let pd=0,qm;function tF(e={}){let{isDisabled:t}=e;JB(()=>{if(!t)return pd++,pd===1&&gT()&&(qm=nF()),()=>{pd--,pd===0&&qm?.()}},[t])}function nF(){let e,t=0,n=p=>{e=vT(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},o=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)},i=p=>{let y=p.target;Yg(y)&&y!==document.activeElement&&(p.preventDefault(),y.style.transform="translateY(-2000px)",y.focus(),requestAnimationFrame(()=>{y.style.transform=""}))},l=p=>{let y=p.target;Yg(y)&&(y.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{y.style.transform="",Gm&&(Gm.height<window.innerHeight?requestAnimationFrame(()=>{qS(y)}):Gm.addEventListener("resize",()=>qS(y),{once:!0}))}))},c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset,h=HS(rF(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let g=HS(Vl(document,"touchstart",n,{passive:!1,capture:!0}),Vl(document,"touchmove",o,{passive:!1,capture:!0}),Vl(document,"touchend",i,{passive:!1,capture:!0}),Vl(document,"focus",l,!0),Vl(window,"scroll",c));return()=>{h(),g(),window.scrollTo(d,f)}}function rF(e,t,n){let o=e.style[t];return e.style[t]=n,()=>{e.style[t]=o}}function Vl(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function qS(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=vT(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let o=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const c=n.getBoundingClientRect().bottom+XB;l>c&&(n.scrollTop+=i-o)}e=n.parentElement}}function Yg(e){return e instanceof HTMLInputElement&&!eF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function oF(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function aF(...e){return t=>e.forEach(n=>oF(n,t))}function yT(...e){return E.useCallback(aF(...e),e)}const bT=new WeakMap;function cn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let o={};Object.entries(t).forEach(([i,l])=>{if(i.startsWith("--")){e.style.setProperty(i,l);return}o[i]=e.style[i],e.style[i]=l}),!n&&bT.set(e,o)}function iF(e,t){if(!e||!(e instanceof HTMLElement))return;let n=bT.get(e);n&&(e.style[t]=n[t])}const tn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function md(e,t){if(!e)return null;const n=window.getComputedStyle(e),o=n.transform||n.webkitTransform||n.mozTransform;let i=o.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[tn(t)?13:12]):(i=o.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[tn(t)?5:4]):null)}function sF(e){return 8*(Math.log(e+1)-2)}function Zm(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function lF(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Pt={DURATION:.5,EASE:[.32,.72,0,1]},_T=.4,cF=.25,uF=100,ET=8,si=16,Kg=26,Ym="vaul-dragging";function ST(e){const t=$.useRef(e);return $.useEffect(()=>{t.current=e}),$.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function dF({defaultProp:e,onChange:t}){const n=$.useState(e),[o]=n,i=$.useRef(o),l=ST(t);return $.useEffect(()=>{i.current!==o&&(l(o),i.current=o)},[o,i,l]),n}function wT({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=dF({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o,d=ST(n),f=$.useCallback(h=>{if(l){const p=typeof h=="function"?h(e):h;p!==e&&d(p)}else i(h)},[l,e,i,d]);return[c,f]}function fF({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:o,overlayRef:i,fadeFromIndex:l,onSnapPointChange:c,direction:d="bottom",container:f,snapToSequentialPoint:h}){const[g,p]=wT({prop:e,defaultProp:n?.[0],onChange:t}),[y,_]=$.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);$.useEffect(()=>{function N(){_({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const S=$.useMemo(()=>g===n?.[n.length-1]||null,[n,g]),w=$.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=$.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(z=>{const W=typeof z=="string";let G=0;if(W&&(G=parseInt(z,10)),tn(d)){const j=W?G:y?z*N.height:0;return y?d==="bottom"?N.height-j:-N.height+j:j}const K=W?G:y?z*N.width:0;return y?d==="right"?N.width-K:-N.width+K:K}))!=null?D:[]},[n,y,f]),A=$.useMemo(()=>w!==null?R?.[w]:null,[R,w]),C=$.useCallback(N=>{var D;const z=(D=R?.findIndex(W=>W===N))!=null?D:null;c(z),cn(o.current,{transition:`transform ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`,transform:tn(d)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`}),R&&z!==R.length-1&&l!==void 0&&z!==l&&z<l?cn(i.current,{transition:`opacity ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`,opacity:"0"}):cn(i.current,{transition:`opacity ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max(z,0)])},[o.current,n,R,l,i,p]);$.useEffect(()=>{if(g||e){var N;const D=(N=n?.findIndex(z=>z===e||z===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:z,dismissible:W}){if(l===void 0)return;const G=d==="bottom"||d==="right"?(A??0)-N:(A??0)+N,K=w===l-1,j=w===0,ne=N>0;if(K&&cn(i.current,{transition:`opacity ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`}),!h&&z>2&&!ne){W?D():C(R[0]);return}if(!h&&z>2&&ne&&R&&n){C(R[n.length-1]);return}const ae=R?.reduce((F,H)=>typeof F!="number"||typeof H!="number"?F:Math.abs(H-G)<Math.abs(F-G)?H:F),P=tn(d)?window.innerHeight:window.innerWidth;if(z>_T&&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&&W&&D(),w===null)return;C(R[w+F]);return}C(ae)}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]||cn(o.current,{transform:tn(d)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function L(N,D){if(!n||typeof w!="number"||!R||l===void 0)return null;const z=w===l-1;if(w>=l&&D)return 0;if(z&&!D)return 1;if(!T&&!z)return null;const G=z?w+1:w-1,K=z?R[G]-R[G-1]:R[G+1]-R[G],j=N/Math.abs(K);return z?1-j:j}return{isLastSnapPoint:S,activeSnapPoint:g,shouldFade:T,getPercentageDragged:L,setActiveSnapPoint:p,activeSnapPointIndex:w,onRelease:O,onDrag:M,snapPointsOffset:R}}const hF=()=>()=>{};function pF(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:o,noBodyStyles:i}=Cc(),l=$.useRef(null),c=E.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-Kg)/window.innerWidth}$.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;lF(o&&!i?Zm(document.body,{background:"black"}):hF,Zm(f,{transformOrigin:tn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Pt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Pt.EASE.join(",")})`}));const h=Zm(f,{borderRadius:`${ET}px`,overflow:"hidden",...tn(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(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},Pt.DURATION*1e3)}}},[t,n,c])}let Hl=null;function mF({isOpen:e,modal:t,nested:n,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:l}){const[c,d]=$.useState(()=>typeof window<"u"?window.location.href:""),f=$.useRef(0),h=$.useCallback(()=>{if(VS()&&Hl===null&&e&&!l){Hl={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=$.useCallback(()=>{if(VS()&&Hl!==null&&!l){const p=-parseInt(document.body.style.top,10),y=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Hl),window.requestAnimationFrame(()=>{if(i&&c!==window.location.href){d(window.location.href);return}window.scrollTo(y,p)}),Hl=null}},[c]);return $.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),$.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||g()}},[t,g]),$.useEffect(()=>{n||!o||(e?(!window.matchMedia("(display-mode: standalone)").matches&&h(),t||window.setTimeout(()=>{g()},500)):g())},[e,o,c,t,n,h,g]),{restorePositionSetting:g}}function gF({open:e,onOpenChange:t,children:n,onDrag:o,onRelease:i,snapPoints:l,shouldScaleBackground:c=!1,setBackgroundColorOnScale:d=!0,closeThreshold:f=cF,scrollLockTimeout:h=uF,dismissible:g=!0,handleOnly:p=!1,fadeFromIndex:y=l&&l.length-1,activeSnapPoint:_,setActiveSnapPoint:S,fixed:w,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:z=!0,onAnimationEnd:W,container:G,autoFocus:K=!1}){var j,ne;const[ae=!1,P]=wT({defaultProp:M,prop:e,onChange:Ie=>{t?.(Ie),!Ie&&!A&&xe(),setTimeout(()=>{W?.(Ie)},Pt.DURATION*1e3),Ie&&!T&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Ie||(document.body.style.pointerEvents="auto")}}),[F,H]=$.useState(!1),[re,ye]=$.useState(!1),[k,Q]=$.useState(!1),ee=$.useRef(null),se=$.useRef(null),me=$.useRef(null),_e=$.useRef(null),be=$.useRef(null),Se=$.useRef(!1),De=$.useRef(null),Le=$.useRef(0),Ee=$.useRef(!1),ze=$.useRef(!M),Nt=$.useRef(0),ve=$.useRef(null),ge=$.useRef(((j=ve.current)==null?void 0:j.getBoundingClientRect().height)||0),Re=$.useRef(((ne=ve.current)==null?void 0:ne.getBoundingClientRect().width)||0),ke=$.useRef(0),et=$.useCallback(Ie=>{l&&Ie===Z.length-1&&(se.current=new Date)},[]),{activeSnapPoint:Ue,activeSnapPointIndex:We,setActiveSnapPoint:U,onRelease:q,snapPointsOffset:Z,onDrag:ue,shouldFade:pe,getPercentageDragged:he}=fF({snapPoints:l,activeSnapPointProp:_,setActiveSnapPointProp:S,drawerRef:ve,fadeFromIndex:y,overlayRef:ee,onSnapPointChange:et,direction:O,container:G,snapToSequentialPoint:N});tF({isDisabled:!ae||re||!T||k||!F||!z||!L});const{restorePositionSetting:xe}=mF({isOpen:ae,modal:T,nested:A??!1,hasBeenOpened:F,preventScrollRestoration:D,noBodyStyles:C});function Be(){return(window.innerWidth-Kg)/window.innerWidth}function Qe(Ie){var tt,it;!g&&!l||ve.current&&!ve.current.contains(Ie.target)||(ge.current=((tt=ve.current)==null?void 0:tt.getBoundingClientRect().height)||0,Re.current=((it=ve.current)==null?void 0:it.getBoundingClientRect().width)||0,ye(!0),me.current=new Date,gT()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),Ie.target.setPointerCapture(Ie.pointerId),Le.current=tn(O)?Ie.pageY:Ie.pageX)}function wt(Ie,tt){var it;let Ze=Ie;const st=(it=window.getSelection())==null?void 0:it.toString(),Me=ve.current?md(ve.current,O):null,Ye=new Date;if(Ze.tagName==="SELECT"||Ze.hasAttribute("data-vaul-no-drag")||Ze.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(se.current&&Ye.getTime()-se.current.getTime()<500)return!1;if(Me!==null&&(O==="bottom"?Me>0:Me<0))return!0;if(st&&st.length>0)return!1;if(be.current&&Ye.getTime()-be.current.getTime()<h&&Me===0||tt)return be.current=Ye,!1;for(;Ze;){if(Ze.scrollHeight>Ze.clientHeight){if(Ze.scrollTop!==0)return be.current=new Date,!1;if(Ze.getAttribute("role")==="dialog")return!0}Ze=Ze.parentNode}return!0}function tr(Ie){if(ve.current&&re){const tt=O==="bottom"||O==="right"?1:-1,it=(Le.current-(tn(O)?Ie.pageY:Ie.pageX))*tt,Ze=it>0,st=l&&!g&&!Ze;if(st&&We===0)return;const Me=Math.abs(it),Ye=document.querySelector("[data-vaul-drawer-wrapper]"),xt=O==="bottom"||O==="top"?ge.current:Re.current;let yt=Me/xt;const In=he(Me,Ze);if(In!==null&&(yt=In),st&&yt>=1||!Se.current&&!wt(Ie.target,Ze))return;if(ve.current.classList.add(Ym),Se.current=!0,cn(ve.current,{transition:"none"}),cn(ee.current,{transition:"none"}),l&&ue({draggedDistance:it}),Ze&&!l){const Ct=sF(it),br=Math.min(Ct*-1,0)*tt;cn(ve.current,{transform:tn(O)?`translate3d(0, ${br}px, 0)`:`translate3d(${br}px, 0, 0)`});return}const lt=1-yt;if((pe||y&&We===y-1)&&(o?.(Ie,yt),cn(ee.current,{opacity:`${lt}`,transition:"none"},!0)),Ye&&ee.current&&c){const Ct=Math.min(Be()+yt*(1-Be()),1),br=8-yt*8,_n=Math.max(0,14-yt*14);cn(Ye,{borderRadius:`${br}px`,transform:tn(O)?`scale(${Ct}) translate3d(0, ${_n}px, 0)`:`scale(${Ct}) translate3d(${_n}px, 0, 0)`,transition:"none"},!0)}if(!l){const Ct=Me*tt;cn(ve.current,{transform:tn(O)?`translate3d(0, ${Ct}px, 0)`:`translate3d(${Ct}px, 0, 0)`})}}}$.useEffect(()=>{window.requestAnimationFrame(()=>{ze.current=!0})},[]),$.useEffect(()=>{var Ie;function tt(){if(!ve.current||!z)return;const it=document.activeElement;if(Yg(it)||Ee.current){var Ze;const st=((Ze=window.visualViewport)==null?void 0:Ze.height)||0,Me=window.innerHeight;let Ye=Me-st;const xt=ve.current.getBoundingClientRect().height||0,yt=xt>Me*.8;ke.current||(ke.current=xt);const In=ve.current.getBoundingClientRect().top;if(Math.abs(Nt.current-Ye)>60&&(Ee.current=!Ee.current),l&&l.length>0&&Z&&We){const lt=Z[We]||0;Ye+=lt}if(Nt.current=Ye,xt>st||Ee.current){const lt=ve.current.getBoundingClientRect().height;let Ct=lt;lt>st&&(Ct=st-(yt?In:Kg)),w?ve.current.style.height=`${lt-Math.max(Ye,0)}px`:ve.current.style.height=`${Math.max(Ct,st-In)}px`}else YB()||(ve.current.style.height=`${ke.current}px`);l&&l.length>0&&!Ee.current?ve.current.style.bottom="0px":ve.current.style.bottom=`${Math.max(Ye,0)}px`}}return(Ie=window.visualViewport)==null||Ie.addEventListener("resize",tt),()=>{var it;return(it=window.visualViewport)==null?void 0:it.removeEventListener("resize",tt)}},[We,l,Z]);function Tt(Ie){At(),R?.(),Ie||P(!1),setTimeout(()=>{l&&U(l[0])},Pt.DURATION*1e3)}function Zt(){if(!ve.current)return;const Ie=document.querySelector("[data-vaul-drawer-wrapper]"),tt=md(ve.current,O);cn(ve.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`}),cn(ee.current,{transition:`opacity ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`,opacity:"1"}),c&&tt&&tt>0&&ae&&cn(Ie,{borderRadius:`${ET}px`,overflow:"hidden",...tn(O)?{transform:`scale(${Be()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Be()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Pt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Pt.EASE.join(",")})`},!0)}function At(){!re||!ve.current||(ve.current.classList.remove(Ym),Se.current=!1,ye(!1),_e.current=new Date)}function on(Ie){if(!re||!ve.current)return;ve.current.classList.remove(Ym),Se.current=!1,ye(!1),_e.current=new Date;const tt=md(ve.current,O);if(!Ie||!wt(Ie.target,!1)||!tt||Number.isNaN(tt)||me.current===null)return;const it=_e.current.getTime()-me.current.getTime(),Ze=Le.current-(tn(O)?Ie.pageY:Ie.pageX),st=Math.abs(Ze)/it;if(st>.05&&(Q(!0),setTimeout(()=>{Q(!1)},200)),l){q({draggedDistance:Ze*(O==="bottom"||O==="right"?1:-1),closeDrawer:Tt,velocity:st,dismissible:g}),i?.(Ie,!0);return}if(O==="bottom"||O==="right"?Ze>0:Ze<0){Zt(),i?.(Ie,!0);return}if(st>_T){Tt(),i?.(Ie,!1);return}var Me;const Ye=Math.min((Me=ve.current.getBoundingClientRect().height)!=null?Me:0,window.innerHeight);var xt;const yt=Math.min((xt=ve.current.getBoundingClientRect().width)!=null?xt:0,window.innerWidth),In=O==="left"||O==="right";if(Math.abs(tt)>=(In?yt:Ye)*f){Tt(),i?.(Ie,!1);return}i?.(Ie,!0),Zt()}$.useEffect(()=>(ae&&(cn(document.documentElement,{scrollBehavior:"auto"}),se.current=new Date),()=>{iF(document.documentElement,"scrollBehavior")}),[ae]);function Yt(Ie){const tt=Ie?(window.innerWidth-si)/window.innerWidth:1,it=Ie?-si:0;De.current&&window.clearTimeout(De.current),cn(ve.current,{transition:`transform ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`,transform:tn(O)?`scale(${tt}) translate3d(0, ${it}px, 0)`:`scale(${tt}) translate3d(${it}px, 0, 0)`}),!Ie&&ve.current&&(De.current=setTimeout(()=>{const Ze=md(ve.current,O);cn(ve.current,{transition:"none",transform:tn(O)?`translate3d(0, ${Ze}px, 0)`:`translate3d(${Ze}px, 0, 0)`})},500))}function Yo(Ie,tt){if(tt<0)return;const it=(window.innerWidth-si)/window.innerWidth,Ze=it+tt*(1-it),st=-si+tt*si;cn(ve.current,{transform:tn(O)?`scale(${Ze}) translate3d(0, ${st}px, 0)`:`scale(${Ze}) translate3d(${st}px, 0, 0)`,transition:"none"})}function So(Ie,tt){const it=tn(O)?window.innerHeight:window.innerWidth,Ze=tt?(it-si)/it:1,st=tt?-si:0;tt&&cn(ve.current,{transition:`transform ${Pt.DURATION}s cubic-bezier(${Pt.EASE.join(",")})`,transform:tn(O)?`scale(${Ze}) translate3d(0, ${st}px, 0)`:`scale(${Ze}) translate3d(${st}px, 0, 0)`})}return $.useEffect(()=>{T||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[T]),$.createElement(Kj,{defaultOpen:M,onOpenChange:Ie=>{!g&&!Ie||(Ie?H(!0):Tt(!0),P(Ie))},open:ae},$.createElement(mT.Provider,{value:{activeSnapPoint:Ue,snapPoints:l,setActiveSnapPoint:U,drawerRef:ve,overlayRef:ee,onOpenChange:t,onPress:Qe,onRelease:on,onDrag:tr,dismissible:g,shouldAnimate:ze,handleOnly:p,isOpen:ae,isDragging:re,shouldFade:pe,closeDrawer:Tt,onNestedDrag:Yo,onNestedOpenChange:Yt,onNestedRelease:So,keyboardIsOpen:Ee,modal:T,snapPointsOffset:Z,activeSnapPointIndex:We,direction:O,shouldScaleBackground:c,setBackgroundColorOnScale:d,noBodyStyles:C,container:G,autoFocus:K}},n))}const xT=$.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:o,onRelease:i,shouldFade:l,isOpen:c,modal:d,shouldAnimate:f}=Cc(),h=yT(t,n),g=o&&o.length>0;if(!d)return null;const p=$.useCallback(y=>i(y),[i]);return $.createElement(Xj,{onMouseUp:p,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":c&&g?"true":"false","data-vaul-snap-points-overlay":c&&l?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});xT.displayName="Drawer.Overlay";const RT=$.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...o},i){const{drawerRef:l,onPress:c,onRelease:d,onDrag:f,keyboardIsOpen:h,snapPointsOffset:g,activeSnapPointIndex:p,modal:y,isOpen:_,direction:S,snapPoints:w,container:T,handleOnly:R,shouldAnimate:A,autoFocus:C}=Cc(),[O,M]=$.useState(!1),L=yT(i,l),N=$.useRef(null),D=$.useRef(null),z=$.useRef(!1),W=w&&w.length>0;pF();const G=(j,ne,ae=0)=>{if(z.current)return!0;const P=Math.abs(j.y),F=Math.abs(j.x),H=F>P,re=["bottom","right"].includes(ne)?1:-1;if(ne==="left"||ne==="right"){if(!(j.x*re<0)&&F>=0&&F<=ae)return H}else if(!(j.y*re<0)&&P>=0&&P<=ae)return!H;return z.current=!0,!0};$.useEffect(()=>{W&&window.requestAnimationFrame(()=>{M(!0)})},[]);function K(j){N.current=null,z.current=!1,d(j)}return $.createElement(Jj,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":_&&W?"true":"false","data-vaul-custom-container":T?"true":"false","data-vaul-animate":A?.current?"true":"false",...o,ref:L,style:g&&g.length>0?{"--snap-point-height":`${g[p??0]}px`,...t}:t,onPointerDown:j=>{R||(o.onPointerDown==null||o.onPointerDown.call(o,j),N.current={x:j.pageX,y:j.pageY},c(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||(o.onPointerMove==null||o.onPointerMove.call(o,j),!N.current))return;const ne=j.pageY-N.current.y,ae=j.pageX-N.current.x,P=j.pointerType==="touch"?10:2;G({x:ae,y:ne},S,P)?f(j):(Math.abs(ae)>P||Math.abs(ne)>P)&&(N.current=null)},onPointerUp:j=>{o.onPointerUp==null||o.onPointerUp.call(o,j),N.current=null,z.current=!1,d(j)},onPointerOut:j=>{o.onPointerOut==null||o.onPointerOut.call(o,j),K(D.current)},onContextMenu:j=>{o.onContextMenu==null||o.onContextMenu.call(o,j),D.current&&K(D.current)}})});RT.displayName="Drawer.Content";const vF=250,yF=120,bF=$.forwardRef(function({preventCycle:e=!1,children:t,...n},o){const{closeDrawer:i,isDragging:l,snapPoints:c,activeSnapPoint:d,setActiveSnapPoint:f,dismissible:h,handleOnly:g,isOpen:p,onPress:y,onDrag:_}=Cc(),S=$.useRef(null),w=$.useRef(!1);function T(){if(w.current){C();return}window.setTimeout(()=>{R()},yF)}function R(){if(l||e||w.current){C();return}if(C(),!c||c.length===0){h||i();return}if(d===c[c.length-1]&&h){i();return}const M=c.findIndex(N=>N===d);if(M===-1)return;const L=c[M+1];f(L)}function A(){S.current=window.setTimeout(()=>{w.current=!0},vF)}function C(){S.current&&window.clearTimeout(S.current),w.current=!1}return $.createElement("div",{onClick:T,onPointerCancel:C,onPointerDown:O=>{g&&y(O),A()},onPointerMove:O=>{g&&_(O)},ref:o,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},$.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});bF.displayName="Drawer.Handle";function _F(e){const t=Cc(),{container:n=t.container,...o}=e;return $.createElement(Qj,{container:n,...o})}const dG={Root:gF,Content:RT,Overlay:xT,Trigger:Wj,Portal:_F,Title:e9};var Ns=(e,t,n)=>new Promise((o,i)=>{var l=f=>{try{d(n.next(f))}catch(h){i(h)}},c=f=>{try{d(n.throw(f))}catch(h){i(h)}},d=f=>f.done?o(f.value):Promise.resolve(f.value).then(l,c);d((n=n.apply(e,t)).next())}),Cd=class extends Error{},EF=class extends Error{},SF=e=>Math.exp(e)*150,wF=(e,...t)=>Ns(void 0,[e,...t],function*(n,{attempts:o=4}={}){var i;let l;for(let c=0;c<o;c++)try{return yield n()}catch(d){l=d,yield new Promise(f=>setTimeout(f,SF(c)))}throw new Cd((i=l?.message)!=null?i:"Exhausted all retries")}),Gl,OT="captchaFoxOnLoad",ZS=`https://cdn.captchafox.com/api.js?render=explicit&onload=${OT}`;function xF(){return Ns(this,arguments,function*({nonce:e}={}){return Gl&&document.querySelector(`script[src="${ZS}"]`)||(Gl=new Promise((t,n)=>{window[OT]=t;const o=document.createElement("script");o.src=ZS,o.async=!0,o.defer=!0,o.onerror=i=>{o.remove(),Gl=void 0,n(i)},e&&(o.nonce=e),document.body.appendChild(o)})),Gl})}function RF(){return Ns(this,arguments,function*(e={}){return wF(()=>xF(e))})}var bs=()=>typeof window?.captchafox<"u",TT=E.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:o,theme:i,className:l,nonce:c,i18n:d,onError:f,onVerify:h,onLoad:g,onFail:p,onClose:y,onChallengeChange:_,onChallengeOpen:S},w)=>{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(w,()=>({getResponse(){return!bs()||!A?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(A)},reset(){if(!bs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(A)},remove(){if(!bs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(A)},execute:()=>Ns(void 0,null,function*(){if(D.current)return Promise.reject(new Cd);if(!bs()||!A)return W();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(()=>()=>{z()},[]),E.useEffect(()=>{T&&(O.current?bs()&&K():RF({nonce:c}).then(()=>Ns(void 0,null,function*(){bs()&&(O.current=!0,yield K())})).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,o]);const z=()=>{clearTimeout(L.current)},W=()=>new Promise((j,ne)=>{N.current=()=>{z(),ne(new Cd)},L.current=setTimeout(()=>{ne(new EF("Execute timed out"))},e*1e3),M.current=ae=>{z(),window.captchafox.execute(ae).then(j).catch(P=>{const F=G(P);ne(F)})}}),G=j=>j!=="challenge-aborted"&&j!=="rate-limited"?new Cd:j,K=()=>Ns(void 0,null,function*(){var j,ne,ae;if((j=window.captchafox)==null||j.remove(A),!T||((ne=T?.children)==null?void 0:ne.length)===1)return;const P=yield(ae=window.captchafox)==null?void 0:ae.render(T,{lang:n,sitekey:t,mode:o,theme:i,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 $.createElement("div",{ref:R,id:A,className:l})});TT.displayName="CaptchaFox";function Mr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wg(e,t){return Wg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Wg(e,t)}function OF(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wg(e,t)}var TF=Object.defineProperty,AF=Object.defineProperties,CF=Object.getOwnPropertyDescriptors,uf=Object.getOwnPropertySymbols,AT=Object.prototype.hasOwnProperty,CT=Object.prototype.propertyIsEnumerable,Qg=(e,t,n)=>t in e?TF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ur=(e,t)=>{for(var n in t||(t={}))AT.call(t,n)&&Qg(e,n,t[n]);if(uf)for(var n of uf(t))CT.call(t,n)&&Qg(e,n,t[n]);return e},IT=(e,t)=>AF(e,CF(t)),IF=(e,t)=>{var n={};for(var o in e)AT.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&uf)for(var o of uf(e))t.indexOf(o)<0&&CT.call(e,o)&&(n[o]=e[o]);return n},vn=(e,t,n)=>(Qg(e,typeof t!="symbol"?t+"":t,n),n),zs=(e,t,n)=>new Promise((o,i)=>{var l=f=>{try{d(n.next(f))}catch(h){i(h)}},c=f=>{try{d(n.throw(f))}catch(h){i(h)}},d=f=>f.done?o(f.value):Promise.resolve(f.value).then(l,c);d((n=n.apply(e,t)).next())}),MF="hCaptcha-script",Id="hCaptchaOnLoad",YS="script-error",Ra="@hCaptcha/loader";function NF(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function MT(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function NT(e){return e||document.head}function DF(e){var t;e.setTag("source",Ra),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",ur({},LF())),e.setContext("device",IT(ur({},kF()),{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 LF(){var e,t,n,o,i,l;let c=navigator.userAgent,d,f;return c.indexOf("Firefox")!==-1?(d="Firefox",f=(e=c.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):c.indexOf("Edg")!==-1?(d="Microsoft Edge",f=(t=c.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):c.indexOf("Chrome")!==-1&&c.indexOf("Safari")!==-1?(d="Chrome",f=(n=c.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):c.indexOf("Safari")!==-1&&c.indexOf("Chrome")===-1?(d="Safari",f=(o=c.match(/Version\/([\d.]+)/))==null?void 0:o[1]):c.indexOf("Opera")!==-1||c.indexOf("OPR")!==-1?(d="Opera",f=(i=c.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:i[2]):c.indexOf("MSIE")!==-1||c.indexOf("Trident")!==-1?(d="Internet Explorer",f=(l=c.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:l[2]):(d="Unknown",f="Unknown"),{name:d,version:f}}function PF(e){return new Promise(t=>setTimeout(t,e))}function kF(){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 jF=class DT{constructor(t){vn(this,"_parent"),vn(this,"breadcrumbs",[]),vn(this,"context",{}),vn(this,"extra",{}),vn(this,"tags",{}),vn(this,"request"),vn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new DT(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=ur(ur({},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((o,i)=>{var l;return o.breadcrumbs=[...(l=o.breadcrumbs)!=null?l:[],...i.breadcrumbs],o.extra=ur(ur({},o.extra),i.extra),o.contexts=ur(ur({},o.contexts),i.context),o.tags=ur(ur({},o.tags),i.tags),i.user&&(o.user=i.user),i.request&&(o.request=i.request),o},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},zF=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,UF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,BF=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,FF=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,gd="?",KS="An unknown error occurred",$F="0.0.4";function VF(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function Nn(e){return(e+256).toString(16).substring(1)}function HF(){let e=VF(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Nn(e[0])+Nn(e[1])+Nn(e[2])+Nn(e[3])+"-"+Nn(e[4])+Nn(e[5])+"-"+Nn(e[6])+Nn(e[7])+"-"+Nn(e[8])+Nn(e[9])+"-"+Nn(e[10])+Nn(e[11])+Nn(e[12])+Nn(e[13])+Nn(e[14])+Nn(e[15])}var GF=[[zF,"chrome"],[BF,"winjs"],[UF,"gecko"]];function qF(e){var t,n,o,i;if(!e.stack)return null;let l=[],c=(o=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
109
|
-
`))!=null?o:[];for(let d=0;d<c.length;++d){let f=null,h=null,g=null;for(let[p,y]of GF)if(h=p.exec(c[d]),h){g=y;break}if(!(!h||!g)){if(g==="chrome")f={filename:(i=h[2])!=null&&i.startsWith("address at ")?h[2].substring(11):h[2],function:h[1]||gd,lineno:h[3]?+h[3]:null,colno:h[4]?+h[4]:null};else if(g==="winjs")f={filename:h[2],function:h[1]||gd,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]||gd,lineno:h[4]?+h[4]:null,colno:h[5]?+h[5]:null};else continue;!f.function&&f.lineno&&(f.function=gd),l.push(f)}}return l.length?l.reverse():null}function ZF(e){let t=qF(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function YF(e){let t=FF.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let o=n[5].split("/"),i=o.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(i?"/"+i:"")+"/api/"+o.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function KF(e,t,n){var o,i;let l=ur({event_id:HF().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:$F},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){l.message=(i=(o=e.error)==null?void 0:o.message)!=null?i:"Unknown error",l.fingerprint=[l.message];let c=[],d=e.error;for(let f=0;f<5&&d&&(c.push(ZF(d)),!(!d.cause||!(d.cause instanceof Error)));f++)d=d.cause;l.exception={values:c.reverse()}}return e.type==="message"&&(l.message=e.message,l.level=e.level),l}function WF(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:o}=n,i=IF(n,["message"]),l=new Error(typeof o=="string"?o:KS);return Object.assign(l,i)}let t=new Error(KS);return Object.assign(t,{cause:e})}function QF(e,t,n){return zs(this,null,function*(){var o,i;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let l;if(n){let f=new AbortController;l=f.signal,setTimeout(()=>f.abort(),n)}let c=yield fetch(e,IT(ur({},t),{signal:l})),d=yield c.text();return{status:c.status,body:d}}return yield new Promise((l,c)=>{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=()=>c(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(),c(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:(i=(o=l?.toString)==null?void 0:o.call(l))!=null?i:"Unknown error"}}})}var Yn,Xg=(Yn=class{constructor(e){vn(this,"apiURL"),vn(this,"dsn"),vn(this,"environment"),vn(this,"release"),vn(this,"sampleRate"),vn(this,"debug"),vn(this,"_scope"),vn(this,"shouldBuffer",!1),vn(this,"bufferlimit",20),vn(this,"buffer",[]);var t,n,o,i,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=(o=e.scope)!=null?o:new jF,this.apiURL=YF(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(i=e.buffer)!=null?i:!1,this.bufferlimit=(l=e.bufferLimit)!=null?l:20}static init(e){Yn._instance||(Yn._instance=new Yn(e))}static get instance(){if(!Yn._instance)throw new Error("Sentry has not been initialized");return Yn._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Yn.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Yn.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:WF(e),scope:t??this._scope})}static captureException(e,t){Yn.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){Yn.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 zs(this,null,function*(){try{this.log("Sending sentry event",e);let n=KF(e,this.environment,this.release),o={event_id:n.event_id,dsn:this.dsn},i={type:"event"},l=JSON.stringify(o)+`
|
|
110
|
-
`+JSON.stringify(i)+`
|
|
111
|
-
`+JSON.stringify(n),c=yield QF(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:l},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return zs(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 Yn.instance.flush(e)}static reset(){Yn._instance=void 0}},vn(Yn,"_instance"),Yn),XF="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",JF="2.3.0",e$="production";function t$(e=!0){if(!e)return WS();Xg.init({dsn:XF,release:JF,environment:e$});let t=Xg.scope;return DF(t),WS(t)}function WS(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&Xg.captureException(t,e)}}}function n$({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:o="anonymous",apihost:i="https://js.hcaptcha.com",cleanup:l=!1,secureApi:c=!1,scriptSource:d=""}={},f){let h=NT(e),g=MT(h);return new Promise((p,y)=>{let _=g.document.createElement("script");_.id=MF,d?_.src=`${d}?onload=${Id}`:c?_.src=`${i}/1/secure-api.js?onload=${Id}`:_.src=`${i}/1/api.js?onload=${Id}`,_.crossOrigin=o,_.async=n;let S=(w,T)=>{try{!c&&l&&h.removeChild(_),T(w)}catch(R){y(R)}};_.onload=w=>S(w,p),_.onerror=w=>{f&&f(_.src),S(w,y)},_.src+=t!==""?`&${t}`:"",h.appendChild(_)})}var vd=[];function r$(e={cleanup:!1},t){try{t.addBreadcrumb({category:Ra,message:"hCaptcha loader params",data:e});let n=NT(e.scriptLocation),o=MT(n),i=vd.find(({scope:c})=>c===o.window);if(i)return t.addBreadcrumb({category:Ra,message:"hCaptcha already loaded"}),i.promise;let l=new Promise((c,d)=>zs(this,null,function*(){try{o.window[Id]=()=>{t.addBreadcrumb({category:Ra,message:"hCaptcha script called onload function"}),c(o.window.hcaptcha)};let f=NF({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 n$(ur({query:f},e),h=>{t.captureRequest({url:h,method:"GET"})}),t.addBreadcrumb({category:Ra,message:"hCaptcha loaded",data:i})}catch{t.addBreadcrumb({category:Ra,message:"hCaptcha failed to load"});let h=vd.findIndex(g=>g.scope===o.window);h!==-1&&vd.splice(h,1),d(new Error(YS))}}));return vd.push({promise:l,scope:o.window}),l}catch(n){return t.captureException(n),Promise.reject(new Error(YS))}}function LT(e,t,n=0){return zs(this,null,function*(){var o,i;let l=(o=e.maxRetries)!=null?o:2,c=(i=e.retryDelay)!=null?i:1e3,d=n<l?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield r$(e,t)}catch(f){return t.addBreadcrumb({category:Ra,message:d}),n>=l?(t.captureException(f),Promise.reject(f)):(t.addBreadcrumb({category:Ra,message:`Waiting ${c}ms before retry attempt ${n+1}`}),yield PF(c),n+=1,LT(e,t,n))}})}function o$(){return zs(this,arguments,function*(e={}){let t=t$(e.sentry);return yield LT(e,t)})}function QS(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function XS(e){return e||document.head}var a$=(function(e){OF(t,e);function t(o){var i;return i=e.call(this,o)||this,i._hcaptcha=void 0,i.renderCaptcha=i.renderCaptcha.bind(Mr(i)),i.resetCaptcha=i.resetCaptcha.bind(Mr(i)),i.removeCaptcha=i.removeCaptcha.bind(Mr(i)),i.isReady=i.isReady.bind(Mr(i)),i._onReady=null,i.loadCaptcha=i.loadCaptcha.bind(Mr(i)),i.handleOnLoad=i.handleOnLoad.bind(Mr(i)),i.handleSubmit=i.handleSubmit.bind(Mr(i)),i.handleExpire=i.handleExpire.bind(Mr(i)),i.handleError=i.handleError.bind(Mr(i)),i.handleOpen=i.handleOpen.bind(Mr(i)),i.handleClose=i.handleClose.bind(Mr(i)),i.handleChallengeExpired=i.handleChallengeExpired.bind(Mr(i)),i.ref=E.createRef(),i.apiScriptRequested=!1,i.sentryHub=null,i.captchaId="",i._pendingExecute=null,i.state={isApiReady:!1,isRemoved:!1,elementId:o.id},i}var n=t.prototype;return n.componentDidMount=function(){var i=this,l=XS(this.props.scriptLocation),c=QS(l);this._hcaptcha=c.window.hcaptcha||void 0;var d=typeof this._hcaptcha<"u";if(d){this.setState({isApiReady:!0},function(){i.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var i=this._hcaptcha,l=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(i.reset(l),i.remove(l))},n.shouldComponentUpdate=function(i,l){return!(this.state.isApiReady!==l.isApiReady||this.state.isRemoved!==l.isRemoved)},n.componentDidUpdate=function(i){var l=this,c=["sitekey","size","theme","tabindex","languageOverride","endpoint"],d=c.every(function(f){return i[f]===l.props[f]});d||this.removeCaptcha(function(){l.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var i=this.props,l=i.apihost,c=i.assethost,d=i.endpoint,f=i.host,h=i.imghost,g=i.languageOverride,p=i.reCaptchaCompat,y=i.reportapi,_=i.sentry,S=i.custom,w=i.loadAsync,T=i.scriptLocation,R=i.scriptSource,A=i.secureApi,C=i.cleanup,O=C===void 0?!0:C,M=i.userJourneys,L={render:"explicit",apihost:l,assethost:c,endpoint:d,hl:g,host:f,imghost:h,recaptchacompat:p===!1?"off":null,reportapi:y,sentry:_,custom:S,loadAsync:w,scriptLocation:T,scriptSource:R,secureApi:A,cleanup:O,uj:M!==void 0?M:!1};o$(L).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(i){var l=this,c=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(){i&&i(),c&&c(),l._onReady&&l._onReady(p)})}},n.resetCaptcha=function(){var i=this._hcaptcha,l=this.captchaId;this.isReady()&&(i.reset(l),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(i){var l=this,c=this._hcaptcha,d=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){l.captchaId="",c.remove(d),i&&i()})},n.handleOnLoad=function(){var i=this;this.setState({isApiReady:!0},function(){var l=XS(i.props.scriptLocation),c=QS(l);i._hcaptcha=c.window.hcaptcha,i.renderCaptcha(function(){var d=i.props.onLoad;d&&d()})})},n.handleSubmit=function(i){var l=this.props.onVerify,c=this.state.isRemoved,d=this._hcaptcha,f=this.captchaId;if(!(typeof d>"u"||c)){var h=d.getResponse(f),g=d.getRespKey(f);l&&l(h,g)}},n.handleExpire=function(){var i=this.props.onExpire,l=this._hcaptcha,c=this.captchaId;this.isReady()&&(l.reset(c),i&&i())},n.handleError=function(i){var l=this.props.onError,c=this._hcaptcha,d=this.captchaId;this.isReady()&&c.reset(d),l&&l(i)},n.isReady=function(){var i=this.state,l=i.isApiReady,c=i.isRemoved;return l&&!c},n._cancelPendingExecute=function(i){if(this._pendingExecute){var l=this._pendingExecute;this._pendingExecute=null;var c=new Error(i);l.reject(c)}},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(i){var l=this;i===void 0&&(i=null),i=typeof i=="object"?i:null;try{var c=this._hcaptcha,d=this.captchaId;if(i&&i.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return i&&i.async?new Promise(function(h,g){l._pendingExecute={resolve:h,reject:g},l._onReady=function(p){if(l._pendingExecute)try{var y=c.execute(p,i);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){c.execute(h,i)},null);var f=c.execute(d,i);return i&&i.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 i&&i.async?Promise.reject(h):null}},n.close=function(){var i=this._hcaptcha,l=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return i.close(l)},n.setData=function(i){var l=this._hcaptcha,c=this.captchaId;this.isReady()&&(i&&typeof i!="object"&&(i=null),l.setData(c,i))},n.getResponse=function(){var i=this._hcaptcha;return i.getResponse(this.captchaId)},n.getRespKey=function(){var i=this._hcaptcha;return i.getRespKey(this.captchaId)},n.render=function(){var i=this.state.elementId;return E.createElement("div",{ref:this.ref,id:i})},t})(E.Component),i$=({as:e="div",...t},n)=>b.jsx(e,{...t,ref:n}),s$=E.forwardRef(i$),l$="https://challenges.cloudflare.com/turnstile/v0/api.js",y0="cf-turnstile-script",c$="cf-turnstile",b0="onloadTurnstileCallback",PT=e=>!!document.getElementById(e),u$=({render:e="explicit",onLoadCallbackName:t=b0,scriptOptions:{nonce:n="",defer:o=!0,async:i=!0,id:l="",appendTo:c,onError:d,crossOrigin:f=""}={}})=>{let h=l||y0;if(PT(h))return;let g=document.createElement("script");g.id=h,g.src=`${l$}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${g.src}"]`)&&(g.defer=!!o,g.async=!!i,n&&(g.nonce=n),f&&(g.crossOrigin=f),d&&(g.onerror=d,delete window[t]),(c==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(g))},li={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 d$(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function f$(e=y0){let[t,n]=E.useState(!1);return E.useEffect(()=>{let o=()=>{PT(e)&&n(!0)},i=new MutationObserver(o);return i.observe(document,{childList:!0,subtree:!0}),o(),()=>{i.disconnect()}},[e]),t}var rc="unloaded",kT,h$=new Promise((e,t)=>{kT={resolve:e,reject:t},rc==="ready"&&e(void 0)}),JS=(e=b0)=>(rc==="unloaded"&&(rc="loading",window[e]=()=>{kT.resolve(),rc="ready",delete window[e]}),h$),jT=E.forwardRef((e,t)=>{let{scriptOptions:n,options:o={},siteKey:i,onWidgetLoad:l,onSuccess:c,onExpire:d,onError:f,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y,onLoadScript:_,id:S,style:w,as:T="div",injectScript:R=!0,rerenderOnCallbackChange:A=!1,...C}=e,O=o.size,M=E.useCallback(()=>typeof O>"u"?{}:o.execution==="execute"?li.invisible:o.appearance==="interaction-only"?li.interactionOnly:li[O],[o.execution,O,o.appearance]),[L,N]=E.useState(M()),D=E.useRef(null),[z,W]=E.useState(!1),G=E.useRef(void 0),K=E.useRef(!1),j=S||c$,ne=E.useRef({onSuccess:c,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y});E.useEffect(()=>{A||(ne.current={onSuccess:c,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y})});let ae=n?.id||y0,P=f$(ae),F=n?.onLoadCallbackName||b0,H=o.appearance||"always",re=E.useMemo(()=>({sitekey:i,action:o.action,cData:o.cData,theme:o.theme||"auto",language:o.language||"auto",tabindex:o.tabIndex,"response-field":o.responseField,"response-field-name":o.responseFieldName,size:d$(O),retry:o.retry||"auto","retry-interval":o.retryInterval||8e3,"refresh-expired":o.refreshExpired||"auto","refresh-timeout":o.refreshTimeout||"auto",execution:o.execution||"render",appearance:o.appearance||"always","feedback-enabled":o.feedbackEnabled||!0,callback:k=>{K.current=!0,A?c?.(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)}),[o.action,o.appearance,o.cData,o.execution,o.language,o.refreshExpired,o.responseField,o.responseFieldName,o.retry,o.retryInterval,o.tabIndex,o.theme,o.feedbackEnabled,o.refreshTimeout,i,O,A,A?c:null,A?f:null,A?d:null,A?h:null,A?g:null,A?p:null,A?y:null]),ye=E.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return E.useEffect(function(){R&&!z&&(JS(F),u$({onLoadCallbackName:F,scriptOptions:{...n,id:ae}}))},[R,z,n,ae,F]),E.useEffect(function(){rc!=="ready"&&JS(F).then(()=>W(!0)).catch(console.error)},[F]),E.useEffect(function(){if(!D.current||!z)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),K.current=!1)}},[j,z,re]),E.useImperativeHandle(t,()=>{let{turnstile:k}=window;return{getResponse(){if(!k?.getResponse||!G.current||!ye()){console.warn("Turnstile has not been loaded");return}return k.getResponse(G.current)},async getResponsePromise(Q=3e4,ee=100){return new Promise((se,me)=>{let _e,be=async()=>{if(K.current&&window.turnstile&&G.current)try{let Se=window.turnstile.getResponse(G.current);return _e&&clearTimeout(_e),Se?se(Se):me(new Error("No response received"))}catch(Se){return _e&&clearTimeout(_e),console.warn("Failed to get response",Se),me(new Error("Failed to get response"))}_e||(_e=setTimeout(()=>{_e&&clearTimeout(_e),me(new Error("Timeout"))},Q)),await new Promise(Se=>setTimeout(Se,ee)),await be()};be()})},reset(){if(!k?.reset||!G.current||!ye()){console.warn("Turnstile has not been loaded");return}o.execution==="execute"&&N(li.invisible);try{K.current=!1,k.reset(G.current)}catch(Q){console.warn(`Failed to reset Turnstile widget ${G}`,Q)}},remove(){if(!k?.remove||!G.current||!ye()){console.warn("Turnstile has not been loaded");return}N(li.invisible),K.current=!1,k.remove(G.current),G.current=null},render(){if(!k?.render||!D.current||!ye()||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),o.execution!=="execute"&&N(O?li[O]:{}),Q},execute(){if(o.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!k?.execute||!D.current||!G.current||!ye()){console.warn("Turnstile has not been loaded or container not found");return}k.execute(D.current,re),N(O?li[O]:{})},isExpired(){return!k?.isExpired||!G.current||!ye()?(console.warn("Turnstile has not been loaded"),!1):k.isExpired(G.current)}}},[G,o.execution,O,re,D,ye,z,l]),E.useEffect(()=>{if(z||!P)return;if(window.turnstile){W(!0);return}let k=setInterval(()=>{window.turnstile&&(W(!0),clearInterval(k))},50);return()=>{clearInterval(k)}},[z,P]),E.useEffect(()=>{N(M())},[o.execution,O,H]),E.useEffect(()=>{!P||typeof _!="function"||_()},[P]),b.jsx(s$,{ref:D,as:T,id:j,style:{...L,...w},...C})});jT.displayName="Turnstile";var Km={exports:{}},Wm,ew;function p$(){if(ew)return Wm;ew=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wm=e,Wm}var Qm,tw;function m$(){if(tw)return Qm;tw=1;var e=p$();function t(){}function n(){}return n.resetWarningCache=t,Qm=function(){function o(c,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}}o.isRequired=o;function i(){return o}var l={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},Qm}var nw;function _0(){return nw||(nw=1,Km.exports=m$()()),Km.exports}var g$=_0();const Kn=wi(g$);var v$=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Jg.apply(this,arguments)}function y$(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b$(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ev(e,t)}function ev(e,t){return ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},ev(e,t)}var Uf=(function(e){b$(t,e);function t(){var o;return o=e.call(this)||this,o.handleExpired=o.handleExpired.bind(yd(o)),o.handleErrored=o.handleErrored.bind(yd(o)),o.handleChange=o.handleChange.bind(yd(o)),o.handleRecaptchaRef=o.handleRecaptchaRef.bind(yd(o)),o}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(l,c){i.executionResolve=l,i.executionReject=c,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},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(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var l=document.createElement("div");this._widgetId=i(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(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var l=y$(i,v$);return E.createElement("div",Jg({},l,{ref:this.handleRecaptchaRef}))},t})(E.Component);Uf.displayName="ReCAPTCHA";Uf.propTypes={sitekey:Kn.string.isRequired,onChange:Kn.func,grecaptcha:Kn.object,theme:Kn.oneOf(["dark","light"]),type:Kn.oneOf(["image","audio"]),tabindex:Kn.number,onExpired:Kn.func,onErrored:Kn.func,size:Kn.oneOf(["compact","normal","invisible"]),stoken:Kn.string,hl:Kn.string,badge:Kn.oneOf(["bottomright","bottomleft","inline"]),isolated:Kn.bool};Uf.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Xm={exports:{}},ht={};var rw;function _$(){if(rw)return ht;rw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,c=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,w=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 o:case l:case i:case p:return M;default:switch(M=M&&M.$$typeof,M){case d:case g:case S:case _:case c:return M;default:return L}}case n:return L}}}function O(M){return C(M)===h}return ht.AsyncMode=f,ht.ConcurrentMode=h,ht.ContextConsumer=d,ht.ContextProvider=c,ht.Element=t,ht.ForwardRef=g,ht.Fragment=o,ht.Lazy=S,ht.Memo=_,ht.Portal=n,ht.Profiler=l,ht.StrictMode=i,ht.Suspense=p,ht.isAsyncMode=function(M){return O(M)||C(M)===f},ht.isConcurrentMode=O,ht.isContextConsumer=function(M){return C(M)===d},ht.isContextProvider=function(M){return C(M)===c},ht.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},ht.isForwardRef=function(M){return C(M)===g},ht.isFragment=function(M){return C(M)===o},ht.isLazy=function(M){return C(M)===S},ht.isMemo=function(M){return C(M)===_},ht.isPortal=function(M){return C(M)===n},ht.isProfiler=function(M){return C(M)===l},ht.isStrictMode=function(M){return C(M)===i},ht.isSuspense=function(M){return C(M)===p},ht.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===o||M===h||M===l||M===i||M===p||M===y||typeof M=="object"&&M!==null&&(M.$$typeof===S||M.$$typeof===_||M.$$typeof===c||M.$$typeof===d||M.$$typeof===g||M.$$typeof===T||M.$$typeof===R||M.$$typeof===A||M.$$typeof===w)},ht.typeOf=C,ht}var ow;function E$(){return ow||(ow=1,Xm.exports=_$()),Xm.exports}var Jm,aw;function S$(){if(aw)return Jm;aw=1;var e=E$(),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},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=o,l[e.Memo]=i;function c(S){return e.isMemo(S)?i: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,w,T){if(typeof w!="string"){if(y){var R=p(w);R&&R!==y&&_(S,R,T)}var A=f(w);h&&(A=A.concat(h(w)));for(var C=c(S),O=c(w),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(w,L);try{d(S,L,N)}catch{}}}}return S}return Jm=_,Jm}var w$=S$();const x$=wi(w$);function tv(){return tv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},tv.apply(this,arguments)}function R$(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function O$(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Hr={},T$=0;function A$(e,t){return t=t||{},function(o){var i=o.displayName||o.name||"Component",l=(function(d){O$(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-"+T$++),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=Hr[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,w=S.globalName,T=S.callbackName,R=S.scriptId;if(w&&typeof window[w]<"u"&&(Hr[y]={loaded:!0,observers:{}}),Hr[y]){var A=Hr[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)},Hr[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(Hr[y]){var z=Hr[y],W=z.observers;for(var G in W)D(W[G])&&delete W[G]}};T&&typeof window<"u"&&(window[T]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var N=Hr[y];N&&(N.loaded=!0,L(function(D){return T?!1:(D(N),!0)}))},O.onerror=function(){var N=Hr[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=Hr[p];S&&(delete S.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Hr[p])},h.render=function(){var p=t.globalName,y=this.props;y.asyncScriptOnLoad;var _=y.forwardedRef,S=R$(y,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(S[p]=typeof window[p]<"u"?window[p]:void 0),S.ref=_,E.createElement(o,S)},f})(E.Component),c=E.forwardRef(function(d,f){return E.createElement(l,tv({},d,{forwardedRef:f}))});return c.displayName="AsyncScriptLoader("+i+")",c.propTypes={asyncScriptOnLoad:Kn.func},x$(c,o)}}var nv="onloadcallback",C$="grecaptcha";function rv(){return typeof window<"u"&&window.recaptchaOptions||{}}function I$(){var e=rv(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+nv+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+nv+"&render=explicit"}const M$=A$(I$,{callbackName:nv,globalName:C$,attributes:rv().nonce?{nonce:rv().nonce}:{}})(Uf);var N$=Object.defineProperty,D$=Object.defineProperties,L$=Object.getOwnPropertyDescriptors,df=Object.getOwnPropertySymbols,zT=Object.prototype.hasOwnProperty,UT=Object.prototype.propertyIsEnumerable,iw=(e,t,n)=>t in e?N$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P$=(e,t)=>{for(var n in t||(t={}))zT.call(t,n)&&iw(e,n,t[n]);if(df)for(var n of df(t))UT.call(t,n)&&iw(e,n,t[n]);return e},k$=(e,t)=>D$(e,L$(t)),j$=(e,t)=>{var n={};for(var o in e)zT.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&df)for(var o of df(e))t.indexOf(o)<0&&UT.call(e,o)&&(n[o]=e[o]);return n};function z$(e){let t=setTimeout(e,0),n=setTimeout(e,10),o=setTimeout(e,50);return[t,n,o]}function U$(e){let t=E.useRef();return E.useEffect(()=>{t.current=e}),t.current}var B$=18,BT=40,F$=`${BT}px`,$$=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function V$({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,l]=E.useState(!1),[c,d]=E.useState(!1),[f,h]=E.useState(!1),g=E.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&c,[i,c,n]),p=E.useCallback(()=>{let y=e.current,_=t.current;if(!y||!_||f||n==="none")return;let S=y,w=S.getBoundingClientRect().left+S.offsetWidth,T=S.getBoundingClientRect().top+S.offsetHeight/2,R=w-B$,A=T;document.querySelectorAll($$).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 w=window.innerWidth-y.getBoundingClientRect().right;d(w>=BT)}_();let S=setInterval(_,1e3);return()=>{clearInterval(S)}},[e,n]),E.useEffect(()=>{let y=o||document.activeElement===t.current;if(n==="none"||!y)return;let _=setTimeout(p,0),S=setTimeout(p,2e3),w=setTimeout(p,5e3),T=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(S),clearTimeout(w),clearTimeout(T)}},[t,o,n,p]),{hasPWMBadge:i,willPushPWMBadge:g,PWM_BADGE_SPACE_WIDTH:F$}}var FT=E.createContext({}),$T=E.forwardRef((e,t)=>{var n=e,{value:o,onChange:i,maxLength:l,textAlign:c="left",pattern:d,placeholder:f,inputMode:h="numeric",onComplete:g,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:y,containerClassName:_,noScriptCSSFallback:S=H$,render:w,children:T}=n,R=j$(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:""),z=o??N,W=U$(z),G=E.useCallback(ve=>{i?.(ve),D(ve)},[i]),K=E.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),j=E.useRef(null),ne=E.useRef(null),ae=E.useRef({value:z,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 ve=j.current,ge=ne.current;if(!ve||!ge)return;ae.current.value!==ve.value&&ae.current.onChange(ve.value),P.current.prev=[ve.selectionStart,ve.selectionEnd,ve.selectionDirection];function Re(){if(document.activeElement!==ve){Q(null),se(null);return}let Ue=ve.selectionStart,We=ve.selectionEnd,U=ve.selectionDirection,q=ve.maxLength,Z=ve.value,ue=P.current.prev,pe=-1,he=-1,xe;if(Z.length!==0&&Ue!==null&&We!==null){let tr=Ue===We,Tt=Ue===Z.length&&Z.length<q;if(tr&&!Tt){let Zt=Ue;if(Zt===0)pe=0,he=1,xe="forward";else if(Zt===q)pe=Zt-1,he=Zt,xe="backward";else if(q>1&&Z.length>1){let At=0;if(ue[0]!==null&&ue[1]!==null){xe=Zt<ue[1]?"backward":"forward";let on=ue[0]===ue[1]&&ue[0]<q;xe==="backward"&&!on&&(At=-1)}pe=At+Zt,he=At+Zt+1}}pe!==-1&&he!==-1&&pe!==he&&j.current.setSelectionRange(pe,he,xe)}let Be=pe!==-1?pe:Ue,Qe=he!==-1?he:We,wt=xe??U;Q(Be),se(Qe),P.current.prev=[Be,Qe,wt]}if(document.addEventListener("selectionchange",Re,{capture:!0}),Re(),document.activeElement===ve&&ye(!0),!document.getElementById("input-otp-style")){let Ue=document.createElement("style");if(Ue.id="input-otp-style",document.head.appendChild(Ue),Ue.sheet){let We="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;";ql(Ue.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ql(Ue.sheet,`[data-input-otp]:autofill { ${We} }`),ql(Ue.sheet,`[data-input-otp]:-webkit-autofill { ${We} }`),ql(Ue.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; } }"),ql(Ue.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ke=()=>{ge&&ge.style.setProperty("--root-height",`${ve.clientHeight}px`)};ke();let et=new ResizeObserver(ke);return et.observe(ve),()=>{document.removeEventListener("selectionchange",Re,{capture:!0}),et.disconnect()}},[]);let[F,H]=E.useState(!1),[re,ye]=E.useState(!1),[k,Q]=E.useState(null),[ee,se]=E.useState(null);E.useEffect(()=>{z$(()=>{var ve,ge,Re,ke;(ve=j.current)==null||ve.dispatchEvent(new Event("input"));let et=(ge=j.current)==null?void 0:ge.selectionStart,Ue=(Re=j.current)==null?void 0:Re.selectionEnd,We=(ke=j.current)==null?void 0:ke.selectionDirection;et!==null&&Ue!==null&&(Q(et),se(Ue),P.current.prev=[et,Ue,We])})},[z,re]),E.useEffect(()=>{W!==void 0&&z!==W&&W.length<l&&z.length===l&&g?.(z)},[l,g,W,z]);let me=V$({containerRef:ne,inputRef:j,pushPasswordManagerStrategy:p,isFocused:re}),_e=E.useCallback(ve=>{let ge=ve.currentTarget.value.slice(0,l);if(ge.length>0&&K&&!K.test(ge)){ve.preventDefault();return}typeof W=="string"&&ge.length<W.length&&document.dispatchEvent(new Event("selectionchange")),G(ge)},[l,G,W,K]),be=E.useCallback(()=>{var ve;if(j.current){let ge=Math.min(j.current.value.length,l-1),Re=j.current.value.length;(ve=j.current)==null||ve.setSelectionRange(ge,Re),Q(ge),se(Re)}ye(!0)},[l]),Se=E.useCallback(ve=>{var ge,Re;let ke=j.current;if(!y&&(!ae.current.isIOS||!ve.clipboardData||!ke))return;let et=ve.clipboardData.getData("text/plain"),Ue=y?y(et):et;ve.preventDefault();let We=(ge=j.current)==null?void 0:ge.selectionStart,U=(Re=j.current)==null?void 0:Re.selectionEnd,q=(We!==U?z.slice(0,We)+Ue+z.slice(U):z.slice(0,We)+Ue+z.slice(We)).slice(0,l);if(q.length>0&&K&&!K.test(q))return;ke.value=q,G(q);let Z=Math.min(q.length,l-1),ue=q.length;ke.setSelectionRange(Z,ue),Q(Z),se(ue)},[l,G,K,z]),De=E.useMemo(()=>({position:"relative",cursor:R.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[R.disabled]),Le=E.useMemo(()=>({position:"absolute",inset:0,width:me.willPushPWMBadge?`calc(100% + ${me.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:me.willPushPWMBadge?`inset(0 ${me.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,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"}),[me.PWM_BADGE_SPACE_WIDTH,me.willPushPWMBadge,c]),Ee=E.useMemo(()=>E.createElement("input",k$(P$({autoComplete:R.autoComplete||"one-time-code"},R),{"data-input-otp":!0,"data-input-otp-placeholder-shown":z.length===0||void 0,"data-input-otp-mss":k,"data-input-otp-mse":ee,inputMode:h,pattern:K?.source,"aria-placeholder":f,style:Le,maxLength:l,value:z,ref:j,onPaste:ve=>{var ge;Se(ve),(ge=R.onPaste)==null||ge.call(R,ve)},onChange:_e,onMouseOver:ve=>{var ge;H(!0),(ge=R.onMouseOver)==null||ge.call(R,ve)},onMouseLeave:ve=>{var ge;H(!1),(ge=R.onMouseLeave)==null||ge.call(R,ve)},onFocus:ve=>{var ge;be(),(ge=R.onFocus)==null||ge.call(R,ve)},onBlur:ve=>{var ge;ye(!1),(ge=R.onBlur)==null||ge.call(R,ve)}})),[_e,be,Se,h,Le,l,ee,k,R,K?.source,z]),ze=E.useMemo(()=>({slots:Array.from({length:l}).map((ve,ge)=>{var Re;let ke=re&&k!==null&&ee!==null&&(k===ee&&ge===k||ge>=k&&ge<ee),et=z[ge]!==void 0?z[ge]:null,Ue=z[0]!==void 0?null:(Re=f?.[ge])!=null?Re:null;return{char:et,placeholderChar:Ue,isActive:ke,hasFakeCaret:ke&&et===null}}),isFocused:re,isHovering:!R.disabled&&F}),[re,F,l,ee,k,R.disabled,z]),Nt=E.useMemo(()=>w?w(ze):E.createElement(FT.Provider,{value:ze},T),[T,ze,w]);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:De,className:_},Nt,E.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ee)))});$T.displayName="Input";function ql(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var H$=`
|
|
112
|
-
[data-input-otp] {
|
|
113
|
-
--nojs-bg: white !important;
|
|
114
|
-
--nojs-fg: black !important;
|
|
115
|
-
|
|
116
|
-
background-color: var(--nojs-bg) !important;
|
|
117
|
-
color: var(--nojs-fg) !important;
|
|
118
|
-
caret-color: var(--nojs-fg) !important;
|
|
119
|
-
letter-spacing: .25em !important;
|
|
120
|
-
text-align: center !important;
|
|
121
|
-
border: 1px solid var(--nojs-fg) !important;
|
|
122
|
-
border-radius: 4px !important;
|
|
123
|
-
width: 100% !important;
|
|
124
|
-
}
|
|
125
|
-
@media (prefers-color-scheme: dark) {
|
|
126
|
-
[data-input-otp] {
|
|
127
|
-
--nojs-bg: black !important;
|
|
128
|
-
--nojs-fg: white !important;
|
|
129
|
-
}
|
|
130
|
-
}`,_s={},eg,sw;function VT(){return sw||(sw=1,eg={L:1,M:0,Q:3,H:2}),eg}var tg,lw;function HT(){return lw||(lw=1,tg={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),tg}var ng,cw;function G$(){if(cw)return ng;cw=1;var e=HT();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 o=0;o<this.data.length;o++)n.put(this.data.charCodeAt(o),8)}},ng=t,ng}var rg,uw;function q$(){if(uw)return rg;uw=1;var e=VT();function t(n,o){this.totalCount=n,this.dataCount=o}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,o){var i=t.getRsBlockTable(n,o);if(i==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+o);for(var l=i.length/3,c=new Array,d=0;d<l;d++)for(var f=i[d*3+0],h=i[d*3+1],g=i[d*3+2],p=0;p<f;p++)c.push(new t(h,g));return c},t.getRsBlockTable=function(n,o){switch(o){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}},rg=t,rg}var og,dw;function Z$(){if(dw)return og;dw=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 o=0;o<n;o++)this.putBit((t>>>n-o-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++}},og=e,og}var ag,fw;function GT(){if(fw)return ag;fw=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 ag=e,ag}var ig,hw;function qT(){if(hw)return ig;hw=1;var e=GT();function t(n,o){if(n.length==null)throw new Error(n.length+"/"+o);for(var i=0;i<n.length&&n[i]==0;)i++;this.num=new Array(n.length-i+o);for(var l=0;l<n.length-i;l++)this.num[l]=n[l+i]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var o=new Array(this.getLength()+n.getLength()-1),i=0;i<this.getLength();i++)for(var l=0;l<n.getLength();l++)o[i+l]^=e.gexp(e.glog(this.get(i))+e.glog(n.get(l)));return new t(o,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var o=e.glog(this.get(0))-e.glog(n.get(0)),i=new Array(this.getLength()),l=0;l<this.getLength();l++)i[l]=this.get(l);for(var l=0;l<n.getLength();l++)i[l]^=e.gexp(e.glog(n.get(l))+o);return new t(i,0).mod(n)}},ig=t,ig}var sg,pw;function Y$(){if(pw)return sg;pw=1;var e=HT(),t=qT(),n=GT(),o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={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 c=l<<10;i.getBCHDigit(c)-i.getBCHDigit(i.G15)>=0;)c^=i.G15<<i.getBCHDigit(c)-i.getBCHDigit(i.G15);return(l<<10|c)^i.G15_MASK},getBCHTypeNumber:function(l){for(var c=l<<12;i.getBCHDigit(c)-i.getBCHDigit(i.G18)>=0;)c^=i.G18<<i.getBCHDigit(c)-i.getBCHDigit(i.G18);return l<<12|c},getBCHDigit:function(l){for(var c=0;l!=0;)c++,l>>>=1;return c},getPatternPosition:function(l){return i.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,c,d){switch(l){case o.PATTERN000:return(c+d)%2==0;case o.PATTERN001:return c%2==0;case o.PATTERN010:return d%3==0;case o.PATTERN011:return(c+d)%3==0;case o.PATTERN100:return(Math.floor(c/2)+Math.floor(d/3))%2==0;case o.PATTERN101:return c*d%2+c*d%3==0;case o.PATTERN110:return(c*d%2+c*d%3)%2==0;case o.PATTERN111:return(c*d%3+(c+d)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var c=new t([1],0),d=0;d<l;d++)c=c.multiply(new t([1,n.gexp(d)],0));return c},getLengthInBits:function(l,c){if(1<=c&&c<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(c<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(c<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:"+c)},getLostPoint:function(l){for(var c=l.getModuleCount(),d=0,f=0;f<c;f++)for(var h=0;h<c;h++){for(var g=0,p=l.isDark(f,h),y=-1;y<=1;y++)if(!(f+y<0||c<=f+y))for(var _=-1;_<=1;_++)h+_<0||c<=h+_||y==0&&_==0||p==l.isDark(f+y,h+_)&&g++;g>5&&(d+=3+g-5)}for(var f=0;f<c-1;f++)for(var h=0;h<c-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<c;f++)for(var h=0;h<c-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<c;h++)for(var f=0;f<c-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 w=0,h=0;h<c;h++)for(var f=0;f<c;f++)l.isDark(f,h)&&w++;var T=Math.abs(100*w/c/c-50)/5;return d+=T*10,d}};return sg=i,sg}var lg,mw;function K$(){if(mw)return lg;mw=1;var e=G$(),t=q$(),n=Z$(),o=Y$(),i=qT();function l(d,f){this.typeNumber=d,this.errorCorrectLevel=f,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;return c.addData=function(d){var f=new e(d);this.dataList.push(f),this.dataCache=null},c.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]},c.getModuleCount=function(){return this.moduleCount},c.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(),o.getLengthInBits(y.mode,d)),y.write(h)}if(h.getLengthInBits()<=g*8)break}this.typeNumber=d}this.makeImpl(!1,this.getBestMaskPattern())},c.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)},c.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)},c.getBestMaskPattern=function(){for(var d=0,f=0,h=0;h<8;h++){this.makeImpl(!0,h);var g=o.getLostPoint(this);(h==0||d>g)&&(d=g,f=h)}return f},c.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 w=S*p,T=this.modules[y][S];T&&(g.beginFill(0,100),g.moveTo(w,_),g.lineTo(w+p,_),g.lineTo(w+p,_+p),g.lineTo(w,_+p),g.endFill())}return g},c.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)},c.setupPositionAdjustPattern=function(){for(var d=o.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}},c.setupTypeNumber=function(d){for(var f=o.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}},c.setupTypeInfo=function(d,f){for(var h=this.errorCorrectLevel<<3|f,g=o.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},c.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 w=!1;y<d.length&&(w=(d[y]>>>p&1)==1);var T=o.getMask(f,g,_-S);T&&(w=!w),this.modules[g][_-S]=w,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(),o.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 w=f[S].dataCount,T=f[S].totalCount-w;g=Math.max(g,w),p=Math.max(p,T),y[S]=new Array(w);for(var R=0;R<y[S].length;R++)y[S][R]=255&d.buffer[R+h];h+=w;var A=o.getErrorCorrectPolynomial(T),C=new i(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},lg=l,lg}var bd={},gw;function W$(){if(gw)return bd;gw=1,Object.defineProperty(bd,"__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=_0(),n=l(t),o=ja(),i=l(o);function l(h){return h&&h.__esModule?h:{default:h}}function c(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,o.forwardRef)(function(h,g){var p=h.bgColor,y=h.bgD,_=h.fgD,S=h.fgColor,w=h.size,T=h.title,R=h.viewBoxSize,A=h.xmlns,C=A===void 0?"http://www.w3.org/2000/svg":A,O=c(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return i.default.createElement("svg",e({},O,{height:w,ref:g,viewBox:"0 0 "+R+" "+R,width:w,xmlns:C}),T?i.default.createElement("title",null,T):null,i.default.createElement("path",{d:y,fill:p}),i.default.createElement("path",{d:_,fill:S}))});return f.displayName="QRCodeSvg",f.propTypes=d,bd.default=f,bd}var vw;function Q$(){if(vw)return _s;vw=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.QRCode=void 0;var e=Object.assign||function(w){for(var T=1;T<arguments.length;T++){var R=arguments[T];for(var A in R)Object.prototype.hasOwnProperty.call(R,A)&&(w[A]=R[A])}return w},t=_0(),n=p(t),o=VT(),i=p(o),l=K$(),c=p(l),d=ja(),f=p(d),h=W$(),g=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function y(w,T){var R={};for(var A in w)T.indexOf(A)>=0||Object.prototype.hasOwnProperty.call(w,A)&&(R[A]=w[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(w,T){var R=w.bgColor,A=R===void 0?"#FFFFFF":R,C=w.fgColor,O=C===void 0?"#000000":C,M=w.level,L=M===void 0?"L":M,N=w.size,D=N===void 0?256:N,z=w.value,W=y(w,["bgColor","fgColor","level","size","value"]),G=new c.default(-1,i.default[L]);G.addData(z),G.make();var K=G.modules;return f.default.createElement(g.default,e({},W,{bgColor:A,bgD:K.map(function(j,ne){return j.map(function(ae,P){return ae?"":"M "+P+" "+ne+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:K.map(function(j,ne){return j.map(function(ae,P){return ae?"M "+P+" "+ne+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:T,size:D,viewBoxSize:K.length}))});return _s.QRCode=S,S.displayName="QRCode",S.propTypes=_,_s.default=S,_s}var X$=Q$();const J$=wi(X$);var eV="Separator",yw="horizontal",tV=["horizontal","vertical"],ZT=E.forwardRef((e,t)=>{const{decorative:n,orientation:o=yw,...i}=e,l=nV(o)?o:yw,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return b.jsx(Ac.div,{"data-orientation":l,...d,...i,ref:t})});ZT.displayName=eV;function nV(e){return tV.includes(e)}var rV=ZT;function oV(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:o},basePath:i,viewPaths:l,replace:c}=E.useContext(qe),{data:d,isPending:f,error:h,refetch:g}=o(),p=d;return E.useEffect(()=>{if(!n||f||p)return;const _=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;c(`${i}/${l[t]}?redirectTo=${encodeURIComponent(_)}`)},[f,p,i,l,c,t,n]),{data:p,user:p?.user,isPending:f,error:h,refetch:g}}function Si({className:e,...t}){return b.jsx("div",{"data-slot":"card",className:fe("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Bf({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:fe("@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 E0({className:e,...t}){return b.jsx("div",{"data-slot":"card-title",className:fe("leading-none font-semibold",e),...t})}function Ff({className:e,...t}){return b.jsx("div",{"data-slot":"card-description",className:fe("text-muted-foreground text-sm",e),...t})}function $f({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:fe("px-6",e),...t})}function ov({className:e,...t}){return b.jsx("div",{"data-slot":"card-footer",className:fe("flex items-center px-6 [.border-t]:pt-6",e),...t})}function gr({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:fe("bg-accent animate-pulse rounded-md",e),...t})}var aV=_k("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 St({className:e,variant:t,size:n,asChild:o=!1,...i}){const l=o?r2:"button";return b.jsx(l,{"data-slot":"button",className:fe(aV({variant:t,size:n,className:e})),...i})}function iV({classNames:e,actionLabel:t,disabled:n,isSubmitting:o,variant:i,onClick:l,...c}){return l||(o=Bv().isSubmitting),b.jsxs(St,{className:fe("md:ms-auto",e?.button,i==="default"&&e?.primaryButton,i==="destructive"&&e?.destructiveButton),disabled:o||n,size:"sm",type:l?"button":"submit",variant:i,onClick:l,...c,children:[o&&b.jsx(yn,{className:"animate-spin"}),t]})}function sV({className:e,classNames:t,actionLabel:n,disabled:o,instructions:i,isPending:l,isSubmitting:c,variant:d,action:f}){return b.jsx(ov,{className:fe("flex flex-col justify-between gap-4 rounded-b-xl md:flex-row",(n||i)&&"!py-4 border-t",d==="destructive"?"border-destructive/30 bg-destructive/15":"bg-sidebar",e,t?.footer),children:l?b.jsxs(b.Fragment,{children:[i&&b.jsx(gr,{className:fe("my-0.5 h-3 w-48 max-w-full md:h-4 md:w-56",t?.skeleton)}),n&&b.jsx(gr,{className:fe("h-8 w-14 md:ms-auto",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[i&&b.jsx(Ff,{className:fe("text-center text-muted-foreground text-xs md:text-start md:text-sm",t?.instructions),children:i}),n&&b.jsx(iV,{classNames:t,actionLabel:n,disabled:o,isSubmitting:c,variant:d,onClick:f})]})})}function lV({className:e,classNames:t,description:n,isPending:o,title:i}){return b.jsx(Bf,{className:fe(t?.header,e),children:o?b.jsxs(b.Fragment,{children:[b.jsx(gr,{className:fe("my-0.5 h-5 w-1/3 md:h-5.5",t?.skeleton)}),n&&b.jsx(gr,{className:fe("mt-1.5 mb-0.5 h-3 w-2/3 md:h-3.5",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx(E0,{className:fe("text-lg md:text-xl",t?.title),children:i}),n&&b.jsx(Ff,{className:fe("text-xs md:text-sm",t?.description),children:n})]})})}function cV({children:e,className:t,classNames:n,title:o,description:i,instructions:l,actionLabel:c,disabled:d,isPending:f,isSubmitting:h,optimistic:g,variant:p,action:y,..._}){return b.jsxs(Si,{className:fe("w-full pb-0 text-start",p==="destructive"&&"border-destructive/40",t,n?.base),..._,children:[b.jsx(lV,{classNames:n,description:i,isPending:f,title:o}),e,b.jsx(sV,{classNames:n,actionLabel:c,disabled:d,isPending:f,isSubmitting:h,instructions:l,optimistic:g,variant:p,action:y})]})}async function uV(e,t,n,o){const i=await dV(e),l=document.createElement("canvas");l.width=l.height=n;const c=l.getContext("2d"),d=Math.min(i.width,i.height),f=(i.width-d)/2,h=(i.height-d)/2,g=d,p=d;c?.drawImage(i,f,h,g,p,0,0,n,n);const y=await new Promise(_=>l.toBlob(_,`image/${o}`));return new File([y],`${t}.${o}`,{type:`image/${o}`})}async function dV(e){return new Promise((t,n)=>{const o=new Image,i=new FileReader;i.onload=l=>{var c;o.src=(c=l.target)==null?void 0:c.result},o.onload=()=>t(o),o.onerror=l=>n(l),i.readAsDataURL(e)})}async function fV(e){return new Promise((t,n)=>{const o=new FileReader;o.onloadend=()=>t(o.result),o.onerror=n,o.readAsDataURL(e)})}function YT({...e}){return b.jsx(qU,{"data-slot":"dropdown-menu",...e})}function KT({...e}){return b.jsx(ZU,{"data-slot":"dropdown-menu-trigger",...e})}function WT({className:e,sideOffset:t=4,...n}){return b.jsx(YU,{children:b.jsx(KU,{"data-slot":"dropdown-menu-content",sideOffset:t,className:fe("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 ff({className:e,inset:t,variant:n="default",...o}){return b.jsx(WU,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:fe("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),...o})}function QT({className:e,...t}){return b.jsx(JU,{"data-slot":"label",className:fe("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 _o=K7,XT=E.createContext({}),Ht=({...e})=>b.jsx(XT.Provider,{value:{name:e.name},children:b.jsx(X7,{...e})}),S0=()=>{const e=E.useContext(XT),t=E.useContext(JT),{getFieldState:n}=Af(),o=Bv({name:e.name}),i=n(e.name,o);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`,...i}},JT=E.createContext({});function Gt({className:e,...t}){const n=E.useId();return b.jsx(JT.Provider,{value:{id:n},children:b.jsx("div",{"data-slot":"form-item",className:fe("grid gap-2",e),...t})})}function qt({className:e,...t}){const{error:n,formItemId:o}=S0();return b.jsx(QT,{"data-slot":"form-label","data-error":!!n,className:fe("data-[error=true]:text-destructive",e),htmlFor:o,...t})}function nn({...e}){const{error:t,formItemId:n,formDescriptionId:o,formMessageId:i}=S0();return b.jsx(r2,{"data-slot":"form-control",id:n,"aria-describedby":t?`${o} ${i}`:`${o}`,"aria-invalid":!!t,...e})}function un({className:e,...t}){const{error:n,formMessageId:o}=S0(),i=n?String(n?.message??""):t.children;return i?b.jsx("p",{"data-slot":"form-message",id:o,className:fe("text-destructive text-sm",e),...t,children:i}):null}function Kr({className:e,type:t,...n}){return b.jsx("input",{type:t,"data-slot":"input",className:fe("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 eA({className:e,...t}){return b.jsx(lB,{"data-slot":"avatar",className:fe("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function tA({className:e,...t}){return b.jsx(cB,{"data-slot":"avatar-image",className:fe("aspect-square size-full",e),...t})}function nA({className:e,...t}){return b.jsx(uB,{"data-slot":"avatar-fallback",className:fe("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function hV({className:e,classNames:t,isPending:n,size:o,organization:i,localization:l,...c}){const{localization:d,avatar:f}=E.useContext(qe),h=E.useMemo(()=>({...d,...l}),[d,l]),g=i?.name,p=i?.logo;return n?b.jsx(gr,{className:fe("shrink-0 rounded-full",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(eA,{className:fe("bg-muted",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base),...c,children:[f?.Image?b.jsx(f.Image,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||""}):b.jsx(tA,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||void 0}),b.jsx(nA,{className:fe("text-foreground",t?.fallback),delayMs:p?600:void 0,children:b.jsx(j7,{className:fe("size-[50%]",t?.fallbackIcon)})})]})}function rA({className:e,classNames:t,isPending:n,size:o,organization:i,localization:l}){const{localization:c}=E.useContext(qe),d={...c,...l};return b.jsxs("div",{className:fe("flex items-center gap-2 truncate",e,t?.base),children:[b.jsx(hV,{className:fe(o!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:d,organization:i,size:o}),b.jsx("div",{className:fe("flex flex-col truncate text-left leading-tight",t?.content),children:n?b.jsxs(b.Fragment,{children:[b.jsx(gr,{className:fe("max-w-full",o==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),o!=="sm"&&b.jsx(gr,{className:fe("mt-1.5 max-w-full",o==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{className:fe("truncate font-semibold",o==="lg"?"text-base":"text-sm",t?.title),children:i?.name||d?.ORGANIZATION}),o!=="sm"&&i?.slug&&b.jsx("span",{className:fe("truncate opacity-70",o==="lg"?"text-sm":"text-xs",t?.subtitle),children:i.slug})]})})]})}function pV(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),i=new TextEncoder().encode(n),l=mB(xB(i)),c=t?.jpg?".jpg":"";let d=`https://gravatar.com/avatar/${l}${c}`;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 oA({className:e,classNames:t,isPending:n,size:o,user:i,localization:l,...c}){const{localization:d,gravatar:f,avatar:h}=E.useContext(qe),g={...d,...l},p=i?.displayName||i?.name||i?.fullName||i?.firstName||i?.displayUsername||i?.username||i?.email,y=i?.image||i?.avatar||i?.avatarUrl,_=f&&i?.email?pV(i.email,f===!0?void 0:f):null,S=f?_:y;return n?b.jsx(gr,{className:fe("shrink-0 rounded-full",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(eA,{className:fe("bg-muted",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base),...c,children:[h?.Image?b.jsx(h.Image,{alt:p||g?.USER,className:t?.image,src:S||""}):b.jsx(tA,{alt:p||g?.USER,className:t?.image,src:S||void 0}),b.jsx(nA,{className:fe("text-foreground uppercase",t?.fallback),delayMs:S?600:void 0,children:mV(p)||b.jsx(q7,{className:fe("size-[50%]",t?.fallbackIcon)})})]})}var mV=e=>e?.slice(0,2);function fG({className:e,classNames:t,localization:n,...o}){const{hooks:{useListUserInvitations:i,useListOrganizations:l},localization:c}=E.useContext(qe),d=E.useMemo(()=>({...c,...n}),[c,n]),{data:f,refetch:h}=i(),{refetch:g}=l(),p=async()=>{await h?.(),await g?.()},y=f?.filter(_=>_.status==="pending");return y?.length?b.jsx(cV,{className:e,classNames:t,title:d.PENDING_INVITATIONS,description:d.PENDING_USER_INVITATIONS_DESCRIPTION||d.PENDING_INVITATIONS_DESCRIPTION,...o,children:b.jsx($f,{className:fe("grid gap-4",t?.content),children:y.map(_=>b.jsx(gV,{classNames:t,invitation:{id:_.id,email:_.email,role:_.role,status:_.status,expiresAt:_.expiresAt},onChanged:p},_.id))})}):null}function gV({classNames:e,invitation:t,onChanged:n}){const{authClient:o,organization:i,localization:l,toast:c,localizeErrors:d}=E.useContext(qe),f=l,{lang:h}=Nv(),[g,p]=E.useState(!1),S=[...[{role:"owner",label:f.OWNER},{role:"admin",label:f.ADMIN},{role:"member",label:f.MEMBER}],...i?.customRoles||[]].find(R=>R.role===t.role),w=async()=>{p(!0);try{await o.organization.acceptInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),c({variant:"success",message:f.INVITATION_ACCEPTED})}catch(R){c({variant:"error",message:kt({error:R,localization:f,localizeErrors:d})})}p(!1)},T=async()=>{p(!0);try{await o.organization.rejectInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),c({variant:"success",message:f.INVITATION_REJECTED})}catch(R){c({variant:"error",message:kt({error:R,localization:f,localizeErrors:d})})}p(!1)};return b.jsxs(Si,{className:fe("flex-row items-center p-4",e?.cell),children:[b.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[b.jsx(oA,{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(YT,{children:[b.jsx(KT,{asChild:!0,children:b.jsx(St,{className:fe("relative ms-auto",e?.button,e?.outlineButton),disabled:g,size:"icon",type:"button",variant:"outline",children:g?b.jsx(yn,{className:"animate-spin"}):b.jsx(U7,{className:e?.icon})})}),b.jsxs(WT,{onCloseAutoFocus:R=>R.preventDefault(),children:[b.jsxs(ff,{onClick:w,disabled:g,children:[b.jsx(Lv,{className:e?.icon}),f.ACCEPT]}),b.jsxs(ff,{onClick:T,disabled:g,variant:"destructive",children:[b.jsx(HR,{className:e?.icon}),f.REJECT]})]})]})})]})}function w0({className:e,...t}){return b.jsx(oT,{"data-slot":"checkbox",className:fe("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(iT,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:b.jsx(Lv,{className:"size-3.5"})})})}function vV({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:fe("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 yV=({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"})}),bV=({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"})}),_V=({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"})}),EV=({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"})]}),SV=({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"})}),wV=({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"})]}),xV=({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"})]}),RV=({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"})}),OV=({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"})}),TV=({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"})}),AV=({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"})]}),CV=({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"})]}),IV=({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"})}),MV=({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"})]}),NV=({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"})}),DV=({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"})}),LV=({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"})}),PV=({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"})]}),kV=({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:`
|
|
131
|
-
.st0{fill:#FFFFFF}
|
|
132
|
-
.st1{fill:#9146FF}
|
|
133
|
-
`}),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"})]})})]})]}),jV=({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"})}),zV=({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"})}),UV=({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"})}),BV=({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"})}),FV=[{provider:"apple",name:"Apple",icon:yV},{provider:"discord",name:"Discord",icon:bV},{provider:"dropbox",name:"Dropbox",icon:_V},{provider:"facebook",name:"Facebook",icon:EV},{provider:"github",name:"GitHub",icon:SV},{provider:"gitlab",name:"GitLab",icon:wV},{provider:"google",name:"Google",icon:xV},{provider:"huggingface",name:"Hugging Face",icon:RV},{provider:"kick",name:"Kick",icon:OV},{provider:"linear",name:"Linear",icon:TV},{provider:"linkedin",name:"LinkedIn",icon:AV},{provider:"microsoft",name:"Microsoft",icon:CV},{provider:"notion",name:"Notion",icon:IV},{provider:"reddit",name:"Reddit",icon:MV},{provider:"roblox",name:"Roblox",icon:NV},{provider:"slack",name:"Slack",icon:DV},{provider:"spotify",name:"Spotify",icon:LV},{provider:"tiktok",name:"TikTok",icon:PV},{provider:"twitch",name:"Twitch",icon:kV},{provider:"vercel",name:"Vercel",icon:jV},{provider:"vk",name:"VK",icon:zV},{provider:"twitter",name:"X",icon:UV},{provider:"zoom",name:"Zoom",icon:BV}];function gc({className:e,enableToggle:t,onChange:n,...o}){const[i,l]=E.useState(!0),[c,d]=E.useState(!1);return b.jsxs("div",{className:"relative",children:[b.jsx(Kr,{className:fe(t&&"pr-10",e),...o,type:c&&t?"text":"password",onChange:f=>{l(!f.target.value),n?.(f)}}),t&&b.jsxs(b.Fragment,{children:[b.jsx(St,{className:"!bg-transparent absolute top-0 right-0",disabled:i,size:"icon",type:"button",variant:"ghost",onClick:()=>d(!c),children:c?b.jsx(F7,{}):b.jsx(B7,{})}),b.jsx("style",{children:`
|
|
134
|
-
.hide-password-toggle::-ms-reveal,
|
|
135
|
-
.hide-password-toggle::-ms-clear {
|
|
136
|
-
visibility: hidden;
|
|
137
|
-
pointer-events: none;
|
|
138
|
-
display: none;
|
|
139
|
-
}
|
|
140
|
-
`})]})]})}lx({plugins:[b6(),S6(),qB(),w6({clientId:""}),E6(),y6(),O6(),gx(),_6(),g6(),vx({})]});function Eo({redirectTo:e}){const{redirectTo:t}=E.useContext(qe),n=E.useCallback(()=>e||Ri("redirectTo")||t,[e,t]),[o,i]=E.useState(!1),{navigate:l,hooks:{useSession:c},onSessionChange:d}=E.useContext(qe),{refetch:f}=c();return{onSuccess:E.useCallback(async()=>{i(!0),await f?.(),d&&await d(),i(!1),l(n())},[f,d,l,n]),isPending:o}}function aA({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=E.useContext(qe),o=t?.(),i=E.useRef(!1),{onSuccess:l}=Eo({redirectTo:e});return E.useEffect(()=>{if(!i.current){if(!n){i.current=!0,l();return}o||(i.current=!0,l())}},[o,n,l]),b.jsx(yn,{className:"animate-spin"})}var $V=["/sign-up/email","/sign-in/email","/forget-password"],VV=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,o)=>o.toUpperCase()).replace(/\/([a-z])/g,(n,o)=>o.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function Ic({localization:e}){const{captcha:t,localization:n}=E.useContext(qe);e={...n,...e};const o=E.useRef(null),{executeRecaptcha:i}=UR(),l=async f=>{if(!t)throw new Error(e.MISSING_RESPONSE);let h;switch(t.provider){case"google-recaptcha-v3":{const g=VV(f);h=await i?.(g);break}case"google-recaptcha-v2-checkbox":{h=o.current.getValue();break}case"google-recaptcha-v2-invisible":{h=await o.current.executeAsync();break}case"cloudflare-turnstile":{h=o.current.getResponse();break}case"hcaptcha":{h=o.current.getResponse();break}case"captchafox":{h=o.current.getResponse();break}}if(!h)throw new Error(e.MISSING_RESPONSE);return h};return{captchaRef:o,getCaptchaHeaders:async f=>{if(!t)return;if((t.endpoints||$V).includes(f))return{"x-captcha-response":await l(f)}},resetCaptcha:()=>{var f,h,g,p,y,_,S,w;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(h=(f=o.current)==null?void 0:f.reset)==null||h.call(f);break}case"cloudflare-turnstile":{(p=(g=o.current)==null?void 0:g.reset)==null||p.call(g);break}case"hcaptcha":{(_=(y=o.current)==null?void 0:y.resetCaptcha)==null||_.call(y);break}case"captchafox":{(w=(S=o.current)==null?void 0:S.reset)==null||w.call(S);break}}}}}function HV({className:e,localization:t}){const n=qo(),{captcha:o,localization:i}=E.useContext(qe),l={...i,...t};return o?o.hideBadge?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
|
|
141
|
-
.grecaptcha-badge { visibility: hidden; }
|
|
142
|
-
`}),b.jsxs("p",{className:fe("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:`
|
|
143
|
-
.grecaptcha-badge { visibility: visible !important; }
|
|
144
|
-
`}):null:null}function GV({ref:e}){const{captcha:t}=E.useContext(qe),{theme:n}=Dv(),{lang:o}=Nv();return E.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
|
|
145
|
-
.grecaptcha-badge {
|
|
146
|
-
border-radius: var(--radius) !important;
|
|
147
|
-
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
148
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
149
|
-
border-style: var(--tw-border-style) !important;
|
|
150
|
-
border-width: 1px;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.dark .grecaptcha-badge {
|
|
154
|
-
border-color: var(--input) !important;
|
|
155
|
-
}
|
|
156
|
-
`}),b.jsx(M$,{ref:e,sitekey:t.siteKey,theme:n,hl:o,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:fe(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${o}-${t.provider}`)]}):null}var qV=["/sign-up/email","/sign-in/email","/forget-password"];function Mc({ref:e,localization:t,action:n}){const{captcha:o}=E.useContext(qe);if(!o||n&&!(o.endpoints||qV).includes(n))return null;const{theme:i}=Dv(),l=o.provider==="google-recaptcha-v2-checkbox"||o.provider==="google-recaptcha-v2-invisible",c=o.provider==="google-recaptcha-v3"||o.provider==="google-recaptcha-v2-invisible",d=o.provider==="cloudflare-turnstile",f=o.provider==="hcaptcha",h=o.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(GV,{ref:e}),c&&b.jsx(HV,{localization:t}),d&&b.jsx(jT,{className:"mx-auto",ref:e,siteKey:o.siteKey,options:{theme:i,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(a$,{ref:e,sitekey:o.siteKey,theme:i})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(TT,{ref:e,sitekey:o.siteKey,theme:i})})]})}function x0({className:e,containerClassName:t,...n}){return b.jsx($T,{"data-slot":"input-otp",containerClassName:fe("flex items-center gap-2 has-disabled:opacity-50",t),className:fe("disabled:cursor-not-allowed",e),...n})}function Es({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:fe("flex items-center",e),...t})}function pn({index:e,className:t,...n}){const o=E.useContext(FT),{char:i,hasFakeCaret:l,isActive:c}=o?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:fe("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:[i,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 cg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(V7,{})})}function R0({otpSeparators:e=0}){return e===0?b.jsxs(Es,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2}),b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Es,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2})]}),b.jsx(cg,{}),b.jsxs(Es,{children:[b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Es,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1})]}),b.jsx(cg,{}),b.jsxs(Es,{children:[b.jsx(pn,{index:2}),b.jsx(pn,{index:3})]}),b.jsx(cg,{}),b.jsxs(Es,{children:[b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]})}function bw(e){const[t,n]=E.useState();return t?b.jsx(YV,{...e,email:t}):b.jsx(ZV,{...e,setEmail:n})}function ZV({className:e,classNames:t,isSubmitting:n,localization:o,setIsSubmitting:i,setEmail:l}){const c=qo(),{captchaRef:d,getCaptchaHeaders:f}=Ic({localization:o}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(qe);o={...g,...o};const _=bn({email:He().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),S=vo({resolver:yo(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{i?.(S.formState.isSubmitting)},[S.formState.isSubmitting,i]);async function w({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:o.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:kt({error:A,localization:o,localizeErrors:y})})}}return b.jsx(_o,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:c,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:S.control,name:"email",render:({field:T})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL}),b.jsx(nn,{children:b.jsx(Kr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Mc,{ref:d,localization:o,action:"/email-otp/send-verification-otp"}),b.jsx(St,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(yn,{className:"animate-spin"}):o.EMAIL_OTP_SEND_ACTION})]})})}function YV({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(qe);o={...h,...o};const{onSuccess:y,isPending:_}=Eo({redirectTo:l}),S=bn({code:He().min(1,{message:`${o.EMAIL_OTP} ${o.IS_REQUIRED}`}).min(6,{message:`${o.EMAIL_OTP} ${o.IS_INVALID}`})}),w=vo({resolver:yo(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{c?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,c]);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:kt({error:A,localization:o,localizeErrors:p})}),w.reset()}}return b.jsx(_o,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:w.control,name:"code",render:({field:R})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL_OTP}),b.jsx(nn,{children:b.jsx(x0,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(R0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(St,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:[n&&b.jsx(yn,{className:"animate-spin"}),o.EMAIL_OTP_VERIFY_ACTION]})})]})})}function KV({onCancel:e,localization:t,className:n,classNames:o,otpSeparators:i,callbackURL:l,isSubmitting:c,redirectTo:d,setIsSubmitting:f}){const[h,g]=E.useState(!0),[p,y]=E.useState(30),{authClient:_,localization:S,toast:w,localizeErrors:T,navigate:R,basePath:A,viewPaths:C}=E.useContext(qe);t={...S,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:M,isPending:L}=Eo({redirectTo:d}),N=bn({code:He().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=vo({resolver:yo(N),defaultValues:{code:""}}),z=c||D.formState.isSubmitting||L;E.useEffect(()=>{f?.(D.formState.isSubmitting||L)},[D.formState.isSubmitting,L,f]),E.useEffect(()=>{if(p>0){const K=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(K)}else g(!1)},[p]);async function W({code:K}){try{const j=await _.emailOtp.verifyEmail({email:O,otp:K,fetchOptions:{throw:!0}});"token"in j&&j.token?await M():(R(`${A}/${C.SIGN_IN}${window.location.search}`),w({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){w({variant:"error",message:kt({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}}),w({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(K){w({variant:"error",message:kt({error:K,localization:t,localizeErrors:T})}),g(!1),y(0)}}}return O?b.jsx(_o,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(W),className:fe("grid w-full gap-6",n,o?.base),children:[b.jsx(Ht,{control:D.control,name:"code",render:({field:K})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:o?.label,children:t.EMAIL_OTP}),b.jsx(nn,{children:b.jsx(x0,{...K,maxLength:6,onChange:j=>{K.onChange(j),j.length===6&&D.handleSubmit(W)()},containerClassName:o?.otpInputContainer,className:o?.otpInput,disabled:z,children:b.jsx(R0,{otpSeparators:i})})}),b.jsx(un,{className:o?.error})]})}),b.jsxs("div",{className:"grid gap-4",children:[b.jsxs(St,{type:"submit",disabled:z,className:fe(o?.button,o?.primaryButton),children:[z&&b.jsx(yn,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),b.jsx(St,{type:"button",variant:"outline",onClick:G,disabled:h||z,className:fe("w-full",o?.button),children:h?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&b.jsx(St,{type:"button",variant:"ghost",onClick:e,disabled:z,className:"w-full",children:t.CANCEL})]})]})}):b.jsx("div",{className:fe("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 WV({className:e,classNames:t,isSubmitting:n,localization:o,setIsSubmitting:i}){const l=qo(),{captchaRef:c,getCaptchaHeaders:d,resetCaptcha:f}=Ic({localization:o}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(qe);o={...y,...o};const R=bn({email:He().email({message:`${o.EMAIL} ${o.IS_INVALID}`}).min(1,{message:`${o.EMAIL} ${o.IS_REQUIRED}`})}),A=vo({resolver:yo(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{i?.(A.formState.isSubmitting)},[A.formState.isSubmitting,i]);async function C({email:O}){try{const M={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${w.RESET_PASSWORD}`,fetchOptions:M}),S({variant:"success",message:o.FORGOT_PASSWORD_EMAIL}),_(`${g}/${w.SIGN_IN}${window.location.search}`)}catch(M){S({variant:"error",message:kt({error:M,localization:o,localizeErrors:T})}),f()}}return b.jsx(_o,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:A.control,name:"email",render:({field:O})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL}),b.jsx(nn,{children:b.jsx(Kr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Mc,{ref:c,localization:o,action:"/forget-password"}),b.jsx(St,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(yn,{className:"animate-spin"}):o.FORGOT_PASSWORD_ACTION})]})})}function _w({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,redirectTo:l,setIsSubmitting:c}){const d=qo(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=Ic({localization:i}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(qe);i={...w,...i};const O=E.useCallback(()=>l||Ri("redirectTo")||T,[l,T]),M=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=bn({email:He().email({message:`${i.EMAIL} ${i.IS_INVALID}`})}),N=vo({resolver:yo(L),defaultValues:{email:""}});o=o||N.formState.isSubmitting,E.useEffect(()=>{c?.(N.formState.isSubmitting)},[N.formState.isSubmitting,c]);async function D({email:z}){try{const W={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:z,callbackURL:M(),fetchOptions:W}),A({variant:"success",message:i.MAGIC_LINK_EMAIL}),N.reset()}catch(W){A({variant:"error",message:kt({error:W,localization:i,localizeErrors:C})}),g()}}return b.jsx(_o,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:N.control,name:"email",render:({field:z})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.EMAIL}),b.jsx(nn,{children:b.jsx(Kr,{className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:o,...z})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Mc,{ref:f,localization:i,action:"/sign-in/magic-link"}),b.jsx(St,{type:"submit",disabled:o,className:fe("w-full",t?.button,t?.primaryButton),children:o?b.jsx(yn,{className:"animate-spin"}):i.MAGIC_LINK_ACTION})]})})}function QV({className:e,classNames:t,isSubmitting:n,localization:o,redirectTo:i,setIsSubmitting:l}){const{authClient:c,localization:d,toast:f,localizeErrors:h}=E.useContext(qe);o={...d,...o};const{onSuccess:g,isPending:p}=Eo({redirectTo:i}),y=bn({code:He().min(1,{message:o.BACKUP_CODE_REQUIRED})}),_=vo({resolver:yo(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await c.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:kt({error:T,localization:o,localizeErrors:h})}),_.reset()}}return b.jsx(_o,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:fe("grid gap-6",e,t?.base),children:[b.jsx(Ht,{control:_.control,name:"code",render:({field:w})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.BACKUP_CODE}),b.jsx(nn,{children:b.jsx(Kr,{placeholder:o.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(un,{className:t?.error})]})}),b.jsx(St,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:n?b.jsx(yn,{className:"animate-spin"}):o.RECOVER_ACCOUNT_ACTION})]})})}function XV({className:e,classNames:t,localization:n,passwordValidation:o}){const i=E.useRef(!1),{authClient:l,basePath:c,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(qe),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},o={...S,...o};const w=bn({newPassword:cc(o,{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:_?cc(o,{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}):He().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=vo({resolver:yo(w),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(i.current)return;i.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${c}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[c,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(`${c}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:kt({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(_o,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(nn,{children:b.jsx(gc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(un,{className:t?.error})]})}),_&&b.jsx(Ht,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(nn,{children:b.jsx(gc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(un,{className:t?.error})]})}),b.jsx(St,{type:"submit",disabled:R,className:fe("w-full",t?.button,t?.primaryButton),children:R?b.jsx(yn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function JV({className:e,classNames:t,isSubmitting:n,localization:o,redirectTo:i,setIsSubmitting:l,passwordValidation:c}){const d=qo(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=Ic({localization:o}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:R,Link:A,localizeErrors:C,emailVerification:O}=E.useContext(qe),M=_?.rememberMe,L=_?.username,N=_?.passwordValidation;o={...S,...o},c={...N,...c};const{onSuccess:D,isPending:z}=Eo({redirectTo:i}),W=bn({email:L?He().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):He().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:cc(c,o),rememberMe:Cv().optional()}),G=vo({resolver:yo(W),defaultValues:{email:"",password:"",rememberMe:!M}});n=n||G.formState.isSubmitting||z,E.useEffect(()=>{l?.(G.formState.isSubmitting||z)},[G.formState.isSubmitting,z,l]);async function K({email:j,password:ne,rememberMe:ae}){var P;try{let F={};if(L&&!m8(j)){const H={throw:!0,headers:await h("/sign-in/username")};F=await p.signIn.username({username:j,password:ne,rememberMe:ae,fetchOptions:H})}else{const H={throw:!0,headers:await h("/sign-in/email")};F=await p.signIn.email({email:j,password:ne,rememberMe:ae,fetchOptions:H})}F.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await D()}catch(F){G.resetField("password"),g(),R({variant:"error",message:kt({error:F,localization:o,localizeErrors:C})}),O?.otp&&((P=F?.error)==null?void 0:P.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${w.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(_o,{...G,children:b.jsxs("form",{onSubmit:G.handleSubmit(K),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:G.control,name:"email",render:({field:j})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:L?o.USERNAME:o.EMAIL}),b.jsx(nn,{children:b.jsx(Kr,{autoComplete:L?"username":"email",className:t?.input,type:L?"text":"email",placeholder:L?o.SIGN_IN_USERNAME_PLACEHOLDER:o.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:G.control,name:"password",render:({field:j})=>b.jsxs(Gt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(qt,{className:t?.label,children:o.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:fe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:o.FORGOT_PASSWORD_LINK})]}),b.jsx(nn,{children:b.jsx(gc,{autoComplete:"current-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),M&&b.jsx(Ht,{control:G.control,name:"rememberMe",render:({field:j})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(nn,{children:b.jsx(w0,{checked:j.value,onCheckedChange:j.onChange,disabled:n})}),b.jsx(qt,{children:o.REMEMBER_ME})]})}),b.jsx(Mc,{ref:f,localization:o,action:"/sign-in/email"}),b.jsx(St,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(yn,{className:"animate-spin"}):o.SIGN_IN_ACTION})]})})}function eH({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,redirectTo:l,setIsSubmitting:c,passwordValidation:d}){const f=qo(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=Ic({localization:i}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:M,viewPaths:L,navigate:N,toast:D,avatar:z,localizeErrors:W,emailVerification:G}=E.useContext(qe),K=T?.confirmPassword,j=T?.username,ne=T?.usernameRequired??!0,ae=T?.passwordValidation,P=M?.fields;i={...R,...i},d={...ae,...d};const F=E.useRef(null),[H,re]=E.useState(null),[ye,k]=E.useState(!1),Q=E.useCallback(()=>l||Ri("redirectTo")||O,[l,O]),ee=E.useCallback(()=>`${w}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,S,L,w,Q]),{onSuccess:se,isPending:me}=Eo({redirectTo:l}),_e={email:He().email({message:`${i.EMAIL} ${i.IS_INVALID}`}),password:cc(d,i),name:P?.includes("name")&&A?He().min(1,{message:`${i.NAME} ${i.IS_REQUIRED}`}):He().optional(),image:He().optional(),username:j&&ne?He().min(1,{message:`${i.USERNAME} ${i.IS_REQUIRED}`}):He().optional(),confirmPassword:K?cc(d,{PASSWORD_REQUIRED:i.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:i.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:i.PASSWORD_TOO_LONG,INVALID_PASSWORD:i.INVALID_PASSWORD}):He().optional()},be={};if(P)for(const ge of P){if(ge==="name"||ge==="image")continue;const Re=y?.[ge];if(!Re)continue;let ke;Re.type==="number"?ke=Re.required?h8(et=>et?Number(et):void 0,MR({message:`${Re.label} ${i.IS_INVALID}`})):p8({message:`${Re.label} ${i.IS_INVALID}`}).optional():Re.type==="boolean"?ke=Re.required?$E({message:`${Re.label} ${i.IS_INVALID}`}).refine(et=>et===!0,{message:`${Re.label} ${i.IS_REQUIRED}`}):$E({message:`${Re.label} ${i.IS_INVALID}`}).optional():ke=Re.required?He().min(1,`${Re.label} ${i.IS_REQUIRED}`):He().optional(),be[ge]=ke}const Se=bn(_e).extend(be).refine(ge=>K?ge.password===ge.confirmPassword:!0,{message:i.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),De={email:"",password:"",...K&&{confirmPassword:""},...P?.includes("name")?{name:""}:{},...j?{username:""}:{},...P?.includes("image")&&z?{image:""}:{}};if(P)for(const ge of P){if(ge==="name"||ge==="image")continue;const Re=y?.[ge];Re&&(De[ge]=Re.type==="boolean"?!1:"")}const Le=vo({resolver:yo(Se),defaultValues:De});o=o||Le.formState.isSubmitting||me,E.useEffect(()=>{c?.(Le.formState.isSubmitting||me)},[Le.formState.isSubmitting,me,c]);const Ee=async ge=>{if(z){k(!0);try{const Re=await uV(ge,crypto.randomUUID(),z.size,z.extension);let ke;z.upload?ke=await z.upload(Re):ke=await fV(Re),ke?(re(ke),Le.setValue("image",ke)):(re(null),Le.setValue("image",""))}catch(Re){console.error(Re),D({variant:"error",message:kt({error:Re,localization:i,localizeErrors:W})})}k(!1)}},ze=()=>{re(null),Le.setValue("image","")},Nt=()=>{var ge;return(ge=F.current)==null?void 0:ge.click()};async function ve({email:ge,password:Re,name:ke,username:et,confirmPassword:Ue,image:We,...U}){try{for(const[pe,he]of Object.entries(U)){const xe=y?.[pe];if(xe?.validate&&typeof he=="string"&&!await xe.validate(he)){Le.setError(pe,{message:`${xe.label} ${i.IS_INVALID}`});return}}const q={throw:!0,headers:await g("/sign-up/email")},Z={};et!==void 0&&(!ne&&(et===null||et===""||typeof et=="string"&&et.trim()==="")||(Z.username=et)),We!==void 0&&(Z.image=We);const ue=await _.signUp.email({email:ge,password:Re,name:ke||"",...Z,...U,callbackURL:ee(),fetchOptions:q});"token"in ue&&ue.token?await se():G?.otp?N(`${S}/${L.EMAIL_VERIFICATION}?email=${encodeURIComponent(ge)}`):(N(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:i.SIGN_UP_EMAIL}))}catch(q){D({variant:"error",message:kt({error:q,localization:i,localizeErrors:W})}),Le.resetField("password"),Le.resetField("confirmPassword"),p()}}return b.jsx(_o,{...Le,children:b.jsxs("form",{onSubmit:Le.handleSubmit(ve),noValidate:f,className:fe("grid w-full gap-6",e,t?.base),children:[P?.includes("image")&&z&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:F,accept:"image/*",disabled:ye,hidden:!0,type:"file",onChange:ge=>{var Re;const ke=(Re=ge.target.files)==null?void 0:Re.item(0);ke&&Ee(ke),ge.target.value=""}}),b.jsx(Ht,{control:Le.control,name:"image",render:()=>b.jsxs(Gt,{children:[b.jsx(qt,{children:i.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(YT,{children:[b.jsx(KT,{asChild:!0,children:b.jsx(St,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(oA,{isPending:ye,className:"size-16",user:H?{name:Le.watch("name"),email:Le.watch("email"),image:H}:null,localization:i})})}),b.jsxs(WT,{align:"start",onCloseAutoFocus:ge=>ge.preventDefault(),children:[b.jsxs(ff,{onClick:Nt,disabled:ye,children:[b.jsx(z7,{}),i.UPLOAD_AVATAR]}),H&&b.jsxs(ff,{onClick:ze,disabled:ye,variant:"destructive",children:[b.jsx(G7,{}),i.DELETE_AVATAR]})]})]}),b.jsxs(St,{type:"button",variant:"outline",onClick:Nt,disabled:ye,children:[ye&&b.jsx(yn,{className:"animate-spin"}),i.UPLOAD]})]}),b.jsx(un,{})]})})]}),P?.includes("name")&&b.jsx(Ht,{control:Le.control,name:"name",render:({field:ge})=>b.jsxs(Gt,{children:[b.jsxs(qt,{className:t?.label,children:[i.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),b.jsx(nn,{children:b.jsx(Kr,{autoComplete:"name",className:t?.input,placeholder:i.NAME_PLACEHOLDER,disabled:o,...ge,value:ge.value})}),b.jsx(un,{className:t?.error})]})}),j&&b.jsx(Ht,{control:Le.control,name:"username",render:({field:ge})=>b.jsxs(Gt,{children:[b.jsxs(qt,{className:t?.label,children:[i.USERNAME,!ne&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),b.jsx(nn,{children:b.jsx(Kr,{autoComplete:"username",className:t?.input,placeholder:i.USERNAME_PLACEHOLDER,disabled:o,...ge,value:ge.value})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:Le.control,name:"email",render:({field:ge})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.EMAIL}),b.jsx(nn,{children:b.jsx(Kr,{autoComplete:"email",className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:o,...ge,value:ge.value})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:Le.control,name:"password",render:({field:ge})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.PASSWORD}),b.jsx(nn,{children:b.jsx(gc,{autoComplete:"new-password",className:t?.input,placeholder:i.PASSWORD_PLACEHOLDER,disabled:o,enableToggle:!0,...ge,value:ge.value})}),b.jsx(un,{className:t?.error})]})}),K&&b.jsx(Ht,{control:Le.control,name:"confirmPassword",render:({field:ge})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.CONFIRM_PASSWORD}),b.jsx(nn,{children:b.jsx(gc,{autoComplete:"new-password",className:t?.input,placeholder:i.CONFIRM_PASSWORD_PLACEHOLDER,disabled:o,enableToggle:!0,...ge,value:ge.value})}),b.jsx(un,{className:t?.error})]})}),P?.filter(ge=>ge!=="name"&&ge!=="image").map(ge=>{const Re=y?.[ge];return Re?Re.type==="boolean"?b.jsx(Ht,{control:Le.control,name:ge,render:({field:ke})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(nn,{children:b.jsx(w0,{checked:ke.value,onCheckedChange:ke.onChange,disabled:o})}),b.jsx(qt,{className:t?.label,children:Re.label}),b.jsx(un,{className:t?.error})]})},ge):b.jsx(Ht,{control:Le.control,name:ge,render:({field:ke})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:Re.label}),b.jsx(nn,{children:Re.type==="number"?b.jsx(Kr,{className:t?.input,type:"number",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value}):Re.multiline?b.jsx(vV,{className:t?.input,placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value}):b.jsx(Kr,{className:t?.input,type:"text",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value})}),b.jsx(un,{className:t?.error})]})},ge):(console.error(`Additional field ${ge} not found`),null)}),b.jsx(Mc,{ref:h,localization:i,action:"/sign-up/email"}),b.jsx(St,{type:"submit",disabled:o,className:fe("w-full",t?.button,t?.primaryButton),children:o?b.jsx(yn,{className:"animate-spin"}):i.SIGN_UP_ACTION})]})})}function tH({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c}){var d;const f=qo(),h=f?Ri("totpURI"):null,g=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(qe);o={...S,...o};const{onSuccess:O,isPending:M}=Eo({redirectTo:l}),{data:L}=_(),N=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,z]=E.useState(w?.length===1?w[0]:null),[W,G]=E.useState(!1),[K,j]=E.useState(0),ne=bn({code:He().min(1,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_REQUIRED}`}).min(6,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_INVALID}`}),trustDevice:Cv().optional()}),ae=vo({resolver:yo(ne),defaultValues:{code:""}});n=n||ae.formState.isSubmitting||M,E.useEffect(()=>{c?.(ae.formState.isSubmitting||M)},[ae.formState.isSubmitting,M,c]),E.useEffect(()=>{D==="otp"&&K<=0&&!g.current&&(g.current=!0,P())},[D]),E.useEffect(()=>{if(K<=0)return;const H=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout(H)},[K]);const P=async()=>{if(!(W||K>0)){try{G(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch(H){R({variant:"error",message:kt({error:H,localization:o,localizeErrors:C})}),H.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,G(!1)}};async function F({code:H,trustDevice:re}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:H,trustDevice:re,fetchOptions:{throw:!0}}),await O(),L&&!N&&R({variant:"success",message:o?.TWO_FACTOR_ENABLED})}catch(ye){R({variant:"error",message:kt({error:ye,localization:o,localizeErrors:C})}),ae.reset()}}return b.jsx(_o,{...ae,children:b.jsxs("form",{onSubmit:ae.handleSubmit(F),className:fe("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(QT,{className:t?.label,children:o.TWO_FACTOR_TOTP_LABEL}),b.jsx(J$,{className:fe("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Ht,{control:ae.control,name:"code",render:({field:H})=>b.jsxs(Gt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(qt,{className:t?.label,children:o.ONE_TIME_PASSWORD}),b.jsx(A,{className:fe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:o.FORGOT_AUTHENTICATOR})]}),b.jsx(nn,{children:b.jsx(x0,{...H,maxLength:6,onChange:re=>{H.onChange(re),re.length===6&&ae.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(R0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:ae.control,name:"trustDevice",render:({field:H})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(nn,{children:b.jsx(w0,{checked:H.value,onCheckedChange:H.onChange,disabled:n,className:t?.checkbox})}),b.jsx(qt,{className:t?.label,children:o.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(St,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:[n&&b.jsx(yn,{className:"animate-spin"}),o.TWO_FACTOR_ACTION]}),D==="otp"&&w?.includes("otp")&&b.jsxs(St,{type:"button",variant:"outline",onClick:P,disabled:K>0||W||n,className:fe(t?.button,t?.outlineButton),children:[W?b.jsx(yn,{className:"animate-spin"}):b.jsx(WE,{className:t?.icon}),o.RESEND_CODE,K>0&&` (${K})`]}),D!=="otp"&&w?.includes("otp")&&b.jsxs(St,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("otp"),disabled:n,children:[b.jsx(WE,{className:t?.icon}),o.SEND_VERIFICATION_CODE]}),D!=="totp"&&w?.includes("totp")&&b.jsxs(St,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("totp"),disabled:n,children:[b.jsx(H7,{className:t?.icon}),o.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function iA({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:o,viewPaths:i}=E.useContext(qe),{onSuccess:l}=Eo({redirectTo:e||`${o}/${i.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(yn,{className:"animate-spin"})}function nH({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,pathname:l,redirectTo:c,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:R,replace:A}=E.useContext(qe),C=!!w;if(i={...y,...i},E.useEffect(()=>{l&&!Ig(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Ig(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(iA,{redirectTo:c});if(d==="CALLBACK")return b.jsx(aA,{redirectTo:c});if(d==="SIGN_IN")return p?b.jsx(JV,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):_?b.jsx(_w,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):S?b.jsx(bw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(tH,{className:e,classNames:t,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(QV,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(_w,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(bw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(KV,{className:e,classNames:t,callbackURL:n,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(WV,{className:e,classNames:t,localization:i,isSubmitting:o,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(XV,{className:e,classNames:t,localization:i});if(d==="SIGN_UP")return C&&b.jsx(eH,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h})}function rH({className:e,classNames:t,localization:n}){const{localization:o,redirectTo:i,replace:l,toast:c}=E.useContext(qe),d=E.useMemo(()=>({...o,...n}),[o,n]),{data:f}=oV(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Ri("invitationId");if(!p){c({variant:"error",message:d.INVITATION_NOT_FOUND}),l(i);return}g(p)},[d.INVITATION_NOT_FOUND,c,l,i]),!f||!h?b.jsx(sA,{className:e,classNames:t}):b.jsx(oH,{className:e,classNames:t,localization:d,invitationId:h})}function oH({className:e,classNames:t,localization:n,invitationId:o}){var i;const{authClient:l,hooks:{useInvitation:c},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(qe),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=c({query:{id:o}}),M=E.useCallback(()=>Ri("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!o)){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,o,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(M())}catch(G){p({variant:"error",message:kt({error:G,localization:_,localizeErrors:y})}),R(!1)}},N=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(G){p({variant:"error",message:kt({error:G,localization:_,localizeErrors:y})}),w(!1)}},W=((i=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(G=>G.role===C?.role))==null?void 0:i.label)||C?.role;return C?b.jsxs(Si,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsxs(Bf,{className:fe("justify-items-center text-center",t?.header),children:[b.jsx(E0,{className:fe("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(Ff,{className:fe("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs($f,{className:fe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(Si,{className:fe("flex-row items-center p-4"),children:[b.jsx(rA,{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:W})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(St,{variant:"outline",className:fe(t?.button,t?.outlineButton),onClick:N,disabled:A,children:[S?b.jsx(yn,{className:"animate-spin"}):b.jsx(HR,{}),_.REJECT]}),b.jsxs(St,{className:fe(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(yn,{className:"animate-spin"}):b.jsx(Lv,{}),_.ACCEPT]})]})]})]}):b.jsx(sA,{className:e,classNames:t})}var sA=({className:e,classNames:t,localization:n})=>b.jsxs(Si,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsxs(Bf,{className:fe("justify-items-center",t?.header),children:[b.jsx(gr,{className:fe("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(gr,{className:fe("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs($f,{className:fe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(Si,{className:fe("flex-row items-center p-4"),children:[b.jsx(rA,{isPending:!0,localization:n}),b.jsx(gr,{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(gr,{className:"h-9 w-full"}),b.jsx(gr,{className:"h-9 w-full"})]})]})]});function Ew({className:e,orientation:t="horizontal",decorative:n=!0,...o}){return b.jsx(rV,{"data-slot":"separator",decorative:n,orientation:t,className:fe("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),...o})}function aH({classNames:e,isSubmitting:t,localization:n,view:o}){var i,l,c,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(qe);return b.jsxs(St,{className:fe("w-full",(i=e?.form)==null?void 0:i.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${o==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[o==="EMAIL_OTP"?b.jsx($R,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(VR,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function iH({classNames:e,isSubmitting:t,localization:n,view:o}){var i,l,c,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(qe);return b.jsxs(St,{className:fe("w-full",(i=e?.form)==null?void 0:i.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${o==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[o==="MAGIC_LINK"?b.jsx($R,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(VR,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function sH({localization:e,redirectTo:t}){const{authClient:n,localization:o,toast:i,localizeErrors:l}=E.useContext(qe),c=E.useRef(!1);e=E.useMemo(()=>({...o,...e}),[o,e]);const{onSuccess:d}=Eo({redirectTo:t});return E.useEffect(()=>{if(!c.current){c.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){i({variant:"error",message:kt({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,i]),null}function lH({classNames:e,isSubmitting:t,localization:n,redirectTo:o,setIsSubmitting:i}){var l,c;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(qe);n={...f,...n};const{onSuccess:p}=Eo({redirectTo:o}),y=async()=>{i?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:kt({error:_.error,localization:n,localizeErrors:g})}),i?.(!1)):p()}catch(_){h({variant:"error",message:kt({error:_,localization:n,localizeErrors:g})}),i?.(!1)}};return b.jsxs(St,{className:fe("w-full",(l=e?.form)==null?void 0:l.button,(c=e?.form)==null?void 0:c.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx($7,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function Sw({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,other:l,provider:c,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:M,toast:L,localizeErrors:N}=E.useContext(qe),D=E.useCallback(()=>d||Ri("redirectTo")||A,[d,A]),z=E.useCallback(()=>`${T}${n||(R?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,w,C,T,D]),W=async()=>{h(!0);try{if(l){const G={providerId:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};M?.signIn?(await M.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(G)}else{const G={provider:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(G)}}catch(G){L({variant:"error",message:kt({error:G,localization:i,localizeErrors:N})}),h(!1)}};return b.jsxs(St,{className:fe(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:o,variant:"outline",onClick:W,children:[c.icon&&b.jsx(c.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&c.name,f==="vertical"&&`${i.SIGN_IN_WITH} ${c.name}`]})}function hG({className:e,classNames:t,callbackURL:n,cardHeader:o,cardFooter:i,localization:l,path:c,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,w,T,R;const A=qo(),{basePath:C,credentials:O,localization:M,magicLink:L,emailOTP:N,oneTap:D,passkey:z,signUp:W,social:G,genericOAuth:K,viewPaths:j,Link:ne}=E.useContext(qe);l={...M,...l};let ae=h;ae==="auto"&&(ae=O&&G?.providers&&G.providers.length>2?"horizontal":"vertical");const P=c??d?.split("/").pop(),F=g||Ig(j,P)||"SIGN_IN",[H,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(aA,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(iA,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(rH,{className:e,classNames:t});const ye=!O&&!L&&!N?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(Si,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsx(Bf,{className:t?.header,children:o||b.jsxs(b.Fragment,{children:[b.jsx(E0,{className:fe("text-lg md:text-xl",t?.title),children:l[F]}),ye&&b.jsx(Ff,{className:fe("text-xs md:text-sm",t?.description),children:ye})]})}),b.jsxs($f,{className:fe("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(sH,{localization:l,redirectTo:f}),(O||L||N)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(nH,{classNames:t?.form,callbackURL:n,isSubmitting:H,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(iH,{classNames:t,localization:l,view:F,isSubmitting:H}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||L&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(aH,{classNames:t,localization:l,view:F,isSubmitting:H})]}),F!=="RESET_PASSWORD"&&F!=="EMAIL_VERIFICATION"&&(((y=G?.providers)==null?void 0:y.length)||((_=K?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&z)&&b.jsxs(b.Fragment,{children:[(O||L||N)&&b.jsxs("div",{className:fe("flex items-center gap-2",t?.continueWith),children:[b.jsx(Ew,{className:fe("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(Ew,{className:fe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=G?.providers)==null?void 0:S.length)||((w=K?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:fe("flex w-full items-center justify-between gap-4",ae==="horizontal"&&"flex-wrap",ae==="vertical"&&"flex-col",ae==="grid"&&"grid grid-cols-2"),children:[(T=G?.providers)==null?void 0:T.map(k=>{const Q=FV.find(ee=>ee.provider===k);return Q?b.jsx(Sw,{classNames:t,callbackURL:n,isSubmitting:H,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:ae},k):null}),(R=K?.providers)==null?void 0:R.map(k=>b.jsx(Sw,{classNames:t,callbackURL:n,isSubmitting:H,localization:l,provider:k,redirectTo:f,setIsSubmitting:re,socialLayout:ae,other:!0},k.provider))]}),z&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(lH,{classNames:t,isSubmitting:H,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),i&&b.jsx(ov,{className:t?.footer,children:i}),O&&W&&b.jsxs(ov,{className:fe("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(k7,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(ne,{className:fe("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(St,{variant:"link",size:"sm",className:fe("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(St,{variant:"link",size:"sm",className:fe("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function pG({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{isPending:n}=t();return n?e:null}function mG({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n}=t();return n?e:null}function gG({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n,isPending:o}=t();return!n&&!o?e:null}function cH(e){const t=hf.c(8),{children:n}=e,o=yc();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={basePath:"/",pathMode:"slug"},t[0]=i):i=t[0];let l,c;t[1]!==o?(l=f=>o({to:f}),c=f=>o({to:f,replace:!0}),t[1]=o,t[2]=l,t[3]=c):(l=t[2],c=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==c?(d=b.jsx(N7,{authClient:A6,organization:i,navigate:l,replace:c,Link:uH,children:n}),t[4]=n,t[5]=l,t[6]=c,t[7]=d):d=t[7],d}function uH(e){const{href:t,className:n,children:o,...i}=e;return b.jsx(_v,{to:t,className:n,...i,children:o})}const dH=new n3;function fH(e){const t=hf.c(3),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(l7,{}),t[0]=o):o=t[0];let i;return t[1]!==n?(i=b.jsxs(o3,{client:dH,children:[o,b.jsx(_3,{children:b.jsx(cH,{children:n})})]}),t[1]=n,t[2]=i):i=t[2],i}const hH=function(){return null};function pH(){const e=hf.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 Nc=VI({component:()=>b.jsxs(fH,{children:[b.jsx(E.Suspense,{fallback:b.jsx(pH,{}),children:b.jsx(rx,{})}),b.jsx(hH,{})]})}),mH=Tn({getParentRoute:()=>Nc,path:"/login",component:Ln(()=>Dn(()=>import("./login-CcnR2b1q.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Ba(()=>bn({next:He().optional(),client_id:He().optional(),redirect_uri:He().optional(),response_type:He().optional(),state:He().optional(),scope:He().optional(),code_challenge:He().optional(),code_challenge_method:He().optional()}))}),gH=Tn({getParentRoute:()=>Nc,path:"/auth/$pathname",component:Ln(()=>Dn(()=>import("./auth-catchall-DqCIX1bA.js"),[]))}),zr=Tn({getParentRoute:()=>Nc,id:"shell",component:Ln(()=>Dn(()=>import("./shell-layout-adVEIdhn.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,40,3,41])))}),vH=Tn({getParentRoute:()=>zr,path:"/",component:Ln(()=>Dn(()=>import("./home-heelYyW2.js"),__vite__mapDeps([42,25,2,41,22,12,1,3,38,39,40,27])))}),yH=Tn({getParentRoute:()=>zr,path:"/$org",component:Ln(()=>Dn(()=>import("./page-C8KGQPlY.js"),__vite__mapDeps([43,6,2,7,1,44,45,15,46,47,35,48,9,49,12,10,20,50,51,21,52,53,54])))}),bH=Tn({getParentRoute:()=>zr,path:"/$org/members",component:Ln(()=>Dn(()=>import("./members-D5QtYSzf.js"),__vite__mapDeps([55,44,45,1,2,15,7,46,47,56,5,3,57,58,6,59,60,61,62,9,41,53,39,16,13,63,11,12,34,35,40,17,18,25,64,65])))}),_H=Tn({getParentRoute:()=>zr,path:"/$org/mcps",component:Ln(()=>Dn(()=>import("./connections-CeDc3J_o.js"),__vite__mapDeps([66,44,45,1,2,15,7,46,47,56,5,3,57,24,25,6,35,67,19,39,53,16,13,40,64,68,12,34,11,23,17,18,36]))),validateSearch:Ba(()=>bn({action:Of(["create"]).optional()}))}),EH=Tn({getParentRoute:()=>zr,path:"/$org/settings",component:Ln(()=>Dn(()=>import("./settings-gZFi_2QA.js"),__vite__mapDeps([69,44,45,1,2,15,7,46,47,40,3,70,13])))}),SH=Tn({getParentRoute:()=>zr,path:"/$org/monitoring",component:Ln(()=>Dn(()=>import("./monitoring-Cp92YRPy.js"),__vite__mapDeps([71,6,2,7,1,44,45,15,46,47,56,5,3,35,50,51,21,52,53,18,20,61,48,9,59,72,32,17,33,73]))),validateSearch:Ba(()=>bn({from:He().default("now-24h"),to:He().default("now"),connectionId:Tg(He()).optional().default([]),gatewayId:Tg(He()).optional().default([]),tool:He().default(""),status:Of(["all","success","errors"]).default("all"),search:He().default(""),page:MR().optional(),streaming:Cv().default(!0)}))}),lA=Tn({getParentRoute:()=>zr,path:"/$org/store",component:Ln(()=>Dn(()=>import("./store-DzO4PTg0.js"),__vite__mapDeps([74,62,44,45,1,2,15,7,46,6,75,76,11,5,56,3,25,77,78,17,18,12,30,31,8,9])))}),wH=Tn({getParentRoute:()=>lA,path:"/$appName",component:Ln(()=>Dn(()=>import("./store-app-detail-BIXt1EdE.js"),__vite__mapDeps([79,22,11,1,2,60,6,7,80,18,12,15,26,5,81,9,28,77,45,46,56,3,57,25,82,83,84,53,30,31,48,85,86,36,75,78,29]))),validateSearch:Ba(()=>bn({registryId:He().optional(),serverName:He().optional(),itemId:He().optional()}))}),xH=Tn({getParentRoute:()=>zr,path:"/$org/mcps/$connectionId",component:Ln(()=>Dn(()=>import("./connection-detail-DpiL6xjK.js"),__vite__mapDeps([87,5,2,35,1,6,7,30,31,88,89,37,68,3,12,34,48,9,28,65,11,82,60,40,17,18,23,20,15,10,90,86,77,36,51,72,91,84,53,45,46,56,25,21,64,67,19,57,76,39,81,83]))),validateSearch:Ba(()=>bn({tab:He().optional()}))}),RH=Tn({getParentRoute:()=>zr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Ln(()=>Dn(()=>import("./collection-detail-QGbMDWA7.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,40,3,11,12,70,82,60,33,52,63,88,89,37,68,34,48,65,90,86,77,36,51,72,85,46,49,73,53]))),validateSearch:Ba(()=>bn({replayId:He().optional()}))}),OH=Tn({getParentRoute:()=>zr,path:"/$org/gateways",component:Ln(()=>Dn(()=>import("./gateways-DQmZoxNy.js"),__vite__mapDeps([93,44,45,1,2,15,7,46,47,56,5,3,57,24,25,6,35,20,67,19,39,53,10,64,11,34]))),validateSearch:Ba(()=>bn({action:Of(["create"]).optional()}))}),TH=Tn({getParentRoute:()=>zr,path:"/$org/gateways/$gatewayId",component:Ln(()=>Dn(()=>import("./gateway-detail-fCVh3_nF.js"),__vite__mapDeps([94,5,2,35,1,6,7,58,59,60,56,3,12,13,20,91,90,21,10,29,11,40,17,18,84,53,75,82]))),validateSearch:Ba(()=>bn({tab:He().optional()}))}),AH=Tn({getParentRoute:()=>Nc,path:"/oauth/callback",component:Ln(()=>Dn(()=>import("./oauth-callback-1_PgXFG_.js"),__vite__mapDeps([95,25,2,22,80,11,89,31])))}),CH=lA.addChildren([wH]),IH=zr.addChildren([vH,yH,bH,_H,OH,TH,SH,CH,EH,xH,RH]),MH=Nc.addChildren([IH,mH,gH,AH]),NH=XI({routeTree:MH}),DH=document.getElementById("root");M4.createRoot(DH).render(b.jsx(E.StrictMode,{children:b.jsx(t5,{router:NH})}));export{lB as $,hG as A,Ge as B,Jj as C,aG as D,$ as E,Oi as F,SV as G,lO as H,Lz as I,k2 as J,y3 as K,Dz as L,zH as M,UH as N,Xj as O,Qj as P,bx as Q,Kj as R,pH as S,e9 as T,fG as U,Tg as V,QH as W,Cv as X,r3 as Y,cB as Z,uB as _,A6 as a,Ac as a$,Of as a0,dn as a1,Zo as a2,Qr as a3,Wr as a4,Q2 as a5,iO as a6,Ma as a7,_z as a8,qv as a9,HR as aA,G7 as aB,P2 as aC,V7 as aD,F7 as aE,dG as aF,lP as aG,FH as aH,$P as aI,tG as aJ,eG as aK,Ba as aL,HH as aM,MR as aN,XH as aO,Og as aP,KH as aQ,ZH as aR,Wj as aS,_v as aT,W7 as aU,gM as aV,oT as aW,iT as aX,JU as aY,RB as aZ,K2 as a_,y2 as aa,Zv as ab,dc as ac,c2 as ad,Gv as ae,Hv as af,Ez as ag,Sz as ah,LH as ai,wi as aj,Xw as ak,yf as al,av as am,ja as an,Vo as ao,K4 as ap,z_ as aq,kH as ar,PH as as,g3 as at,f3 as au,er as av,Cn as aw,Dn as ax,nB as ay,ex as az,bv as b,Ec as b0,GH as b1,DR as b2,Av as b3,JH as b4,vP as b5,WH as b6,FP as b7,GP as b8,Iv as b9,m3 as bA,U_ as bB,p3 as bC,d3 as bD,K7 as bE,X7 as bF,Af as bG,Bv as bH,oc as bI,J4 as bJ,Tw as bK,YH as bL,h8 as bM,BE as bN,QL as bO,$H as bP,BH as bQ,p8 as bR,ZP as ba,LM as bb,qH as bc,VH as bd,rG as be,oG as bf,nG as bg,qU as bh,ZU as bi,YU as bj,KU as bk,WU as bl,lG as bm,cG as bn,uG as bo,sG as bp,vc as bq,On as br,dg as bs,Rw as bt,a3 as bu,l3 as bv,h3 as bw,c3 as bx,u3 as by,Qn as bz,hf as c,yv as d,Jn as e,yc as f,iG as g,_k as h,r2 as i,b as j,rV as k,qe as l,pG as m,mG as n,gG as o,v3 as p,rx as q,E as r,bn as s,GE as t,jH as u,He as v,yo as w,vo as x,Sc as y,zt as z};
|