@decocms/mesh 1.0.0-alpha.29 → 1.0.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/client/assets/{alert-dialog-C2AXRAdI.js → alert-dialog-lT7fjsnS.js} +1 -1
  2. package/dist/client/assets/{auth-BjEJS-ti.js → auth-B4DV4YJb.js} +1 -1
  3. package/dist/client/assets/{auth-catchall-BRoDHrkX.js → auth-catchall-BXXli3-E.js} +1 -1
  4. package/dist/client/assets/{avatar-CCRBpJ2S.js → avatar-DrbrX3Fb.js} +1 -1
  5. package/dist/client/assets/{badge-DVddOuDf.js → badge-Sw-5Fjm_.js} +1 -1
  6. package/dist/client/assets/{button-BKI-GQNs.js → button-De8TtfIc.js} +1 -1
  7. package/dist/client/assets/{card-CQxotwMu.js → card-Clgs1Ler.js} +1 -1
  8. package/dist/client/assets/{checkbox-DXOKpcZ0.js → checkbox-BZTG8MjG.js} +1 -1
  9. package/dist/client/assets/{circle-alert-CI4aNANz.js → circle-alert-Bo6PdNJA.js} +1 -1
  10. package/dist/client/assets/{collection-detail-CHNCFwGn.js → collection-detail-bCm7IhzQ.js} +1 -1
  11. package/dist/client/assets/{collection-display-button-DiJzMYDw.js → collection-display-button-CANVxM78.js} +1 -1
  12. package/dist/client/assets/{collection-header-B74HL_BQ.js → collection-header-DWpT3ZvE.js} +1 -1
  13. package/dist/client/assets/{collection-page-Gju8NROn.js → collection-page-BDYpmZx2.js} +1 -1
  14. package/dist/client/assets/{collection-search-5_31uFQu.js → collection-search-7dvS8CPU.js} +1 -1
  15. package/dist/client/assets/{collection-table-wrapper-Cexc-Pdz.js → collection-table-wrapper-DFImlrAn.js} +1 -1
  16. package/dist/client/assets/{connection-card-FqjC5vzz.js → connection-card-Dgd2qOAx.js} +1 -1
  17. package/dist/client/assets/{connection-detail-DlM4urTK.js → connection-detail-B5XIo4jJ.js} +1 -1
  18. package/dist/client/assets/{connections-Bfcj96aB.js → connections-DgVq2Zi4.js} +1 -1
  19. package/dist/client/assets/{core-DK4y5D2y.js → core-6UZH86ZU.js} +1 -1
  20. package/dist/client/assets/{create-organization-dialog-CtVmaemS.js → create-organization-dialog-DpintAfW.js} +1 -1
  21. package/dist/client/assets/{dialog-CcAczAty.js → dialog-CcWkQ3-q.js} +1 -1
  22. package/dist/client/assets/{dropdown-menu-CtyYPfMS.js → dropdown-menu-BMBTO1aI.js} +1 -1
  23. package/dist/client/assets/{empty-state-BdQaURkL.js → empty-state-WuOT2hFn.js} +1 -1
  24. package/dist/client/assets/{error-boundary-BqkazxGZ.js → error-boundary-Sj1-czrQ.js} +1 -1
  25. package/dist/client/assets/{extract-connection-data-BmRyJSV5.js → extract-connection-data-q7cQAIMM.js} +1 -1
  26. package/dist/client/assets/{form-BCzESr64.js → form-CTTDgzck.js} +1 -1
  27. package/dist/client/assets/{gateway-detail-rUxOHblZ.js → gateway-detail-DrTM5RUx.js} +1 -1
  28. package/dist/client/assets/{gateways-BYaK85gs.js → gateways-C0TCQRt5.js} +1 -1
  29. package/dist/client/assets/{home-BwRicK_C.js → home-Dy-_EeTf.js} +1 -1
  30. package/dist/client/assets/{icon-BH0uQy8Q.js → icon-Dk9j-Z4d.js} +1 -1
  31. package/dist/client/assets/{index-mSyA_igj.js → index-BSuuYE7a.js} +1 -1
  32. package/dist/client/assets/index-DIXLDBVl.js +118 -0
  33. package/dist/client/assets/{index-BZMMgVHQ.js → index-Dss36SHE.js} +1 -1
  34. package/dist/client/assets/{index-DDv8XLKp.js → index-GY3GXADp.js} +1 -1
  35. package/dist/client/assets/{input-DQSvL_aO.js → input-ByJBGfq3.js} +1 -1
  36. package/dist/client/assets/json-B2EH3aa6.js +1 -0
  37. package/dist/client/assets/{layout-tP8VoWYn.js → layout-DRBUzMK7.js} +1 -1
  38. package/dist/client/assets/{lazy-highlighter-D1A1Guv4.js → lazy-highlighter-BZ3JTPPT.js} +1 -1
  39. package/dist/client/assets/{localstorage-keys-DCgXaWMK.js → localstorage-keys-CrXjwcSZ.js} +1 -1
  40. package/dist/client/assets/{login-DBR5FdH6.js → login-baVguqcM.js} +1 -1
  41. package/dist/client/assets/{mcp-oauth-v_MhlTn1.js → mcp-oauth-Chn8Vl6o.js} +1 -1
  42. package/dist/client/assets/{members-Bhg2_ZSs.js → members-BL6-e_ID.js} +1 -1
  43. package/dist/client/assets/{monitoring-DAnTyFbi.js → monitoring-DSGI33MK.js} +1 -1
  44. package/dist/client/assets/{oauth-callback-K0vVKfJt.js → oauth-callback-BxWJgxm-.js} +1 -1
  45. package/dist/client/assets/{page-D0nieAd7.js → page-D0r-m9VX.js} +1 -1
  46. package/dist/client/assets/{popover-tnkyq1hU.js → popover-C_H6Z3YS.js} +1 -1
  47. package/dist/client/assets/prism-light-CKU-zSUS.js +1 -0
  48. package/dist/client/assets/{resource-tabs-C38lAnf7.js → resource-tabs-Dptn276z.js} +1 -1
  49. package/dist/client/assets/{schema-C7-hKK0j.js → schema-iWDGcZfv.js} +1 -1
  50. package/dist/client/assets/{select-8hQIWu_F.js → select-KKeuY_8A.js} +1 -1
  51. package/dist/client/assets/{settings-BENyycRE.js → settings-DOQRUeGN.js} +1 -1
  52. package/dist/client/assets/{shell-layout-DwQEFltw.js → shell-layout-DxFvs5RE.js} +3 -3
  53. package/dist/client/assets/{spinner-B_7PKdEi.js → spinner-C5mTiECQ.js} +1 -1
  54. package/dist/client/assets/{store-CdN9wtZc.js → store-BsHJOv3r.js} +1 -1
  55. package/dist/client/assets/{store-app-detail-AyYeHK1f.js → store-app-detail-D8K1UJ66.js} +1 -1
  56. package/dist/client/assets/{switch-C9-Lpl_K.js → switch-BN3gNP3v.js} +1 -1
  57. package/dist/client/assets/{textarea-CRdkZ0U2.js → textarea-DYrEFGVo.js} +1 -1
  58. package/dist/client/assets/{tool-set-selector-CFgzaLQt.js → tool-set-selector-BU0xXwDF.js} +1 -1
  59. package/dist/client/assets/{tooltip-B5bMdg-c.js → tooltip-ZzCYSPeH.js} +1 -1
  60. package/dist/client/assets/{types-kRP4yG2G.js → types-DndJPAWa.js} +3 -3
  61. package/dist/client/assets/{upload-DyNO--Od.js → upload-CsXE0eHm.js} +1 -1
  62. package/dist/client/assets/{use-binding-n0fop-6Q.js → use-binding-CIVQUW9t.js} +1 -1
  63. package/dist/client/assets/{use-connection-DFfxu6G-.js → use-connection-CgusccPZ.js} +1 -1
  64. package/dist/client/assets/{use-gateway-BbEXVBzn.js → use-gateway-iwW9W997.js} +1 -1
  65. package/dist/client/assets/{use-list-state-ByAtqeJl.js → use-list-state-B2svGg01.js} +1 -1
  66. package/dist/client/assets/{use-mcp-DfzSXo3r.js → use-mcp-ByPLvFZj.js} +1 -1
  67. package/dist/client/assets/{use-members-B2rKjk7L.js → use-members-dzf6tzsH.js} +1 -1
  68. package/dist/client/assets/{use-mobile-DvP3RV8-.js → use-mobile-BqnROvZt.js} +1 -1
  69. package/dist/client/assets/{use-organization-settings-CX0knSqQ.js → use-organization-settings-DYa2j-qu.js} +1 -1
  70. package/dist/client/assets/{use-tool-call-Ck95V-cD.js → use-tool-call-CFjw03Kh.js} +1 -1
  71. package/dist/client/assets/useQuery-B5H-PpIX.js +1 -0
  72. package/dist/client/assets/utils-Ny57I_y6.js +1 -0
  73. package/dist/client/index.html +1 -1
  74. package/dist/server/cli.js +2 -2
  75. package/dist/server/server.js +2 -2
  76. package/package.json +1 -1
  77. package/dist/client/assets/index-B__VUTR3.js +0 -118
  78. package/dist/client/assets/json-Br4edP4H.js +0 -1
  79. package/dist/client/assets/prism-light-gejq_KnN.js +0 -1
  80. package/dist/client/assets/useQuery-DSEkiaNM.js +0 -1
  81. package/dist/client/assets/utils-wGs-tBy0.js +0 -1
@@ -1,118 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-DBR5FdH6.js","assets/button-BKI-GQNs.js","assets/utils-wGs-tBy0.js","assets/input-DQSvL_aO.js","assets/shell-layout-DwQEFltw.js","assets/empty-state-BdQaURkL.js","assets/use-connection-DFfxu6G-.js","assets/icon-BH0uQy8Q.js","assets/tooltip-B5bMdg-c.js","assets/use-gateway-BbEXVBzn.js","assets/use-binding-n0fop-6Q.js","assets/auth-BjEJS-ti.js","assets/localstorage-keys-DCgXaWMK.js","assets/useQuery-DSEkiaNM.js","assets/select-8hQIWu_F.js","assets/use-mobile-DvP3RV8-.js","assets/textarea-CRdkZ0U2.js","assets/connection-card-FqjC5vzz.js","assets/card-CQxotwMu.js","assets/error-boundary-BqkazxGZ.js","assets/dialog-CcAczAty.js","assets/use-organization-settings-CX0knSqQ.js","assets/create-organization-dialog-CtVmaemS.js","assets/alert-dialog-C2AXRAdI.js","assets/form-BCzESr64.js","assets/spinner-B_7PKdEi.js","assets/popover-tnkyq1hU.js","assets/avatar-CCRBpJ2S.js","assets/dropdown-menu-CtyYPfMS.js","assets/home-BwRicK_C.js","assets/page-D0nieAd7.js","assets/collection-header-B74HL_BQ.js","assets/collection-display-button-DiJzMYDw.js","assets/collection-page-Gju8NROn.js","assets/use-tool-call-Ck95V-cD.js","assets/types-kRP4yG2G.js","assets/index-BZMMgVHQ.js","assets/badge-DVddOuDf.js","assets/page-BZV40eAE.css","assets/members-Bhg2_ZSs.js","assets/collection-search-5_31uFQu.js","assets/collection-table-wrapper-Cexc-Pdz.js","assets/tool-set-selector-CFgzaLQt.js","assets/checkbox-DXOKpcZ0.js","assets/use-members-B2rKjk7L.js","assets/well-known-mcp-Dg77mwx9.js","assets/switch-C9-Lpl_K.js","assets/connections-Bfcj96aB.js","assets/schema-C7-hKK0j.js","assets/use-list-state-ByAtqeJl.js","assets/generate-id-Dyweu44Y.js","assets/settings-BENyycRE.js","assets/upload-DyNO--Od.js","assets/monitoring-DAnTyFbi.js","assets/index-DDv8XLKp.js","assets/store-CdN9wtZc.js","assets/slugify-CEUa2lfQ.js","assets/registry-utils-ulDDT0d8.js","assets/app-name-gTETL9So.js","assets/store-app-detail-AyYeHK1f.js","assets/resource-tabs-C38lAnf7.js","assets/layout-tP8VoWYn.js","assets/resource-tabs-CSRUKxnt.css","assets/use-mcp-DfzSXo3r.js","assets/extract-connection-data-BmRyJSV5.js","assets/connection-detail-DlM4urTK.js","assets/index-mSyA_igj.js","assets/mcp-oauth-v_MhlTn1.js","assets/formatDistanceToNow-Ctx6mZEP.js","assets/collection-detail-CHNCFwGn.js","assets/circle-alert-CI4aNANz.js","assets/gateways-BYaK85gs.js","assets/gateway-detail-rUxOHblZ.js","assets/oauth-callback-K0vVKfJt.js"])))=>i.map(i=>d[i]);
2
- function fC(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(a,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();const hC="modulepreload",pC=function(e){return"/"+e},m_={},Dn=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");o=u(n.map(h=>{if(h=pC(h),h in m_)return;m_[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":hC,g||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),g)return new Promise((_,S)=>{y.addEventListener("load",_),y.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${h}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var MB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},Fl={};var g_;function mC(){if(g_)return Fl;g_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:l}}return Fl.Fragment=t,Fl.jsx=n,Fl.jsxs=n,Fl}var v_;function gC(){return v_||(v_=1,rm.exports=mC()),rm.exports}var b=gC(),am={exports:{}},Vl={},im={exports:{}},om={};var y_;function vC(){return y_||(y_=1,(function(e){function t(k,F){var G=k.length;k.push(F);e:for(;0<G;){var ae=G-1>>>1,ve=k[ae];if(0<o(ve,F))k[ae]=F,k[G]=ve,G=ae;else break e}}function n(k){return k.length===0?null:k[0]}function a(k){if(k.length===0)return null;var F=k[0],G=k.pop();if(G!==F){k[0]=G;e:for(var ae=0,ve=k.length,P=ve>>>1;ae<P;){var Q=2*(ae+1)-1,te=k[Q],se=Q+1,ge=k[se];if(0>o(te,G))se<ve&&0>o(ge,te)?(k[ae]=ge,k[se]=G,ae=se):(k[ae]=te,k[Q]=G,ae=Q);else if(se<ve&&0>o(ge,G))k[ae]=ge,k[se]=G,ae=se;else break e}}return F}function o(k,F){var G=k.sortIndex-F.sortIndex;return G!==0?G:k.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],g=1,p=null,y=3,_=!1,S=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(k){for(var F=n(h);F!==null;){if(F.callback===null)a(h);else if(F.startTime<=k)a(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function N(k){if(w=!1,O(k),!S)if(n(f)!==null)S=!0,L||(L=!0,V());else{var F=n(h);F!==null&&ee(N,F.startTime-k)}}var L=!1,I=-1,D=5,B=-1;function Z(){return T?!0:!(e.unstable_now()-B<D)}function Y(){if(T=!1,L){var k=e.unstable_now();B=k;var F=!0;try{e:{S=!1,w&&(w=!1,A(I),I=-1),_=!0;var G=y;try{t:{for(O(k),p=n(f);p!==null&&!(p.expirationTime>k&&Z());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,y=p.priorityLevel;var ve=ae(p.expirationTime<=k);if(k=e.unstable_now(),typeof ve=="function"){p.callback=ve,O(k),F=!0;break t}p===n(f)&&a(f),O(k)}else a(f);p=n(f)}if(p!==null)F=!0;else{var P=n(h);P!==null&&ee(N,P.startTime-k),F=!1}}break e}finally{p=null,y=G,_=!1}F=void 0}}finally{F?V():L=!1}}}var V;if(typeof C=="function")V=function(){C(Y)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,ie=z.port2;z.port1.onmessage=Y,V=function(){ie.postMessage(null)}}else V=function(){R(Y,0)};function ee(k,F){I=R(function(){k(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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(k){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var G=y;y=F;try{return k()}finally{y=G}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(k,F){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var G=y;y=k;try{return F()}finally{y=G}},e.unstable_scheduleCallback=function(k,F,G){var ae=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?ae+G:ae):G=ae,k){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=G+ve,k={id:g++,callback:F,priorityLevel:k,startTime:G,expirationTime:ve,sortIndex:-1},G>ae?(k.sortIndex=G,t(h,k),n(f)===null&&k===n(h)&&(w?(A(I),I=-1):w=!0,ee(N,G-ae))):(k.sortIndex=ve,t(f,k),S||_||(S=!0,L||(L=!0,V()))),k},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(k){var F=y;return function(){var G=y;y=F;try{return k.apply(this,arguments)}finally{y=G}}}})(om)),om}var b_;function yC(){return b_||(b_=1,im.exports=vC()),im.exports}var sm={exports:{}},Ve={};var __;function bC(){if(__)return Ve;__=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function R(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}R.prototype.isReactComponent={},R.prototype.setState=function(P,Q){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,Q,"setState")},R.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}var O=C.prototype=new A;O.constructor=C,w(O,R.prototype),O.isPureReactComponent=!0;var N=Array.isArray;function L(){}var I={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function B(P,Q,te){var se=te.ref;return{$$typeof:e,type:P,key:Q,ref:se!==void 0?se:null,props:te}}function Z(P,Q){return B(P.type,Q,P.props)}function Y(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function V(P){var Q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(te){return Q[te]})}var z=/\/+/g;function ie(P,Q){return typeof P=="object"&&P!==null&&P.key!=null?V(""+P.key):Q.toString(36)}function ee(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(L,L):(P.status="pending",P.then(function(Q){P.status==="pending"&&(P.status="fulfilled",P.value=Q)},function(Q){P.status==="pending"&&(P.status="rejected",P.reason=Q)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function k(P,Q,te,se,ge){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var ye=!1;if(P===null)ye=!0;else switch(_e){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(P.$$typeof){case e:case t:ye=!0;break;case g:return ye=P._init,k(ye(P._payload),Q,te,se,ge)}}if(ye)return ge=ge(P),ye=se===""?"."+ie(P,0):se,N(ge)?(te="",ye!=null&&(te=ye.replace(z,"$&/")+"/"),k(ge,Q,te,"",function(je){return je})):ge!=null&&(Y(ge)&&(ge=Z(ge,te+(ge.key==null||P&&P.key===ge.key?"":(""+ge.key).replace(z,"$&/")+"/")+ye)),Q.push(ge)),1;ye=0;var Se=se===""?".":se+":";if(N(P))for(var le=0;le<P.length;le++)se=P[le],_e=Se+ie(se,le),ye+=k(se,Q,te,_e,ge);else if(le=_(P),typeof le=="function")for(P=le.call(P),le=0;!(se=P.next()).done;)se=se.value,_e=Se+ie(se,le++),ye+=k(se,Q,te,_e,ge);else if(_e==="object"){if(typeof P.then=="function")return k(ee(P),Q,te,se,ge);throw Q=String(P),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ye}function F(P,Q,te){if(P==null)return P;var se=[],ge=0;return k(P,se,"","",function(_e){return Q.call(te,_e,ge++)}),se}function G(P){if(P._status===-1){var Q=P._result;Q=Q(),Q.then(function(te){(P._status===0||P._status===-1)&&(P._status=1,P._result=te)},function(te){(P._status===0||P._status===-1)&&(P._status=2,P._result=te)}),P._status===-1&&(P._status=0,P._result=Q)}if(P._status===1)return P._result.default;throw P._result}var ae=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},ve={map:F,forEach:function(P,Q,te){F(P,function(){Q.apply(this,arguments)},te)},count:function(P){var Q=0;return F(P,function(){Q++}),Q},toArray:function(P){return F(P,function(Q){return Q})||[]},only:function(P){if(!Y(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ve.Activity=p,Ve.Children=ve,Ve.Component=R,Ve.Fragment=n,Ve.Profiler=o,Ve.PureComponent=C,Ve.StrictMode=a,Ve.Suspense=f,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(P){return I.H.useMemoCache(P)}},Ve.cache=function(P){return function(){return P.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(P,Q,te){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var se=w({},P.props),ge=P.key;if(Q!=null)for(_e in Q.key!==void 0&&(ge=""+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=te;else if(1<_e){for(var ye=Array(_e),Se=0;Se<_e;Se++)ye[Se]=arguments[Se+2];se.children=ye}return B(P.type,ge,se)},Ve.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},Ve.createElement=function(P,Q,te){var se,ge={},_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"&&(ge[se]=Q[se]);var ye=arguments.length-2;if(ye===1)ge.children=te;else if(1<ye){for(var Se=Array(ye),le=0;le<ye;le++)Se[le]=arguments[le+2];ge.children=Se}if(P&&P.defaultProps)for(se in ye=P.defaultProps,ye)ge[se]===void 0&&(ge[se]=ye[se]);return B(P,_e,ge)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(P){return{$$typeof:d,render:P}},Ve.isValidElement=Y,Ve.lazy=function(P){return{$$typeof:g,_payload:{_status:-1,_result:P},_init:G}},Ve.memo=function(P,Q){return{$$typeof:h,type:P,compare:Q===void 0?null:Q}},Ve.startTransition=function(P){var Q=I.T,te={};I.T=te;try{var se=P(),ge=I.S;ge!==null&&ge(te,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(L,ae)}catch(_e){ae(_e)}finally{Q!==null&&te.types!==null&&(Q.types=te.types),I.T=Q}},Ve.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ve.use=function(P){return I.H.use(P)},Ve.useActionState=function(P,Q,te){return I.H.useActionState(P,Q,te)},Ve.useCallback=function(P,Q){return I.H.useCallback(P,Q)},Ve.useContext=function(P){return I.H.useContext(P)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(P,Q){return I.H.useDeferredValue(P,Q)},Ve.useEffect=function(P,Q){return I.H.useEffect(P,Q)},Ve.useEffectEvent=function(P){return I.H.useEffectEvent(P)},Ve.useId=function(){return I.H.useId()},Ve.useImperativeHandle=function(P,Q,te){return I.H.useImperativeHandle(P,Q,te)},Ve.useInsertionEffect=function(P,Q){return I.H.useInsertionEffect(P,Q)},Ve.useLayoutEffect=function(P,Q){return I.H.useLayoutEffect(P,Q)},Ve.useMemo=function(P,Q){return I.H.useMemo(P,Q)},Ve.useOptimistic=function(P,Q){return I.H.useOptimistic(P,Q)},Ve.useReducer=function(P,Q,te){return I.H.useReducer(P,Q,te)},Ve.useRef=function(P){return I.H.useRef(P)},Ve.useState=function(P){return I.H.useState(P)},Ve.useSyncExternalStore=function(P,Q,te){return I.H.useSyncExternalStore(P,Q,te)},Ve.useTransition=function(){return I.H.useTransition()},Ve.version="19.2.3",Ve}var E_;function $i(){return E_||(E_=1,sm.exports=bC()),sm.exports}var lm={exports:{}},Nn={};var S_;function _C(){if(S_)return Nn;S_=1;var e=$i();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(f,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:f,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Nn.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,g)},Nn.flushSync=function(f){var h=u.T,g=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=g,a.d.f()}},Nn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},Nn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},Nn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:_}):g==="script"&&a.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Nn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},Nn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin);a.d.L(f,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Nn.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},Nn.requestFormReset=function(f){a.d.r(f)},Nn.unstable_batchedUpdates=function(f,h){return f(h)},Nn.useFormState=function(f,h,g){return u.H.useFormState(f,h,g)},Nn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Nn.version="19.2.3",Nn}var w_;function uw(){if(w_)return lm.exports;w_=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(),lm.exports=_C(),lm.exports}var x_;function EC(){if(x_)return Vl;x_=1;var e=yC(),t=$i(),n=uw();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s:null}function u(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,c=i;;){var m=s.return;if(m===null)break;var v=m.alternate;if(v===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===s)return f(m),r;if(v===c)return f(m),i;v=v.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=v;else{for(var x=!1,M=m.child;M;){if(M===s){x=!0,s=m,c=v;break}if(M===c){x=!0,c=m,s=v;break}M=M.sibling}if(!x){for(M=v.child;M;){if(M===s){x=!0,s=v,c=m;break}if(M===c){x=!0,c=v,s=m;break}M=M.sibling}if(!x)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),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"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function V(r){return r===null||typeof r!="object"?null:(r=Y&&r[Y]||r["@@iterator"],typeof r=="function"?r:null)}var z=Symbol.for("react.client.reference");function ie(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===z?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 N:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case O:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case I:return i=r.displayName||null,i!==null?i:ie(r.type)||"Memo";case D:i=r._payload,r=r._init;try{return ie(r(i))}catch{}}return null}var ee=Array.isArray,k=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,G={pending:!1,data:null,method:null,action:null},ae=[],ve=-1;function P(r){return{current:r}}function Q(r){0>ve||(r.current=ae[ve],ae[ve]=null,ve--)}function te(r,i){ve++,ae[ve]=r.current,r.current=i}var se=P(null),ge=P(null),_e=P(null),ye=P(null);function Se(r,i){switch(te(_e,i),te(ge,r),te(se,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Ub(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Ub(i),r=Bb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(se),te(se,r)}function le(){Q(se),Q(ge),Q(_e)}function je(r){r.memoizedState!==null&&te(ye,r);var i=se.current,s=Bb(i,r.type);i!==s&&(te(ge,r),te(se,s))}function at(r){ge.current===r&&(Q(se),Q(ge)),ye.current===r&&(Q(ye),jl._currentValue=G)}var Je,Ft;function re(r){if(Je===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Je=i&&i[1]||"",Ft=-1<s.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+Je+r+Ft}var be=!1;function Le(r,i){if(!r||be)return"";be=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(oe){var ne=oe}Reflect.construct(r,[],fe)}else{try{fe.call()}catch(oe){ne=oe}r.call(fe.prototype)}}else{try{throw Error()}catch(oe){ne=oe}(fe=r())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(oe){if(oe&&ne&&typeof oe.stack=="string")return[oe.stack,ne.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),x=v[0],M=v[1];if(x&&M){var U=x.split(`
5
- `),J=M.split(`
6
- `);for(m=c=0;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;for(;m<J.length&&!J[m].includes("DetermineComponentFrameRoot");)m++;if(c===U.length||m===J.length)for(c=U.length-1,m=J.length-1;1<=c&&0<=m&&U[c]!==J[m];)m--;for(;1<=c&&0<=m;c--,m--)if(U[c]!==J[m]){if(c!==1||m!==1)do if(c--,m--,0>m||U[c]!==J[m]){var ce=`
7
- `+U[c].replace(" at new "," at ");return r.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",r.displayName)),ce}while(1<=c&&0<=m);break}}}finally{be=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?re(s):""}function Ye(r,i){switch(r.tag){case 26:case 27:case 5:return re(r.type);case 16:return re("Lazy");case 13:return r.child!==i&&i!==null?re("Suspense Fallback"):re("Suspense");case 19:return re("SuspenseList");case 0:case 15:return Le(r.type,!1);case 11:return Le(r.type.render,!1);case 1:return Le(r.type,!0);case 31:return re("Activity");default:return""}}function At(r){try{var i="",s=null;do i+=Ye(r,s),s=r,r=r.return;while(r);return i}catch(c){return`
8
- Error generating stack: `+c.message+`
9
- `+c.stack}}var Ue=Object.prototype.hasOwnProperty,et=e.unstable_scheduleCallback,j=e.unstable_cancelCallback,q=e.unstable_shouldYield,W=e.unstable_requestPaint,de=e.unstable_now,me=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,Re=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,tt=e.unstable_LowPriority,Rt=e.unstable_IdlePriority,nr=e.log,Ct=e.unstable_setDisableYieldValue,Gt=null,Mt=null;function on(r){if(typeof nr=="function"&&Ct(r),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Gt,r)}catch{}}var qt=Math.clz32?Math.clz32:Me,ei=Math.log,Ea=Math.LN2;function Me(r){return r>>>=0,r===0?32:31-(ei(r)/Ea|0)|0}var it=256,ut=262144,Ke=4194304;function ft(r){var i=r&42;if(i!==0)return i;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ne(r,i,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,v=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var M=c&134217727;return M!==0?(c=M&~v,c!==0?m=ft(c):(x&=M,x!==0?m=ft(x):s||(s=M&~r,s!==0&&(m=ft(s))))):(M=c&~v,M!==0?m=ft(M):x!==0?m=ft(x):s||(s=c&~r,s!==0&&(m=ft(s)))),m===0?0:i!==0&&i!==m&&(i&v)===0&&(v=m&-m,s=i&-i,v>=s||v===32&&(s&4194048)!==0)?i:m}function We(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function Ot(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Et(){var r=Ke;return Ke<<=1,(Ke&62914560)===0&&(Ke=4194304),r}function Mn(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function ht(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Nt(r,i,s,c,m,v){var 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 M=r.entanglements,U=r.expirationTimes,J=r.hiddenUpdates;for(s=x&~s;0<s;){var ce=31-qt(s),fe=1<<ce;M[ce]=0,U[ce]=-1;var ne=J[ce];if(ne!==null)for(J[ce]=null,ce=0;ce<ne.length;ce++){var oe=ne[ce];oe!==null&&(oe.lane&=-536870913)}s&=~fe}c!==0&&_r(r,c,0),v!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=v&~(x&~i))}function _r(r,i,s){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-qt(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function _n(r,i){var s=r.entangledLanes|=i;for(r=r.entanglements;s;){var c=31-qt(s),m=1<<c;m&i|r[c]&i&&(r[c]|=i),s&=~m}}function Fn(r,i){var s=i&-i;return s=(s&42)!==0?1:ko(s),(s&(r.suspendedLanes|i))!==0?0:s}function ko(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function zr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Yf(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:l_(r.type))}function x0(r,i){var s=F.p;try{return F.p=r,i()}finally{F.p=s}}var ti=Math.random().toString(36).slice(2),En="__reactFiber$"+ti,Vn="__reactProps$"+ti,jo="__reactContainer$"+ti,Kf="__reactEvents$"+ti,tT="__reactListeners$"+ti,nT="__reactHandles$"+ti,R0="__reactResources$"+ti,Xs="__reactMarker$"+ti;function Wf(r){delete r[En],delete r[Vn],delete r[Kf],delete r[tT],delete r[nT]}function Uo(r){var i=r[En];if(i)return i;for(var s=r.parentNode;s;){if(i=s[jo]||s[En]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=qb(r);r!==null;){if(s=r[En])return s;r=qb(r)}return i}r=s,s=r.parentNode}return null}function Bo(r){if(r=r[En]||r[jo]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Js(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function zo(r){var i=r[R0];return i||(i=r[R0]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function hn(r){r[Xs]=!0}var O0=new Set,T0={};function qi(r,i){Fo(r,i),Fo(r+"Capture",i)}function Fo(r,i){for(T0[r]=i,r=0;r<i.length;r++)O0.add(i[r])}var rT=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]*$"),A0={},C0={};function aT(r){return Ue.call(C0,r)?!0:Ue.call(A0,r)?!1:rT.test(r)?C0[r]=!0:(A0[r]=!0,!1)}function zc(r,i,s){if(aT(i))if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+s)}}function Fc(r,i,s){if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+s)}}function Sa(r,i,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(i,s,""+c)}}function Er(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function M0(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function iT(r,i,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,v=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(x){s=""+x,v.call(this,x)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Zf(r){if(!r._valueTracker){var i=M0(r)?"checked":"value";r._valueTracker=iT(r,i,""+r[i])}}function N0(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return r&&(c=M0(r)?r.checked?"true":"false":r.value),r=c,r!==s?(i.setValue(r),!0):!1}function Vc(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 oT=/[\n"\\]/g;function Sr(r){return r.replace(oT,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Qf(r,i,s,c,m,v,x,M){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),i!=null?x==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Er(i)):r.value!==""+Er(i)&&(r.value=""+Er(i)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),i!=null?Xf(r,x,Er(i)):s!=null?Xf(r,x,Er(s)):c!=null&&r.removeAttribute("value"),m==null&&v!=null&&(r.defaultChecked=!!v),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+Er(M):r.removeAttribute("name")}function I0(r,i,s,c,m,v,x,M){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){Zf(r);return}s=s!=null?""+Er(s):"",i=i!=null?""+Er(i):s,M||i===r.value||(r.value=i),r.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=M?r.checked:!!c,r.defaultChecked=!!c,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),Zf(r)}function Xf(r,i,s){i==="number"&&Vc(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Vo(r,i,s,c){if(r=r.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=i.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Er(s),i=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function D0(r,i,s){if(i!=null&&(i=""+Er(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+Er(s):""}function L0(r,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(ee(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=Er(i),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),Zf(r)}function Ho(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var sT=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 P0(r,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,s):typeof s!="number"||s===0||sT.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function k0(r,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&P0(r,m,c)}else for(var v in i)i.hasOwnProperty(v)&&P0(r,v,i[v])}function Jf(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 lT=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"]]),cT=/^[\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 Hc(r){return cT.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function wa(){}var eh=null;function th(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var $o=null,Go=null;function j0(r){var i=Bo(r);if(i&&(r=i.stateNode)){var s=r[Vn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Qf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Sr(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==r&&c.form===r.form){var m=c[Vn]||null;if(!m)throw Error(a(90));Qf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===r.form&&N0(c)}break e;case"textarea":D0(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Vo(r,!!s.multiple,i,!1)}}}var nh=!1;function U0(r,i,s){if(nh)return r(i,s);nh=!0;try{var c=r(i);return c}finally{if(nh=!1,($o!==null||Go!==null)&&(Mu(),$o&&(i=$o,r=Go,Go=$o=null,j0(i),r)))for(i=0;i<r.length;i++)j0(r[i])}}function el(r,i){var s=r.stateNode;if(s===null)return null;var c=s[Vn]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rh=!1;if(xa)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){rh=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{rh=!1}var ni=null,ah=null,$c=null;function B0(){if($c)return $c;var r,i=ah,s=i.length,c,m="value"in ni?ni.value:ni.textContent,v=m.length;for(r=0;r<s&&i[r]===m[r];r++);var x=s-r;for(c=1;c<=x&&i[s-c]===m[v-c];c++);return $c=m.slice(r,1<c?1-c:void 0)}function Gc(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function qc(){return!0}function z0(){return!1}function Hn(r){function i(s,c,m,v,x){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=v,this.target=x,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(s=r[M],this[M]=s?s(v):v[M]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?qc:z0,this.isPropagationStopped=z0,this}return p(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=qc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=qc)},persist:function(){},isPersistent:qc}),i}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yc=Hn(Yi),nl=p({},Yi,{view:0,detail:0}),uT=Hn(nl),ih,oh,rl,Kc=p({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lh,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!==rl&&(rl&&r.type==="mousemove"?(ih=r.screenX-rl.screenX,oh=r.screenY-rl.screenY):oh=ih=0,rl=r),ih)},movementY:function(r){return"movementY"in r?r.movementY:oh}}),F0=Hn(Kc),dT=p({},Kc,{dataTransfer:0}),fT=Hn(dT),hT=p({},nl,{relatedTarget:0}),sh=Hn(hT),pT=p({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),mT=Hn(pT),gT=p({},Yi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),vT=Hn(gT),yT=p({},Yi,{data:0}),V0=Hn(yT),bT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_T={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"},ET={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ST(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=ET[r])?!!i[r]:!1}function lh(){return ST}var wT=p({},nl,{key:function(r){if(r.key){var i=bT[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Gc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?_T[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lh,charCode:function(r){return r.type==="keypress"?Gc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Gc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),xT=Hn(wT),RT=p({},Kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),H0=Hn(RT),OT=p({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lh}),TT=Hn(OT),AT=p({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),CT=Hn(AT),MT=p({},Kc,{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}),NT=Hn(MT),IT=p({},Yi,{newState:0,oldState:0}),DT=Hn(IT),LT=[9,13,27,32],ch=xa&&"CompositionEvent"in window,al=null;xa&&"documentMode"in document&&(al=document.documentMode);var PT=xa&&"TextEvent"in window&&!al,$0=xa&&(!ch||al&&8<al&&11>=al),G0=" ",q0=!1;function Y0(r,i){switch(r){case"keyup":return LT.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function K0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var qo=!1;function kT(r,i){switch(r){case"compositionend":return K0(i);case"keypress":return i.which!==32?null:(q0=!0,G0);case"textInput":return r=i.data,r===G0&&q0?null:r;default:return null}}function jT(r,i){if(qo)return r==="compositionend"||!ch&&Y0(r,i)?(r=B0(),$c=ah=ni=null,qo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return $0&&i.locale!=="ko"?null:i.data;default:return null}}var UT={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 W0(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!UT[r.type]:i==="textarea"}function Z0(r,i,s,c){$o?Go?Go.push(c):Go=[c]:$o=c,i=ju(i,"onChange"),0<i.length&&(s=new Yc("onChange","change",null,s,c),r.push({event:s,listeners:i}))}var il=null,ol=null;function BT(r){Ib(r,0)}function Wc(r){var i=Js(r);if(N0(i))return r}function Q0(r,i){if(r==="change")return i}var X0=!1;if(xa){var uh;if(xa){var dh="oninput"in document;if(!dh){var J0=document.createElement("div");J0.setAttribute("oninput","return;"),dh=typeof J0.oninput=="function"}uh=dh}else uh=!1;X0=uh&&(!document.documentMode||9<document.documentMode)}function ey(){il&&(il.detachEvent("onpropertychange",ty),ol=il=null)}function ty(r){if(r.propertyName==="value"&&Wc(ol)){var i=[];Z0(i,ol,r,th(r)),U0(BT,i)}}function zT(r,i,s){r==="focusin"?(ey(),il=i,ol=s,il.attachEvent("onpropertychange",ty)):r==="focusout"&&ey()}function FT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Wc(ol)}function VT(r,i){if(r==="click")return Wc(i)}function HT(r,i){if(r==="input"||r==="change")return Wc(i)}function $T(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var rr=typeof Object.is=="function"?Object.is:$T;function sl(r,i){if(rr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var s=Object.keys(r),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Ue.call(i,m)||!rr(r[m],i[m]))return!1}return!0}function ny(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function ry(r,i){var s=ny(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=i&&c>=i)return{node:s,offset:i-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ny(s)}}function ay(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?ay(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function iy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Vc(r.document);i instanceof r.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)r=i.contentWindow;else break;i=Vc(r.document)}return i}function fh(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var GT=xa&&"documentMode"in document&&11>=document.documentMode,Yo=null,hh=null,ll=null,ph=!1;function oy(r,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ph||Yo==null||Yo!==Vc(c)||(c=Yo,"selectionStart"in c&&fh(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ll&&sl(ll,c)||(ll=c,c=ju(hh,"onSelect"),0<c.length&&(i=new Yc("onSelect","select",null,i,s),r.push({event:i,listeners:c}),i.target=Yo)))}function Ki(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var Ko={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},mh={},sy={};xa&&(sy=document.createElement("div").style,"AnimationEvent"in window||(delete Ko.animationend.animation,delete Ko.animationiteration.animation,delete Ko.animationstart.animation),"TransitionEvent"in window||delete Ko.transitionend.transition);function Wi(r){if(mh[r])return mh[r];if(!Ko[r])return r;var i=Ko[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in sy)return mh[r]=i[s];return r}var ly=Wi("animationend"),cy=Wi("animationiteration"),uy=Wi("animationstart"),qT=Wi("transitionrun"),YT=Wi("transitionstart"),KT=Wi("transitioncancel"),dy=Wi("transitionend"),fy=new Map,gh="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(" ");gh.push("scrollEnd");function Fr(r,i){fy.set(r,i),qi(i,[r])}var Zc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},wr=[],Wo=0,vh=0;function Qc(){for(var r=Wo,i=vh=Wo=0;i<r;){var s=wr[i];wr[i++]=null;var c=wr[i];wr[i++]=null;var m=wr[i];wr[i++]=null;var v=wr[i];if(wr[i++]=null,c!==null&&m!==null){var x=c.pending;x===null?m.next=m:(m.next=x.next,x.next=m),c.pending=m}v!==0&&hy(s,m,v)}}function Xc(r,i,s,c){wr[Wo++]=r,wr[Wo++]=i,wr[Wo++]=s,wr[Wo++]=c,vh|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function yh(r,i,s,c){return Xc(r,i,s,c),Jc(r)}function Zi(r,i){return Xc(r,null,null,i),Jc(r)}function hy(r,i,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,v=r.return;v!==null;)v.childLanes|=s,c=v.alternate,c!==null&&(c.childLanes|=s),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(m=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,m&&i!==null&&(m=31-qt(s),r=v.hiddenUpdates,c=r[m],c===null?r[m]=[i]:c.push(i),i.lane=s|536870912),v):null}function Jc(r){if(50<Ml)throw Ml=0,Tp=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Zo={};function WT(r,i,s,c){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(r,i,s,c){return new WT(r,i,s,c)}function bh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ra(r,i){var s=r.alternate;return s===null?(s=ar(r.tag,i,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=i,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,i=r.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function py(r,i){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,i=s.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function eu(r,i,s,c,m,v){var x=0;if(c=r,typeof r=="function")bh(r)&&(x=1);else if(typeof r=="string")x=eC(r,s,se.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case B:return r=ar(31,s,i,m),r.elementType=B,r.lanes=v,r;case w:return Qi(s.children,m,v,i);case T:x=8,m|=24;break;case R:return r=ar(12,s,i,m|2),r.elementType=R,r.lanes=v,r;case N:return r=ar(13,s,i,m),r.elementType=N,r.lanes=v,r;case L:return r=ar(19,s,i,m),r.elementType=L,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:x=10;break e;case A:x=9;break e;case O:x=11;break e;case I:x=14;break e;case D:x=16,c=null;break e}x=29,s=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=ar(x,s,i,m),i.elementType=r,i.type=c,i.lanes=v,i}function Qi(r,i,s,c){return r=ar(7,r,c,i),r.lanes=s,r}function _h(r,i,s){return r=ar(6,r,null,i),r.lanes=s,r}function my(r){var i=ar(18,null,null,0);return i.stateNode=r,i}function Eh(r,i,s){return i=ar(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var gy=new WeakMap;function xr(r,i){if(typeof r=="object"&&r!==null){var s=gy.get(r);return s!==void 0?s:(i={value:r,source:i,stack:At(i)},gy.set(r,i),i)}return{value:r,source:i,stack:At(i)}}var Qo=[],Xo=0,tu=null,cl=0,Rr=[],Or=0,ri=null,na=1,ra="";function Oa(r,i){Qo[Xo++]=cl,Qo[Xo++]=tu,tu=r,cl=i}function vy(r,i,s){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ri,ri=r;var c=na;r=ra;var m=32-qt(c)-1;c&=~(1<<m),s+=1;var v=32-qt(i)+m;if(30<v){var x=m-m%5;v=(c&(1<<x)-1).toString(32),c>>=x,m-=x,na=1<<32-qt(i)+m|s<<m|c,ra=v+r}else na=1<<v|s<<m|c,ra=r}function Sh(r){r.return!==null&&(Oa(r,1),vy(r,1,0))}function wh(r){for(;r===tu;)tu=Qo[--Xo],Qo[Xo]=null,cl=Qo[--Xo],Qo[Xo]=null;for(;r===ri;)ri=Rr[--Or],Rr[Or]=null,ra=Rr[--Or],Rr[Or]=null,na=Rr[--Or],Rr[Or]=null}function yy(r,i){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ri,na=i.id,ra=i.overflow,ri=r}var Sn=null,It=null,ct=!1,ai=null,Tr=!1,xh=Error(a(519));function ii(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ul(xr(i,r)),xh}function by(r){var i=r.stateNode,s=r.type,c=r.memoizedProps;switch(i[En]=r,i[Vn]=c,s){case"dialog":rt("cancel",i),rt("close",i);break;case"iframe":case"object":case"embed":rt("load",i);break;case"video":case"audio":for(s=0;s<Il.length;s++)rt(Il[s],i);break;case"source":rt("error",i);break;case"img":case"image":case"link":rt("error",i),rt("load",i);break;case"details":rt("toggle",i);break;case"input":rt("invalid",i),I0(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":rt("invalid",i);break;case"textarea":rt("invalid",i),L0(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||kb(i.textContent,s)?(c.popover!=null&&(rt("beforetoggle",i),rt("toggle",i)),c.onScroll!=null&&rt("scroll",i),c.onScrollEnd!=null&&rt("scrollend",i),c.onClick!=null&&(i.onclick=wa),i=!0):i=!1,i||ii(r,!0)}function _y(r){for(Sn=r.return;Sn;)switch(Sn.tag){case 5:case 31:case 13:Tr=!1;return;case 27:case 3:Tr=!0;return;default:Sn=Sn.return}}function Jo(r){if(r!==Sn)return!1;if(!ct)return _y(r),ct=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Vp(r.type,r.memoizedProps)),s=!s),s&&It&&ii(r),_y(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));It=Gb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));It=Gb(r)}else i===27?(i=It,bi(r.type)?(r=Yp,Yp=null,It=r):It=i):It=Sn?Cr(r.stateNode.nextSibling):null;return!0}function Xi(){It=Sn=null,ct=!1}function Rh(){var r=ai;return r!==null&&(Yn===null?Yn=r:Yn.push.apply(Yn,r),ai=null),r}function ul(r){ai===null?ai=[r]:ai.push(r)}var Oh=P(null),Ji=null,Ta=null;function oi(r,i,s){te(Oh,i._currentValue),i._currentValue=s}function Aa(r){r._currentValue=Oh.current,Q(Oh)}function Th(r,i,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===s)break;r=r.return}}function Ah(r,i,s,c){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 M=v;v=m;for(var U=0;U<i.length;U++)if(M.context===i[U]){v.lanes|=s,M=v.alternate,M!==null&&(M.lanes|=s),Th(v.return,s,r),c||(x=null);break e}v=M.next}}else if(m.tag===18){if(x=m.return,x===null)throw Error(a(341));x.lanes|=s,v=x.alternate,v!==null&&(v.lanes|=s),Th(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 es(r,i,s,c){r=null;for(var m=i,v=!1;m!==null;){if(!v){if((m.flags&524288)!==0)v=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var x=m.alternate;if(x===null)throw Error(a(387));if(x=x.memoizedProps,x!==null){var M=m.type;rr(m.pendingProps.value,x.value)||(r!==null?r.push(M):r=[M])}}else if(m===ye.current){if(x=m.alternate,x===null)throw Error(a(387));x.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(jl):r=[jl])}m=m.return}r!==null&&Ah(i,r,s,c),i.flags|=262144}function nu(r){for(r=r.firstContext;r!==null;){if(!rr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function eo(r){Ji=r,Ta=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function wn(r){return Ey(Ji,r)}function ru(r,i){return Ji===null&&eo(r),Ey(r,i)}function Ey(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Ta===null){if(r===null)throw Error(a(308));Ta=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Ta=Ta.next=i;return s}var ZT=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(s){return s()})}},QT=e.unstable_scheduleCallback,XT=e.unstable_NormalPriority,Yt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ch(){return{controller:new ZT,data:new Map,refCount:0}}function dl(r){r.refCount--,r.refCount===0&&QT(XT,function(){r.controller.abort()})}var fl=null,Mh=0,ts=0,ns=null;function JT(r,i){if(fl===null){var s=fl=[];Mh=0,ts=Dp(),ns={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Mh++,i.then(Sy,Sy),i}function Sy(){if(--Mh===0&&fl!==null){ns!==null&&(ns.status="fulfilled");var r=fl;fl=null,ts=0,ns=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function eA(r,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var wy=k.S;k.S=function(r,i){ob=de(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&JT(r,i),wy!==null&&wy(r,i)};var to=P(null);function Nh(){var r=to.current;return r!==null?r:Tt.pooledCache}function au(r,i){i===null?te(to,to.current):te(to,i.pool)}function xy(){var r=Nh();return r===null?null:{parent:Yt._currentValue,pool:r}}var rs=Error(a(460)),Ih=Error(a(474)),iu=Error(a(542)),ou={then:function(){}};function Ry(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Oy(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(wa,wa),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Ay(r),r;default:if(typeof i.status=="string")i.then(wa,wa);else{if(r=Tt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Ay(r),r}throw ro=i,rs}}function no(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ro=s,rs):s}}var ro=null;function Ty(){if(ro===null)throw Error(a(459));var r=ro;return ro=null,r}function Ay(r){if(r===rs||r===iu)throw Error(a(483))}var as=null,hl=0;function su(r){var i=hl;return hl+=1,as===null&&(as=[]),Oy(as,r,i)}function pl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function lu(r,i){throw i.$$typeof===y?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function Cy(r){function i(K,$){if(r){var X=K.deletions;X===null?(K.deletions=[$],K.flags|=16):X.push($)}}function s(K,$){if(!r)return null;for(;$!==null;)i(K,$),$=$.sibling;return null}function c(K){for(var $=new Map;K!==null;)K.key!==null?$.set(K.key,K):$.set(K.index,K),K=K.sibling;return $}function m(K,$){return K=Ra(K,$),K.index=0,K.sibling=null,K}function v(K,$,X){return K.index=X,r?(X=K.alternate,X!==null?(X=X.index,X<$?(K.flags|=67108866,$):X):(K.flags|=67108866,$)):(K.flags|=1048576,$)}function x(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function M(K,$,X,ue){return $===null||$.tag!==6?($=_h(X,K.mode,ue),$.return=K,$):($=m($,X),$.return=K,$)}function U(K,$,X,ue){var Pe=X.type;return Pe===w?ce(K,$,X.props.children,ue,X.key):$!==null&&($.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&no(Pe)===$.type)?($=m($,X.props),pl($,X),$.return=K,$):($=eu(X.type,X.key,X.props,null,K.mode,ue),pl($,X),$.return=K,$)}function J(K,$,X,ue){return $===null||$.tag!==4||$.stateNode.containerInfo!==X.containerInfo||$.stateNode.implementation!==X.implementation?($=Eh(X,K.mode,ue),$.return=K,$):($=m($,X.children||[]),$.return=K,$)}function ce(K,$,X,ue,Pe){return $===null||$.tag!==7?($=Qi(X,K.mode,ue,Pe),$.return=K,$):($=m($,X),$.return=K,$)}function fe(K,$,X){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=_h(""+$,K.mode,X),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return X=eu($.type,$.key,$.props,null,K.mode,X),pl(X,$),X.return=K,X;case S:return $=Eh($,K.mode,X),$.return=K,$;case D:return $=no($),fe(K,$,X)}if(ee($)||V($))return $=Qi($,K.mode,X,null),$.return=K,$;if(typeof $.then=="function")return fe(K,su($),X);if($.$$typeof===C)return fe(K,ru(K,$),X);lu(K,$)}return null}function ne(K,$,X,ue){var Pe=$!==null?$.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:M(K,$,""+X,ue);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case _:return X.key===Pe?U(K,$,X,ue):null;case S:return X.key===Pe?J(K,$,X,ue):null;case D:return X=no(X),ne(K,$,X,ue)}if(ee(X)||V(X))return Pe!==null?null:ce(K,$,X,ue,null);if(typeof X.then=="function")return ne(K,$,su(X),ue);if(X.$$typeof===C)return ne(K,$,ru(K,X),ue);lu(K,X)}return null}function oe(K,$,X,ue,Pe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return K=K.get(X)||null,M($,K,""+ue,Pe);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case _:return K=K.get(ue.key===null?X:ue.key)||null,U($,K,ue,Pe);case S:return K=K.get(ue.key===null?X:ue.key)||null,J($,K,ue,Pe);case D:return ue=no(ue),oe(K,$,X,ue,Pe)}if(ee(ue)||V(ue))return K=K.get(X)||null,ce($,K,ue,Pe,null);if(typeof ue.then=="function")return oe(K,$,X,su(ue),Pe);if(ue.$$typeof===C)return oe(K,$,X,ru($,ue),Pe);lu($,ue)}return null}function Te(K,$,X,ue){for(var Pe=null,pt=null,Ie=$,$e=$=0,st=null;Ie!==null&&$e<X.length;$e++){Ie.index>$e?(st=Ie,Ie=null):st=Ie.sibling;var mt=ne(K,Ie,X[$e],ue);if(mt===null){Ie===null&&(Ie=st);break}r&&Ie&&mt.alternate===null&&i(K,Ie),$=v(mt,$,$e),pt===null?Pe=mt:pt.sibling=mt,pt=mt,Ie=st}if($e===X.length)return s(K,Ie),ct&&Oa(K,$e),Pe;if(Ie===null){for(;$e<X.length;$e++)Ie=fe(K,X[$e],ue),Ie!==null&&($=v(Ie,$,$e),pt===null?Pe=Ie:pt.sibling=Ie,pt=Ie);return ct&&Oa(K,$e),Pe}for(Ie=c(Ie);$e<X.length;$e++)st=oe(Ie,K,$e,X[$e],ue),st!==null&&(r&&st.alternate!==null&&Ie.delete(st.key===null?$e:st.key),$=v(st,$,$e),pt===null?Pe=st:pt.sibling=st,pt=st);return r&&Ie.forEach(function(xi){return i(K,xi)}),ct&&Oa(K,$e),Pe}function ke(K,$,X,ue){if(X==null)throw Error(a(151));for(var Pe=null,pt=null,Ie=$,$e=$=0,st=null,mt=X.next();Ie!==null&&!mt.done;$e++,mt=X.next()){Ie.index>$e?(st=Ie,Ie=null):st=Ie.sibling;var xi=ne(K,Ie,mt.value,ue);if(xi===null){Ie===null&&(Ie=st);break}r&&Ie&&xi.alternate===null&&i(K,Ie),$=v(xi,$,$e),pt===null?Pe=xi:pt.sibling=xi,pt=xi,Ie=st}if(mt.done)return s(K,Ie),ct&&Oa(K,$e),Pe;if(Ie===null){for(;!mt.done;$e++,mt=X.next())mt=fe(K,mt.value,ue),mt!==null&&($=v(mt,$,$e),pt===null?Pe=mt:pt.sibling=mt,pt=mt);return ct&&Oa(K,$e),Pe}for(Ie=c(Ie);!mt.done;$e++,mt=X.next())mt=oe(Ie,K,$e,mt.value,ue),mt!==null&&(r&&mt.alternate!==null&&Ie.delete(mt.key===null?$e:mt.key),$=v(mt,$,$e),pt===null?Pe=mt:pt.sibling=mt,pt=mt);return r&&Ie.forEach(function(dC){return i(K,dC)}),ct&&Oa(K,$e),Pe}function xt(K,$,X,ue){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;$!==null;){if($.key===Pe){if(Pe=X.type,Pe===w){if($.tag===7){s(K,$.sibling),ue=m($,X.props.children),ue.return=K,K=ue;break e}}else if($.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&no(Pe)===$.type){s(K,$.sibling),ue=m($,X.props),pl(ue,X),ue.return=K,K=ue;break e}s(K,$);break}else i(K,$);$=$.sibling}X.type===w?(ue=Qi(X.props.children,K.mode,ue,X.key),ue.return=K,K=ue):(ue=eu(X.type,X.key,X.props,null,K.mode,ue),pl(ue,X),ue.return=K,K=ue)}return x(K);case S:e:{for(Pe=X.key;$!==null;){if($.key===Pe)if($.tag===4&&$.stateNode.containerInfo===X.containerInfo&&$.stateNode.implementation===X.implementation){s(K,$.sibling),ue=m($,X.children||[]),ue.return=K,K=ue;break e}else{s(K,$);break}else i(K,$);$=$.sibling}ue=Eh(X,K.mode,ue),ue.return=K,K=ue}return x(K);case D:return X=no(X),xt(K,$,X,ue)}if(ee(X))return Te(K,$,X,ue);if(V(X)){if(Pe=V(X),typeof Pe!="function")throw Error(a(150));return X=Pe.call(X),ke(K,$,X,ue)}if(typeof X.then=="function")return xt(K,$,su(X),ue);if(X.$$typeof===C)return xt(K,$,ru(K,X),ue);lu(K,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,$!==null&&$.tag===6?(s(K,$.sibling),ue=m($,X),ue.return=K,K=ue):(s(K,$),ue=_h(X,K.mode,ue),ue.return=K,K=ue),x(K)):s(K,$)}return function(K,$,X,ue){try{hl=0;var Pe=xt(K,$,X,ue);return as=null,Pe}catch(Ie){if(Ie===rs||Ie===iu)throw Ie;var pt=ar(29,Ie,null,K.mode);return pt.lanes=ue,pt.return=K,pt}}}var ao=Cy(!0),My=Cy(!1),si=!1;function Dh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lh(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function li(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ci(r,i,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(gt&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=Jc(r),hy(r,null,s),i}return Xc(r,c,i,s),Jc(r)}function ml(r,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,_n(r,s)}}function Ph(r,i){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var 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=i:v=v.next=i}else m=v=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=i:r.next=i,s.lastBaseUpdate=i}var kh=!1;function gl(){if(kh){var r=ns;if(r!==null)throw r}}function vl(r,i,s,c){kh=!1;var m=r.updateQueue;si=!1;var v=m.firstBaseUpdate,x=m.lastBaseUpdate,M=m.shared.pending;if(M!==null){m.shared.pending=null;var U=M,J=U.next;U.next=null,x===null?v=J:x.next=J,x=U;var ce=r.alternate;ce!==null&&(ce=ce.updateQueue,M=ce.lastBaseUpdate,M!==x&&(M===null?ce.firstBaseUpdate=J:M.next=J,ce.lastBaseUpdate=U))}if(v!==null){var fe=m.baseState;x=0,ce=J=U=null,M=v;do{var ne=M.lane&-536870913,oe=ne!==M.lane;if(oe?(ot&ne)===ne:(c&ne)===ne){ne!==0&&ne===ts&&(kh=!0),ce!==null&&(ce=ce.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Te=r,ke=M;ne=i;var xt=s;switch(ke.tag){case 1:if(Te=ke.payload,typeof Te=="function"){fe=Te.call(xt,fe,ne);break e}fe=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=ke.payload,ne=typeof Te=="function"?Te.call(xt,fe,ne):Te,ne==null)break e;fe=p({},fe,ne);break e;case 2:si=!0}}ne=M.callback,ne!==null&&(r.flags|=64,oe&&(r.flags|=8192),oe=m.callbacks,oe===null?m.callbacks=[ne]:oe.push(ne))}else oe={lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ce===null?(J=ce=oe,U=fe):ce=ce.next=oe,x|=ne;if(M=M.next,M===null){if(M=m.shared.pending,M===null)break;oe=M,M=oe.next,oe.next=null,m.lastBaseUpdate=oe,m.shared.pending=null}}while(!0);ce===null&&(U=fe),m.baseState=U,m.firstBaseUpdate=J,m.lastBaseUpdate=ce,v===null&&(m.shared.lanes=0),pi|=x,r.lanes=x,r.memoizedState=fe}}function Ny(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function Iy(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Ny(s[r],i)}var is=P(null),cu=P(0);function Dy(r,i){r=ja,te(cu,r),te(is,i),ja=r|i.baseLanes}function jh(){te(cu,ja),te(is,is.current)}function Uh(){ja=cu.current,Q(is),Q(cu)}var ir=P(null),Ar=null;function ui(r){var i=r.alternate;te(Vt,Vt.current&1),te(ir,r),Ar===null&&(i===null||is.current!==null||i.memoizedState!==null)&&(Ar=r)}function Bh(r){te(Vt,Vt.current),te(ir,r),Ar===null&&(Ar=r)}function Ly(r){r.tag===22?(te(Vt,Vt.current),te(ir,r),Ar===null&&(Ar=r)):di()}function di(){te(Vt,Vt.current),te(ir,ir.current)}function or(r){Q(ir),Ar===r&&(Ar=null),Q(Vt)}var Vt=P(0);function uu(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Gp(s)||qp(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ca=0,He=null,St=null,Kt=null,du=!1,os=!1,io=!1,fu=0,yl=0,ss=null,tA=0;function Ut(){throw Error(a(321))}function zh(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!rr(r[s],i[s]))return!1;return!0}function Fh(r,i,s,c,m,v){return Ca=v,He=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,k.H=r===null||r.memoizedState===null?v1:np,io=!1,v=s(c,m),io=!1,os&&(v=ky(i,s,c,m)),Py(r),v}function Py(r){k.H=El;var i=St!==null&&St.next!==null;if(Ca=0,Kt=St=He=null,du=!1,yl=0,ss=null,i)throw Error(a(300));r===null||Wt||(r=r.dependencies,r!==null&&nu(r)&&(Wt=!0))}function ky(r,i,s,c){He=r;var m=0;do{if(os&&(ss=null),yl=0,os=!1,25<=m)throw Error(a(301));if(m+=1,Kt=St=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}k.H=y1,v=i(s,c)}while(os);return v}function nA(){var r=k.H,i=r.useState()[0];return i=typeof i.then=="function"?bl(i):i,r=r.useState()[0],(St!==null?St.memoizedState:null)!==r&&(He.flags|=1024),i}function Vh(){var r=fu!==0;return fu=0,r}function Hh(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function $h(r){if(du){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}du=!1}Ca=0,Kt=St=He=null,os=!1,yl=fu=0,ss=null}function kn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?He.memoizedState=Kt=r:Kt=Kt.next=r,Kt}function Ht(){if(St===null){var r=He.alternate;r=r!==null?r.memoizedState:null}else r=St.next;var i=Kt===null?He.memoizedState:Kt.next;if(i!==null)Kt=i,St=r;else{if(r===null)throw He.alternate===null?Error(a(467)):Error(a(310));St=r,r={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Kt===null?He.memoizedState=Kt=r:Kt=Kt.next=r}return Kt}function hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(r){var i=yl;return yl+=1,ss===null&&(ss=[]),r=Oy(ss,r,i),i=He,(Kt===null?i.memoizedState:Kt.next)===null&&(i=i.alternate,k.H=i===null||i.memoizedState===null?v1:np),r}function pu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return bl(r);if(r.$$typeof===C)return wn(r)}throw Error(a(438,String(r)))}function Gh(r){var i=null,s=He.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=He.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=hu(),He.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(r),c=0;c<r;c++)s[c]=Z;return i.index++,s}function Ma(r,i){return typeof i=="function"?i(r):i}function mu(r){var i=Ht();return qh(i,St,r)}function qh(r,i,s){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var m=r.baseQueue,v=c.pending;if(v!==null){if(m!==null){var x=m.next;m.next=v.next,v.next=x}i.baseQueue=m=v,c.pending=null}if(v=r.baseState,m===null)r.memoizedState=v;else{i=m.next;var M=x=null,U=null,J=i,ce=!1;do{var fe=J.lane&-536870913;if(fe!==J.lane?(ot&fe)===fe:(Ca&fe)===fe){var ne=J.revertLane;if(ne===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),fe===ts&&(ce=!0);else if((Ca&ne)===ne){J=J.next,ne===ts&&(ce=!0);continue}else fe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=fe,x=v):U=U.next=fe,He.lanes|=ne,pi|=ne;fe=J.action,io&&s(v,fe),v=J.hasEagerState?J.eagerState:s(v,fe)}else ne={lane:fe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=ne,x=v):U=U.next=ne,He.lanes|=fe,pi|=fe;J=J.next}while(J!==null&&J!==i);if(U===null?x=v:U.next=M,!rr(v,r.memoizedState)&&(Wt=!0,ce&&(s=ns,s!==null)))throw s;r.memoizedState=v,r.baseState=x,r.baseQueue=U,c.lastRenderedState=v}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Yh(r){var i=Ht(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,v=i.memoizedState;if(m!==null){s.pending=null;var x=m=m.next;do v=r(v,x.action),x=x.next;while(x!==m);rr(v,i.memoizedState)||(Wt=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),s.lastRenderedState=v}return[v,c]}function jy(r,i,s){var c=He,m=Ht(),v=ct;if(v){if(s===void 0)throw Error(a(407));s=s()}else s=i();var x=!rr((St||m).memoizedState,s);if(x&&(m.memoizedState=s,Wt=!0),m=m.queue,Zh(zy.bind(null,c,m,r),[r]),m.getSnapshot!==i||x||Kt!==null&&Kt.memoizedState.tag&1){if(c.flags|=2048,ls(9,{destroy:void 0},By.bind(null,c,m,s,i),null),Tt===null)throw Error(a(349));v||(Ca&127)!==0||Uy(c,i,s)}return s}function Uy(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=He.updateQueue,i===null?(i=hu(),He.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function By(r,i,s,c){i.value=s,i.getSnapshot=c,Fy(i)&&Vy(r)}function zy(r,i,s){return s(function(){Fy(i)&&Vy(r)})}function Fy(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!rr(r,s)}catch{return!0}}function Vy(r){var i=Zi(r,2);i!==null&&Kn(i,r,2)}function Kh(r){var i=kn();if(typeof r=="function"){var s=r;if(r=s(),io){on(!0);try{s()}finally{on(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:r},i}function Hy(r,i,s,c){return r.baseState=s,qh(r,St,typeof c=="function"?c:Ma)}function rA(r,i,s,c,m){if(yu(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){v.listeners.push(x)}};k.T!==null?s(!0):v.isTransition=!1,c(v),s=i.pending,s===null?(v.next=i.pending=v,$y(i,v)):(v.next=s.next,i.pending=s.next=v)}}function $y(r,i){var s=i.action,c=i.payload,m=r.state;if(i.isTransition){var v=k.T,x={};k.T=x;try{var M=s(m,c),U=k.S;U!==null&&U(x,M),Gy(r,i,M)}catch(J){Wh(r,i,J)}finally{v!==null&&x.types!==null&&(v.types=x.types),k.T=v}}else try{v=s(m,c),Gy(r,i,v)}catch(J){Wh(r,i,J)}}function Gy(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){qy(r,i,c)},function(c){return Wh(r,i,c)}):qy(r,i,s)}function qy(r,i,s){i.status="fulfilled",i.value=s,Yy(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,$y(r,s)))}function Wh(r,i,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Yy(i),i=i.next;while(i!==c)}r.action=null}function Yy(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Ky(r,i){return i}function Wy(r,i){if(ct){var s=Tt.formState;if(s!==null){e:{var c=He;if(ct){if(It){t:{for(var m=It,v=Tr;m.nodeType!==8;){if(!v){m=null;break t}if(m=Cr(m.nextSibling),m===null){m=null;break t}}v=m.data,m=v==="F!"||v==="F"?m:null}if(m){It=Cr(m.nextSibling),c=m.data==="F!";break e}}ii(c)}c=!1}c&&(i=s[0])}}return s=kn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ky,lastRenderedState:i},s.queue=c,s=p1.bind(null,He,c),c.dispatch=s,c=Kh(!1),v=tp.bind(null,He,!1,c.queue),c=kn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,s=rA.bind(null,He,m,v,s),m.dispatch=s,c.memoizedState=r,[i,s,!1]}function Zy(r){var i=Ht();return Qy(i,St,r)}function Qy(r,i,s){if(i=qh(r,i,Ky)[0],r=mu(Ma)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=bl(i)}catch(x){throw x===rs?iu:x}else c=i;i=Ht();var m=i.queue,v=m.dispatch;return s!==i.memoizedState&&(He.flags|=2048,ls(9,{destroy:void 0},aA.bind(null,m,s),null)),[c,v,r]}function aA(r,i){r.action=i}function Xy(r){var i=Ht(),s=St;if(s!==null)return Qy(i,s,r);Ht(),i=i.memoizedState,s=Ht();var c=s.queue.dispatch;return s.memoizedState=r,[i,c,!1]}function ls(r,i,s,c){return r={tag:r,create:s,deps:c,inst:i,next:null},i=He.updateQueue,i===null&&(i=hu(),He.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,i.lastEffect=r),r}function Jy(){return Ht().memoizedState}function gu(r,i,s,c){var m=kn();He.flags|=r,m.memoizedState=ls(1|i,{destroy:void 0},s,c===void 0?null:c)}function vu(r,i,s,c){var m=Ht();c=c===void 0?null:c;var v=m.memoizedState.inst;St!==null&&c!==null&&zh(c,St.memoizedState.deps)?m.memoizedState=ls(i,v,s,c):(He.flags|=r,m.memoizedState=ls(1|i,v,s,c))}function e1(r,i){gu(8390656,8,r,i)}function Zh(r,i){vu(2048,8,r,i)}function iA(r){He.flags|=4;var i=He.updateQueue;if(i===null)i=hu(),He.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function t1(r){var i=Ht().memoizedState;return iA({ref:i,nextImpl:r}),function(){if((gt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function n1(r,i){return vu(4,2,r,i)}function r1(r,i){return vu(4,4,r,i)}function a1(r,i){if(typeof i=="function"){r=r();var s=i(r);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function i1(r,i,s){s=s!=null?s.concat([r]):null,vu(4,4,a1.bind(null,i,r),s)}function Qh(){}function o1(r,i){var s=Ht();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&zh(i,c[1])?c[0]:(s.memoizedState=[r,i],r)}function s1(r,i){var s=Ht();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&zh(i,c[1]))return c[0];if(c=r(),io){on(!0);try{r()}finally{on(!1)}}return s.memoizedState=[c,i],c}function Xh(r,i,s){return s===void 0||(Ca&1073741824)!==0&&(ot&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=lb(),He.lanes|=r,pi|=r,s)}function l1(r,i,s,c){return rr(s,i)?s:is.current!==null?(r=Xh(r,s,c),rr(r,i)||(Wt=!0),r):(Ca&42)===0||(Ca&1073741824)!==0&&(ot&261930)===0?(Wt=!0,r.memoizedState=s):(r=lb(),He.lanes|=r,pi|=r,i)}function c1(r,i,s,c,m){var v=F.p;F.p=v!==0&&8>v?v:8;var x=k.T,M={};k.T=M,tp(r,!1,i,s);try{var U=m(),J=k.S;if(J!==null&&J(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ce=eA(U,c);_l(r,i,ce,cr(r))}else _l(r,i,c,cr(r))}catch(fe){_l(r,i,{then:function(){},status:"rejected",reason:fe},cr())}finally{F.p=v,x!==null&&M.types!==null&&(x.types=M.types),k.T=x}}function oA(){}function Jh(r,i,s,c){if(r.tag!==5)throw Error(a(476));var m=u1(r).queue;c1(r,m,i,G,s===null?oA:function(){return d1(r),s(c)})}function u1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:G},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function d1(r){var i=u1(r);i.next===null&&(i=r.alternate.memoizedState),_l(r,i.next.queue,{},cr())}function ep(){return wn(jl)}function f1(){return Ht().memoizedState}function h1(){return Ht().memoizedState}function sA(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=cr();r=li(s);var c=ci(i,r,s);c!==null&&(Kn(c,i,s),ml(c,i,s)),i={cache:Ch()},r.payload=i;return}i=i.return}}function lA(r,i,s){var c=cr();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},yu(r)?m1(i,s):(s=yh(r,i,s,c),s!==null&&(Kn(s,r,c),g1(s,i,c)))}function p1(r,i,s){var c=cr();_l(r,i,s,c)}function _l(r,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(yu(r))m1(i,m);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var x=i.lastRenderedState,M=v(x,s);if(m.hasEagerState=!0,m.eagerState=M,rr(M,x))return Xc(r,i,m,0),Tt===null&&Qc(),!1}catch{}if(s=yh(r,i,m,c),s!==null)return Kn(s,r,c),g1(s,i,c),!0}return!1}function tp(r,i,s,c){if(c={lane:2,revertLane:Dp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},yu(r)){if(i)throw Error(a(479))}else i=yh(r,s,c,2),i!==null&&Kn(i,r,2)}function yu(r){var i=r.alternate;return r===He||i!==null&&i===He}function m1(r,i){os=du=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function g1(r,i,s){if((s&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,_n(r,s)}}var El={readContext:wn,use:pu,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};El.useEffectEvent=Ut;var v1={readContext:wn,use:pu,useCallback:function(r,i){return kn().memoizedState=[r,i===void 0?null:i],r},useContext:wn,useEffect:e1,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,gu(4194308,4,a1.bind(null,i,r),s)},useLayoutEffect:function(r,i){return gu(4194308,4,r,i)},useInsertionEffect:function(r,i){gu(4,2,r,i)},useMemo:function(r,i){var s=kn();i=i===void 0?null:i;var c=r();if(io){on(!0);try{r()}finally{on(!1)}}return s.memoizedState=[c,i],c},useReducer:function(r,i,s){var c=kn();if(s!==void 0){var m=s(i);if(io){on(!0);try{s(i)}finally{on(!1)}}}else m=i;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=lA.bind(null,He,r),[c.memoizedState,r]},useRef:function(r){var i=kn();return r={current:r},i.memoizedState=r},useState:function(r){r=Kh(r);var i=r.queue,s=p1.bind(null,He,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:Qh,useDeferredValue:function(r,i){var s=kn();return Xh(s,r,i)},useTransition:function(){var r=Kh(!1);return r=c1.bind(null,He,r.queue,!0,!1),kn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var c=He,m=kn();if(ct){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Tt===null)throw Error(a(349));(ot&127)!==0||Uy(c,i,s)}m.memoizedState=s;var v={value:s,getSnapshot:i};return m.queue=v,e1(zy.bind(null,c,v,r),[r]),c.flags|=2048,ls(9,{destroy:void 0},By.bind(null,c,v,s,i),null),s},useId:function(){var r=kn(),i=Tt.identifierPrefix;if(ct){var s=ra,c=na;s=(c&~(1<<32-qt(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=fu++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=tA++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:ep,useFormState:Wy,useActionState:Wy,useOptimistic:function(r){var i=kn();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=tp.bind(null,He,!0,s),s.dispatch=i,[r,i]},useMemoCache:Gh,useCacheRefresh:function(){return kn().memoizedState=sA.bind(null,He)},useEffectEvent:function(r){var i=kn(),s={impl:r};return i.memoizedState=s,function(){if((gt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},np={readContext:wn,use:pu,useCallback:o1,useContext:wn,useEffect:Zh,useImperativeHandle:i1,useInsertionEffect:n1,useLayoutEffect:r1,useMemo:s1,useReducer:mu,useRef:Jy,useState:function(){return mu(Ma)},useDebugValue:Qh,useDeferredValue:function(r,i){var s=Ht();return l1(s,St.memoizedState,r,i)},useTransition:function(){var r=mu(Ma)[0],i=Ht().memoizedState;return[typeof r=="boolean"?r:bl(r),i]},useSyncExternalStore:jy,useId:f1,useHostTransitionStatus:ep,useFormState:Zy,useActionState:Zy,useOptimistic:function(r,i){var s=Ht();return Hy(s,St,r,i)},useMemoCache:Gh,useCacheRefresh:h1};np.useEffectEvent=t1;var y1={readContext:wn,use:pu,useCallback:o1,useContext:wn,useEffect:Zh,useImperativeHandle:i1,useInsertionEffect:n1,useLayoutEffect:r1,useMemo:s1,useReducer:Yh,useRef:Jy,useState:function(){return Yh(Ma)},useDebugValue:Qh,useDeferredValue:function(r,i){var s=Ht();return St===null?Xh(s,r,i):l1(s,St.memoizedState,r,i)},useTransition:function(){var r=Yh(Ma)[0],i=Ht().memoizedState;return[typeof r=="boolean"?r:bl(r),i]},useSyncExternalStore:jy,useId:f1,useHostTransitionStatus:ep,useFormState:Xy,useActionState:Xy,useOptimistic:function(r,i){var s=Ht();return St!==null?Hy(s,St,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:Gh,useCacheRefresh:h1};y1.useEffectEvent=t1;function rp(r,i,s,c){i=r.memoizedState,s=s(c,i),s=s==null?i:p({},i,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var ap={enqueueSetState:function(r,i,s){r=r._reactInternals;var c=cr(),m=li(c);m.payload=i,s!=null&&(m.callback=s),i=ci(r,m,c),i!==null&&(Kn(i,r,c),ml(i,r,c))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var c=cr(),m=li(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=ci(r,m,c),i!==null&&(Kn(i,r,c),ml(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=cr(),c=li(s);c.tag=2,i!=null&&(c.callback=i),i=ci(r,c,s),i!==null&&(Kn(i,r,s),ml(i,r,s))}};function b1(r,i,s,c,m,v,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,v,x):i.prototype&&i.prototype.isPureReactComponent?!sl(s,c)||!sl(m,v):!0}function _1(r,i,s,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==r&&ap.enqueueReplaceState(i,i.state,null)}function oo(r,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(r=r.defaultProps){s===i&&(s=p({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function E1(r){Zc(r)}function S1(r){console.error(r)}function w1(r){Zc(r)}function bu(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function x1(r,i,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function ip(r,i,s){return s=li(s),s.tag=3,s.payload={element:null},s.callback=function(){bu(r,i)},s}function R1(r){return r=li(r),r.tag=3,r}function O1(r,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var v=c.value;r.payload=function(){return m(v)},r.callback=function(){x1(i,s,c)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){x1(i,s,c),typeof m!="function"&&(mi===null?mi=new Set([this]):mi.add(this));var M=c.stack;this.componentDidCatch(c.value,{componentStack:M!==null?M:""})})}function cA(r,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&es(i,s,m,!0),s=ir.current,s!==null){switch(s.tag){case 31:case 13:return Ar===null?Nu():s.alternate===null&&Bt===0&&(Bt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===ou?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Mp(r,c,m)),!1;case 22:return s.flags|=65536,c===ou?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Mp(r,c,m)),!1}throw Error(a(435,s.tag))}return Mp(r,c,m),Nu(),!1}if(ct)return i=ir.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==xh&&(r=Error(a(422),{cause:c}),ul(xr(r,s)))):(c!==xh&&(i=Error(a(423),{cause:c}),ul(xr(i,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=xr(c,s),m=ip(r.stateNode,c,m),Ph(r,m),Bt!==4&&(Bt=2)),!1;var v=Error(a(520),{cause:c});if(v=xr(v,s),Cl===null?Cl=[v]:Cl.push(v),Bt!==4&&(Bt=2),i===null)return!0;c=xr(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=ip(s.stateNode,c,r),Ph(s,r),!1;case 1:if(i=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(mi===null||!mi.has(v))))return s.flags|=65536,m&=-m,s.lanes|=m,m=R1(m),O1(m,r,s,c),Ph(s,m),!1}s=s.return}while(s!==null);return!1}var op=Error(a(461)),Wt=!1;function xn(r,i,s,c){i.child=r===null?My(i,null,s,c):ao(i,r.child,s,c)}function T1(r,i,s,c,m){s=s.render;var v=i.ref;if("ref"in c){var x={};for(var M in c)M!=="ref"&&(x[M]=c[M])}else x=c;return eo(i),c=Fh(r,i,s,x,v,m),M=Vh(),r!==null&&!Wt?(Hh(r,i,m),Na(r,i,m)):(ct&&M&&Sh(i),i.flags|=1,xn(r,i,c,m),i.child)}function A1(r,i,s,c,m){if(r===null){var v=s.type;return typeof v=="function"&&!bh(v)&&v.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=v,C1(r,i,v,c,m)):(r=eu(s.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!pp(r,m)){var x=v.memoizedProps;if(s=s.compare,s=s!==null?s:sl,s(x,c)&&r.ref===i.ref)return Na(r,i,m)}return i.flags|=1,r=Ra(v,c),r.ref=i.ref,r.return=i,i.child=r}function C1(r,i,s,c,m){if(r!==null){var v=r.memoizedProps;if(sl(v,c)&&r.ref===i.ref)if(Wt=!1,i.pendingProps=c=v,pp(r,m))(r.flags&131072)!==0&&(Wt=!0);else return i.lanes=r.lanes,Na(r,i,m)}return sp(r,i,s,c,m)}function M1(r,i,s,c){var m=c.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,r!==null){for(c=i.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~v}else c=0,i.child=null;return N1(r,i,v,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&au(i,v!==null?v.cachePool:null),v!==null?Dy(i,v):jh(),Ly(i);else return c=i.lanes=536870912,N1(r,i,v!==null?v.baseLanes|s:s,s,c)}else v!==null?(au(i,v.cachePool),Dy(i,v),di(),i.memoizedState=null):(r!==null&&au(i,null),jh(),di());return xn(r,i,m,s),i.child}function Sl(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function N1(r,i,s,c,m){var v=Nh();return v=v===null?null:{parent:Yt._currentValue,pool:v},i.memoizedState={baseLanes:s,cachePool:v},r!==null&&au(i,null),jh(),Ly(i),r!==null&&es(r,i,c,!0),i.childLanes=m,null}function _u(r,i){return i=Su({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function I1(r,i,s){return ao(i,r.child,null,s),r=_u(i,i.pendingProps),r.flags|=2,or(i),i.memoizedState=null,r}function uA(r,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(ct){if(c.mode==="hidden")return r=_u(i,c),i.lanes=536870912,Sl(null,r);if(Bh(i),(r=It)?(r=$b(r,Tr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ri!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=my(r),s.return=i,i.child=s,Sn=i,It=null)):r=null,r===null)throw ii(i);return i.lanes=536870912,null}return _u(i,c)}var v=r.memoizedState;if(v!==null){var x=v.dehydrated;if(Bh(i),m)if(i.flags&256)i.flags&=-257,i=I1(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Wt||es(r,i,s,!1),m=(s&r.childLanes)!==0,Wt||m){if(c=Tt,c!==null&&(x=Fn(c,s),x!==0&&x!==v.retryLane))throw v.retryLane=x,Zi(r,x),Kn(c,r,x),op;Nu(),i=I1(r,i,s)}else r=v.treeContext,It=Cr(x.nextSibling),Sn=i,ct=!0,ai=null,Tr=!1,r!==null&&yy(i,r),i=_u(i,c),i.flags|=4096;return i}return r=Ra(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function Eu(r,i){var s=i.ref;if(s===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(i.flags|=4194816)}}function sp(r,i,s,c,m){return eo(i),s=Fh(r,i,s,c,void 0,m),c=Vh(),r!==null&&!Wt?(Hh(r,i,m),Na(r,i,m)):(ct&&c&&Sh(i),i.flags|=1,xn(r,i,s,m),i.child)}function D1(r,i,s,c,m,v){return eo(i),i.updateQueue=null,s=ky(i,c,s,m),Py(r),c=Vh(),r!==null&&!Wt?(Hh(r,i,v),Na(r,i,v)):(ct&&c&&Sh(i),i.flags|=1,xn(r,i,s,v),i.child)}function L1(r,i,s,c,m){if(eo(i),i.stateNode===null){var v=Zo,x=s.contextType;typeof x=="object"&&x!==null&&(v=wn(x)),v=new s(c,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=ap,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=c,v.state=i.memoizedState,v.refs={},Dh(i),x=s.contextType,v.context=typeof x=="object"&&x!==null?wn(x):Zo,v.state=i.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(rp(i,s,x,c),v.state=i.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&&ap.enqueueReplaceState(v,v.state,null),vl(i,c,v,m),gl(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){v=i.stateNode;var M=i.memoizedProps,U=oo(s,M);v.props=U;var J=v.context,ce=s.contextType;x=Zo,typeof ce=="object"&&ce!==null&&(x=wn(ce));var fe=s.getDerivedStateFromProps;ce=typeof fe=="function"||typeof v.getSnapshotBeforeUpdate=="function",M=i.pendingProps!==M,ce||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(M||J!==x)&&_1(i,v,c,x),si=!1;var ne=i.memoizedState;v.state=ne,vl(i,c,v,m),gl(),J=i.memoizedState,M||ne!==J||si?(typeof fe=="function"&&(rp(i,s,fe,c),J=i.memoizedState),(U=si||b1(i,s,U,c,ne,J,x))?(ce||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=J),v.props=c,v.state=J,v.context=x,c=U):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{v=i.stateNode,Lh(r,i),x=i.memoizedProps,ce=oo(s,x),v.props=ce,fe=i.pendingProps,ne=v.context,J=s.contextType,U=Zo,typeof J=="object"&&J!==null&&(U=wn(J)),M=s.getDerivedStateFromProps,(J=typeof M=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(x!==fe||ne!==U)&&_1(i,v,c,U),si=!1,ne=i.memoizedState,v.state=ne,vl(i,c,v,m),gl();var oe=i.memoizedState;x!==fe||ne!==oe||si||r!==null&&r.dependencies!==null&&nu(r.dependencies)?(typeof M=="function"&&(rp(i,s,M,c),oe=i.memoizedState),(ce=si||b1(i,s,ce,c,ne,oe,U)||r!==null&&r.dependencies!==null&&nu(r.dependencies))?(J||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,oe,U),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,oe,U)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=oe),v.props=c,v.state=oe,v.context=U,c=ce):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=1024),c=!1)}return v=c,Eu(r,i),c=(i.flags&128)!==0,v||c?(v=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&c?(i.child=ao(i,r.child,null,m),i.child=ao(i,null,s,m)):xn(r,i,s,m),i.memoizedState=v.state,r=i.child):r=Na(r,i,m),r}function P1(r,i,s,c){return Xi(),i.flags|=256,xn(r,i,s,c),i.child}var lp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cp(r){return{baseLanes:r,cachePool:xy()}}function up(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=lr),r}function k1(r,i,s){var c=i.pendingProps,m=!1,v=(i.flags&128)!==0,x;if((x=v)||(x=r!==null&&r.memoizedState===null?!1:(Vt.current&2)!==0),x&&(m=!0,i.flags&=-129),x=(i.flags&32)!==0,i.flags&=-33,r===null){if(ct){if(m?ui(i):di(),(r=It)?(r=$b(r,Tr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ri!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=my(r),s.return=i,i.child=s,Sn=i,It=null)):r=null,r===null)throw ii(i);return qp(r)?i.lanes=32:i.lanes=536870912,null}var M=c.children;return c=c.fallback,m?(di(),m=i.mode,M=Su({mode:"hidden",children:M},m),c=Qi(c,m,s,null),M.return=i,c.return=i,M.sibling=c,i.child=M,c=i.child,c.memoizedState=cp(s),c.childLanes=up(r,x,s),i.memoizedState=lp,Sl(null,c)):(ui(i),dp(i,M))}var U=r.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(v)i.flags&256?(ui(i),i.flags&=-257,i=fp(r,i,s)):i.memoizedState!==null?(di(),i.child=r.child,i.flags|=128,i=null):(di(),M=c.fallback,m=i.mode,c=Su({mode:"visible",children:c.children},m),M=Qi(M,m,s,null),M.flags|=2,c.return=i,M.return=i,c.sibling=M,i.child=c,ao(i,r.child,null,s),c=i.child,c.memoizedState=cp(s),c.childLanes=up(r,x,s),i.memoizedState=lp,i=Sl(null,c));else if(ui(i),qp(M)){if(x=M.nextSibling&&M.nextSibling.dataset,x)var J=x.dgst;x=J,c=Error(a(419)),c.stack="",c.digest=x,ul({value:c,source:null,stack:null}),i=fp(r,i,s)}else if(Wt||es(r,i,s,!1),x=(s&r.childLanes)!==0,Wt||x){if(x=Tt,x!==null&&(c=Fn(x,s),c!==0&&c!==U.retryLane))throw U.retryLane=c,Zi(r,c),Kn(x,r,c),op;Gp(M)||Nu(),i=fp(r,i,s)}else Gp(M)?(i.flags|=192,i.child=r.child,i=null):(r=U.treeContext,It=Cr(M.nextSibling),Sn=i,ct=!0,ai=null,Tr=!1,r!==null&&yy(i,r),i=dp(i,c.children),i.flags|=4096);return i}return m?(di(),M=c.fallback,m=i.mode,U=r.child,J=U.sibling,c=Ra(U,{mode:"hidden",children:c.children}),c.subtreeFlags=U.subtreeFlags&65011712,J!==null?M=Ra(J,M):(M=Qi(M,m,s,null),M.flags|=2),M.return=i,c.return=i,c.sibling=M,i.child=c,Sl(null,c),c=i.child,M=r.child.memoizedState,M===null?M=cp(s):(m=M.cachePool,m!==null?(U=Yt._currentValue,m=m.parent!==U?{parent:U,pool:U}:m):m=xy(),M={baseLanes:M.baseLanes|s,cachePool:m}),c.memoizedState=M,c.childLanes=up(r,x,s),i.memoizedState=lp,Sl(r.child,c)):(ui(i),s=r.child,r=s.sibling,s=Ra(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,r!==null&&(x=i.deletions,x===null?(i.deletions=[r],i.flags|=16):x.push(r)),i.child=s,i.memoizedState=null,s)}function dp(r,i){return i=Su({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Su(r,i){return r=ar(22,r,null,i),r.lanes=0,r}function fp(r,i,s){return ao(i,r.child,null,s),r=dp(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function j1(r,i,s){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Th(r.return,i,s)}function hp(r,i,s,c,m,v){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:v}:(x.isBackwards=i,x.rendering=null,x.renderingStartTime=0,x.last=c,x.tail=s,x.tailMode=m,x.treeForkCount=v)}function U1(r,i,s){var c=i.pendingProps,m=c.revealOrder,v=c.tail;c=c.children;var x=Vt.current,M=(x&2)!==0;if(M?(x=x&1|2,i.flags|=128):x&=1,te(Vt,x),xn(r,i,c,s),c=ct?cl:0,!M&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&j1(r,s,i);else if(r.tag===19)j1(r,s,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=i.child,m=null;s!==null;)r=s.alternate,r!==null&&uu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),hp(i,!1,m,s,v,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&uu(r)===null){i.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}hp(i,!0,s,null,v,c);break;case"together":hp(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Na(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),pi|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(es(r,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,s=Ra(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=Ra(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function pp(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&nu(r)))}function dA(r,i,s){switch(i.tag){case 3:Se(i,i.stateNode.containerInfo),oi(i,Yt,r.memoizedState.cache),Xi();break;case 27:case 5:je(i);break;case 4:Se(i,i.stateNode.containerInfo);break;case 10:oi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Bh(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ui(i),i.flags|=128,null):(s&i.child.childLanes)!==0?k1(r,i,s):(ui(i),r=Na(r,i,s),r!==null?r.sibling:null);ui(i);break;case 19:var m=(r.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(es(r,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return U1(r,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),te(Vt,Vt.current),c)break;return null;case 22:return i.lanes=0,M1(r,i,s,i.pendingProps);case 24:oi(i,Yt,r.memoizedState.cache)}return Na(r,i,s)}function B1(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)Wt=!0;else{if(!pp(r,s)&&(i.flags&128)===0)return Wt=!1,dA(r,i,s);Wt=(r.flags&131072)!==0}else Wt=!1,ct&&(i.flags&1048576)!==0&&vy(i,cl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=no(i.elementType),i.type=r,typeof r=="function")bh(r)?(c=oo(r,c),i.tag=1,i=L1(null,i,r,c,s)):(i.tag=0,i=sp(null,i,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===O){i.tag=11,i=T1(null,i,r,c,s);break e}else if(m===I){i.tag=14,i=A1(null,i,r,c,s);break e}}throw i=ie(r)||r,Error(a(306,i,""))}}return i;case 0:return sp(r,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=oo(c,i.pendingProps),L1(r,i,c,m,s);case 3:e:{if(Se(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var v=i.memoizedState;m=v.element,Lh(r,i),vl(i,c,null,s);var x=i.memoizedState;if(c=x.cache,oi(i,Yt,c),c!==v.cache&&Ah(i,[Yt],s,!0),gl(),c=x.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:x.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=P1(r,i,c,s);break e}else if(c!==m){m=xr(Error(a(424)),i),ul(m),i=P1(r,i,c,s);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,It=Cr(r.firstChild),Sn=i,ct=!0,ai=null,Tr=!0,s=My(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Xi(),c===m){i=Na(r,i,s);break e}xn(r,i,c,s)}i=i.child}return i;case 26:return Eu(r,i),r===null?(s=Zb(i.type,null,i.pendingProps,null))?i.memoizedState=s:ct||(s=i.type,r=i.pendingProps,c=Uu(_e.current).createElement(s),c[En]=i,c[Vn]=r,Rn(c,s,r),hn(c),i.stateNode=c):i.memoizedState=Zb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return je(i),r===null&&ct&&(c=i.stateNode=Yb(i.type,i.pendingProps,_e.current),Sn=i,Tr=!0,m=It,bi(i.type)?(Yp=m,It=Cr(c.firstChild)):It=m),xn(r,i,i.pendingProps.children,s),Eu(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&ct&&((m=c=It)&&(c=FA(c,i.type,i.pendingProps,Tr),c!==null?(i.stateNode=c,Sn=i,It=Cr(c.firstChild),Tr=!1,m=!0):m=!1),m||ii(i)),je(i),m=i.type,v=i.pendingProps,x=r!==null?r.memoizedProps:null,c=v.children,Vp(m,v)?c=null:x!==null&&Vp(m,x)&&(i.flags|=32),i.memoizedState!==null&&(m=Fh(r,i,nA,null,null,s),jl._currentValue=m),Eu(r,i),xn(r,i,c,s),i.child;case 6:return r===null&&ct&&((r=s=It)&&(s=VA(s,i.pendingProps,Tr),s!==null?(i.stateNode=s,Sn=i,It=null,r=!0):r=!1),r||ii(i)),null;case 13:return k1(r,i,s);case 4:return Se(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=ao(i,null,c,s):xn(r,i,c,s),i.child;case 11:return T1(r,i,i.type,i.pendingProps,s);case 7:return xn(r,i,i.pendingProps,s),i.child;case 8:return xn(r,i,i.pendingProps.children,s),i.child;case 12:return xn(r,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,oi(i,i.type,c.value),xn(r,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,eo(i),m=wn(m),c=c(m),i.flags|=1,xn(r,i,c,s),i.child;case 14:return A1(r,i,i.type,i.pendingProps,s);case 15:return C1(r,i,i.type,i.pendingProps,s);case 19:return U1(r,i,s);case 31:return uA(r,i,s);case 22:return M1(r,i,s,i.pendingProps);case 24:return eo(i),c=wn(Yt),r===null?(m=Nh(),m===null&&(m=Tt,v=Ch(),m.pooledCache=v,v.refCount++,v!==null&&(m.pooledCacheLanes|=s),m=v),i.memoizedState={parent:c,cache:m},Dh(i),oi(i,Yt,m)):((r.lanes&s)!==0&&(Lh(r,i),vl(i,null,null,s),gl()),m=r.memoizedState,v=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),oi(i,Yt,c)):(c=v.cache,oi(i,Yt,c),c!==m.cache&&Ah(i,[Yt],s,!0))),xn(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Ia(r){r.flags|=4}function mp(r,i,s,c,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(fb())r.flags|=8192;else throw ro=ou,Ih}else r.flags&=-16777217}function z1(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!t_(i))if(fb())r.flags|=8192;else throw ro=ou,Ih}function wu(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Et():536870912,r.lanes|=i,fs|=i)}function wl(r,i){if(!ct)switch(r.tailMode){case"hidden":i=r.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Dt(r){var i=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(i)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=s,i}function fA(r,i,s){var c=i.pendingProps;switch(wh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dt(i),null;case 1:return Dt(i),null;case 3:return s=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Aa(Yt),le(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Jo(i)?Ia(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Rh())),Dt(i),null;case 26:var m=i.type,v=i.memoizedState;return r===null?(Ia(i),v!==null?(Dt(i),z1(i,v)):(Dt(i),mp(i,m,null,c,s))):v?v!==r.memoizedState?(Ia(i),Dt(i),z1(i,v)):(Dt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&Ia(i),Dt(i),mp(i,m,r,c,s)),null;case 27:if(at(i),s=_e.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Ia(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Dt(i),null}r=se.current,Jo(i)?by(i):(r=Yb(m,c,s),i.stateNode=r,Ia(i))}return Dt(i),null;case 5:if(at(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Ia(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Dt(i),null}if(v=se.current,Jo(i))by(i);else{var x=Uu(_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 c.is=="string"?x.createElement("select",{is:c.is}):x.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?x.createElement(m,{is:c.is}):x.createElement(m)}}v[En]=i,v[Vn]=c;e:for(x=i.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===i)break e;for(;x.sibling===null;){if(x.return===null||x.return===i)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}i.stateNode=v;e:switch(Rn(v,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ia(i)}}return Dt(i),mp(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&Ia(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=_e.current,Jo(i)){if(r=i.stateNode,s=i.memoizedProps,c=null,m=Sn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[En]=i,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||kb(r.nodeValue,s)),r||ii(i,!0)}else r=Uu(r).createTextNode(c),r[En]=i,i.stateNode=r}return Dt(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(c=Jo(i),s!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[En]=i}else Xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Dt(i),r=!1}else s=Rh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(or(i),i):(or(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Dt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Jo(i),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[En]=i}else Xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Dt(i),m=!1}else m=Rh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(or(i),i):(or(i),null)}return or(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==m&&(c.flags|=2048)),s!==r&&s&&(i.child.flags|=8192),wu(i,i.updateQueue),Dt(i),null);case 4:return le(),r===null&&jp(i.stateNode.containerInfo),Dt(i),null;case 10:return Aa(i.type),Dt(i),null;case 19:if(Q(Vt),c=i.memoizedState,c===null)return Dt(i),null;if(m=(i.flags&128)!==0,v=c.rendering,v===null)if(m)wl(c,!1);else{if(Bt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=uu(r),v!==null){for(i.flags|=128,wl(c,!1),r=v.updateQueue,i.updateQueue=r,wu(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)py(s,r),s=s.sibling;return te(Vt,Vt.current&1|2),ct&&Oa(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&de()>Au&&(i.flags|=128,m=!0,wl(c,!1),i.lanes=4194304)}else{if(!m)if(r=uu(v),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,wu(i,r),wl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!ct)return Dt(i),null}else 2*de()-c.renderingStartTime>Au&&s!==536870912&&(i.flags|=128,m=!0,wl(c,!1),i.lanes=4194304);c.isBackwards?(v.sibling=i.child,i.child=v):(r=c.last,r!==null?r.sibling=v:i.child=v,c.last=v)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=de(),r.sibling=null,s=Vt.current,te(Vt,m?s&1|2:s&1),ct&&Oa(i,c.treeForkCount),r):(Dt(i),null);case 22:case 23:return or(i),Uh(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(Dt(i),i.subtreeFlags&6&&(i.flags|=8192)):Dt(i),s=i.updateQueue,s!==null&&wu(i,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),r!==null&&Q(to),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Aa(Yt),Dt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function hA(r,i){switch(wh(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Aa(Yt),le(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return at(i),null;case 31:if(i.memoizedState!==null){if(or(i),i.alternate===null)throw Error(a(340));Xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(or(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Q(Vt),null;case 4:return le(),null;case 10:return Aa(i.type),null;case 22:case 23:return or(i),Uh(),r!==null&&Q(to),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Aa(Yt),null;case 25:return null;default:return null}}function F1(r,i){switch(wh(i),i.tag){case 3:Aa(Yt),le();break;case 26:case 27:case 5:at(i);break;case 4:le();break;case 31:i.memoizedState!==null&&or(i);break;case 13:or(i);break;case 19:Q(Vt);break;case 10:Aa(i.type);break;case 22:case 23:or(i),Uh(),r!==null&&Q(to);break;case 24:Aa(Yt)}}function xl(r,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&r)===r){c=void 0;var v=s.create,x=s.inst;c=v(),x.destroy=c}s=s.next}while(s!==m)}}catch(M){bt(i,i.return,M)}}function fi(r,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var v=m.next;c=v;do{if((c.tag&r)===r){var x=c.inst,M=x.destroy;if(M!==void 0){x.destroy=void 0,m=i;var U=s,J=M;try{J()}catch(ce){bt(m,U,ce)}}}c=c.next}while(c!==v)}}catch(ce){bt(i,i.return,ce)}}function V1(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{Iy(i,s)}catch(c){bt(r,r.return,c)}}}function H1(r,i,s){s.props=oo(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){bt(r,i,c)}}function Rl(r,i){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof s=="function"?r.refCleanup=s(c):s.current=c}}catch(m){bt(r,i,m)}}function aa(r,i){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){bt(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){bt(r,i,m)}else s.current=null}function $1(r){var i=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){bt(r,r.return,m)}}function gp(r,i,s){try{var c=r.stateNode;PA(c,r.type,s,i),c[Vn]=i}catch(m){bt(r,r.return,m)}}function G1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&bi(r.type)||r.tag===4}function vp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||G1(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&&bi(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 yp(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(r),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=wa));else if(c!==4&&(c===27&&bi(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(yp(r,i,s),r=r.sibling;r!==null;)yp(r,i,s),r=r.sibling}function xu(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?s.insertBefore(r,i):s.appendChild(r);else if(c!==4&&(c===27&&bi(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(xu(r,i,s),r=r.sibling;r!==null;)xu(r,i,s),r=r.sibling}function q1(r){var i=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Rn(i,c,s),i[En]=r,i[Vn]=s}catch(v){bt(r,r.return,v)}}var Da=!1,Zt=!1,bp=!1,Y1=typeof WeakSet=="function"?WeakSet:Set,pn=null;function pA(r,i){if(r=r.containerInfo,zp=Gu,r=iy(r),fh(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var x=0,M=-1,U=-1,J=0,ce=0,fe=r,ne=null;t:for(;;){for(var oe;fe!==s||m!==0&&fe.nodeType!==3||(M=x+m),fe!==v||c!==0&&fe.nodeType!==3||(U=x+c),fe.nodeType===3&&(x+=fe.nodeValue.length),(oe=fe.firstChild)!==null;)ne=fe,fe=oe;for(;;){if(fe===r)break t;if(ne===s&&++J===m&&(M=x),ne===v&&++ce===c&&(U=x),(oe=fe.nextSibling)!==null)break;fe=ne,ne=fe.parentNode}fe=oe}s=M===-1||U===-1?null:{start:M,end:U}}else s=null}s=s||{start:0,end:0}}else s=null;for(Fp={focusedElem:r,selectionRange:s},Gu=!1,pn=i;pn!==null;)if(i=pn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,pn=r;else for(;pn!==null;){switch(i=pn,v=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,s=i,m=v.memoizedProps,v=v.memoizedState,c=s.stateNode;try{var Te=oo(s.type,m);r=c.getSnapshotBeforeUpdate(Te,v),c.__reactInternalSnapshotBeforeUpdate=r}catch(ke){bt(s,s.return,ke)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)$p(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":$p(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,pn=r;break}pn=i.return}}function K1(r,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Pa(r,s),c&4&&xl(5,s);break;case 1:if(Pa(r,s),c&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(x){bt(s,s.return,x)}else{var m=oo(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(x){bt(s,s.return,x)}}c&64&&V1(s),c&512&&Rl(s,s.return);break;case 3:if(Pa(r,s),c&64&&(r=s.updateQueue,r!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Iy(r,i)}catch(x){bt(s,s.return,x)}}break;case 27:i===null&&c&4&&q1(s);case 26:case 5:Pa(r,s),i===null&&c&4&&$1(s),c&512&&Rl(s,s.return);break;case 12:Pa(r,s);break;case 31:Pa(r,s),c&4&&Q1(r,s);break;case 13:Pa(r,s),c&4&&X1(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=wA.bind(null,s),HA(r,s))));break;case 22:if(c=s.memoizedState!==null||Da,!c){i=i!==null&&i.memoizedState!==null||Zt,m=Da;var v=Zt;Da=c,(Zt=i)&&!v?ka(r,s,(s.subtreeFlags&8772)!==0):Pa(r,s),Da=m,Zt=v}break;case 30:break;default:Pa(r,s)}}function W1(r){var i=r.alternate;i!==null&&(r.alternate=null,W1(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Wf(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Pt=null,$n=!1;function La(r,i,s){for(s=s.child;s!==null;)Z1(r,i,s),s=s.sibling}function Z1(r,i,s){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Gt,s)}catch{}switch(s.tag){case 26:Zt||aa(s,i),La(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Zt||aa(s,i);var c=Pt,m=$n;bi(s.type)&&(Pt=s.stateNode,$n=!1),La(r,i,s),Ll(s.stateNode),Pt=c,$n=m;break;case 5:Zt||aa(s,i);case 6:if(c=Pt,m=$n,Pt=null,La(r,i,s),Pt=c,$n=m,Pt!==null)if($n)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(s.stateNode)}catch(v){bt(s,i,v)}else try{Pt.removeChild(s.stateNode)}catch(v){bt(s,i,v)}break;case 18:Pt!==null&&($n?(r=Pt,Vb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),_s(r)):Vb(Pt,s.stateNode));break;case 4:c=Pt,m=$n,Pt=s.stateNode.containerInfo,$n=!0,La(r,i,s),Pt=c,$n=m;break;case 0:case 11:case 14:case 15:fi(2,s,i),Zt||fi(4,s,i),La(r,i,s);break;case 1:Zt||(aa(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&H1(s,i,c)),La(r,i,s);break;case 21:La(r,i,s);break;case 22:Zt=(c=Zt)||s.memoizedState!==null,La(r,i,s),Zt=c;break;default:La(r,i,s)}}function Q1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{_s(r)}catch(s){bt(i,i.return,s)}}}function X1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{_s(r)}catch(s){bt(i,i.return,s)}}function mA(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Y1),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Y1),i;default:throw Error(a(435,r.tag))}}function Ru(r,i){var s=mA(r);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=xA.bind(null,r,c);c.then(m,m)}})}function Gn(r,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],v=r,x=i,M=x;e:for(;M!==null;){switch(M.tag){case 27:if(bi(M.type)){Pt=M.stateNode,$n=!1;break e}break;case 5:Pt=M.stateNode,$n=!1;break e;case 3:case 4:Pt=M.stateNode.containerInfo,$n=!0;break e}M=M.return}if(Pt===null)throw Error(a(160));Z1(v,x,m),Pt=null,$n=!1,v=m.alternate,v!==null&&(v.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)J1(i,r),i=i.sibling}var Vr=null;function J1(r,i){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Gn(i,r),qn(r),c&4&&(fi(3,r,r.return),xl(3,r),fi(5,r,r.return));break;case 1:Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),c&64&&Da&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Vr;if(Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),c&4){var v=s!==null?s.memoizedState:null;if(c=r.memoizedState,s===null)if(c===null)if(r.stateNode===null){e:{c=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":v=m.getElementsByTagName("title")[0],(!v||v[Xs]||v[En]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=m.createElement(c),m.head.insertBefore(v,m.querySelector("head > title"))),Rn(v,c,s),v[En]=r,hn(v),c=v;break e;case"link":var x=Jb("link","href",m).get(c+(s.href||""));if(x){for(var M=0;M<x.length;M++)if(v=x[M],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(M,1);break t}}v=m.createElement(c),Rn(v,c,s),m.head.appendChild(v);break;case"meta":if(x=Jb("meta","content",m).get(c+(s.content||""))){for(M=0;M<x.length;M++)if(v=x[M],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(M,1);break t}}v=m.createElement(c),Rn(v,c,s),m.head.appendChild(v);break;default:throw Error(a(468,c))}v[En]=r,hn(v),c=v}r.stateNode=c}else e_(m,r.type,r.stateNode);else r.stateNode=Xb(m,c,r.memoizedProps);else v!==c?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,c===null?e_(m,r.type,r.stateNode):Xb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&gp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),s!==null&&c&4&&gp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),r.flags&32){m=r.stateNode;try{Ho(m,"")}catch(Te){bt(r,r.return,Te)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,gp(r,m,s!==null?s.memoizedProps:m)),c&1024&&(bp=!0);break;case 6:if(Gn(i,r),qn(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(Te){bt(r,r.return,Te)}}break;case 3:if(Fu=null,m=Vr,Vr=Bu(i.containerInfo),Gn(i,r),Vr=m,qn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{_s(i.containerInfo)}catch(Te){bt(r,r.return,Te)}bp&&(bp=!1,eb(r));break;case 4:c=Vr,Vr=Bu(r.stateNode.containerInfo),Gn(i,r),qn(r),Vr=c;break;case 12:Gn(i,r),qn(r);break;case 31:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 13:Gn(i,r),qn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Tu=de()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 22:m=r.memoizedState!==null;var U=s!==null&&s.memoizedState!==null,J=Da,ce=Zt;if(Da=J||m,Zt=ce||U,Gn(i,r),Zt=ce,Da=J,qn(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||U||Da||Zt||so(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){U=s=i;try{if(v=U.stateNode,m)x=v.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{M=U.stateNode;var fe=U.memoizedProps.style,ne=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;M.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Te){bt(U,U.return,Te)}}}else if(i.tag===6){if(s===null){U=i;try{U.stateNode.nodeValue=m?"":U.memoizedProps}catch(Te){bt(U,U.return,Te)}}}else if(i.tag===18){if(s===null){U=i;try{var oe=U.stateNode;m?Hb(oe,!0):Hb(U.stateNode,!1)}catch(Te){bt(U,U.return,Te)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Ru(r,s))));break;case 19:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 30:break;case 21:break;default:Gn(i,r),qn(r)}}function qn(r){var i=r.flags;if(i&2){try{for(var s,c=r.return;c!==null;){if(G1(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,v=vp(r);xu(r,v,m);break;case 5:var x=s.stateNode;s.flags&32&&(Ho(x,""),s.flags&=-33);var M=vp(r);xu(r,M,x);break;case 3:case 4:var U=s.stateNode.containerInfo,J=vp(r);yp(r,J,U);break;default:throw Error(a(161))}}catch(ce){bt(r,r.return,ce)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function eb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;eb(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Pa(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)K1(r,i.alternate,i),i=i.sibling}function so(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:fi(4,i,i.return),so(i);break;case 1:aa(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&H1(i,i.return,s),so(i);break;case 27:Ll(i.stateNode);case 26:case 5:aa(i,i.return),so(i);break;case 22:i.memoizedState===null&&so(i);break;case 30:so(i);break;default:so(i)}r=r.sibling}}function ka(r,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=r,v=i,x=v.flags;switch(v.tag){case 0:case 11:case 15:ka(m,v,s),xl(4,v);break;case 1:if(ka(m,v,s),c=v,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(J){bt(c,c.return,J)}if(c=v,m=c.updateQueue,m!==null){var M=c.stateNode;try{var U=m.shared.hiddenCallbacks;if(U!==null)for(m.shared.hiddenCallbacks=null,m=0;m<U.length;m++)Ny(U[m],M)}catch(J){bt(c,c.return,J)}}s&&x&64&&V1(v),Rl(v,v.return);break;case 27:q1(v);case 26:case 5:ka(m,v,s),s&&c===null&&x&4&&$1(v),Rl(v,v.return);break;case 12:ka(m,v,s);break;case 31:ka(m,v,s),s&&x&4&&Q1(m,v);break;case 13:ka(m,v,s),s&&x&4&&X1(m,v);break;case 22:v.memoizedState===null&&ka(m,v,s),Rl(v,v.return);break;case 30:break;default:ka(m,v,s)}i=i.sibling}}function _p(r,i){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&dl(s))}function Ep(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&dl(r))}function Hr(r,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)tb(r,i,s,c),i=i.sibling}function tb(r,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Hr(r,i,s,c),m&2048&&xl(9,i);break;case 1:Hr(r,i,s,c);break;case 3:Hr(r,i,s,c),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&dl(r)));break;case 12:if(m&2048){Hr(r,i,s,c),r=i.stateNode;try{var v=i.memoizedProps,x=v.id,M=v.onPostCommit;typeof M=="function"&&M(x,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(U){bt(i,i.return,U)}}else Hr(r,i,s,c);break;case 31:Hr(r,i,s,c);break;case 13:Hr(r,i,s,c);break;case 23:break;case 22:v=i.stateNode,x=i.alternate,i.memoizedState!==null?v._visibility&2?Hr(r,i,s,c):Ol(r,i):v._visibility&2?Hr(r,i,s,c):(v._visibility|=2,cs(r,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&_p(x,i);break;case 24:Hr(r,i,s,c),m&2048&&Ep(i.alternate,i);break;default:Hr(r,i,s,c)}}function cs(r,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,x=i,M=s,U=c,J=x.flags;switch(x.tag){case 0:case 11:case 15:cs(v,x,M,U,m),xl(8,x);break;case 23:break;case 22:var ce=x.stateNode;x.memoizedState!==null?ce._visibility&2?cs(v,x,M,U,m):Ol(v,x):(ce._visibility|=2,cs(v,x,M,U,m)),m&&J&2048&&_p(x.alternate,x);break;case 24:cs(v,x,M,U,m),m&&J&2048&&Ep(x.alternate,x);break;default:cs(v,x,M,U,m)}i=i.sibling}}function Ol(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=r,c=i,m=c.flags;switch(c.tag){case 22:Ol(s,c),m&2048&&_p(c.alternate,c);break;case 24:Ol(s,c),m&2048&&Ep(c.alternate,c);break;default:Ol(s,c)}i=i.sibling}}var Tl=8192;function us(r,i,s){if(r.subtreeFlags&Tl)for(r=r.child;r!==null;)nb(r,i,s),r=r.sibling}function nb(r,i,s){switch(r.tag){case 26:us(r,i,s),r.flags&Tl&&r.memoizedState!==null&&tC(s,Vr,r.memoizedState,r.memoizedProps);break;case 5:us(r,i,s);break;case 3:case 4:var c=Vr;Vr=Bu(r.stateNode.containerInfo),us(r,i,s),Vr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Tl,Tl=16777216,us(r,i,s),Tl=c):us(r,i,s));break;default:us(r,i,s)}}function rb(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Al(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];pn=c,ib(c,r)}rb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ab(r),r=r.sibling}function ab(r){switch(r.tag){case 0:case 11:case 15:Al(r),r.flags&2048&&fi(9,r,r.return);break;case 3:Al(r);break;case 12:Al(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Ou(r)):Al(r);break;default:Al(r)}}function Ou(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];pn=c,ib(c,r)}rb(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:fi(8,i,i.return),Ou(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Ou(i));break;default:Ou(i)}r=r.sibling}}function ib(r,i){for(;pn!==null;){var s=pn;switch(s.tag){case 0:case 11:case 15:fi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:dl(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,pn=c;else e:for(s=r;pn!==null;){c=pn;var m=c.sibling,v=c.return;if(W1(c),c===s){pn=null;break e}if(m!==null){m.return=v,pn=m;break e}pn=v}}}var gA={getCacheForType:function(r){var i=wn(Yt),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return wn(Yt).controller.signal}},vA=typeof WeakMap=="function"?WeakMap:Map,gt=0,Tt=null,nt=null,ot=0,yt=0,sr=null,hi=!1,ds=!1,Sp=!1,ja=0,Bt=0,pi=0,lo=0,wp=0,lr=0,fs=0,Cl=null,Yn=null,xp=!1,Tu=0,ob=0,Au=1/0,Cu=null,mi=null,sn=0,gi=null,hs=null,Ua=0,Rp=0,Op=null,sb=null,Ml=0,Tp=null;function cr(){return(gt&2)!==0&&ot!==0?ot&-ot:k.T!==null?Dp():Yf()}function lb(){if(lr===0)if((ot&536870912)===0||ct){var r=ut;ut<<=1,(ut&3932160)===0&&(ut=262144),lr=r}else lr=536870912;return r=ir.current,r!==null&&(r.flags|=32),lr}function Kn(r,i,s){(r===Tt&&(yt===2||yt===9)||r.cancelPendingCommit!==null)&&(ps(r,0),vi(r,ot,lr,!1)),ht(r,s),((gt&2)===0||r!==Tt)&&(r===Tt&&((gt&2)===0&&(lo|=s),Bt===4&&vi(r,ot,lr,!1)),ia(r))}function cb(r,i,s){if((gt&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&r.expiredLanes)===0||We(r,i),m=c?_A(r,i):Cp(r,i,!0),v=c;do{if(m===0){ds&&!c&&vi(r,i,0,!1);break}else{if(s=r.current.alternate,v&&!yA(s)){m=Cp(r,i,!1),v=!1;continue}if(m===2){if(v=i,r.errorRecoveryDisabledLanes&v)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){i=x;e:{var M=r;m=Cl;var U=M.current.memoizedState.isDehydrated;if(U&&(ps(M,x).flags|=256),x=Cp(M,x,!1),x!==2){if(Sp&&!U){M.errorRecoveryDisabledLanes|=v,lo|=v,m=4;break e}v=Yn,Yn=m,v!==null&&(Yn===null?Yn=v:Yn.push.apply(Yn,v))}m=x}if(v=!1,m!==2)continue}}if(m===1){ps(r,0),vi(r,i,0,!0);break}e:{switch(c=r,v=m,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:vi(c,i,lr,!hi);break e;case 2:Yn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=Tu+300-de(),10<m)){if(vi(c,i,lr,!hi),Ne(c,0,!0)!==0)break e;Ua=i,c.timeoutHandle=zb(ub.bind(null,c,s,Yn,Cu,xp,i,lr,lo,fs,hi,v,"Throttled",-0,0),m);break e}ub(c,s,Yn,Cu,xp,i,lr,lo,fs,hi,v,null,-0,0)}}break}while(!0);ia(r)}function ub(r,i,s,c,m,v,x,M,U,J,ce,fe,ne,oe){if(r.timeoutHandle=-1,fe=i.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wa},nb(i,v,fe);var Te=(v&62914560)===v?Tu-de():(v&4194048)===v?ob-de():0;if(Te=nC(fe,Te),Te!==null){Ua=v,r.cancelPendingCommit=Te(yb.bind(null,r,i,v,s,c,m,x,M,U,ce,fe,null,ne,oe)),vi(r,v,x,!J);return}}yb(r,i,v,s,c,m,x,M,U)}function yA(r){for(var i=r;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],v=m.getSnapshot;m=m.value;try{if(!rr(v(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function vi(r,i,s,c){i&=~wp,i&=~lo,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var m=i;0<m;){var v=31-qt(m),x=1<<v;c[v]=-1,m&=~x}s!==0&&_r(r,s,i)}function Mu(){return(gt&6)===0?(Nl(0),!1):!0}function Ap(){if(nt!==null){if(yt===0)var r=nt.return;else r=nt,Ta=Ji=null,$h(r),as=null,hl=0,r=nt;for(;r!==null;)F1(r.alternate,r),r=r.return;nt=null}}function ps(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,UA(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Ua=0,Ap(),Tt=r,nt=s=Ra(r.current,null),ot=i,yt=0,sr=null,hi=!1,ds=We(r,i),Sp=!1,fs=lr=wp=lo=pi=Bt=0,Yn=Cl=null,xp=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var m=31-qt(c),v=1<<m;i|=r[m],c&=~v}return ja=i,Qc(),s}function db(r,i){He=null,k.H=El,i===rs||i===iu?(i=Ty(),yt=3):i===Ih?(i=Ty(),yt=4):yt=i===op?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,sr=i,nt===null&&(Bt=1,bu(r,xr(i,r.current)))}function fb(){var r=ir.current;return r===null?!0:(ot&4194048)===ot?Ar===null:(ot&62914560)===ot||(ot&536870912)!==0?r===Ar:!1}function hb(){var r=k.H;return k.H=El,r===null?El:r}function pb(){var r=k.A;return k.A=gA,r}function Nu(){Bt=4,hi||(ot&4194048)!==ot&&ir.current!==null||(ds=!0),(pi&134217727)===0&&(lo&134217727)===0||Tt===null||vi(Tt,ot,lr,!1)}function Cp(r,i,s){var c=gt;gt|=2;var m=hb(),v=pb();(Tt!==r||ot!==i)&&(Cu=null,ps(r,i)),i=!1;var x=Bt;e:do try{if(yt!==0&&nt!==null){var M=nt,U=sr;switch(yt){case 8:Ap(),x=6;break e;case 3:case 2:case 9:case 6:ir.current===null&&(i=!0);var J=yt;if(yt=0,sr=null,ms(r,M,U,J),s&&ds){x=0;break e}break;default:J=yt,yt=0,sr=null,ms(r,M,U,J)}}bA(),x=Bt;break}catch(ce){db(r,ce)}while(!0);return i&&r.shellSuspendCounter++,Ta=Ji=null,gt=c,k.H=m,k.A=v,nt===null&&(Tt=null,ot=0,Qc()),x}function bA(){for(;nt!==null;)mb(nt)}function _A(r,i){var s=gt;gt|=2;var c=hb(),m=pb();Tt!==r||ot!==i?(Cu=null,Au=de()+500,ps(r,i)):ds=We(r,i);e:do try{if(yt!==0&&nt!==null){i=nt;var v=sr;t:switch(yt){case 1:yt=0,sr=null,ms(r,i,v,1);break;case 2:case 9:if(Ry(v)){yt=0,sr=null,gb(i);break}i=function(){yt!==2&&yt!==9||Tt!==r||(yt=7),ia(r)},v.then(i,i);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:Ry(v)?(yt=0,sr=null,gb(i)):(yt=0,sr=null,ms(r,i,v,7));break;case 5:var x=null;switch(nt.tag){case 26:x=nt.memoizedState;case 5:case 27:var M=nt;if(x?t_(x):M.stateNode.complete){yt=0,sr=null;var U=M.sibling;if(U!==null)nt=U;else{var J=M.return;J!==null?(nt=J,Iu(J)):nt=null}break t}}yt=0,sr=null,ms(r,i,v,5);break;case 6:yt=0,sr=null,ms(r,i,v,6);break;case 8:Ap(),Bt=6;break e;default:throw Error(a(462))}}EA();break}catch(ce){db(r,ce)}while(!0);return Ta=Ji=null,k.H=c,k.A=m,gt=s,nt!==null?0:(Tt=null,ot=0,Qc(),Bt)}function EA(){for(;nt!==null&&!q();)mb(nt)}function mb(r){var i=B1(r.alternate,r,ja);r.memoizedProps=r.pendingProps,i===null?Iu(r):nt=i}function gb(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=D1(s,i,i.pendingProps,i.type,void 0,ot);break;case 11:i=D1(s,i,i.pendingProps,i.type.render,i.ref,ot);break;case 5:$h(i);default:F1(s,i),i=nt=py(i,ja),i=B1(s,i,ja)}r.memoizedProps=r.pendingProps,i===null?Iu(r):nt=i}function ms(r,i,s,c){Ta=Ji=null,$h(i),as=null,hl=0;var m=i.return;try{if(cA(r,m,i,s,ot)){Bt=1,bu(r,xr(s,r.current)),nt=null;return}}catch(v){if(m!==null)throw nt=m,v;Bt=1,bu(r,xr(s,r.current)),nt=null;return}i.flags&32768?(ct||c===1?r=!0:ds||(ot&536870912)!==0?r=!1:(hi=r=!0,(c===2||c===9||c===3||c===6)&&(c=ir.current,c!==null&&c.tag===13&&(c.flags|=16384))),vb(i,r)):Iu(i)}function Iu(r){var i=r;do{if((i.flags&32768)!==0){vb(i,hi);return}r=i.return;var s=fA(i.alternate,i,ja);if(s!==null){nt=s;return}if(i=i.sibling,i!==null){nt=i;return}nt=i=r}while(i!==null);Bt===0&&(Bt=5)}function vb(r,i){do{var s=hA(r.alternate,r);if(s!==null){s.flags&=32767,nt=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){nt=r;return}nt=r=s}while(r!==null);Bt=6,nt=null}function yb(r,i,s,c,m,v,x,M,U){r.cancelPendingCommit=null;do Du();while(sn!==0);if((gt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=vh,Nt(r,s,v,x,M,U),r===Tt&&(nt=Tt=null,ot=0),hs=i,gi=r,Ua=s,Rp=v,Op=m,sb=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,RA(Fe,function(){return wb(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=k.T,k.T=null,m=F.p,F.p=2,x=gt,gt|=4;try{pA(r,i,s)}finally{gt=x,F.p=m,k.T=c}}sn=1,bb(),_b(),Eb()}}function bb(){if(sn===1){sn=0;var r=gi,i=hs,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=k.T,k.T=null;var c=F.p;F.p=2;var m=gt;gt|=4;try{J1(i,r);var v=Fp,x=iy(r.containerInfo),M=v.focusedElem,U=v.selectionRange;if(x!==M&&M&&M.ownerDocument&&ay(M.ownerDocument.documentElement,M)){if(U!==null&&fh(M)){var J=U.start,ce=U.end;if(ce===void 0&&(ce=J),"selectionStart"in M)M.selectionStart=J,M.selectionEnd=Math.min(ce,M.value.length);else{var fe=M.ownerDocument||document,ne=fe&&fe.defaultView||window;if(ne.getSelection){var oe=ne.getSelection(),Te=M.textContent.length,ke=Math.min(U.start,Te),xt=U.end===void 0?ke:Math.min(U.end,Te);!oe.extend&&ke>xt&&(x=xt,xt=ke,ke=x);var K=ry(M,ke),$=ry(M,xt);if(K&&$&&(oe.rangeCount!==1||oe.anchorNode!==K.node||oe.anchorOffset!==K.offset||oe.focusNode!==$.node||oe.focusOffset!==$.offset)){var X=fe.createRange();X.setStart(K.node,K.offset),oe.removeAllRanges(),ke>xt?(oe.addRange(X),oe.extend($.node,$.offset)):(X.setEnd($.node,$.offset),oe.addRange(X))}}}}for(fe=[],oe=M;oe=oe.parentNode;)oe.nodeType===1&&fe.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<fe.length;M++){var ue=fe[M];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Gu=!!zp,Fp=zp=null}finally{gt=m,F.p=c,k.T=s}}r.current=i,sn=2}}function _b(){if(sn===2){sn=0;var r=gi,i=hs,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=k.T,k.T=null;var c=F.p;F.p=2;var m=gt;gt|=4;try{K1(r,i.alternate,i)}finally{gt=m,F.p=c,k.T=s}}sn=3}}function Eb(){if(sn===4||sn===3){sn=0,W();var r=gi,i=hs,s=Ua,c=sb;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?sn=5:(sn=0,hs=gi=null,Sb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(mi=null),zr(s),i=i.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Gt,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=k.T,m=F.p,F.p=2,k.T=null;try{for(var v=r.onRecoverableError,x=0;x<c.length;x++){var M=c[x];v(M.value,{componentStack:M.stack})}}finally{k.T=i,F.p=m}}(Ua&3)!==0&&Du(),ia(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Tp?Ml++:(Ml=0,Tp=r):Ml=0,Nl(0)}}function Sb(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,dl(i)))}function Du(){return bb(),_b(),Eb(),wb()}function wb(){if(sn!==5)return!1;var r=gi,i=Rp;Rp=0;var s=zr(Ua),c=k.T,m=F.p;try{F.p=32>s?32:s,k.T=null,s=Op,Op=null;var v=gi,x=Ua;if(sn=0,hs=gi=null,Ua=0,(gt&6)!==0)throw Error(a(331));var M=gt;if(gt|=4,ab(v.current),tb(v,v.current,x,s),gt=M,Nl(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Gt,v)}catch{}return!0}finally{F.p=m,k.T=c,Sb(r,i)}}function xb(r,i,s){i=xr(s,i),i=ip(r.stateNode,i,2),r=ci(r,i,2),r!==null&&(ht(r,2),ia(r))}function bt(r,i,s){if(r.tag===3)xb(r,r,s);else for(;i!==null;){if(i.tag===3){xb(i,r,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(mi===null||!mi.has(c))){r=xr(s,r),s=R1(2),c=ci(i,s,2),c!==null&&(O1(s,c,i,r),ht(c,2),ia(c));break}}i=i.return}}function Mp(r,i,s){var c=r.pingCache;if(c===null){c=r.pingCache=new vA;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(Sp=!0,m.add(s),r=SA.bind(null,r,i,s),i.then(r,r))}function SA(r,i,s){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Tt===r&&(ot&s)===s&&(Bt===4||Bt===3&&(ot&62914560)===ot&&300>de()-Tu?(gt&2)===0&&ps(r,0):wp|=s,fs===ot&&(fs=0)),ia(r)}function Rb(r,i){i===0&&(i=Et()),r=Zi(r,i),r!==null&&(ht(r,i),ia(r))}function wA(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),Rb(r,s)}function xA(r,i){var s=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),Rb(r,s)}function RA(r,i){return et(r,i)}var Lu=null,gs=null,Np=!1,Pu=!1,Ip=!1,yi=0;function ia(r){r!==gs&&r.next===null&&(gs===null?Lu=gs=r:gs=gs.next=r),Pu=!0,Np||(Np=!0,TA())}function Nl(r,i){if(!Ip&&Pu){Ip=!0;do for(var s=!1,c=Lu;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var v=0;else{var x=c.suspendedLanes,M=c.pingedLanes;v=(1<<31-qt(42|r)+1)-1,v&=m&~(x&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,Cb(c,v))}else v=ot,v=Ne(c,c===Tt?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||We(c,v)||(s=!0,Cb(c,v));c=c.next}while(s);Ip=!1}}function OA(){Ob()}function Ob(){Pu=Np=!1;var r=0;yi!==0&&jA()&&(r=yi);for(var i=de(),s=null,c=Lu;c!==null;){var m=c.next,v=Tb(c,i);v===0?(c.next=null,s===null?Lu=m:s.next=m,m===null&&(gs=s)):(s=c,(r!==0||(v&3)!==0)&&(Pu=!0)),c=m}sn!==0&&sn!==5||Nl(r),yi!==0&&(yi=0)}function Tb(r,i){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var x=31-qt(v),M=1<<x,U=m[x];U===-1?((M&s)===0||(M&c)!==0)&&(m[x]=Ot(M,i)):U<=i&&(r.expiredLanes|=M),v&=~M}if(i=Tt,s=ot,s=Ne(r,r===i?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===i&&(yt===2||yt===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&j(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||We(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(c!==null&&j(c),zr(s)){case 2:case 8:s=Re;break;case 32:s=Fe;break;case 268435456:s=Rt;break;default:s=Fe}return c=Ab.bind(null,r),s=et(s,c),r.callbackPriority=i,r.callbackNode=s,i}return c!==null&&c!==null&&j(c),r.callbackPriority=2,r.callbackNode=null,2}function Ab(r,i){if(sn!==0&&sn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Du()&&r.callbackNode!==s)return null;var c=ot;return c=Ne(r,r===Tt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(cb(r,c,i),Tb(r,de()),r.callbackNode!=null&&r.callbackNode===s?Ab.bind(null,r):null)}function Cb(r,i){if(Du())return null;cb(r,i,!0)}function TA(){BA(function(){(gt&6)!==0?et(he,OA):Ob()})}function Dp(){if(yi===0){var r=ts;r===0&&(r=it,it<<=1,(it&261888)===0&&(it=256)),yi=r}return yi}function Mb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Hc(""+r)}function Nb(r,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,r.id&&s.setAttribute("form",r.id),i.parentNode.insertBefore(s,i),r=new FormData(r),s.parentNode.removeChild(s),r}function AA(r,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var v=Mb((m[Vn]||null).action),x=c.submitter;x&&(i=(i=x[Vn]||null)?Mb(i.formAction):x.getAttribute("formAction"),i!==null&&(v=i,x=null));var M=new Yc("action","action",null,c,m);r.push({event:M,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(yi!==0){var U=x?Nb(m,x):new FormData(m);Jh(s,{pending:!0,data:U,method:m.method,action:v},null,U)}}else typeof v=="function"&&(M.preventDefault(),U=x?Nb(m,x):new FormData(m),Jh(s,{pending:!0,data:U,method:m.method,action:v},v,U))},currentTarget:m}]})}}for(var Lp=0;Lp<gh.length;Lp++){var Pp=gh[Lp],CA=Pp.toLowerCase(),MA=Pp[0].toUpperCase()+Pp.slice(1);Fr(CA,"on"+MA)}Fr(ly,"onAnimationEnd"),Fr(cy,"onAnimationIteration"),Fr(uy,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(qT,"onTransitionRun"),Fr(YT,"onTransitionStart"),Fr(KT,"onTransitionCancel"),Fr(dy,"onTransitionEnd"),Fo("onMouseEnter",["mouseout","mouseover"]),Fo("onMouseLeave",["mouseout","mouseover"]),Fo("onPointerEnter",["pointerout","pointerover"]),Fo("onPointerLeave",["pointerout","pointerover"]),qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Il="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(" "),NA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Il));function Ib(r,i){i=(i&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var v=void 0;if(i)for(var x=c.length-1;0<=x;x--){var M=c[x],U=M.instance,J=M.currentTarget;if(M=M.listener,U!==v&&m.isPropagationStopped())break e;v=M,m.currentTarget=J;try{v(m)}catch(ce){Zc(ce)}m.currentTarget=null,v=U}else for(x=0;x<c.length;x++){if(M=c[x],U=M.instance,J=M.currentTarget,M=M.listener,U!==v&&m.isPropagationStopped())break e;v=M,m.currentTarget=J;try{v(m)}catch(ce){Zc(ce)}m.currentTarget=null,v=U}}}}function rt(r,i){var s=i[Kf];s===void 0&&(s=i[Kf]=new Set);var c=r+"__bubble";s.has(c)||(Db(i,r,2,!1),s.add(c))}function kp(r,i,s){var c=0;i&&(c|=4),Db(s,r,c,i)}var ku="_reactListening"+Math.random().toString(36).slice(2);function jp(r){if(!r[ku]){r[ku]=!0,O0.forEach(function(s){s!=="selectionchange"&&(NA.has(s)||kp(s,!1,r),kp(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[ku]||(i[ku]=!0,kp("selectionchange",!1,i))}}function Db(r,i,s,c){switch(l_(i)){case 2:var m=iC;break;case 8:m=oC;break;default:m=Xp}s=m.bind(null,i,s,r),m=void 0,!rh||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,s,{capture:!0,passive:m}):r.addEventListener(i,s,!0):m!==void 0?r.addEventListener(i,s,{passive:m}):r.addEventListener(i,s,!1)}function Up(r,i,s,c,m){var v=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var M=c.stateNode.containerInfo;if(M===m)break;if(x===4)for(x=c.return;x!==null;){var U=x.tag;if((U===3||U===4)&&x.stateNode.containerInfo===m)return;x=x.return}for(;M!==null;){if(x=Uo(M),x===null)return;if(U=x.tag,U===5||U===6||U===26||U===27){c=v=x;continue e}M=M.parentNode}}c=c.return}U0(function(){var J=v,ce=th(s),fe=[];e:{var ne=fy.get(r);if(ne!==void 0){var oe=Yc,Te=r;switch(r){case"keypress":if(Gc(s)===0)break e;case"keydown":case"keyup":oe=xT;break;case"focusin":Te="focus",oe=sh;break;case"focusout":Te="blur",oe=sh;break;case"beforeblur":case"afterblur":oe=sh;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=F0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=fT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=TT;break;case ly:case cy:case uy:oe=mT;break;case dy:oe=CT;break;case"scroll":case"scrollend":oe=uT;break;case"wheel":oe=NT;break;case"copy":case"cut":case"paste":oe=vT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=H0;break;case"toggle":case"beforetoggle":oe=DT}var ke=(i&4)!==0,xt=!ke&&(r==="scroll"||r==="scrollend"),K=ke?ne!==null?ne+"Capture":null:ne;ke=[];for(var $=J,X;$!==null;){var ue=$;if(X=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||X===null||K===null||(ue=el($,K),ue!=null&&ke.push(Dl($,ue,X))),xt)break;$=$.return}0<ke.length&&(ne=new oe(ne,Te,null,s,ce),fe.push({event:ne,listeners:ke}))}}if((i&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",oe=r==="mouseout"||r==="pointerout",ne&&s!==eh&&(Te=s.relatedTarget||s.fromElement)&&(Uo(Te)||Te[jo]))break e;if((oe||ne)&&(ne=ce.window===ce?ce:(ne=ce.ownerDocument)?ne.defaultView||ne.parentWindow:window,oe?(Te=s.relatedTarget||s.toElement,oe=J,Te=Te?Uo(Te):null,Te!==null&&(xt=l(Te),ke=Te.tag,Te!==xt||ke!==5&&ke!==27&&ke!==6)&&(Te=null)):(oe=null,Te=J),oe!==Te)){if(ke=F0,ue="onMouseLeave",K="onMouseEnter",$="mouse",(r==="pointerout"||r==="pointerover")&&(ke=H0,ue="onPointerLeave",K="onPointerEnter",$="pointer"),xt=oe==null?ne:Js(oe),X=Te==null?ne:Js(Te),ne=new ke(ue,$+"leave",oe,s,ce),ne.target=xt,ne.relatedTarget=X,ue=null,Uo(ce)===J&&(ke=new ke(K,$+"enter",Te,s,ce),ke.target=X,ke.relatedTarget=xt,ue=ke),xt=ue,oe&&Te)t:{for(ke=IA,K=oe,$=Te,X=0,ue=K;ue;ue=ke(ue))X++;ue=0;for(var Pe=$;Pe;Pe=ke(Pe))ue++;for(;0<X-ue;)K=ke(K),X--;for(;0<ue-X;)$=ke($),ue--;for(;X--;){if(K===$||$!==null&&K===$.alternate){ke=K;break t}K=ke(K),$=ke($)}ke=null}else ke=null;oe!==null&&Lb(fe,ne,oe,ke,!1),Te!==null&&xt!==null&&Lb(fe,xt,Te,ke,!0)}}e:{if(ne=J?Js(J):window,oe=ne.nodeName&&ne.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ne.type==="file")var pt=Q0;else if(W0(ne))if(X0)pt=HT;else{pt=FT;var Ie=zT}else oe=ne.nodeName,!oe||oe.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?J&&Jf(J.elementType)&&(pt=Q0):pt=VT;if(pt&&(pt=pt(r,J))){Z0(fe,pt,s,ce);break e}Ie&&Ie(r,ne,J),r==="focusout"&&J&&ne.type==="number"&&J.memoizedProps.value!=null&&Xf(ne,"number",ne.value)}switch(Ie=J?Js(J):window,r){case"focusin":(W0(Ie)||Ie.contentEditable==="true")&&(Yo=Ie,hh=J,ll=null);break;case"focusout":ll=hh=Yo=null;break;case"mousedown":ph=!0;break;case"contextmenu":case"mouseup":case"dragend":ph=!1,oy(fe,s,ce);break;case"selectionchange":if(GT)break;case"keydown":case"keyup":oy(fe,s,ce)}var $e;if(ch)e:{switch(r){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else qo?Y0(r,s)&&(st="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(st="onCompositionStart");st&&($0&&s.locale!=="ko"&&(qo||st!=="onCompositionStart"?st==="onCompositionEnd"&&qo&&($e=B0()):(ni=ce,ah="value"in ni?ni.value:ni.textContent,qo=!0)),Ie=ju(J,st),0<Ie.length&&(st=new V0(st,r,null,s,ce),fe.push({event:st,listeners:Ie}),$e?st.data=$e:($e=K0(s),$e!==null&&(st.data=$e)))),($e=PT?kT(r,s):jT(r,s))&&(st=ju(J,"onBeforeInput"),0<st.length&&(Ie=new V0("onBeforeInput","beforeinput",null,s,ce),fe.push({event:Ie,listeners:st}),Ie.data=$e)),AA(fe,r,J,s,ce)}Ib(fe,i)})}function Dl(r,i,s){return{instance:r,listener:i,currentTarget:s}}function ju(r,i){for(var s=i+"Capture",c=[];r!==null;){var m=r,v=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||v===null||(m=el(r,s),m!=null&&c.unshift(Dl(r,m,v)),m=el(r,i),m!=null&&c.push(Dl(r,m,v))),r.tag===3)return c;r=r.return}return[]}function IA(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Lb(r,i,s,c,m){for(var v=i._reactName,x=[];s!==null&&s!==c;){var M=s,U=M.alternate,J=M.stateNode;if(M=M.tag,U!==null&&U===c)break;M!==5&&M!==26&&M!==27||J===null||(U=J,m?(J=el(s,v),J!=null&&x.unshift(Dl(s,J,U))):m||(J=el(s,v),J!=null&&x.push(Dl(s,J,U)))),s=s.return}x.length!==0&&r.push({event:i,listeners:x})}var DA=/\r\n?/g,LA=/\u0000|\uFFFD/g;function Pb(r){return(typeof r=="string"?r:""+r).replace(DA,`
10
- `).replace(LA,"")}function kb(r,i){return i=Pb(i),Pb(r)===i}function wt(r,i,s,c,m,v){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Ho(r,""+c);break;case"className":Fc(r,"class",c);break;case"tabIndex":Fc(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Fc(r,s,c);break;case"style":k0(r,c,v);break;case"data":if(i!=="object"){Fc(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(s==="formAction"?(i!=="input"&&wt(r,i,"name",m.name,m,null),wt(r,i,"formEncType",m.formEncType,m,null),wt(r,i,"formMethod",m.formMethod,m,null),wt(r,i,"formTarget",m.formTarget,m,null)):(wt(r,i,"encType",m.encType,m,null),wt(r,i,"method",m.method,m,null),wt(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=wa);break;case"onScroll":c!=null&&rt("scroll",r);break;case"onScrollEnd":c!=null&&rt("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=Hc(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":rt("beforetoggle",r),rt("toggle",r),zc(r,"popover",c);break;case"xlinkActuate":Sa(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Sa(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Sa(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Sa(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Sa(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Sa(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":zc(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=lT.get(s)||s,zc(r,s,c))}}function Bp(r,i,s,c,m,v){switch(s){case"style":k0(r,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&Ho(r,""+c);break;case"onScroll":c!=null&&rt("scroll",r);break;case"onScrollEnd":c!=null&&rt("scrollend",r);break;case"onClick":c!=null&&(r.onclick=wa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!T0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),v=r[Vn]||null,v=v!=null?v[s]:null,typeof v=="function"&&r.removeEventListener(i,v,m),typeof c=="function")){typeof v!="function"&&v!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):zc(r,s,c)}}}function Rn(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",r),rt("load",r);var c=!1,m=!1,v;for(v in s)if(s.hasOwnProperty(v)){var x=s[v];if(x!=null)switch(v){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,v,x,s,null)}}m&&wt(r,i,"srcSet",s.srcSet,s,null),c&&wt(r,i,"src",s.src,s,null);return;case"input":rt("invalid",r);var M=v=x=m=null,U=null,J=null;for(c in s)if(s.hasOwnProperty(c)){var ce=s[c];if(ce!=null)switch(c){case"name":m=ce;break;case"type":x=ce;break;case"checked":U=ce;break;case"defaultChecked":J=ce;break;case"value":v=ce;break;case"defaultValue":M=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(a(137,i));break;default:wt(r,i,c,ce,s,null)}}I0(r,v,M,U,J,x,m,!1);return;case"select":rt("invalid",r),c=x=v=null;for(m in s)if(s.hasOwnProperty(m)&&(M=s[m],M!=null))switch(m){case"value":v=M;break;case"defaultValue":x=M;break;case"multiple":c=M;default:wt(r,i,m,M,s,null)}i=v,s=x,r.multiple=!!c,i!=null?Vo(r,!!c,i,!1):s!=null&&Vo(r,!!c,s,!0);return;case"textarea":rt("invalid",r),v=m=c=null;for(x in s)if(s.hasOwnProperty(x)&&(M=s[x],M!=null))switch(x){case"value":c=M;break;case"defaultValue":m=M;break;case"children":v=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:wt(r,i,x,M,s,null)}L0(r,c,m,v);return;case"option":for(U in s)s.hasOwnProperty(U)&&(c=s[U],c!=null)&&(U==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":wt(r,i,U,c,s,null));return;case"dialog":rt("beforetoggle",r),rt("toggle",r),rt("cancel",r),rt("close",r);break;case"iframe":case"object":rt("load",r);break;case"video":case"audio":for(c=0;c<Il.length;c++)rt(Il[c],r);break;case"image":rt("error",r),rt("load",r);break;case"details":rt("toggle",r);break;case"embed":case"source":case"link":rt("error",r),rt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in s)if(s.hasOwnProperty(J)&&(c=s[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,J,c,s,null)}return;default:if(Jf(i)){for(ce in s)s.hasOwnProperty(ce)&&(c=s[ce],c!==void 0&&Bp(r,i,ce,c,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(c=s[M],c!=null&&wt(r,i,M,c,s,null))}function PA(r,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,v=null,x=null,M=null,U=null,J=null,ce=null;for(oe in s){var fe=s[oe];if(s.hasOwnProperty(oe)&&fe!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":U=fe;default:c.hasOwnProperty(oe)||wt(r,i,oe,null,c,fe)}}for(var ne in c){var oe=c[ne];if(fe=s[ne],c.hasOwnProperty(ne)&&(oe!=null||fe!=null))switch(ne){case"type":v=oe;break;case"name":m=oe;break;case"checked":J=oe;break;case"defaultChecked":ce=oe;break;case"value":x=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:oe!==fe&&wt(r,i,ne,oe,c,fe)}}Qf(r,x,M,U,J,ce,v,m);return;case"select":oe=x=M=ne=null;for(v in s)if(U=s[v],s.hasOwnProperty(v)&&U!=null)switch(v){case"value":break;case"multiple":oe=U;default:c.hasOwnProperty(v)||wt(r,i,v,null,c,U)}for(m in c)if(v=c[m],U=s[m],c.hasOwnProperty(m)&&(v!=null||U!=null))switch(m){case"value":ne=v;break;case"defaultValue":M=v;break;case"multiple":x=v;default:v!==U&&wt(r,i,m,v,c,U)}i=M,s=x,c=oe,ne!=null?Vo(r,!!s,ne,!1):!!c!=!!s&&(i!=null?Vo(r,!!s,i,!0):Vo(r,!!s,s?[]:"",!1));return;case"textarea":oe=ne=null;for(M in s)if(m=s[M],s.hasOwnProperty(M)&&m!=null&&!c.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:wt(r,i,M,null,c,m)}for(x in c)if(m=c[x],v=s[x],c.hasOwnProperty(x)&&(m!=null||v!=null))switch(x){case"value":ne=m;break;case"defaultValue":oe=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==v&&wt(r,i,x,m,c,v)}D0(r,ne,oe);return;case"option":for(var Te in s)ne=s[Te],s.hasOwnProperty(Te)&&ne!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:wt(r,i,Te,null,c,ne));for(U in c)ne=c[U],oe=s[U],c.hasOwnProperty(U)&&ne!==oe&&(ne!=null||oe!=null)&&(U==="selected"?r.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":wt(r,i,U,ne,c,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 ke in s)ne=s[ke],s.hasOwnProperty(ke)&&ne!=null&&!c.hasOwnProperty(ke)&&wt(r,i,ke,null,c,ne);for(J in c)if(ne=c[J],oe=s[J],c.hasOwnProperty(J)&&ne!==oe&&(ne!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,i));break;default:wt(r,i,J,ne,c,oe)}return;default:if(Jf(i)){for(var xt in s)ne=s[xt],s.hasOwnProperty(xt)&&ne!==void 0&&!c.hasOwnProperty(xt)&&Bp(r,i,xt,void 0,c,ne);for(ce in c)ne=c[ce],oe=s[ce],!c.hasOwnProperty(ce)||ne===oe||ne===void 0&&oe===void 0||Bp(r,i,ce,ne,c,oe);return}}for(var K in s)ne=s[K],s.hasOwnProperty(K)&&ne!=null&&!c.hasOwnProperty(K)&&wt(r,i,K,null,c,ne);for(fe in c)ne=c[fe],oe=s[fe],!c.hasOwnProperty(fe)||ne===oe||ne==null&&oe==null||wt(r,i,fe,ne,c,oe)}function jb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kA(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],v=m.transferSize,x=m.initiatorType,M=m.duration;if(v&&M&&jb(x)){for(x=0,M=m.responseEnd,c+=1;c<s.length;c++){var U=s[c],J=U.startTime;if(J>M)break;var ce=U.transferSize,fe=U.initiatorType;ce&&jb(fe)&&(U=U.responseEnd,x+=ce*(U<M?1:(M-J)/(U-J)))}if(--c,i+=8*(v+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var zp=null,Fp=null;function Uu(r){return r.nodeType===9?r:r.ownerDocument}function Ub(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 Bb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Vp(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Hp=null;function jA(){var r=window.event;return r&&r.type==="popstate"?r===Hp?!1:(Hp=r,!0):(Hp=null,!1)}var zb=typeof setTimeout=="function"?setTimeout:void 0,UA=typeof clearTimeout=="function"?clearTimeout:void 0,Fb=typeof Promise=="function"?Promise:void 0,BA=typeof queueMicrotask=="function"?queueMicrotask:typeof Fb<"u"?function(r){return Fb.resolve(null).then(r).catch(zA)}:zb;function zA(r){setTimeout(function(){throw r})}function bi(r){return r==="head"}function Vb(r,i){var s=i,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),_s(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ll(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ll(s);for(var v=s.firstChild;v;){var x=v.nextSibling,M=v.nodeName;v[Xs]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=x}}else s==="body"&&Ll(r.ownerDocument.body);s=m}while(s);_s(i)}function Hb(r,i){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function $p(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":$p(s),Wf(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function FA(r,i,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Xs])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Cr(r.nextSibling),r===null)break}return null}function VA(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Cr(r.nextSibling),r===null))return null;return r}function $b(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Cr(r.nextSibling),r===null))return null;return r}function Gp(r){return r.data==="$?"||r.data==="$~"}function qp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function HA(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Cr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Yp=null;function Gb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Cr(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function qb(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function Yb(r,i,s){switch(i=Uu(s),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ll(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Wf(r)}var Mr=new Map,Kb=new Set;function Bu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ba=F.d;F.d={f:$A,r:GA,D:qA,C:YA,L:KA,m:WA,X:QA,S:ZA,M:XA};function $A(){var r=Ba.f(),i=Mu();return r||i}function GA(r){var i=Bo(r);i!==null&&i.tag===5&&i.type==="form"?d1(i):Ba.r(r)}var vs=typeof document>"u"?null:document;function Wb(r,i,s){var c=vs;if(c&&typeof i=="string"&&i){var m=Sr(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Kb.has(m)||(Kb.add(m),r={rel:r,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Rn(i,"link",r),hn(i),c.head.appendChild(i)))}}function qA(r){Ba.D(r),Wb("dns-prefetch",r,null)}function YA(r,i){Ba.C(r,i),Wb("preconnect",r,i)}function KA(r,i,s){Ba.L(r,i,s);var c=vs;if(c&&r&&i){var m='link[rel="preload"][as="'+Sr(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Sr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Sr(s.imageSizes)+'"]')):m+='[href="'+Sr(r)+'"]';var v=m;switch(i){case"style":v=ys(r);break;case"script":v=bs(r)}Mr.has(v)||(r=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),Mr.set(v,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Pl(v))||i==="script"&&c.querySelector(kl(v))||(i=c.createElement("link"),Rn(i,"link",r),hn(i),c.head.appendChild(i)))}}function WA(r,i){Ba.m(r,i);var s=vs;if(s&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Sr(c)+'"][href="'+Sr(r)+'"]',v=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=bs(r)}if(!Mr.has(v)&&(r=p({rel:"modulepreload",href:r},i),Mr.set(v,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(kl(v)))return}c=s.createElement("link"),Rn(c,"link",r),hn(c),s.head.appendChild(c)}}}function ZA(r,i,s){Ba.S(r,i,s);var c=vs;if(c&&r){var m=zo(c).hoistableStyles,v=ys(r);i=i||"default";var x=m.get(v);if(!x){var M={loading:0,preload:null};if(x=c.querySelector(Pl(v)))M.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":i},s),(s=Mr.get(v))&&Kp(r,s);var U=x=c.createElement("link");hn(U),Rn(U,"link",r),U._p=new Promise(function(J,ce){U.onload=J,U.onerror=ce}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,zu(x,i,c)}x={type:"stylesheet",instance:x,count:1,state:M},m.set(v,x)}}}function QA(r,i){Ba.X(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),hn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function XA(r,i){Ba.M(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0,type:"module"},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),hn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function Zb(r,i,s,c){var m=(m=_e.current)?Bu(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=ys(s.href),s=zo(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ys(s.href);var v=zo(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(Pl(r)))&&!v._p&&(x.instance=v,x.state.loading=5),Mr.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},Mr.set(r,s),v||JA(m,r,s,x.state))),i&&c===null)throw Error(a(528,""));return x}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=bs(s),s=zo(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function ys(r){return'href="'+Sr(r)+'"'}function Pl(r){return'link[rel="stylesheet"]['+r+"]"}function Qb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function JA(r,i,s,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Rn(i,"link",s),hn(i),r.head.appendChild(i))}function bs(r){return'[src="'+Sr(r)+'"]'}function kl(r){return"script[async]"+r}function Xb(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Sr(s.href)+'"]');if(c)return i.instance=c,hn(c),c;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),hn(c),Rn(c,"style",m),zu(c,s.precedence,r),i.instance=c;case"stylesheet":m=ys(s.href);var v=r.querySelector(Pl(m));if(v)return i.state.loading|=4,i.instance=v,hn(v),v;c=Qb(s),(m=Mr.get(m))&&Kp(c,m),v=(r.ownerDocument||r).createElement("link"),hn(v);var x=v;return x._p=new Promise(function(M,U){x.onload=M,x.onerror=U}),Rn(v,"link",c),i.state.loading|=4,zu(v,s.precedence,r),i.instance=v;case"script":return v=bs(s.src),(m=r.querySelector(kl(v)))?(i.instance=m,hn(m),m):(c=s,(m=Mr.get(v))&&(c=p({},s),Wp(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),hn(m),Rn(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,zu(c,s.precedence,r));return i.instance}function zu(r,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,v=m,x=0;x<c.length;x++){var M=c[x];if(M.dataset.precedence===i)v=M;else if(v!==m)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function Kp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Wp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Fu=null;function Jb(r,i,s){if(Fu===null){var c=new Map,m=Fu=new Map;m.set(s,c)}else m=Fu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var v=s[m];if(!(v[Xs]||v[En]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var x=v.getAttribute(i)||"";x=r+x;var M=c.get(x);M?M.push(v):c.set(x,[v])}}return c}function e_(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function eC(r,i,s){if(s===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function t_(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function tC(r,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ys(c.href),v=i.querySelector(Pl(m));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Vu.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=v,hn(v);return}v=i.ownerDocument||i,c=Qb(c),(m=Mr.get(m))&&Kp(c,m),v=v.createElement("link"),hn(v);var x=v;x._p=new Promise(function(M,U){x.onload=M,x.onerror=U}),Rn(v,"link",c),s.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Vu.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var Zp=0;function nC(r,i){return r.stylesheets&&r.count===0&&$u(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&Zp===0&&(Zp=62500*kA());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Zp?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$u(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Hu=null;function $u(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Hu=new Map,i.forEach(rC,r),Hu=null,Vu.call(r))}function rC(r,i){if(!(i.state.loading&4)){var s=Hu.get(r);if(s)var c=s.get(null);else{s=new Map,Hu.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),c=x)}c&&s.set(null,c)}m=i.instance,x=m.getAttribute("data-precedence"),v=s.get(x)||c,v===c&&s.set(null,m),s.set(x,m),this.count++,c=Vu.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),v?v.parentNode.insertBefore(m,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var jl={$$typeof:C,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function aC(r,i,s,c,m,v,x,M,U){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mn(0),this.hiddenUpdates=Mn(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=v,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function n_(r,i,s,c,m,v,x,M,U,J,ce,fe){return r=new aC(r,i,s,x,U,J,ce,fe,M),i=1,v===!0&&(i|=24),v=ar(3,null,null,i),r.current=v,v.stateNode=r,i=Ch(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:c,isDehydrated:s,cache:i},Dh(v),r}function r_(r){return r?(r=Zo,r):Zo}function a_(r,i,s,c,m,v){m=r_(m),c.context===null?c.context=m:c.pendingContext=m,c=li(i),c.payload={element:s},v=v===void 0?null:v,v!==null&&(c.callback=v),s=ci(r,c,i),s!==null&&(Kn(s,r,i),ml(s,r,i))}function i_(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function Qp(r,i){i_(r,i),(r=r.alternate)&&i_(r,i)}function o_(r){if(r.tag===13||r.tag===31){var i=Zi(r,67108864);i!==null&&Kn(i,r,67108864),Qp(r,67108864)}}function s_(r){if(r.tag===13||r.tag===31){var i=cr();i=ko(i);var s=Zi(r,i);s!==null&&Kn(s,r,i),Qp(r,i)}}var Gu=!0;function iC(r,i,s,c){var m=k.T;k.T=null;var v=F.p;try{F.p=2,Xp(r,i,s,c)}finally{F.p=v,k.T=m}}function oC(r,i,s,c){var m=k.T;k.T=null;var v=F.p;try{F.p=8,Xp(r,i,s,c)}finally{F.p=v,k.T=m}}function Xp(r,i,s,c){if(Gu){var m=Jp(c);if(m===null)Up(r,i,c,qu,s),c_(r,c);else if(lC(m,r,i,s,c))c.stopPropagation();else if(c_(r,c),i&4&&-1<sC.indexOf(r)){for(;m!==null;){var v=Bo(m);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var x=ft(v.pendingLanes);if(x!==0){var M=v;for(M.pendingLanes|=2,M.entangledLanes|=2;x;){var U=1<<31-qt(x);M.entanglements[1]|=U,x&=~U}ia(v),(gt&6)===0&&(Au=de()+500,Nl(0))}}break;case 31:case 13:M=Zi(v,2),M!==null&&Kn(M,v,2),Mu(),Qp(v,2)}if(v=Jp(c),v===null&&Up(r,i,c,qu,s),v===m)break;m=v}m!==null&&c.stopPropagation()}else Up(r,i,c,null,s)}}function Jp(r){return r=th(r),em(r)}var qu=null;function em(r){if(qu=null,r=Uo(r),r!==null){var i=l(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=u(i),r!==null)return r;r=null}else if(s===31){if(r=d(i),r!==null)return r;r=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return qu=r,null}function l_(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(me()){case he:return 2;case Re:return 8;case Fe:case tt:return 32;case Rt:return 268435456;default:return 32}default:return 32}}var tm=!1,_i=null,Ei=null,Si=null,Ul=new Map,Bl=new Map,wi=[],sC="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 c_(r,i){switch(r){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Ul.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(i.pointerId)}}function zl(r,i,s,c,m,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:v,targetContainers:[m]},i!==null&&(i=Bo(i),i!==null&&o_(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function lC(r,i,s,c,m){switch(i){case"focusin":return _i=zl(_i,r,i,s,c,m),!0;case"dragenter":return Ei=zl(Ei,r,i,s,c,m),!0;case"mouseover":return Si=zl(Si,r,i,s,c,m),!0;case"pointerover":var v=m.pointerId;return Ul.set(v,zl(Ul.get(v)||null,r,i,s,c,m)),!0;case"gotpointercapture":return v=m.pointerId,Bl.set(v,zl(Bl.get(v)||null,r,i,s,c,m)),!0}return!1}function u_(r){var i=Uo(r.target);if(i!==null){var s=l(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){r.blockedOn=i,x0(r.priority,function(){s_(s)});return}}else if(i===31){if(i=d(s),i!==null){r.blockedOn=i,x0(r.priority,function(){s_(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Yu(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=Jp(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);eh=c,s.target.dispatchEvent(c),eh=null}else return i=Bo(s),i!==null&&o_(i),r.blockedOn=s,!1;i.shift()}return!0}function d_(r,i,s){Yu(r)&&s.delete(i)}function cC(){tm=!1,_i!==null&&Yu(_i)&&(_i=null),Ei!==null&&Yu(Ei)&&(Ei=null),Si!==null&&Yu(Si)&&(Si=null),Ul.forEach(d_),Bl.forEach(d_)}function Ku(r,i){r.blockedOn===i&&(r.blockedOn=null,tm||(tm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,cC)))}var Wu=null;function f_(r){Wu!==r&&(Wu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wu===r&&(Wu=null);for(var i=0;i<r.length;i+=3){var s=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(em(c||s)===null)continue;break}var v=Bo(s);v!==null&&(r.splice(i,3),i-=3,Jh(v,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function _s(r){function i(U){return Ku(U,r)}_i!==null&&Ku(_i,r),Ei!==null&&Ku(Ei,r),Si!==null&&Ku(Si,r),Ul.forEach(i),Bl.forEach(i);for(var s=0;s<wi.length;s++){var c=wi[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<wi.length&&(s=wi[0],s.blockedOn===null);)u_(s),s.blockedOn===null&&wi.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],v=s[c+1],x=m[Vn]||null;if(typeof v=="function")x||f_(s);else if(x){var M=null;if(v&&v.hasAttribute("formAction")){if(m=v,x=v[Vn]||null)M=x.formAction;else if(em(m)!==null)continue}else M=x.action;typeof M=="function"?s[c+1]=M:(s.splice(c,3),c-=3),f_(s)}}}function h_(){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 i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function nm(r){this._internalRoot=r}Zu.prototype.render=nm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=cr();a_(s,c,r,i,null,null)},Zu.prototype.unmount=nm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;a_(r.current,2,null,r,null,null),Mu(),i[jo]=null}};function Zu(r){this._internalRoot=r}Zu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Yf();r={blockedOn:null,target:r,priority:i};for(var s=0;s<wi.length&&i!==0&&i<wi[s].priority;s++);wi.splice(s,0,r),s===0&&u_(r)}};var p_=t.version;if(p_!=="19.2.3")throw Error(a(527,p_,"19.2.3"));F.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var uC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qu.isDisabled&&Qu.supportsFiber)try{Gt=Qu.inject(uC),Mt=Qu}catch{}}return Vl.createRoot=function(r,i){if(!o(r))throw Error(a(299));var s=!1,c="",m=E1,v=S1,x=w1;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError)),i=n_(r,1,!1,null,null,s,c,null,m,v,x,h_),r[jo]=i.current,jp(r),new nm(i)},Vl.hydrateRoot=function(r,i,s){if(!o(r))throw Error(a(299));var c=!1,m="",v=E1,x=S1,M=w1,U=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(U=s.formState)),i=n_(r,1,!0,i,s??null,c,m,U,v,x,M,h_),i.context=r_(null),s=i.current,c=cr(),c=ko(c),m=li(c),m.callback=null,ci(s,m,c),s=c,i.current.lanes=s,ht(i,s),ia(i),r[jo]=i.current,jp(r),new Zu(i)},Vl.version="19.2.3",Vl}var R_;function SC(){if(R_)return am.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(),am.exports=EC(),am.exports}var wC=SC(),E=$i();const H=Io(E),uv=fC({__proto__:null,default:H},[E]);var cm={exports:{}},um={};var O_;function xC(){if(O_)return um;O_=1;var e=$i().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return um.c=function(t){return e.H.useMemoCache(t)},um}var T_;function RC(){return T_||(T_=1,cm.exports=xC()),cm.exports}var Sf=RC(),Rc=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(){}},OC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TC=class{#e=OC;#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)}},mo=new TC;function AC(e){setTimeout(e,0)}var Eo=typeof window>"u"||"Deno"in globalThis;function Xn(){}function CC(e,t){return typeof e=="function"?e(t):e}function gg(e){return typeof e=="number"&&e>=0&&e!==1/0}function dw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pi(e,t){return typeof e=="function"?e(t):e}function Lr(e,t){return typeof e=="function"?e(t):e}function A_(e,t){const{type:n="all",exact:a,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(a){if(t.queryHash!==dv(u,t.options))return!1}else if(!hc(t.queryKey,u))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function C_(e,t){const{exact:n,status:a,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(fc(t.options.mutationKey)!==fc(l))return!1}else if(!hc(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function dv(e,t){return(t?.queryKeyHashFn||fc)(e)}function fc(e){return JSON.stringify(e,(t,n)=>yg(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function hc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>hc(e[n],t[n])):!1}var MC=Object.prototype.hasOwnProperty;function fw(e,t){if(e===t)return e;const n=M_(e)&&M_(t);if(!n&&!(yg(e)&&yg(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),u=l.length,d=n?new Array(u):{};let f=0;for(let h=0;h<u;h++){const g=n?h:l[h],p=e[g],y=t[g];if(p===y){d[g]=p,(n?h<o:MC.call(e,g))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[g]=y;continue}const _=fw(p,y);d[g]=_,_===p&&f++}return o===u&&f===o?e:d}function vg(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 M_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yg(e){if(!N_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!N_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function N_(e){return Object.prototype.toString.call(e)==="[object Object]"}function NC(e){return new Promise(t=>{mo.setTimeout(t,e)})}function bg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?fw(e,t):t}function IC(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function DC(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var fv=Symbol();function hw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===fv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function LC(e,t){return typeof e=="function"?e(...t):!!e}var PC=class extends Rc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&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"}},hv=new PC;function _g(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},n.reject=o=>{a({status:"rejected",reason:o}),t(o)},n}var kC=AC;function jC(){let e=[],t=0,n=d=>{d()},a=d=>{d()},o=kC;const l=d=>{t?e.push(d):o(()=>{n(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{a(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}var On=jC(),UC=class extends Rc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&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}},Dd=new UC;function BC(e){return Math.min(1e3*2**e,3e4)}function pw(e){return(e??"online")==="online"?Dd.isOnline():!0}var Eg=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mw(e){let t=!1,n=0,a;const o=_g(),l=()=>o.status!=="pending",u=w=>{if(!l()){const T=new Eg(w);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>hv.isFocused()&&(e.networkMode==="always"||Dd.isOnline())&&e.canRun(),g=()=>pw(e.networkMode)&&e.canRun(),p=w=>{l()||(a?.(),o.resolve(w))},y=w=>{l()||(a?.(),o.reject(w))},_=()=>new Promise(w=>{a=T=>{(l()||h())&&w(T)},e.onPause?.()}).then(()=>{a=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??(Eo?0:3),C=e.retryDelay??BC,O=typeof C=="function"?C(n,R):C,N=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!N){y(R);return}n++,e.onFail?.(n,R),NC(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?S():_().then(S),o)}}var gw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gg(this.gcTime)&&(this.#e=mo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Eo?1/0:300*1e3))}clearGcTimeout(){this.#e&&(mo.clearTimeout(this.#e),this.#e=void 0)}},zC=class extends gw{#e;#t;#n;#a;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=D_(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=D_(this.options);t.data!==void 0&&(this.setState(I_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=bg(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Lr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pi(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:!dw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},o=()=>{const d=hw(this.options,t),h=(()=>{const g={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#o=!1,this.options.persister?this.options.persister(d,h,this):d(h)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=mw({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Eg&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Eg){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...vw(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...I_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};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 vw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function D_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var FC=class extends Rc{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=_g(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),L_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sg(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!vg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&P_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||Pi(this.options.staleTime,this.#t)!==Pi(t.staleTime,this.#t))&&this.#g();const o=this.#v();a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return HC(this,n)&&(this.#a=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Xn)),t}#g(){this.#_();const e=Pi(this.options.staleTime,this.#t);if(Eo||this.#a.isStale||!gg(e))return;const n=dw(this.#a.dataUpdatedAt,e)+1;this.#c=mo.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(Eo||Lr(this.options.enabled,this.#t)===!1||!gg(this.#l)||this.#l===0)&&(this.#u=mo.setInterval(()=>{(this.options.refetchIntervalInBackground||hv.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#_(){this.#c&&(mo.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(mo.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,a=this.options,o=this.#a,l=this.#r,u=this.#s,f=e!==n?e.state:this.#n,{state:h}=e;let g={...h},p=!1,y;if(t._optimisticResults){const D=this.hasListeners(),B=!D&&L_(e,t),Z=D&&P_(e,n,t,a);(B||Z)&&(g={...g,...vw(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;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(D=o.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(w="success",y=bg(o?.data,D,t),p=!0)}if(t.select&&y!==void 0&&!T)if(o&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=bg(o?.data,y,t),this.#f=y,this.#i=null}catch(D){this.#i=D}this.#i&&(_=this.#i,y=this.#f,S=Date.now(),w="error");const R=g.fetchStatus==="fetching",A=w==="pending",C=w==="error",O=A&&R,N=y!==void 0,I={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&&!N,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&N,isStale:pv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Lr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=Y=>{I.status==="error"?Y.reject(I.error):I.data!==void 0&&Y.resolve(I.data)},B=()=>{const Y=this.#o=I.promise=_g();D(Y)},Z=this.#o;switch(Z.status){case"pending":e.queryHash===n.queryHash&&D(Z);break;case"fulfilled":(I.status==="error"||I.data!==Z.value)&&B();break;case"rejected":(I.status!=="error"||I.error!==Z.reason)&&B();break}}return I}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),vg(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const l=new Set(o??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(u=>{const d=u;return this.#a[d]!==e[d]&&l.has(d)})};this.#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.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function VC(e,t){return Lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function L_(e,t){return VC(e,t)||e.state.data!==void 0&&Sg(e,t,t.refetchOnMount)}function Sg(e,t,n){if(Lr(t.enabled,e)!==!1&&Pi(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&pv(e,t)}return!1}function P_(e,t,n,a){return(e!==t||Lr(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pv(e,n)}function pv(e,t){return Lr(t.enabled,e)!==!1&&e.isStaleByTime(Pi(t.staleTime,e))}function HC(e,t){return!vg(e.getCurrentResult(),t)}function k_(e){return{onFetch:(t,n)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let g=!1;const p=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=hw(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,N=T?DC:IC;return{pages:N(S.pages,C,O),pageParams:N(S.pageParams,w,O)}};if(o&&l.length){const S=o==="backward",w=S?yw:wg,T={pages:l,pageParams:u},R=w(a,T);d=await _(T,R,S)}else{const S=e??l.length;do{const w=f===0?u[0]??a.initialPageParam:wg(a,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 wg(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function yw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function NB(e,t){return t?wg(e,t)!=null:!1}function IB(e,t){return!t||!e.getPreviousPageParam?!1:yw(e,t)!=null}var $C=class extends gw{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||GC(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=mw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#a.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{throw await this.#n.config.onError?.(l,e,this.state.context,this,n),await this.options.onError?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,l,e,this.state.context,n),l}finally{this.#r({type:"error",error: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 GC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qC=class extends Rc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new $C({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=Xu(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=Xu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Xu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Xu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.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=>C_(t,n))}findAll(e={}){return this.getAll().filter(t=>C_(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(Xn))))}};function Xu(e){return e.options.scope?.id}var YC=class extends Rc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,o=t.queryHash??dv(a,t);let l=this.get(o);return l||(l=new zC({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){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=>A_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>A_(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()})})}},KC=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(e={}){this.#e=e.queryCache||new YC,this.#t=e.mutationCache||new qC,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=hv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Dd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(a.queryHash)?.state.data,u=CC(t,l);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return On.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;On.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return On.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=On.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(a).then(Xn).catch(Xn)}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},a=On.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Xn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=k_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=k_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(fc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{hc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(fc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{hc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=dv(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===fv&&(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()}},bw=E.createContext(void 0),WC=e=>{const t=E.useContext(bw);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZC=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(bw.Provider,{value:e,children:t})),_w=E.createContext(!1),QC=()=>E.useContext(_w);_w.Provider;function XC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JC=E.createContext(XC()),e4=()=>E.useContext(JC),t4=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n4=e=>{E.useEffect(()=>{e.clearReset()},[e])},r4=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||LC(n,[e.error,a])),a4=(e,t)=>t.state.data===void 0,i4=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>n(a(...o)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},o4=(e,t)=>e.isLoading&&e.isFetching&&!t,s4=(e,t)=>e?.suspense&&t.isPending,j_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function l4(e,t,n){const a=QC(),o=e4(),l=WC(n),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=a?"isRestoring":"optimistic",i4(u),t4(u,o),n4(o);const d=!l.getQueryCache().get(u.queryHash),[f]=E.useState(()=>new t(l,u)),h=f.getOptimisticResult(u),g=!a&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(p=>{const y=g?f.subscribe(On.batchCalls(p)):Xn;return f.updateResult(),y},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),E.useEffect(()=>{f.setOptions(u)},[u,f]),s4(u,h))throw j_(u,f,o);if(r4({result:h,errorResetBoundary:o,throwOnError:u.throwOnError,query:l.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,h),u.experimental_prefetchInRender&&!Eo&&o4(h,a)&&(d?j_(u,f,o):l.getQueryCache().get(u.queryHash)?.promise)?.catch(Xn).finally(()=>{f.updateResult()}),u.notifyOnChangeProps?h:f.trackResult(h)}function c4(e,t){return l4({...e,enabled:!0,suspense:!0,throwOnError:a4,placeholderData:void 0},FC,t)}const u4={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]},Ew=E.createContext(void 0);async function d4(){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 f4(e){const t=Sf.c(4),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:u4.authConfig(),queryFn:d4,staleTime:1/0},t[0]=a):a=t[0];const{data:o}=c4(a);let l;return t[1]!==o||t[2]!==n?(l=b.jsx(Ew.Provider,{value:o,children:n}),t[1]=o,t[2]=n,t[3]=l):l=t[3],l}function DB(){const e=E.useContext(Ew);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const xg=new WeakMap,h4=new WeakMap,Ld={current:[]};let dm=!1,ic=0;const tc=new Set,Ju=new Map;function Sw(e){for(const t of e){if(Ld.current.includes(t))continue;Ld.current.push(t),t.recompute();const n=h4.get(t);if(n)for(const a of n){const o=xg.get(a);o?.length&&Sw(o)}}}function p4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function m4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function ww(e){if(ic>0&&!Ju.has(e)&&Ju.set(e,e.prevState),tc.add(e),!(ic>0)&&!dm)try{for(dm=!0;tc.size>0;){const t=Array.from(tc);tc.clear();for(const n of t){const a=Ju.get(n)??n.prevState;n.prevState=a,p4(n)}for(const n of t){const a=xg.get(n);a&&(Ld.current.push(n),Sw(a))}for(const n of t){const a=xg.get(n);if(a)for(const o of a)m4(o)}}}finally{dm=!1,Ld.current=[],Ju.clear()}}function oc(e){ic++;try{e()}finally{if(ic--,ic===0){const t=tc.values().next().value;t&&ww(t)}}}function g4(e){return typeof e=="function"}class v4{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var o,l;this.listeners.add(a);const u=(l=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:l.call(o,a,this);return()=>{this.listeners.delete(a),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,o;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):g4(t)?this.state=t(this.prevState):this.state=t,(o=(a=this.options)==null?void 0:a.onUpdate)==null||o.call(a),ww(this)}}const ki="__TSR_index",U_="popstate",B_="beforeunload";function y4(e){let t=e.getLocation();const n=new Set,a=u=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},l=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const g=e.getBlockers?.()??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&g.length&&p)for(const y of g){const _=Pd(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,d,f)=>{const h=t.state[ki];d=z_(h+1,d),l({task:()=>{e.pushState(u,d),a({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const h=t.state[ki];d=z_(h,d),l({task:()=>{e.replaceState(u,d),a({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ki]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function z_(e,t){t||(t={});const n=mv();return{...t,key:n,__TSR_key:n,[ki]:e}}function b4(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let o=[];const l=()=>o,u=D=>o=D,d=(D=>D),f=(()=>Pd(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=mv();t.history.replaceState({[ki]: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&&(I._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),I._ignoreSubscribers=!1,T=void 0,R=void 0,g=void 0)},C=(D,B,Z)=>{const Y=d(B);R||(g=h),h=Pd(B,Z),T={href:Y,state:Z,isPush:T?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>A()))},O=D=>{h=f(),I.notify({type:D})},N=async()=>{if(y){y=!1;return}const D=f(),B=D.state[ki]-h.state[ki],Z=B===1,Y=B===-1,V=!Z&&!Y||p;p=!1;const z=V?"GO":Y?"BACK":"FORWARD",ie=V?{type:"GO",index:B}:{type:Y?"BACK":"FORWARD"};if(_)_=!1;else{const ee=l();if(typeof document<"u"&&ee.length){for(const k of ee)if(await k.blockerFn({currentLocation:h,nextLocation:D,action:z})){y=!0,t.history.go(1),I.notify(ie);return}}}h=f(),I.notify(ie)},L=D=>{if(S){S=!1;return}let B=!1;const Z=l();if(typeof document<"u"&&Z.length)for(const Y of Z){const V=Y.enableBeforeUnload??!0;if(V===!0){B=!0;break}if(typeof V=="function"&&V()===!0){B=!0;break}}if(B)return D.preventDefault(),D.returnValue=""},I=y4({getLocation:w,getLength:()=>t.history.length,pushState:(D,B)=>C("push",D,B),replaceState:(D,B)=>C("replace",D,B),back:D=>(D&&(_=!0),S=!0,t.history.back()),forward:D=>{D&&(_=!0),S=!0,t.history.forward()},go:D=>{p=!0,t.history.go(D)},createHref:D=>d(D),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=a,t.removeEventListener(B_,L,{capture:!0}),t.removeEventListener(U_,N)},onBlocked:()=>{g&&h!==g&&(h=g)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(B_,L,{capture:!0}),t.addEventListener(U_,N),t.history.pushState=function(...D){const B=n.apply(t.history,D);return I._ignoreSubscribers||O("PUSH"),B},t.history.replaceState=function(...D){const B=a.apply(t.history,D);return I._ignoreSubscribers||O("REPLACE"),B},I}function Pd(e,t){const n=e.indexOf("#"),a=e.indexOf("?"),o=mv();return{href:e,pathname:e.substring(0,n>0?a>0?Math.min(n,a):n:a>0?a:e.length),hash:n>-1?e.substring(n):"",search:a>-1?e.slice(a,n===-1?void 0:n):"",state:t||{[ki]:0,key:o,__TSR_key:o}}}function mv(){return(Math.random()+1).toString(36).substring(7)}function kd(e){return e[e.length-1]}function _4(e){return typeof e=="function"}function Di(e,t){return _4(e)?e(t):e}const E4=Object.prototype.hasOwnProperty;function Dr(e,t){if(e===t)return e;const n=t,a=H_(e)&&H_(n);if(!a&&!(jd(e)&&jd(n)))return n;const o=a?e:F_(e);if(!o)return n;const l=a?n:F_(n);if(!l)return n;const u=o.length,d=l.length,f=a?new Array(d):{};let h=0;for(let g=0;g<d;g++){const p=a?g:l[g],y=e[p],_=n[p];if(y===_){f[p]=y,(a?g<u:E4.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Dr(y,_);f[p]=S,S===y&&h++}return u===d&&h===u?e:f}function F_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const o of n){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}const a=Object.getOwnPropertySymbols(e);for(const o of a){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}return t}function jd(e){if(!V_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!V_(n)||!n.hasOwnProperty("isPrototypeOf"))}function V_(e){return Object.prototype.toString.call(e)==="[object Object]"}function H_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yo(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!yo(e[a],t[a],n))return!1;return!0}if(jd(e)&&jd(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!yo(e[u],t[u],n))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!a||t[u]!==void 0)&&(l++,l>o||!yo(e[u],t[u],n)))return!1;return o===l}return!1}function zs(e){let t,n;const a=new Promise((o,l)=>{t=o,n=l});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",n(o)},a}function S4(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 ji(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function $_(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function G_(e,t){if(!e)return e;const n=/%25|%5C/gi;let a=0,o="",l;for(;(l=n.exec(e))!==null;)o+=$_(e.slice(a,l.index))+l[0],a=n.lastIndex;return o+$_(a?e.slice(a):e)}var w4="Invariant failed";function $a(e,t){if(!e)throw new Error(w4)}function Ud(e){const t=new Map;let n,a;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,n=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===a&&(a=void 0)}const d=t.get(l);if(d)d.value=u,o(d);else{const f={key:l,value:u,prev:a};a&&(a.next=f),a=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,a=void 0}}}const Fs=0,So=1,wo=2,pc=3,Ds=4,x4=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,R4=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,O4=/^([^{]*)\{\$\}([^}]*)$/;function gv(e,t,n=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=Fs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const h=e.length;return n[0]=wo,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=So,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=l.match(O4);if(u){const g=u[1].length;return n[0]=wo,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(R4);if(d){const h=d[1],g=d[2],p=d[3],y=h.length;return n[0]=pc,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+g.length,n[4]=o-p.length,n[5]=o,n}const f=l.match(x4);if(f){const h=f[1],g=f[2],p=f[3],y=h.length;return n[0]=So,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+g.length,n[4]=o-p.length,n[5]=o,n}return n[0]=Fs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function wf(e,t,n,a,o,l,u){u?.(n);let d=a;{const f=n.fullPath??n.from,h=f.length,g=n.options?.caseSensitive??e;for(;d<h;){const y=gv(f,d,t);let _;const S=d,w=y[5];switch(d=w+1,l++,y[0]){case Fs:{const R=f.substring(y[2],y[3]);if(g){const A=o.static?.get(R);if(A)_=A;else{o.static??=new Map;const C=Ps(n.fullPath??n.from);C.parent=o,C.depth=l,_=C,o.static.set(R,C)}}else{const A=R.toLowerCase(),C=o.staticInsensitive?.get(A);if(C)_=C;else{o.staticInsensitive??=new Map;const O=Ps(n.fullPath??n.from);O.parent=o,O.depth=l,_=O,o.staticInsensitive.set(A,O)}}break}case So:{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,N=A?C?A:A.toLowerCase():void 0,L=o.dynamic?.find(I=>I.caseSensitive===C&&I.prefix===O&&I.suffix===N);if(L)_=L;else{const I=hm(So,n.fullPath??n.from,C,O,N);_=I,I.depth=l,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case pc:{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,N=A?C?A:A.toLowerCase():void 0,L=o.optional?.find(I=>I.caseSensitive===C&&I.prefix===O&&I.suffix===N);if(L)_=L;else{const I=hm(pc,n.fullPath??n.from,C,O,N);_=I,I.parent=o,I.depth=l,o.optional??=[],o.optional.push(I)}break}case wo:{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,N=A?C?A:A.toLowerCase():void 0,L=hm(wo,n.fullPath??n.from,C,O,N);_=L,L.parent=o,L.depth=l,o.wildcard??=[],o.wildcard.push(L)}}o=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=Ps(n.fullPath??n.from);y.kind=Ds,y.parent=o,l++,y.depth=l,o.index=y,o=y}p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)wf(e,t,f,d,o,l,u)}function fm(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 po(e){if(e.static)for(const t of e.static.values())po(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())po(t);if(e.dynamic?.length){e.dynamic.sort(fm);for(const t of e.dynamic)po(t)}if(e.optional?.length){e.optional.sort(fm);for(const t of e.optional)po(t)}if(e.wildcard?.length){e.wildcard.sort(fm);for(const t of e.wildcard)po(t)}}function Ps(e){return{kind:Fs,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function hm(e,t,n,a,o){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,caseSensitive:n,prefix:a,suffix:o}}function T4(e,t){const n=Ps("/"),a=new Uint16Array(6);for(const o of e)wf(!1,a,o,1,n,0);po(n),t.masksTree=n,t.flatCache=Ud(1e3)}function A4(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const a=vv(e,t.masksTree);return t.flatCache.set(e,a),a}function C4(e,t,n,a,o){e||="/",a||="/";const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);if(!u){u=Ps("/");const d=new Uint16Array(6);wf(t,d,{from:e},1,u,0),o.singleCache.set(l,u)}return vv(a,u,n)}function M4(e,t,n=!1){const a=n?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";const l=vv(e,t.segmentTree,n);return l&&(l.branch=L4(l.route)),t.matchCache.set(a,l),l}function N4(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function I4(e,t=!1,n){const a=Ps(e.fullPath),o=new Uint16Array(6),l={},u={};let d=0;return wf(t,o,e,1,a,0,h=>{if(n?.(h,d),$a(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const g=N4(h.fullPath);(!u[g]||h.fullPath.endsWith("/"))&&(u[g]=h)}d++}),po(a),{processedTree:{segmentTree:a,singleCache:Ud(1e3),matchCache:Ud(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function vv(e,t,n=!1){const a=e.split("/"),o=k4(e,a,t,n);if(!o)return null;const l=D4(e,a,o);return"**"in o&&(l["**"]=o["**"]),{route:o.node.route,params:l}}function D4(e,t,n){const a=P4(n.node);let o=null;const l={};for(let u=0,d=0,f=0;d<a.length;u++,d++,f++){const h=a[d],g=t[u],p=f;if(g&&(f+=g.length),h.kind===So){o??=n.node.fullPath.split("/");const y=o[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===pc){if(n.skipped&1<<d){u--;continue}o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0,S=h.suffix?.length??0,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===wo){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 L4(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function P4(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function k4(e,t,n,a){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!kd(t),l=o&&e!=="/",u=t.length-(o?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,g=null;for(;d.length;){const p=d.pop();let{node:y,index:_,skipped:S,depth:w,statics:T,dynamics:R,optionals:A}=p;a&&y.route&&y.kind!==Ds&&Hl(h,p)&&(h=p);const C=_===u;if(C&&(y.route&&!l&&Hl(g,p)&&(g=p),!y.optional&&!y.wildcard&&!y.index))continue;const O=C?void 0:t[_];let N;if(C&&y.index){const L={node:y.index,index:_,skipped:S,depth:w+1,statics:T,dynamics:R,optionals:A};if(T===u&&!R&&!A&&!S)return L;Hl(g,L)&&(g=L)}if(y.wildcard&&Hl(f,p))for(const L of y.wildcard){const{prefix:I,suffix:D}=L;if(!(I&&(C||!(L.caseSensitive?O:N??=O.toLowerCase()).startsWith(I)))){if(D){if(C)continue;const B=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?B:B.toLowerCase())!==D)continue}f={node:L,index:u,skipped:S,depth:w,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=S|1<<w,I=w+1;for(let D=y.optional.length-1;D>=0;D--){const B=y.optional[D];d.push({node:B,index:_,skipped:L,depth:I,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const B=y.optional[D],{prefix:Z,suffix:Y}=B;if(Z||Y){const V=B.caseSensitive?O:N??=O.toLowerCase();if(Z&&!V.startsWith(Z)||Y&&!V.endsWith(Y))continue}d.push({node:B,index:_+1,skipped:S,depth:I,statics:T,dynamics:R,optionals:A+1})}}if(!C&&y.dynamic&&O)for(let L=y.dynamic.length-1;L>=0;L--){const I=y.dynamic[L],{prefix:D,suffix:B}=I;if(D||B){const Z=I.caseSensitive?O:N??=O.toLowerCase();if(D&&!Z.startsWith(D)||B&&!Z.endsWith(B))continue}d.push({node:I,index:_+1,skipped:S,depth:w+1,statics:T,dynamics:R+1,optionals:A})}if(!C&&y.staticInsensitive){const L=y.staticInsensitive.get(N??=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 Hl(f,g)?g:f;if(g)return g;if(f)return f;if(a&&h){let p=h.index;for(let _=0;_<h.index;_++)p+=t[_].length;const y=p===e.length?"/":e.slice(p);return{node:h.node,skipped:h.skipped,"**":decodeURIComponent(y)}}return null}function Hl(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===Ds)>(e.node.kind===Ds)||t.node.kind===Ds==(e.node.kind===Ds)&&t.depth>e.depth))):!0}function xd(e){return yv(e.filter(t=>t!==void 0).join("/"))}function yv(e){return e.replace(/\/{2,}/g,"/")}function xw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function bo(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Rw(e){return bo(xw(e))}function Bd(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function j4(e,t,n){return Bd(e,n)===Bd(t,n)}function U4({base:e,to:t,trailingSlash:n="never",cache:a}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(a){u=o?t:l?e:e+"\0"+t;const p=a.get(u);if(p)return p}let d;if(l)d=e.split("/");else if(o)d=t.split("/");else{for(d=e.split("/");d.length>1&&kd(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&&(kd(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=gv(y,0,f);const _=f[0];if(_===Fs){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]);_===So?h+=w||T?`${w}{$${R}}${T}`:`$${R}`:_===wo?h+=w||T?`${w}{$}${T}`:"$":h+=`${w}{-$${R}}${T}`}h=yv(h);const g=h||"/";return u&&a&&a.set(u,g),g}function pm(e,t,n){const a=t[e];return typeof a!="string"?a:e==="_splat"?encodeURI(a):B4(a,n)}function mm({path:e,params:t,decodeCharMap:n}){let a=!1;const o={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:a};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:a};const l=e.length;let u=0,d,f="";for(;u<l;){const g=u;d=gv(e,g,d);const p=d[5];if(u=p+1,g===p)continue;const y=d[0];if(y===Fs){f+="/"+e.substring(g,p);continue}if(y===wo){const _=t._splat;o._splat=_,o["*"]=_;const S=e.substring(g,d[1]),w=e.substring(d[4],p);if(!_){a=!0,(S||w)&&(f+="/"+S+w);continue}const T=pm("_splat",t,n);f+="/"+S+T+w;continue}if(y===So){const _=e.substring(d[2],d[3]);!a&&!(_ in t)&&(a=!0),o[_]=t[_];const S=e.substring(g,d[1]),w=e.substring(d[4],p),T=pm(_,t,n)??"undefined";f+="/"+S+T+w;continue}if(y===pc){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;o[_]=S;const w=e.substring(g,d[1]),T=e.substring(d[4],p),R=pm(_,t,n)??"";f+="/"+w+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:a}}function B4(e,t){let n=encodeURIComponent(e);if(t)for(const[a,o]of t)n=n.replaceAll(a,o);return n}function yr(e){return!!e?.isNotFound}function z4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const zd="tsr-scroll-restoration-v1_3",F4=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function V4(){const e=z4();if(!e)return null;const t=e.getItem(zd);let n=t?JSON.parse(t):{};return{state:n,set:a=>(n=Di(a,n)||n,e.setItem(zd,JSON.stringify(n)))}}const ed=V4(),Rg=e=>e.state.__TSR_key||e.href;function H4(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 Fd=!1;function Ow({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:o,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=u[d];Fd=!0;e:{if(a&&f&&Object.keys(f).length>0){for(const p in f){const y=f[p];if(p==="window")window.scrollTo({top:y.scrollY,left:y.scrollX,behavior:n});else if(p){const _=document.querySelector(p);_&&(_.scrollLeft=y.scrollX,_.scrollTop=y.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const y=document.getElementById(h);y&&y.scrollIntoView(p)}break e}const g={top:0,left:0,behavior:n};if(window.scrollTo(g),o)for(const p of o){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(g)}}Fd=!1}function $4(e,t){if(!ed&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!ed))return;e.isScrollRestorationSetup=!0,Fd=!1;const a=e.options.getScrollRestorationKey||Rg;window.history.scrollRestoration="manual";const o=l=>{if(Fd||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?u=`[data-scroll-restoration-id="${f}"]`:u=H4(l.target)}const d=a(e.state.location);ed.set(f=>{const h=f[d]||={},g=h[u]||={};if(u==="window")g.scrollX=window.scrollX||0,g.scrollY=window.scrollY||0;else if(u){const p=document.querySelector(u);p&&(g.scrollX=p.scrollLeft||0,g.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",F4(o,100),!0),e.subscribe("onRendered",l=>{const u=a(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Ow({storageKey:zd,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ed.set(d=>(d[u]||={},d)))})}function G4(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 q4(e,t=String){const n=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&n.set(a,t(o))}return n.toString()}function gm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Y4(e){const t=new URLSearchParams(e),n={};for(const[a,o]of t.entries()){const l=n[a];l==null?n[a]=gm(o):Array.isArray(l)?l.push(gm(o)):n[a]=[l,gm(o)]}return n}const K4=Z4(JSON.parse),W4=Q4(JSON.stringify,JSON.parse);function Z4(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Y4(t);for(const a in n){const o=n[a];if(typeof o=="string")try{n[a]=e(o)}catch{}}return n}}function Q4(e,t){const n=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=q4(o,a);return l?`?${l}`:""}}const fr="__root__";function X4(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function kr(e){return e instanceof Response&&!!e.options}const Rd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},xf=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),bv=(e,t,n=!0)=>{const a={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const d=e.router.getMatch(u.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},Tw=(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),$a(n.options.notFoundComponent);const a=e.matches.find(o=>o.routeId===n.id);$a(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,o=>({...o,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Tw(e,t))},Li=(e,t,n)=>{if(!(!kr(n)&&!yr(n))){if(kr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const a=kr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:a,isFetching:!1,error:n})),yr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw kr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Tw(e,n),n)}},Aw=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},$l=(e,t,n,a)=>{const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,Li(e,e.router.getMatch(o),n);try{u.options.onError?.(n)}catch(d){n=d,Li(e,e.router.getMatch(o),n)}e.updateMatch(o,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},J4=(e,t,n,a)=>{const o=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){o.ssr=a.id===fr;return}if(u?.ssr===!1){o.ssr=!1;return}const d=_=>_===!0&&u?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(a.options.ssr===void 0){o.ssr=d(f);return}if(typeof a.options.ssr!="function"){o.ssr=d(a.options.ssr);return}const{search:h,params:g}=o,p={search:td(h,o.searchError),params:td(g,o.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:td(_.search,_.searchError),params:td(_.params,_.paramsError),ssr:_.ssr}))},y=a.options.ssr(p);if(ji(y))return y.then(_=>{o.ssr=d(_??f)});o.ssr=d(y??f)},Cw=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!xf(e,t)&&(n.options.loader||n.options.beforeLoad||Iw(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{Rd(e)},o);a._nonReactive.pendingTimeout=u}},e3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Cw(e,t,n,a);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Li(e,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},t3=(e,t,n,a)=>{const o=e.router.getMatch(t),l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=zs(()=>{l?.resolve()});const{paramsError:u,searchError:d}=o;u&&$l(e,n,u,"PARSE_PARAMS"),d&&$l(e,n,d,"VALIDATE_SEARCH"),Cw(e,t,a,o);const f=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let p=!1;const y=()=>{p||(p=!0,e.updateMatch(t,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:f})))},_=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){oc(()=>{y(),_()});return}o._nonReactive.beforeLoadPromise=zs();const S={...bv(e,n,!1),...o.__routeContext},{search:w,params:T,cause:R}=o,A=xf(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){oc(()=>{y(),_()});return}(kr(L)||yr(L))&&(y(),$l(e,n,L,"BEFORE_LOAD")),oc(()=>{y(),e.updateMatch(t,I=>({...I,__beforeLoadContext:L})),_()})};let N;try{if(N=a.options.beforeLoad(C),ji(N))return y(),N.catch(L=>{$l(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),$l(e,n,L,"BEFORE_LOAD")}O(N)},n3=(e,t)=>{const{id:n,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],l=()=>{if(e.router.isServer){const f=J4(e,n,t,o);if(ji(f))return f.then(d)}return d()},u=()=>t3(e,n,t,o),d=()=>{if(Aw(e,n))return;const f=e3(e,n,o);return ji(f)?f.then(u):u()};return l()},r3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([l,u,d])=>{const f=l?.meta,h=l?.links,g=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:g,headers:d,scripts:u,styles:p}})},Mw=(e,t,n,a)=>{const o=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:d,cause:f}=e.router.getMatch(t),h=bv(e,n),g=xf(e,t);return{params:l,deps:u,preload:!!g,parentMatchPromise:o,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:g?"preload":f,route:a,...e.router.options.additionalContext}},q_=async(e,t,n,a)=>{try{const o=e.router.getMatch(t);try{(!e.router.isServer||o.ssr===!0)&&Nw(a);const l=a.options.loader?.(Mw(e,t,n,a)),u=a.options.loader&&ji(l);if((u||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),a.options.loader){const h=u?await l:l;Li(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,g=>({...g,loaderData:h}))}a._lazyPromise&&await a._lazyPromise;const f=o._nonReactive.minPendingPromise;f&&await f,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;const d=o._nonReactive.minPendingPromise;d&&await d,yr(l)&&await a.options.notFoundComponent?.preload?.(),Li(e,e.router.getMatch(t),l);try{a.options.onError?.(l)}catch(f){u=f,Li(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:u,status:"error",isFetching:!1}))}}catch(o){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Li(e,l,o)}},a3=async(e,t)=>{const{id:n,routeId:a}=e.matches[t];let o=!1,l=!1;const u=e.router.looseRoutesById[a],d=()=>{e.updateMatch(n,g=>({...g,context:bv(e,t)}))};if(Aw(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&&Li(e,p,y)}else{const p=Date.now()-g.updatedAt,y=xf(e,n),_=y?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,S=u.options.shouldReload,w=typeof S=="function"?S(Mw(e,n,t,u)):S,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=zs(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;o=A==="success"&&(C||(w??p>_)),y&&u.options.preload===!1||(o&&!e.sync?(l=!0,(async()=>{try{await q_(e,n,t,u),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){kr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||o&&e.sync)&&await q_(e,n,t,u))}}const f=e.router.getMatch(n);l||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,l||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0,l||d();const h=l?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(n)):f};async function Y_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Rd(t);try{for(let d=0;d<t.matches.length;d++){const f=n3(t,d);ji(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(a3(t,d));const o=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of o){if(kr(d))throw d;!l&&yr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,g=t.router.looseRoutesById[h];try{const p=r3(t,f,g);if(p){const y=await p;t.updateMatch(f,_=>({..._,...y}))}}catch(p){console.error(`Error executing head for route ${h}:`,p)}}if(l)throw l;const u=Rd(t);ji(u)&&await u}catch(n){if(yr(n)&&!t.preload){const a=Rd(t);throw ji(a)&&await a,n}if(kr(n))throw n}return t.matches}async function Nw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const a of Dw){const o=e.options[a]?.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function td(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Iw(e){for(const t of Dw)if(e.options[t]?.preload)return!0;return!1}const Dw=["component","errorComponent","pendingComponent","notFoundComponent"];function i3(e){return{input:({url:t})=>{for(const n of e)t=Lw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Og(e[n],t);return t}}}function o3(e){const t=Rw(e.basepath),n=`/${t}`,a=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const d=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===o?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=xd(["/",t,u.pathname]),u)}}function Lw(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 Og(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 _o(e){const t=e.resolvedLocation,n=e.location,a=t?.pathname!==n.pathname,o=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:o,hashChanged:l}}class s3{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const a=this.options,o=this.basepath??a?.basepath??"/",l=this.basepath===void 0,u=a?.rewrite;this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(y=>[encodeURIComponent(y),y])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=b4())),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 v4(c3(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),$4(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||o!==f||u!==h){this.basepath=f;const y=[];Rw(f)!==""&&y.push(o3({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:i3(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:a,processedTree:o}=I4(this.routeTree,this.options.caseSensitive,(u,d)=>{u.init({originalIndex:d})});this.options.routeMasks&&T4(this.options.routeMasks,o),this.routesById=n,this.routesByPath=a,this.processedTree=o;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,a)=>{const o={eventType:n,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const o=({href:f,state:h})=>{const g=new URL(f,this.origin),p=Lw(this.rewrite,g),y=this.options.parseSearch(p.search),_=this.options.stringifySearch(y);p.search=_;const S=p.href.replace(p.origin,""),w=p.pathname,T=new URL(p.href),R=Og(this.rewrite,T),A=R.pathname+R.search+R.hash;return{href:S,publicHref:A,url:p,pathname:G_(w),searchStr:_,search:Dr(a?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Dr(a?.state,h)}},l=o(n),{__tempLocation:u,__tempKey:d}=l.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathCache=Ud(1e3),this.resolvePathWithBase=(n,a)=>U4({base:n,to:yv(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},o):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>u3({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),a=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...a]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const a=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(u,{_buildLocation:!0}),f=kd(d);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??f.fullPath,g=this.resolvePathWithBase(h,"."),p=f.search,y={...f.params},_=l.to?this.resolvePathWithBase(g,`${l.to}`):this.resolvePathWithBase(g,"."),S=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,Di(l.params,y)),w=mm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(Z=>this.looseRoutesById[Z.routeId]);if(Object.keys(S).length>0)for(const Z of T){const Y=Z.options.params?.stringify??Z.options.stringifyParams;Y&&Object.assign(S,Y(S))}const R=n.leaveParams?_:G_(mm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const Z={};T.forEach(Y=>{if(Y.options.validateSearch)try{Object.assign(Z,Tg(Y.options.validateSearch,{...Z,...A}))}catch{}}),A=Z}A=d3({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Dr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?u.hash:l.hash?Di(l.hash,u.hash):void 0,N=O?`#${O}`:"";let L=l.state===!0?u.state:l.state?Di(l.state,u.state):{};L=Dr(u.state,L);const I=`${R}${C}${N}`,D=new URL(I,this.origin),B=Og(this.rewrite,D);return{publicHref:B.pathname+B.search+B.hash,href:I,url:B,pathname:R,search:A,searchStr:C,state:L,hash:O??"",unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const d=a(l);let f=u?a(u):void 0;if(!f){const h={};if(this.options.routeMasks){const g=A4(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,Di(y,h));u={from:n.from,..._,params:S},f=a(u)}}}return f&&(d.maskedLocation=f),d};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:a,...o})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const h=yo(o.state,this.latestLocation.state);return f.forEach(g=>{delete o.state[g]}),h},u=bo(this.latestLocation.href)===bo(o.href),d=this.commitLocationPromise;if(this.commitLocationPromise=zs(()=>{d?.resolve()}),u&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:g,...p}=o;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Pd(d,{__TSR_index:n?p:p+1});f.to=y.pathname,f.search=this.options.parseSearch(y.search),f.hash=y.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const g=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:a,href:o,publicHref:l,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(!o||!l&&!d){const h=this.buildLocation({to:n,...u});o=o??h.url.href,l=l??h.url.href}const f=!d&&l?l:o;if(!u.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const p of g)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const a=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==a.publicHref||a.url.origin!==this.origin){const o=this.getParsedLocationHref(a);throw X4({href:o})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(o=>!n.some(l=>l.id===o.id))}))},this.load=async n=>{let a,o,l;for(l=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",..._o({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",..._o({resolvedLocation:h,location:f})}),await Y_({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=[];oc(()=>{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){kr(f)?(a=f,this.isServer||this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):yr(f)&&(o=f),this.__store.setState(h=>({...h,statusCode:a?a.status:o?404:h.matches.some(g=>g.status==="error")?500:200,redirect:a}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(d=>d.status==="error")&&(u=500),u!==void 0&&this.__store.setState(d=>({...d,statusCode:u}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,d=typeof a.types=="function"?a.types(_o({resolvedLocation:u,location:l})):a.types;if(d===!1){n();return}o={update:n,types:d}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{const o=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";o&&this.__store.setState(l=>({...l,[o]:l[o]?.map(u=>u.id===n?a(u):u)}))})},this.getMatch=n=>{const a=o=>o.id===n;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=n=>{const a=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(a),cachedMatches:o.cachedMatches.map(a),pendingMatches:o.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let a=n.url.href;return this.origin&&n.url.origin===this.origin&&(a=a.replace(this.origin,"")||"/"),a},this.resolveRedirect=n=>{if(!n.options.href){const a=this.buildLocation(n.options),o=this.getParsedLocationHref(a);n.options.href=a.href,n.headers.set("Location",o)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(l=>!a(l))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const o=this.looseRoutesById[a.routeId];if(!o.options.loader)return!0;const l=(a.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Nw,this.preloadRoute=async n=>{const a=this.buildLocation(n);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),u=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);oc(()=>{o.forEach(d=>{u.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return o=await Y_({router:this,matches:o,location:a,preload:!0,updateMatch:(d,f)=>{l.has(d)?o=o.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),o}catch(d){if(kr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:a});yr(d)||console.error(d);return}},this.matchRoute=(n,a)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(a?.pending&&this.state.status!=="pending")return!1;const d=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=C4(l.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!yo(f.params,n.params,{partial:!0})?!1:a?.includeSearch??!0?yo(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??W4,parseSearch:t.parseSearch??K4}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const a=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:l}=a;let{matchedRoutes:u}=a,d=!1;(o?o.path!=="/"&&l["**"]:bo(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=u.length-1;p>=0;p--){const y=u[p];if(y.children)return y.id}return fr}})(),h=[],g=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return u.forEach((p,y)=>{const _=h[y-1],[S,w,T]=(()=>{const z=_?.search??t.search,ie=_?._strictSearch??void 0;try{const ee=Tg(p.options.validateSearch,{...z})??void 0;return[{...z,...ee},{...ie,...ee},void 0]}catch(ee){let k=ee;if(ee instanceof Vd||(k=new Vd(ee.message,{cause:ee})),n?.throwOnError)throw k;return[z,{},k]}})(),R=p.options.loaderDeps?.({search:S})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=mm({path:p.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),N=p.id+C+A,L=this.getMatch(N),I=this.state.matches.find(z=>z.routeId===p.id),D=L?._strictParams??O;let B;if(!L){const z=p.options.params?.parse??p.options.parseParams;if(z)try{Object.assign(D,z(D))}catch(ie){if(yr(ie)||kr(ie)?B=ie:B=new l3(ie.message,{cause:ie}),n?.throwOnError)throw B}}Object.assign(l,D);const Z=I?"stay":"enter";let Y;if(L)Y={...L,cause:Z,params:I?Dr(I.params,l):l,_strictParams:D,search:Dr(I?I.search:L.search,S),_strictSearch:w};else{const z=p.options.loader||p.options.beforeLoad||p.lazyFn||Iw(p)?"pending":"success";Y={id:N,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:I?Dr(I.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:I?Dr(I.search,S):S,_strictSearch:w,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:B,__routeContext:void 0,_nonReactive:{loadPromise:zs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Z,loaderDeps:I?Dr(I.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||(Y.globalNotFound=f===p.id),Y.searchError=T;const V=g(_);Y.context={...V,...Y.__routeContext,...Y.__beforeLoadContext},h.push(Y)}),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 Vd extends Error{}class l3 extends Error{}function c3(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Tg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Vd("Async validation not supported");if(n.issues)throw new Vd(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 u3({pathname:e,routesById:t,processedTree:n}){const a={},o=bo(e);let l;const u=M4(o,n,!0);return u&&(l=u.route,Object.assign(a,u.params)),{matchedRoutes:u?.branch||[t[fr]],routeParams:a,foundRoute:l}}function d3({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){const o=n.reduce((d,f)=>{const h=[];if("search"in f.options)f.options.search?.middlewares&&h.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const g=({search:p,next:y})=>{let _=p;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(_=f.options.preSearchFilters.reduce((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(a&&f.options.validateSearch){const g=({search:p,next:y})=>{const _=y(p);try{return{..._,...Tg(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(g)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Di(t.search,d):{};o.push(l);const u=(d,f)=>{if(d>=o.length)return f;const h=o[d];return h({search:f,next:p=>u(d+1,p)})};return u(0,e)}const f3="Error preloading route! ☝️";class Pw{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const a=this.options,o=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=fr:this.parentRoute||$a(!1);let l=o?fr:a?.path;l&&l!=="/"&&(l=xw(l));const u=a?.id||l;let d=o?fr:xd([this.parentRoute.id===fr?"":this.parentRoute.id,u]);l===fr&&(l="/"),d!==fr&&(d=xd(["/",d]));const f=d===fr?"/":xd([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=f,this._to=f},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class h3 extends Pw{constructor(t){super(t)}}function _v(e){const t=e.errorComponent??Rf;return b.jsx(p3,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?E.createElement(t,{error:n,reset:a}):e.children})}class p3 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 Rf({error:e}){const[t,n]=E.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function m3({children:e,fallback:t=null}){return g3()?b.jsx(H.Fragment,{children:e}):b.jsx(H.Fragment,{children:t})}function g3(){return H.useSyncExternalStore(v3,()=>!0,()=>!1)}function v3(){return()=>{}}var vm={exports:{}},ym={},bm={exports:{}},_m={};var K_;function y3(){if(K_)return _m;K_=1;var e=$i();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(p,y){var _=y(),S=a({inst:{value:_,getSnapshot:y}}),w=S[0].inst,T=S[1];return l(function(){w.value=_,w.getSnapshot=y,f(w)&&T({inst:w})},[p,_,y]),o(function(){return f(w)&&T({inst:w}),p(function(){f(w)&&T({inst:w})})},[p]),u(_),_}function f(p){var y=p.getSnapshot;p=p.value;try{var _=y();return!n(p,_)}catch{return!0}}function h(p,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return _m.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,_m}var W_;function kw(){return W_||(W_=1,bm.exports=y3()),bm.exports}var Z_;function b3(){if(Z_)return ym;Z_=1;var e=$i(),t=kw();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var a=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return ym.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 I=w.value;if(_(I,L))return O=I}return O=L}if(I=O,a(C,L))return I;var D=y(L);return _!==void 0&&_(I,D)?(C=L,I):(C=L,O=D)}var A=!1,C,O,N=p===void 0?null:p;return[function(){return R(g())},N===null?void 0:function(){return R(N())}]},[g,p,y,_]);var T=o(h,S[0],S[1]);return u(function(){w.hasValue=!0,w.value=T},[T]),f(T),T},ym}var Q_;function _3(){return Q_||(Q_=1,vm.exports=b3()),vm.exports}var jw=_3();const LB=Io(jw);function E3(e,t=a=>a,n={}){const a=n.equal??S3;return jw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,a)}function S3(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,o]of e)if(!t.has(a)||!Object.is(o,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=X_(e);if(n.length!==X_(t).length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0}function X_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Em=E.createContext(null);function Uw(){return typeof document>"u"?Em:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Em,Em)}function tr(e){const t=E.useContext(Uw());return e?.warn,t}function er(e){const t=tr({warn:e?.router===void 0}),n=e?.router||t,a=E.useRef(void 0);return E3(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Dr(a.current,e.select(o));return a.current=l,l}return e.select(o)}return o})}const Of=E.createContext(void 0),w3=E.createContext(void 0);function va(e){const t=E.useContext(e.from?w3:Of);return er({select:a=>{const o=a.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if($a(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function Ev(e){return va({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Sv(e){const{select:t,...n}=e;return va({...n,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function wv(e){return va({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function xv(e){return va({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const nc=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Sm(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 x3(e,t,n={},a={}){E.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,a.disabled,e])}function R3(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function Oc(e){const t=tr();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function PB(e){const t=tr(),n=Oc(),a=E.useRef(null);return nc(()=>{a.current!==e&&(n(e),a.current=e)},[t,e,n]),null}var Tf=uw();const Bw=Io(Tf);function O3(e,t){const n=tr(),[a,o]=E.useState(!1),l=E.useRef(!1),u=R3(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:N,className:L,onClick:I,onFocus:D,onMouseEnter:B,onMouseLeave:Z,onTouchStart:Y,ignoreBlocker:V,params:z,search:ie,hash:ee,state:k,mask:F,reloadDocument:G,unsafeRelative:ae,from:ve,_fromLocation:P,...Q}=e,te=er({select:W=>W.location.search,structuralSharing:!0}),se=e.from,ge=E.useMemo(()=>({...e,from:se}),[n,te,se,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),_e=E.useMemo(()=>n.buildLocation({...ge}),[n,ge]),ye=E.useMemo(()=>{if(O)return;let W=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,de=!1;return n.origin&&(W.startsWith(n.origin)?W=n.history.createHref(W.replace(n.origin,""))||"/":de=!0),{href:W,external:de}},[O,_e.maskedLocation,_e.url,n.origin,n.history]),Se=E.useMemo(()=>{if(ye?.external)return ye.href;try{return new URL(g),g}catch{}},[g,ye]),le=e.reloadDocument||Se?!1:p??n.options.defaultPreload,je=y??n.options.defaultPreloadDelay??0,at=er({select:W=>{if(Se)return!1;if(h?.exact){if(!j4(W.location.pathname,_e.pathname,n.basepath))return!1}else{const de=Bd(W.location.pathname,n.basepath),me=Bd(_e.pathname,n.basepath);if(!(de.startsWith(me)&&(de.length===me.length||de[me.length]==="/")))return!1}return(h?.includeSearch??!0)&&!yo(W.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?W.location.hash===_e.hash:!0}}),Je=E.useCallback(()=>{n.preloadRoute({...ge}).catch(W=>{console.warn(W),console.warn(f3)})},[n,ge]),Ft=E.useCallback(W=>{W?.isIntersecting&&Je()},[Je]);x3(u,Ft,N3,{disabled:!!O||le!=="viewport"}),E.useEffect(()=>{l.current||!O&&le==="render"&&(Je(),l.current=!0)},[O,Je,le]);const re=W=>{const de=W.currentTarget.getAttribute("target"),me=C!==void 0?C:de;if(!O&&!I3(W)&&!W.defaultPrevented&&(!me||me==="_self")&&W.button===0){W.preventDefault(),Tf.flushSync(()=>{o(!0)});const he=n.subscribe("onResolved",()=>{he(),o(!1)});n.navigate({...ge,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:w,viewTransition:R,ignoreBlocker:V})}};if(Se)return{...Q,ref:u,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...N&&{style:N},...L&&{className:L},...I&&{onClick:I},...D&&{onFocus:D},...B&&{onMouseEnter:B},...Z&&{onMouseLeave:Z},...Y&&{onTouchStart:Y}};const be=W=>{O||le&&Je()},Le=be,Ye=W=>{if(!(O||!le))if(!je)Je();else{const de=W.target;if(Gl.has(de))return;const me=setTimeout(()=>{Gl.delete(de),Je()},je);Gl.set(de,me)}},At=W=>{if(O||!le||!je)return;const de=W.target,me=Gl.get(de);me&&(clearTimeout(me),Gl.delete(de))},Ue=at?Di(d,{})??T3:wm,et=at?wm:Di(f,{})??wm,j=[L,Ue.className,et.className].filter(Boolean).join(" "),q=(N||Ue.style||et.style)&&{...N,...Ue.style,...et.style};return{...Q,...Ue,...et,href:ye?.href,ref:u,onClick:ql([I,re]),onFocus:ql([D,be]),onMouseEnter:ql([B,Ye]),onMouseLeave:ql([Z,At]),onTouchStart:ql([Y,Le]),disabled:!!O,target:C,...q&&{style:q},...j&&{className:j},...O&&A3,...at&&C3,...a&&M3}}const wm={},T3={className:"active"},A3={role:"link","aria-disabled":!0},C3={"data-status":"active","aria-current":"page"},M3={"data-transitioning":"transitioning"},Gl=new WeakMap,N3={rootMargin:"100px"},ql=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Rv=E.forwardRef((e,t)=>{const{_asChild:n,...a}=e,{type:o,ref:l,...u}=O3(a,t),d=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;return n===void 0&&delete u.disabled,E.createElement(n||"a",{...u,ref:l},d)});function I3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class D3 extends Pw{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Sv({...n,from:this.id}),this.useLoaderData=n=>Ev({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=H.forwardRef((n,a)=>b.jsx(Rv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function An(e){return new D3(e)}class L3 extends h3{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Sv({...n,from:this.id}),this.useLoaderData=n=>Ev({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=H.forwardRef((n,a)=>b.jsx(Rv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function P3(e){return new L3(e)}function J_(e){return typeof e=="object"?new eE(e,{silent:!0}).createRoute(e):new eE(e,{silent:!0}).createRoute}class eE{constructor(t,n){this.path=t,this.createRoute=a=>{this.silent;const o=An(a);return o.isRoot=!1,o},this.silent=n?.silent}}class tE{constructor(t){this.useMatch=n=>va({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({from:this.options.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Sv({...n,from:this.options.id}),this.useLoaderData=n=>Ev({...n,from:this.options.id}),this.useNavigate=()=>{const n=tr();return Oc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function nE(e){return typeof e=="object"?new tE(e):t=>new tE({id:e,...t})}function Ln(e,t){let n,a,o,l;const u=()=>(n||(n=e().then(f=>{n=void 0,a=f.default}).catch(f=>{if(o=f,S4(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)throw u();return E.createElement(a,h)};return d.preload=u,d}function k3(){const e=tr(),t=E.useRef({router:e,mounted:!1}),[n,a]=E.useState(!1),{hasPendingMatches:o,isLoading:l}=er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),u=Sm(l),d=l||n||o,f=Sm(d),h=l||o,g=Sm(h);return e.startTransition=p=>{a(!0),E.startTransition(()=>{p(),a(!1)})},E.useEffect(()=>{const p=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return bo(e.latestLocation.publicHref)!==bo(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),nc(()=>{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]),nc(()=>{u&&!l&&e.emit({type:"onLoad",..._o(e.state)})},[u,e,l]),nc(()=>{g&&!h&&e.emit({type:"onBeforeRouteMount",..._o(e.state)})},[h,g,e]),nc(()=>{if(f&&!d){const p=_o(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&G4(e)}},[d,f,e]),null}function j3(e){const t=er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(_v,{getResetKey:()=>t,onCatch:(n,a)=>{if(yr(n))e.onCatch?.(n,a);else throw n},errorComponent:({error:n})=>{if(yr(n))return e.fallback?.(n);throw n},children:e.children})}function U3(){return b.jsx("p",{children:"Not Found"})}function Ms(e){return b.jsx(b.Fragment,{children:e.children})}function zw(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(U3,{})}function B3({children:e}){const t=tr();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function z3(){const e=tr();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Rg)(e.latestLocation),a=n!==Rg(e.latestLocation)?n:void 0,o={storageKey:zd,shouldScrollRestoration:!0};return a&&(o.key=a),b.jsx(B3,{children:`(${Ow.toString()})(${JSON.stringify(o)})`})}const Fw=E.memo(function({matchId:t}){const n=tr(),a=er({select:R=>{const A=R.matches.find(C=>C.id===t);return $a(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),o=n.routesById[a.routeId],l=o.options.pendingComponent??n.options.defaultPendingComponent,u=l?b.jsx(l,{}):null,d=o.options.errorComponent??n.options.defaultErrorComponent,f=o.options.onCatch??n.options.defaultOnCatch,h=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",p=(!o.isRoot||o.options.wrapInSuspense||g)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||g))?E.Suspense:Ms,y=d?_v:Ms,_=h?j3:Ms,S=er({select:R=>R.loadedAt}),w=er({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=o.isRoot?o.options.shellComponent??Ms:Ms;return b.jsxs(T,{children:[b.jsx(Of.Provider,{value:t,children:b.jsx(p,{fallback:u,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||Rf,onCatch:(R,A)=>{if(yr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==a.routeId||!R.routeId&&!o.isRoot)throw R;return E.createElement(h,R)},children:g||a._displayPending?b.jsx(m3,{fallback:u,children:b.jsx(rE,{matchId:t})}):b.jsx(rE,{matchId:t})})})})}),w===fr&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(F3,{}),b.jsx(z3,{})]}):null]})});function F3(){const e=tr(),t=E.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",..._o(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const rE=E.memo(function({matchId:t}){const n=tr(),{match:a,key:o,routeId:l}=er({select:f=>{const h=f.matches.find(S=>S.id===t),g=h.routeId,y=(n.routesById[g].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:g,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:y?JSON.stringify(y):void 0,routeId:g,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],d=E.useMemo(()=>{const f=u.options.component??n.options.defaultComponent;return f?b.jsx(f,{},o):b.jsx(Vw,{})},[o,u.options.component,n.options.defaultComponent]);if(a._displayPending)throw n.getMatch(a.id)?._nonReactive.displayPendingPromise;if(a._forcePending)throw n.getMatch(a.id)?._nonReactive.minPendingPromise;if(a.status==="pending"){const f=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const g=zs();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(a.id)?._nonReactive.loadPromise}if(a.status==="notFound")return $a(yr(a.error)),zw(n,u,a.error);if(a.status==="redirected")throw $a(kr(a.error)),n.getMatch(a.id)?._nonReactive.loadPromise;if(a.status==="error"){if(n.isServer){const f=(u.options.errorComponent??n.options.defaultErrorComponent)||Rf;return b.jsx(f,{error:a.error,reset:void 0,info:{componentStack:""}})}throw a.error}return d}),Vw=E.memo(function(){const t=tr(),n=E.useContext(Of),a=er({select:h=>h.matches.find(g=>g.id===n)?.routeId}),o=t.routesById[a],l=er({select:h=>{const p=h.matches.find(y=>y.id===n);return $a(p),p.globalNotFound}}),u=er({select:h=>{const g=h.matches,p=g.findIndex(y=>y.id===n);return g[p+1]?.id}}),d=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(l)return zw(t,o,void 0);if(!u)return null;const f=b.jsx(Fw,{matchId:u});return a===fr?b.jsx(E.Suspense,{fallback:d,children:f}):f});function V3(){const e=tr(),n=e.routesById[fr].options.pendingComponent??e.options.defaultPendingComponent,a=n?b.jsx(n,{}):null,o=e.isServer||typeof document<"u"&&e.ssr?Ms:E.Suspense,l=b.jsxs(o,{fallback:a,children:[!e.isServer&&b.jsx(k3,{}),b.jsx(H3,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function H3(){const e=tr(),t=er({select:o=>o.matches[0]?.id}),n=er({select:o=>o.loadedAt}),a=t?b.jsx(Fw,{matchId:t}):null;return b.jsx(Of.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:b.jsx(_v,{getResetKey:()=>n,errorComponent:Rf,onCatch:o=>{o.message||o.toString()},children:a})})}const $3=e=>new G3(e);class G3 extends s3{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=J_,globalThis.createLazyFileRoute=nE):typeof window<"u"&&(window.createFileRoute=J_,window.createLazyFileRoute=nE);function q3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const a=Uw(),o=b.jsx(a.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:o}):o}function Y3({router:e,...t}){return b.jsx(q3,{router:e,...t,children:b.jsx(V3,{})})}var K3={},aE={};const Od=Object.create(null),Yl=e=>K3||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Od:globalThis),Pr=new Proxy(Od,{get(e,t){return Yl()[t]??Od[t]},has(e,t){return t in Yl()||t in Od},set(e,t,n){const a=Yl(!0);return a[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Yl(!0);return delete n[t],!0},ownKeys(){const e=Yl(!0);return Object.keys(e)}});function Qt(e,t){return typeof process<"u"&&aE?aE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Kl=1,gn=4,ca=8,pr=24,iE={eterm:gn,cons25:gn,console:gn,cygwin:gn,dtterm:gn,gnome:gn,hurd:gn,jfbterm:gn,konsole:gn,kterm:gn,mlterm:gn,mosh:pr,putty:gn,st:gn,"rxvt-unicode-24bit":pr,terminator:pr,"xterm-kitty":pr},W3=new Map(Object.entries({APPVEYOR:ca,BUILDKITE:ca,CIRCLECI:pr,DRONE:ca,GITEA_ACTIONS:pr,GITHUB_ACTIONS:pr,GITLAB_CI:ca,TRAVIS:ca})),Z3=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Q3(){if(Qt("FORCE_COLOR")!==void 0)switch(Qt("FORCE_COLOR")){case"":case"1":case"true":return gn;case"2":return ca;case"3":return pr;default:return Kl}if(Qt("NODE_DISABLE_COLORS")!==void 0&&Qt("NODE_DISABLE_COLORS")!==""||Qt("NO_COLOR")!==void 0&&Qt("NO_COLOR")!==""||Qt("TERM")==="dumb")return Kl;if(Qt("TMUX"))return pr;if("TF_BUILD"in Pr&&"AGENT_NAME"in Pr)return gn;if("CI"in Pr){for(const{0:e,1:t}of W3)if(e in Pr)return t;return Qt("CI_NAME")==="codeship"?ca:Kl}if("TEAMCITY_VERSION"in Pr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Qt("TEAMCITY_VERSION"))!==null?gn:Kl;switch(Qt("TERM_PROGRAM")){case"iTerm.app":return!Qt("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Qt("TERM_PROGRAM_VERSION"))!==null?ca:pr;case"HyperTerm":case"MacTerm":return pr;case"Apple_Terminal":return ca}if(Qt("COLORTERM")==="truecolor"||Qt("COLORTERM")==="24bit")return pr;if(Qt("TERM")){if(/truecolor/.exec(Qt("TERM"))!==null)return pr;if(/^xterm-256/.exec(Qt("TERM"))!==null)return ca;const e=Qt("TERM").toLowerCase();if(iE[e])return iE[e];if(Z3.some(t=>t.exec(e)!==null))return gn}return Qt("COLORTERM")?gn:Kl}const ua={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},Ag=["debug","info","success","warn","error"];function X3(e,t){return Ag.indexOf(t)>=Ag.indexOf(e)}const J3={info:ua.fg.blue,success:ua.fg.green,warn:ua.fg.yellow,error:ua.fg.red,debug:ua.fg.magenta},e5=(e,t,n)=>{const a=new Date().toISOString();return n?`${ua.dim}${a}${ua.reset} ${J3[e]}${e.toUpperCase()}${ua.reset} ${ua.bright}[Better Auth]:${ua.reset} ${t}`:`${a} ${e.toUpperCase()} [Better Auth]: ${t}`},t5=e=>{const t="error",n=Q3()!==1,a=(o,l,u=[])=>{if(!X3(t,o))return;const d=e5(o,l,n);{o==="error"?console.error(d,...u):o==="warn"?console.warn(d,...u):console.log(d,...u);return}};return{...Object.fromEntries(Ag.map(o=>[o,(...[l,...u])=>a(o,l,u)])),get level(){return t}}};t5();var sc=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function n5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function r5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new sc(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof sc?t:new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function xm(e,t="/api/auth"){if(r5(e),n5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function a5(e,t,n,a,o){if(e)return xm(e,t);{const l=Pr.BETTER_AUTH_URL||Pr.NEXT_PUBLIC_BETTER_AUTH_URL||Pr.PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_AUTH_URL||(Pr.BASE_URL!=="/"?Pr.BASE_URL:void 0);if(l)return xm(l,t)}if(typeof window<"u"&&window.location)return xm(window.location.origin,t)}const i5={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*:/},o5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,oE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},s5=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function l5(e){return e instanceof Date&&!isNaN(e.getTime())}function c5(e){const t=s5.exec(e);if(!t)return null;const[,n,a,o,l,u,d,f,h,g,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(a,10)-1,parseInt(o,10),parseInt(l,10),parseInt(u,10),parseInt(d,10),f?parseInt(f.padEnd(3,"0"),10):0));if(h){const _=(parseInt(g,10)*60+parseInt(p,10))*(h==="+"?-1:1);y.setUTCMinutes(y.getUTCMinutes()+_)}return l5(y)?y:null}function u5(e,t={}){const{strict:n=!1,warnings:a=!1,reviver:o,parseDates:l=!0}=t;if(typeof e!="string")return e;const u=e.trim();if(u.length>0&&u[0]==='"'&&u.endsWith('"')&&!u.slice(1,-1).includes('"'))return u.slice(1,-1);const d=u.toLowerCase();if(d.length<=9&&d in oE)return oE[d];if(!o5.test(u)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(i5).some(([f,h])=>{const g=h.test(u);return g&&a&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${f} pattern`),g})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(u,(h,g)=>{if(h==="__proto__"||h==="constructor"&&g&&typeof g=="object"&&"prototype"in g){a&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof g=="string"){const p=c5(g);if(p)return p}return o?o(h,g):g})}catch(f){if(n)throw f;return e}}function d5(e,t={strict:!0}){return u5(e,t)}let $r=[],Ri=0;const nd=4,go=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(a){return n.lc=t.push(a),()=>{for(let l=Ri+nd;l<$r.length;)$r[l]===a?$r.splice(l,nd):l+=nd;let o=t.indexOf(a);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(a,o){let l=!$r.length;for(let u of t)$r.push(u,n.value,a,o);if(l){for(Ri=0;Ri<$r.length;Ri+=nd)$r[Ri]($r[Ri+1],$r[Ri+2],$r[Ri+3]);$r.length=0}},off(){},set(a){let o=n.value;o!==a&&(n.value=a,n.notify(o))},subscribe(a){let o=n.listen(a);return a(n.value),o},value:e};return n},f5=5,rd=6,ad=10;let h5=(e,t,n,a)=>(e.events=e.events||{},e.events[n+ad]||(e.events[n+ad]=a(o=>{e.events[n].reduceRight((l,u)=>(u(l),l),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],l=o.indexOf(t);o.splice(l,1),o.length||(delete e.events[n],e.events[n+ad](),delete e.events[n+ad])}),p5=1e3,Hw=(e,t)=>h5(e,a=>{let o=t(a);o&&e.events[rd].push(o)},f5,a=>{let o=e.listen;e.listen=(...u)=>(!e.lc&&!e.active&&(e.active=!0,a()),o(...u));let l=e.off;return e.events[rd]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let u of e.events[rd])u();e.events[rd]=[]}},p5)},()=>{e.listen=o,e.off=l}});function m5(e,t,n){let a=new Set(t).add(void 0);return e.listen((o,l,u)=>{a.has(u)&&n(o,l,u)})}var g5=Object.defineProperty,v5=Object.defineProperties,y5=Object.getOwnPropertyDescriptors,sE=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,_5=Object.prototype.propertyIsEnumerable,lE=(e,t,n)=>t in e?g5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yr=(e,t)=>{for(var n in t||(t={}))b5.call(t,n)&&lE(e,n,t[n]);if(sE)for(var n of sE(t))_5.call(t,n)&&lE(e,n,t[n]);return e},la=(e,t)=>v5(e,y5(t)),E5=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},S5=async(e,t)=>{var n,a,o,l,u,d;let f=t||{};const h={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:f,hooks:h};for(const g of t?.plugins||[]){if(g.init){const p=await((n=g.init)==null?void 0:n.call(g,e.toString(),t));f=p.options||f,e=p.url}h.onRequest.push((a=g.hooks)==null?void 0:a.onRequest),h.onResponse.push((o=g.hooks)==null?void 0:o.onResponse),h.onSuccess.push((l=g.hooks)==null?void 0:l.onSuccess),h.onError.push((u=g.hooks)==null?void 0:u.onError),h.onRetry.push((d=g.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},cE=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}},w5=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 x5(e){if(typeof e=="number")return new cE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new cE(e);case"exponential":return new w5(e);default:throw new Error("Invalid retry strategy")}}var R5=async e=>{const t={},n=async a=>typeof a=="function"?await a():a;if(e?.auth){if(e.auth.type==="Bearer"){const a=await n(e.auth.token);if(!a)return t;t.authorization=`Bearer ${a}`}else if(e.auth.type==="Basic"){const a=n(e.auth.username),o=n(e.auth.password);if(!a||!o)return t;t.authorization=`Basic ${btoa(`${a}:${o}`)}`}else if(e.auth.type==="Custom"){const a=n(e.auth.value);if(!a)return t;t.authorization=`${n(e.auth.prefix)} ${a}`}}return t},O5=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function T5(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const a=t.split(";").shift()||"";return O5.test(a)?"json":n.has(a)||a.startsWith("text/")?"text":"blob"}function A5(e){try{return JSON.parse(e),!0}catch{return!1}}function $w(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 uE(e){try{return JSON.parse(e)}catch{return e}}function dE(e){return typeof e=="function"}function C5(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&dE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&dE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function M5(e){const t=new Headers(e?.headers),n=await R5(e);for(const[a,o]of Object.entries(n||{}))t.set(a,o);if(!t.has("content-type")){const a=N5(e?.body);a&&t.set("content-type",a)}return t}function N5(e){return $w(e)?"application/json":null}function I5(e){if(!e?.body)return null;const t=new Headers(e?.headers);if($w(e.body)&&!t.has("content-type")){for(const[n,a]of Object.entries(e?.body))a instanceof Date&&(e.body[n]=a.toISOString());return JSON.stringify(e.body)}return e.body}function D5(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const a=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return qw.includes(a)?a.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function L5(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var P5=class Gw extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,Gw.prototype)}};async function Td(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new P5(n.issues);return n.value}var qw=["get","post","put","patch","delete"],k5=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var a,o,l,u;const d=((o=(a=e.plugins)==null?void 0:a.find(f=>{var h;return(h=f.schema)!=null&&h.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))==null?void 0:o.schema)||e.schema;if(d){let f=t;(l=d.config)!=null&&l.prefix&&f.startsWith(d.config.prefix)&&(f=f.replace(d.config.prefix,""),d.config.baseURL&&(t=t.replace(d.config.prefix,d.config.baseURL))),(u=d.config)!=null&&u.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let g=la(Yr({},n),{method:h.method,output:h.output});return n?.disableValidation||(g=la(Yr({},g),{body:h.input?await Td(h.input,n?.body):n?.body,params:h.params?await Td(h.params,n?.params):n?.params,query:h.query?await Td(h.query,n?.query):n?.query})),{url:t,options:g}}}return{url:t,options:n}}}),j5=e=>{async function t(n,a){const o=la(Yr(Yr({},e),a),{plugins:[...e?.plugins||[],k5(e||{})]});if(e?.catchAllError)try{return await Cg(n,o)}catch(l){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:l}}}return await Cg(n,o)}return t};function U5(e,t){let{baseURL:n,params:a,query:o}=t||{query:{},params:{},baseURL:""},l=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];qw.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[u,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(o||{}))y!=null&&f.set(p,String(y));if(a)if(Array.isArray(a)){const p=u.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=a[y];u=u.replace(_,S)}}else for(const[p,y]of Object.entries(a))u=u.replace(`:${p}`,String(y));u=u.split("/").map(encodeURIComponent).join("/"),u.startsWith("/")&&(u=u.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${u}${h}`,l):`${l}${u}${h}`}var Cg=async(e,t)=>{var n,a,o,l,u,d,f,h;const{hooks:g,url:p,options:y}=await S5(e,t),_=C5(y),S=new AbortController,w=(n=y.signal)!=null?n:S.signal,T=U5(p,y),R=I5(y),A=await M5(y),C=D5(p,y);let O=la(Yr({},y),{url:T,headers:A,body:R,method:C,signal:w});for(const z of g.onRequest)if(z){const ie=await z(O);ie instanceof Object&&(O=ie)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((a=t?.body)==null?void 0:a.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:N}=L5(y,S);let L=await _(O.url,O);N();const I={response:L,request:O};for(const z of g.onResponse)if(z){const ie=await z(la(Yr({},I),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?L.clone():L}));ie instanceof Response?L=ie:ie instanceof Object&&(L=ie.response)}if(L.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const ie=T5(L),ee={data:"",response:L,request:O};if(ie==="json"||ie==="text"){const k=await L.text(),G=await((l=O.jsonParser)!=null?l:uE)(k);ee.data=G}else ee.data=await L[ie]();O?.output&&O.output&&!O.disableValidation&&(ee.data=await Td(O.output,ee.data));for(const k of g.onSuccess)k&&await k(la(Yr({},ee),{response:(u=t?.hookOptions)!=null&&u.cloneResponse?L.clone():L}));return t?.throw?ee.data:{data:ee.data,error:null}}const D=(d=t?.jsonParser)!=null?d:uE,B=await L.text(),Z=A5(B),Y=Z?await D(B):null,V={response:L,responseText:B,request:O,error:la(Yr({},Y),{status:L.status,statusText:L.statusText})};for(const z of g.onError)z&&await z(la(Yr({},V),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const z=x5(t.retry),ie=(h=t.retryAttempt)!=null?h:0;if(await z.shouldAttemptRetry(ie,L)){for(const k of g.onRetry)k&&await k(I);const ee=z.getDelay(ie);return await new Promise(k=>setTimeout(k,ee)),await Cg(e,la(Yr({},t),{retryAttempt:ie+1}))}}if(t?.throw)throw new E5(L.status,L.statusText,Z?Y:B);return{data:null,error:la(Yr({},Y),{status:L.status,statusText:L.statusText})}};const Rm=Symbol.for("better-auth:broadcast-channel"),B5=()=>Math.floor(Date.now()/1e3);var z5=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:B5()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(a=>a(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Om(e="better-auth.message"){return globalThis[Rm]||(globalThis[Rm]=new z5(e)),globalThis[Rm]}const Tm=Symbol.for("better-auth:focus-manager");var F5=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 fE(){return globalThis[Tm]||(globalThis[Tm]=new F5),globalThis[Tm]}const Am=Symbol.for("better-auth:online-manager");var V5=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 Cm(){return globalThis[Am]||(globalThis[Am]=new V5),globalThis[Am]}const H5=()=>typeof window>"u",Ls=(e,t,n,a)=>{const o=go({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof a=="function"?a({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):a;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(g){o.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onSuccess?.(g)},async onError(g){const{request:p}=g,y=typeof p.retry=="number"?p.retry:p.retry?.attempts,_=p.retryAttempt||0;y&&_<y||(o.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onError?.(g))},async onRequest(g){const p=o.get();o.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await h?.onRequest?.(g)}}).catch(g=>{o.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let u=!1;for(const d of e)d.subscribe(async()=>{H5()||(u?await l():Hw(o,()=>{const f=setTimeout(async()=>{u||(await l(),u=!0)},0);return()=>{o.off(),d.off(),clearTimeout(f)}}))});return o},Es=()=>Math.floor(Date.now()/1e3),$5=5;function G5(e){const{sessionAtom:t,sessionSignal:n,$fetch:a,options:o={}}=e,l=o.sessionOptions?.refetchInterval??0,u=o.sessionOptions?.refetchOnWindowFocus??!0,d=o.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Cm().isOnline,g=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=Es(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=Es(),a("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=Es(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&Es()-f.lastSessionRequest<$5&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=Es()),f.lastSync=Es(),n.set(!n.get()))},p=A=>{Om().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=Om().subscribe(()=>{g({event:"storage"})})},S=()=>{u&&(f.unsubscribeFocus=fE().subscribe(()=>{g({event:"visibilitychange"})}))},w=()=>{f.unsubscribeOnline=Cm().subscribe(A=>{A&&g({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),w(),Om().setup(),fE().setup(),Cm().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 q5={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 Y5(e,t){const n=go(!1),a=Ls(n,"/get-session",e,{method:"GET"});return Hw(a,()=>{const o=G5({sessionAtom:a,sessionSignal:n,$fetch:e,options:t});return o.init(),()=>{o.cleanup()}}),{session:a,$sessionSignal:n}}const K5=(e,t)=>{const n="credentials"in Request.prototype,a=a5(e?.baseURL,e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],l={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:u,onError:d,onRequest:f,onResponse:h,...g}=e?.fetchOptions||{},p=j5({baseURL:a,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?d5(O,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[l,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[q5],...o]}),{$sessionSignal:y,session:_}=Y5(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,N)=>{T[O].subscribe(N)},atoms:T};for(const O of S)O.getActions&&Object.assign(w,O.getActions?.(p,C,e));return{get baseURL(){return a},pluginsActions:w,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function W5(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Z5(e,t,n){const a=t[e],{fetchOptions:o,query:l,...u}=n||{};return a||(o?.method?o.method:u&&Object.keys(u).length>0?"POST":"GET")}function Q5(e,t,n,a,o){function l(u=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...u,f];let g=e;for(const p of h)if(g&&typeof g=="object"&&p in g)g=g[p];else{g=void 0;break}return typeof g=="function"||W5(g)?g:l(h)},apply:async(d,f,h)=>{const g="/"+u.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...w}=p,T={...y,...S},R=Z5(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),!o||T.disableSignal)return;const C=o.filter(O=>O.matcher(g));if(C.length)for(const O of C){const N=a[O.signal];if(!N)return;const L=N.get();setTimeout(()=>{N.set(!L)},10)}}})}})}return l()}function X5(e,t={}){let n=E.useRef(e.get());const{keys:a,deps:o=[e,a]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),a?.length?m5(e,a,f):e.listen(f)},o),u=()=>n.current;return E.useSyncExternalStore(l,u,u)}function J5(e){return`use${eM(e)}`}function eM(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Yw(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:a,$fetch:o,$store:l,atomListeners:u}=K5(e);let d={};for(const[f,h]of Object.entries(a))d[J5(f)]=()=>X5(h);return Q5({...n,...d,$fetch:o,$store:l},o,t,a,u)}function tM(e){return{authorize(t,n="AND"){let a=!1;for(const[o,l]of Object.entries(t)){const u=e[o];if(!u)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(l))a=l.every(d=>u.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?a=d.actions.some(f=>u.includes(f)):a=d.actions.every(f=>u.includes(f))}else throw new sc("Invalid access control request");if(a&&n==="OR")return{success:a};if(!a&&n==="AND")return{success:!1,error:`unauthorized to access resource "${o}"`}}return a?{success:a}:{success:!1,error:"Not authorized"}},statements:e}}function Kw(e){return{newRole(t){return tM(t)},statements:e}}const nM={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},Ww=Kw(nM),Zw=Ww.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),Qw=Ww.newRole({user:[],session:[]}),rM={admin:Zw,user:Qw},aM=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||rM;for(const a of t)if(n[a]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},iM={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Ov=Kw(iM),Xw=Ov.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),Jw=Ov.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ex=Ov.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),oM={admin:Xw,owner:Jw,member:ex},sM=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),a=e.options.creatorRole||"owner",o=n.includes(a),l=e.allowCreatorAllPermissions||!1;if(o&&l)return!0;for(const u of n)if(t[u]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},lM=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}}}]}),cM=e=>{const t={admin:Zw,user:Qw,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>aM({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},uM=()=>({id:"anonymous",$InferServerPlugin:{},pathMethods:{"/sign-in/anonymous":"POST"},atomListeners:[{matcher:e=>e==="/sign-in/anonymous",signal:"$sessionSignal"}]}),dM=()=>({id:"api-key",$InferServerPlugin:{},pathMethods:{"/api-key/create":"POST","/api-key/delete":"POST","/api-key/delete-all-expired-api-keys":"POST"}}),fM=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),hM=()=>({id:"generic-oauth-client",$InferServerPlugin:{}}),tx=()=>({id:"magic-link",$InferServerPlugin:{}}),pM=()=>({id:"multi-session",$InferServerPlugin:{},atomListeners:[{matcher(e){return e==="/multi-session/set-active"},signal:"$sessionSignal"}]});let co=null;function hE(){return typeof window<"u"&&"IdentityCredential"in window}const mM=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||!hE()||navigator.credentials.preventSilentAccess())}}}],getActions:(t,n)=>({oneTap:async(a,o)=>{if(co&&!co.signal.aborted){console.warn("A Google One Tap request is already in progress. Please wait.");return}if(typeof window>"u"||!window.document){console.warn("Google One Tap is only available in browser environments");return}async function l(p){await t("/one-tap/callback",{method:"POST",body:{idToken:p},...a?.fetchOptions,...o}),(!a?.fetchOptions&&!o||a?.callbackURL)&&(window.location.href=a?.callbackURL??"/")}const{autoSelect:u,cancelOnTapOutside:d,context:f}=a??{},h=f??e.context??"signin",g={fedCM:async()=>{try{const p=await navigator.credentials.get({identity:{context:h,providers:[{configURL:"https://accounts.google.com/gsi/fedcm.json",clientId:e.clientId,nonce:a?.nonce}]},mediation:u?"optional":"required",signal:co?.signal});if(!p?.token){a?.onPromptNotification?.(void 0);return}try{await l(p.token);return}catch(y){throw console.error("Error during FedCM callback:",y),y}}catch(p){if(p?.code&&(p.code===19||p.code===20)){a?.onPromptNotification?.(void 0);return}throw p}},oneTap:()=>new Promise((p,y)=>{let _=!1;const S=e.promptOptions?.baseDelay??1e3,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:u,cancel_on_tap_outside:d,context:h,ux_mode:a?.uxMode||"popup",nonce:a?.nonce,itp_support:!0,...e.additionalOptions});const T=R=>{_||window.google?.accounts.id.prompt(A=>{if(!_){if(A.isDismissedMoment&&A.isDismissedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A);else if(A.isSkippedMoment&&A.isSkippedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A)}})};T(0)})};co&&co?.abort(),co=new AbortController;try{const p=e.promptOptions?.fedCM===!1||!hE()?"oneTap":"fedCM";p==="oneTap"&&await gM(),await g[p]()}catch(p){throw console.error("Error during Google One Tap flow:",p),p}finally{co=null}}}),getAtoms(t){return{}}}),gM=()=>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)}),vM=e=>sM(e,e.options.roles||oM),nx=e=>{const t=go(!1),n=go(!1),a=go(!1),o=go(!1),l={admin:Xw,member:ex,owner:Jw,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(u,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>vM({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:u=>{const d=Ls(t,"/organization/list",u,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:a,$activeMemberRoleSignal:o,activeOrganization:Ls([n],"/organization/get-full-organization",u,()=>({method:"GET"})),listOrganizations:d,activeMember:Ls([a],"/organization/get-active-member",u,{method:"GET"}),activeMemberRole:Ls([o],"/organization/get-active-member-role",u,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(u){return u==="/organization/create"||u==="/organization/delete"||u==="/organization/update"},signal:"$listOrg"},{matcher(u){return u.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(u){return u.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},yM=()=>({id:"username",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/sign-in/username",signal:"$sessionSignal"}]}),bM=e=>({id:"sso-client",$InferServerPlugin:{}}),_M=Yw({plugins:[nx({}),cM(),bM(),tx()]});function rx(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=rx(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function ax(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rx(e))&&(a&&(a+=" "),a+=t);return a}const EM=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},SM=(e,t)=>({classGroupId:e,validator:t}),ix=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hd="-",pE=[],wM="arbitrary..",xM=e=>{const t=OM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return RM(u);const d=u.split(Hd),f=d[0]===""&&d.length>1?1:0;return ox(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=a[u],h=n[u];return f?h?EM(h,f):f:h||pE}return n[u]||pE}}},ox=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const h=ox(e,t+1,l);if(h)return h}const u=n.validators;if(u===null)return;const d=t===0?e.join(Hd):e.slice(t).join(Hd),f=u.length;for(let h=0;h<f;h++){const g=u[h];if(g.validator(d))return g.classGroupId}},RM=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?wM+a:void 0})(),OM=e=>{const{theme:t,classGroups:n}=e;return TM(n,t)},TM=(e,t)=>{const n=ix();for(const a in e){const o=e[a];Tv(o,n,a,t)}return n},Tv=(e,t,n,a)=>{const o=e.length;for(let l=0;l<o;l++){const u=e[l];AM(u,t,n,a)}},AM=(e,t,n,a)=>{if(typeof e=="string"){CM(e,t,n);return}if(typeof e=="function"){MM(e,t,n,a);return}NM(e,t,n,a)},CM=(e,t,n)=>{const a=e===""?t:sx(t,e);a.classGroupId=n},MM=(e,t,n,a)=>{if(IM(e)){Tv(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(SM(n,e))},NM=(e,t,n,a)=>{const o=Object.entries(e),l=o.length;for(let u=0;u<l;u++){const[d,f]=o[u];Tv(f,sx(t,d),n,a)}},sx=(e,t)=>{let n=e;const a=t.split(Hd),o=a.length;for(let l=0;l<o;l++){const u=a[l];let d=n.nextPart.get(u);d||(d=ix(),n.nextPart.set(u,d)),n=d}return n},IM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,DM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(l,u)=>{n[l]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Mg="!",mE=":",LM=[],gE=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),PM=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const l=[];let u=0,d=0,f=0,h;const g=o.length;for(let w=0;w<g;w++){const T=o[w];if(u===0&&d===0){if(T===mE){l.push(o.slice(f,w)),f=w+1;continue}if(T==="/"){h=w;continue}}T==="["?u++:T==="]"?u--:T==="("?d++:T===")"&&d--}const p=l.length===0?o:o.slice(f);let y=p,_=!1;p.endsWith(Mg)?(y=p.slice(0,-1),_=!0):p.startsWith(Mg)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return gE(l,_,y,S)};if(t){const o=t+mE,l=a;a=u=>u.startsWith(o)?l(u.slice(o.length)):gE(LM,!1,u,void 0,!0)}if(n){const o=a;a=l=>n({className:l,parseClassName:o})}return a},kM=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",f=t.has(u);d||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},jM=e=>({cache:DM(e.cacheSize),parseClassName:PM(e),sortModifiers:kM(e),...xM(e)}),UM=/\s+/,BM=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:l}=t,u=[],d=e.trim().split(UM);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=a(T?S.substring(0,w):S);if(!R){if(!T){f=g+(f.length>0?" "+f:f);continue}if(R=a(S),!R){f=g+(f.length>0?" "+f:f);continue}T=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),C=_?A+Mg:A,O=C+R;if(u.indexOf(O)>-1)continue;u.push(O);const N=o(R,T);for(let L=0;L<N.length;++L){const I=N[L];u.push(C+I)}f=g+(f.length>0?" "+f:f)}return f},zM=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=lx(n))&&(o&&(o+=" "),o+=a);return o},lx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=lx(e[a]))&&(n&&(n+=" "),n+=t);return n},FM=(e,...t)=>{let n,a,o,l;const u=f=>{const h=t.reduce((g,p)=>p(g),e());return n=jM(h),a=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const h=a(f);if(h)return h;const g=BM(f,n);return o(f,g),g};return l=u,(...f)=>l(zM(...f))},VM=[],ln=e=>{const t=n=>n[e]||VM;return t.isThemeGetter=!0,t},cx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ux=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HM=/^\d+\/\d+$/,$M=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GM=/\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$/,qM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ss=e=>HM.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Oi=e=>!!e&&Number.isInteger(Number(e)),Mm=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),za=e=>$M.test(e),WM=()=>!0,ZM=e=>GM.test(e)&&!qM.test(e),dx=()=>!1,QM=e=>YM.test(e),XM=e=>KM.test(e),JM=e=>!Ae(e)&&!Ce(e),e6=e=>qs(e,px,dx),Ae=e=>cx.test(e),uo=e=>qs(e,mx,ZM),Nm=e=>qs(e,i6,Qe),vE=e=>qs(e,fx,dx),t6=e=>qs(e,hx,XM),id=e=>qs(e,gx,QM),Ce=e=>ux.test(e),Wl=e=>Ys(e,mx),n6=e=>Ys(e,o6),yE=e=>Ys(e,fx),r6=e=>Ys(e,px),a6=e=>Ys(e,hx),od=e=>Ys(e,gx,!0),qs=(e,t,n)=>{const a=cx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ys=(e,t,n=!1)=>{const a=ux.exec(e);return a?a[1]?t(a[1]):n:!1},fx=e=>e==="position"||e==="percentage",hx=e=>e==="image"||e==="url",px=e=>e==="length"||e==="size"||e==="bg-size",mx=e=>e==="length",i6=e=>e==="number",o6=e=>e==="family-name",gx=e=>e==="shadow",s6=()=>{const e=ln("color"),t=ln("font"),n=ln("text"),a=ln("font-weight"),o=ln("tracking"),l=ln("leading"),u=ln("breakpoint"),d=ln("container"),f=ln("spacing"),h=ln("radius"),g=ln("shadow"),p=ln("inset-shadow"),y=ln("text-shadow"),_=ln("drop-shadow"),S=ln("blur"),w=ln("perspective"),T=ln("aspect"),R=ln("ease"),A=ln("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"],N=()=>[...O(),Ce,Ae],L=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],D=()=>[Ce,Ae,f],B=()=>[Ss,"full","auto",...D()],Z=()=>[Oi,"none","subgrid",Ce,Ae],Y=()=>["auto",{span:["full",Oi,Ce,Ae]},Oi,Ce,Ae],V=()=>[Oi,"auto",Ce,Ae],z=()=>["auto","min","max","fr",Ce,Ae],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...D()],F=()=>[Ss,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],G=()=>[e,Ce,Ae],ae=()=>[...O(),yE,vE,{position:[Ce,Ae]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",r6,e6,{size:[Ce,Ae]}],Q=()=>[Mm,Wl,uo],te=()=>["","none","full",h,Ce,Ae],se=()=>["",Qe,Wl,uo],ge=()=>["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"],ye=()=>[Qe,Mm,yE,vE],Se=()=>["","none",S,Ce,Ae],le=()=>["none",Qe,Ce,Ae],je=()=>["none",Qe,Ce,Ae],at=()=>[Qe,Ce,Ae],Je=()=>[Ss,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[za],breakpoint:[za],color:[WM],container:[za],"drop-shadow":[za],ease:["in","out","in-out"],font:[JM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[za],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[za],shadow:[za],spacing:["px",Qe],text:[za],"text-shadow":[za],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ss,Ae,Ce,T]}],container:["container"],columns:[{columns:[Qe,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:N()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Oi,"auto",Ce,Ae]}],basis:[{basis:[Ss,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,Ss,"auto","initial","none",Ae]}],grow:[{grow:["",Qe,Ce,Ae]}],shrink:[{shrink:["",Qe,Ce,Ae]}],order:[{order:[Oi,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[d,"screen",...F()]}],"min-w":[{"min-w":[d,"screen","none",...F()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Wl,uo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Ce,Nm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mm,Ae]}],"font-family":[{font:[n6,Ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ce,Ae]}],"line-clamp":[{"line-clamp":[Qe,"none",Ce,Nm]}],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:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",Ce,uo]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Qe,"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:ae()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oi,Ce,Ae],radial:["",Ce,Ae],conic:[Oi,Ce,Ae]},a6,t6]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"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:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,Ce,Ae]}],"outline-w":[{outline:["",Qe,Wl,uo]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",g,od,id]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,od,id]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Qe,uo]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",y,od,id]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Qe,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":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ae]}],filter:[{filter:["","none",Ce,Ae]}],blur:[{blur:Se()}],brightness:[{brightness:[Qe,Ce,Ae]}],contrast:[{contrast:[Qe,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",_,od,id]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Qe,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[Qe,Ce,Ae]}],invert:[{invert:["",Qe,Ce,Ae]}],saturate:[{saturate:[Qe,Ce,Ae]}],sepia:[{sepia:["",Qe,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",Qe,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,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:[Qe,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",R,Ce,Ae]}],delay:[{delay:[Qe,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ce,Ae]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:at()}],"skew-x":[{"skew-x":at()}],"skew-y":[{"skew-y":at()}],transform:[{transform:[Ce,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",...G()]}],"stroke-w":[{stroke:[Qe,Wl,uo,Nm]}],stroke:[{stroke:["none",...G()]}],"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"]}},l6=FM(s6);var dt;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},e.getValidEnumValues=o=>{const l=e.objectKeys(o).filter(d=>typeof o[o[d]]!="number"),u={};for(const d of l)u[d]=o[d];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(l){return o[l]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},e.find=(o,l)=>{for(const u of o)if(l(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}e.joinValues=a,e.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(dt||(dt={}));var bE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(bE||(bE={}));const Oe=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mi=e=>{switch(typeof e){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(e)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(e)?Oe.array:e===null?Oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Oe.promise:typeof Map<"u"&&e instanceof Map?Oe.map:typeof Set<"u"&&e instanceof Set?Oe.set:typeof Date<"u"&&e instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},Ee=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ga extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(this),a}static assert(t){if(!(t instanceof Ga))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Ga.create=e=>new Ga(e);const Ng=(e,t)=>{let n;switch(e.code){case Ee.invalid_type:e.received===Oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:n="Invalid input";break;case Ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:n="Invalid function arguments";break;case Ee.invalid_return_type:n="Invalid function return type";break;case Ee.invalid_date:n="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ee.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ee.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ee.custom:n="Invalid input";break;case Ee.invalid_intersection_types:n="Intersection results could not be merged";break;case Ee.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let c6=Ng;function u6(){return c6}const d6=e=>{const{data:t,path:n,errorMaps:a,issueData:o}=e,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let d="";const f=a.filter(h=>!!h).slice().reverse();for(const h of f)d=h(u,{data:t,defaultError:d}).message;return{...o,path:l,message:d}};function xe(e,t){const n=u6(),a=d6({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ng?void 0:Ng].filter(o=>!!o)});e.common.issues.push(a)}class Bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const o of n){if(o.status==="aborted")return Be;o.status==="dirty"&&t.dirty(),a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const o of n){const l=await o.key,u=await o.value;a.push({key:l,value:u})}return Bn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return Be;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(a[l.value]=u.value)}return{status:t.value,value:a}}}const Be=Object.freeze({status:"aborted"}),rc=e=>({status:"dirty",value:e}),Ur=e=>({status:"valid",value:e}),_E=e=>e.status==="aborted",EE=e=>e.status==="dirty",Vs=e=>e.status==="valid",$d=e=>typeof Promise<"u"&&e instanceof Promise;var De;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(De||(De={}));class ya{constructor(t,n,a,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const SE=(e,t)=>{if(Vs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ga(e.common.issues);return this._error=n,this._error}}};function qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:o}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,d)=>{const{message:f}=e;return u.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:f??a??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:f??n??d.defaultError}},description:o}}class lt{get description(){return this._def.description}_getType(t){return Mi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Bn,ctx:{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if($d(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parseSync({data:t,path:a.path,parent:a});return SE(a,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Vs(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>Vs(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parse({data:t,path:a.path,parent:a}),l=await($d(o)?o:Promise.resolve(o));return SE(a,l)}refine(t,n){const a=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=t(o),d=()=>l.addIssue({code:Ee.custom,...a(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(f=>f?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(t,n){return this._refinement((a,o)=>t(a)?!0:(o.addIssue(typeof n=="function"?n(a,o):n),!1))}_refinement(t){return new Fi({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ha.create(this,this._def)}nullable(){return Ao.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ma.create(this)}promise(){return Jd.create(this,this._def)}or(t){return Kd.create([this,t],this._def)}and(t){return Wd.create(this,t,this._def)}transform(t){return new Fi({...qe(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ef({...qe(this._def),innerType:this,defaultValue:n,typeName:ze.ZodDefault})}brand(){return new _x({typeName:ze.ZodBranded,type:this,...qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new tf({...qe(this._def),innerType:this,catchValue:n,typeName:ze.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cv.create(this,t)}readonly(){return nf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const f6=/^c[^\s-]{8,}$/i,h6=/^[0-9a-z]+$/,p6=/^[0-9A-HJKMNP-TV-Z]{26}$/i,m6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,g6=/^[a-z0-9_-]{21}$/i,v6=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,y6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,b6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Im;const E6=/^(?:(?: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])$/,S6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,w6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,x6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,O6=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vx="((\\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])))",T6=new RegExp(`^${vx}$`);function yx(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function A6(e){return new RegExp(`^${yx(e)}$`)}function C6(e){let t=`${vx}T${yx(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function M6(e,t){return!!((t==="v4"||!t)&&E6.test(e)||(t==="v6"||!t)&&w6.test(e))}function N6(e,t){if(!v6.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function I6(e,t){return!!((t==="v4"||!t)&&S6.test(e)||(t==="v6"||!t)&&x6.test(e))}class ha extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Oe.string){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.string,received:l.parsedType}),Be}const a=new Bn;let o;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="max")t.data.length>l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,d=t.data.length<l.value;(u||d)&&(o=this._getOrReturnCtx(t,o),u?xe(o,{code:Ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&xe(o,{code:Ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),a.dirty())}else if(l.kind==="email")b6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="emoji")Im||(Im=new RegExp(_6,"u")),Im.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="uuid")m6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="nanoid")g6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid")f6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid2")h6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="ulid")p6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:Ee.invalid_string,message:l.message}),a.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"regex",code:Ee.invalid_string,message:l.message}),a.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()):l.kind==="datetime"?C6(l).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"datetime",message:l.message}),a.dirty()):l.kind==="date"?T6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"date",message:l.message}),a.dirty()):l.kind==="time"?A6(l).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"time",message:l.message}),a.dirty()):l.kind==="duration"?y6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="ip"?M6(t.data,l.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="jwt"?N6(t.data,l.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="cidr"?I6(t.data,l.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="base64"?R6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="base64url"?O6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:Ee.invalid_string,message:l.message}),a.dirty()):dt.assertNever(l);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(o=>t.test(o),{validation:n,code:Ee.invalid_string,...De.errToObj(a)})}_addCheck(t){return new ha({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...De.errToObj(t)})}url(t){return this._addCheck({kind:"url",...De.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...De.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...De.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...De.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...De.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...De.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...De.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...De.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...De.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...De.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...De.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...De.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...De.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...De.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...De.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...De.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...De.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...De.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...De.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...De.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...De.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...De.errToObj(n)})}nonempty(t){return this.min(1,De.errToObj(t))}trim(){return new ha({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ha.create=e=>new ha({checks:[],typeName:ze.ZodString,coerce:e?.coerce??!1,...qe(e)});function D6(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}class xo extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Oe.number){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.number,received:l.parsedType}),Be}let a;const o=new Bn;for(const l of this._def.checks)l.kind==="int"?dt.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?D6(t.data,l.value)!==0&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_finite,message:l.message}),o.dirty()):dt.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,a,o){return new xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:De.toString(o)}]})}_addCheck(t){return new xo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:De.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:De.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:De.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:De.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}xo.create=e=>new xo({checks:[],typeName:ze.ZodNumber,coerce:e?.coerce||!1,...qe(e)});class Ro extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Oe.bigint)return this._getInvalidInput(t);let a;const o=new Bn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):dt.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:Ee.invalid_type,expected:Oe.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,a,o){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:De.toString(o)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ro.create=e=>new Ro({checks:[],typeName:ze.ZodBigInt,coerce:e?.coerce??!1,...qe(e)});class Gd extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Oe.boolean){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.boolean,received:a.parsedType}),Be}return Ur(t.data)}}Gd.create=e=>new Gd({typeName:ze.ZodBoolean,coerce:e?.coerce||!1,...qe(e)});class Hs extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Oe.date){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.date,received:l.parsedType}),Be}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_date}),Be}const a=new Bn;let o;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()):dt.assertNever(l);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Hs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:De.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:De.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Hs.create=e=>new Hs({checks:[],coerce:e?.coerce||!1,typeName:ze.ZodDate,...qe(e)});class wE extends lt{_parse(t){if(this._getType(t)!==Oe.symbol){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.symbol,received:a.parsedType}),Be}return Ur(t.data)}}wE.create=e=>new wE({typeName:ze.ZodSymbol,...qe(e)});class qd extends lt{_parse(t){if(this._getType(t)!==Oe.undefined){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.undefined,received:a.parsedType}),Be}return Ur(t.data)}}qd.create=e=>new qd({typeName:ze.ZodUndefined,...qe(e)});class Yd extends lt{_parse(t){if(this._getType(t)!==Oe.null){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.null,received:a.parsedType}),Be}return Ur(t.data)}}Yd.create=e=>new Yd({typeName:ze.ZodNull,...qe(e)});class mc extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return Ur(t.data)}}mc.create=e=>new mc({typeName:ze.ZodAny,...qe(e)});class Ig extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ur(t.data)}}Ig.create=e=>new Ig({typeName:ze.ZodUnknown,...qe(e)});class zi extends lt{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:Ee.invalid_type,expected:Oe.never,received:n.parsedType}),Be}}zi.create=e=>new zi({typeName:ze.ZodNever,...qe(e)});class xE extends lt{_parse(t){if(this._getType(t)!==Oe.undefined){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.void,received:a.parsedType}),Be}return Ur(t.data)}}xE.create=e=>new xE({typeName:ze.ZodVoid,...qe(e)});class ma extends lt{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),o=this._def;if(n.parsedType!==Oe.array)return xe(n,{code:Ee.invalid_type,expected:Oe.array,received:n.parsedType}),Be;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,d=n.data.length<o.exactLength.value;(u||d)&&(xe(n,{code:u?Ee.too_big:Ee.too_small,minimum:d?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(xe(n,{code:Ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(xe(n,{code:Ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,d)=>o.type._parseAsync(new ya(n,u,n.path,d)))).then(u=>Bn.mergeArray(a,u));const l=[...n.data].map((u,d)=>o.type._parseSync(new ya(n,u,n.path,d)));return Bn.mergeArray(a,l)}get element(){return this._def.type}min(t,n){return new ma({...this._def,minLength:{value:t,message:De.toString(n)}})}max(t,n){return new ma({...this._def,maxLength:{value:t,message:De.toString(n)}})}length(t,n){return new ma({...this._def,exactLength:{value:t,message:De.toString(n)}})}nonempty(t){return this.min(1,t)}}ma.create=(e,t)=>new ma({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...qe(t)});function Ns(e){if(e instanceof en){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=Ha.create(Ns(a))}return new en({...e._def,shape:()=>t})}else return e instanceof ma?new ma({...e._def,type:Ns(e.element)}):e instanceof Ha?Ha.create(Ns(e.unwrap())):e instanceof Ao?Ao.create(Ns(e.unwrap())):e instanceof Oo?Oo.create(e.items.map(t=>Ns(t))):e}class en extends lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Oe.object){const h=this._getOrReturnCtx(t);return xe(h,{code:Ee.invalid_type,expected:Oe.object,received:h.parsedType}),Be}const{status:a,ctx:o}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof zi&&this._def.unknownKeys==="strip"))for(const h in o.data)u.includes(h)||d.push(h);const f=[];for(const h of u){const g=l[h],p=o.data[h];f.push({key:{status:"valid",value:h},value:g._parse(new ya(o,p,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof zi){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of d)f.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(h==="strict")d.length>0&&(xe(o,{code:Ee.unrecognized_keys,keys:d}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of d){const p=o.data[g];f.push({key:{status:"valid",value:g},value:h._parse(new ya(o,p,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of f){const p=await g.key,y=await g.value;h.push({key:p,value:y,alwaysSet:g.alwaysSet})}return h}).then(h=>Bn.mergeObjectSync(a,h)):Bn.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(t){return De.errToObj,new en({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const o=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:De.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new en({...this._def,unknownKeys:"strip"})}passthrough(){return new en({...this._def,unknownKeys:"passthrough"})}extend(t){return new en({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new en({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new en({...this._def,catchall:t})}pick(t){const n={};for(const a of dt.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new en({...this._def,shape:()=>n})}omit(t){const n={};for(const a of dt.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new en({...this._def,shape:()=>n})}deepPartial(){return Ns(this)}partial(t){const n={};for(const a of dt.objectKeys(this.shape)){const o=this.shape[a];t&&!t[a]?n[a]=o:n[a]=o.optional()}return new en({...this._def,shape:()=>n})}required(t){const n={};for(const a of dt.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let l=this.shape[a];for(;l instanceof Ha;)l=l._def.innerType;n[a]=l}return new en({...this._def,shape:()=>n})}keyof(){return bx(dt.objectKeys(this.shape))}}en.create=(e,t)=>new en({shape:()=>e,unknownKeys:"strip",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});en.strictCreate=(e,t)=>new en({shape:()=>e,unknownKeys:"strict",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});en.lazycreate=(e,t)=>new en({shape:e,unknownKeys:"strip",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});class Kd extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function o(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new Ga(d.ctx.common.issues));return xe(n,{code:Ee.invalid_union,unionErrors:u}),Be}if(n.common.async)return Promise.all(a.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const f of a){const h={...n,common:{...n.common,issues:[]},parent:null},g=f._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(f=>new Ga(f));return xe(n,{code:Ee.invalid_union,unionErrors:d}),Be}}get options(){return this._def.options}}Kd.create=(e,t)=>new Kd({options:e,typeName:ze.ZodUnion,...qe(t)});const Va=e=>e instanceof Qd?Va(e.schema):e instanceof Fi?Va(e.innerType()):e instanceof Xd?[e.value]:e instanceof To?e.options:e instanceof Lg?dt.objectValues(e.enum):e instanceof ef?Va(e._def.innerType):e instanceof qd?[void 0]:e instanceof Yd?[null]:e instanceof Ha?[void 0,...Va(e.unwrap())]:e instanceof Ao?[null,...Va(e.unwrap())]:e instanceof _x||e instanceof nf?Va(e.unwrap()):e instanceof tf?Va(e._def.innerType):[];class Av extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.object)return xe(n,{code:Ee.invalid_type,expected:Oe.object,received:n.parsedType}),Be;const a=this.discriminator,o=n.data[a],l=this.optionsMap.get(o);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:Ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const o=new Map;for(const l of n){const u=Va(l.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const d of u){if(o.has(d))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(d)}`);o.set(d,l)}}return new Av({typeName:ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...qe(a)})}}function Dg(e,t){const n=Mi(e),a=Mi(t);if(e===t)return{valid:!0,data:e};if(n===Oe.object&&a===Oe.object){const o=dt.objectKeys(t),l=dt.objectKeys(e).filter(d=>o.indexOf(d)!==-1),u={...e,...t};for(const d of l){const f=Dg(e[d],t[d]);if(!f.valid)return{valid:!1};u[d]=f.data}return{valid:!0,data:u}}else if(n===Oe.array&&a===Oe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let l=0;l<e.length;l++){const u=e[l],d=t[l],f=Dg(u,d);if(!f.valid)return{valid:!1};o.push(f.data)}return{valid:!0,data:o}}else return n===Oe.date&&a===Oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Wd extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=(l,u)=>{if(_E(l)||_E(u))return Be;const d=Dg(l.value,u.value);return d.valid?((EE(l)||EE(u))&&n.dirty(),{status:n.value,value:d.data}):(xe(a,{code:Ee.invalid_intersection_types}),Be)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Wd.create=(e,t,n)=>new Wd({left:e,right:t,typeName:ze.ZodIntersection,...qe(n)});class Oo extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.array)return xe(a,{code:Ee.invalid_type,expected:Oe.array,received:a.parsedType}),Be;if(a.data.length<this._def.items.length)return xe(a,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&a.data.length>this._def.items.length&&(xe(a,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...a.data].map((u,d)=>{const f=this._def.items[d]||this._def.rest;return f?f._parse(new ya(a,u,a.path,d)):null}).filter(u=>!!u);return a.common.async?Promise.all(l).then(u=>Bn.mergeArray(n,u)):Bn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new Oo({...this._def,rest:t})}}Oo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Oo({items:e,typeName:ze.ZodTuple,rest:null,...qe(t)})};class Zd extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.object)return xe(a,{code:Ee.invalid_type,expected:Oe.object,received:a.parsedType}),Be;const o=[],l=this._def.keyType,u=this._def.valueType;for(const d in a.data)o.push({key:l._parse(new ya(a,d,a.path,d)),value:u._parse(new ya(a,a.data[d],a.path,d)),alwaysSet:d in a.data});return a.common.async?Bn.mergeObjectAsync(n,o):Bn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,a){return n instanceof lt?new Zd({keyType:t,valueType:n,typeName:ze.ZodRecord,...qe(a)}):new Zd({keyType:ha.create(),valueType:t,typeName:ze.ZodRecord,...qe(n)})}}class RE extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.map)return xe(a,{code:Ee.invalid_type,expected:Oe.map,received:a.parsedType}),Be;const o=this._def.keyType,l=this._def.valueType,u=[...a.data.entries()].map(([d,f],h)=>({key:o._parse(new ya(a,d,a.path,[h,"key"])),value:l._parse(new ya(a,f,a.path,[h,"value"]))}));if(a.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const f of u){const h=await f.key,g=await f.value;if(h.status==="aborted"||g.status==="aborted")return Be;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const f of u){const h=f.key,g=f.value;if(h.status==="aborted"||g.status==="aborted")return Be;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}}}}RE.create=(e,t,n)=>new RE({valueType:t,keyType:e,typeName:ze.ZodMap,...qe(n)});class gc extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.set)return xe(a,{code:Ee.invalid_type,expected:Oe.set,received:a.parsedType}),Be;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(xe(a,{code:Ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(xe(a,{code:Ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(f){const h=new Set;for(const g of f){if(g.status==="aborted")return Be;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const d=[...a.data.values()].map((f,h)=>l._parse(new ya(a,f,a.path,h)));return a.common.async?Promise.all(d).then(f=>u(f)):u(d)}min(t,n){return new gc({...this._def,minSize:{value:t,message:De.toString(n)}})}max(t,n){return new gc({...this._def,maxSize:{value:t,message:De.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}gc.create=(e,t)=>new gc({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...qe(t)});class Qd extends lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Qd.create=(e,t)=>new Qd({getter:e,typeName:ze.ZodLazy,...qe(t)});class Xd extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:Ee.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xd.create=(e,t)=>new Xd({value:e,typeName:ze.ZodLiteral,...qe(t)});function bx(e,t){return new To({values:e,typeName:ze.ZodEnum,...qe(t)})}class To extends lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return xe(n,{expected:dt.joinValues(a),received:n.parsedType,code:Ee.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return xe(n,{received:n.data,code:Ee.invalid_enum_value,options:a}),Be}return Ur(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return To.create(t,{...this._def,...n})}exclude(t,n=this._def){return To.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}To.create=bx;class Lg extends lt{_parse(t){const n=dt.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==Oe.string&&a.parsedType!==Oe.number){const o=dt.objectValues(n);return xe(a,{expected:dt.joinValues(o),received:a.parsedType,code:Ee.invalid_type}),Be}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=dt.objectValues(n);return xe(a,{received:a.data,code:Ee.invalid_enum_value,options:o}),Be}return Ur(t.data)}get enum(){return this._def.values}}Lg.create=(e,t)=>new Lg({values:e,typeName:ze.ZodNativeEnum,...qe(t)});class Jd extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.promise&&n.common.async===!1)return xe(n,{code:Ee.invalid_type,expected:Oe.promise,received:n.parsedType}),Be;const a=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return Ur(a.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Jd.create=(e,t)=>new Jd({type:e,typeName:ze.ZodPromise,...qe(t)});class Fi extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:u=>{xe(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(a.data,l);if(a.common.async)return Promise.resolve(u).then(async d=>{if(n.value==="aborted")return Be;const f=await this._def.schema._parseAsync({data:d,path:a.path,parent:a});return f.status==="aborted"?Be:f.status==="dirty"||n.value==="dirty"?rc(f.value):f});{if(n.value==="aborted")return Be;const d=this._def.schema._parseSync({data:u,path:a.path,parent:a});return d.status==="aborted"?Be:d.status==="dirty"||n.value==="dirty"?rc(d.value):d}}if(o.type==="refinement"){const u=d=>{const f=o.refinement(d,l);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?Be:(d.status==="dirty"&&n.dirty(),u(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>d.status==="aborted"?Be:(d.status==="dirty"&&n.dirty(),u(d.value).then(()=>({status:n.value,value:d.value}))))}if(o.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Vs(u))return Be;const d=o.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>Vs(u)?Promise.resolve(o.transform(u.value,l)).then(d=>({status:n.value,value:d})):Be);dt.assertNever(o)}}Fi.create=(e,t,n)=>new Fi({schema:e,typeName:ze.ZodEffects,effect:t,...qe(n)});Fi.createWithPreprocess=(e,t,n)=>new Fi({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...qe(n)});class Ha extends lt{_parse(t){return this._getType(t)===Oe.undefined?Ur(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ha.create=(e,t)=>new Ha({innerType:e,typeName:ze.ZodOptional,...qe(t)});class Ao extends lt{_parse(t){return this._getType(t)===Oe.null?Ur(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ao.create=(e,t)=>new Ao({innerType:e,typeName:ze.ZodNullable,...qe(t)});class ef extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===Oe.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qe(t)});class tf extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return $d(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ga(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ga(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}tf.create=(e,t)=>new tf({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qe(t)});class OE extends lt{_parse(t){if(this._getType(t)!==Oe.nan){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.nan,received:a.parsedType}),Be}return{status:"valid",value:t.data}}}OE.create=e=>new OE({typeName:ze.ZodNaN,...qe(e)});class _x extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cv extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?Be:l.status==="dirty"?(n.dirty(),rc(l.value)):this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,n){return new Cv({in:t,out:n,typeName:ze.ZodPipeline})}}class nf extends lt{_parse(t){const n=this._def.innerType._parse(t),a=o=>(Vs(o)&&(o.value=Object.freeze(o.value)),o);return $d(n)?n.then(o=>a(o)):a(n)}unwrap(){return this._def.innerType}}nf.create=(e,t)=>new nf({innerType:e,typeName:ze.ZodReadonly,...qe(t)});function TE(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function L6(e,t={},n){return e?mc.create().superRefine((a,o)=>{const l=e(a);if(l instanceof Promise)return l.then(u=>{if(!u){const d=TE(t,a),f=d.fatal??n??!0;o.addIssue({code:"custom",...d,fatal:f})}});if(!l){const u=TE(t,a),d=u.fatal??n??!0;o.addIssue({code:"custom",...u,fatal:d})}}):mc.create()}var ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ze||(ze={}));const kB=(e,t={message:`Input not instance of ${e.name}`})=>L6(n=>n instanceof e,t),Xe=ha.create,Ex=xo.create;Ro.create;const Mv=Gd.create,jB=Hs.create,UB=qd.create,BB=Yd.create,zB=mc.create,FB=Ig.create,VB=zi.create,AE=ma.create,zn=en.create,HB=Kd.create,$B=Av.create,GB=Wd.create;Oo.create;const qB=Zd.create,Ks=Qd.create,YB=Xd.create,Nv=To.create;Jd.create;const KB=Ha.create;Ao.create;const P6=Fi.createWithPreprocess,Dm={string:(e=>ha.create({...e,coerce:!0})),number:(e=>xo.create({...e,coerce:!0})),boolean:(e=>Gd.create({...e,coerce:!0})),bigint:(e=>Ro.create({...e,coerce:!0})),date:(e=>Hs.create({...e,coerce:!0}))},WB=Be;function pe(...e){return l6(ax(e))}function k6(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function $t({error:e,localization:t,localizeErrors:n=!0}){var a;const o="Request failed";if(!n)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:o;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const l=e.error.code;if(t?.[l])return t[l]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||o}function Do(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Pg(e,t){for(const n in e)if(e[n]===t)return n}function vc(e,t){let n=Xe().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 j6={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"},U6={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"},B6={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."},z6={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."},F6={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},V6={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},H6={...F6,...V6},$6={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},G6={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},q6={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Y6={INVALID_SESSION_TOKEN:"Invalid session token"},K6={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"},W6={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"},Z6={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"},Q6={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"},X6={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"},J6={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"},eN={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"},tN={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:"Please check your email for the verification link.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...z6,...j6,...U6,...B6,...H6,...$6,...G6,...q6,...Y6,...K6,...W6,...Z6,...Q6,...X6,...J6,...eN},nN={CALLBACK:"callback",EMAIL_OTP:"email-otp",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"},CE={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},ME={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function rN(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 aN=e=>{switch(e){case"success":return sN;case"info":return cN;case"warning":return lN;case"error":return uN;default:return null}},iN=Array(12).fill(0),oN=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},iN.map((n,a)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),sN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),lN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.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"})),cN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),uN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),dN=H.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"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fN=()=>{const[e,t]=H.useState(document.hidden);return H.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let kg=1;class hN{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:kg++,u=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:a}),{...f,...t,id:l,dismissible:d,title:a}):f):this.addToast({title:a,...o,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=a!==void 0,u;const d=o.then(async h=>{if(u=["resolve",h],H.isValidElement(h))l=!1,this.create({id:a,type:"default",message:h});else if(mN(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"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(h instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"success",description:y,...S})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){l=!1;const g=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,_=typeof g=="object"&&!H.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,g)=>d.then(()=>u[0]==="reject"?g(u[1]):h(u[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:f}:Object.assign(a,{unwrap:f})},this.custom=(t,n)=>{const a=n?.id||kg++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qn=new hN,pN=(e,t)=>{const n=t?.id||kg++;return Qn.addToast({title:e,...t,id:n}),n},mN=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gN=pN,vN=()=>Qn.toasts,yN=()=>Qn.getActiveToasts(),NE=Object.assign(gN,{success:Qn.success,info:Qn.info,warning:Qn.warning,error:Qn.error,custom:Qn.custom,message:Qn.message,promise:Qn.promise,dismiss:Qn.dismiss,loading:Qn.loading},{getHistory:vN,getToasts:yN});rN("[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 sd(e){return e.label!==void 0}const bN=3,_N="24px",EN="16px",IE=4e3,SN=356,wN=14,xN=45,RN=200;function oa(...e){return e.filter(Boolean).join(" ")}function ON(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const TN=e=>{var t,n,a,o,l,u,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:N,closeButton:L,style:I,cancelButtonStyle:D,actionButtonStyle:B,className:Z="",descriptionClassName:Y="",duration:V,position:z,gap:ie,expandByDefault:ee,classNames:k,icons:F,closeButtonAriaLabel:G="Close toast"}=e,[ae,ve]=H.useState(null),[P,Q]=H.useState(null),[te,se]=H.useState(!1),[ge,_e]=H.useState(!1),[ye,Se]=H.useState(!1),[le,je]=H.useState(!1),[at,Je]=H.useState(!1),[Ft,re]=H.useState(0),[be,Le]=H.useState(0),Ye=H.useRef(p.duration||V||IE),At=H.useRef(null),Ue=H.useRef(null),et=R===0,j=R+1<=w,q=p.type,W=p.dismissible!==!1,de=p.className||"",me=p.descriptionClassName||"",he=H.useMemo(()=>T.findIndex(Ne=>Ne.toastId===p.id)||0,[T,p.id]),Re=H.useMemo(()=>{var Ne;return(Ne=p.closeButton)!=null?Ne:L},[p.closeButton,L]),Fe=H.useMemo(()=>p.duration||V||IE,[p.duration,V]),tt=H.useRef(0),Rt=H.useRef(0),nr=H.useRef(0),Ct=H.useRef(null),[Gt,Mt]=z.split("-"),on=H.useMemo(()=>T.reduce((Ne,We,Ot)=>Ot>=he?Ne:Ne+We.height,0),[T,he]),qt=fN(),ei=p.invert||g,Ea=q==="loading";Rt.current=H.useMemo(()=>he*ie+on,[he,on]),H.useEffect(()=>{Ye.current=Fe},[Fe]),H.useEffect(()=>{se(!0)},[]),H.useEffect(()=>{const Ne=Ue.current;if(Ne){const We=Ne.getBoundingClientRect().height;return Le(We),S(Ot=>[{toastId:p.id,height:We,position:p.position},...Ot]),()=>S(Ot=>Ot.filter(Et=>Et.toastId!==p.id))}},[S,p.id]),H.useLayoutEffect(()=>{if(!te)return;const Ne=Ue.current,We=Ne.style.height;Ne.style.height="auto";const Ot=Ne.getBoundingClientRect().height;Ne.style.height=We,Le(Ot),S(Et=>Et.find(ht=>ht.toastId===p.id)?Et.map(ht=>ht.toastId===p.id?{...ht,height:Ot}:ht):[{toastId:p.id,height:Ot,position:p.position},...Et])},[te,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Me=H.useCallback(()=>{_e(!0),re(Rt.current),S(Ne=>Ne.filter(We=>We.toastId!==p.id)),setTimeout(()=>{O(p)},RN)},[p,O,S,Rt]);H.useEffect(()=>{if(p.promise&&q==="loading"||p.duration===1/0||p.type==="loading")return;let Ne;return C||_||qt?(()=>{if(nr.current<tt.current){const Et=new Date().getTime()-tt.current;Ye.current=Ye.current-Et}nr.current=new Date().getTime()})():Ye.current!==1/0&&(tt.current=new Date().getTime(),Ne=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Me()},Ye.current)),()=>clearTimeout(Ne)},[C,_,p,q,qt,Me]),H.useEffect(()=>{p.delete&&(Me(),p.onDismiss==null||p.onDismiss.call(p,p))},[Me,p.delete]);function it(){var Ne;if(F?.loading){var We;return H.createElement("div",{className:oa(k?.loader,p==null||(We=p.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":q==="loading"},F.loading)}return H.createElement(oN,{className:oa(k?.loader,p==null||(Ne=p.classNames)==null?void 0:Ne.loader),visible:q==="loading"})}const ut=p.icon||F?.[q]||aN(q);var Ke,ft;return H.createElement("li",{tabIndex:0,ref:Ue,className:oa(Z,de,k?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,k?.default,k?.[q],p==null||(n=p.classNames)==null?void 0:n[q]),"data-sonner-toast":"","data-rich-colors":(Ke=p.richColors)!=null?Ke:N,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":te,"data-promise":!!p.promise,"data-swiped":at,"data-removed":ge,"data-visible":j,"data-y-position":Gt,"data-x-position":Mt,"data-index":R,"data-front":et,"data-swiping":ye,"data-dismissible":W,"data-type":q,"data-invert":ei,"data-swipe-out":le,"data-swipe-direction":P,"data-expanded":!!(C||ee&&te),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":A.length-R,"--offset":`${ge?Ft:Rt.current}px`,"--initial-height":ee?"auto":`${be}px`,...I,...p.style},onDragEnd:()=>{Se(!1),ve(null),Ct.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Ea||!W||(At.current=new Date,re(Rt.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Se(!0),Ct.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,We,Ot;if(le||!W)return;Ct.current=null;const Et=Number(((Ne=Ue.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mn=Number(((We=Ue.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ht=new Date().getTime()-((Ot=At.current)==null?void 0:Ot.getTime()),Nt=ae==="x"?Et:Mn,_r=Math.abs(Nt)/ht;if(Math.abs(Nt)>=xN||_r>.11){re(Rt.current),p.onDismiss==null||p.onDismiss.call(p,p),Q(ae==="x"?Et>0?"right":"left":Mn>0?"down":"up"),Me(),je(!0);return}else{var _n,Fn;(_n=Ue.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(Fn=Ue.current)==null||Fn.style.setProperty("--swipe-amount-y","0px")}Je(!1),Se(!1),ve(null)},onPointerMove:Ne=>{var We,Ot,Et;if(!Ct.current||!W||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const ht=Ne.clientY-Ct.current.y,Nt=Ne.clientX-Ct.current.x;var _r;const _n=(_r=e.swipeDirections)!=null?_r:ON(z);!ae&&(Math.abs(Nt)>1||Math.abs(ht)>1)&&ve(Math.abs(Nt)>Math.abs(ht)?"x":"y");let Fn={x:0,y:0};const ko=zr=>1/(1.5+Math.abs(zr)/20);if(ae==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&&ht<0||_n.includes("bottom")&&ht>0)Fn.y=ht;else{const zr=ht*ko(ht);Fn.y=Math.abs(zr)<Math.abs(ht)?zr:ht}}else if(ae==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Nt<0||_n.includes("right")&&Nt>0)Fn.x=Nt;else{const zr=Nt*ko(Nt);Fn.x=Math.abs(zr)<Math.abs(Nt)?zr:Nt}(Math.abs(Fn.x)>0||Math.abs(Fn.y)>0)&&Je(!0),(Ot=Ue.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Fn.x}px`),(Et=Ue.current)==null||Et.style.setProperty("--swipe-amount-y",`${Fn.y}px`)}},Re&&!p.jsx&&q!=="loading"?H.createElement("button",{"aria-label":G,"data-disabled":Ea,"data-close-button":!0,onClick:Ea||!W?()=>{}:()=>{Me(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oa(k?.closeButton,p==null||(a=p.classNames)==null?void 0:a.closeButton)},(ft=F?.close)!=null?ft:dN):null,(q||p.icon||p.promise)&&p.icon!==null&&(F?.[q]!==null||p.icon)?H.createElement("div",{"data-icon":"",className:oa(k?.icon,p==null||(o=p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||it():null,p.type!=="loading"?ut:null):null,H.createElement("div",{"data-content":"",className:oa(k?.content,p==null||(l=p.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:oa(k?.title,p==null||(u=p.classNames)==null?void 0:u.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?H.createElement("div",{"data-description":"",className:oa(Y,me,k?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),H.isValidElement(p.cancel)?p.cancel:p.cancel&&sd(p.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Ne=>{sd(p.cancel)&&W&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ne),Me())},className:oa(k?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,H.isValidElement(p.action)?p.action:p.action&&sd(p.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||B,onClick:Ne=>{sd(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ne),!Ne.defaultPrevented&&Me())},className:oa(k?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function DE(){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 AN(e,t){const n={};return[e,t].forEach((a,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?EN:_N;function f(h){["top","right","bottom","left"].forEach(g=>{n[`${u}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof a=="number"||typeof a=="string"?f(a):typeof a=="object"?["top","right","bottom","left"].forEach(h=>{a[h]===void 0?n[`${u}-${h}`]=d:n[`${u}-${h}`]=typeof a[h]=="number"?`${a[h]}px`:a[h]}):f(d)}),n}const CN=H.forwardRef(function(t,n){const{id:a,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:g,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:w,visibleToasts:T=bN,toastOptions:R,dir:A=DE(),gap:C=wN,icons:O,containerAriaLabel:N="Notifications"}=t,[L,I]=H.useState([]),D=H.useMemo(()=>a?L.filter(te=>te.toasterId===a):L.filter(te=>!te.toasterId),[L,a]),B=H.useMemo(()=>Array.from(new Set([l].concat(D.filter(te=>te.position).map(te=>te.position)))),[D,l]),[Z,Y]=H.useState([]),[V,z]=H.useState(!1),[ie,ee]=H.useState(!1),[k,F]=H.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=H.useRef(null),ae=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=H.useRef(null),P=H.useRef(!1),Q=H.useCallback(te=>{I(se=>{var ge;return(ge=se.find(_e=>_e.id===te.id))!=null&&ge.delete||Qn.dismiss(te.id),se.filter(({id:_e})=>_e!==te.id)})},[]);return H.useEffect(()=>Qn.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{I(se=>se.map(ge=>ge.id===te.id?{...ge,delete:!0}:ge))});return}setTimeout(()=>{Bw.flushSync(()=>{I(se=>{const ge=se.findIndex(_e=>_e.id===te.id);return ge!==-1?[...se.slice(0,ge),{...se[ge],...te},...se.slice(ge+1)]:[te,...se]})})})}),[L]),H.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 te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:se})=>{F(se?"dark":"light")})}catch{te.addListener(({matches:ge})=>{try{F(ge?"dark":"light")}catch(_e){console.error(_e)}})}},[y]),H.useEffect(()=>{L.length<=1&&z(!1)},[L]),H.useEffect(()=>{const te=se=>{var ge;if(u.every(Se=>se[Se]||se.code===Se)){var ye;z(!0),(ye=G.current)==null||ye.focus()}se.code==="Escape"&&(document.activeElement===G.current||(ge=G.current)!=null&&ge.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[u]),H.useEffect(()=>{if(G.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,P.current=!1)}},[G.current]),H.createElement("section",{ref:n,"aria-label":`${N} ${ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((te,se)=>{var ge;const[_e,ye]=te.split("-");return D.length?H.createElement("ol",{key:te,dir:A==="auto"?DE():A,tabIndex:-1,ref:G,className:h,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":_e,"data-x-position":ye,style:{"--front-toast-height":`${((ge=Z[0])==null?void 0:ge.height)||0}px`,"--width":`${SN}px`,"--gap":`${C}px`,...w,...AN(g,p)},onBlur:Se=>{P.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(P.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||P.current||(P.current=!0,ve.current=Se.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{ie||z(!1)},onDragEnd:()=>z(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},D.filter(Se=>!Se.position&&se===0||Se.position===te).map((Se,le)=>{var je,at;return H.createElement(TN,{key:Se.id,icons:O,index:le,toast:Se,defaultRichColors:_,duration:(je=R?.duration)!=null?je:S,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:T,closeButton:(at=R?.closeButton)!=null?at:f,interacting:ie,position:te,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:Q,toasts:D.filter(Je=>Je.position==Se.position),heights:Z.filter(Je=>Je.position==Se.position),setHeights:Y,expandByDefault:d,gap:C,expanded:V,swipeDirections:t.swipeDirections})})):null}))}),Sx=E.createContext({});function wx(){return E.useContext(Sx)}var Lm,LE;function MN(){if(LE)return Lm;LE=1;var e=function(){};return Lm=e,Lm}var NN=MN();const IN=Io(NN);function DN({async:e,appendTo:t,defer:n,id:a,nonce:o,src:l}){const u=document.createElement("script");e!==void 0&&(u.async=e),n!==void 0&&(u.defer=n),a&&(u.id=a),o&&u.setAttribute("nonce",o),u.src=l,(t==="head"?document.head:document.body).appendChild(u)}var LN=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let lc=null,yc=!1;const rf=new Set,af=new Set,PN=typeof window<"u",ks="___grecaptcha_cfg",xx=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function kN(){if(!PN)return;function e(n){if(yc)n();else{window[ks]||(window[ks]={});const a=window[ks];a.fns||(a.fns=[]),a.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){yc=!0;for(const n of af)n();af.clear()}window[xx]=t}function jN({language:e,onLoadCallbackName:t,render:n,useEnterprise:a=!1,useRecaptchaNet:o=!1}){const l=o?"recaptcha.net":"google.com",u=a?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${u}?${d.toString()}`}function UN({language:e,render:t,scriptProps:n,useEnterprise:a,useRecaptchaNet:o}){const l={id:"google-recaptcha-v3"},u=jN({language:e,onLoadCallbackName:xx,render:t,useEnterprise:a,useRecaptchaNet:o});if(lc){if(lc!==u)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}lc=u,DN(Object.assign(Object.assign(Object.assign({},l),n),{src:u}))}function BN(e){if(!window[ks])return;const t=window[ks];t.clients&&delete t.clients[e]}function zN(e,t){var{onLoadCallback:n,onLoadCallbackName:a}=t,o=LN(t,["onLoadCallback","onLoadCallbackName"]);if(rf.size===0&&kN(),UN(o),rf.add(e),n&&(yc?n():af.add(n)),a){let l=function(){if(!a)return;const u=window[a];typeof u=="function"&&u()};yc?l():af.add(l)}}function FN(e){var t,n,a;rf.delete(e),rf.size===0&&(window.grecaptcha=void 0,window[ks]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${lc}"]`))===null||n===void 0||n.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),lc=null,yc=!1)}let PE=!1;function VN({container:e,children:t,language:n,reCaptchaKey:a,scriptProps:o,useEnterprise:l,useRecaptchaNet:u}){var d,f,h,g,p,y,_;const S=E.useId(),[w,T]=E.useState(null),[R,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function I(){var D;const B=l?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!B)throw new Error("reCAPTCHA not found");if(!B.ready)throw new Error("reCAPTCHA ready callback not found");B.ready(()=>{T(B)})}return zN(S,{language:n,onLoadCallback:I,onLoadCallbackName:o?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:o?.appendTo,async:o?.async,defer:o?.defer,id:o?.id,nonce:o?.nonce},useEnterprise:l,useRecaptchaNet:u}),()=>{FN(S),T(null)}},[e?.element,S,n,a,o?.appendTo,o?.async,o?.defer,o?.id,o?.nonce,o?.onLoadCallbackName,l,u]),E.useEffect(()=>{var I,D,B;if(!e?.element||!w?.render)return;const Z={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((I=e.parameters)===null||I===void 0?void 0:I.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},Y=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!Y)throw new Error("reCAPTCHA container element not found");const V=w.render(Y,Z);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(PE||(IN(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),PE=!0),(B=Y.querySelector(".grecaptcha-badge"))===null||B===void 0||B.style.setProperty("display","none")),A(V),C.current=!0,()=>{A(null),C.current=!1,BN(V),Y.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,a]);const O=!!e?.element,N=O?R:a,L=E.useMemo(()=>N!==null&&w?.execute?I=>{if(N===null||!w?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!C.current?(console.warn("Client ID not mounted"),null):w.execute(N,{action:I})}:void 0,[N,w,O]);return b.jsx(Sx.Provider,{value:{container:e?.element,executeRecaptcha:L,reCaptchaInstance:w},children:t})}var HN=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const a of n)a()}}},Nr=new HN;function $N(){return()=>{}}function Ka(){return E.useSyncExternalStore($N,()=>!0,()=>!1)}function Iv(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const o=document.documentElement.getAttribute("lang");t(o??void 0)};n();const a=new MutationObserver(o=>{for(const l of o)l.attributeName==="lang"&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function Dv(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var o;const l=document.documentElement.classList.contains("dark")||((o=document.documentElement.getAttribute("style"))==null?void 0:o.includes("color-scheme: dark"));t(l?"dark":"light")};n();const a=new MutationObserver(o=>{for(const l of o)(l.attributeName==="style"||l.attributeName==="class")&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function GN({children:e}){const t=Ka(),{captcha:n}=E.useContext(Ze);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(VN,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
11
- .grecaptcha-badge {
12
- visibility: hidden;
13
- border-radius: var(--radius) !important;
14
- --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
15
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
16
- border-style: var(--tw-border-style) !important;
17
- border-width: 1px;
18
- }
19
-
20
- .dark .grecaptcha-badge {
21
- border-color: var(--input) !important;
22
- }
23
- `}),b.jsx(qN,{}),e]})}function qN(){const{executeRecaptcha:e}=wx(),{theme:t}=Dv(),{lang:n}=Iv();return E.useEffect(()=>{if(!e)return;(async()=>{const o=document.querySelector("iframe[title='reCAPTCHA']");if(o){const l=new URL(o.src);l.searchParams.set("theme",t),n&&l.searchParams.set("hl",n),o.src=l.toString()}})()},[e,t,n]),null}function YN({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:a}}=E.useContext(Ze),{pathMode:o,slug:l}=t||{};let u,d,f,h;const{data:g,isPending:p,isRefetching:y}=a();if(o==="slug"){const _=e||l;u=g?.find(S=>S.slug===_),d=p,f=y}else{const{data:_,isPending:S,isRefetching:w,refetch:T}=n();h=T,u=_,d=S,f=w}return E.useMemo(()=>({data:u,isPending:d,isRefetching:f,refetch:h}),[u,d,f,h])}var KN=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:a,redirectTo:o}=E.useContext(Ze),{slug:l,pathMode:u,personalPath:d}=n||{},{data:f}=t(),{data:h,isPending:g,isRefetching:p,refetch:y}=YN(),{refetch:_}=e(),{data:S}=e();return E.useEffect(()=>{f?.user.id&&(h||S)&&(y?.(),_?.())},[f?.user.id]),E.useEffect(()=>{p||g||l&&u==="slug"&&!h&&a(d||o)},[h,p,g,l,u,d,a,o]),null},WN=({href:e,className:t,children:n})=>b.jsx("a",{className:t,href:e,children:n}),ZN=e=>{window.location.href=e},QN=e=>{window.location.replace(e)},XN=({variant:e="default",message:t})=>{e==="default"?NE(t):NE[e](t)},Ze=E.createContext({}),JN=({children:e,authClient:t,account:n,avatar:a,deleteUser:o,social:l,genericOAuth:u,basePath:d="/auth",baseURL:f="",captcha:h,redirectTo:g="/",credentials:p,changeEmail:y=!0,freshAge:_=3600*24,hooks:S,mutators:w,localization:T,localizeErrors:R=!0,nameRequired:A=!0,organization:C,teams:O,signUp:N=!0,toast:L=XN,viewPaths:I,navigate:D,replace:B,Link:Z=WN,...Y})=>{const V=t,z=E.useMemo(()=>{if(a)return a===!0?{extension:"png",size:128}:{upload:a.upload,delete:a.delete,extension:a.extension||"png",size:a.size||(a.upload?256:128),Image:a.Image}},[a]),ie=E.useMemo(()=>{var le;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:CE}:{basePath:((le=n.basePath)!=null&&le.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...CE,...n.viewPaths}}},[n]),ee=E.useMemo(()=>{if(o)return o===!0?{}:o},[o]),k=E.useMemo(()=>{if(l)return l},[l]),F=E.useMemo(()=>{if(u)return u},[u]),G=E.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),ae=E.useMemo(()=>{if(N!==!1)return N===!0||N===void 0?{fields:["name"]}:{fields:N.fields||["name"]}},[N]),ve=E.useMemo(()=>{var le;if(!C)return;if(C===!0)return{basePath:"/organization",viewPaths:ME,customRoles:[]};let je;C.logo===!0?je={extension:"png",size:128}:C.logo&&(je={upload:C.logo.upload,delete:C.logo.delete,extension:C.logo.extension||"png",size:C.logo.size||(C.logo.upload?256:128)});const at=(le=C.basePath)!=null&&le.endsWith("/")?C.basePath.slice(0,-1):C.basePath;return{...C,logo:je,basePath:at??"/organization",customRoles:C.customRoles||[],viewPaths:{...ME,...C.viewPaths}}},[C]),P=E.useMemo(()=>{var le,je;if(!(!O||!ve))return O===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:O.enabled??!0,customRoles:O.customRoles||[],colors:{count:((le=O.colors)==null?void 0:le.count)??5,prefix:((je=O.colors)==null?void 0:je.prefix)??"team"}}},[O,ve]),Q=E.useMemo(()=>({deleteApiKey:le=>V.apiKey.delete({...le,fetchOptions:{throw:!0}}),deletePasskey:le=>V.passkey.deletePasskey({...le,fetchOptions:{throw:!0}}),revokeDeviceSession:le=>V.multiSession.revoke({...le,fetchOptions:{throw:!0}}),revokeSession:le=>V.revokeSession({...le,fetchOptions:{throw:!0}}),setActiveSession:le=>V.multiSession.setActive({...le,fetchOptions:{throw:!0}}),updateOrganization:le=>V.organization.update({...le,fetchOptions:{throw:!0}}),updateTeam:le=>V.$fetch("/organization/update-team",{method:"POST",body:le,throw:!0}),updateUser:le=>V.updateUser({...le,fetchOptions:{throw:!0}}),unlinkAccount:le=>V.unlinkAccount({...le,fetchOptions:{throw:!0}})}),[V]),te=E.useMemo(()=>({useSession:V.useSession,useListAccounts:()=>ur({queryFn:V.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:le=>ur({queryFn:()=>V.accountInfo(le),cacheKey:`accountInfo:${JSON.stringify(le)}`}),useListDeviceSessions:()=>ur({queryFn:V.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>ur({queryFn:V.listSessions,cacheKey:"listSessions"}),useListPasskeys:V.useListPasskeys,useListApiKeys:()=>ur({queryFn:V.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:V.useActiveOrganization,useListOrganizations:V.useListOrganizations,useHasPermission:le=>ur({queryFn:()=>V.$fetch("/organization/has-permission",{method:"POST",body:le}),cacheKey:`hasPermission:${JSON.stringify(le)}`}),useInvitation:le=>ur({queryFn:()=>V.organization.getInvitation(le),cacheKey:`invitation:${JSON.stringify(le)}`}),useListInvitations:le=>ur({queryFn:()=>{var je;return V.$fetch(`/organization/list-invitations?organizationId=${((je=le?.query)==null?void 0:je.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(le)}`}),useListUserInvitations:()=>ur({queryFn:()=>V.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:le=>ur({queryFn:()=>{var je;return V.$fetch(`/organization/list-members?organizationId=${((je=le?.query)==null?void 0:je.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(le)}`}),useListTeams:le=>ur({queryFn:()=>V.$fetch(`/organization/list-teams?organizationId=${le?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(le)}`}),useListTeamMembers:le=>ur({queryFn:()=>V.$fetch("/organization/list-team-members",{method:"POST",body:le?.teamId?{query:{teamId:le.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(le)}`}),useListUserTeams:()=>ur({queryFn:()=>V.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[V]),se=E.useMemo(()=>({...nN,...I}),[I]),ge=E.useMemo(()=>({...tN,...T}),[T]),_e=E.useMemo(()=>({...te,...S}),[te,S]),ye=E.useMemo(()=>({...Q,...w}),[Q,w]);f=f.endsWith("/")?f.slice(0,-1):f,d=d.endsWith("/")?d.slice(0,-1):d;const{data:Se}=_e.useSession();return b.jsxs(Ze.Provider,{value:{authClient:V,avatar:z,basePath:d==="/"?"":d,baseURL:f,captcha:h,redirectTo:g,changeEmail:y,credentials:G,deleteUser:ee,freshAge:_,genericOAuth:F,hooks:_e,mutators:ye,localization:ge,localizeErrors:R,nameRequired:A,organization:ve,teams:P,account:ie,signUp:ae,social:k,toast:L,navigate:D||ZN,replace:B||D||QN,viewPaths:se,Link:Z,...Y},children:[Se&&ve&&b.jsx(KN,{}),h?.provider==="google-recaptcha-v3"?b.jsx(GN,{children:e}):e]})};function ur({queryFn:e,cacheKey:t,staleTime:n=1e4}){var a;const{hooks:{useSession:o},toast:l,localization:u,localizeErrors:d}=E.useContext(Ze),{data:f,isPending:h}=o(),g=E.useRef(e);g.current=e;const p=t||e.toString(),y=E.useSyncExternalStore(E.useCallback(C=>Nr.subscribe(p,C),[p]),E.useCallback(()=>Nr.get(p),[p]),E.useCallback(()=>Nr.get(p),[p])),_=E.useRef(!1),S=E.useRef(void 0),[w,T]=E.useState(null),R=E.useCallback(async()=>{const C=Nr.getInFlightRequest(p);if(C){try{const N=await C;N.error?T(N.error):T(null)}catch(N){T(N)}return}y?.data!==void 0&&Nr.setRefetching(p,!0);const O=g.current();Nr.setInFlightRequest(p,O);try{const{data:N,error:L}=await O;L?(T(L),l({variant:"error",message:$t({error:L,localization:u,localizeErrors:d})})):T(null),Nr.set(p,N)}catch(N){const L=N;T(L),l({variant:"error",message:$t({error:L,localization:u,localizeErrors:d})})}finally{Nr.setRefetching(p,!1),Nr.removeInFlightRequest(p)}},[p,l,u,d,y]);E.useEffect(()=>{var C;const O=(C=f?.user)==null?void 0:C.id;if(!f){Nr.setRefetching(p,!1),Nr.clear(p),_.current=!1,S.current=void 0;return}const N=S.current!==void 0&&S.current!==O;N&&Nr.clear(p);const L=y?.data!==void 0,I=!y||Date.now()-y.timestamp>n;(!_.current||!L||N||L&&I)&&(!L||I)&&(_.current=!0,R()),S.current=O},[f,(a=f?.user)==null?void 0:a.id,p,R,y,n]);const A=h||y?.data===void 0&&!w;return{data:y?.data??null,isPending:A,isRefetching:y?.isRefetching??!1,error:w,refetch:R}}const eI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),kE=e=>{const t=tI(e);return t.charAt(0).toUpperCase()+t.slice(1)},Rx=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),nI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var rI={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 aI=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:l,iconNode:u,...d},f)=>E.createElement("svg",{ref:f,...rI,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:Rx("lucide",o),...!l&&!nI(d)&&{"aria-hidden":"true"},...d},[...u.map(([h,g])=>E.createElement(h,g)),...Array.isArray(l)?l:[l]]));const Cn=(e,t)=>{const n=E.forwardRef(({className:a,...o},l)=>E.createElement(aI,{ref:l,iconNode:t,className:Rx(`lucide-${eI(kE(e))}`,`lucide-${e}`,a),...o}));return n.displayName=kE(e),n};const iI=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],oI=Cn("arrow-left",iI);const sI=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],lI=Cn("building",sI);const cI=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Lv=Cn("check",cI);const uI=[["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"}]],dI=Cn("cloud-upload",uI);const fI=[["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"}]],hI=Cn("ellipsis",fI);const pI=[["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"}]],mI=Cn("eye-off",pI);const gI=[["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"}]],vI=Cn("eye",gI);const yI=[["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"}]],bI=Cn("fingerprint",yI);const _I=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Tn=Cn("loader-circle",_I);const EI=[["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"}]],Ox=Cn("lock",EI);const SI=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Tx=Cn("mail",SI);const wI=[["path",{d:"M5 12h14",key:"1ays0h"}]],xI=Cn("minus",wI);const RI=[["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"}]],OI=Cn("qr-code",RI);const TI=[["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"}]],jE=Cn("send",TI);const AI=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],CI=Cn("trash-2",AI);const MI=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],NI=Cn("user-round",MI);const II=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ax=Cn("x",II);var Tc=e=>e.type==="checkbox",vo=e=>e instanceof Date,Jn=e=>e==null;const Cx=e=>typeof e=="object";var an=e=>!Jn(e)&&!Array.isArray(e)&&Cx(e)&&!vo(e),Mx=e=>an(e)&&e.target?Tc(e.target)?e.target.checked:e.target.value:e,DI=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Nx=(e,t)=>e.has(DI(t)),LI=e=>{const t=e.constructor&&e.constructor.prototype;return an(t)&&t.hasOwnProperty("isPrototypeOf")},Pv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cn(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&&!(an(e)&&LI(e)))return e;const a=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(a[o]=cn(e[o]));return a}var Af=e=>/^\w*$/.test(e),zt=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||!an(e))return n;const a=(Af(t)?[t]:jv(t)).reduce((o,l)=>Jn(o)?o:o[l],e);return zt(a)||a===e?zt(e[t])?n:e[t]:a},hr=e=>typeof e=="boolean",Un=e=>typeof e=="function",_t=(e,t,n)=>{let a=-1;const o=Af(t)?[t]:jv(t),l=o.length,u=l-1;for(;++a<l;){const d=o[a];let f=n;if(a!==u){const h=e[d];f=an(h)||Array.isArray(h)?h:isNaN(+o[a+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=f,e=e[d]}};const of={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Kr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fa={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Uv=H.createContext(null);Uv.displayName="HookFormContext";const Cf=()=>H.useContext(Uv),PI=e=>{const{children:t,...n}=e;return H.createElement(Uv.Provider,{value:n},t)};var Ix=(e,t,n,a=!0)=>{const o={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(o,l,{get:()=>{const u=l;return t._proxyFormState[u]!==Kr.all&&(t._proxyFormState[u]=!a||Kr.all),n&&(n[u]=!0),e[u]}});return o};const Bv=typeof window<"u"?H.useLayoutEffect:H.useEffect;function zv(e){const t=Cf(),{control:n=t.control,disabled:a,name:o,exact:l}=e||{},[u,d]=H.useState(n._formState),f=H.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Bv(()=>n._subscribe({name:o,formState:f.current,exact:l,callback:h=>{!a&&d({...n._formState,...h})}}),[o,a,l]),H.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),H.useMemo(()=>Ix(u,n,f.current,!1),[u,n])}var gr=e=>typeof e=="string",jg=(e,t,n,a,o)=>gr(e)?(a&&t.watch.add(e),we(n,e,o)):Array.isArray(e)?e.map(l=>(a&&t.watch.add(l),we(n,l))):(a&&(t.watchAll=!0),n),Ug=e=>Jn(e)||!Cx(e);function Wr(e,t,n=new WeakSet){if(Ug(e)||Ug(t))return Object.is(e,t);if(vo(e)&&vo(t))return e.getTime()===t.getTime();const a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of a){const u=e[l];if(!o.includes(l))return!1;if(l!=="ref"){const d=t[l];if(vo(u)&&vo(d)||an(u)&&an(d)||Array.isArray(u)&&Array.isArray(d)?!Wr(u,d,n):!Object.is(u,d))return!1}}return!0}function kI(e){const t=Cf(),{control:n=t.control,name:a,defaultValue:o,disabled:l,exact:u,compute:d}=e||{},f=H.useRef(o),h=H.useRef(d),g=H.useRef(void 0),p=H.useRef(n),y=H.useRef(a);h.current=d;const[_,S]=H.useState(()=>{const O=n._getWatch(a,f.current);return h.current?h.current(O):O}),w=H.useCallback(O=>{const N=jg(a,n._names,O||n._formValues,!1,f.current);return h.current?h.current(N):N},[n._formValues,n._names,a]),T=H.useCallback(O=>{if(!l){const N=jg(a,n._names,O||n._formValues,!1,f.current);if(h.current){const L=h.current(N);Wr(L,g.current)||(S(L),g.current=L)}else S(N)}},[n._formValues,n._names,l,a]);Bv(()=>((p.current!==n||!Wr(y.current,a))&&(p.current=n,y.current=a,T()),n._subscribe({name:a,formState:{values:!0},exact:u,callback:O=>{T(O.values)}})),[n,u,a,T]),H.useEffect(()=>n._removeUnmounted());const R=p.current!==n,A=y.current,C=H.useMemo(()=>{if(l)return null;const O=!R&&!Wr(A,a);return R||O?w():null},[l,R,a,A,w]);return C!==null?C:_}function jI(e){const t=Cf(),{name:n,disabled:a,control:o=t.control,shouldUnregister:l,defaultValue:u,exact:d=!0}=e,f=Nx(o._names.array,n),h=H.useMemo(()=>we(o._formValues,n,we(o._defaultValues,n,u)),[o,n,u]),g=kI({control:o,name:n,defaultValue:h,exact:d}),p=zv({control:o,name:n,exact:d}),y=H.useRef(e),_=H.useRef(void 0),S=H.useRef(o.register(n,{...e.rules,value:g,...hr(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const w=H.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=H.useCallback(O=>S.current.onChange({target:{value:Mx(O),name:n},type:of.CHANGE}),[n]),R=H.useCallback(()=>S.current.onBlur({target:{value:we(o._formValues,n),name:n},type:of.BLUR}),[n,o._formValues]),A=H.useCallback(O=>{const N=we(o._fields,n);N&&N._f&&O&&(N._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()})},[o._fields,n]),C=H.useMemo(()=>({name:n,value:g,...hr(a)||p.disabled?{disabled:p.disabled||a}:{},onChange:T,onBlur:R,ref:A}),[n,a,p.disabled,T,R,A,g]);return H.useEffect(()=>{const O=o._options.shouldUnregister||l,N=_.current;N&&N!==n&&!f&&o.unregister(N),o.register(n,{...y.current.rules,...hr(y.current.disabled)?{disabled:y.current.disabled}:{}});const L=(I,D)=>{const B=we(o._fields,I);B&&B._f&&(B._f.mount=D)};if(L(n,!0),O){const I=cn(we(o._options.defaultValues,n,y.current.defaultValue));_t(o._defaultValues,n,I),zt(we(o._formValues,n))&&_t(o._formValues,n,I)}return!f&&o.register(n),_.current=n,()=>{(f?O&&!o._state.action:O)?o.unregister(n):L(n,!1)}},[n,o,f,l]),H.useEffect(()=>{o._setDisabledField({disabled:a,name:n})},[a,n,o]),H.useMemo(()=>({field:C,formState:p,fieldState:w}),[C,p,w])}const UI=e=>e.render(jI(e));var Fv=(e,t,n,a,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[a]:o||!0}}:{},cc=e=>Array.isArray(e)?e:[e],UE=()=>{let e=[];return{get observers(){return e},next:o=>{for(const l of e)l.next&&l.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(l=>l!==o)}}),unsubscribe:()=>{e=[]}}};function Dx(e,t){const n={};for(const a in e)if(e.hasOwnProperty(a)){const o=e[a],l=t[a];if(o&&an(o)&&l){const u=Dx(o,l);an(u)&&(n[a]=u)}else e[a]&&(n[a]=l)}return n}var jn=e=>an(e)&&!Object.keys(e).length,Vv=e=>e.type==="file",sf=e=>{if(!Pv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Lx=e=>e.type==="select-multiple",Hv=e=>e.type==="radio",BI=e=>Hv(e)||Tc(e),Pm=e=>sf(e)&&e.isConnected;function zI(e,t){const n=t.slice(0,-1).length;let a=0;for(;a<n;)e=zt(e)?a++:e[t[a++]];return e}function FI(e){for(const t in e)if(e.hasOwnProperty(t)&&!zt(e[t]))return!1;return!0}function Xt(e,t){const n=Array.isArray(t)?t:Af(t)?[t]:jv(t),a=n.length===1?e:zI(e,n),o=n.length-1,l=n[o];return a&&delete a[l],o!==0&&(an(a)&&jn(a)||Array.isArray(a)&&FI(a))&&Xt(e,n.slice(0,-1)),e}var VI=e=>{for(const t in e)if(Un(e[t]))return!0;return!1};function Px(e){return Array.isArray(e)||an(e)&&!VI(e)}function Bg(e,t={}){for(const n in e){const a=e[n];Px(a)?(t[n]=Array.isArray(a)?[]:{},Bg(a,t[n])):zt(a)||(t[n]=!0)}return t}function Is(e,t,n){n||(n=Bg(t));for(const a in e){const o=e[a];if(Px(o))zt(t)||Ug(n[a])?n[a]=Bg(o,Array.isArray(o)?[]:{}):Is(o,Jn(t)?{}:t[a],n[a]);else{const l=t[a];n[a]=!Wr(o,l)}}return n}const BE={value:!1,isValid:!1},zE={value:!0,isValid:!0};var kx=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&&!zt(e[0].attributes.value)?zt(e[0].value)||e[0].value===""?zE:{value:e[0].value,isValid:!0}:zE:BE}return BE},jx=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:a})=>zt(e)?e:t?e===""?NaN:e&&+e:n&&gr(e)?new Date(e):a?a(e):e;const FE={isValid:!1,value:null};var Ux=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,FE):FE;function VE(e){const t=e.ref;return Vv(t)?t.files:Hv(t)?Ux(e.refs).value:Lx(t)?[...t.selectedOptions].map(({value:n})=>n):Tc(t)?kx(e.refs).value:jx(zt(t.value)?e.ref.value:t.value,e)}var HI=(e,t,n,a)=>{const o={};for(const l of e){const u=we(t,l);u&&_t(o,l,u._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:a}},lf=e=>e instanceof RegExp,Zl=e=>zt(e)?e:lf(e)?e.source:an(e)?lf(e.value)?e.value.source:e.value:e,HE=e=>({isOnSubmit:!e||e===Kr.onSubmit,isOnBlur:e===Kr.onBlur,isOnChange:e===Kr.onChange,isOnAll:e===Kr.all,isOnTouch:e===Kr.onTouched});const $E="AsyncFunction";var $I=e=>!!e&&!!e.validate&&!!(Un(e.validate)&&e.validate.constructor.name===$E||an(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===$E)),GI=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),GE=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const uc=(e,t,n,a)=>{for(const o of n||Object.keys(e)){const l=we(e,o);if(l){const{_f:u,...d}=l;if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],o)&&!a)return!0;if(u.ref&&t(u.ref,u.name)&&!a)return!0;if(uc(d,t))break}else if(an(d)&&uc(d,t))break}}};function qE(e,t,n){const a=we(e,n);if(a||Af(n))return{error:a,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),u=we(t,l),d=we(e,l);if(u&&!Array.isArray(u)&&n!==l)return{name:n};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};o.pop()}return{name:n}}var qI=(e,t,n,a)=>{n(e);const{name:o,...l}=e;return jn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(u=>t[u]===(!a||Kr.all))},YI=(e,t,n)=>!e||!t||e===t||cc(e).some(a=>a&&(n?a===t:a.startsWith(t)||t.startsWith(a))),KI=(e,t,n,a,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?a.isOnBlur:o.isOnBlur)?!e:(n?a.isOnChange:o.isOnChange)?e:!0,WI=(e,t)=>!kv(we(e,t)).length&&Xt(e,t),ZI=(e,t,n)=>{const a=cc(we(e,n));return _t(a,"root",t[n]),_t(e,n,a),e};function YE(e,t,n="validate"){if(gr(e)||Array.isArray(e)&&e.every(gr)||hr(e)&&!e)return{type:n,message:gr(e)?e:"",ref:t}}var ws=e=>an(e)&&!lf(e)?e:{value:e,message:""},KE=async(e,t,n,a,o,l)=>{const{ref:u,refs:d,required:f,maxLength:h,minLength:g,min:p,max:y,pattern:_,validate:S,name:w,valueAsNumber:T,mount:R}=e._f,A=we(n,w);if(!R||t.has(w))return{};const C=d?d[0]:u,O=V=>{o&&C.reportValidity&&(C.setCustomValidity(hr(V)?"":V||""),C.reportValidity())},N={},L=Hv(u),I=Tc(u),D=L||I,B=(T||Vv(u))&&zt(u.value)&&zt(A)||sf(u)&&u.value===""||A===""||Array.isArray(A)&&!A.length,Z=Fv.bind(null,w,a,N),Y=(V,z,ie,ee=Fa.maxLength,k=Fa.minLength)=>{const F=V?z:ie;N[w]={type:V?ee:k,message:F,ref:u,...Z(V?ee:k,F)}};if(l?!Array.isArray(A)||!A.length:f&&(!D&&(B||Jn(A))||hr(A)&&!A||I&&!kx(d).isValid||L&&!Ux(d).isValid)){const{value:V,message:z}=gr(f)?{value:!!f,message:f}:ws(f);if(V&&(N[w]={type:Fa.required,message:z,ref:C,...Z(Fa.required,z)},!a))return O(z),N}if(!B&&(!Jn(p)||!Jn(y))){let V,z;const ie=ws(y),ee=ws(p);if(!Jn(A)&&!isNaN(A)){const k=u.valueAsNumber||A&&+A;Jn(ie.value)||(V=k>ie.value),Jn(ee.value)||(z=k<ee.value)}else{const k=u.valueAsDate||new Date(A),F=ve=>new Date(new Date().toDateString()+" "+ve),G=u.type=="time",ae=u.type=="week";gr(ie.value)&&A&&(V=G?F(A)>F(ie.value):ae?A>ie.value:k>new Date(ie.value)),gr(ee.value)&&A&&(z=G?F(A)<F(ee.value):ae?A<ee.value:k<new Date(ee.value))}if((V||z)&&(Y(!!V,ie.message,ee.message,Fa.max,Fa.min),!a))return O(N[w].message),N}if((h||g)&&!B&&(gr(A)||l&&Array.isArray(A))){const V=ws(h),z=ws(g),ie=!Jn(V.value)&&A.length>+V.value,ee=!Jn(z.value)&&A.length<+z.value;if((ie||ee)&&(Y(ie,V.message,z.message),!a))return O(N[w].message),N}if(_&&!B&&gr(A)){const{value:V,message:z}=ws(_);if(lf(V)&&!A.match(V)&&(N[w]={type:Fa.pattern,message:z,ref:u,...Z(Fa.pattern,z)},!a))return O(z),N}if(S){if(Un(S)){const V=await S(A,n),z=YE(V,C);if(z&&(N[w]={...z,...Z(Fa.validate,z.message)},!a))return O(z.message),N}else if(an(S)){let V={};for(const z in S){if(!jn(V)&&!a)break;const ie=YE(await S[z](A,n),C,z);ie&&(V={...ie,...Z(z,ie.message)},O(ie.message),a&&(N[w]=V))}if(!jn(V)&&(N[w]={ref:C,...V},!a))return N}}return O(!0),N};const QI={mode:Kr.onSubmit,reValidateMode:Kr.onChange,shouldFocusError:!0};function XI(e={}){let t={...QI,...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},a={},o=an(t.defaultValues)||an(t.values)?cn(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:cn(o),u={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,h=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...g};let y={...p};const _={array:UE(),state:UE()},S=t.criteriaMode===Kr.all,w=j=>q=>{clearTimeout(h),h=setTimeout(j,q)},T=async j=>{if(!u.keepIsValid&&!t.disabled&&(p.isValid||y.isValid||j)){let q;t.resolver?(q=jn((await D()).errors),R()):q=await Z(a,!0),q!==n.isValid&&_.state.next({isValid:q})}},R=(j,q)=>{!t.disabled&&(p.isValidating||p.validatingFields||y.isValidating||y.validatingFields)&&((j||Array.from(d.mount)).forEach(W=>{W&&(q?_t(n.validatingFields,W,q):Xt(n.validatingFields,W))}),_.state.next({validatingFields:n.validatingFields,isValidating:!jn(n.validatingFields)}))},A=(j,q=[],W,de,me=!0,he=!0)=>{if(de&&W&&!t.disabled){if(u.action=!0,he&&Array.isArray(we(a,j))){const Re=W(we(a,j),de.argA,de.argB);me&&_t(a,j,Re)}if(he&&Array.isArray(we(n.errors,j))){const Re=W(we(n.errors,j),de.argA,de.argB);me&&_t(n.errors,j,Re),WI(n.errors,j)}if((p.touchedFields||y.touchedFields)&&he&&Array.isArray(we(n.touchedFields,j))){const Re=W(we(n.touchedFields,j),de.argA,de.argB);me&&_t(n.touchedFields,j,Re)}(p.dirtyFields||y.dirtyFields)&&(n.dirtyFields=Is(o,l)),_.state.next({name:j,isDirty:V(j,q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else _t(l,j,q)},C=(j,q)=>{_t(n.errors,j,q),_.state.next({errors:n.errors})},O=j=>{n.errors=j,_.state.next({errors:n.errors,isValid:!1})},N=(j,q,W,de)=>{const me=we(a,j);if(me){const he=we(l,j,zt(W)?we(o,j):W);zt(he)||de&&de.defaultChecked||q?_t(l,j,q?he:VE(me._f)):ee(j,he),u.mount&&!u.action&&T()}},L=(j,q,W,de,me)=>{let he=!1,Re=!1;const Fe={name:j};if(!t.disabled){if(!W||de){(p.isDirty||y.isDirty)&&(Re=n.isDirty,n.isDirty=Fe.isDirty=V(),he=Re!==Fe.isDirty);const tt=Wr(we(o,j),q);Re=!!we(n.dirtyFields,j),tt?Xt(n.dirtyFields,j):_t(n.dirtyFields,j,!0),Fe.dirtyFields=n.dirtyFields,he=he||(p.dirtyFields||y.dirtyFields)&&Re!==!tt}if(W){const tt=we(n.touchedFields,j);tt||(_t(n.touchedFields,j,W),Fe.touchedFields=n.touchedFields,he=he||(p.touchedFields||y.touchedFields)&&tt!==W)}he&&me&&_.state.next(Fe)}return he?Fe:{}},I=(j,q,W,de)=>{const me=we(n.errors,j),he=(p.isValid||y.isValid)&&hr(q)&&n.isValid!==q;if(t.delayError&&W?(f=w(()=>C(j,W)),f(t.delayError)):(clearTimeout(h),f=null,W?_t(n.errors,j,W):Xt(n.errors,j)),(W?!Wr(me,W):me)||!jn(de)||he){const Re={...de,...he&&hr(q)?{isValid:q}:{},errors:n.errors,name:j};n={...n,...Re},_.state.next(Re)}},D=async j=>(R(j,!0),await t.resolver(l,t.context,HI(j||d.mount,a,t.criteriaMode,t.shouldUseNativeValidation))),B=async j=>{const{errors:q}=await D(j);if(R(j),j)for(const W of j){const de=we(q,W);de?_t(n.errors,W,de):Xt(n.errors,W)}else n.errors=q;return q},Z=async(j,q,W={valid:!0})=>{for(const de in j){const me=j[de];if(me){const{_f:he,...Re}=me;if(he){const Fe=d.array.has(he.name),tt=me._f&&$I(me._f);tt&&p.validatingFields&&R([he.name],!0);const Rt=await KE(me,d.disabled,l,S,t.shouldUseNativeValidation&&!q,Fe);if(tt&&p.validatingFields&&R([he.name]),Rt[he.name]&&(W.valid=!1,q))break;!q&&(we(Rt,he.name)?Fe?ZI(n.errors,Rt,he.name):_t(n.errors,he.name,Rt[he.name]):Xt(n.errors,he.name))}!jn(Re)&&await Z(Re,q,W)}}return W.valid},Y=()=>{for(const j of d.unMount){const q=we(a,j);q&&(q._f.refs?q._f.refs.every(W=>!Pm(W)):!Pm(q._f.ref))&&Se(j)}d.unMount=new Set},V=(j,q)=>!t.disabled&&(j&&q&&_t(l,j,q),!Wr(P(),o)),z=(j,q,W)=>jg(j,d,{...u.mount?l:zt(q)?o:gr(j)?{[j]:q}:q},W,q),ie=j=>kv(we(u.mount?l:o,j,t.shouldUnregister?we(o,j,[]):[])),ee=(j,q,W={})=>{const de=we(a,j);let me=q;if(de){const he=de._f;he&&(!he.disabled&&_t(l,j,jx(q,he)),me=sf(he.ref)&&Jn(q)?"":q,Lx(he.ref)?[...he.ref.options].forEach(Re=>Re.selected=me.includes(Re.value)):he.refs?Tc(he.ref)?he.refs.forEach(Re=>{(!Re.defaultChecked||!Re.disabled)&&(Array.isArray(me)?Re.checked=!!me.find(Fe=>Fe===Re.value):Re.checked=me===Re.value||!!me)}):he.refs.forEach(Re=>Re.checked=Re.value===me):Vv(he.ref)?he.ref.value="":(he.ref.value=me,he.ref.type||_.state.next({name:j,values:cn(l)})))}(W.shouldDirty||W.shouldTouch)&&L(j,me,W.shouldTouch,W.shouldDirty,!0),W.shouldValidate&&ve(j)},k=(j,q,W)=>{for(const de in q){if(!q.hasOwnProperty(de))return;const me=q[de],he=j+"."+de,Re=we(a,he);(d.array.has(j)||an(me)||Re&&!Re._f)&&!vo(me)?k(he,me,W):ee(he,me,W)}},F=(j,q,W={})=>{const de=we(a,j),me=d.array.has(j),he=cn(q);_t(l,j,he),me?(_.array.next({name:j,values:cn(l)}),(p.isDirty||p.dirtyFields||y.isDirty||y.dirtyFields)&&W.shouldDirty&&_.state.next({name:j,dirtyFields:Is(o,l),isDirty:V(j,he)})):de&&!de._f&&!Jn(he)?k(j,he,W):ee(j,he,W),GE(j,d)&&_.state.next({...n,name:j}),_.state.next({name:u.mount?j:void 0,values:cn(l)})},G=async j=>{u.mount=!0;const q=j.target;let W=q.name,de=!0;const me=we(a,W),he=tt=>{de=Number.isNaN(tt)||vo(tt)&&isNaN(tt.getTime())||Wr(tt,we(l,W,tt))},Re=HE(t.mode),Fe=HE(t.reValidateMode);if(me){let tt,Rt;const nr=q.type?VE(me._f):Mx(j),Ct=j.type===of.BLUR||j.type===of.FOCUS_OUT,Gt=!GI(me._f)&&!t.resolver&&!we(n.errors,W)&&!me._f.deps||KI(Ct,we(n.touchedFields,W),n.isSubmitted,Fe,Re),Mt=GE(W,d,Ct);_t(l,W,nr),Ct?(!q||!q.readOnly)&&(me._f.onBlur&&me._f.onBlur(j),f&&f(0)):me._f.onChange&&me._f.onChange(j);const on=L(W,nr,Ct),qt=!jn(on)||Mt;if(!Ct&&_.state.next({name:W,type:j.type,values:cn(l)}),Gt)return(p.isValid||y.isValid)&&(t.mode==="onBlur"?Ct&&T():Ct||T()),qt&&_.state.next({name:W,...Mt?{}:on});if(!Ct&&Mt&&_.state.next({...n}),t.resolver){const{errors:ei}=await D([W]);if(R([W]),he(nr),de){const Ea=qE(n.errors,a,W),Me=qE(ei,a,Ea.name||W);tt=Me.error,W=Me.name,Rt=jn(ei)}}else R([W],!0),tt=(await KE(me,d.disabled,l,S,t.shouldUseNativeValidation))[W],R([W]),he(nr),de&&(tt?Rt=!1:(p.isValid||y.isValid)&&(Rt=await Z(a,!0)));de&&(me._f.deps&&(!Array.isArray(me._f.deps)||me._f.deps.length>0)&&ve(me._f.deps),I(W,Rt,tt,on))}},ae=(j,q)=>{if(we(n.errors,q)&&j.focus)return j.focus(),1},ve=async(j,q={})=>{let W,de;const me=cc(j);if(t.resolver){const he=await B(zt(j)?j:me);W=jn(he),de=j?!me.some(Re=>we(he,Re)):W}else j?(de=(await Promise.all(me.map(async he=>{const Re=we(a,he);return await Z(Re&&Re._f?{[he]:Re}:Re)}))).every(Boolean),!(!de&&!n.isValid)&&T()):de=W=await Z(a);return _.state.next({...!gr(j)||(p.isValid||y.isValid)&&W!==n.isValid?{}:{name:j},...t.resolver||!j?{isValid:W}:{},errors:n.errors}),q.shouldFocus&&!de&&uc(a,ae,j?me:d.mount),de},P=(j,q)=>{let W={...u.mount?l:o};return q&&(W=Dx(q.dirtyFields?n.dirtyFields:n.touchedFields,W)),zt(j)?W:gr(j)?we(W,j):j.map(de=>we(W,de))},Q=(j,q)=>({invalid:!!we((q||n).errors,j),isDirty:!!we((q||n).dirtyFields,j),error:we((q||n).errors,j),isValidating:!!we(n.validatingFields,j),isTouched:!!we((q||n).touchedFields,j)}),te=j=>{j&&cc(j).forEach(q=>Xt(n.errors,q)),_.state.next({errors:j?n.errors:{}})},se=(j,q,W)=>{const de=(we(a,j,{_f:{}})._f||{}).ref,me=we(n.errors,j)||{},{ref:he,message:Re,type:Fe,...tt}=me;_t(n.errors,j,{...tt,...q,ref:de}),_.state.next({name:j,errors:n.errors,isValid:!1}),W&&W.shouldFocus&&de&&de.focus&&de.focus()},ge=(j,q)=>Un(j)?_.state.subscribe({next:W=>"values"in W&&j(z(void 0,q),W)}):z(j,q,!0),_e=j=>_.state.subscribe({next:q=>{YI(j.name,q.name,j.exact)&&qI(q,j.formState||p,At,j.reRenderRoot)&&j.callback({values:{...l},...n,...q,defaultValues:o})}}).unsubscribe,ye=j=>(u.mount=!0,y={...y,...j.formState},_e({...j,formState:{...g,...j.formState}})),Se=(j,q={})=>{for(const W of j?cc(j):d.mount)d.mount.delete(W),d.array.delete(W),q.keepValue||(Xt(a,W),Xt(l,W)),!q.keepError&&Xt(n.errors,W),!q.keepDirty&&Xt(n.dirtyFields,W),!q.keepTouched&&Xt(n.touchedFields,W),!q.keepIsValidating&&Xt(n.validatingFields,W),!t.shouldUnregister&&!q.keepDefaultValue&&Xt(o,W);_.state.next({values:cn(l)}),_.state.next({...n,...q.keepDirty?{isDirty:V()}:{}}),!q.keepIsValid&&T()},le=({disabled:j,name:q})=>{(hr(j)&&u.mount||j||d.disabled.has(q))&&(j?d.disabled.add(q):d.disabled.delete(q))},je=(j,q={})=>{let W=we(a,j);const de=hr(q.disabled)||hr(t.disabled);return _t(a,j,{...W||{},_f:{...W&&W._f?W._f:{ref:{name:j}},name:j,mount:!0,...q}}),d.mount.add(j),W?le({disabled:hr(q.disabled)?q.disabled:t.disabled,name:j}):N(j,!0,q.value),{...de?{disabled:q.disabled||t.disabled}:{},...t.progressive?{required:!!q.required,min:Zl(q.min),max:Zl(q.max),minLength:Zl(q.minLength),maxLength:Zl(q.maxLength),pattern:Zl(q.pattern)}:{},name:j,onChange:G,onBlur:G,ref:me=>{if(me){je(j,q),W=we(a,j);const he=zt(me.value)&&me.querySelectorAll&&me.querySelectorAll("input,select,textarea")[0]||me,Re=BI(he),Fe=W._f.refs||[];if(Re?Fe.find(tt=>tt===he):he===W._f.ref)return;_t(a,j,{_f:{...W._f,...Re?{refs:[...Fe.filter(Pm),he,...Array.isArray(we(o,j))?[{}]:[]],ref:{type:he.type,name:j}}:{ref:he}}}),N(j,!1,void 0,he)}else W=we(a,j,{}),W._f&&(W._f.mount=!1),(t.shouldUnregister||q.shouldUnregister)&&!(Nx(d.array,j)&&u.action)&&d.unMount.add(j)}}},at=()=>t.shouldFocusError&&uc(a,ae,d.mount),Je=j=>{hr(j)&&(_.state.next({disabled:j}),uc(a,(q,W)=>{const de=we(a,W);de&&(q.disabled=de._f.disabled||j,Array.isArray(de._f.refs)&&de._f.refs.forEach(me=>{me.disabled=de._f.disabled||j}))},0,!1))},Ft=(j,q)=>async W=>{let de;W&&(W.preventDefault&&W.preventDefault(),W.persist&&W.persist());let me=cn(l);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:he,values:Re}=await D();R(),n.errors=he,me=cn(Re)}else await Z(a);if(d.disabled.size)for(const he of d.disabled)Xt(me,he);if(Xt(n.errors,"root"),jn(n.errors)){_.state.next({errors:{}});try{await j(me,W)}catch(he){de=he}}else q&&await q({...n.errors},W),at(),setTimeout(at);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:jn(n.errors)&&!de,submitCount:n.submitCount+1,errors:n.errors}),de)throw de},re=(j,q={})=>{we(a,j)&&(zt(q.defaultValue)?F(j,cn(we(o,j))):(F(j,q.defaultValue),_t(o,j,cn(q.defaultValue))),q.keepTouched||Xt(n.touchedFields,j),q.keepDirty||(Xt(n.dirtyFields,j),n.isDirty=q.defaultValue?V(j,cn(we(o,j))):V()),q.keepError||(Xt(n.errors,j),p.isValid&&T()),_.state.next({...n}))},be=(j,q={})=>{const W=j?cn(j):o,de=cn(W),me=jn(j),he=me?o:de;if(q.keepDefaultValues||(o=W),!q.keepValues){if(q.keepDirtyValues){const Re=new Set([...d.mount,...Object.keys(Is(o,l))]);for(const Fe of Array.from(Re))we(n.dirtyFields,Fe)?_t(he,Fe,we(l,Fe)):F(Fe,we(he,Fe))}else{if(Pv&&zt(j))for(const Re of d.mount){const Fe=we(a,Re);if(Fe&&Fe._f){const tt=Array.isArray(Fe._f.refs)?Fe._f.refs[0]:Fe._f.ref;if(sf(tt)){const Rt=tt.closest("form");if(Rt){Rt.reset();break}}}}if(q.keepFieldsRef)for(const Re of d.mount)F(Re,we(he,Re));else a={}}l=t.shouldUnregister?q.keepDefaultValues?cn(o):{}:cn(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:""},u.mount=!p.isValid||!!q.keepIsValid||!!q.keepDirtyValues||!t.shouldUnregister&&!jn(he),u.watch=!!t.shouldUnregister,u.keepIsValid=!!q.keepIsValid,u.action=!1,q.keepErrors||(n.errors={}),_.state.next({submitCount:q.keepSubmitCount?n.submitCount:0,isDirty:me?!1:q.keepDirty?n.isDirty:!!(q.keepDefaultValues&&!Wr(j,o)),isSubmitted:q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:me?{}:q.keepDirtyValues?q.keepDefaultValues&&l?Is(o,l):n.dirtyFields:q.keepDefaultValues&&j?Is(o,j):q.keepDirty?n.dirtyFields:{},touchedFields:q.keepTouched?n.touchedFields:{},errors:q.keepErrors?n.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Le=(j,q)=>be(Un(j)?j(l):j,{...t.resetOptions,...q}),Ye=(j,q={})=>{const W=we(a,j),de=W&&W._f;if(de){const me=de.refs?de.refs[0]:de.ref;me.focus&&setTimeout(()=>{me.focus(),q.shouldSelect&&Un(me.select)&&me.select()})}},At=j=>{n={...n,...j}},et={control:{register:je,unregister:Se,getFieldState:Q,handleSubmit:Ft,setError:se,_subscribe:_e,_runSchema:D,_updateIsValidating:R,_focusError:at,_getWatch:z,_getDirty:V,_setValid:T,_setFieldArray:A,_setDisabledField:le,_setErrors:O,_getFieldArray:ie,_reset:be,_resetDefaultValues:()=>Un(t.defaultValues)&&t.defaultValues().then(j=>{Le(j,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:Y,_disableForm:Je,_subjects:_,_proxyFormState:p,get _fields(){return a},get _formValues(){return l},get _state(){return u},set _state(j){u=j},get _defaultValues(){return o},get _names(){return d},set _names(j){d=j},get _formState(){return n},get _options(){return t},set _options(j){t={...t,...j}}},subscribe:ye,trigger:ve,register:je,handleSubmit:Ft,watch:ge,setValue:F,getValues:P,reset:Le,resetField:re,clearErrors:te,unregister:Se,setError:se,setFocus:Ye,getFieldState:Q};return{...et,formControl:et}}function Wa(e={}){const t=H.useRef(void 0),n=H.useRef(void 0),[a,o]=H.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:a},e.defaultValues&&!Un(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...d}=XI(e);t.current={...d,formState:a}}const l=t.current.control;return l._options=e,Bv(()=>{const u=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(d=>({...d,isReady:!0})),l._formState.isReady=!0,u},[l]),H.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),H.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),H.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),H.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),H.useEffect(()=>{if(l._proxyFormState.isDirty){const u=l._getDirty();u!==a.isDirty&&l._subjects.state.next({isDirty:u})}},[l,a.isDirty]),H.useEffect(()=>{var u;e.values&&!Wr(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((u=l._options.resetOptions)===null||u===void 0)&&u.keepIsValid||l._setValid(),n.current=e.values,o(d=>({...d}))):l._resetDefaultValues()},[l,e.values]),H.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=Ix(a,l),t.current}function WE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ac(...e){return t=>{let n=!1;const a=e.map(o=>{const l=WE(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<a.length;o++){const l=a[o];typeof l=="function"?l():WE(e[o],null)}}}}function fn(...e){return E.useCallback(Ac(...e),e)}var JI=Symbol.for("react.lazy"),cf=uv[" use ".trim().toString()];function eD(e){return typeof e=="object"&&e!==null&&"then"in e}function Bx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===JI&&"_payload"in e&&eD(e._payload)}function zx(e){const t=tD(e),n=E.forwardRef((a,o)=>{let{children:l,...u}=a;Bx(l)&&typeof cf=="function"&&(l=cf(l._payload));const d=E.Children.toArray(l),f=d.find(rD);if(f){const h=f.props.children,g=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...u,ref:o,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var Fx=zx("Slot");function tD(e){const t=E.forwardRef((n,a)=>{let{children:o,...l}=n;if(Bx(o)&&typeof cf=="function"&&(o=cf(o._payload)),E.isValidElement(o)){const u=iD(o),d=aD(l,o.props);return o.type!==E.Fragment&&(d.ref=a?Ac(a,u):u),E.cloneElement(o,d)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nD=Symbol("radix.slottable");function rD(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nD}function aD(e,t){const n={...t};for(const a in t){const o=e[a],l=t[a];/^on[A-Z]/.test(a)?o&&l?n[a]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[a]=o):a==="style"?n[a]={...o,...l}:a==="className"&&(n[a]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function iD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const ZE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,QE=ax,oD=(e,t)=>n=>{var a;if(t?.variants==null)return QE(e,n?.class,n?.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(h=>{const g=n?.[h],p=l?.[h];if(g===null)return null;const y=ZE(g)||ZE(p);return o[h][y]}),d=n&&Object.entries(n).reduce((h,g)=>{let[p,y]=g;return y===void 0||(h[p]=y),h},{}),f=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,g)=>{let{class:p,className:y,..._}=g;return Object.entries(_).every(S=>{let[w,T]=S;return Array.isArray(T)?T.includes({...l,...d}[w]):{...l,...d}[w]===T})?[...h,p,y]:h},[]);return QE(e,u,f,n?.class,n?.className)},XE=(e,t,n)=>{if(e&&"reportValidity"in e){const a=we(n,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},zg=(e,t)=>{for(const n in t.fields){const a=t.fields[n];a&&a.ref&&"reportValidity"in a.ref?XE(a.ref,n,e):a&&a.refs&&a.refs.forEach(o=>XE(o,n,e))}},JE=(e,t)=>{t.shouldUseNativeValidation&&zg(e,t);const n={};for(const a in e){const o=we(t.fields,a),l=Object.assign(e[a]||{},{ref:o&&o.ref});if(sD(t.names||Object.keys(e),a)){const u=Object.assign({},we(n,a));_t(u,"root",l),_t(n,a,u)}else _t(n,a,l)}return n},sD=(e,t)=>{const n=eS(t);return e.some(a=>eS(a).match(`^${n}\\.\\d+`))};function eS(e){return e.replace(/\]|\[/g,"")}function Vx(e,t,n){function a(d,f){var h;Object.defineProperty(d,"_zod",{value:d._zod??{},enumerable:!1}),(h=d._zod).traits??(h.traits=new Set),d._zod.traits.add(e),t(d,f);for(const g in u.prototype)g in d||Object.defineProperty(d,g,{value:u.prototype[g].bind(d)});d._zod.constr=u,d._zod.def=f}const o=n?.Parent??Object;class l extends o{}Object.defineProperty(l,"name",{value:e});function u(d){var f;const h=n?.Parent?new l:this;a(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class Hx extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const lD={};function Mf(e){return lD}function ZB(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>t.indexOf(+a)===-1).map(([a,o])=>o)}function cD(e,t){return typeof t=="bigint"?t.toString():t}function uD(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function QB(e){return e==null}function XB(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function JB(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}function ez(e,t,n){Object.defineProperty(e,t,{get(){{const a=n();return e[t]=a,a}},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function $x(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function tz(e){return JSON.stringify(e)}const Gx=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function tS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const nz=uD(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function dD(e){if(tS(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(tS(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const rz=new Set(["string","number","symbol"]);function az(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ws(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function iz(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 oz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const sz={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 lz(e,t){const n={},a=e._zod.def;for(const o in t){if(!(o in a.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(n[o]=a.shape[o])}return Ws(e,{...e._zod.def,shape:n,checks:[]})}function cz(e,t){const n={...e._zod.def.shape},a=e._zod.def;for(const o in t){if(!(o in a.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete n[o]}return Ws(e,{...e._zod.def,shape:n,checks:[]})}function uz(e,t){if(!dD(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const a={...e._zod.def.shape,...t};return $x(this,"shape",a),a},checks:[]};return Ws(e,n)}function dz(e,t){return Ws(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return $x(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function fz(e,t,n){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)o[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return Ws(t,{...t._zod.def,shape:o,checks:[]})}function hz(e,t,n){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)o[l]=new e({type:"nonoptional",innerType:a[l]});return Ws(t,{...t._zod.def,shape:o,checks:[]})}function pz(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function mz(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function ld(e){return typeof e=="string"?e:e?.message}function Nf(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const o=ld(e.inst?._zod.def?.error?.(e))??ld(t?.error?.(e))??ld(n.customError?.(e))??ld(n.localeError?.(e))??"Invalid input";a.message=o}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function gz(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vz(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const qx=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,cD,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Yx=Vx("$ZodError",qx),If=Vx("$ZodError",qx,{Parent:Error});function yz(e,t=n=>n.message){const n={},a=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):a.push(t(o));return{formErrors:a,fieldErrors:n}}function bz(e,t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>o({issues:d}));else if(u.code==="invalid_key")o({issues:u.issues});else if(u.code==="invalid_element")o({issues:u.issues});else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(e),a}const fD=e=>(t,n,a,o)=>{const l=a?Object.assign(a,{async:!1}):{async:!1},u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise)throw new Hx;if(u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>Nf(f,l,Mf())));throw Gx(d,o?.callee),d}return u.value},hD=fD(If),pD=e=>async(t,n,a,o)=>{const l=a?Object.assign(a,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise&&(u=await u),u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>Nf(f,l,Mf())));throw Gx(d,o?.callee),d}return u.value},mD=pD(If),gD=e=>(t,n,a)=>{const o=a?{...a,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new Hx;return l.issues.length?{success:!1,error:new(e??Yx)(l.issues.map(u=>Nf(u,o,Mf())))}:{success:!0,data:l.value}},_z=gD(If),vD=e=>async(t,n,a)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},o);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(u=>Nf(u,o,Mf())))}:{success:!0,data:l.value}},Ez=vD(If);function nS(e,t){try{var n=e()}catch(a){return t(a)}return n&&n.then?n.then(void 0,t):n}function yD(e,t){for(var n={};e.length;){var a=e[0],o=a.code,l=a.message,u=a.path.join(".");if(!n[u])if("unionErrors"in a){var d=a.unionErrors[0].errors[0];n[u]={message:d.message,type:d.code}}else n[u]={message:l,type:o};if("unionErrors"in a&&a.unionErrors.forEach(function(g){return g.errors.forEach(function(p){return e.push(p)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=Fv(u,t,n,o,h?[].concat(h,a.message):a.message)}e.shift()}return n}function bD(e,t){for(var n={};e.length;){var a=e[0],o=a.code,l=a.message,u=a.path.join(".");if(!n[u])if(a.code==="invalid_union"&&a.errors.length>0){var d=a.errors[0][0];n[u]={message:d.message,type:d.code}}else n[u]={message:l,type:o};if(a.code==="invalid_union"&&a.errors.forEach(function(g){return g.forEach(function(p){return e.push(p)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=Fv(u,t,n,o,h?[].concat(h,a.message):a.message)}e.shift()}return n}function Za(e,t,n){if(n===void 0&&(n={}),(function(a){return"_def"in a&&typeof a._def=="object"&&"typeName"in a._def})(e))return function(a,o,l){try{return Promise.resolve(nS(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(u){return l.shouldUseNativeValidation&&zg({},l),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if((function(d){return Array.isArray(d?.issues)})(u))return{values:{},errors:JE(yD(u.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};if((function(a){return"_zod"in a&&typeof a._zod=="object"})(e))return function(a,o,l){try{return Promise.resolve(nS(function(){return Promise.resolve((n.mode==="sync"?hD:mD)(e,a,t)).then(function(u){return l.shouldUseNativeValidation&&zg({},l),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if((function(d){return d instanceof Yx})(u))return{values:{},errors:JE(bD(u.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};throw new Error("Invalid input: not a Zod schema")}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function _D(e,t){const n=E.createContext(t),a=l=>{const{children:u,...d}=l,f=E.useMemo(()=>d,Object.values(d));return b.jsx(n.Provider,{value:f,children:u})};a.displayName=e+"Provider";function o(l){const u=E.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[a,o]}function Lo(e,t=[]){let n=[];function a(l,u){const d=E.createContext(u),f=n.length;n=[...n,u];const h=p=>{const{scope:y,children:_,...S}=p,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(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const o=()=>{const l=n.map(u=>E.createContext(u));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[a,ED(o,...t)]}function ED(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=a.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Qr=globalThis?.document?E.useLayoutEffect:()=>{},SD=uv[" useId ".trim().toString()]||(()=>{}),wD=0;function Ui(e){const[t,n]=E.useState(SD());return Qr(()=>{n(a=>a??String(wD++))},[e]),e||(t?`radix-${t}`:"")}var xD=uv[" useInsertionEffect ".trim().toString()]||Qr;function Cc({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[o,l,u]=RD({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:o;{const g=E.useRef(e!==void 0);E.useEffect(()=>{const p=g.current;p!==d&&console.warn(`${a} is changing from ${p?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,a])}const h=E.useCallback(g=>{if(d){const p=OD(g)?g(e):g;p!==e&&u.current?.(p)}else l(g)},[d,e,l,u]);return[f,h]}function RD({defaultProp:e,onChange:t}){const[n,a]=E.useState(e),o=E.useRef(n),l=E.useRef(t);return xD(()=>{l.current=t},[t]),E.useEffect(()=>{o.current!==n&&(l.current?.(n),o.current=n)},[n,o]),[n,a,l]}function OD(e){return typeof e=="function"}function bc(e){const t=TD(e),n=E.forwardRef((a,o)=>{const{children:l,...u}=a,d=E.Children.toArray(l),f=d.find(AD);if(f){const h=f.props.children,g=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...u,ref:o,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return b.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function TD(e){const t=E.forwardRef((n,a)=>{const{children:o,...l}=n;if(E.isValidElement(o)){const u=MD(o),d=CD(l,o.props);return o.type!==E.Fragment&&(d.ref=a?Ac(a,u):u),E.cloneElement(o,d)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kx=Symbol("radix.slottable");function Sz(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kx,t}function AD(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kx}function CD(e,t){const n={...t};for(const a in t){const o=e[a],l=t[a];/^on[A-Z]/.test(a)?o&&l?n[a]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[a]=o):a==="style"?n[a]={...o,...l}:a==="className"&&(n[a]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function MD(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 ND=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jt=ND.reduce((e,t)=>{const n=bc(`Primitive.${t}`),a=E.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function Wx(e,t){e&&Tf.flushSync(()=>e.dispatchEvent(t))}function Xr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>t.current?.(...n),[])}function ID(e,t=globalThis?.document){const n=Xr(e);E.useEffect(()=>{const a=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var DD="DismissableLayer",Fg="dismissableLayer.update",LD="dismissableLayer.pointerDownOutside",PD="dismissableLayer.focusOutside",rS,Zx=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$v=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,h=E.useContext(Zx),[g,p]=E.useState(null),y=g?.ownerDocument??globalThis?.document,[,_]=E.useState({}),S=fn(t,I=>p(I)),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,N=UD(I=>{const D=I.target,B=[...h.branches].some(Z=>Z.contains(D));!O||B||(o?.(I),u?.(I),I.defaultPrevented||d?.())},y),L=BD(I=>{const D=I.target;[...h.branches].some(Z=>Z.contains(D))||(l?.(I),u?.(I),I.defaultPrevented||d?.())},y);return ID(I=>{A===h.layers.size-1&&(a?.(I),!I.defaultPrevented&&d&&(I.preventDefault(),d()))},y),E.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(rS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),aS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=rS)}},[g,y,n,h]),E.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),aS())},[g,h]),E.useEffect(()=>{const I=()=>_({});return document.addEventListener(Fg,I),()=>document.removeEventListener(Fg,I)},[]),b.jsx(jt.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,N.onPointerDownCapture)})});$v.displayName=DD;var kD="DismissableLayerBranch",jD=E.forwardRef((e,t)=>{const n=E.useContext(Zx),a=E.useRef(null),o=fn(t,a);return E.useEffect(()=>{const l=a.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),b.jsx(jt.div,{...e,ref:o})});jD.displayName=kD;function UD(e,t=globalThis?.document){const n=Xr(e),a=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const l=d=>{if(d.target&&!a.current){let f=function(){Qx(LD,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);a.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function BD(e,t=globalThis?.document){const n=Xr(e),a=E.useRef(!1);return E.useEffect(()=>{const o=l=>{l.target&&!a.current&&Qx(PD,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function aS(){const e=new CustomEvent(Fg);document.dispatchEvent(e)}function Qx(e,t,n,{discrete:a}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),a?Wx(o,l):o.dispatchEvent(l)}var km="focusScope.autoFocusOnMount",jm="focusScope.autoFocusOnUnmount",iS={bubbles:!1,cancelable:!0},zD="FocusScope",Gv=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...u}=e,[d,f]=E.useState(null),h=Xr(o),g=Xr(l),p=E.useRef(null),y=fn(t,w=>f(w)),_=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(a){let w=function(C){if(_.paused||!d)return;const O=C.target;d.contains(O)?p.current=O:Ci(p.current,{select:!0})},T=function(C){if(_.paused||!d)return;const O=C.relatedTarget;O!==null&&(d.contains(O)||Ci(p.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&Ci(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()}}},[a,d,_.paused]),E.useEffect(()=>{if(d){sS.add(_);const w=document.activeElement;if(!d.contains(w)){const R=new CustomEvent(km,iS);d.addEventListener(km,h),d.dispatchEvent(R),R.defaultPrevented||(FD(qD(Xx(d)),{select:!0}),document.activeElement===w&&Ci(d))}return()=>{d.removeEventListener(km,h),setTimeout(()=>{const R=new CustomEvent(jm,iS);d.addEventListener(jm,g),d.dispatchEvent(R),R.defaultPrevented||Ci(w??document.body,{select:!0}),d.removeEventListener(jm,g),sS.remove(_)},0)}}},[d,h,g,_]);const S=E.useCallback(w=>{if(!n&&!a||_.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]=VD(A);C&&O?!w.shiftKey&&R===O?(w.preventDefault(),n&&Ci(C,{select:!0})):w.shiftKey&&R===C&&(w.preventDefault(),n&&Ci(O,{select:!0})):R===A&&w.preventDefault()}},[n,a,_.paused]);return b.jsx(jt.div,{tabIndex:-1,...u,ref:y,onKeyDown:S})});Gv.displayName=zD;function FD(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Ci(a,{select:t}),document.activeElement!==n)return}function VD(e){const t=Xx(e),n=oS(t,e),a=oS(t.reverse(),e);return[n,a]}function Xx(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oS(e,t){for(const n of e)if(!HD(n,{upTo:t}))return n}function HD(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 $D(e){return e instanceof HTMLInputElement&&"select"in e}function Ci(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$D(e)&&t&&e.select()}}var sS=GD();function GD(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=lS(e,t),e.unshift(t)},remove(t){e=lS(e,t),e[0]?.resume()}}}function lS(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function qD(e){return e.filter(t=>t.tagName!=="A")}var YD="Portal",qv=E.forwardRef((e,t)=>{const{container:n,...a}=e,[o,l]=E.useState(!1);Qr(()=>l(!0),[]);const u=n||o&&globalThis?.document?.body;return u?Bw.createPortal(b.jsx(jt.div,{...a,ref:t}),u):null});qv.displayName=YD;function KD(e,t){return E.useReducer((n,a)=>t[n][a]??n,e)}var Qa=e=>{const{present:t,children:n}=e,a=WD(t),o=typeof n=="function"?n({present:a.isPresent}):E.Children.only(n),l=fn(a.ref,ZD(o));return typeof n=="function"||a.isPresent?E.cloneElement(o,{ref:l}):null};Qa.displayName="Presence";function WD(e){const[t,n]=E.useState(),a=E.useRef(null),o=E.useRef(e),l=E.useRef("none"),u=e?"mounted":"unmounted",[d,f]=KD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=cd(a.current);l.current=d==="mounted"?h:"none"},[d]),Qr(()=>{const h=a.current,g=o.current;if(g!==e){const y=l.current,_=cd(h);e?f("MOUNT"):_==="none"||h?.display==="none"?f("UNMOUNT"):f(g&&y!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Qr(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,p=_=>{const w=cd(a.current).includes(CSS.escape(_.animationName));if(_.target===t&&w&&(f("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},y=_=>{_.target===t&&(l.current=cd(a.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:E.useCallback(h=>{a.current=h?getComputedStyle(h):null,n(h)},[])}}function cd(e){return e?.animationName||"none"}function ZD(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 Um=0;function Jx(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cS()),document.body.insertAdjacentElement("beforeend",e[1]??cS()),Um++,()=>{Um===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Um--}},[])}function cS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var da=function(){return da=Object.assign||function(t){for(var n,a=1,o=arguments.length;a<o;a++){n=arguments[a];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},da.apply(this,arguments)};function eR(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n}function QD(e,t,n){if(n||arguments.length===2)for(var a=0,o=t.length,l;a<o;a++)(l||!(a in t))&&(l||(l=Array.prototype.slice.call(t,0,a)),l[a]=t[a]);return e.concat(l||Array.prototype.slice.call(t))}var Ad="right-scroll-bar-position",Cd="width-before-scroll-bar",XD="with-scroll-bars-hidden",JD="--removed-body-scroll-bar-size";function Bm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eL(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var o=n.value;o!==a&&(n.value=a,n.callback(a,o))}}}})[0];return n.callback=t,n.facade}var tL=typeof window<"u"?E.useLayoutEffect:E.useEffect,uS=new WeakMap;function nL(e,t){var n=eL(null,function(a){return e.forEach(function(o){return Bm(o,a)})});return tL(function(){var a=uS.get(n);if(a){var o=new Set(a),l=new Set(e),u=n.current;o.forEach(function(d){l.has(d)||Bm(d,null)}),l.forEach(function(d){o.has(d)||Bm(d,u)})}uS.set(n,e)},[e]),n}function rL(e){return e}function aL(e,t){t===void 0&&(t=rL);var n=[],a=!1,o={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var u=t(l,a);return n.push(u),function(){n=n.filter(function(d){return d!==u})}},assignSyncMedium:function(l){for(a=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){a=!0;var u=[];if(n.length){var d=n;n=[],d.forEach(l),u=n}var f=function(){var g=u;u=[],g.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(g){u.push(g),h()},filter:function(g){return u=u.filter(g),n}}}};return o}function iL(e){e===void 0&&(e={});var t=aL(null);return t.options=da({async:!0,ssr:!1},e),t}var tR=function(e){var t=e.sideCar,n=eR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return E.createElement(a,da({},n))};tR.isSideCarExport=!0;function oL(e,t){return e.useMedium(t),tR}var nR=iL(),zm=function(){},Df=E.forwardRef(function(e,t){var n=E.useRef(null),a=E.useState({onScrollCapture:zm,onWheelCapture:zm,onTouchMoveCapture:zm}),o=a[0],l=a[1],u=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,g=e.enabled,p=e.shards,y=e.sideCar,_=e.noRelative,S=e.noIsolation,w=e.inert,T=e.allowPinchZoom,R=e.as,A=R===void 0?"div":R,C=e.gapMode,O=eR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=y,L=nL([n,t]),I=da(da({},O),o);return E.createElement(E.Fragment,null,g&&E.createElement(N,{sideCar:nR,removeScrollBar:h,shards:p,noRelative:_,noIsolation:S,inert:w,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:C}),u?E.cloneElement(E.Children.only(d),da(da({},I),{ref:L})):E.createElement(A,da({},I,{className:f,ref:L}),d))});Df.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Df.classNames={fullWidth:Cd,zeroRight:Ad};var sL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sL();return t&&e.setAttribute("nonce",t),e}function cL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function uL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lL())&&(cL(t,n),uL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fL=function(){var e=dL();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rR=function(){var e=fL(),t=function(n){var a=n.styles,o=n.dynamic;return e(a,o),null};return t},hL={left:0,top:0,right:0,gap:0},Fm=function(e){return parseInt(e||"",10)||0},pL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Fm(n),Fm(a),Fm(o)]},mL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return hL;var t=pL(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},gL=rR(),js="data-scroll-locked",vL=function(e,t,n,a){var o=e.left,l=e.top,u=e.right,d=e.gap;return n===void 0&&(n="margin"),`
24
- .`.concat(XD,` {
25
- overflow: hidden `).concat(a,`;
26
- padding-right: `).concat(d,"px ").concat(a,`;
27
- }
28
- body[`).concat(js,`] {
29
- overflow: hidden `).concat(a,`;
30
- overscroll-behavior: contain;
31
- `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
32
- padding-left: `.concat(o,`px;
33
- padding-top: `).concat(l,`px;
34
- padding-right: `).concat(u,`px;
35
- margin-left:0;
36
- margin-top:0;
37
- margin-right: `).concat(d,"px ").concat(a,`;
38
- `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(a,";")].filter(Boolean).join(""),`
39
- }
40
-
41
- .`).concat(Ad,` {
42
- right: `).concat(d,"px ").concat(a,`;
43
- }
44
-
45
- .`).concat(Cd,` {
46
- margin-right: `).concat(d,"px ").concat(a,`;
47
- }
48
-
49
- .`).concat(Ad," .").concat(Ad,` {
50
- right: 0 `).concat(a,`;
51
- }
52
-
53
- .`).concat(Cd," .").concat(Cd,` {
54
- margin-right: 0 `).concat(a,`;
55
- }
56
-
57
- body[`).concat(js,`] {
58
- `).concat(JD,": ").concat(d,`px;
59
- }
60
- `)},dS=function(){var e=parseInt(document.body.getAttribute(js)||"0",10);return isFinite(e)?e:0},yL=function(){E.useEffect(function(){return document.body.setAttribute(js,(dS()+1).toString()),function(){var e=dS()-1;e<=0?document.body.removeAttribute(js):document.body.setAttribute(js,e.toString())}},[])},bL=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;yL();var l=E.useMemo(function(){return mL(o)},[o]);return E.createElement(gL,{styles:vL(l,!t,o,n?"":"!important")})},Vg=!1;if(typeof window<"u")try{var ud=Object.defineProperty({},"passive",{get:function(){return Vg=!0,!0}});window.addEventListener("test",ud,ud),window.removeEventListener("test",ud,ud)}catch{Vg=!1}var xs=Vg?{passive:!1}:!1,_L=function(e){return e.tagName==="TEXTAREA"},aR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_L(e)&&n[t]==="visible")},EL=function(e){return aR(e,"overflowY")},SL=function(e){return aR(e,"overflowX")},fS=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=iR(e,a);if(o){var l=oR(e,a),u=l[1],d=l[2];if(u>d)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},wL=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},xL=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},iR=function(e,t){return e==="v"?EL(t):SL(t)},oR=function(e,t){return e==="v"?wL(t):xL(t)},RL=function(e,t){return e==="h"&&t==="rtl"?-1:1},OL=function(e,t,n,a,o){var l=RL(e,window.getComputedStyle(t).direction),u=l*a,d=n.target,f=t.contains(d),h=!1,g=u>0,p=0,y=0;do{if(!d)break;var _=oR(e,d),S=_[0],w=_[1],T=_[2],R=w-T-l*S;(S||R)&&iR(e,d)&&(p+=R,y+=S);var A=d.parentNode;d=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(g&&Math.abs(p)<1||!g&&Math.abs(y)<1)&&(h=!0),h},dd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hS=function(e){return[e.deltaX,e.deltaY]},pS=function(e){return e&&"current"in e?e.current:e},TL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},AL=function(e){return`
61
- .block-interactivity-`.concat(e,` {pointer-events: none;}
62
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
63
- `)},CL=0,Rs=[];function ML(e){var t=E.useRef([]),n=E.useRef([0,0]),a=E.useRef(),o=E.useState(CL++)[0],l=E.useState(rR)[0],u=E.useRef(e);E.useEffect(function(){u.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=QD([e.lockRef.current],(e.shards||[]).map(pS),!0).filter(Boolean);return w.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[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!u.current.allowPinchZoom;var R=dd(w),A=n.current,C="deltaX"in w?w.deltaX:A[0]-R[0],O="deltaY"in w?w.deltaY:A[1]-R[1],N,L=w.target,I=Math.abs(C)>Math.abs(O)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var D=window.getSelection(),B=D&&D.anchorNode,Z=B?B===L||B.contains(L):!1;if(Z)return!1;var Y=fS(I,L);if(!Y)return!0;if(Y?N=I:(N=I==="v"?"h":"v",Y=fS(I,L)),!Y)return!1;if(!a.current&&"changedTouches"in w&&(C||O)&&(a.current=N),!N)return!0;var V=a.current||N;return OL(V,T,w,V==="h"?C:O)},[]),f=E.useCallback(function(w){var T=w;if(!(!Rs.length||Rs[Rs.length-1]!==l)){var R="deltaY"in T?hS(T):dd(T),A=t.current.filter(function(N){return N.name===T.type&&(N.target===T.target||T.target===N.shadowParent)&&TL(N.delta,R)})[0];if(A&&A.should){T.cancelable&&T.preventDefault();return}if(!A){var C=(u.current.shards||[]).map(pS).filter(Boolean).filter(function(N){return N.contains(T.target)}),O=C.length>0?d(T,C[0]):!u.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:NL(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=dd(w),a.current=void 0},[]),p=E.useCallback(function(w){h(w.type,hS(w),w.target,d(w,e.lockRef.current))},[]),y=E.useCallback(function(w){h(w.type,dd(w),w.target,d(w,e.lockRef.current))},[]);E.useEffect(function(){return Rs.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",f,xs),document.addEventListener("touchmove",f,xs),document.addEventListener("touchstart",g,xs),function(){Rs=Rs.filter(function(w){return w!==l}),document.removeEventListener("wheel",f,xs),document.removeEventListener("touchmove",f,xs),document.removeEventListener("touchstart",g,xs)}},[]);var _=e.removeScrollBar,S=e.inert;return E.createElement(E.Fragment,null,S?E.createElement(l,{styles:AL(o)}):null,_?E.createElement(bL,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function NL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const IL=oL(nR,ML);var Yv=E.forwardRef(function(e,t){return E.createElement(Df,da({},e,{ref:t,sideCar:IL}))});Yv.classNames=Df.classNames;var DL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Os=new WeakMap,fd=new WeakMap,hd={},Vm=0,sR=function(e){return e&&(e.host||sR(e.parentNode))},LL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=sR(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},PL=function(e,t,n,a){var o=LL(t,Array.isArray(e)?e:[e]);hd[n]||(hd[n]=new WeakMap);var l=hd[n],u=[],d=new Set,f=new Set(o),h=function(p){!p||d.has(p)||(d.add(p),h(p.parentNode))};o.forEach(h);var g=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(y){if(d.has(y))g(y);else try{var _=y.getAttribute(a),S=_!==null&&_!=="false",w=(Os.get(y)||0)+1,T=(l.get(y)||0)+1;Os.set(y,w),l.set(y,T),u.push(y),w===1&&S&&fd.set(y,!0),T===1&&y.setAttribute(n,"true"),S||y.setAttribute(a,"true")}catch(R){console.error("aria-hidden: cannot operate on ",y,R)}})};return g(t),d.clear(),Vm++,function(){u.forEach(function(p){var y=Os.get(p)-1,_=l.get(p)-1;Os.set(p,y),l.set(p,_),y||(fd.has(p)||p.removeAttribute(a),fd.delete(p)),_||p.removeAttribute(n)}),Vm--,Vm||(Os=new WeakMap,Os=new WeakMap,fd=new WeakMap,hd={})}},lR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=DL(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),PL(a,o,n,"aria-hidden")):function(){return null}},Lf="Dialog",[cR,wz]=Lo(Lf),[kL,ta]=cR(Lf),uR=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,d=E.useRef(null),f=E.useRef(null),[h,g]=Cc({prop:a,defaultProp:o??!1,onChange:l,caller:Lf});return b.jsx(kL,{scope:t,triggerRef:d,contentRef:f,contentId:Ui(),titleId:Ui(),descriptionId:Ui(),open:h,onOpenChange:g,onOpenToggle:E.useCallback(()=>g(p=>!p),[g]),modal:u,children:n})};uR.displayName=Lf;var dR="DialogTrigger",fR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(dR,n),l=fn(t,o.triggerRef);return b.jsx(jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zv(o.open),...a,ref:l,onClick:Ge(e.onClick,o.onOpenToggle)})});fR.displayName=dR;var Kv="DialogPortal",[jL,hR]=cR(Kv,{forceMount:void 0}),pR=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:o}=e,l=ta(Kv,t);return b.jsx(jL,{scope:t,forceMount:n,children:E.Children.map(a,u=>b.jsx(Qa,{present:n||l.open,children:b.jsx(qv,{asChild:!0,container:o,children:u})}))})};pR.displayName=Kv;var uf="DialogOverlay",mR=E.forwardRef((e,t)=>{const n=hR(uf,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,l=ta(uf,e.__scopeDialog);return l.modal?b.jsx(Qa,{present:a||l.open,children:b.jsx(BL,{...o,ref:t})}):null});mR.displayName=uf;var UL=bc("DialogOverlay.RemoveScroll"),BL=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(uf,n);return b.jsx(Yv,{as:UL,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(jt.div,{"data-state":Zv(o.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Co="DialogContent",gR=E.forwardRef((e,t)=>{const n=hR(Co,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,l=ta(Co,e.__scopeDialog);return b.jsx(Qa,{present:a||l.open,children:l.modal?b.jsx(zL,{...o,ref:t}):b.jsx(FL,{...o,ref:t})})});gR.displayName=Co;var zL=E.forwardRef((e,t)=>{const n=ta(Co,e.__scopeDialog),a=E.useRef(null),o=fn(t,n.contentRef,a);return E.useEffect(()=>{const l=a.current;if(l)return lR(l)},[]),b.jsx(vR,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&l.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,l=>l.preventDefault())})}),FL=E.forwardRef((e,t)=>{const n=ta(Co,e.__scopeDialog),a=E.useRef(!1),o=E.useRef(!1);return b.jsx(vR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(a.current||n.triggerRef.current?.focus(),l.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(a.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;n.triggerRef.current?.contains(u)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),vR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=e,d=ta(Co,n),f=E.useRef(null),h=fn(t,f);return Jx(),b.jsxs(b.Fragment,{children:[b.jsx(Gv,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:l,children:b.jsx($v,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Zv(d.open),...u,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(VL,{titleId:d.titleId}),b.jsx($L,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Wv="DialogTitle",yR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(Wv,n);return b.jsx(jt.h2,{id:o.titleId,...a,ref:t})});yR.displayName=Wv;var bR="DialogDescription",_R=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(bR,n);return b.jsx(jt.p,{id:o.descriptionId,...a,ref:t})});_R.displayName=bR;var ER="DialogClose",SR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=ta(ER,n);return b.jsx(jt.button,{type:"button",...a,ref:t,onClick:Ge(e.onClick,()=>o.onOpenChange(!1))})});SR.displayName=ER;function Zv(e){return e?"open":"closed"}var wR="DialogTitleWarning",[xz,xR]=_D(wR,{contentName:Co,titleName:Wv,docsSlug:"dialog"}),VL=({titleId:e})=>{const t=xR(wR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
64
-
65
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
66
-
67
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},HL="DialogDescriptionWarning",$L=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xR(HL).contentName}}.`;return E.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},GL=uR,qL=fR,YL=pR,KL=mR,WL=gR,ZL=yR,Rz=_R,Oz=SR;function RR(e){const t=e+"CollectionProvider",[n,a]=Lo(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:T,children:R}=w,A=H.useRef(null),C=H.useRef(new Map).current;return b.jsx(o,{scope:T,itemMap:C,collectionRef:A,children:R})};u.displayName=t;const d=e+"CollectionSlot",f=bc(d),h=H.forwardRef((w,T)=>{const{scope:R,children:A}=w,C=l(d,R),O=fn(T,C.collectionRef);return b.jsx(f,{ref:O,children:A})});h.displayName=d;const g=e+"CollectionItemSlot",p="data-radix-collection-item",y=bc(g),_=H.forwardRef((w,T)=>{const{scope:R,children:A,...C}=w,O=H.useRef(null),N=fn(T,O),L=l(g,R);return H.useEffect(()=>(L.itemMap.set(O,{ref:O,...C}),()=>{L.itemMap.delete(O)})),b.jsx(y,{[p]:"",ref:N,children:A})});_.displayName=g;function S(w){const T=l(e+"CollectionConsumer",w);return H.useCallback(()=>{const A=T.collectionRef.current;if(!A)return[];const C=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(T.itemMap.values()).sort((L,I)=>C.indexOf(L.ref.current)-C.indexOf(I.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:u,Slot:h,ItemSlot:_},S,a]}var QL=E.createContext(void 0);function OR(e){const t=E.useContext(QL);return e||t||"ltr"}const XL=["top","right","bottom","left"],Vi=Math.min,mr=Math.max,df=Math.round,pd=Math.floor,ga=e=>({x:e,y:e}),JL={left:"right",right:"left",bottom:"top",top:"bottom"},e8={start:"end",end:"start"};function Hg(e,t,n){return mr(e,Vi(t,n))}function qa(e,t){return typeof e=="function"?e(t):e}function Ya(e){return e.split("-")[0]}function Zs(e){return e.split("-")[1]}function Qv(e){return e==="x"?"y":"x"}function Xv(e){return e==="y"?"height":"width"}const t8=new Set(["top","bottom"]);function pa(e){return t8.has(Ya(e))?"y":"x"}function Jv(e){return Qv(pa(e))}function n8(e,t,n){n===void 0&&(n=!1);const a=Zs(e),o=Jv(e),l=Xv(o);let u=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=ff(u)),[u,ff(u)]}function r8(e){const t=ff(e);return[$g(e),t,$g(t)]}function $g(e){return e.replace(/start|end/g,t=>e8[t])}const mS=["left","right"],gS=["right","left"],a8=["top","bottom"],i8=["bottom","top"];function o8(e,t,n){switch(e){case"top":case"bottom":return n?t?gS:mS:t?mS:gS;case"left":case"right":return t?a8:i8;default:return[]}}function s8(e,t,n,a){const o=Zs(e);let l=o8(Ya(e),n==="start",a);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map($g)))),l}function ff(e){return e.replace(/left|right|bottom|top/g,t=>JL[t])}function l8(e){return{top:0,right:0,bottom:0,left:0,...e}}function TR(e){return typeof e!="number"?l8(e):{top:e,right:e,bottom:e,left:e}}function hf(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function vS(e,t,n){let{reference:a,floating:o}=e;const l=pa(t),u=Jv(t),d=Xv(u),f=Ya(t),h=l==="y",g=a.x+a.width/2-o.width/2,p=a.y+a.height/2-o.height/2,y=a[d]/2-o[d]/2;let _;switch(f){case"top":_={x:g,y:a.y-o.height};break;case"bottom":_={x:g,y:a.y+a.height};break;case"right":_={x:a.x+a.width,y:p};break;case"left":_={x:a.x-o.width,y:p};break;default:_={x:a.x,y:a.y}}switch(Zs(t)){case"start":_[u]-=y*(n&&h?-1:1);break;case"end":_[u]+=y*(n&&h?-1:1);break}return _}const c8=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,d=l.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:p}=vS(h,a,f),y=a,_={},S=0;for(let w=0;w<d.length;w++){const{name:T,fn:R}=d[w],{x:A,y:C,data:O,reset:N}=await R({x:g,y:p,initialPlacement:a,placement:y,strategy:o,middlewareData:_,rects:h,platform:u,elements:{reference:e,floating:t}});g=A??g,p=C??p,_={..._,[T]:{..._[T],...O}},N&&S<=50&&(S++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(h=N.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:g,y:p}=vS(h,y,f)),w=-1)}return{x:g,y:p,placement:y,strategy:o,middlewareData:_}};async function _c(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:y=!1,padding:_=0}=qa(t,e),S=TR(_),T=d[y?p==="floating"?"reference":"floating":p],R=hf(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(T)))==null||n?T:T.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:g,strategy:f})),A=p==="floating"?{x:a,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),O=await(l.isElement==null?void 0:l.isElement(C))?await(l.getScale==null?void 0:l.getScale(C))||{x:1,y:1}:{x:1,y:1},N=hf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:C,strategy:f}):A);return{top:(R.top-N.top+S.top)/O.y,bottom:(N.bottom-R.bottom+S.bottom)/O.y,left:(R.left-N.left+S.left)/O.x,right:(N.right-R.right+S.right)/O.x}}const u8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:h,padding:g=0}=qa(e,t)||{};if(h==null)return{};const p=TR(g),y={x:n,y:a},_=Jv(o),S=Xv(_),w=await u.getDimensions(h),T=_==="y",R=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",O=l.reference[S]+l.reference[_]-y[_]-l.floating[S],N=y[_]-l.reference[_],L=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let I=L?L[C]:0;(!I||!await(u.isElement==null?void 0:u.isElement(L)))&&(I=d.floating[C]||l.floating[S]);const D=O/2-N/2,B=I/2-w[S]/2-1,Z=Vi(p[R],B),Y=Vi(p[A],B),V=Z,z=I-w[S]-Y,ie=I/2-w[S]/2+D,ee=Hg(V,ie,z),k=!f.arrow&&Zs(o)!=null&&ie!==ee&&l.reference[S]/2-(ie<V?Z:Y)-w[S]/2<0,F=k?ie<V?ie-V:ie-z:0;return{[_]:y[_]+F,data:{[_]:ee,centerOffset:ie-ee-F,...k&&{alignmentOffset:F}},reset:k}}}),d8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...T}=qa(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const R=Ya(o),A=pa(d),C=Ya(d)===d,O=await(f.isRTL==null?void 0:f.isRTL(h.floating)),N=y||(C||!w?[ff(d)]:r8(d)),L=S!=="none";!y&&L&&N.push(...s8(d,w,S,O));const I=[d,...N],D=await _c(t,T),B=[];let Z=((a=l.flip)==null?void 0:a.overflows)||[];if(g&&B.push(D[R]),p){const ie=n8(o,u,O);B.push(D[ie[0]],D[ie[1]])}if(Z=[...Z,{placement:o,overflows:B}],!B.every(ie=>ie<=0)){var Y,V;const ie=(((Y=l.flip)==null?void 0:Y.index)||0)+1,ee=I[ie];if(ee&&(!(p==="alignment"?A!==pa(ee):!1)||Z.every(G=>pa(G.placement)===A?G.overflows[0]>0:!0)))return{data:{index:ie,overflows:Z},reset:{placement:ee}};let k=(V=Z.filter(F=>F.overflows[0]<=0).sort((F,G)=>F.overflows[1]-G.overflows[1])[0])==null?void 0:V.placement;if(!k)switch(_){case"bestFit":{var z;const F=(z=Z.filter(G=>{if(L){const ae=pa(G.placement);return ae===A||ae==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(ae=>ae>0).reduce((ae,ve)=>ae+ve,0)]).sort((G,ae)=>G[1]-ae[1])[0])==null?void 0:z[0];F&&(k=F);break}case"initialPlacement":k=d;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function yS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bS(e){return XL.some(t=>e[t]>=0)}const f8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...o}=qa(e,t);switch(a){case"referenceHidden":{const l=await _c(t,{...o,elementContext:"reference"}),u=yS(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:bS(u)}}}case"escaped":{const l=await _c(t,{...o,altBoundary:!0}),u=yS(l,n.floating);return{data:{escapedOffsets:u,escaped:bS(u)}}}default:return{}}}}},AR=new Set(["left","top"]);async function h8(e,t){const{placement:n,platform:a,elements:o}=e,l=await(a.isRTL==null?void 0:a.isRTL(o.floating)),u=Ya(n),d=Zs(n),f=pa(n)==="y",h=AR.has(u)?-1:1,g=l&&f?-1:1,p=qa(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 p8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:o,y:l,placement:u,middlewareData:d}=t,f=await h8(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(a=d.arrow)!=null&&a.alignmentOffset?{}:{x:o+f.x,y:l+f.y,data:{...f,placement:u}}}}},m8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:T=>{let{x:R,y:A}=T;return{x:R,y:A}}},...f}=qa(e,t),h={x:n,y:a},g=await _c(t,f),p=pa(Ya(o)),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];_=Hg(A,_,C)}if(u){const T=p==="y"?"top":"left",R=p==="y"?"bottom":"right",A=S+g[T],C=S-g[R];S=Hg(A,S,C)}const w=d.fn({...t,[y]:_,[p]:S});return{...w,data:{x:w.x-n,y:w.y-a,enabled:{[y]:l,[p]:u}}}}}},g8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:o,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=qa(e,t),g={x:n,y:a},p=pa(o),y=Qv(p);let _=g[y],S=g[p];const w=qa(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,N=l.reference[y]+l.reference[C]-T.mainAxis;_<O?_=O:_>N&&(_=N)}if(h){var R,A;const C=y==="y"?"width":"height",O=AR.has(Ya(o)),N=l.reference[p]-l.floating[C]+(O&&((R=u.offset)==null?void 0:R[p])||0)+(O?0:T.crossAxis),L=l.reference[p]+l.reference[C]+(O?0:((A=u.offset)==null?void 0:A[p])||0)-(O?T.crossAxis:0);S<N?S=N:S>L&&(S=L)}return{[y]:_,[p]:S}}}},v8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:o,rects:l,platform:u,elements:d}=t,{apply:f=()=>{},...h}=qa(e,t),g=await _c(t,h),p=Ya(o),y=Zs(o),_=pa(o)==="y",{width:S,height:w}=l.floating;let T,R;p==="top"||p==="bottom"?(T=p,R=y===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(R=p,T=y==="end"?"top":"bottom");const A=w-g.top-g.bottom,C=S-g.left-g.right,O=Vi(w-g[T],A),N=Vi(S-g[R],C),L=!t.middlewareData.shift;let I=O,D=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=C),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(I=A),L&&!y){const Z=mr(g.left,0),Y=mr(g.right,0),V=mr(g.top,0),z=mr(g.bottom,0);_?D=S-2*(Z!==0||Y!==0?Z+Y:mr(g.left,g.right)):I=w-2*(V!==0||z!==0?V+z:mr(g.top,g.bottom))}await f({...t,availableWidth:D,availableHeight:I});const B=await u.getDimensions(d.floating);return S!==B.width||w!==B.height?{reset:{rects:!0}}:{}}}};function Pf(){return typeof window<"u"}function Qs(e){return CR(e)?(e.nodeName||"").toLowerCase():"#document"}function br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _a(e){var t;return(t=(CR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CR(e){return Pf()?e instanceof Node||e instanceof br(e).Node:!1}function Jr(e){return Pf()?e instanceof Element||e instanceof br(e).Element:!1}function ba(e){return Pf()?e instanceof HTMLElement||e instanceof br(e).HTMLElement:!1}function _S(e){return!Pf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof br(e).ShadowRoot}const y8=new Set(["inline","contents"]);function Mc(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!y8.has(o)}const b8=new Set(["table","td","th"]);function _8(e){return b8.has(Qs(e))}const E8=[":popover-open",":modal"];function kf(e){return E8.some(t=>{try{return e.matches(t)}catch{return!1}})}const S8=["transform","translate","scale","rotate","perspective"],w8=["transform","translate","scale","rotate","perspective","filter"],x8=["paint","layout","strict","content"];function e0(e){const t=t0(),n=Jr(e)?ea(e):e;return S8.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||w8.some(a=>(n.willChange||"").includes(a))||x8.some(a=>(n.contain||"").includes(a))}function R8(e){let t=Hi(e);for(;ba(t)&&!$s(t);){if(e0(t))return t;if(kf(t))return null;t=Hi(t)}return null}function t0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const O8=new Set(["html","body","#document"]);function $s(e){return O8.has(Qs(e))}function ea(e){return br(e).getComputedStyle(e)}function jf(e){return Jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hi(e){if(Qs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_S(e)&&e.host||_a(e);return _S(t)?t.host:t}function MR(e){const t=Hi(e);return $s(t)?e.ownerDocument?e.ownerDocument.body:e.body:ba(t)&&Mc(t)?t:MR(t)}function Ec(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=MR(e),l=o===((a=e.ownerDocument)==null?void 0:a.body),u=br(o);if(l){const d=Gg(u);return t.concat(u,u.visualViewport||[],Mc(o)?o:[],d&&n?Ec(d):[])}return t.concat(o,Ec(o,[],n))}function Gg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function NR(e){const t=ea(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=ba(e),l=o?e.offsetWidth:n,u=o?e.offsetHeight:a,d=df(n)!==l||df(a)!==u;return d&&(n=l,a=u),{width:n,height:a,$:d}}function n0(e){return Jr(e)?e:e.contextElement}function Us(e){const t=n0(e);if(!ba(t))return ga(1);const n=t.getBoundingClientRect(),{width:a,height:o,$:l}=NR(t);let u=(l?df(n.width):n.width)/a,d=(l?df(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const T8=ga(0);function IR(e){const t=br(e);return!t0()||!t.visualViewport?T8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==br(e)?!1:t}function Mo(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=n0(e);let u=ga(1);t&&(a?Jr(a)&&(u=Us(a)):u=Us(e));const d=A8(l,n,a)?IR(l):ga(0);let f=(o.left+d.x)/u.x,h=(o.top+d.y)/u.y,g=o.width/u.x,p=o.height/u.y;if(l){const y=br(l),_=a&&Jr(a)?br(a):a;let S=y,w=Gg(S);for(;w&&a&&_!==S;){const T=Us(w),R=w.getBoundingClientRect(),A=ea(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=br(w),w=Gg(S)}}return hf({width:g,height:p,x:f,y:h})}function Uf(e,t){const n=jf(e).scrollLeft;return t?t.left+n:Mo(_a(e)).left+n}function DR(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Uf(e,n),o=n.top+t.scrollTop;return{x:a,y:o}}function C8(e){let{elements:t,rect:n,offsetParent:a,strategy:o}=e;const l=o==="fixed",u=_a(a),d=t?kf(t.floating):!1;if(a===u||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=ga(1);const g=ga(0),p=ba(a);if((p||!p&&!l)&&((Qs(a)!=="body"||Mc(u))&&(f=jf(a)),ba(a))){const _=Mo(a);h=Us(a),g.x=_.x+a.clientLeft,g.y=_.y+a.clientTop}const y=u&&!p&&!l?DR(u,f):ga(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+g.x+y.x,y:n.y*h.y-f.scrollTop*h.y+g.y+y.y}}function M8(e){return Array.from(e.getClientRects())}function N8(e){const t=_a(e),n=jf(e),a=e.ownerDocument.body,o=mr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=mr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+Uf(e);const d=-n.scrollTop;return ea(a).direction==="rtl"&&(u+=mr(t.clientWidth,a.clientWidth)-o),{width:o,height:l,x:u,y:d}}const ES=25;function I8(e,t){const n=br(e),a=_a(e),o=n.visualViewport;let l=a.clientWidth,u=a.clientHeight,d=0,f=0;if(o){l=o.width,u=o.height;const g=t0();(!g||g&&t==="fixed")&&(d=o.offsetLeft,f=o.offsetTop)}const h=Uf(a);if(h<=0){const g=a.ownerDocument,p=g.body,y=getComputedStyle(p),_=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(a.clientWidth-p.clientWidth-_);S<=ES&&(l-=S)}else h<=ES&&(l+=h);return{width:l,height:u,x:d,y:f}}const D8=new Set(["absolute","fixed"]);function L8(e,t){const n=Mo(e,!0,t==="fixed"),a=n.top+e.clientTop,o=n.left+e.clientLeft,l=ba(e)?Us(e):ga(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=o*l.x,h=a*l.y;return{width:u,height:d,x:f,y:h}}function SS(e,t,n){let a;if(t==="viewport")a=I8(e,n);else if(t==="document")a=N8(_a(e));else if(Jr(t))a=L8(t,n);else{const o=IR(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hf(a)}function LR(e,t){const n=Hi(e);return n===t||!Jr(n)||$s(n)?!1:ea(n).position==="fixed"||LR(n,t)}function P8(e,t){const n=t.get(e);if(n)return n;let a=Ec(e,[],!1).filter(d=>Jr(d)&&Qs(d)!=="body"),o=null;const l=ea(e).position==="fixed";let u=l?Hi(e):e;for(;Jr(u)&&!$s(u);){const d=ea(u),f=e0(u);!f&&d.position==="fixed"&&(o=null),(l?!f&&!o:!f&&d.position==="static"&&!!o&&D8.has(o.position)||Mc(u)&&!f&&LR(e,u))?a=a.filter(g=>g!==u):o=d,u=Hi(u)}return t.set(e,a),a}function k8(e){let{element:t,boundary:n,rootBoundary:a,strategy:o}=e;const u=[...n==="clippingAncestors"?kf(t)?[]:P8(t,this._c):[].concat(n),a],d=u[0],f=u.reduce((h,g)=>{const p=SS(t,g,o);return h.top=mr(p.top,h.top),h.right=Vi(p.right,h.right),h.bottom=Vi(p.bottom,h.bottom),h.left=mr(p.left,h.left),h},SS(t,d,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function j8(e){const{width:t,height:n}=NR(e);return{width:t,height:n}}function U8(e,t,n){const a=ba(t),o=_a(t),l=n==="fixed",u=Mo(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=ga(0);function h(){f.x=Uf(o)}if(a||!a&&!l)if((Qs(t)!=="body"||Mc(o))&&(d=jf(t)),a){const _=Mo(t,!0,l,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else o&&h();l&&!a&&o&&h();const g=o&&!a&&!l?DR(o,d):ga(0),p=u.left+d.scrollLeft-f.x-g.x,y=u.top+d.scrollTop-f.y-g.y;return{x:p,y,width:u.width,height:u.height}}function Hm(e){return ea(e).position==="static"}function wS(e,t){if(!ba(e)||ea(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _a(e)===n&&(n=n.ownerDocument.body),n}function PR(e,t){const n=br(e);if(kf(e))return n;if(!ba(e)){let o=Hi(e);for(;o&&!$s(o);){if(Jr(o)&&!Hm(o))return o;o=Hi(o)}return n}let a=wS(e,t);for(;a&&_8(a)&&Hm(a);)a=wS(a,t);return a&&$s(a)&&Hm(a)&&!e0(a)?n:a||R8(e)||n}const B8=async function(e){const t=this.getOffsetParent||PR,n=this.getDimensions,a=await n(e.floating);return{reference:U8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function z8(e){return ea(e).direction==="rtl"}const F8={convertOffsetParentRelativeRectToViewportRelativeRect:C8,getDocumentElement:_a,getClippingRect:k8,getOffsetParent:PR,getElementRects:B8,getClientRects:M8,getDimensions:j8,getScale:Us,isElement:Jr,isRTL:z8};function kR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function V8(e,t){let n=null,a;const o=_a(e);function l(){var d;clearTimeout(a),(d=n)==null||d.disconnect(),n=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:g,top:p,width:y,height:_}=h;if(d||t(),!y||!_)return;const S=pd(p),w=pd(o.clientWidth-(g+y)),T=pd(o.clientHeight-(p+_)),R=pd(g),C={rootMargin:-S+"px "+-w+"px "+-T+"px "+-R+"px",threshold:mr(0,Vi(1,f))||1};let O=!0;function N(L){const I=L[0].intersectionRatio;if(I!==f){if(!O)return u();I?u(!1,I):a=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!kR(h,e.getBoundingClientRect())&&u(),O=!1}try{n=new IntersectionObserver(N,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,C)}n.observe(e)}return u(!0),l}function H8(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=a,h=n0(e),g=o||l?[...h?Ec(h):[],...Ec(t)]:[];g.forEach(R=>{o&&R.addEventListener("scroll",n,{passive:!0}),l&&R.addEventListener("resize",n)});const p=h&&d?V8(h,n):null;let y=-1,_=null;u&&(_=new ResizeObserver(R=>{let[A]=R;A&&A.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=_)==null||C.observe(t)})),n()}),h&&!f&&_.observe(h),_.observe(t));let S,w=f?Mo(e):null;f&&T();function T(){const R=Mo(e);w&&!kR(w,R)&&n(),w=R,S=requestAnimationFrame(T)}return n(),()=>{var R;g.forEach(A=>{o&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),p?.(),(R=_)==null||R.disconnect(),_=null,f&&cancelAnimationFrame(S)}}const $8=p8,G8=m8,q8=d8,Y8=v8,K8=f8,xS=u8,W8=g8,Z8=(e,t,n)=>{const a=new Map,o={platform:F8,...n},l={...o.platform,_c:a};return c8(e,t,{...o,platform:l})};var Q8=typeof document<"u",X8=function(){},Md=Q8?E.useLayoutEffect:X8;function pf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!pf(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=n;a--!==0;){const l=o[a];if(!(l==="_owner"&&e.$$typeof)&&!pf(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function jR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function RS(e,t){const n=jR(e);return Math.round(t*n)/n}function $m(e){const t=E.useRef(e);return Md(()=>{t.current=e}),t}function J8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[g,p]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,_]=E.useState(a);pf(y,a)||_(a);const[S,w]=E.useState(null),[T,R]=E.useState(null),A=E.useCallback(G=>{G!==L.current&&(L.current=G,w(G))},[]),C=E.useCallback(G=>{G!==I.current&&(I.current=G,R(G))},[]),O=l||S,N=u||T,L=E.useRef(null),I=E.useRef(null),D=E.useRef(g),B=f!=null,Z=$m(f),Y=$m(o),V=$m(h),z=E.useCallback(()=>{if(!L.current||!I.current)return;const G={placement:t,strategy:n,middleware:y};Y.current&&(G.platform=Y.current),Z8(L.current,I.current,G).then(ae=>{const ve={...ae,isPositioned:V.current!==!1};ie.current&&!pf(D.current,ve)&&(D.current=ve,Tf.flushSync(()=>{p(ve)}))})},[y,t,n,Y,V]);Md(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[h]);const ie=E.useRef(!1);Md(()=>(ie.current=!0,()=>{ie.current=!1}),[]),Md(()=>{if(O&&(L.current=O),N&&(I.current=N),O&&N){if(Z.current)return Z.current(O,N,z);z()}},[O,N,z,Z,B]);const ee=E.useMemo(()=>({reference:L,floating:I,setReference:A,setFloating:C}),[A,C]),k=E.useMemo(()=>({reference:O,floating:N}),[O,N]),F=E.useMemo(()=>{const G={position:n,left:0,top:0};if(!k.floating)return G;const ae=RS(k.floating,g.x),ve=RS(k.floating,g.y);return d?{...G,transform:"translate("+ae+"px, "+ve+"px)",...jR(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ae,top:ve}},[n,d,k.floating,g.x,g.y]);return E.useMemo(()=>({...g,update:z,refs:ee,elements:k,floatingStyles:F}),[g,z,ee,k,F])}const eP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:o}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?xS({element:a.current,padding:o}).fn(n):{}:a?xS({element:a,padding:o}).fn(n):{}}}},tP=(e,t)=>({...$8(e),options:[e,t]}),nP=(e,t)=>({...G8(e),options:[e,t]}),rP=(e,t)=>({...W8(e),options:[e,t]}),aP=(e,t)=>({...q8(e),options:[e,t]}),iP=(e,t)=>({...Y8(e),options:[e,t]}),oP=(e,t)=>({...K8(e),options:[e,t]}),sP=(e,t)=>({...eP(e),options:[e,t]});var lP="Arrow",UR=E.forwardRef((e,t)=>{const{children:n,width:a=10,height:o=5,...l}=e;return b.jsx(jt.svg,{...l,ref:t,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});UR.displayName=lP;var cP=UR;function BR(e){const[t,n]=E.useState(void 0);return Qr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var r0="Popper",[zR,FR]=Lo(r0),[uP,VR]=zR(r0),HR=e=>{const{__scopePopper:t,children:n}=e,[a,o]=E.useState(null);return b.jsx(uP,{scope:t,anchor:a,onAnchorChange:o,children:n})};HR.displayName=r0;var $R="PopperAnchor",GR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...o}=e,l=VR($R,n),u=E.useRef(null),d=fn(t,u),f=E.useRef(null);return E.useEffect(()=>{const h=f.current;f.current=a?.current||u.current,h!==f.current&&l.onAnchorChange(f.current)}),a?null:b.jsx(jt.div,{...o,ref:d})});GR.displayName=$R;var a0="PopperContent",[dP,fP]=zR(a0),qR=E.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:S,...w}=e,T=VR(a0,n),[R,A]=E.useState(null),C=fn(t,ye=>A(ye)),[O,N]=E.useState(null),L=BR(O),I=L?.width??0,D=L?.height??0,B=a+(l!=="center"?"-"+l:""),Z=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Y=Array.isArray(h)?h:[h],V=Y.length>0,z={padding:Z,boundary:Y.filter(pP),altBoundary:V},{refs:ie,floatingStyles:ee,placement:k,isPositioned:F,middlewareData:G}=J8({strategy:"fixed",placement:B,whileElementsMounted:(...ye)=>H8(...ye,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[tP({mainAxis:o+D,alignmentAxis:u}),f&&nP({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?rP():void 0,...z}),f&&aP({...z}),iP({...z,apply:({elements:ye,rects:Se,availableWidth:le,availableHeight:je})=>{const{width:at,height:Je}=Se.reference,Ft=ye.floating.style;Ft.setProperty("--radix-popper-available-width",`${le}px`),Ft.setProperty("--radix-popper-available-height",`${je}px`),Ft.setProperty("--radix-popper-anchor-width",`${at}px`),Ft.setProperty("--radix-popper-anchor-height",`${Je}px`)}}),O&&sP({element:O,padding:d}),mP({arrowWidth:I,arrowHeight:D}),y&&oP({strategy:"referenceHidden",...z})]}),[ae,ve]=WR(k),P=Xr(S);Qr(()=>{F&&P?.()},[F,P]);const Q=G.arrow?.x,te=G.arrow?.y,se=G.arrow?.centerOffset!==0,[ge,_e]=E.useState();return Qr(()=>{R&&_e(window.getComputedStyle(R).zIndex)},[R]),b.jsx("div",{ref:ie.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:F?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[G.transformOrigin?.x,G.transformOrigin?.y].join(" "),...G.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(dP,{scope:n,placedSide:ae,onArrowChange:N,arrowX:Q,arrowY:te,shouldHideArrow:se,children:b.jsx(jt.div,{"data-side":ae,"data-align":ve,...w,ref:C,style:{...w.style,animation:F?void 0:"none"}})})})});qR.displayName=a0;var YR="PopperArrow",hP={top:"bottom",right:"left",bottom:"top",left:"right"},KR=E.forwardRef(function(t,n){const{__scopePopper:a,...o}=t,l=fP(YR,a),u=hP[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:b.jsx(cP,{...o,ref:n,style:{...o.style,display:"block"}})})});KR.displayName=YR;function pP(e){return e!==null}var mP=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:o}=t,u=o.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[h,g]=WR(n),p={start:"0%",center:"50%",end:"100%"}[g],y=(o.arrow?.x??0)+d/2,_=(o.arrow?.y??0)+f/2;let S="",w="";return h==="bottom"?(S=u?p:`${y}px`,w=`${-f}px`):h==="top"?(S=u?p:`${y}px`,w=`${a.floating.height+f}px`):h==="right"?(S=`${-f}px`,w=u?p:`${_}px`):h==="left"&&(S=`${a.floating.width+f}px`,w=u?p:`${_}px`),{data:{x:S,y:w}}}});function WR(e){const[t,n="center"]=e.split("-");return[t,n]}var ZR=HR,gP=GR,vP=qR,yP=KR,Gm="rovingFocusGroup.onEntryFocus",bP={bubbles:!1,cancelable:!0},Nc="RovingFocusGroup",[qg,QR,_P]=RR(Nc),[EP,XR]=Lo(Nc,[_P]),[SP,wP]=EP(Nc),JR=E.forwardRef((e,t)=>b.jsx(qg.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(qg.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(xP,{...e,ref:t})})}));JR.displayName=Nc;var xP=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...p}=e,y=E.useRef(null),_=fn(t,y),S=OR(l),[w,T]=Cc({prop:u,defaultProp:d??null,onChange:f,caller:Nc}),[R,A]=E.useState(!1),C=Xr(h),O=QR(n),N=E.useRef(!1),[L,I]=E.useState(0);return E.useEffect(()=>{const D=y.current;if(D)return D.addEventListener(Gm,C),()=>D.removeEventListener(Gm,C)},[C]),b.jsx(SP,{scope:n,orientation:a,dir:S,loop:o,currentTabStopId:w,onItemFocus:E.useCallback(D=>T(D),[T]),onItemShiftTab:E.useCallback(()=>A(!0),[]),onFocusableItemAdd:E.useCallback(()=>I(D=>D+1),[]),onFocusableItemRemove:E.useCallback(()=>I(D=>D-1),[]),children:b.jsx(jt.div,{tabIndex:R||L===0?-1:0,"data-orientation":a,...p,ref:_,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{N.current=!0}),onFocus:Ge(e.onFocus,D=>{const B=!N.current;if(D.target===D.currentTarget&&B&&!R){const Z=new CustomEvent(Gm,bP);if(D.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const Y=O().filter(k=>k.focusable),V=Y.find(k=>k.active),z=Y.find(k=>k.id===w),ee=[V,z,...Y].filter(Boolean).map(k=>k.ref.current);n2(ee,g)}}N.current=!1}),onBlur:Ge(e.onBlur,()=>A(!1))})})}),e2="RovingFocusGroupItem",t2=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:l,children:u,...d}=e,f=Ui(),h=l||f,g=wP(e2,n),p=g.currentTabStopId===h,y=QR(n),{onFocusableItemAdd:_,onFocusableItemRemove:S,currentTabStopId:w}=g;return E.useEffect(()=>{if(a)return _(),()=>S()},[a,_,S]),b.jsx(qg.ItemSlot,{scope:n,id:h,focusable:a,active:o,children:b.jsx(jt.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...d,ref:t,onMouseDown:Ge(e.onMouseDown,T=>{a?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=TP(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?AP(C,O+1):C.slice(O+1)}setTimeout(()=>n2(C))}}),children:typeof u=="function"?u({isCurrentTabStop:p,hasTabStop:w!=null}):u})})});t2.displayName=e2;var RP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function OP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TP(e,t,n){const a=OP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return RP[a]}function n2(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function AP(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var CP=JR,MP=t2,Yg=["Enter"," "],NP=["ArrowDown","PageUp","Home"],r2=["ArrowUp","PageDown","End"],IP=[...NP,...r2],DP={ltr:[...Yg,"ArrowRight"],rtl:[...Yg,"ArrowLeft"]},LP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ic="Menu",[Sc,PP,kP]=RR(Ic),[Po,a2]=Lo(Ic,[kP,FR,XR]),Dc=FR(),i2=XR(),[o2,Gi]=Po(Ic),[jP,Lc]=Po(Ic),s2=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:o,onOpenChange:l,modal:u=!0}=e,d=Dc(t),[f,h]=E.useState(null),g=E.useRef(!1),p=Xr(l),y=OR(o);return E.useEffect(()=>{const _=()=>{g.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>g.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),b.jsx(ZR,{...d,children:b.jsx(o2,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:h,children:b.jsx(jP,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:y,modal:u,children:a})})})};s2.displayName=Ic;var UP="MenuAnchor",i0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=Dc(n);return b.jsx(gP,{...o,...a,ref:t})});i0.displayName=UP;var o0="MenuPortal",[BP,l2]=Po(o0,{forceMount:void 0}),c2=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:o}=e,l=Gi(o0,t);return b.jsx(BP,{scope:t,forceMount:n,children:b.jsx(Qa,{present:n||l.open,children:b.jsx(qv,{asChild:!0,container:o,children:a})})})};c2.displayName=o0;var jr="MenuContent",[zP,s0]=Po(jr),u2=E.forwardRef((e,t)=>{const n=l2(jr,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,l=Gi(jr,e.__scopeMenu),u=Lc(jr,e.__scopeMenu);return b.jsx(Sc.Provider,{scope:e.__scopeMenu,children:b.jsx(Qa,{present:a||l.open,children:b.jsx(Sc.Slot,{scope:e.__scopeMenu,children:u.modal?b.jsx(FP,{...o,ref:t}):b.jsx(VP,{...o,ref:t})})})})}),FP=E.forwardRef((e,t)=>{const n=Gi(jr,e.__scopeMenu),a=E.useRef(null),o=fn(t,a);return E.useEffect(()=>{const l=a.current;if(l)return lR(l)},[]),b.jsx(l0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ge(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),VP=E.forwardRef((e,t)=>{const n=Gi(jr,e.__scopeMenu);return b.jsx(l0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HP=bc("MenuContent.ScrollLock"),l0=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,disableOutsideScroll:S,...w}=e,T=Gi(jr,n),R=Lc(jr,n),A=Dc(n),C=i2(n),O=PP(n),[N,L]=E.useState(null),I=E.useRef(null),D=fn(t,I,T.onContentChange),B=E.useRef(0),Z=E.useRef(""),Y=E.useRef(0),V=E.useRef(null),z=E.useRef("right"),ie=E.useRef(0),ee=S?Yv:E.Fragment,k=S?{as:HP,allowPinchZoom:!0}:void 0,F=ae=>{const ve=Z.current+ae,P=O().filter(ye=>!ye.disabled),Q=document.activeElement,te=P.find(ye=>ye.ref.current===Q)?.textValue,se=P.map(ye=>ye.textValue),ge=t7(se,ve,te),_e=P.find(ye=>ye.textValue===ge)?.ref.current;(function ye(Se){Z.current=Se,window.clearTimeout(B.current),Se!==""&&(B.current=window.setTimeout(()=>ye(""),1e3))})(ve),_e&&setTimeout(()=>_e.focus())};E.useEffect(()=>()=>window.clearTimeout(B.current),[]),Jx();const G=E.useCallback(ae=>z.current===V.current?.side&&r7(ae,V.current?.area),[]);return b.jsx(zP,{scope:n,searchRef:Z,onItemEnter:E.useCallback(ae=>{G(ae)&&ae.preventDefault()},[G]),onItemLeave:E.useCallback(ae=>{G(ae)||(I.current?.focus(),L(null))},[G]),onTriggerLeave:E.useCallback(ae=>{G(ae)&&ae.preventDefault()},[G]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:E.useCallback(ae=>{V.current=ae},[]),children:b.jsx(ee,{...k,children:b.jsx(Gv,{asChild:!0,trapped:o,onMountAutoFocus:Ge(l,ae=>{ae.preventDefault(),I.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:b.jsx($v,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,onDismiss:_,children:b.jsx(CP,{asChild:!0,...C,dir:R.dir,orientation:"vertical",loop:a,currentTabStopId:N,onCurrentTabStopIdChange:L,onEntryFocus:Ge(f,ae=>{R.isUsingKeyboardRef.current||ae.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(vP,{role:"menu","aria-orientation":"vertical","data-state":T2(T.open),"data-radix-menu-content":"",dir:R.dir,...A,...w,ref:D,style:{outline:"none",...w.style},onKeyDown:Ge(w.onKeyDown,ae=>{const P=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,Q=ae.ctrlKey||ae.altKey||ae.metaKey,te=ae.key.length===1;P&&(ae.key==="Tab"&&ae.preventDefault(),!Q&&te&&F(ae.key));const se=I.current;if(ae.target!==se||!IP.includes(ae.key))return;ae.preventDefault();const _e=O().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);r2.includes(ae.key)&&_e.reverse(),JP(_e)}),onBlur:Ge(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(B.current),Z.current="")}),onPointerMove:Ge(e.onPointerMove,wc(ae=>{const ve=ae.target,P=ie.current!==ae.clientX;if(ae.currentTarget.contains(ve)&&P){const Q=ae.clientX>ie.current?"right":"left";z.current=Q,ie.current=ae.clientX}}))})})})})})})});u2.displayName=jr;var $P="MenuGroup",c0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(jt.div,{role:"group",...a,ref:t})});c0.displayName=$P;var GP="MenuLabel",d2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(jt.div,{...a,ref:t})});d2.displayName=GP;var mf="MenuItem",OS="menu.itemSelect",Bf=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...o}=e,l=E.useRef(null),u=Lc(mf,e.__scopeMenu),d=s0(mf,e.__scopeMenu),f=fn(t,l),h=E.useRef(!1),g=()=>{const p=l.current;if(!n&&p){const y=new CustomEvent(OS,{bubbles:!0,cancelable:!0});p.addEventListener(OS,_=>a?.(_),{once:!0}),Wx(p,y),y.defaultPrevented?h.current=!1:u.onClose()}};return b.jsx(f2,{...o,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===" "||Yg.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Bf.displayName=mf;var f2=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:o,...l}=e,u=s0(mf,n),d=i2(n),f=E.useRef(null),h=fn(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(Sc.ItemSlot,{scope:n,disabled:a,textValue:o??y,children:b.jsx(MP,{asChild:!0,...d,focusable:!a,children:b.jsx(jt.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...l,ref:h,onPointerMove:Ge(e.onPointerMove,wc(S=>{a?u.onItemLeave(S):(u.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ge(e.onPointerLeave,wc(S=>u.onItemLeave(S))),onFocus:Ge(e.onFocus,()=>p(!0)),onBlur:Ge(e.onBlur,()=>p(!1))})})})}),qP="MenuCheckboxItem",h2=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...o}=e;return b.jsx(y2,{scope:e.__scopeMenu,checked:n,children:b.jsx(Bf,{role:"menuitemcheckbox","aria-checked":gf(n)?"mixed":n,...o,ref:t,"data-state":f0(n),onSelect:Ge(o.onSelect,()=>a?.(gf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});h2.displayName=qP;var p2="MenuRadioGroup",[YP,KP]=Po(p2,{value:void 0,onValueChange:()=>{}}),m2=E.forwardRef((e,t)=>{const{value:n,onValueChange:a,...o}=e,l=Xr(a);return b.jsx(YP,{scope:e.__scopeMenu,value:n,onValueChange:l,children:b.jsx(c0,{...o,ref:t})})});m2.displayName=p2;var g2="MenuRadioItem",v2=E.forwardRef((e,t)=>{const{value:n,...a}=e,o=KP(g2,e.__scopeMenu),l=n===o.value;return b.jsx(y2,{scope:e.__scopeMenu,checked:l,children:b.jsx(Bf,{role:"menuitemradio","aria-checked":l,...a,ref:t,"data-state":f0(l),onSelect:Ge(a.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});v2.displayName=g2;var u0="MenuItemIndicator",[y2,WP]=Po(u0,{checked:!1}),b2=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...o}=e,l=WP(u0,n);return b.jsx(Qa,{present:a||gf(l.checked)||l.checked===!0,children:b.jsx(jt.span,{...o,ref:t,"data-state":f0(l.checked)})})});b2.displayName=u0;var ZP="MenuSeparator",_2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return b.jsx(jt.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});_2.displayName=ZP;var QP="MenuArrow",E2=E.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=Dc(n);return b.jsx(yP,{...o,...a,ref:t})});E2.displayName=QP;var d0="MenuSub",[XP,S2]=Po(d0),w2=e=>{const{__scopeMenu:t,children:n,open:a=!1,onOpenChange:o}=e,l=Gi(d0,t),u=Dc(t),[d,f]=E.useState(null),[h,g]=E.useState(null),p=Xr(o);return E.useEffect(()=>(l.open===!1&&p(!1),()=>p(!1)),[l.open,p]),b.jsx(ZR,{...u,children:b.jsx(o2,{scope:t,open:a,onOpenChange:p,content:h,onContentChange:g,children:b.jsx(XP,{scope:t,contentId:Ui(),triggerId:Ui(),trigger:d,onTriggerChange:f,children:n})})})};w2.displayName=d0;var ac="MenuSubTrigger",x2=E.forwardRef((e,t)=>{const n=Gi(ac,e.__scopeMenu),a=Lc(ac,e.__scopeMenu),o=S2(ac,e.__scopeMenu),l=s0(ac,e.__scopeMenu),u=E.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,h={__scopeMenu:e.__scopeMenu},g=E.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return E.useEffect(()=>g,[g]),E.useEffect(()=>{const p=d.current;return()=>{window.clearTimeout(p),f(null)}},[d,f]),b.jsx(i0,{asChild:!0,...h,children:b.jsx(f2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":T2(n.open),...e,ref:Ac(t,o.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ge(e.onPointerMove,wc(p=>{l.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Ge(e.onPointerLeave,wc(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===" "||DP[a.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});x2.displayName=ac;var R2="MenuSubContent",O2=E.forwardRef((e,t)=>{const n=l2(jr,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,l=Gi(jr,e.__scopeMenu),u=Lc(jr,e.__scopeMenu),d=S2(R2,e.__scopeMenu),f=E.useRef(null),h=fn(t,f);return b.jsx(Sc.Provider,{scope:e.__scopeMenu,children:b.jsx(Qa,{present:a||l.open,children:b.jsx(Sc.Slot,{scope:e.__scopeMenu,children:b.jsx(l0,{id:d.contentId,"aria-labelledby":d.triggerId,...o,ref:h,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{u.isUsingKeyboardRef.current&&f.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Ge(e.onFocusOutside,g=>{g.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Ge(e.onEscapeKeyDown,g=>{u.onClose(),g.preventDefault()}),onKeyDown:Ge(e.onKeyDown,g=>{const p=g.currentTarget.contains(g.target),y=LP[u.dir].includes(g.key);p&&y&&(l.onOpenChange(!1),d.trigger?.focus(),g.preventDefault())})})})})})});O2.displayName=R2;function T2(e){return e?"open":"closed"}function gf(e){return e==="indeterminate"}function f0(e){return gf(e)?"indeterminate":e?"checked":"unchecked"}function JP(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function e7(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function t7(e,t,n){const o=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=e7(e,Math.max(l,0));o.length===1&&(u=u.filter(h=>h!==n));const f=u.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function n7(e,t){const{x:n,y:a}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l],f=t[u],h=d.x,g=d.y,p=f.x,y=f.y;g>a!=y>a&&n<(p-h)*(a-g)/(y-g)+h&&(o=!o)}return o}function r7(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return n7(n,t)}function wc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var a7=s2,i7=i0,o7=c2,s7=u2,l7=c0,c7=d2,u7=Bf,d7=h2,f7=m2,h7=v2,p7=b2,m7=_2,g7=E2,v7=w2,y7=x2,b7=O2,zf="DropdownMenu",[_7]=Lo(zf,[a2]),Pn=a2(),[E7,A2]=_7(zf),C2=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:o,defaultOpen:l,onOpenChange:u,modal:d=!0}=e,f=Pn(t),h=E.useRef(null),[g,p]=Cc({prop:o,defaultProp:l??!1,onChange:u,caller:zf});return b.jsx(E7,{scope:t,triggerId:Ui(),triggerRef:h,contentId:Ui(),open:g,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(y=>!y),[p]),modal:d,children:b.jsx(a7,{...f,open:g,onOpenChange:p,dir:a,modal:d,children:n})})};C2.displayName=zf;var M2="DropdownMenuTrigger",N2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...o}=e,l=A2(M2,n),u=Pn(n);return b.jsx(i7,{asChild:!0,...u,children:b.jsx(jt.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:Ac(t,l.triggerRef),onPointerDown:Ge(e.onPointerDown,d=>{!a&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:Ge(e.onKeyDown,d=>{a||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});N2.displayName=M2;var S7="DropdownMenuPortal",I2=e=>{const{__scopeDropdownMenu:t,...n}=e,a=Pn(t);return b.jsx(o7,{...a,...n})};I2.displayName=S7;var D2="DropdownMenuContent",L2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=A2(D2,n),l=Pn(n),u=E.useRef(!1);return b.jsx(s7,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...a,ref:t,onCloseAutoFocus:Ge(e.onCloseAutoFocus,d=>{u.current||o.triggerRef.current?.focus(),u.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;(!o.modal||g)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});L2.displayName=D2;var w7="DropdownMenuGroup",x7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(l7,{...o,...a,ref:t})});x7.displayName=w7;var R7="DropdownMenuLabel",O7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(c7,{...o,...a,ref:t})});O7.displayName=R7;var T7="DropdownMenuItem",P2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(u7,{...o,...a,ref:t})});P2.displayName=T7;var A7="DropdownMenuCheckboxItem",C7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(d7,{...o,...a,ref:t})});C7.displayName=A7;var M7="DropdownMenuRadioGroup",N7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(f7,{...o,...a,ref:t})});N7.displayName=M7;var I7="DropdownMenuRadioItem",D7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(h7,{...o,...a,ref:t})});D7.displayName=I7;var L7="DropdownMenuItemIndicator",P7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(p7,{...o,...a,ref:t})});P7.displayName=L7;var k7="DropdownMenuSeparator",k2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(m7,{...o,...a,ref:t})});k2.displayName=k7;var j7="DropdownMenuArrow",U7=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(g7,{...o,...a,ref:t})});U7.displayName=j7;var B7=e=>{const{__scopeDropdownMenu:t,children:n,open:a,onOpenChange:o,defaultOpen:l}=e,u=Pn(t),[d,f]=Cc({prop:a,defaultProp:l??!1,onChange:o,caller:"DropdownMenuSub"});return b.jsx(v7,{...u,open:d,onOpenChange:f,children:n})},z7="DropdownMenuSubTrigger",j2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(y7,{...o,...a,ref:t})});j2.displayName=z7;var F7="DropdownMenuSubContent",U2=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Pn(n);return b.jsx(b7,{...o,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});U2.displayName=F7;var V7=C2,H7=N2,$7=I2,G7=L2,q7=P2,Tz=k2,Az=B7,Cz=j2,Mz=U2,Y7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pc=Y7.reduce((e,t)=>{const n=zx(`Primitive.${t}`),a=E.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),K7="Label",B2=E.forwardRef((e,t)=>b.jsx(Pc.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));B2.displayName=K7;var W7=B2;function Z7(e,t=[]){let n=[];function a(l,u){const d=E.createContext(u);d.displayName=l+"Context";const f=n.length;n=[...n,u];const h=p=>{const{scope:y,children:_,...S}=p,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(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,g]}const o=()=>{const l=n.map(u=>E.createContext(u));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[a,Q7(o,...t)]}function Q7(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=a.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var X7=kw();function J7(){return X7.useSyncExternalStore(ek,()=>!0,()=>!1)}function ek(){return()=>{}}var h0="Avatar",[tk]=Z7(h0),[nk,z2]=tk(h0),F2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...a}=e,[o,l]=E.useState("idle");return b.jsx(nk,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:l,children:b.jsx(Pc.span,{...a,ref:t})})});F2.displayName=h0;var V2="AvatarImage",H2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:o=()=>{},...l}=e,u=z2(V2,n),d=rk(a,l),f=Xr(h=>{o(h),u.onImageLoadingStatusChange(h)});return Qr(()=>{d!=="idle"&&f(d)},[d,f]),d==="loaded"?b.jsx(Pc.img,{...l,ref:t,src:a}):null});H2.displayName=V2;var $2="AvatarFallback",G2=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:a,...o}=e,l=z2($2,n),[u,d]=E.useState(a===void 0);return E.useEffect(()=>{if(a!==void 0){const f=window.setTimeout(()=>d(!0),a);return()=>window.clearTimeout(f)}},[a]),u&&l.imageLoadingStatus!=="loaded"?b.jsx(Pc.span,{...o,ref:t}):null});G2.displayName=$2;function TS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function rk(e,{referrerPolicy:t,crossOrigin:n}){const a=J7(),o=E.useRef(null),l=a?(o.current||(o.current=new window.Image),o.current):null,[u,d]=E.useState(()=>TS(l,e));return Qr(()=>{d(TS(l,e))},[l,e]),Qr(()=>{const f=p=>()=>{d(p)};if(!l)return;const h=f("loaded"),g=f("error");return l.addEventListener("load",h),l.addEventListener("error",g),t&&(l.referrerPolicy=t),typeof n=="string"&&(l.crossOrigin=n),()=>{l.removeEventListener("load",h),l.removeEventListener("error",g)}},[l,n,t]),u}var ak=F2,ik=H2,ok=G2;function sk(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function p0(e,t,n=""){const a=sk(e),o=e?.length;if(!a||t!==void 0){const u=n&&`"${n}" `,d="",f=a?`length=${o}`:`type=${typeof e}`;throw new Error(u+"expected Uint8Array"+d+", got "+f)}return e}function AS(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 lk(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 Kg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function qm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function sa(e,t){return e<<32-t|e>>>t}const ck=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",uk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function dk(e){if(p0(e),ck)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=uk[e[n]];return t}function fk(e,t={}){const n=(o,l)=>e(l).update(o).digest(),a=e(void 0);return n.outputLen=a.outputLen,n.blockLen=a.blockLen,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}const hk=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function pk(e,t,n){return e&t^~e&n}function mk(e,t,n){return e&t^e&n^t&n}class gk{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,a,o){this.blockLen=t,this.outputLen=n,this.padOffset=a,this.isLE=o,this.buffer=new Uint8Array(t),this.view=qm(this.buffer)}update(t){AS(this),p0(t);const{view:n,buffer:a,blockLen:o}=this,l=t.length;for(let u=0;u<l;){const d=Math.min(o-this.pos,l-u);if(d===o){const f=qm(t);for(;o<=l-u;u+=o)this.process(f,u);continue}a.set(t.subarray(u,u+d),this.pos),this.pos+=d,u+=d,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){AS(this),lk(t,this),this.finished=!0;const{buffer:n,view:a,blockLen:o,isLE:l}=this;let{pos:u}=this;n[u++]=128,Kg(this.buffer.subarray(u)),this.padOffset>o-u&&(this.process(a,0),u=0);for(let p=u;p<o;p++)n[p]=0;a.setBigUint64(o-8,BigInt(this.length*8),l),this.process(a,0);const d=qm(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const h=f/4,g=this.get();if(h>g.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<h;p++)d.setUint32(4*p,g[p],l)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const a=t.slice(0,n);return this.destroy(),a}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:a,length:o,finished:l,destroyed:u,pos:d}=this;return t.destroyed=u,t.finished=l,t.length=o,t.pos=d,o%n&&t.buffer.set(a),t}clone(){return this._cloneInto()}}const Ti=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vk=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]),Ai=new Uint32Array(64);class yk extends gk{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:a,D:o,E:l,F:u,G:d,H:f}=this;return[t,n,a,o,l,u,d,f]}set(t,n,a,o,l,u,d,f){this.A=t|0,this.B=n|0,this.C=a|0,this.D=o|0,this.E=l|0,this.F=u|0,this.G=d|0,this.H=f|0}process(t,n){for(let p=0;p<16;p++,n+=4)Ai[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const y=Ai[p-15],_=Ai[p-2],S=sa(y,7)^sa(y,18)^y>>>3,w=sa(_,17)^sa(_,19)^_>>>10;Ai[p]=w+Ai[p-7]+S+Ai[p-16]|0}let{A:a,B:o,C:l,D:u,E:d,F:f,G:h,H:g}=this;for(let p=0;p<64;p++){const y=sa(d,6)^sa(d,11)^sa(d,25),_=g+y+pk(d,f,h)+vk[p]+Ai[p]|0,w=(sa(a,2)^sa(a,13)^sa(a,22))+mk(a,o,l)|0;g=h,h=f,f=d,d=u+_|0,u=l,l=o,o=a,a=_+w|0}a=a+this.A|0,o=o+this.B|0,l=l+this.C|0,u=u+this.D|0,d=d+this.E|0,f=f+this.F|0,h=h+this.G|0,g=g+this.H|0,this.set(a,o,l,u,d,f,h,g)}roundClean(){Kg(Ai)}destroy(){this.set(0,0,0,0,0,0,0,0),Kg(this.buffer)}}class bk extends yk{A=Ti[0]|0;B=Ti[1]|0;C=Ti[2]|0;D=Ti[3]|0;E=Ti[4]|0;F=Ti[5]|0;G=Ti[6]|0;H=Ti[7]|0;constructor(){super(32)}}const _k=fk(()=>new bk,hk(1));function Ek(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 Ff="Checkbox",[Sk]=Lo(Ff),[wk,m0]=Sk(Ff);function xk(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:o,disabled:l,form:u,name:d,onCheckedChange:f,required:h,value:g="on",internal_do_not_use_render:p}=e,[y,_]=Cc({prop:n,defaultProp:o??!1,onChange:f,caller:Ff}),[S,w]=E.useState(null),[T,R]=E.useState(null),A=E.useRef(!1),C=S?!!u||!!S.closest("form"):!0,O={checked:y,disabled:l,setChecked:_,control:S,setControl:w,name:d,form:u,value:g,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:Bi(o)?!1:o,isFormControl:C,bubbleInput:T,setBubbleInput:R};return b.jsx(wk,{scope:t,...O,children:Rk(p)?p(O):a})}var q2="CheckboxTrigger",Y2=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},o)=>{const{control:l,value:u,disabled:d,checked:f,required:h,setControl:g,setChecked:p,hasConsumerStoppedPropagationRef:y,isFormControl:_,bubbleInput:S}=m0(q2,e),w=fn(o,g),T=E.useRef(f);return E.useEffect(()=>{const R=l?.form;if(R){const A=()=>p(T.current);return R.addEventListener("reset",A),()=>R.removeEventListener("reset",A)}},[l,p]),b.jsx(jt.button,{type:"button",role:"checkbox","aria-checked":Bi(f)?"mixed":f,"aria-required":h,"data-state":J2(f),"data-disabled":d?"":void 0,disabled:d,value:u,...a,ref:w,onKeyDown:Ge(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:Ge(n,R=>{p(A=>Bi(A)?!0:!A),S&&_&&(y.current=R.isPropagationStopped(),y.current||R.stopPropagation())})})});Y2.displayName=q2;var K2=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:l,required:u,disabled:d,value:f,onCheckedChange:h,form:g,...p}=e;return b.jsx(xk,{__scopeCheckbox:n,checked:o,defaultChecked:l,disabled:d,required:u,onCheckedChange:h,name:a,form:g,value:f,internal_do_not_use_render:({isFormControl:y})=>b.jsxs(b.Fragment,{children:[b.jsx(Y2,{...p,ref:t,__scopeCheckbox:n}),y&&b.jsx(X2,{__scopeCheckbox:n})]})})});K2.displayName=Ff;var W2="CheckboxIndicator",Z2=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...o}=e,l=m0(W2,n);return b.jsx(Qa,{present:a||Bi(l.checked)||l.checked===!0,children:b.jsx(jt.span,{"data-state":J2(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Z2.displayName=W2;var Q2="CheckboxBubbleInput",X2=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:o,checked:l,defaultChecked:u,required:d,disabled:f,name:h,value:g,form:p,bubbleInput:y,setBubbleInput:_}=m0(Q2,e),S=fn(n,_),w=Ek(l),T=BR(a);E.useEffect(()=>{const A=y;if(!A)return;const C=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(C,"checked").set,L=!o.current;if(w!==l&&N){const I=new Event("click",{bubbles:L});A.indeterminate=Bi(l),N.call(A,Bi(l)?!1:l),A.dispatchEvent(I)}},[y,w,l,o]);const R=E.useRef(Bi(l)?!1:l);return b.jsx(jt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??R.current,required:d,disabled:f,name:h,value:g,form:p,...t,tabIndex:-1,ref:S,style:{...t.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});X2.displayName=Q2;function Rk(e){return typeof e=="function"}function Bi(e){return e==="indeterminate"}function J2(e){return Bi(e)?"indeterminate":e?"checked":"unchecked"}var eO={OBJECT:"object",UNDEFINED:"undefined"},md="browser",CS="cpu",MS="device",Ym="engine",gd="os",Ni="name",vf="type",Wg="vendor",qr="version",Zg="architecture",Qg="major",Xg="model",Ok="console",Tk="mobile",Ak="tablet",Ck="smarttv",Mk="wearable",Nk="embedded",Ik=typeof window!==eO.UNDEFINED,Km=Ik&&window.navigator?window.navigator:void 0;Km&&Km.userAgentData&&Km.userAgentData;var Vf=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},vd=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==eO.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return vd.call(e.init,[[md,[Ni,qr,Qg,vf]],[CS,[Zg]],[MS,[vf,Xg,Wg]],[Ym,[Ni,qr]],[gd,[Ni,qr]]]),vd.call(e.isIgnore,[[md,[qr,Qg]],[Ym,[qr]],[gd,[qr]]]),vd.call(e.isIgnoreRgx,[[md,/ ?browser$/i],[gd,/ ?os$/i]]),vd.call(e.toString,[[md,[Ni,qr]],[CS,[Zg]],[MS,[Wg,Xg]],[Ym,[Ni,qr]],[gd,[Ni,qr]]]),e})();Vf([Ni,qr,Qg,vf]);Vf([Zg]);Vf([Xg,Wg,vf,Ok,Tk,Ck,Ak,Mk,Nk]);Vf([Ni,qr]);function fa(e){const t=new Uint8Array(e);let n="";for(const o of t)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function yf(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,a=t.padEnd(t.length+n,"="),o=atob(a),l=new ArrayBuffer(o.length),u=new Uint8Array(l);for(let d=0;d<o.length;d++)u[d]=o.charCodeAt(d);return l}function g0(){return Dk.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const Dk={stubThis:e=>e};function tO(e){const{id:t}=e;return{...e,id:yf(t),transports:e.transports}}function nO(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class vn extends Error{constructor({message:t,code:n,cause:a,name:o}){super(t,{cause:a}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o??a.name,this.code=n}}function Lk({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 vn({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 vn({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 vn({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 vn({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 vn({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new vn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new vn({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new vn({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(nO(a)){if(n.rp.id!==a)return new vn({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new vn({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 vn({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 vn({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 Pk{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const rO=new Pk,kk=["cross-platform","platform"];function aO(e){if(e&&!(kk.indexOf(e)<0))return e}async function jk(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 a={...t,challenge:yf(t.challenge),user:{...t.user,id:yf(t.user.id)},excludeCredentials:t.excludeCredentials?.map(tO)},o={};n&&(o.mediation="conditional"),o.publicKey=a,o.signal=rO.createNewAbortSignal();let l;try{l=await navigator.credentials.create(o)}catch(S){throw Lk({error:S,options:o})}if(!l)throw new Error("Registration was not completed");const{id:u,rawId:d,response:f,type:h}=l;let g;typeof f.getTransports=="function"&&(g=f.getTransports());let p;if(typeof f.getPublicKeyAlgorithm=="function")try{p=f.getPublicKeyAlgorithm()}catch(S){Wm("getPublicKeyAlgorithm()",S)}let y;if(typeof f.getPublicKey=="function")try{const S=f.getPublicKey();S!==null&&(y=fa(S))}catch(S){Wm("getPublicKey()",S)}let _;if(typeof f.getAuthenticatorData=="function")try{_=fa(f.getAuthenticatorData())}catch(S){Wm("getAuthenticatorData()",S)}return{id:u,rawId:fa(d),response:{attestationObject:fa(f.attestationObject),clientDataJSON:fa(f.clientDataJSON),transports:g,publicKeyAlgorithm:p,publicKey:y,authenticatorData:_},type:h,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:aO(l.authenticatorAttachment)}}function Wm(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
68
- `,t)}function Uk(){if(!g0())return Zm.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Zm.stubThis(new Promise(t=>t(!1))):Zm.stubThis(e.isConditionalMediationAvailable())}const Zm={stubThis:e=>e};function Bk({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new vn({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new vn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(nO(a)){if(n.rpId!==a)return new vn({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new vn({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new vn({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 zk(e){!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:a=!0}=e;if(!g0())throw new Error("WebAuthn is not supported in this browser");let o;t.allowCredentials?.length!==0&&(o=t.allowCredentials?.map(tO));const l={...t,challenge:yf(t.challenge),allowCredentials:o},u={};if(n){if(!await Uk())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&a)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');u.mediation="conditional",l.allowCredentials=[]}u.publicKey=l,u.signal=rO.createNewAbortSignal();let d;try{d=await navigator.credentials.get(u)}catch(_){throw Bk({error:_,options:u})}if(!d)throw new Error("Authentication was not completed");const{id:f,rawId:h,response:g,type:p}=d;let y;return g.userHandle&&(y=fa(g.userHandle)),{id:f,rawId:fa(h),response:{authenticatorData:fa(g.authenticatorData),clientDataJSON:fa(g.clientDataJSON),signature:fa(g.signature),userHandle:y},type:p,clientExtensionResults:d.getClientExtensionResults(),authenticatorAttachment:aO(d.authenticatorAttachment)}}const Fk=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(l,u)=>{const d=await e("/passkey/generate-authenticate-options",{method:"GET",throw:!1});if(!d.data)return d;try{const f=await e("/passkey/verify-authentication",{body:{response:await zk({optionsJSON:d.data,useBrowserAutofill:l?.autoFill})},...l?.fetchOptions,...u,method:"POST",throw:!1});return t.set(Math.random()),n.notify("$sessionSignal"),f}catch{return{data:null,error:{code:"AUTH_CANCELLED",message:"auth cancelled",status:400,statusText:"BAD_REQUEST"}}}}},passkey:{addPasskey:async(l,u)=>{const d=await e("/passkey/generate-register-options",{method:"GET",query:{...l?.authenticatorAttachment&&{authenticatorAttachment:l.authenticatorAttachment},...l?.name&&{name:l.name}},throw:!1});if(!d.data)return d;try{const f=await jk({optionsJSON:d.data,useAutoRegister:l?.useAutoRegister}),h=await e("/passkey/verify-registration",{...l?.fetchOptions,...u,body:{response:f,name:l?.name},method:"POST",throw:!1});return h.data&&t.set(Math.random()),h}catch(f){return f instanceof vn?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:{}}),Vk=()=>{const e=go();return{id:"passkey",$InferServerPlugin:{},getActions:(t,n)=>Fk(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:Ls(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 Hk(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const iO=H.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}),kc=()=>{const e=H.useContext(iO);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Hk(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
69
- [data-state=closed]
70
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function $k(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Gk(){return v0(/^Mac/)}function qk(){return v0(/^iPhone/)}function NS(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Yk(){return v0(/^iPad/)||Gk()&&navigator.maxTouchPoints>1}function oO(){return qk()||Yk()}function v0(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const Kk=24,Wk=typeof window<"u"?E.useLayoutEffect:E.useEffect;function IS(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Qm=typeof document<"u"&&window.visualViewport;function DS(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function sO(e){for(DS(e)&&(e=e.parentElement);e&&!DS(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Zk=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let yd=0,Xm;function Qk(e={}){let{isDisabled:t}=e;Wk(()=>{if(!t)return yd++,yd===1&&oO()&&(Xm=Xk()),()=>{yd--,yd===0&&Xm?.()}},[t])}function Xk(){let e,t=0,n=p=>{e=sO(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},a=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let y=p.changedTouches[0].pageY,_=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((_<=0&&y>t||_>=S&&y<t)&&p.preventDefault(),t=y)},o=p=>{let y=p.target;Jg(y)&&y!==document.activeElement&&(p.preventDefault(),y.style.transform="translateY(-2000px)",y.focus(),requestAnimationFrame(()=>{y.style.transform=""}))},l=p=>{let y=p.target;Jg(y)&&(y.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{y.style.transform="",Qm&&(Qm.height<window.innerHeight?requestAnimationFrame(()=>{LS(y)}):Qm.addEventListener("resize",()=>LS(y),{once:!0}))}))},u=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset,h=IS(Jk(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let g=IS(Ql(document,"touchstart",n,{passive:!1,capture:!0}),Ql(document,"touchmove",a,{passive:!1,capture:!0}),Ql(document,"touchend",o,{passive:!1,capture:!0}),Ql(document,"focus",l,!0),Ql(window,"scroll",u));return()=>{h(),g(),window.scrollTo(d,f)}}function Jk(e,t,n){let a=e.style[t];return e.style[t]=n,()=>{e.style[t]=a}}function Ql(e,t,n,a){return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}function LS(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=sO(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let a=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const u=n.getBoundingClientRect().bottom+Kk;l>u&&(n.scrollTop+=o-a)}e=n.parentElement}}function Jg(e){return e instanceof HTMLInputElement&&!Zk.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function ej(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function tj(...e){return t=>e.forEach(n=>ej(n,t))}function lO(...e){return E.useCallback(tj(...e),e)}const cO=new WeakMap;function un(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let a={};Object.entries(t).forEach(([o,l])=>{if(o.startsWith("--")){e.style.setProperty(o,l);return}a[o]=e.style[o],e.style[o]=l}),!n&&cO.set(e,a)}function nj(e,t){if(!e||!(e instanceof HTMLElement))return;let n=cO.get(e);n&&(e.style[t]=n[t])}const Jt=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function bd(e,t){if(!e)return null;const n=window.getComputedStyle(e),a=n.transform||n.webkitTransform||n.mozTransform;let o=a.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Jt(t)?13:12]):(o=a.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Jt(t)?5:4]):null)}function rj(e){return 8*(Math.log(e+1)-2)}function Jm(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function aj(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kt={DURATION:.5,EASE:[.32,.72,0,1]},uO=.4,ij=.25,oj=100,dO=8,fo=16,ev=26,eg="vaul-dragging";function fO(e){const t=H.useRef(e);return H.useEffect(()=>{t.current=e}),H.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function sj({defaultProp:e,onChange:t}){const n=H.useState(e),[a]=n,o=H.useRef(a),l=fO(t);return H.useEffect(()=>{o.current!==a&&(l(a),o.current=a)},[a,o,l]),n}function hO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,o]=sj({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:a,d=fO(n),f=H.useCallback(h=>{if(l){const p=typeof h=="function"?h(e):h;p!==e&&d(p)}else o(h)},[l,e,o,d]);return[u,f]}function lj({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:a,overlayRef:o,fadeFromIndex:l,onSnapPointChange:u,direction:d="bottom",container:f,snapToSequentialPoint:h}){const[g,p]=hO({prop:e,defaultProp:n?.[0],onChange:t}),[y,_]=H.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);H.useEffect(()=>{function I(){_({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[]);const S=H.useMemo(()=>g===n?.[n.length-1]||null,[n,g]),w=H.useMemo(()=>{var I;return(I=n?.findIndex(D=>D===g))!=null?I:null},[n,g]),T=n&&n.length>0&&(l||l===0)&&!Number.isNaN(l)&&n[l]===g||!n,R=H.useMemo(()=>{const I=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(B=>{const Z=typeof B=="string";let Y=0;if(Z&&(Y=parseInt(B,10)),Jt(d)){const z=Z?Y:y?B*I.height:0;return y?d==="bottom"?I.height-z:-I.height+z:z}const V=Z?Y:y?B*I.width:0;return y?d==="right"?I.width-V:-I.width+V:V}))!=null?D:[]},[n,y,f]),A=H.useMemo(()=>w!==null?R?.[w]:null,[R,w]),C=H.useCallback(I=>{var D;const B=(D=R?.findIndex(Z=>Z===I))!=null?D:null;u(B),un(a.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:Jt(d)?`translate3d(0, ${I}px, 0)`:`translate3d(${I}px, 0, 0)`}),R&&B!==R.length-1&&l!==void 0&&B!==l&&B<l?un(o.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"0"}):un(o.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max(B,0)])},[a.current,n,R,l,o,p]);H.useEffect(()=>{if(g||e){var I;const D=(I=n?.findIndex(B=>B===e||B===g))!=null?I:-1;R&&D!==-1&&typeof R[D]=="number"&&C(R[D])}},[g,e,n,R,C]);function O({draggedDistance:I,closeDrawer:D,velocity:B,dismissible:Z}){if(l===void 0)return;const Y=d==="bottom"||d==="right"?(A??0)-I:(A??0)+I,V=w===l-1,z=w===0,ie=I>0;if(V&&un(o.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),!h&&B>2&&!ie){Z?D():C(R[0]);return}if(!h&&B>2&&ie&&R&&n){C(R[n.length-1]);return}const ee=R?.reduce((F,G)=>typeof F!="number"||typeof G!="number"?F:Math.abs(G-Y)<Math.abs(F-Y)?G:F),k=Jt(d)?window.innerHeight:window.innerWidth;if(B>uO&&Math.abs(I)<k*.4){const F=ie?1:-1;if(F>0&&S&&n){C(R[n.length-1]);return}if(z&&F<0&&Z&&D(),w===null)return;C(R[w+F]);return}C(ee)}function N({draggedDistance:I}){if(A===null)return;const D=d==="bottom"||d==="right"?A-I:A+I;(d==="bottom"||d==="right")&&D<R[R.length-1]||(d==="top"||d==="left")&&D>R[R.length-1]||un(a.current,{transform:Jt(d)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function L(I,D){if(!n||typeof w!="number"||!R||l===void 0)return null;const B=w===l-1;if(w>=l&&D)return 0;if(B&&!D)return 1;if(!T&&!B)return null;const Y=B?w+1:w-1,V=B?R[Y]-R[Y-1]:R[Y+1]-R[Y],z=I/Math.abs(V);return B?1-z:z}return{isLastSnapPoint:S,activeSnapPoint:g,shouldFade:T,getPercentageDragged:L,setActiveSnapPoint:p,activeSnapPointIndex:w,onRelease:O,onDrag:N,snapPointsOffset:R}}const cj=()=>()=>{};function uj(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:a,noBodyStyles:o}=kc(),l=H.useRef(null),u=E.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-ev)/window.innerWidth}H.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;aj(a&&!o?Jm(document.body,{background:"black"}):cj,Jm(f,{transformOrigin:Jt(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`}));const h=Jm(f,{borderRadius:`${dO}px`,overflow:"hidden",...Jt(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),l.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},kt.DURATION*1e3)}}},[t,n,u])}let Xl=null;function dj({isOpen:e,modal:t,nested:n,hasBeenOpened:a,preventScrollRestoration:o,noBodyStyles:l}){const[u,d]=H.useState(()=>typeof window<"u"?window.location.href:""),f=H.useRef(0),h=H.useCallback(()=>{if(NS()&&Xl===null&&e&&!l){Xl={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=H.useCallback(()=>{if(NS()&&Xl!==null&&!l){const p=-parseInt(document.body.style.top,10),y=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Xl),window.requestAnimationFrame(()=>{if(o&&u!==window.location.href){d(window.location.href);return}window.scrollTo(y,p)}),Xl=null}},[u]);return H.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),H.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||g()}},[t,g]),H.useEffect(()=>{n||!a||(e?(!window.matchMedia("(display-mode: standalone)").matches&&h(),t||window.setTimeout(()=>{g()},500)):g())},[e,a,u,t,n,h,g]),{restorePositionSetting:g}}function fj({open:e,onOpenChange:t,children:n,onDrag:a,onRelease:o,snapPoints:l,shouldScaleBackground:u=!1,setBackgroundColorOnScale:d=!0,closeThreshold:f=ij,scrollLockTimeout:h=oj,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:N=!1,disablePreventScroll:L=!0,snapToSequentialPoint:I=!1,preventScrollRestoration:D=!1,repositionInputs:B=!0,onAnimationEnd:Z,container:Y,autoFocus:V=!1}){var z,ie;const[ee=!1,k]=hO({defaultProp:N,prop:e,onChange:Me=>{t?.(Me),!Me&&!A&&Re(),setTimeout(()=>{Z?.(Me)},kt.DURATION*1e3),Me&&!T&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Me||(document.body.style.pointerEvents="auto")}}),[F,G]=H.useState(!1),[ae,ve]=H.useState(!1),[P,Q]=H.useState(!1),te=H.useRef(null),se=H.useRef(null),ge=H.useRef(null),_e=H.useRef(null),ye=H.useRef(null),Se=H.useRef(!1),le=H.useRef(null),je=H.useRef(0),at=H.useRef(!1),Je=H.useRef(!N),Ft=H.useRef(0),re=H.useRef(null),be=H.useRef(((z=re.current)==null?void 0:z.getBoundingClientRect().height)||0),Le=H.useRef(((ie=re.current)==null?void 0:ie.getBoundingClientRect().width)||0),Ye=H.useRef(0),At=H.useCallback(Me=>{l&&Me===W.length-1&&(se.current=new Date)},[]),{activeSnapPoint:Ue,activeSnapPointIndex:et,setActiveSnapPoint:j,onRelease:q,snapPointsOffset:W,onDrag:de,shouldFade:me,getPercentageDragged:he}=lj({snapPoints:l,activeSnapPointProp:_,setActiveSnapPointProp:S,drawerRef:re,fadeFromIndex:y,overlayRef:te,onSnapPointChange:At,direction:O,container:Y,snapToSequentialPoint:I});Qk({isDisabled:!ee||ae||!T||P||!F||!B||!L});const{restorePositionSetting:Re}=dj({isOpen:ee,modal:T,nested:A??!1,hasBeenOpened:F,preventScrollRestoration:D,noBodyStyles:C});function Fe(){return(window.innerWidth-ev)/window.innerWidth}function tt(Me){var it,ut;!g&&!l||re.current&&!re.current.contains(Me.target)||(be.current=((it=re.current)==null?void 0:it.getBoundingClientRect().height)||0,Le.current=((ut=re.current)==null?void 0:ut.getBoundingClientRect().width)||0,ve(!0),ge.current=new Date,oO()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),Me.target.setPointerCapture(Me.pointerId),je.current=Jt(O)?Me.pageY:Me.pageX)}function Rt(Me,it){var ut;let Ke=Me;const ft=(ut=window.getSelection())==null?void 0:ut.toString(),Ne=re.current?bd(re.current,O):null,We=new Date;if(Ke.tagName==="SELECT"||Ke.hasAttribute("data-vaul-no-drag")||Ke.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(se.current&&We.getTime()-se.current.getTime()<500)return!1;if(Ne!==null&&(O==="bottom"?Ne>0:Ne<0))return!0;if(ft&&ft.length>0)return!1;if(ye.current&&We.getTime()-ye.current.getTime()<h&&Ne===0||it)return ye.current=We,!1;for(;Ke;){if(Ke.scrollHeight>Ke.clientHeight){if(Ke.scrollTop!==0)return ye.current=new Date,!1;if(Ke.getAttribute("role")==="dialog")return!0}Ke=Ke.parentNode}return!0}function nr(Me){if(re.current&&ae){const it=O==="bottom"||O==="right"?1:-1,ut=(je.current-(Jt(O)?Me.pageY:Me.pageX))*it,Ke=ut>0,ft=l&&!g&&!Ke;if(ft&&et===0)return;const Ne=Math.abs(ut),We=document.querySelector("[data-vaul-drawer-wrapper]"),Ot=O==="bottom"||O==="top"?be.current:Le.current;let Et=Ne/Ot;const Mn=he(Ne,Ke);if(Mn!==null&&(Et=Mn),ft&&Et>=1||!Se.current&&!Rt(Me.target,Ke))return;if(re.current.classList.add(eg),Se.current=!0,un(re.current,{transition:"none"}),un(te.current,{transition:"none"}),l&&de({draggedDistance:ut}),Ke&&!l){const Nt=rj(ut),_r=Math.min(Nt*-1,0)*it;un(re.current,{transform:Jt(O)?`translate3d(0, ${_r}px, 0)`:`translate3d(${_r}px, 0, 0)`});return}const ht=1-Et;if((me||y&&et===y-1)&&(a?.(Me,Et),un(te.current,{opacity:`${ht}`,transition:"none"},!0)),We&&te.current&&u){const Nt=Math.min(Fe()+Et*(1-Fe()),1),_r=8-Et*8,_n=Math.max(0,14-Et*14);un(We,{borderRadius:`${_r}px`,transform:Jt(O)?`scale(${Nt}) translate3d(0, ${_n}px, 0)`:`scale(${Nt}) translate3d(${_n}px, 0, 0)`,transition:"none"},!0)}if(!l){const Nt=Ne*it;un(re.current,{transform:Jt(O)?`translate3d(0, ${Nt}px, 0)`:`translate3d(${Nt}px, 0, 0)`})}}}H.useEffect(()=>{window.requestAnimationFrame(()=>{Je.current=!0})},[]),H.useEffect(()=>{var Me;function it(){if(!re.current||!B)return;const ut=document.activeElement;if(Jg(ut)||at.current){var Ke;const ft=((Ke=window.visualViewport)==null?void 0:Ke.height)||0,Ne=window.innerHeight;let We=Ne-ft;const Ot=re.current.getBoundingClientRect().height||0,Et=Ot>Ne*.8;Ye.current||(Ye.current=Ot);const Mn=re.current.getBoundingClientRect().top;if(Math.abs(Ft.current-We)>60&&(at.current=!at.current),l&&l.length>0&&W&&et){const ht=W[et]||0;We+=ht}if(Ft.current=We,Ot>ft||at.current){const ht=re.current.getBoundingClientRect().height;let Nt=ht;ht>ft&&(Nt=ft-(Et?Mn:ev)),w?re.current.style.height=`${ht-Math.max(We,0)}px`:re.current.style.height=`${Math.max(Nt,ft-Mn)}px`}else $k()||(re.current.style.height=`${Ye.current}px`);l&&l.length>0&&!at.current?re.current.style.bottom="0px":re.current.style.bottom=`${Math.max(We,0)}px`}}return(Me=window.visualViewport)==null||Me.addEventListener("resize",it),()=>{var ut;return(ut=window.visualViewport)==null?void 0:ut.removeEventListener("resize",it)}},[et,l,W]);function Ct(Me){Mt(),R?.(),Me||k(!1),setTimeout(()=>{l&&j(l[0])},kt.DURATION*1e3)}function Gt(){if(!re.current)return;const Me=document.querySelector("[data-vaul-drawer-wrapper]"),it=bd(re.current,O);un(re.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),un(te.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),u&&it&&it>0&&ee&&un(Me,{borderRadius:`${dO}px`,overflow:"hidden",...Jt(O)?{transform:`scale(${Fe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Fe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`},!0)}function Mt(){!ae||!re.current||(re.current.classList.remove(eg),Se.current=!1,ve(!1),_e.current=new Date)}function on(Me){if(!ae||!re.current)return;re.current.classList.remove(eg),Se.current=!1,ve(!1),_e.current=new Date;const it=bd(re.current,O);if(!Me||!Rt(Me.target,!1)||!it||Number.isNaN(it)||ge.current===null)return;const ut=_e.current.getTime()-ge.current.getTime(),Ke=je.current-(Jt(O)?Me.pageY:Me.pageX),ft=Math.abs(Ke)/ut;if(ft>.05&&(Q(!0),setTimeout(()=>{Q(!1)},200)),l){q({draggedDistance:Ke*(O==="bottom"||O==="right"?1:-1),closeDrawer:Ct,velocity:ft,dismissible:g}),o?.(Me,!0);return}if(O==="bottom"||O==="right"?Ke>0:Ke<0){Gt(),o?.(Me,!0);return}if(ft>uO){Ct(),o?.(Me,!1);return}var Ne;const We=Math.min((Ne=re.current.getBoundingClientRect().height)!=null?Ne:0,window.innerHeight);var Ot;const Et=Math.min((Ot=re.current.getBoundingClientRect().width)!=null?Ot:0,window.innerWidth),Mn=O==="left"||O==="right";if(Math.abs(it)>=(Mn?Et:We)*f){Ct(),o?.(Me,!1);return}o?.(Me,!0),Gt()}H.useEffect(()=>(ee&&(un(document.documentElement,{scrollBehavior:"auto"}),se.current=new Date),()=>{nj(document.documentElement,"scrollBehavior")}),[ee]);function qt(Me){const it=Me?(window.innerWidth-fo)/window.innerWidth:1,ut=Me?-fo:0;le.current&&window.clearTimeout(le.current),un(re.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:Jt(O)?`scale(${it}) translate3d(0, ${ut}px, 0)`:`scale(${it}) translate3d(${ut}px, 0, 0)`}),!Me&&re.current&&(le.current=setTimeout(()=>{const Ke=bd(re.current,O);un(re.current,{transition:"none",transform:Jt(O)?`translate3d(0, ${Ke}px, 0)`:`translate3d(${Ke}px, 0, 0)`})},500))}function ei(Me,it){if(it<0)return;const ut=(window.innerWidth-fo)/window.innerWidth,Ke=ut+it*(1-ut),ft=-fo+it*fo;un(re.current,{transform:Jt(O)?`scale(${Ke}) translate3d(0, ${ft}px, 0)`:`scale(${Ke}) translate3d(${ft}px, 0, 0)`,transition:"none"})}function Ea(Me,it){const ut=Jt(O)?window.innerHeight:window.innerWidth,Ke=it?(ut-fo)/ut:1,ft=it?-fo:0;it&&un(re.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:Jt(O)?`scale(${Ke}) translate3d(0, ${ft}px, 0)`:`scale(${Ke}) translate3d(${ft}px, 0, 0)`})}return H.useEffect(()=>{T||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[T]),H.createElement(GL,{defaultOpen:N,onOpenChange:Me=>{!g&&!Me||(Me?G(!0):Ct(!0),k(Me))},open:ee},H.createElement(iO.Provider,{value:{activeSnapPoint:Ue,snapPoints:l,setActiveSnapPoint:j,drawerRef:re,overlayRef:te,onOpenChange:t,onPress:tt,onRelease:on,onDrag:nr,dismissible:g,shouldAnimate:Je,handleOnly:p,isOpen:ee,isDragging:ae,shouldFade:me,closeDrawer:Ct,onNestedDrag:ei,onNestedOpenChange:qt,onNestedRelease:Ea,keyboardIsOpen:at,modal:T,snapPointsOffset:W,activeSnapPointIndex:et,direction:O,shouldScaleBackground:u,setBackgroundColorOnScale:d,noBodyStyles:C,container:Y,autoFocus:V}},n))}const pO=H.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:a,onRelease:o,shouldFade:l,isOpen:u,modal:d,shouldAnimate:f}=kc(),h=lO(t,n),g=a&&a.length>0;if(!d)return null;const p=H.useCallback(y=>o(y),[o]);return H.createElement(KL,{onMouseUp:p,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":u&&g?"true":"false","data-vaul-snap-points-overlay":u&&l?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});pO.displayName="Drawer.Overlay";const mO=H.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...a},o){const{drawerRef:l,onPress:u,onRelease:d,onDrag:f,keyboardIsOpen:h,snapPointsOffset:g,activeSnapPointIndex:p,modal:y,isOpen:_,direction:S,snapPoints:w,container:T,handleOnly:R,shouldAnimate:A,autoFocus:C}=kc(),[O,N]=H.useState(!1),L=lO(o,l),I=H.useRef(null),D=H.useRef(null),B=H.useRef(!1),Z=w&&w.length>0;uj();const Y=(z,ie,ee=0)=>{if(B.current)return!0;const k=Math.abs(z.y),F=Math.abs(z.x),G=F>k,ae=["bottom","right"].includes(ie)?1:-1;if(ie==="left"||ie==="right"){if(!(z.x*ae<0)&&F>=0&&F<=ee)return G}else if(!(z.y*ae<0)&&k>=0&&k<=ee)return!G;return B.current=!0,!0};H.useEffect(()=>{Z&&window.requestAnimationFrame(()=>{N(!0)})},[]);function V(z){I.current=null,B.current=!1,d(z)}return H.createElement(WL,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":_&&Z?"true":"false","data-vaul-custom-container":T?"true":"false","data-vaul-animate":A?.current?"true":"false",...a,ref:L,style:g&&g.length>0?{"--snap-point-height":`${g[p??0]}px`,...t}:t,onPointerDown:z=>{R||(a.onPointerDown==null||a.onPointerDown.call(a,z),I.current={x:z.pageX,y:z.pageY},u(z))},onOpenAutoFocus:z=>{n?.(z),C||z.preventDefault()},onPointerDownOutside:z=>{if(e?.(z),!y||z.defaultPrevented){z.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:z=>{if(!y){z.preventDefault();return}},onPointerMove:z=>{if(D.current=z,R||(a.onPointerMove==null||a.onPointerMove.call(a,z),!I.current))return;const ie=z.pageY-I.current.y,ee=z.pageX-I.current.x,k=z.pointerType==="touch"?10:2;Y({x:ee,y:ie},S,k)?f(z):(Math.abs(ee)>k||Math.abs(ie)>k)&&(I.current=null)},onPointerUp:z=>{a.onPointerUp==null||a.onPointerUp.call(a,z),I.current=null,B.current=!1,d(z)},onPointerOut:z=>{a.onPointerOut==null||a.onPointerOut.call(a,z),V(D.current)},onContextMenu:z=>{a.onContextMenu==null||a.onContextMenu.call(a,z),D.current&&V(D.current)}})});mO.displayName="Drawer.Content";const hj=250,pj=120,mj=H.forwardRef(function({preventCycle:e=!1,children:t,...n},a){const{closeDrawer:o,isDragging:l,snapPoints:u,activeSnapPoint:d,setActiveSnapPoint:f,dismissible:h,handleOnly:g,isOpen:p,onPress:y,onDrag:_}=kc(),S=H.useRef(null),w=H.useRef(!1);function T(){if(w.current){C();return}window.setTimeout(()=>{R()},pj)}function R(){if(l||e||w.current){C();return}if(C(),!u||u.length===0){h||o();return}if(d===u[u.length-1]&&h){o();return}const N=u.findIndex(I=>I===d);if(N===-1)return;const L=u[N+1];f(L)}function A(){S.current=window.setTimeout(()=>{w.current=!0},hj)}function C(){S.current&&window.clearTimeout(S.current),w.current=!1}return H.createElement("div",{onClick:T,onPointerCancel:C,onPointerDown:O=>{g&&y(O),A()},onPointerMove:O=>{g&&_(O)},ref:a,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},H.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});mj.displayName="Drawer.Handle";function gj(e){const t=kc(),{container:n=t.container,...a}=e;return H.createElement(YL,{container:n,...a})}const Nz={Root:fj,Content:mO,Overlay:pO,Trigger:qL,Portal:gj,Title:ZL};var Bs=(e,t,n)=>new Promise((a,o)=>{var l=f=>{try{d(n.next(f))}catch(h){o(h)}},u=f=>{try{d(n.throw(f))}catch(h){o(h)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(l,u);d((n=n.apply(e,t)).next())}),Nd=class extends Error{},vj=class extends Error{},yj=e=>Math.exp(e)*150,bj=(e,...t)=>Bs(void 0,[e,...t],function*(n,{attempts:a=4}={}){var o;let l;for(let u=0;u<a;u++)try{return yield n()}catch(d){l=d,yield new Promise(f=>setTimeout(f,yj(u)))}throw new Nd((o=l?.message)!=null?o:"Exhausted all retries")}),Jl,gO="captchaFoxOnLoad",PS=`https://cdn.captchafox.com/api.js?render=explicit&onload=${gO}`;function _j(){return Bs(this,arguments,function*({nonce:e}={}){return Jl&&document.querySelector(`script[src="${PS}"]`)||(Jl=new Promise((t,n)=>{window[gO]=t;const a=document.createElement("script");a.src=PS,a.async=!0,a.defer=!0,a.onerror=o=>{a.remove(),Jl=void 0,n(o)},e&&(a.nonce=e),document.body.appendChild(a)})),Jl})}function Ej(){return Bs(this,arguments,function*(e={}){return bj(()=>_j(e))})}var Ts=()=>typeof window?.captchafox<"u",vO=E.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:a,theme:o,className:l,nonce:u,i18n:d,onError:f,onVerify:h,onLoad:g,onFail:p,onClose:y,onChallengeChange:_,onChallengeOpen:S},w)=>{const[T,R]=E.useState(),[A,C]=E.useState(),O=E.useRef(!1),N=E.useRef(),L=E.useRef(),I=E.useRef(),D=E.useRef(!1);E.useImperativeHandle(w,()=>({getResponse(){return!Ts()||!A?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(A)},reset(){if(!Ts()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(A)},remove(){if(!Ts()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(A)},execute:()=>Bs(void 0,null,function*(){if(D.current)return Promise.reject(new Nd);if(!Ts()||!A)return Z();try{return yield window.captchafox.execute(A)}catch(z){const ie=Y(z);return Promise.reject(ie)}})}),[A]),E.useEffect(()=>{A&&g?.()},[A]),E.useEffect(()=>()=>{B()},[]),E.useEffect(()=>{T&&(O.current?Ts()&&V():Ej({nonce:u}).then(()=>Bs(void 0,null,function*(){Ts()&&(O.current=!0,yield V())})).catch(z=>{var ie;f?.(z),D.current=!0,(ie=I.current)==null||ie.call(I),console.error("[CaptchaFox] Could not load script:",z)}))},[T,t,n,a]);const B=()=>{clearTimeout(L.current)},Z=()=>new Promise((z,ie)=>{I.current=()=>{B(),ie(new Nd)},L.current=setTimeout(()=>{ie(new vj("Execute timed out"))},e*1e3),N.current=ee=>{B(),window.captchafox.execute(ee).then(z).catch(k=>{const F=Y(k);ie(F)})}}),Y=z=>z!=="challenge-aborted"&&z!=="rate-limited"?new Nd:z,V=()=>Bs(void 0,null,function*(){var z,ie,ee;if((z=window.captchafox)==null||z.remove(A),!T||((ie=T?.children)==null?void 0:ie.length)===1)return;const k=yield(ee=window.captchafox)==null?void 0:ee.render(T,{lang:n,sitekey:t,mode:a,theme:o,i18n:d,onError:f,onFail:p,onClose:y,onVerify:h,onChallengeChange:_,onChallengeOpen:S});k&&(C(k),N.current&&(N.current(k),N.current=void 0))});return H.createElement("div",{ref:R,id:A,className:l})});vO.displayName="CaptchaFox";function Ir(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tv(e,t){return tv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},tv(e,t)}function Sj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,tv(e,t)}var wj=Object.defineProperty,xj=Object.defineProperties,Rj=Object.getOwnPropertyDescriptors,bf=Object.getOwnPropertySymbols,yO=Object.prototype.hasOwnProperty,bO=Object.prototype.propertyIsEnumerable,nv=(e,t,n)=>t in e?wj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dr=(e,t)=>{for(var n in t||(t={}))yO.call(t,n)&&nv(e,n,t[n]);if(bf)for(var n of bf(t))bO.call(t,n)&&nv(e,n,t[n]);return e},_O=(e,t)=>xj(e,Rj(t)),Oj=(e,t)=>{var n={};for(var a in e)yO.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&bf)for(var a of bf(e))t.indexOf(a)<0&&bO.call(e,a)&&(n[a]=e[a]);return n},yn=(e,t,n)=>(nv(e,typeof t!="symbol"?t+"":t,n),n),Gs=(e,t,n)=>new Promise((a,o)=>{var l=f=>{try{d(n.next(f))}catch(h){o(h)}},u=f=>{try{d(n.throw(f))}catch(h){o(h)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(l,u);d((n=n.apply(e,t)).next())}),Tj="hCaptcha-script",Id="hCaptchaOnLoad",kS="script-error",Ii="@hCaptcha/loader";function Aj(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function EO(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function SO(e){return e||document.head}function Cj(e){var t;e.setTag("source",Ii),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",dr({},Mj())),e.setContext("device",_O(dr({},Ij()),{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 Mj(){var e,t,n,a,o,l;let u=navigator.userAgent,d,f;return u.indexOf("Firefox")!==-1?(d="Firefox",f=(e=u.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):u.indexOf("Edg")!==-1?(d="Microsoft Edge",f=(t=u.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):u.indexOf("Chrome")!==-1&&u.indexOf("Safari")!==-1?(d="Chrome",f=(n=u.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):u.indexOf("Safari")!==-1&&u.indexOf("Chrome")===-1?(d="Safari",f=(a=u.match(/Version\/([\d.]+)/))==null?void 0:a[1]):u.indexOf("Opera")!==-1||u.indexOf("OPR")!==-1?(d="Opera",f=(o=u.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:o[2]):u.indexOf("MSIE")!==-1||u.indexOf("Trident")!==-1?(d="Internet Explorer",f=(l=u.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:l[2]):(d="Unknown",f="Unknown"),{name:d,version:f}}function Nj(e){return new Promise(t=>setTimeout(t,e))}function Ij(){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 Dj=class wO{constructor(t){yn(this,"_parent"),yn(this,"breadcrumbs",[]),yn(this,"context",{}),yn(this,"extra",{}),yn(this,"tags",{}),yn(this,"request"),yn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new wO(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=dr(dr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((a,o)=>{var l;return a.breadcrumbs=[...(l=a.breadcrumbs)!=null?l:[],...o.breadcrumbs],a.extra=dr(dr({},a.extra),o.extra),a.contexts=dr(dr({},a.contexts),o.context),a.tags=dr(dr({},a.tags),o.tags),o.user&&(a.user=o.user),o.request&&(a.request=o.request),a},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},Lj=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pj=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,kj=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,jj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,_d="?",jS="An unknown error occurred",Uj="0.0.4";function Bj(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function In(e){return(e+256).toString(16).substring(1)}function zj(){let e=Bj(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,In(e[0])+In(e[1])+In(e[2])+In(e[3])+"-"+In(e[4])+In(e[5])+"-"+In(e[6])+In(e[7])+"-"+In(e[8])+In(e[9])+"-"+In(e[10])+In(e[11])+In(e[12])+In(e[13])+In(e[14])+In(e[15])}var Fj=[[Lj,"chrome"],[kj,"winjs"],[Pj,"gecko"]];function Vj(e){var t,n,a,o;if(!e.stack)return null;let l=[],u=(a=(n=(t=e.stack).split)==null?void 0:n.call(t,`
71
- `))!=null?a:[];for(let d=0;d<u.length;++d){let f=null,h=null,g=null;for(let[p,y]of Fj)if(h=p.exec(u[d]),h){g=y;break}if(!(!h||!g)){if(g==="chrome")f={filename:(o=h[2])!=null&&o.startsWith("address at ")?h[2].substring(11):h[2],function:h[1]||_d,lineno:h[3]?+h[3]:null,colno:h[4]?+h[4]:null};else if(g==="winjs")f={filename:h[2],function:h[1]||_d,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]||_d,lineno:h[4]?+h[4]:null,colno:h[5]?+h[5]:null};else continue;!f.function&&f.lineno&&(f.function=_d),l.push(f)}}return l.length?l.reverse():null}function Hj(e){let t=Vj(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function $j(e){let t=jj.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let a=n[5].split("/"),o=a.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(o?"/"+o:"")+"/api/"+a.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function Gj(e,t,n){var a,o;let l=dr({event_id:zj().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:Uj},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){l.message=(o=(a=e.error)==null?void 0:a.message)!=null?o:"Unknown error",l.fingerprint=[l.message];let u=[],d=e.error;for(let f=0;f<5&&d&&(u.push(Hj(d)),!(!d.cause||!(d.cause instanceof Error)));f++)d=d.cause;l.exception={values:u.reverse()}}return e.type==="message"&&(l.message=e.message,l.level=e.level),l}function qj(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:a}=n,o=Oj(n,["message"]),l=new Error(typeof a=="string"?a:jS);return Object.assign(l,o)}let t=new Error(jS);return Object.assign(t,{cause:e})}function Yj(e,t,n){return Gs(this,null,function*(){var a,o;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let l;if(n){let f=new AbortController;l=f.signal,setTimeout(()=>f.abort(),n)}let u=yield fetch(e,_O(dr({},t),{signal:l})),d=yield u.text();return{status:u.status,body:d}}return yield new Promise((l,u)=>{var d,f;let h=new XMLHttpRequest;if(h.open((d=t?.method)!=null?d:"GET",e),h.onload=()=>l({status:h.status,body:h.responseText}),h.onerror=()=>u(new Error("XHR Network Error")),t?.headers)for(let[g,p]of Object.entries(t.headers))h.setRequestHeader(g,p);if(n){let g=setTimeout(()=>{h.abort(),u(new Error("Request timed out"))},n);h.onloadend=()=>{clearTimeout(g)}}h.send((f=t?.body)==null?void 0:f.toString())})}catch(l){return{status:0,body:(o=(a=l?.toString)==null?void 0:a.call(l))!=null?o:"Unknown error"}}})}var Wn,rv=(Wn=class{constructor(e){yn(this,"apiURL"),yn(this,"dsn"),yn(this,"environment"),yn(this,"release"),yn(this,"sampleRate"),yn(this,"debug"),yn(this,"_scope"),yn(this,"shouldBuffer",!1),yn(this,"bufferlimit",20),yn(this,"buffer",[]);var t,n,a,o,l;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(a=e.scope)!=null?a:new Dj,this.apiURL=$j(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(o=e.buffer)!=null?o:!1,this.bufferlimit=(l=e.bufferLimit)!=null?l:20}static init(e){Wn._instance||(Wn._instance=new Wn(e))}static get instance(){if(!Wn._instance)throw new Error("Sentry has not been initialized");return Wn._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Wn.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Wn.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:qj(e),scope:t??this._scope})}static captureException(e,t){Wn.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Wn.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return Gs(this,null,function*(){try{this.log("Sending sentry event",e);let n=Gj(e,this.environment,this.release),a={event_id:n.event_id,dsn:this.dsn},o={type:"event"},l=JSON.stringify(a)+`
72
- `+JSON.stringify(o)+`
73
- `+JSON.stringify(n),u=yield Yj(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:l},t);this.log("Sentry response",u.status),u.status!==200&&(console.log(u.body),console.error("Failed to send event to Sentry",u))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return Gs(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Wn.instance.flush(e)}static reset(){Wn._instance=void 0}},yn(Wn,"_instance"),Wn),Kj="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",Wj="2.3.0",Zj="production";function Qj(e=!0){if(!e)return US();rv.init({dsn:Kj,release:Wj,environment:Zj});let t=rv.scope;return Cj(t),US(t)}function US(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&rv.captureException(t,e)}}}function Xj({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:a="anonymous",apihost:o="https://js.hcaptcha.com",cleanup:l=!1,secureApi:u=!1,scriptSource:d=""}={},f){let h=SO(e),g=EO(h);return new Promise((p,y)=>{let _=g.document.createElement("script");_.id=Tj,d?_.src=`${d}?onload=${Id}`:u?_.src=`${o}/1/secure-api.js?onload=${Id}`:_.src=`${o}/1/api.js?onload=${Id}`,_.crossOrigin=a,_.async=n;let S=(w,T)=>{try{!u&&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 Ed=[];function Jj(e={cleanup:!1},t){try{t.addBreadcrumb({category:Ii,message:"hCaptcha loader params",data:e});let n=SO(e.scriptLocation),a=EO(n),o=Ed.find(({scope:u})=>u===a.window);if(o)return t.addBreadcrumb({category:Ii,message:"hCaptcha already loaded"}),o.promise;let l=new Promise((u,d)=>Gs(this,null,function*(){try{a.window[Id]=()=>{t.addBreadcrumb({category:Ii,message:"hCaptcha script called onload function"}),u(a.window.hcaptcha)};let f=Aj({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 Xj(dr({query:f},e),h=>{t.captureRequest({url:h,method:"GET"})}),t.addBreadcrumb({category:Ii,message:"hCaptcha loaded",data:o})}catch{t.addBreadcrumb({category:Ii,message:"hCaptcha failed to load"});let h=Ed.findIndex(g=>g.scope===a.window);h!==-1&&Ed.splice(h,1),d(new Error(kS))}}));return Ed.push({promise:l,scope:a.window}),l}catch(n){return t.captureException(n),Promise.reject(new Error(kS))}}function xO(e,t,n=0){return Gs(this,null,function*(){var a,o;let l=(a=e.maxRetries)!=null?a:2,u=(o=e.retryDelay)!=null?o:1e3,d=n<l?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield Jj(e,t)}catch(f){return t.addBreadcrumb({category:Ii,message:d}),n>=l?(t.captureException(f),Promise.reject(f)):(t.addBreadcrumb({category:Ii,message:`Waiting ${u}ms before retry attempt ${n+1}`}),yield Nj(u),n+=1,xO(e,t,n))}})}function e9(){return Gs(this,arguments,function*(e={}){let t=Qj(e.sentry);return yield xO(e,t)})}function BS(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function zS(e){return e||document.head}var t9=(function(e){Sj(t,e);function t(a){var o;return o=e.call(this,a)||this,o._hcaptcha=void 0,o.renderCaptcha=o.renderCaptcha.bind(Ir(o)),o.resetCaptcha=o.resetCaptcha.bind(Ir(o)),o.removeCaptcha=o.removeCaptcha.bind(Ir(o)),o.isReady=o.isReady.bind(Ir(o)),o._onReady=null,o.loadCaptcha=o.loadCaptcha.bind(Ir(o)),o.handleOnLoad=o.handleOnLoad.bind(Ir(o)),o.handleSubmit=o.handleSubmit.bind(Ir(o)),o.handleExpire=o.handleExpire.bind(Ir(o)),o.handleError=o.handleError.bind(Ir(o)),o.handleOpen=o.handleOpen.bind(Ir(o)),o.handleClose=o.handleClose.bind(Ir(o)),o.handleChallengeExpired=o.handleChallengeExpired.bind(Ir(o)),o.ref=E.createRef(),o.apiScriptRequested=!1,o.sentryHub=null,o.captchaId="",o._pendingExecute=null,o.state={isApiReady:!1,isRemoved:!1,elementId:a.id},o}var n=t.prototype;return n.componentDidMount=function(){var o=this,l=zS(this.props.scriptLocation),u=BS(l);this._hcaptcha=u.window.hcaptcha||void 0;var d=typeof this._hcaptcha<"u";if(d){this.setState({isApiReady:!0},function(){o.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var o=this._hcaptcha,l=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(o.reset(l),o.remove(l))},n.shouldComponentUpdate=function(o,l){return!(this.state.isApiReady!==l.isApiReady||this.state.isRemoved!==l.isRemoved)},n.componentDidUpdate=function(o){var l=this,u=["sitekey","size","theme","tabindex","languageOverride","endpoint"],d=u.every(function(f){return o[f]===l.props[f]});d||this.removeCaptcha(function(){l.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var o=this.props,l=o.apihost,u=o.assethost,d=o.endpoint,f=o.host,h=o.imghost,g=o.languageOverride,p=o.reCaptchaCompat,y=o.reportapi,_=o.sentry,S=o.custom,w=o.loadAsync,T=o.scriptLocation,R=o.scriptSource,A=o.secureApi,C=o.cleanup,O=C===void 0?!0:C,N=o.userJourneys,L={render:"explicit",apihost:l,assethost:u,endpoint:d,hl:g,host:f,imghost:h,recaptchacompat:p===!1?"off":null,reportapi:y,sentry:_,custom:S,loadAsync:w,scriptLocation:T,scriptSource:R,secureApi:A,cleanup:O,uj:N!==void 0?N:!1};e9(L).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(o){var l=this,u=this.props.onReady,d=this.state.isApiReady,f=this.captchaId;if(!(!d||f)){var h=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),g=this._hcaptcha,p=g.render(this.ref.current,h);this.captchaId=p,this.setState({isRemoved:!1},function(){o&&o(),u&&u(),l._onReady&&l._onReady(p)})}},n.resetCaptcha=function(){var o=this._hcaptcha,l=this.captchaId;this.isReady()&&(o.reset(l),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(o){var l=this,u=this._hcaptcha,d=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){l.captchaId="",u.remove(d),o&&o()})},n.handleOnLoad=function(){var o=this;this.setState({isApiReady:!0},function(){var l=zS(o.props.scriptLocation),u=BS(l);o._hcaptcha=u.window.hcaptcha,o.renderCaptcha(function(){var d=o.props.onLoad;d&&d()})})},n.handleSubmit=function(o){var l=this.props.onVerify,u=this.state.isRemoved,d=this._hcaptcha,f=this.captchaId;if(!(typeof d>"u"||u)){var h=d.getResponse(f),g=d.getRespKey(f);l&&l(h,g)}},n.handleExpire=function(){var o=this.props.onExpire,l=this._hcaptcha,u=this.captchaId;this.isReady()&&(l.reset(u),o&&o())},n.handleError=function(o){var l=this.props.onError,u=this._hcaptcha,d=this.captchaId;this.isReady()&&u.reset(d),l&&l(o)},n.isReady=function(){var o=this.state,l=o.isApiReady,u=o.isRemoved;return l&&!u},n._cancelPendingExecute=function(o){if(this._pendingExecute){var l=this._pendingExecute;this._pendingExecute=null;var u=new Error(o);l.reject(u)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(o){var l=this;o===void 0&&(o=null),o=typeof o=="object"?o:null;try{var u=this._hcaptcha,d=this.captchaId;if(o&&o.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return o&&o.async?new Promise(function(h,g){l._pendingExecute={resolve:h,reject:g},l._onReady=function(p){if(l._pendingExecute)try{var y=u.execute(p,o);y&&typeof y.then=="function"?y.then(function(_){l._pendingExecute=null,h(_)}).catch(function(_){l._pendingExecute=null,g(_)}):(l._pendingExecute=null,g(new Error("hcaptcha-execute-no-promise")))}catch(_){l._pendingExecute=null,g(_)}}}):(this._onReady=function(h){u.execute(h,o)},null);var f=u.execute(d,o);return o&&o.async&&f&&typeof f.then=="function"?new Promise(function(h,g){l._pendingExecute={resolve:h,reject:g},f.then(function(p){l._pendingExecute=null,h(p)}).catch(function(p){l._pendingExecute=null,g(p)})}):f}catch(h){return o&&o.async?Promise.reject(h):null}},n.close=function(){var o=this._hcaptcha,l=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return o.close(l)},n.setData=function(o){var l=this._hcaptcha,u=this.captchaId;this.isReady()&&(o&&typeof o!="object"&&(o=null),l.setData(u,o))},n.getResponse=function(){var o=this._hcaptcha;return o.getResponse(this.captchaId)},n.getRespKey=function(){var o=this._hcaptcha;return o.getRespKey(this.captchaId)},n.render=function(){var o=this.state.elementId;return E.createElement("div",{ref:this.ref,id:o})},t})(E.Component),n9=({as:e="div",...t},n)=>b.jsx(e,{...t,ref:n}),r9=E.forwardRef(n9),a9="https://challenges.cloudflare.com/turnstile/v0/api.js",y0="cf-turnstile-script",i9="cf-turnstile",b0="onloadTurnstileCallback",RO=e=>!!document.getElementById(e),o9=({render:e="explicit",onLoadCallbackName:t=b0,scriptOptions:{nonce:n="",defer:a=!0,async:o=!0,id:l="",appendTo:u,onError:d,crossOrigin:f=""}={}})=>{let h=l||y0;if(RO(h))return;let g=document.createElement("script");g.id=h,g.src=`${a9}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${g.src}"]`)&&(g.defer=!!a,g.async=!!o,n&&(g.nonce=n),f&&(g.crossOrigin=f),d&&(g.onerror=d,delete window[t]),(u==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(g))},ho={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 s9(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function l9(e=y0){let[t,n]=E.useState(!1);return E.useEffect(()=>{let a=()=>{RO(e)&&n(!0)},o=new MutationObserver(a);return o.observe(document,{childList:!0,subtree:!0}),a(),()=>{o.disconnect()}},[e]),t}var dc="unloaded",OO,c9=new Promise((e,t)=>{OO={resolve:e,reject:t},dc==="ready"&&e(void 0)}),u9=(e=b0)=>(dc==="unloaded"&&(dc="loading",window[e]=()=>{OO.resolve(),dc="ready",delete window[e]}),c9),TO=E.forwardRef((e,t)=>{let{scriptOptions:n,options:a={},siteKey:o,onWidgetLoad:l,onSuccess:u,onExpire:d,onError:f,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y,onLoadScript:_,id:S,style:w,as:T="div",injectScript:R=!0,rerenderOnCallbackChange:A=!1,...C}=e,O=a.size,N=E.useCallback(()=>typeof O>"u"?{}:a.execution==="execute"?ho.invisible:a.appearance==="interaction-only"?ho.interactionOnly:ho[O],[a.execution,O,a.appearance]),[L,I]=E.useState(N()),D=E.useRef(null),[B,Z]=E.useState(!1),Y=E.useRef(void 0),V=E.useRef(!1),z=S||i9,ie=E.useRef({onSuccess:u,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y});E.useEffect(()=>{A||(ie.current={onSuccess:u,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:g,onUnsupported:p,onTimeout:y})});let ee=n?.id||y0,k=l9(ee),F=n?.onLoadCallbackName||b0,G=a.appearance||"always",ae=E.useMemo(()=>({sitekey:o,action:a.action,cData:a.cData,theme:a.theme||"auto",language:a.language||"auto",tabindex:a.tabIndex,"response-field":a.responseField,"response-field-name":a.responseFieldName,size:s9(O),retry:a.retry||"auto","retry-interval":a.retryInterval||8e3,"refresh-expired":a.refreshExpired||"auto","refresh-timeout":a.refreshTimeout||"auto",execution:a.execution||"render",appearance:a.appearance||"always","feedback-enabled":a.feedbackEnabled||!0,callback:P=>{V.current=!0,A?u?.(P):ie.current.onSuccess?.(P)},"error-callback":A?f:(...P)=>ie.current.onError?.(...P),"expired-callback":A?d:(...P)=>ie.current.onExpire?.(...P),"before-interactive-callback":A?h:(...P)=>ie.current.onBeforeInteractive?.(...P),"after-interactive-callback":A?g:(...P)=>ie.current.onAfterInteractive?.(...P),"unsupported-callback":A?p:(...P)=>ie.current.onUnsupported?.(...P),"timeout-callback":A?y:(...P)=>ie.current.onTimeout?.(...P)}),[a.action,a.appearance,a.cData,a.execution,a.language,a.refreshExpired,a.responseField,a.responseFieldName,a.retry,a.retryInterval,a.tabIndex,a.theme,a.feedbackEnabled,a.refreshTimeout,o,O,A,A?u:null,A?f:null,A?d:null,A?h:null,A?g:null,A?p:null,A?y:null]),ve=E.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return E.useEffect(function(){R&&!B&&o9({onLoadCallbackName:F,scriptOptions:{...n,id:ee}})},[R,B,n,ee]),E.useEffect(function(){dc!=="ready"&&u9(F).then(()=>Z(!0)).catch(console.error)},[]),E.useEffect(function(){if(!D.current||!B)return;let P=!1;return(async()=>{if(P||!D.current)return;let Q=window.turnstile.render(D.current,ae);Y.current=Q,Y.current&&l?.(Y.current)})(),()=>{P=!0,Y.current&&(window.turnstile.remove(Y.current),V.current=!1)}},[z,B,ae]),E.useImperativeHandle(t,()=>{let{turnstile:P}=window;return{getResponse(){if(!P?.getResponse||!Y.current||!ve()){console.warn("Turnstile has not been loaded");return}return P.getResponse(Y.current)},async getResponsePromise(Q=3e4,te=100){return new Promise((se,ge)=>{let _e,ye=async()=>{if(V.current&&window.turnstile&&Y.current)try{let Se=window.turnstile.getResponse(Y.current);return _e&&clearTimeout(_e),Se?se(Se):ge(new Error("No response received"))}catch(Se){return _e&&clearTimeout(_e),console.warn("Failed to get response",Se),ge(new Error("Failed to get response"))}_e||(_e=setTimeout(()=>{_e&&clearTimeout(_e),ge(new Error("Timeout"))},Q)),await new Promise(Se=>setTimeout(Se,te)),await ye()};ye()})},reset(){if(!P?.reset||!Y.current||!ve()){console.warn("Turnstile has not been loaded");return}a.execution==="execute"&&I(ho.invisible);try{V.current=!1,P.reset(Y.current)}catch(Q){console.warn(`Failed to reset Turnstile widget ${Y}`,Q)}},remove(){if(!P?.remove||!Y.current||!ve()){console.warn("Turnstile has not been loaded");return}I(ho.invisible),V.current=!1,P.remove(Y.current),Y.current=null},render(){if(!P?.render||!D.current||!ve()||Y.current){console.warn("Turnstile has not been loaded or container not found");return}let Q=P.render(D.current,ae);return Y.current=Q,Y.current&&l?.(Y.current),a.execution!=="execute"&&I(O?ho[O]:{}),Q},execute(){if(a.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!P?.execute||!D.current||!Y.current||!ve()){console.warn("Turnstile has not been loaded or container not found");return}P.execute(D.current,ae),I(O?ho[O]:{})},isExpired(){return!P?.isExpired||!Y.current||!ve()?(console.warn("Turnstile has not been loaded"),!1):P.isExpired(Y.current)}}},[Y,a.execution,O,ae,D,ve,B,l]),E.useEffect(()=>{k&&!B&&window.turnstile&&Z(!0)},[B,k]),E.useEffect(()=>{I(N())},[a.execution,O,G]),E.useEffect(()=>{!k||typeof _!="function"||_()},[k]),b.jsx(r9,{ref:D,as:T,id:z,style:{...L,...w},...C})});TO.displayName="Turnstile";var tg={exports:{}},ng,FS;function d9(){if(FS)return ng;FS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ng=e,ng}var rg,VS;function f9(){if(VS)return rg;VS=1;var e=d9();function t(){}function n(){}return n.resetWarningCache=t,rg=function(){function a(u,d,f,h,g,p){if(p!==e){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}a.isRequired=a;function o(){return a}var l={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},rg}var HS;function _0(){return HS||(HS=1,tg.exports=f9()()),tg.exports}var h9=_0();const Zn=Io(h9);var p9=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function av(){return av=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},av.apply(this,arguments)}function m9(e,t){if(e==null)return{};var n={},a=Object.keys(e),o,l;for(l=0;l<a.length;l++)o=a[l],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Sd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,iv(e,t)}function iv(e,t){return iv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,o){return a.__proto__=o,a},iv(e,t)}var Hf=(function(e){g9(t,e);function t(){var a;return a=e.call(this)||this,a.handleExpired=a.handleExpired.bind(Sd(a)),a.handleErrored=a.handleErrored.bind(Sd(a)),a.handleChange=a.handleChange.bind(Sd(a)),a.handleRecaptchaRef=a.handleRecaptchaRef.bind(Sd(a)),a}var n=t.prototype;return n.getCaptchaFunction=function(o){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[o]:this.props.grecaptcha[o]:null},n.getValue=function(){var o=this.getCaptchaFunction("getResponse");return o&&this._widgetId!==void 0?o(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var o=this.getCaptchaFunction("execute");if(o&&this._widgetId!==void 0)return o(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var o=this;return new Promise(function(l,u){o.executionResolve=l,o.executionReject=u,o.execute()})},n.reset=function(){var o=this.getCaptchaFunction("reset");o&&this._widgetId!==void 0&&o(this._widgetId)},n.forceReset=function(){var o=this.getCaptchaFunction("reset");o&&o()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(o){this.props.onChange&&this.props.onChange(o),this.executionResolve&&(this.executionResolve(o),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var o=this.getCaptchaFunction("render");if(o&&this._widgetId===void 0){var l=document.createElement("div");this._widgetId=o(l,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(l)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(o){this.captcha=o},n.render=function(){var o=this.props;o.sitekey,o.onChange,o.theme,o.type,o.tabindex,o.onExpired,o.onErrored,o.size,o.stoken,o.grecaptcha,o.badge,o.hl,o.isolated;var l=m9(o,p9);return E.createElement("div",av({},l,{ref:this.handleRecaptchaRef}))},t})(E.Component);Hf.displayName="ReCAPTCHA";Hf.propTypes={sitekey:Zn.string.isRequired,onChange:Zn.func,grecaptcha:Zn.object,theme:Zn.oneOf(["dark","light"]),type:Zn.oneOf(["image","audio"]),tabindex:Zn.number,onExpired:Zn.func,onErrored:Zn.func,size:Zn.oneOf(["compact","normal","invisible"]),stoken:Zn.string,hl:Zn.string,badge:Zn.oneOf(["bottomright","bottomleft","inline"]),isolated:Zn.bool};Hf.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var ag={exports:{}},vt={};var $S;function v9(){if($S)return vt;$S=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,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(N){if(typeof N=="object"&&N!==null){var L=N.$$typeof;switch(L){case t:switch(N=N.type,N){case f:case h:case a:case l:case o:case p:return N;default:switch(N=N&&N.$$typeof,N){case d:case g:case S:case _:case u:return N;default:return L}}case n:return L}}}function O(N){return C(N)===h}return vt.AsyncMode=f,vt.ConcurrentMode=h,vt.ContextConsumer=d,vt.ContextProvider=u,vt.Element=t,vt.ForwardRef=g,vt.Fragment=a,vt.Lazy=S,vt.Memo=_,vt.Portal=n,vt.Profiler=l,vt.StrictMode=o,vt.Suspense=p,vt.isAsyncMode=function(N){return O(N)||C(N)===f},vt.isConcurrentMode=O,vt.isContextConsumer=function(N){return C(N)===d},vt.isContextProvider=function(N){return C(N)===u},vt.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===t},vt.isForwardRef=function(N){return C(N)===g},vt.isFragment=function(N){return C(N)===a},vt.isLazy=function(N){return C(N)===S},vt.isMemo=function(N){return C(N)===_},vt.isPortal=function(N){return C(N)===n},vt.isProfiler=function(N){return C(N)===l},vt.isStrictMode=function(N){return C(N)===o},vt.isSuspense=function(N){return C(N)===p},vt.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===h||N===l||N===o||N===p||N===y||typeof N=="object"&&N!==null&&(N.$$typeof===S||N.$$typeof===_||N.$$typeof===u||N.$$typeof===d||N.$$typeof===g||N.$$typeof===T||N.$$typeof===R||N.$$typeof===A||N.$$typeof===w)},vt.typeOf=C,vt}var GS;function y9(){return GS||(GS=1,ag.exports=v9()),ag.exports}var ig,qS;function b9(){if(qS)return ig;qS=1;var e=y9(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=a,l[e.Memo]=o;function u(S){return e.isMemo(S)?o:l[S.$$typeof]||t}var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;function _(S,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=u(S),O=u(w),N=0;N<A.length;++N){var L=A[N];if(!n[L]&&!(T&&T[L])&&!(O&&O[L])&&!(C&&C[L])){var I=g(w,L);try{d(S,L,I)}catch{}}}}return S}return ig=_,ig}var _9=b9();const E9=Io(_9);function ov(){return ov=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ov.apply(this,arguments)}function S9(e,t){if(e==null)return{};var n={},a=Object.keys(e),o,l;for(l=0;l<a.length;l++)o=a[l],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function w9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Gr={},x9=0;function R9(e,t){return t=t||{},function(a){var o=a.displayName||a.name||"Component",l=(function(d){w9(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-"+x9++),this.__scriptLoaderID},h.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},h.asyncScriptLoaderHandleLoad=function(p){var y=this;this.setState(p,function(){return y.props.asyncScriptOnLoad&&y.props.asyncScriptOnLoad(y.state)})},h.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Gr[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var y in p.observers)p.observers[y](p);delete window[t.callbackName]},h.componentDidMount=function(){var p=this,y=this.setupScriptURL(),_=this.asyncScriptLoaderGetScriptLoaderID(),S=t,w=S.globalName,T=S.callbackName,R=S.scriptId;if(w&&typeof window[w]<"u"&&(Gr[y]={loaded:!0,observers:{}}),Gr[y]){var A=Gr[y];if(A&&(A.loaded||A.errored)){this.asyncScriptLoaderHandleLoad(A);return}A.observers[_]=function(I){return p.asyncScriptLoaderHandleLoad(I)};return}var C={};C[_]=function(I){return p.asyncScriptLoaderHandleLoad(I)},Gr[y]={loaded:!1,observers:C};var O=document.createElement("script");O.src=y,O.async=!0;for(var N in t.attributes)O.setAttribute(N,t.attributes[N]);R&&(O.id=R);var L=function(D){if(Gr[y]){var B=Gr[y],Z=B.observers;for(var Y in Z)D(Z[Y])&&delete Z[Y]}};T&&typeof window<"u"&&(window[T]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var I=Gr[y];I&&(I.loaded=!0,L(function(D){return T?!1:(D(I),!0)}))},O.onerror=function(){var I=Gr[y];I&&(I.errored=!0,L(function(D){return D(I),!0}))},document.body.appendChild(O)},h.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var y=document.getElementsByTagName("script"),_=0;_<y.length;_+=1)y[_].src.indexOf(p)>-1&&y[_].parentNode&&y[_].parentNode.removeChild(y[_]);var S=Gr[p];S&&(delete S.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Gr[p])},h.render=function(){var p=t.globalName,y=this.props;y.asyncScriptOnLoad;var _=y.forwardedRef,S=S9(y,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(S[p]=typeof window[p]<"u"?window[p]:void 0),S.ref=_,E.createElement(a,S)},f})(E.Component),u=E.forwardRef(function(d,f){return E.createElement(l,ov({},d,{forwardedRef:f}))});return u.displayName="AsyncScriptLoader("+o+")",u.propTypes={asyncScriptOnLoad:Zn.func},E9(u,a)}}var sv="onloadcallback",O9="grecaptcha";function lv(){return typeof window<"u"&&window.recaptchaOptions||{}}function T9(){var e=lv(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+sv+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+sv+"&render=explicit"}const A9=R9(T9,{callbackName:sv,globalName:O9,attributes:lv().nonce?{nonce:lv().nonce}:{}})(Hf);var C9=Object.defineProperty,M9=Object.defineProperties,N9=Object.getOwnPropertyDescriptors,_f=Object.getOwnPropertySymbols,AO=Object.prototype.hasOwnProperty,CO=Object.prototype.propertyIsEnumerable,YS=(e,t,n)=>t in e?C9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I9=(e,t)=>{for(var n in t||(t={}))AO.call(t,n)&&YS(e,n,t[n]);if(_f)for(var n of _f(t))CO.call(t,n)&&YS(e,n,t[n]);return e},D9=(e,t)=>M9(e,N9(t)),L9=(e,t)=>{var n={};for(var a in e)AO.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&_f)for(var a of _f(e))t.indexOf(a)<0&&CO.call(e,a)&&(n[a]=e[a]);return n};function P9(e){let t=setTimeout(e,0),n=setTimeout(e,10),a=setTimeout(e,50);return[t,n,a]}function k9(e){let t=E.useRef();return E.useEffect(()=>{t.current=e}),t.current}var j9=18,MO=40,U9=`${MO}px`,B9=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function z9({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:a}){let[o,l]=E.useState(!1),[u,d]=E.useState(!1),[f,h]=E.useState(!1),g=E.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&u,[o,u,n]),p=E.useCallback(()=>{let y=e.current,_=t.current;if(!y||!_||f||n==="none")return;let S=y,w=S.getBoundingClientRect().left+S.offsetWidth,T=S.getBoundingClientRect().top+S.offsetHeight/2,R=w-j9,A=T;document.querySelectorAll(B9).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>=MO)}_();let S=setInterval(_,1e3);return()=>{clearInterval(S)}},[e,n]),E.useEffect(()=>{let y=a||document.activeElement===t.current;if(n==="none"||!y)return;let _=setTimeout(p,0),S=setTimeout(p,2e3),w=setTimeout(p,5e3),T=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(S),clearTimeout(w),clearTimeout(T)}},[t,a,n,p]),{hasPWMBadge:o,willPushPWMBadge:g,PWM_BADGE_SPACE_WIDTH:U9}}var NO=E.createContext({}),IO=E.forwardRef((e,t)=>{var n=e,{value:a,onChange:o,maxLength:l,textAlign:u="left",pattern:d,placeholder:f,inputMode:h="numeric",onComplete:g,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:y,containerClassName:_,noScriptCSSFallback:S=F9,render:w,children:T}=n,R=L9(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),A,C,O,N,L;let[I,D]=E.useState(typeof R.defaultValue=="string"?R.defaultValue:""),B=a??I,Z=k9(B),Y=E.useCallback(re=>{o?.(re),D(re)},[o]),V=E.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),z=E.useRef(null),ie=E.useRef(null),ee=E.useRef({value:B,onChange:Y,isIOS:typeof window<"u"&&((C=(A=window?.CSS)==null?void 0:A.supports)==null?void 0:C.call(A,"-webkit-touch-callout","none"))}),k=E.useRef({prev:[(O=z.current)==null?void 0:O.selectionStart,(N=z.current)==null?void 0:N.selectionEnd,(L=z.current)==null?void 0:L.selectionDirection]});E.useImperativeHandle(t,()=>z.current,[]),E.useEffect(()=>{let re=z.current,be=ie.current;if(!re||!be)return;ee.current.value!==re.value&&ee.current.onChange(re.value),k.current.prev=[re.selectionStart,re.selectionEnd,re.selectionDirection];function Le(){if(document.activeElement!==re){Q(null),se(null);return}let Ue=re.selectionStart,et=re.selectionEnd,j=re.selectionDirection,q=re.maxLength,W=re.value,de=k.current.prev,me=-1,he=-1,Re;if(W.length!==0&&Ue!==null&&et!==null){let nr=Ue===et,Ct=Ue===W.length&&W.length<q;if(nr&&!Ct){let Gt=Ue;if(Gt===0)me=0,he=1,Re="forward";else if(Gt===q)me=Gt-1,he=Gt,Re="backward";else if(q>1&&W.length>1){let Mt=0;if(de[0]!==null&&de[1]!==null){Re=Gt<de[1]?"backward":"forward";let on=de[0]===de[1]&&de[0]<q;Re==="backward"&&!on&&(Mt=-1)}me=Mt+Gt,he=Mt+Gt+1}}me!==-1&&he!==-1&&me!==he&&z.current.setSelectionRange(me,he,Re)}let Fe=me!==-1?me:Ue,tt=he!==-1?he:et,Rt=Re??j;Q(Fe),se(tt),k.current.prev=[Fe,tt,Rt]}if(document.addEventListener("selectionchange",Le,{capture:!0}),Le(),document.activeElement===re&&ve(!0),!document.getElementById("input-otp-style")){let Ue=document.createElement("style");if(Ue.id="input-otp-style",document.head.appendChild(Ue),Ue.sheet){let et="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;";ec(Ue.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ec(Ue.sheet,`[data-input-otp]:autofill { ${et} }`),ec(Ue.sheet,`[data-input-otp]:-webkit-autofill { ${et} }`),ec(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; } }"),ec(Ue.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Ye=()=>{be&&be.style.setProperty("--root-height",`${re.clientHeight}px`)};Ye();let At=new ResizeObserver(Ye);return At.observe(re),()=>{document.removeEventListener("selectionchange",Le,{capture:!0}),At.disconnect()}},[]);let[F,G]=E.useState(!1),[ae,ve]=E.useState(!1),[P,Q]=E.useState(null),[te,se]=E.useState(null);E.useEffect(()=>{P9(()=>{var re,be,Le,Ye;(re=z.current)==null||re.dispatchEvent(new Event("input"));let At=(be=z.current)==null?void 0:be.selectionStart,Ue=(Le=z.current)==null?void 0:Le.selectionEnd,et=(Ye=z.current)==null?void 0:Ye.selectionDirection;At!==null&&Ue!==null&&(Q(At),se(Ue),k.current.prev=[At,Ue,et])})},[B,ae]),E.useEffect(()=>{Z!==void 0&&B!==Z&&Z.length<l&&B.length===l&&g?.(B)},[l,g,Z,B]);let ge=z9({containerRef:ie,inputRef:z,pushPasswordManagerStrategy:p,isFocused:ae}),_e=E.useCallback(re=>{let be=re.currentTarget.value.slice(0,l);if(be.length>0&&V&&!V.test(be)){re.preventDefault();return}typeof Z=="string"&&be.length<Z.length&&document.dispatchEvent(new Event("selectionchange")),Y(be)},[l,Y,Z,V]),ye=E.useCallback(()=>{var re;if(z.current){let be=Math.min(z.current.value.length,l-1),Le=z.current.value.length;(re=z.current)==null||re.setSelectionRange(be,Le),Q(be),se(Le)}ve(!0)},[l]),Se=E.useCallback(re=>{var be,Le;let Ye=z.current;if(!y&&(!ee.current.isIOS||!re.clipboardData||!Ye))return;let At=re.clipboardData.getData("text/plain"),Ue=y?y(At):At;re.preventDefault();let et=(be=z.current)==null?void 0:be.selectionStart,j=(Le=z.current)==null?void 0:Le.selectionEnd,q=(et!==j?B.slice(0,et)+Ue+B.slice(j):B.slice(0,et)+Ue+B.slice(et)).slice(0,l);if(q.length>0&&V&&!V.test(q))return;Ye.value=q,Y(q);let W=Math.min(q.length,l-1),de=q.length;Ye.setSelectionRange(W,de),Q(W),se(de)},[l,Y,V,B]),le=E.useMemo(()=>({position:"relative",cursor:R.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[R.disabled]),je=E.useMemo(()=>({position:"absolute",inset:0,width:ge.willPushPWMBadge?`calc(100% + ${ge.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ge.willPushPWMBadge?`inset(0 ${ge.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:u,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ge.PWM_BADGE_SPACE_WIDTH,ge.willPushPWMBadge,u]),at=E.useMemo(()=>E.createElement("input",D9(I9({autoComplete:R.autoComplete||"one-time-code"},R),{"data-input-otp":!0,"data-input-otp-placeholder-shown":B.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":te,inputMode:h,pattern:V?.source,"aria-placeholder":f,style:je,maxLength:l,value:B,ref:z,onPaste:re=>{var be;Se(re),(be=R.onPaste)==null||be.call(R,re)},onChange:_e,onMouseOver:re=>{var be;G(!0),(be=R.onMouseOver)==null||be.call(R,re)},onMouseLeave:re=>{var be;G(!1),(be=R.onMouseLeave)==null||be.call(R,re)},onFocus:re=>{var be;ye(),(be=R.onFocus)==null||be.call(R,re)},onBlur:re=>{var be;ve(!1),(be=R.onBlur)==null||be.call(R,re)}})),[_e,ye,Se,h,je,l,te,P,R,V?.source,B]),Je=E.useMemo(()=>({slots:Array.from({length:l}).map((re,be)=>{var Le;let Ye=ae&&P!==null&&te!==null&&(P===te&&be===P||be>=P&&be<te),At=B[be]!==void 0?B[be]:null,Ue=B[0]!==void 0?null:(Le=f?.[be])!=null?Le:null;return{char:At,placeholderChar:Ue,isActive:Ye,hasFakeCaret:Ye&&At===null}}),isFocused:ae,isHovering:!R.disabled&&F}),[ae,F,l,te,P,R.disabled,B]),Ft=E.useMemo(()=>w?w(Je):E.createElement(NO.Provider,{value:Je},T),[T,Je,w]);return E.createElement(E.Fragment,null,S!==null&&E.createElement("noscript",null,E.createElement("style",null,S)),E.createElement("div",{ref:ie,"data-input-otp-container":!0,style:le,className:_},Ft,E.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},at)))});IO.displayName="Input";function ec(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var F9=`
74
- [data-input-otp] {
75
- --nojs-bg: white !important;
76
- --nojs-fg: black !important;
77
-
78
- background-color: var(--nojs-bg) !important;
79
- color: var(--nojs-fg) !important;
80
- caret-color: var(--nojs-fg) !important;
81
- letter-spacing: .25em !important;
82
- text-align: center !important;
83
- border: 1px solid var(--nojs-fg) !important;
84
- border-radius: 4px !important;
85
- width: 100% !important;
86
- }
87
- @media (prefers-color-scheme: dark) {
88
- [data-input-otp] {
89
- --nojs-bg: black !important;
90
- --nojs-fg: white !important;
91
- }
92
- }`,As={},og,KS;function DO(){return KS||(KS=1,og={L:1,M:0,Q:3,H:2}),og}var sg,WS;function LO(){return WS||(WS=1,sg={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),sg}var lg,ZS;function V9(){if(ZS)return lg;ZS=1;var e=LO();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var a=0;a<this.data.length;a++)n.put(this.data.charCodeAt(a),8)}},lg=t,lg}var cg,QS;function H9(){if(QS)return cg;QS=1;var e=DO();function t(n,a){this.totalCount=n,this.dataCount=a}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,a){var o=t.getRsBlockTable(n,a);if(o==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+a);for(var l=o.length/3,u=new Array,d=0;d<l;d++)for(var f=o[d*3+0],h=o[d*3+1],g=o[d*3+2],p=0;p<f;p++)u.push(new t(h,g));return u},t.getRsBlockTable=function(n,a){switch(a){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},cg=t,cg}var ug,XS;function $9(){if(XS)return ug;XS=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var a=0;a<n;a++)this.putBit((t>>>n-a-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},ug=e,ug}var dg,JS;function PO(){if(JS)return dg;JS=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 dg=e,dg}var fg,ew;function kO(){if(ew)return fg;ew=1;var e=PO();function t(n,a){if(n.length==null)throw new Error(n.length+"/"+a);for(var o=0;o<n.length&&n[o]==0;)o++;this.num=new Array(n.length-o+a);for(var l=0;l<n.length-o;l++)this.num[l]=n[l+o]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var a=new Array(this.getLength()+n.getLength()-1),o=0;o<this.getLength();o++)for(var l=0;l<n.getLength();l++)a[o+l]^=e.gexp(e.glog(this.get(o))+e.glog(n.get(l)));return new t(a,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var a=e.glog(this.get(0))-e.glog(n.get(0)),o=new Array(this.getLength()),l=0;l<this.getLength();l++)o[l]=this.get(l);for(var l=0;l<n.getLength();l++)o[l]^=e.gexp(e.glog(n.get(l))+a);return new t(o,0).mod(n)}},fg=t,fg}var hg,tw;function G9(){if(tw)return hg;tw=1;var e=LO(),t=kO(),n=PO(),a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},o={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(l){for(var u=l<<10;o.getBCHDigit(u)-o.getBCHDigit(o.G15)>=0;)u^=o.G15<<o.getBCHDigit(u)-o.getBCHDigit(o.G15);return(l<<10|u)^o.G15_MASK},getBCHTypeNumber:function(l){for(var u=l<<12;o.getBCHDigit(u)-o.getBCHDigit(o.G18)>=0;)u^=o.G18<<o.getBCHDigit(u)-o.getBCHDigit(o.G18);return l<<12|u},getBCHDigit:function(l){for(var u=0;l!=0;)u++,l>>>=1;return u},getPatternPosition:function(l){return o.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,u,d){switch(l){case a.PATTERN000:return(u+d)%2==0;case a.PATTERN001:return u%2==0;case a.PATTERN010:return d%3==0;case a.PATTERN011:return(u+d)%3==0;case a.PATTERN100:return(Math.floor(u/2)+Math.floor(d/3))%2==0;case a.PATTERN101:return u*d%2+u*d%3==0;case a.PATTERN110:return(u*d%2+u*d%3)%2==0;case a.PATTERN111:return(u*d%3+(u+d)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var u=new t([1],0),d=0;d<l;d++)u=u.multiply(new t([1,n.gexp(d)],0));return u},getLengthInBits:function(l,u){if(1<=u&&u<10)switch(l){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+l)}else if(u<27)switch(l){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+l)}else if(u<41)switch(l){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+l)}else throw new Error("type:"+u)},getLostPoint:function(l){for(var u=l.getModuleCount(),d=0,f=0;f<u;f++)for(var h=0;h<u;h++){for(var g=0,p=l.isDark(f,h),y=-1;y<=1;y++)if(!(f+y<0||u<=f+y))for(var _=-1;_<=1;_++)h+_<0||u<=h+_||y==0&&_==0||p==l.isDark(f+y,h+_)&&g++;g>5&&(d+=3+g-5)}for(var f=0;f<u-1;f++)for(var h=0;h<u-1;h++){var S=0;l.isDark(f,h)&&S++,l.isDark(f+1,h)&&S++,l.isDark(f,h+1)&&S++,l.isDark(f+1,h+1)&&S++,(S==0||S==4)&&(d+=3)}for(var f=0;f<u;f++)for(var h=0;h<u-6;h++)l.isDark(f,h)&&!l.isDark(f,h+1)&&l.isDark(f,h+2)&&l.isDark(f,h+3)&&l.isDark(f,h+4)&&!l.isDark(f,h+5)&&l.isDark(f,h+6)&&(d+=40);for(var h=0;h<u;h++)for(var f=0;f<u-6;f++)l.isDark(f,h)&&!l.isDark(f+1,h)&&l.isDark(f+2,h)&&l.isDark(f+3,h)&&l.isDark(f+4,h)&&!l.isDark(f+5,h)&&l.isDark(f+6,h)&&(d+=40);for(var w=0,h=0;h<u;h++)for(var f=0;f<u;f++)l.isDark(f,h)&&w++;var T=Math.abs(100*w/u/u-50)/5;return d+=T*10,d}};return hg=o,hg}var pg,nw;function q9(){if(nw)return pg;nw=1;var e=V9(),t=H9(),n=$9(),a=G9(),o=kO();function l(d,f){this.typeNumber=d,this.errorCorrectLevel=f,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=l.prototype;return u.addData=function(d){var f=new e(d);this.dataList.push(f),this.dataCache=null},u.isDark=function(d,f){if(d<0||this.moduleCount<=d||f<0||this.moduleCount<=f)throw new Error(d+","+f);return this.modules[d][f]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var d=1;for(d=1;d<40;d++){for(var f=t.getRSBlocks(d,this.errorCorrectLevel),h=new n,g=0,p=0;p<f.length;p++)g+=f[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),a.getLengthInBits(y.mode,d)),y.write(h)}if(h.getLengthInBits()<=g*8)break}this.typeNumber=d}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(d,f){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++)this.modules[h][g]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(d,f),this.typeNumber>=7&&this.setupTypeNumber(d),this.dataCache==null&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,f)},u.setupPositionProbePattern=function(d,f){for(var h=-1;h<=7;h++)if(!(d+h<=-1||this.moduleCount<=d+h))for(var g=-1;g<=7;g++)f+g<=-1||this.moduleCount<=f+g||(0<=h&&h<=6&&(g==0||g==6)||0<=g&&g<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=g&&g<=4?this.modules[d+h][f+g]=!0:this.modules[d+h][f+g]=!1)},u.getBestMaskPattern=function(){for(var d=0,f=0,h=0;h<8;h++){this.makeImpl(!0,h);var g=a.getLostPoint(this);(h==0||d>g)&&(d=g,f=h)}return f},u.createMovieClip=function(d,f,h){var g=d.createEmptyMovieClip(f,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var _=y*p,S=0;S<this.modules[y].length;S++){var 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},u.setupTimingPattern=function(){for(var d=8;d<this.moduleCount-8;d++)this.modules[d][6]==null&&(this.modules[d][6]=d%2==0);for(var f=8;f<this.moduleCount-8;f++)this.modules[6][f]==null&&(this.modules[6][f]=f%2==0)},u.setupPositionAdjustPattern=function(){for(var d=a.getPatternPosition(this.typeNumber),f=0;f<d.length;f++)for(var h=0;h<d.length;h++){var g=d[f],p=d[h];if(this.modules[g][p]==null)for(var y=-2;y<=2;y++)for(var _=-2;_<=2;_++)y==-2||y==2||_==-2||_==2||y==0&&_==0?this.modules[g+y][p+_]=!0:this.modules[g+y][p+_]=!1}},u.setupTypeNumber=function(d){for(var f=a.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var g=!d&&(f>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=g}for(var h=0;h<18;h++){var g=!d&&(f>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=g}},u.setupTypeInfo=function(d,f){for(var h=this.errorCorrectLevel<<3|f,g=a.getBCHTypeInfo(h),p=0;p<15;p++){var y=!d&&(g>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!d&&(g>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!d},u.mapData=function(d,f){for(var h=-1,g=this.moduleCount-1,p=7,y=0,_=this.moduleCount-1;_>0;_-=2)for(_==6&&_--;;){for(var S=0;S<2;S++)if(this.modules[g][_-S]==null){var w=!1;y<d.length&&(w=(d[y]>>>p&1)==1);var T=a.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(),a.getLengthInBits(_.mode,d)),_.write(p)}for(var S=0,y=0;y<g.length;y++)S+=g[y].dataCount;if(p.getLengthInBits()>S*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+S*8+")");for(p.getLengthInBits()+4<=S*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=S*8||(p.put(l.PAD0,8),p.getLengthInBits()>=S*8));)p.put(l.PAD1,8);return l.createBytes(p,g)},l.createBytes=function(d,f){for(var h=0,g=0,p=0,y=new Array(f.length),_=new Array(f.length),S=0;S<f.length;S++){var 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=a.getErrorCorrectPolynomial(T),C=new o(y[S],A.getLength()-1),O=C.mod(A);_[S]=new Array(A.getLength()-1);for(var R=0;R<_[S].length;R++){var N=R+O.getLength()-_[S].length;_[S][R]=N>=0?O.get(N):0}}for(var L=0,R=0;R<f.length;R++)L+=f[R].totalCount;for(var I=new Array(L),D=0,R=0;R<g;R++)for(var S=0;S<f.length;S++)R<y[S].length&&(I[D++]=y[S][R]);for(var R=0;R<p;R++)for(var S=0;S<f.length;S++)R<_[S].length&&(I[D++]=_[S][R]);return I},pg=l,pg}var wd={},rw;function Y9(){if(rw)return wd;rw=1,Object.defineProperty(wd,"__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),a=$i(),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function u(h,g){var p={};for(var y in h)g.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var d={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},f=(0,a.forwardRef)(function(h,g){var p=h.bgColor,y=h.bgD,_=h.fgD,S=h.fgColor,w=h.size,T=h.title,R=h.viewBoxSize,A=h.xmlns,C=A===void 0?"http://www.w3.org/2000/svg":A,O=u(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return o.default.createElement("svg",e({},O,{height:w,ref:g,viewBox:"0 0 "+R+" "+R,width:w,xmlns:C}),T?o.default.createElement("title",null,T):null,o.default.createElement("path",{d:y,fill:p}),o.default.createElement("path",{d:_,fill:S}))});return f.displayName="QRCodeSvg",f.propTypes=d,wd.default=f,wd}var aw;function K9(){if(aw)return As;aw=1,Object.defineProperty(As,"__esModule",{value:!0}),As.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),a=DO(),o=p(a),l=q9(),u=p(l),d=$i(),f=p(d),h=Y9(),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,N=w.level,L=N===void 0?"L":N,I=w.size,D=I===void 0?256:I,B=w.value,Z=y(w,["bgColor","fgColor","level","size","value"]),Y=new u.default(-1,o.default[L]);Y.addData(B),Y.make();var V=Y.modules;return f.default.createElement(g.default,e({},Z,{bgColor:A,bgD:V.map(function(z,ie){return z.map(function(ee,k){return ee?"":"M "+k+" "+ie+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:V.map(function(z,ie){return z.map(function(ee,k){return ee?"M "+k+" "+ie+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:T,size:D,viewBoxSize:V.length}))});return As.QRCode=S,S.displayName="QRCode",S.propTypes=_,As.default=S,As}var W9=K9();const Z9=Io(W9);var Q9="Separator",iw="horizontal",X9=["horizontal","vertical"],jO=E.forwardRef((e,t)=>{const{decorative:n,orientation:a=iw,...o}=e,l=J9(a)?a:iw,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return b.jsx(Pc.div,{"data-orientation":l,...d,...o,ref:t})});jO.displayName=Q9;function J9(e){return X9.includes(e)}var eU=jO;function tU(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:a},basePath:o,viewPaths:l,replace:u}=E.useContext(Ze),{data:d,isPending:f,error:h,refetch:g}=a(),p=d;return E.useEffect(()=>{if(!n||f||p)return;const _=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;u(`${o}/${l[t]}?redirectTo=${encodeURIComponent(_)}`)},[f,p,o,l,u,t,n]),{data:p,user:p?.user,isPending:f,error:h,refetch:g}}function No({className:e,...t}){return b.jsx("div",{"data-slot":"card",className:pe("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function $f({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:pe("@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:pe("leading-none font-semibold",e),...t})}function Gf({className:e,...t}){return b.jsx("div",{"data-slot":"card-description",className:pe("text-muted-foreground text-sm",e),...t})}function qf({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:pe("px-6",e),...t})}function cv({className:e,...t}){return b.jsx("div",{"data-slot":"card-footer",className:pe("flex items-center px-6 [.border-t]:pt-6",e),...t})}function vr({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:pe("bg-accent animate-pulse rounded-md",e),...t})}var nU=oD("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 Lt({className:e,variant:t,size:n,asChild:a=!1,...o}){const l=a?Fx:"button";return b.jsx(l,{"data-slot":"button",className:pe(nU({variant:t,size:n,className:e})),...o})}function rU({classNames:e,actionLabel:t,disabled:n,isSubmitting:a,variant:o,onClick:l,...u}){return l||(a=zv().isSubmitting),b.jsxs(Lt,{className:pe("md:ms-auto",e?.button,o==="default"&&e?.primaryButton,o==="destructive"&&e?.destructiveButton),disabled:a||n,size:"sm",type:l?"button":"submit",variant:o,onClick:l,...u,children:[a&&b.jsx(Tn,{className:"animate-spin"}),t]})}function aU({className:e,classNames:t,actionLabel:n,disabled:a,instructions:o,isPending:l,isSubmitting:u,variant:d,action:f}){return b.jsx(cv,{className:pe("flex flex-col justify-between gap-4 rounded-b-xl md:flex-row",(n||o)&&"!py-4 border-t",d==="destructive"?"border-destructive/30 bg-destructive/15":"bg-sidebar",e,t?.footer),children:l?b.jsxs(b.Fragment,{children:[o&&b.jsx(vr,{className:pe("my-0.5 h-3 w-48 max-w-full md:h-4 md:w-56",t?.skeleton)}),n&&b.jsx(vr,{className:pe("h-8 w-14 md:ms-auto",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[o&&b.jsx(Gf,{className:pe("text-center text-muted-foreground text-xs md:text-start md:text-sm",t?.instructions),children:o}),n&&b.jsx(rU,{classNames:t,actionLabel:n,disabled:a,isSubmitting:u,variant:d,onClick:f})]})})}function iU({className:e,classNames:t,description:n,isPending:a,title:o}){return b.jsx($f,{className:pe(t?.header,e),children:a?b.jsxs(b.Fragment,{children:[b.jsx(vr,{className:pe("my-0.5 h-5 w-1/3 md:h-5.5",t?.skeleton)}),n&&b.jsx(vr,{className:pe("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:pe("text-lg md:text-xl",t?.title),children:o}),n&&b.jsx(Gf,{className:pe("text-xs md:text-sm",t?.description),children:n})]})})}function oU({children:e,className:t,classNames:n,title:a,description:o,instructions:l,actionLabel:u,disabled:d,isPending:f,isSubmitting:h,optimistic:g,variant:p,action:y,..._}){return b.jsxs(No,{className:pe("w-full pb-0 text-start",p==="destructive"&&"border-destructive/40",t,n?.base),..._,children:[b.jsx(iU,{classNames:n,description:o,isPending:f,title:a}),e,b.jsx(aU,{classNames:n,actionLabel:u,disabled:d,isPending:f,isSubmitting:h,instructions:l,optimistic:g,variant:p,action:y})]})}async function sU(e,t,n,a){const o=await lU(e),l=document.createElement("canvas");l.width=l.height=n;const u=l.getContext("2d"),d=Math.min(o.width,o.height),f=(o.width-d)/2,h=(o.height-d)/2,g=d,p=d;u?.drawImage(o,f,h,g,p,0,0,n,n);const y=await new Promise(_=>l.toBlob(_,`image/${a}`));return new File([y],`${t}.${a}`,{type:`image/${a}`})}async function lU(e){return new Promise((t,n)=>{const a=new Image,o=new FileReader;o.onload=l=>{var u;a.src=(u=l.target)==null?void 0:u.result},a.onload=()=>t(a),a.onerror=l=>n(l),o.readAsDataURL(e)})}async function cU(e){return new Promise((t,n)=>{const a=new FileReader;a.onloadend=()=>t(a.result),a.onerror=n,a.readAsDataURL(e)})}function UO({...e}){return b.jsx(V7,{"data-slot":"dropdown-menu",...e})}function BO({...e}){return b.jsx(H7,{"data-slot":"dropdown-menu-trigger",...e})}function zO({className:e,sideOffset:t=4,...n}){return b.jsx($7,{children:b.jsx(G7,{"data-slot":"dropdown-menu-content",sideOffset:t,className:pe("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 Ef({className:e,inset:t,variant:n="default",...a}){return b.jsx(q7,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:pe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function FO({className:e,...t}){return b.jsx(W7,{"data-slot":"label",className:pe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Xa=PI,VO=E.createContext({}),tn=({...e})=>b.jsx(VO.Provider,{value:{name:e.name},children:b.jsx(UI,{...e})}),S0=()=>{const e=E.useContext(VO),t=E.useContext(HO),{getFieldState:n}=Cf(),a=zv({name:e.name}),o=n(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:l}=t;return{id:l,name:e.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...o}},HO=E.createContext({});function nn({className:e,...t}){const n=E.useId();return b.jsx(HO.Provider,{value:{id:n},children:b.jsx("div",{"data-slot":"form-item",className:pe("grid gap-2",e),...t})})}function rn({className:e,...t}){const{error:n,formItemId:a}=S0();return b.jsx(FO,{"data-slot":"form-label","data-error":!!n,className:pe("data-[error=true]:text-destructive",e),htmlFor:a,...t})}function dn({...e}){const{error:t,formItemId:n,formDescriptionId:a,formMessageId:o}=S0();return b.jsx(Fx,{"data-slot":"form-control",id:n,"aria-describedby":t?`${a} ${o}`:`${a}`,"aria-invalid":!!t,...e})}function bn({className:e,...t}){const{error:n,formMessageId:a}=S0(),o=n?String(n?.message??""):t.children;return o?b.jsx("p",{"data-slot":"form-message",id:a,className:pe("text-destructive text-sm",e),...t,children:o}):null}function Zr({className:e,type:t,...n}){return b.jsx("input",{type:t,"data-slot":"input",className:pe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function $O({className:e,...t}){return b.jsx(ak,{"data-slot":"avatar",className:pe("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function GO({className:e,...t}){return b.jsx(ik,{"data-slot":"avatar-image",className:pe("aspect-square size-full",e),...t})}function qO({className:e,...t}){return b.jsx(ok,{"data-slot":"avatar-fallback",className:pe("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function uU({className:e,classNames:t,isPending:n,size:a,organization:o,localization:l,...u}){const{localization:d,avatar:f}=E.useContext(Ze),h=E.useMemo(()=>({...d,...l}),[d,l]),g=o?.name,p=o?.logo;return n?b.jsx(vr,{className:pe("shrink-0 rounded-full",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs($O,{className:pe("bg-muted",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base),...u,children:[f?.Image?b.jsx(f.Image,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||""}):b.jsx(GO,{alt:g||h?.ORGANIZATION,className:t?.image,src:p||void 0}),b.jsx(qO,{className:pe("text-foreground",t?.fallback),delayMs:p?600:void 0,children:b.jsx(lI,{className:pe("size-[50%]",t?.fallbackIcon)})})]})}function YO({className:e,classNames:t,isPending:n,size:a,organization:o,localization:l}){const{localization:u}=E.useContext(Ze),d={...u,...l};return b.jsxs("div",{className:pe("flex items-center gap-2 truncate",e,t?.base),children:[b.jsx(uU,{className:pe(a!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:d,organization:o,size:a}),b.jsx("div",{className:pe("flex flex-col truncate text-left leading-tight",t?.content),children:n?b.jsxs(b.Fragment,{children:[b.jsx(vr,{className:pe("max-w-full",a==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),a!=="sm"&&b.jsx(vr,{className:pe("mt-1.5 max-w-full",a==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{className:pe("truncate font-semibold",a==="lg"?"text-base":"text-sm",t?.title),children:o?.name||d?.ORGANIZATION}),a!=="sm"&&o?.slug&&b.jsx("span",{className:pe("truncate opacity-70",a==="lg"?"text-sm":"text-xs",t?.subtitle),children:o.slug})]})})]})}function dU(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),o=new TextEncoder().encode(n),l=dk(_k(o)),u=t?.jpg?".jpg":"";let d=`https://gravatar.com/avatar/${l}${u}`;const f=new URLSearchParams;t?.size&&f.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&f.append("d",t.d),t?.forceDefault&&f.append("f","y");const h=f.toString();return h&&(d+=`?${h}`),d}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function KO({className:e,classNames:t,isPending:n,size:a,user:o,localization:l,...u}){const{localization:d,gravatar:f,avatar:h}=E.useContext(Ze),g={...d,...l},p=o?.displayName||o?.name||o?.fullName||o?.firstName||o?.displayUsername||o?.username||o?.email,y=o?.image||o?.avatar||o?.avatarUrl,_=f&&o?.email?dU(o.email,f===!0?void 0:f):null,S=f?_:y;return n?b.jsx(vr,{className:pe("shrink-0 rounded-full",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs($O,{className:pe("bg-muted",a==="sm"?"size-6":a==="lg"?"size-10":a==="xl"?"size-12":"size-8",e,t?.base),...u,children:[h?.Image?b.jsx(h.Image,{alt:p||g?.USER,className:t?.image,src:S||""}):b.jsx(GO,{alt:p||g?.USER,className:t?.image,src:S||void 0}),b.jsx(qO,{className:pe("text-foreground uppercase",t?.fallback),delayMs:S?600:void 0,children:fU(p)||b.jsx(NI,{className:pe("size-[50%]",t?.fallbackIcon)})})]})}var fU=e=>e?.slice(0,2);function Iz({className:e,classNames:t,localization:n,...a}){const{hooks:{useListUserInvitations:o,useListOrganizations:l},localization:u}=E.useContext(Ze),d=E.useMemo(()=>({...u,...n}),[u,n]),{data:f,refetch:h}=o(),{refetch:g}=l(),p=async()=>{await h?.(),await g?.()},y=f?.filter(_=>_.status==="pending");return y?.length?b.jsx(oU,{className:e,classNames:t,title:d.PENDING_INVITATIONS,description:d.PENDING_USER_INVITATIONS_DESCRIPTION||d.PENDING_INVITATIONS_DESCRIPTION,...a,children:b.jsx(qf,{className:pe("grid gap-4",t?.content),children:y.map(_=>b.jsx(hU,{classNames:t,invitation:{id:_.id,email:_.email,role:_.role,status:_.status,expiresAt:_.expiresAt},onChanged:p},_.id))})}):null}function hU({classNames:e,invitation:t,onChanged:n}){const{authClient:a,organization:o,localization:l,toast:u,localizeErrors:d}=E.useContext(Ze),f=l,{lang:h}=Iv(),[g,p]=E.useState(!1),S=[...[{role:"owner",label:f.OWNER},{role:"admin",label:f.ADMIN},{role:"member",label:f.MEMBER}],...o?.customRoles||[]].find(R=>R.role===t.role),w=async()=>{p(!0);try{await a.organization.acceptInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),u({variant:"success",message:f.INVITATION_ACCEPTED})}catch(R){u({variant:"error",message:$t({error:R,localization:f,localizeErrors:d})})}p(!1)},T=async()=>{p(!0);try{await a.organization.rejectInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),u({variant:"success",message:f.INVITATION_REJECTED})}catch(R){u({variant:"error",message:$t({error:R,localization:f,localizeErrors:d})})}p(!1)};return b.jsxs(No,{className:pe("flex-row items-center p-4",e?.cell),children:[b.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[b.jsx(KO,{className:"my-0.5",user:{email:t.email},localization:f}),b.jsxs("div",{className:"grid flex-1 text-left leading-tight",children:[b.jsx("span",{className:"truncate font-semibold text-sm",children:t.email}),b.jsxs("span",{className:"truncate text-muted-foreground text-xs",children:[f.EXPIRES," ",t.expiresAt.toLocaleDateString(h??"en")]})]})]}),b.jsx("span",{className:"truncate text-sm opacity-70",children:S?.label}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsxs(UO,{children:[b.jsx(BO,{asChild:!0,children:b.jsx(Lt,{className:pe("relative ms-auto",e?.button,e?.outlineButton),disabled:g,size:"icon",type:"button",variant:"outline",children:g?b.jsx(Tn,{className:"animate-spin"}):b.jsx(hI,{className:e?.icon})})}),b.jsxs(zO,{onCloseAutoFocus:R=>R.preventDefault(),children:[b.jsxs(Ef,{onClick:w,disabled:g,children:[b.jsx(Lv,{className:e?.icon}),f.ACCEPT]}),b.jsxs(Ef,{onClick:T,disabled:g,variant:"destructive",children:[b.jsx(Ax,{className:e?.icon}),f.REJECT]})]})]})})]})}function w0({className:e,...t}){return b.jsx(K2,{"data-slot":"checkbox",className:pe("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b.jsx(Z2,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:b.jsx(Lv,{className:"size-3.5"})})})}function pU({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:pe("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 mU=({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"})}),gU=({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"})}),vU=({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"})}),yU=({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"})]}),bU=({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"})}),_U=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),b.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),b.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),b.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),b.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),EU=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),b.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),b.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),b.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),SU=({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"})}),wU=({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"})}),xU=({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"})}),RU=({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"})]}),OU=({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"})]}),TU=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"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"})}),AU=({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"})]}),CU=({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"})}),MU=({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"})}),NU=({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"})}),IU=({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"})]}),DU=({className:e})=>b.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[b.jsx("style",{type:"text/css",children:`
93
- .st0{fill:#FFFFFF}
94
- .st1{fill:#9146FF}
95
- `}),b.jsx("title",{children:"Asset 2"}),b.jsxs("g",{children:[b.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),b.jsx("g",{children:b.jsxs("g",{children:[b.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),LU=({className:e})=>b.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:b.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),PU=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),kU=({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"})}),jU=({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"})}),UU=[{provider:"apple",name:"Apple",icon:mU},{provider:"discord",name:"Discord",icon:gU},{provider:"dropbox",name:"Dropbox",icon:vU},{provider:"facebook",name:"Facebook",icon:yU},{provider:"github",name:"GitHub",icon:bU},{provider:"gitlab",name:"GitLab",icon:_U},{provider:"google",name:"Google",icon:EU},{provider:"huggingface",name:"Hugging Face",icon:SU},{provider:"kick",name:"Kick",icon:wU},{provider:"linear",name:"Linear",icon:xU},{provider:"linkedin",name:"LinkedIn",icon:RU},{provider:"microsoft",name:"Microsoft",icon:OU},{provider:"notion",name:"Notion",icon:TU},{provider:"reddit",name:"Reddit",icon:AU},{provider:"roblox",name:"Roblox",icon:CU},{provider:"slack",name:"Slack",icon:MU},{provider:"spotify",name:"Spotify",icon:NU},{provider:"tiktok",name:"TikTok",icon:IU},{provider:"twitch",name:"Twitch",icon:DU},{provider:"vercel",name:"Vercel",icon:LU},{provider:"vk",name:"VK",icon:PU},{provider:"twitter",name:"X",icon:kU},{provider:"zoom",name:"Zoom",icon:jU}];function xc({className:e,enableToggle:t,onChange:n,...a}){const[o,l]=E.useState(!0),[u,d]=E.useState(!1);return b.jsxs("div",{className:"relative",children:[b.jsx(Zr,{className:pe(t&&"pr-10",e),...a,type:u&&t?"text":"password",onChange:f=>{l(!f.target.value),n?.(f)}}),t&&b.jsxs(b.Fragment,{children:[b.jsx(Lt,{className:"!bg-transparent absolute top-0 right-0",disabled:o,size:"icon",type:"button",variant:"ghost",onClick:()=>d(!u),children:u?b.jsx(vI,{}):b.jsx(mI,{})}),b.jsx("style",{children:`
96
- .hide-password-toggle::-ms-reveal,
97
- .hide-password-toggle::-ms-clear {
98
- visibility: hidden;
99
- pointer-events: none;
100
- display: none;
101
- }
102
- `})]})]})}Yw({plugins:[dM(),pM(),Vk(),mM({clientId:""}),hM(),uM(),yM(),tx(),fM(),lM(),nx({})]});function Ja({redirectTo:e}){const{redirectTo:t}=E.useContext(Ze),n=E.useCallback(()=>e||Do("redirectTo")||t,[e,t]),[a,o]=E.useState(!1),{navigate:l,hooks:{useSession:u},onSessionChange:d}=E.useContext(Ze),{refetch:f}=u();return{onSuccess:E.useCallback(async()=>{o(!0),await f?.(),d&&await d(),o(!1),l(n())},[f,d,l,n]),isPending:a}}function WO({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=E.useContext(Ze),a=t?.(),o=E.useRef(!1),{onSuccess:l}=Ja({redirectTo:e});return E.useEffect(()=>{if(!o.current){if(!n){o.current=!0,l();return}a||(o.current=!0,l())}},[a,n,l]),b.jsx(Tn,{className:"animate-spin"})}var BU=["/sign-up/email","/sign-in/email","/forget-password"],zU=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,a)=>a.toUpperCase()).replace(/\/([a-z])/g,(n,a)=>a.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function jc({localization:e}){const{captcha:t,localization:n}=E.useContext(Ze);e={...n,...e};const a=E.useRef(null),{executeRecaptcha:o}=wx(),l=async f=>{if(!t)throw new Error(e.MISSING_RESPONSE);let h;switch(t.provider){case"google-recaptcha-v3":{const g=zU(f);h=await o?.(g);break}case"google-recaptcha-v2-checkbox":{h=a.current.getValue();break}case"google-recaptcha-v2-invisible":{h=await a.current.executeAsync();break}case"cloudflare-turnstile":{h=a.current.getResponse();break}case"hcaptcha":{h=a.current.getResponse();break}case"captchafox":{h=a.current.getResponse();break}}if(!h)throw new Error(e.MISSING_RESPONSE);return h};return{captchaRef:a,getCaptchaHeaders:async f=>{if(!t)return;if((t.endpoints||BU).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=a.current)==null?void 0:f.reset)==null||h.call(f);break}case"cloudflare-turnstile":{(p=(g=a.current)==null?void 0:g.reset)==null||p.call(g);break}case"hcaptcha":{(_=(y=a.current)==null?void 0:y.resetCaptcha)==null||_.call(y);break}case"captchafox":{(w=(S=a.current)==null?void 0:S.reset)==null||w.call(S);break}}}}}function FU({className:e,localization:t}){const n=Ka(),{captcha:a,localization:o}=E.useContext(Ze),l={...o,...t};return a?a.hideBadge?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
103
- .grecaptcha-badge { visibility: hidden; }
104
- `}),b.jsxs("p",{className:pe("text-muted-foreground text-xs",e),children:[l.PROTECTED_BY_RECAPTCHA," ",l.BY_CONTINUING_YOU_AGREE," Google"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:l.PRIVACY_POLICY})," ","&"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:l.TERMS_OF_SERVICE}),"."]})]}):n?b.jsx("style",{children:`
105
- .grecaptcha-badge { visibility: visible !important; }
106
- `}):null:null}function VU({ref:e}){const{captcha:t}=E.useContext(Ze),{theme:n}=Dv(),{lang:a}=Iv();return E.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
107
- .grecaptcha-badge {
108
- border-radius: var(--radius) !important;
109
- --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
110
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
111
- border-style: var(--tw-border-style) !important;
112
- border-width: 1px;
113
- }
114
-
115
- .dark .grecaptcha-badge {
116
- border-color: var(--input) !important;
117
- }
118
- `}),b.jsx(A9,{ref:e,sitekey:t.siteKey,theme:n,hl:a,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:pe(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${a}-${t.provider}`)]}):null}var HU=["/sign-up/email","/sign-in/email","/forget-password"];function Uc({ref:e,localization:t,action:n}){const{captcha:a}=E.useContext(Ze);if(!a||n&&!(a.endpoints||HU).includes(n))return null;const{theme:o}=Dv(),l=a.provider==="google-recaptcha-v2-checkbox"||a.provider==="google-recaptcha-v2-invisible",u=a.provider==="google-recaptcha-v3"||a.provider==="google-recaptcha-v2-invisible",d=a.provider==="cloudflare-turnstile",f=a.provider==="hcaptcha",h=a.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(VU,{ref:e}),u&&b.jsx(FU,{localization:t}),d&&b.jsx(TO,{className:"mx-auto",ref:e,siteKey:a.siteKey,options:{theme:o,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(t9,{ref:e,sitekey:a.siteKey,theme:o})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(vO,{ref:e,sitekey:a.siteKey,theme:o})})]})}function ZO({className:e,containerClassName:t,...n}){return b.jsx(IO,{"data-slot":"input-otp",containerClassName:pe("flex items-center gap-2 has-disabled:opacity-50",t),className:pe("disabled:cursor-not-allowed",e),...n})}function Cs({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:pe("flex items-center",e),...t})}function mn({index:e,className:t,...n}){const a=E.useContext(NO),{char:o,hasFakeCaret:l,isActive:u}=a?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:pe("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,l&&b.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:b.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function mg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(xI,{})})}function QO({otpSeparators:e=0}){return e===0?b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1}),b.jsx(mn,{index:2}),b.jsx(mn,{index:3}),b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1}),b.jsx(mn,{index:2})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:3}),b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:2}),b.jsx(mn,{index:3})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]})]})}function ow(e){const[t,n]=E.useState();return t?b.jsx(GU,{...e,email:t}):b.jsx($U,{...e,setEmail:n})}function $U({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o,setEmail:l}){const u=Ka(),{captchaRef:d,getCaptchaHeaders:f}=jc({localization:a}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(Ze);a={...g,...a};const _=zn({email:Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),S=Wa({resolver:Za(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{o?.(S.formState.isSubmitting)},[S.formState.isSubmitting,o]);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:a.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:$t({error:A,localization:a,localizeErrors:y})})}}return b.jsx(Xa,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:u,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:S.control,name:"email",render:({field:T})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:d,localization:a,action:"/email-otp/send-verification-otp"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.EMAIL_OTP_SEND_ACTION})]})})}function GU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(Ze);a={...h,...a};const{onSuccess:y,isPending:_}=Ja({redirectTo:l}),S=zn({code:Xe().min(1,{message:`${a.EMAIL_OTP} ${a.IS_REQUIRED}`}).min(6,{message:`${a.EMAIL_OTP} ${a.IS_INVALID}`})}),w=Wa({resolver:Za(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{u?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,u]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){g({variant:"error",message:$t({error:A,localization:a,localizeErrors:p})}),w.reset()}}return b.jsx(Xa,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:w.control,name:"code",render:({field:R})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL_OTP}),b.jsx(dn,{children:b.jsx(ZO,{...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(QO,{otpSeparators:o})})}),b.jsx(bn,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:[n&&b.jsx(Tn,{className:"animate-spin"}),a.EMAIL_OTP_VERIFY_ACTION]})})]})})}function qU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o}){const l=Ka(),{captchaRef:u,getCaptchaHeaders:d,resetCaptcha:f}=jc({localization:a}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(Ze);a={...y,...a};const R=zn({email:Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`}).min(1,{message:`${a.EMAIL} ${a.IS_REQUIRED}`})}),A=Wa({resolver:Za(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{o?.(A.formState.isSubmitting)},[A.formState.isSubmitting,o]);async function C({email:O}){try{const N={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${w.RESET_PASSWORD}`,fetchOptions:N}),S({variant:"success",message:a.FORGOT_PASSWORD_EMAIL}),_(`${g}/${w.SIGN_IN}${window.location.search}`)}catch(N){S({variant:"error",message:$t({error:N,localization:a,localizeErrors:T})}),f()}}return b.jsx(Xa,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:A.control,name:"email",render:({field:O})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:u,localization:a,action:"/forget-password"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.FORGOT_PASSWORD_ACTION})]})})}function sw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:o}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(Ze);o={...w,...o};const O=E.useCallback(()=>l||Do("redirectTo")||T,[l,T]),N=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=zn({email:Xe().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),I=Wa({resolver:Za(L),defaultValues:{email:""}});a=a||I.formState.isSubmitting,E.useEffect(()=>{u?.(I.formState.isSubmitting)},[I.formState.isSubmitting,u]);async function D({email:B}){try{const Z={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:B,callbackURL:N(),fetchOptions:Z}),A({variant:"success",message:o.MAGIC_LINK_EMAIL}),I.reset()}catch(Z){A({variant:"error",message:$t({error:Z,localization:o,localizeErrors:C})}),g()}}return b.jsx(Xa,{...I,children:b.jsxs("form",{onSubmit:I.handleSubmit(D),noValidate:d,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:I.control,name:"email",render:({field:B})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...B})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:f,localization:o,action:"/sign-in/magic-link"}),b.jsx(Lt,{type:"submit",disabled:a,className:pe("w-full",t?.button,t?.primaryButton),children:a?b.jsx(Tn,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function YU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l}){const{authClient:u,localization:d,toast:f,localizeErrors:h}=E.useContext(Ze);a={...d,...a};const{onSuccess:g,isPending:p}=Ja({redirectTo:o}),y=zn({code:Xe().min(1,{message:a.BACKUP_CODE_REQUIRED})}),_=Wa({resolver:Za(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 u.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:$t({error:T,localization:a,localizeErrors:h})}),_.reset()}}return b.jsx(Xa,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:pe("grid gap-6",e,t?.base),children:[b.jsx(tn,{control:_.control,name:"code",render:({field:w})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.BACKUP_CODE}),b.jsx(dn,{children:b.jsx(Zr,{placeholder:a.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.RECOVER_ACCOUNT_ACTION})]})})}function KU({className:e,classNames:t,localization:n,passwordValidation:a}){const o=E.useRef(!1),{authClient:l,basePath:u,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},a={...S,...a};const w=zn({newPassword:vc(a,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:_?vc(a,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):Xe().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=Wa({resolver:Za(w),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(o.current)return;o.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${u}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[u,g,p,h,n]);async function A({newPassword:C}){try{const N=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:N,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),g(`${u}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:$t({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(Xa,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(bn,{className:t?.error})]})}),_&&b.jsx(tn,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Lt,{type:"submit",disabled:R,className:pe("w-full",t?.button,t?.primaryButton),children:R?b.jsx(Tn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function WU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l,passwordValidation:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:a}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Ze),O=_?.rememberMe,N=_?.username,L=_?.passwordValidation;a={...S,...a},u={...L,...u};const{onSuccess:I,isPending:D}=Ja({redirectTo:o}),B=zn({email:N?Xe().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:vc(u,a),rememberMe:Mv().optional()}),Z=Wa({resolver:Za(B),defaultValues:{email:"",password:"",rememberMe:!O}});n=n||Z.formState.isSubmitting||D,E.useEffect(()=>{l?.(Z.formState.isSubmitting||D)},[Z.formState.isSubmitting,D,l]);async function Y({email:V,password:z,rememberMe:ie}){try{let ee={};if(N&&!k6(V)){const k={throw:!0,headers:await h("/sign-in/username")};ee=await p.signIn.username({username:V,password:z,rememberMe:ie,fetchOptions:k})}else{const k={throw:!0,headers:await h("/sign-in/email")};ee=await p.signIn.email({email:V,password:z,rememberMe:ie,fetchOptions:k})}ee.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await I()}catch(ee){Z.resetField("password"),g(),R({variant:"error",message:$t({error:ee,localization:a,localizeErrors:C})})}}return b.jsx(Xa,{...Z,children:b.jsxs("form",{onSubmit:Z.handleSubmit(Y),noValidate:d,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:Z.control,name:"email",render:({field:V})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:N?a.USERNAME:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:N?"username":"email",className:t?.input,type:N?"text":"email",placeholder:N?a.SIGN_IN_USERNAME_PLACEHOLDER:a.EMAIL_PLACEHOLDER,disabled:n,...V})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:Z.control,name:"password",render:({field:V})=>b.jsxs(nn,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(rn,{className:t?.label,children:a.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:pe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:a.FORGOT_PASSWORD_LINK})]}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"current-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:n,...V})}),b.jsx(bn,{className:t?.error})]})}),O&&b.jsx(tn,{control:Z.control,name:"rememberMe",render:({field:V})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:V.value,onCheckedChange:V.onChange,disabled:n})}),b.jsx(rn,{children:a.REMEMBER_ME})]})}),b.jsx(Uc,{ref:f,localization:a,action:"/sign-in/email"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.SIGN_IN_ACTION})]})})}function ZU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u,passwordValidation:d}){const f=Ka(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=jc({localization:o}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:N,viewPaths:L,navigate:I,toast:D,avatar:B,localizeErrors:Z}=E.useContext(Ze),Y=T?.confirmPassword,V=T?.username,z=T?.usernameRequired??!0,ie=T?.passwordValidation,ee=N?.fields;o={...R,...o},d={...ie,...d};const k=E.useRef(null),[F,G]=E.useState(null),[ae,ve]=E.useState(!1),P=E.useCallback(()=>l||Do("redirectTo")||O,[l,O]),Q=E.useCallback(()=>`${w}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,C,S,L,w,P]),{onSuccess:te,isPending:se}=Ja({redirectTo:l}),ge={email:Xe().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:vc(d,o),name:ee?.includes("name")&&A?Xe().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):Xe().optional(),image:Xe().optional(),username:V&&z?Xe().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Xe().optional(),confirmPassword:Y?vc(d,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):Xe().optional()},_e={};if(ee)for(const re of ee){if(re==="name"||re==="image")continue;const be=y?.[re];if(!be)continue;let Le;be.type==="number"?Le=be.required?P6(Ye=>Ye?Number(Ye):void 0,Ex({message:`${be.label} ${o.IS_INVALID}`})):Dm.number({message:`${be.label} ${o.IS_INVALID}`}).optional():be.type==="boolean"?Le=be.required?Dm.boolean({message:`${be.label} ${o.IS_INVALID}`}).refine(Ye=>Ye===!0,{message:`${be.label} ${o.IS_REQUIRED}`}):Dm.boolean({message:`${be.label} ${o.IS_INVALID}`}).optional():Le=be.required?Xe().min(1,`${be.label} ${o.IS_REQUIRED}`):Xe().optional(),_e[re]=Le}const ye=zn(ge).extend(_e).refine(re=>Y?re.password===re.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Se={email:"",password:"",...Y&&{confirmPassword:""},...ee?.includes("name")?{name:""}:{},...V?{username:""}:{},...ee?.includes("image")&&B?{image:""}:{}};if(ee)for(const re of ee){if(re==="name"||re==="image")continue;const be=y?.[re];be&&(Se[re]=be.type==="boolean"?!1:"")}const le=Wa({resolver:Za(ye),defaultValues:Se});a=a||le.formState.isSubmitting||se,E.useEffect(()=>{u?.(le.formState.isSubmitting||se)},[le.formState.isSubmitting,se,u]);const je=async re=>{if(B){ve(!0);try{const be=await sU(re,crypto.randomUUID(),B.size,B.extension);let Le;B.upload?Le=await B.upload(be):Le=await cU(be),Le?(G(Le),le.setValue("image",Le)):(G(null),le.setValue("image",""))}catch(be){console.error(be),D({variant:"error",message:$t({error:be,localization:o,localizeErrors:Z})})}ve(!1)}},at=()=>{G(null),le.setValue("image","")},Je=()=>{var re;return(re=k.current)==null?void 0:re.click()};async function Ft({email:re,password:be,name:Le,username:Ye,confirmPassword:At,image:Ue,...et}){try{for(const[de,me]of Object.entries(et)){const he=y?.[de];if(he?.validate&&typeof me=="string"&&!await he.validate(me)){le.setError(de,{message:`${he.label} ${o.IS_INVALID}`});return}}const j={throw:!0,headers:await g("/sign-up/email")},q={};Ye!==void 0&&(!z&&(Ye===null||Ye===""||typeof Ye=="string"&&Ye.trim()==="")||(q.username=Ye)),Ue!==void 0&&(q.image=Ue);const W=await _.signUp.email({email:re,password:be,name:Le||"",...q,...et,callbackURL:Q(),fetchOptions:j});"token"in W&&W.token?await te():(I(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(j){D({variant:"error",message:$t({error:j,localization:o,localizeErrors:Z})}),le.resetField("password"),le.resetField("confirmPassword"),p()}}return b.jsx(Xa,{...le,children:b.jsxs("form",{onSubmit:le.handleSubmit(Ft),noValidate:f,className:pe("grid w-full gap-6",e,t?.base),children:[ee?.includes("image")&&B&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:k,accept:"image/*",disabled:ae,hidden:!0,type:"file",onChange:re=>{var be;const Le=(be=re.target.files)==null?void 0:be.item(0);Le&&je(Le),re.target.value=""}}),b.jsx(tn,{control:le.control,name:"image",render:()=>b.jsxs(nn,{children:[b.jsx(rn,{children:o.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(UO,{children:[b.jsx(BO,{asChild:!0,children:b.jsx(Lt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(KO,{isPending:ae,className:"size-16",user:F?{name:le.watch("name"),email:le.watch("email"),image:F}:null,localization:o})})}),b.jsxs(zO,{align:"start",onCloseAutoFocus:re=>re.preventDefault(),children:[b.jsxs(Ef,{onClick:Je,disabled:ae,children:[b.jsx(dI,{}),o.UPLOAD_AVATAR]}),F&&b.jsxs(Ef,{onClick:at,disabled:ae,variant:"destructive",children:[b.jsx(CI,{}),o.DELETE_AVATAR]})]})]}),b.jsxs(Lt,{type:"button",variant:"outline",onClick:Je,disabled:ae,children:[ae&&b.jsx(Tn,{className:"animate-spin"}),o.UPLOAD]})]}),b.jsx(bn,{})]})})]}),ee?.includes("name")&&b.jsx(tn,{control:le.control,name:"name",render:({field:re})=>b.jsxs(nn,{children:[b.jsxs(rn,{className:t?.label,children:[o.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),V&&b.jsx(tn,{control:le.control,name:"username",render:({field:re})=>b.jsxs(nn,{children:[b.jsxs(rn,{className:t?.label,children:[o.USERNAME,!z&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:le.control,name:"email",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:le.control,name:"password",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),Y&&b.jsx(tn,{control:le.control,name:"confirmPassword",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.CONFIRM_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),ee?.filter(re=>re!=="name"&&re!=="image").map(re=>{const be=y?.[re];return be?be.type==="boolean"?b.jsx(tn,{control:le.control,name:re,render:({field:Le})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:Le.value,onCheckedChange:Le.onChange,disabled:a})}),b.jsx(rn,{className:t?.label,children:be.label}),b.jsx(bn,{className:t?.error})]})},re):b.jsx(tn,{control:le.control,name:re,render:({field:Le})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:be.label}),b.jsx(dn,{children:be.type==="number"?b.jsx(Zr,{className:t?.input,type:"number",placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value}):be.multiline?b.jsx(pU,{className:t?.input,placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value}):b.jsx(Zr,{className:t?.input,type:"text",placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value})}),b.jsx(bn,{className:t?.error})]})},re):(console.error(`Additional field ${re} not found`),null)}),b.jsx(Uc,{ref:h,localization:o,action:"/sign-up/email"}),b.jsx(Lt,{type:"submit",disabled:a,className:pe("w-full",t?.button,t?.primaryButton),children:a?b.jsx(Tn,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function QU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u}){var d;const f=Ka(),h=f?Do("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(Ze);a={...S,...a};const{onSuccess:O,isPending:N}=Ja({redirectTo:l}),{data:L}=_(),I=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,B]=E.useState(w?.length===1?w[0]:null),[Z,Y]=E.useState(!1),[V,z]=E.useState(0),ie=zn({code:Xe().min(1,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_REQUIRED}`}).min(6,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_INVALID}`}),trustDevice:Mv().optional()}),ee=Wa({resolver:Za(ie),defaultValues:{code:""}});n=n||ee.formState.isSubmitting||N,E.useEffect(()=>{u?.(ee.formState.isSubmitting||N)},[ee.formState.isSubmitting,N,u]),E.useEffect(()=>{D==="otp"&&V<=0&&!g.current&&(g.current=!0,k())},[D]),E.useEffect(()=>{if(V<=0)return;const G=setTimeout(()=>{z(ae=>ae-1)},1e3);return()=>clearTimeout(G)},[V]);const k=async()=>{if(!(Z||V>0)){try{Y(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),z(60)}catch(G){R({variant:"error",message:$t({error:G,localization:a,localizeErrors:C})}),G.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,Y(!1)}};async function F({code:G,trustDevice:ae}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:G,trustDevice:ae,fetchOptions:{throw:!0}}),await O(),L&&!I&&R({variant:"success",message:a?.TWO_FACTOR_ENABLED})}catch(ve){R({variant:"error",message:$t({error:ve,localization:a,localizeErrors:C})}),ee.reset()}}return b.jsx(Xa,{...ee,children:b.jsxs("form",{onSubmit:ee.handleSubmit(F),className:pe("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(FO,{className:t?.label,children:a.TWO_FACTOR_TOTP_LABEL}),b.jsx(Z9,{className:pe("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(tn,{control:ee.control,name:"code",render:({field:G})=>b.jsxs(nn,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(rn,{className:t?.label,children:a.ONE_TIME_PASSWORD}),b.jsx(A,{className:pe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:a.FORGOT_AUTHENTICATOR})]}),b.jsx(dn,{children:b.jsx(ZO,{...G,maxLength:6,onChange:ae=>{G.onChange(ae),ae.length===6&&ee.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(QO,{otpSeparators:o})})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:ee.control,name:"trustDevice",render:({field:G})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:G.value,onCheckedChange:G.onChange,disabled:n,className:t?.checkbox})}),b.jsx(rn,{className:t?.label,children:a.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:[n&&b.jsx(Tn,{className:"animate-spin"}),a.TWO_FACTOR_ACTION]}),D==="otp"&&w?.includes("otp")&&b.jsxs(Lt,{type:"button",variant:"outline",onClick:k,disabled:V>0||Z||n,className:pe(t?.button,t?.outlineButton),children:[Z?b.jsx(Tn,{className:"animate-spin"}):b.jsx(jE,{className:t?.icon}),a.RESEND_CODE,V>0&&` (${V})`]}),D!=="otp"&&w?.includes("otp")&&b.jsxs(Lt,{type:"button",variant:"secondary",className:pe(t?.button,t?.secondaryButton),onClick:()=>B("otp"),disabled:n,children:[b.jsx(jE,{className:t?.icon}),a.SEND_VERIFICATION_CODE]}),D!=="totp"&&w?.includes("totp")&&b.jsxs(Lt,{type:"button",variant:"secondary",className:pe(t?.button,t?.secondaryButton),onClick:()=>B("totp"),disabled:n,children:[b.jsx(OI,{className:t?.icon}),a.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function XO({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:a,viewPaths:o}=E.useContext(Ze),{onSuccess:l}=Ja({redirectTo:e||`${a}/${o.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(Tn,{className:"animate-spin"})}function XU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,pathname:l,redirectTo:u,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:R,replace:A}=E.useContext(Ze),C=!!w;if(o={...y,...o},E.useEffect(()=>{l&&!Pg(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Pg(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(XO,{redirectTo:u});if(d==="CALLBACK")return b.jsx(WO,{redirectTo:u});if(d==="SIGN_IN")return p?b.jsx(WU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):_?b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):S?b.jsx(ow,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(QU,{className:e,classNames:t,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(YU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(ow,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(qU,{className:e,classNames:t,localization:o,isSubmitting:a,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(KU,{className:e,classNames:t,localization:o});if(d==="SIGN_UP")return C&&b.jsx(ZU,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h})}function JU({className:e,classNames:t,localization:n}){const{localization:a,redirectTo:o,replace:l,toast:u}=E.useContext(Ze),d=E.useMemo(()=>({...a,...n}),[a,n]),{data:f}=tU(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Do("invitationId");if(!p){u({variant:"error",message:d.INVITATION_NOT_FOUND}),l(o);return}g(p)},[d.INVITATION_NOT_FOUND,u,l,o]),!f||!h?b.jsx(JO,{className:e,classNames:t}):b.jsx(eB,{className:e,classNames:t,localization:d,invitationId:h})}function eB({className:e,classNames:t,localization:n,invitationId:a}){var o;const{authClient:l,hooks:{useInvitation:u},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=u({query:{id:a}}),N=E.useCallback(()=>Do("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!a)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),g(h);return}(C.status!=="pending"||new Date(C.expiresAt)<new Date)&&(p({variant:"error",message:new Date(C.expiresAt)<new Date?_.INVITATION_EXPIRED:_.INVITATION_NOT_FOUND}),g(h))}},[C,O,a,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(N())}catch(Y){p({variant:"error",message:$t({error:Y,localization:_,localizeErrors:y})}),R(!1)}},I=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(Y){p({variant:"error",message:$t({error:Y,localization:_,localizeErrors:y})}),w(!1)}},Z=((o=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(Y=>Y.role===C?.role))==null?void 0:o.label)||C?.role;return C?b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:pe("justify-items-center text-center",t?.header),children:[b.jsx(E0,{className:pe("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(Gf,{className:pe("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(qf,{className:pe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:pe("flex-row items-center p-4"),children:[b.jsx(YO,{organization:{id:C.organizationId,name:C.organizationName,slug:C.organizationSlug,logo:C.organizationLogo,createdAt:new Date},localization:_}),b.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:Z})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(Lt,{variant:"outline",className:pe(t?.button,t?.outlineButton),onClick:I,disabled:A,children:[S?b.jsx(Tn,{className:"animate-spin"}):b.jsx(Ax,{}),_.REJECT]}),b.jsxs(Lt,{className:pe(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(Tn,{className:"animate-spin"}):b.jsx(Lv,{}),_.ACCEPT]})]})]})]}):b.jsx(JO,{className:e,classNames:t})}var JO=({className:e,classNames:t,localization:n})=>b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:pe("justify-items-center",t?.header),children:[b.jsx(vr,{className:pe("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(vr,{className:pe("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(qf,{className:pe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:pe("flex-row items-center p-4"),children:[b.jsx(YO,{isPending:!0,localization:n}),b.jsx(vr,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsx(vr,{className:"h-9 w-full"}),b.jsx(vr,{className:"h-9 w-full"})]})]})]});function lw({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return b.jsx(eU,{"data-slot":"separator",decorative:n,orientation:t,className:pe("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}function tB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(Ze);return b.jsxs(Lt,{className:pe("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[a==="EMAIL_OTP"?b.jsx(Ox,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function nB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(Ze);return b.jsxs(Lt,{className:pe("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[a==="MAGIC_LINK"?b.jsx(Ox,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function rB({localization:e,redirectTo:t}){const{authClient:n,localization:a,toast:o,localizeErrors:l}=E.useContext(Ze),u=E.useRef(!1);e=E.useMemo(()=>({...a,...e}),[a,e]);const{onSuccess:d}=Ja({redirectTo:t});return E.useEffect(()=>{if(!u.current){u.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){o({variant:"error",message:$t({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,o]),null}function aB({classNames:e,isSubmitting:t,localization:n,redirectTo:a,setIsSubmitting:o}){var l,u;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(Ze);n={...f,...n};const{onSuccess:p}=Ja({redirectTo:a}),y=async()=>{o?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:$t({error:_.error,localization:n,localizeErrors:g})}),o?.(!1)):p()}catch(_){h({variant:"error",message:$t({error:_,localization:n,localizeErrors:g})}),o?.(!1)}};return b.jsxs(Lt,{className:pe("w-full",(l=e?.form)==null?void 0:l.button,(u=e?.form)==null?void 0:u.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(bI,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function cw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,other:l,provider:u,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:N,toast:L,localizeErrors:I}=E.useContext(Ze),D=E.useCallback(()=>d||Do("redirectTo")||A,[d,A]),B=E.useCallback(()=>`${T}${n||(R?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,w,C,T,D]),Z=async()=>{h(!0);try{if(l){const Y={providerId:u.provider,callbackURL:B(),fetchOptions:{throw:!0}};N?.signIn?(await N.signIn(Y),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(Y)}else{const Y={provider:u.provider,callbackURL:B(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(Y),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(Y)}}catch(Y){L({variant:"error",message:$t({error:Y,localization:o,localizeErrors:I})}),h(!1)}};return b.jsxs(Lt,{className:pe(f==="vertical"?"w-full":"grow",e,(g=t?.form)==null?void 0:g.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:a,variant:"outline",onClick:Z,children:[u.icon&&b.jsx(u.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&u.name,f==="vertical"&&`${o.SIGN_IN_WITH} ${u.name}`]})}function Dz({className:e,classNames:t,callbackURL:n,cardHeader:a,cardFooter:o,localization:l,path:u,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,w,T,R;const A=Ka(),{basePath:C,credentials:O,localization:N,magicLink:L,emailOTP:I,oneTap:D,passkey:B,signUp:Z,social:Y,genericOAuth:V,viewPaths:z,Link:ie}=E.useContext(Ze);l={...N,...l};let ee=h;ee==="auto"&&(ee=O&&Y?.providers&&Y.providers.length>2?"horizontal":"vertical");const k=u??d?.split("/").pop(),F=g||Pg(z,k)||"SIGN_IN",[G,ae]=E.useState(!1);if(E.useEffect(()=>{const P=()=>ae(!1);return window.addEventListener("pagehide",P),()=>{ae(!1),window.removeEventListener("pagehide",P)}},[]),F==="CALLBACK")return b.jsx(WO,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(XO,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(JU,{className:e,classNames:t});const ve=!O&&!L&&!I?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsx($f,{className:t?.header,children:a||b.jsxs(b.Fragment,{children:[b.jsx(E0,{className:pe("text-lg md:text-xl",t?.title),children:l[F]}),ve&&b.jsx(Gf,{className:pe("text-xs md:text-sm",t?.description),children:ve})]})}),b.jsxs(qf,{className:pe("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(rB,{localization:l,redirectTo:f}),(O||L||I)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(XU,{classNames:t?.form,callbackURL:n,isSubmitting:G,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:ae}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||I&&F==="EMAIL_OTP")&&b.jsx(nB,{classNames:t,localization:l,view:F,isSubmitting:G}),I&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||L&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(tB,{classNames:t,localization:l,view:F,isSubmitting:G})]}),F!=="RESET_PASSWORD"&&(((y=Y?.providers)==null?void 0:y.length)||((_=V?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&B)&&b.jsxs(b.Fragment,{children:[(O||L||I)&&b.jsxs("div",{className:pe("flex items-center gap-2",t?.continueWith),children:[b.jsx(lw,{className:pe("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(lw,{className:pe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=Y?.providers)==null?void 0:S.length)||((w=V?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:pe("flex w-full items-center justify-between gap-4",ee==="horizontal"&&"flex-wrap",ee==="vertical"&&"flex-col",ee==="grid"&&"grid grid-cols-2"),children:[(T=Y?.providers)==null?void 0:T.map(P=>{const Q=UU.find(te=>te.provider===P);return Q?b.jsx(cw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:Q,redirectTo:f,setIsSubmitting:ae,socialLayout:ee},P):null}),(R=V?.providers)==null?void 0:R.map(P=>b.jsx(cw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:P,redirectTo:f,setIsSubmitting:ae,socialLayout:ee,other:!0},P.provider))]}),B&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(aB,{classNames:t,isSubmitting:G,localization:l,redirectTo:f,setIsSubmitting:ae})]})]})]}),o&&b.jsx(cv,{className:t?.footer,children:o}),O&&Z&&b.jsxs(cv,{className:pe("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(oI,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(ie,{className:pe("text-foreground underline",t?.footerLink),href:`${C}/${z[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(Lt,{variant:"link",size:"sm",className:pe("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(Lt,{variant:"link",size:"sm",className:pe("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function Lz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{isPending:n}=t();return n?e:null}function Pz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n}=t();return n?e:null}function kz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n,isPending:a}=t();return!n&&!a?e:null}function iB(e){const t=Sf.c(8),{children:n}=e,a=Oc();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let l,u;t[1]!==a?(l=f=>a({to:f}),u=f=>a({to:f,replace:!0}),t[1]=a,t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==u?(d=b.jsx(JN,{authClient:_M,organization:o,navigate:l,replace:u,Link:oB,children:n}),t[4]=n,t[5]=l,t[6]=u,t[7]=d):d=t[7],d}function oB(e){const{href:t,className:n,children:a,...o}=e;return b.jsx(Rv,{to:t,className:n,...o,children:a})}const sB=new KC;function lB(e){const t=Sf.c(3),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=b.jsx(CN,{}),t[0]=a):a=t[0];let o;return t[1]!==n?(o=b.jsxs(ZC,{client:sB,children:[a,b.jsx(f4,{children:b.jsx(iB,{children:n})})]}),t[1]=n,t[2]=o):o=t[2],o}const cB=function(){return null};function uB(){const e=Sf.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 Bc=P3({component:()=>b.jsxs(lB,{children:[b.jsx(E.Suspense,{fallback:b.jsx(uB,{}),children:b.jsx(Vw,{})}),b.jsx(cB,{})]})}),dB=An({getParentRoute:()=>Bc,path:"/login",component:Ln(()=>Dn(()=>import("./login-DBR5FdH6.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Ks(()=>zn({next:Xe().optional(),client_id:Xe().optional(),redirect_uri:Xe().optional(),response_type:Xe().optional(),state:Xe().optional(),scope:Xe().optional(),code_challenge:Xe().optional(),code_challenge_method:Xe().optional()}))}),fB=An({getParentRoute:()=>Bc,path:"/auth/$pathname",component:Ln(()=>Dn(()=>import("./auth-catchall-BRoDHrkX.js"),[]))}),Br=An({getParentRoute:()=>Bc,id:"shell",component:Ln(()=>Dn(()=>import("./shell-layout-DwQEFltw.js"),__vite__mapDeps([4,5,2,6,7,8,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,3,25,26,27,28])))}),hB=An({getParentRoute:()=>Br,path:"/",component:Ln(()=>Dn(()=>import("./home-BwRicK_C.js"),__vite__mapDeps([29,18,2,27,7,1,3,22,23,24,25])))}),pB=An({getParentRoute:()=>Br,path:"/$org",component:Ln(()=>Dn(()=>import("./page-D0nieAd7.js"),__vite__mapDeps([30,6,2,7,8,1,31,32,28,33,19,34,9,35,36,37,38])))}),mB=An({getParentRoute:()=>Br,path:"/$org/members",component:Ln(()=>Dn(()=>import("./members-Bhg2_ZSs.js"),__vite__mapDeps([39,31,32,1,2,28,8,7,33,40,3,41,42,6,43,14,44,45,13,27,37,23,20,46,5,19,24,16,18])))}),gB=An({getParentRoute:()=>Br,path:"/$org/mcps",component:Ln(()=>Dn(()=>import("./connections-Bfcj96aB.js"),__vite__mapDeps([47,48,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,49,15,23,37,20,24,14,16,50]))),validateSearch:Ks(()=>zn({action:Nv(["create"]).optional()}))}),vB=An({getParentRoute:()=>Br,path:"/$org/settings",component:Ln(()=>Dn(()=>import("./settings-BENyycRE.js"),__vite__mapDeps([51,31,32,1,2,28,8,7,33,24,3,52])))}),yB=An({getParentRoute:()=>Br,path:"/$org/monitoring",component:Ln(()=>Dn(()=>import("./monitoring-DAnTyFbi.js"),__vite__mapDeps([53,6,2,7,8,1,31,32,28,33,40,3,5,19,35,36,37,9,44,34,43,14,54,26]))),validateSearch:Ks(()=>zn({from:Xe().default("now-24h"),to:Xe().default("now"),connectionId:AE(Xe()).optional().default([]),gatewayId:AE(Xe()).optional().default([]),tool:Xe().default(""),status:Nv(["all","success","errors"]).default("all"),search:Xe().default(""),page:Ex().optional(),streaming:Mv().default(!0)}))}),eT=An({getParentRoute:()=>Br,path:"/$org/store",component:Ln(()=>Dn(()=>import("./store-CdN9wtZc.js"),__vite__mapDeps([55,45,31,32,1,2,28,8,7,6,56,40,3,18,57,58,14,17,5,10,11,12,13])))}),bB=An({getParentRoute:()=>eT,path:"/$appName",component:Ln(()=>Dn(()=>import("./store-app-detail-AyYeHK1f.js"),__vite__mapDeps([59,7,2,1,6,8,28,5,60,13,57,32,40,3,41,18,61,37,62,10,11,34,63,64,50,56,58]))),validateSearch:Ks(()=>zn({registryId:Xe().optional(),serverName:Xe().optional(),itemId:Xe().optional()}))}),_B=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId",component:Ln(()=>Dn(()=>import("./connection-detail-DlM4urTK.js"),__vite__mapDeps([65,5,2,19,1,6,7,8,10,11,66,67,21,34,61,24,3,14,9,68,64,57,50,36,54,48,60,13,32,28,40,41,18,37,62,49,15,23]))),validateSearch:Ks(()=>zn({tab:Xe().optional()}))}),EB=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Ln(()=>Dn(()=>import("./collection-detail-CHNCFwGn.js"),__vite__mapDeps([69,6,2,7,8,1,42,43,14,40,3,37,25,16,66,67,11,21,5,19,10,34,61,24,9,68,64,57,50,36,54,48,52,63,13,70])))}),SB=An({getParentRoute:()=>Br,path:"/$org/gateways",component:Ln(()=>Dn(()=>import("./gateways-BYaK85gs.js"),__vite__mapDeps([71,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,9,49,15,23,37]))),validateSearch:Ks(()=>zn({action:Nv(["create"]).optional()}))}),wB=An({getParentRoute:()=>Br,path:"/$org/gateways/$gatewayId",component:Ln(()=>Dn(()=>import("./gateway-detail-rUxOHblZ.js"),__vite__mapDeps([72,5,2,19,1,6,7,8,42,43,14,40,3,9,46,24,56,61,68])))}),xB=An({getParentRoute:()=>Bc,path:"/oauth/callback",component:Ln(()=>Dn(()=>import("./oauth-callback-K0vVKfJt.js"),__vite__mapDeps([73,18,2,7,67,11,70])))}),RB=eT.addChildren([bB]),OB=Br.addChildren([hB,pB,mB,gB,SB,wB,yB,RB,vB,_B,EB]),TB=Bc.addChildren([OB,dB,fB,xB]),AB=$3({routeTree:TB}),CB=document.getElementById("root");wC.createRoot(CB).render(b.jsx(E.StrictMode,{children:b.jsx(Y3,{router:AB})}));export{Vx as $,Dz as A,vz as B,oz as C,XB as D,ZB as E,rz as F,iz as G,Yx as H,yz as I,bz as J,fD as K,gD as L,pD as M,PB as N,uz as O,dz as P,lz as Q,cz as R,uB as S,fz as T,hz as U,$x as V,Ws as W,Io as X,Nz as Y,ze as Z,vD as _,_M as a,yP as a$,Xr as a0,WC as a1,u4 as a2,c4 as a3,Dn as a4,Oc as a5,NE as a6,eU as a7,GL as a8,ZL as a9,OR as aA,CP as aB,LB as aC,ax as aD,AE as aE,qB as aF,Mv as aG,ik as aH,ok as aI,ak as aJ,qL as aK,Ax as aL,fn as aM,Qa as aN,Qr as aO,FR as aP,ZR as aQ,Ui as aR,gP as aS,qv as aT,lR as aU,Yv as aV,bc as aW,Jx as aX,Gv as aY,$v as aZ,vP as a_,Rz as aa,WL as ab,YL as ac,Oz as ad,KL as ae,oD as af,Fx as ag,Ze as ah,bU as ai,Iz as aj,Lz as ak,Pz as al,kz as am,uv as an,Vw as ao,zn as ap,Xe as aq,Za as ar,Wa as as,Cc as at,jt as au,Ge as av,H as aw,Lo as ax,XR as ay,MP as az,xv as b,Tz as b$,MB as b0,jw as b1,Tf as b2,$i as b3,$a as b4,FC as b5,k_ as b6,IB as b7,NB as b8,l4 as b9,RR as bA,Nv as bB,FB as bC,Pc as bD,Ac as bE,YB as bF,BB as bG,zB as bH,HB as bI,Ex as bJ,VB as bK,GB as bL,Ks as bM,jB as bN,UB as bO,kB as bP,wz as bQ,xz as bR,Sz as bS,V7 as bT,H7 as bU,$7 as bV,G7 as bW,q7 as bX,Az as bY,Cz as bZ,Mz as b_,a4 as ba,er as bb,oI as bc,tr as bd,Cn as be,Rc as bf,On as bg,vg as bh,fw as bi,QC as bj,e4 as bk,i4 as bl,t4 as bm,n4 as bn,Xn as bo,s4 as bp,j_ as bq,o4 as br,r4 as bs,Rv as bt,l6 as bu,K2 as bv,Z2 as bw,W7 as bx,Ek as by,BR as bz,Sf as c,PI as c0,UI as c1,Cf as c2,zv as c3,fc as c4,GC as c5,LC as c6,Tn as c7,KB as c8,$B as c9,Ee as ca,WB as cb,wv as d,az as e,JB as f,gz as g,sz as h,ez as i,b as j,dD as k,Nf as l,Mf as m,QB as n,lD as o,mz as p,nz as q,E as r,uD as s,tS as t,DB as u,tz as v,Hx as w,_z as x,Ez as y,pz as z};