var $f=e=>{throw TypeError(e)};var ou=(e,t,n)=>t.has(e)||$f("Cannot "+n);var j=(e,t,n)=>(ou(e,t,"read from private field"),n?n.call(e):t.get(e)),ge=(e,t,n)=>t.has(e)?$f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ue=(e,t,n,r)=>(ou(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Xe=(e,t,n)=>(ou(e,t,"access private method"),n);var Fi=(e,t,n,r)=>({set _(s){ue(e,t,s,n)},get _(){return j(e,t,r)}});function ix(e,t){for(var n=0;nr[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nm={exports:{}},Cl={},rm={exports:{}},fe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ni=Symbol.for("react.element"),ax=Symbol.for("react.portal"),lx=Symbol.for("react.fragment"),ux=Symbol.for("react.strict_mode"),cx=Symbol.for("react.profiler"),dx=Symbol.for("react.provider"),fx=Symbol.for("react.context"),px=Symbol.for("react.forward_ref"),hx=Symbol.for("react.suspense"),mx=Symbol.for("react.memo"),vx=Symbol.for("react.lazy"),Vf=Symbol.iterator;function gx(e){return e===null||typeof e!="object"?null:(e=Vf&&e[Vf]||e["@@iterator"],typeof e=="function"?e:null)}var sm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},om=Object.assign,im={};function so(e,t,n){this.props=e,this.context=t,this.refs=im,this.updater=n||sm}so.prototype.isReactComponent={};so.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};so.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function am(){}am.prototype=so.prototype;function dd(e,t,n){this.props=e,this.context=t,this.refs=im,this.updater=n||sm}var fd=dd.prototype=new am;fd.constructor=dd;om(fd,so.prototype);fd.isPureReactComponent=!0;var Uf=Array.isArray,lm=Object.prototype.hasOwnProperty,pd={current:null},um={key:!0,ref:!0,__self:!0,__source:!0};function cm(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)lm.call(t,r)&&!um.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,ee=N[Z];if(0>>1;Zs(it,G))hes(mt,it)?(N[Z]=mt,N[he]=G,Z=he):(N[Z]=it,N[_e]=G,Z=_e);else if(hes(mt,G))N[Z]=mt,N[he]=G,Z=he;else break e}}return $}function s(N,$){var G=N.sortIndex-$.sortIndex;return G!==0?G:N.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],c=1,f=null,d=3,x=!1,w=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(N){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=N)r(u),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(u)}}function b(N){if(y=!1,g(N),!w)if(n(l)!==null)w=!0,q(C);else{var $=n(u);$!==null&&ne(b,$.startTime-N)}}function C(N,$){w=!1,y&&(y=!1,m(R),R=-1),x=!0;var G=d;try{for(g($),f=n(l);f!==null&&(!(f.expirationTime>$)||N&&!X());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,d=f.priorityLevel;var ee=Z(f.expirationTime<=$);$=e.unstable_now(),typeof ee=="function"?f.callback=ee:f===n(l)&&r(l),g($)}else r(l);f=n(l)}if(f!==null)var ce=!0;else{var _e=n(u);_e!==null&&ne(b,_e.startTime-$),ce=!1}return ce}finally{f=null,d=G,x=!1}}var E=!1,T=null,R=-1,M=5,D=-1;function X(){return!(e.unstable_now()-DN||125Z?(N.sortIndex=G,t(u,N),n(l)===null&&N===n(u)&&(y?(m(R),R=-1):y=!0,ne(b,G-Z))):(N.sortIndex=ee,t(l,N),w||x||(w=!0,q(C))),N},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(N){var $=d;return function(){var G=d;d=$;try{return N.apply(this,arguments)}finally{d=G}}}})(vm);mm.exports=vm;var Tx=mm.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Px=v,jt=Tx;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wu=Object.prototype.hasOwnProperty,Rx=/^[: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]*$/,Wf={},Hf={};function jx(e){return Wu.call(Hf,e)?!0:Wu.call(Wf,e)?!1:Rx.test(e)?Hf[e]=!0:(Wf[e]=!0,!1)}function Ax(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ox(e,t,n,r){if(t===null||typeof t>"u"||Ax(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qe[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];qe[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qe[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qe[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){qe[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qe[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qe[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qe[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qe[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var md=/[\-:]([a-z])/g;function vd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(md,vd);qe[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(md,vd);qe[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(md,vd);qe[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qe[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});qe.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qe[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function gd(e,t,n,r){var s=qe.hasOwnProperty(t)?qe[t]:null;(s!==null?s.type!==0:r||!(2a||s[i]!==o[a]){var l=` `+s[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{lu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Po(e):""}function Mx(e){switch(e.tag){case 5:return Po(e.type);case 16:return Po("Lazy");case 13:return Po("Suspense");case 19:return Po("SuspenseList");case 0:case 2:case 15:return e=uu(e.type,!1),e;case 11:return e=uu(e.type.render,!1),e;case 1:return e=uu(e.type,!0),e;default:return""}}function Qu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case cs:return"Fragment";case us:return"Portal";case Hu:return"Profiler";case yd:return"StrictMode";case Zu:return"Suspense";case Ku:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xm:return(e.displayName||"Context")+".Consumer";case ym:return(e._context.displayName||"Context")+".Provider";case xd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wd:return t=e.displayName||null,t!==null?t:Qu(e.type)||"Memo";case tr:t=e._payload,e=e._init;try{return Qu(e(t))}catch{}}return null}function Ix(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qu(t);case 8:return t===yd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _m(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lx(e){var t=_m(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vi(e){e._valueTracker||(e._valueTracker=Lx(e))}function bm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_m(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Na(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Gu(e,t){var n=t.checked;return Oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Cm(e,t){t=t.checked,t!=null&&gd(e,"checked",t,!1)}function Yu(e,t){Cm(e,t);var n=Cr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?qu(e,t.type,n):t.hasOwnProperty("defaultValue")&&qu(e,t.type,Cr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function qu(e,t,n){(t!=="number"||Na(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ro=Array.isArray;function Ss(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Ui.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dx=["Webkit","ms","Moz","O"];Object.keys(Fo).forEach(function(e){Dx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fo[t]=Fo[e]})});function Nm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Fo.hasOwnProperty(e)&&Fo[e]?(""+t).trim():t+"px"}function Tm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Nm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Fx=Oe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ec(e,t){if(t){if(Fx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function tc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 nc=null;function _d(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rc=null,Es=null,Ns=null;function qf(e){if(e=Ri(e)){if(typeof rc!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Tl(t),rc(e.stateNode,e.type,t))}}function Pm(e){Es?Ns?Ns.push(e):Ns=[e]:Es=e}function Rm(){if(Es){var e=Es,t=Ns;if(Ns=Es=null,qf(e),t)for(e=0;e>>=0,e===0?32:31-(Gx(e)/Yx|0)|0}var Bi=64,Wi=4194304;function jo(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ja(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=jo(a):(o&=i,o!==0&&(r=jo(o)))}else i=n&~s,i!==0?r=jo(i):o!==0&&(r=jo(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ti(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Jt(t),e[t]=n}function ew(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=$o),ip=" ",ap=!1;function Ym(e,t){switch(e){case"keyup":return Tw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ds=!1;function Rw(e,t){switch(e){case"compositionend":return qm(t);case"keypress":return t.which!==32?null:(ap=!0,ip);case"textInput":return e=t.data,e===ip&&ap?null:e;default:return null}}function jw(e,t){if(ds)return e==="compositionend"||!Pd&&Ym(e,t)?(e=Qm(),fa=Ed=fr=null,ds=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dp(n)}}function tv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nv(){for(var e=window,t=Na();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Na(e.document)}return t}function Rd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $w(e){var t=nv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tv(n.ownerDocument.documentElement,n)){if(r!==null&&Rd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=fp(n,o);var i=fp(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,fs=null,uc=null,Uo=null,cc=!1;function pp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cc||fs==null||fs!==Na(r)||(r=fs,"selectionStart"in r&&Rd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Uo&&oi(Uo,r)||(Uo=r,r=Ma(uc,"onSelect"),0ms||(e.current=vc[ms],vc[ms]=null,ms--)}function Ce(e,t){ms++,vc[ms]=e.current,e.current=t}var kr={},rt=jr(kr),wt=jr(!1),Kr=kr;function Ws(e,t){var n=e.type.contextTypes;if(!n)return kr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function _t(e){return e=e.childContextTypes,e!=null}function La(){Pe(wt),Pe(rt)}function wp(e,t,n){if(rt.current!==kr)throw Error(L(168));Ce(rt,t),Ce(wt,n)}function dv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(L(108,Ix(e)||"Unknown",s));return Oe({},n,r)}function Da(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,Kr=rt.current,Ce(rt,e),Ce(wt,wt.current),!0}function _p(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=dv(e,t,Kr),r.__reactInternalMemoizedMergedChildContext=e,Pe(wt),Pe(rt),Ce(rt,e)):Pe(wt),Ce(wt,n)}var jn=null,Pl=!1,Cu=!1;function fv(e){jn===null?jn=[e]:jn.push(e)}function Xw(e){Pl=!0,fv(e)}function Ar(){if(!Cu&&jn!==null){Cu=!0;var e=0,t=xe;try{var n=jn;for(xe=1;e>=i,s-=i,An=1<<32-Jt(t)+s|n<R?(M=T,T=null):M=T.sibling;var D=d(m,T,g[R],b);if(D===null){T===null&&(T=M);break}e&&T&&D.alternate===null&&t(m,T),h=o(D,h,R),E===null?C=D:E.sibling=D,E=D,T=M}if(R===g.length)return n(m,T),Re&&Mr(m,R),C;if(T===null){for(;RR?(M=T,T=null):M=T.sibling;var X=d(m,T,D.value,b);if(X===null){T===null&&(T=M);break}e&&T&&X.alternate===null&&t(m,T),h=o(X,h,R),E===null?C=X:E.sibling=X,E=X,T=M}if(D.done)return n(m,T),Re&&Mr(m,R),C;if(T===null){for(;!D.done;R++,D=g.next())D=f(m,D.value,b),D!==null&&(h=o(D,h,R),E===null?C=D:E.sibling=D,E=D);return Re&&Mr(m,R),C}for(T=r(m,T);!D.done;R++,D=g.next())D=x(T,m,R,D.value,b),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?R:D.key),h=o(D,h,R),E===null?C=D:E.sibling=D,E=D);return e&&T.forEach(function(O){return t(m,O)}),Re&&Mr(m,R),C}function _(m,h,g,b){if(typeof g=="object"&&g!==null&&g.type===cs&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case $i:e:{for(var C=g.key,E=h;E!==null;){if(E.key===C){if(C=g.type,C===cs){if(E.tag===7){n(m,E.sibling),h=s(E,g.props.children),h.return=m,m=h;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===tr&&kp(C)===E.type){n(m,E.sibling),h=s(E,g.props),h.ref=bo(m,E,g),h.return=m,m=h;break e}n(m,E);break}else t(m,E);E=E.sibling}g.type===cs?(h=Hr(g.props.children,m.mode,b,g.key),h.return=m,m=h):(b=wa(g.type,g.key,g.props,null,m.mode,b),b.ref=bo(m,h,g),b.return=m,m=b)}return i(m);case us:e:{for(E=g.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),h=s(h,g.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=ju(g,m.mode,b),h.return=m,m=h}return i(m);case tr:return E=g._init,_(m,h,E(g._payload),b)}if(Ro(g))return w(m,h,g,b);if(go(g))return y(m,h,g,b);qi(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),h=s(h,g),h.return=m,m=h):(n(m,h),h=Ru(g,m.mode,b),h.return=m,m=h),i(m)):n(m,h)}return _}var Zs=vv(!0),gv=vv(!1),$a=jr(null),Va=null,ys=null,Md=null;function Id(){Md=ys=Va=null}function Ld(e){var t=$a.current;Pe($a),e._currentValue=t}function xc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ps(e,t){Va=e,Md=ys=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(Md!==e)if(e={context:e,memoizedValue:t,next:null},ys===null){if(Va===null)throw Error(L(308));ys=e,Va.dependencies={lanes:0,firstContext:e}}else ys=ys.next=e;return t}var Dr=null;function Dd(e){Dr===null?Dr=[e]:Dr.push(e)}function yv(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Dd(t)):(n.next=s.next,s.next=n),t.interleaved=n,$n(e,r)}function $n(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var nr=!1;function Fd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ln(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ve&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,$n(e,n)}return s=r.interleaved,s===null?(t.next=t,Dd(r)):(t.next=s.next,s.next=t),r.interleaved=t,$n(e,n)}function ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cd(e,n)}}function Sp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ua(e,t,n,r){var s=e.updateQueue;nr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,c=u=l=null,a=o;do{var d=a.lane,x=a.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(d=t,x=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){f=w.call(x,f,d);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,d=typeof w=="function"?w.call(x,f,d):w,d==null)break e;f=Oe({},f,d);break e;case 2:nr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else x={eventTime:x,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=x,l=f):c=c.next=x,i|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Yr|=i,e.lanes=i,e.memoizedState=f}}function Ep(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Su.transition;Su.transition={};try{e(!1),t()}finally{xe=n,Su.transition=r}}function Lv(){return Bt().memoizedState}function n1(e,t,n){var r=_r(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Dv(e))Fv(t,n);else if(n=yv(e,t,n,r),n!==null){var s=dt();en(n,e,r,s),zv(n,t,r)}}function r1(e,t,n){var r=_r(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Dv(e))Fv(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,tn(a,i)){var l=t.interleaved;l===null?(s.next=s,Dd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=yv(e,t,s,r),n!==null&&(s=dt(),en(n,e,r,s),zv(n,t,r))}}function Dv(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Fv(e,t){Bo=Wa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cd(e,n)}}var Ha={readContext:Ut,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useInsertionEffect:Je,useLayoutEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useMutableSource:Je,useSyncExternalStore:Je,useId:Je,unstable_isNewReconciler:!1},s1={readContext:Ut,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Tp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,va(4194308,4,jv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return va(4194308,4,e,t)},useInsertionEffect:function(e,t){return va(4,2,e,t)},useMemo:function(e,t){var n=fn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=n1.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:Np,useDebugValue:Zd,useDeferredValue:function(e){return fn().memoizedState=e},useTransition:function(){var e=Np(!1),t=e[0];return e=t1.bind(null,e[1]),fn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ae,s=fn();if(Re){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Ke===null)throw Error(L(349));Gr&30||Cv(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Tp(Sv.bind(null,r,o,e),[e]),r.flags|=2048,pi(9,kv.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=fn(),t=Ke.identifierPrefix;if(Re){var n=On,r=An;n=(r&~(1<<32-Jt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=di++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[vn]=t,e[li]=r,Gv(e,t,!1,!1),t.stateNode=e;e:{switch(i=tc(n,r),n){case"dialog":Te("cancel",e),Te("close",e),s=r;break;case"iframe":case"object":case"embed":Te("load",e),s=r;break;case"video":case"audio":for(s=0;sGs&&(t.flags|=128,r=!0,Co(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ba(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Co(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Re)return et(t),null}else 2*ze()-o.renderingStartTime>Gs&&n!==1073741824&&(t.flags|=128,r=!0,Co(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ze(),t.sibling=null,n=je.current,Ce(je,r?n&1|2:n&1),t):(et(t),null);case 22:case 23:return Xd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Et&1073741824&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function f1(e,t){switch(Ad(t),t.tag){case 1:return _t(t.type)&&La(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ks(),Pe(wt),Pe(rt),Vd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return $d(t),null;case 13:if(Pe(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(je),null;case 4:return Ks(),null;case 10:return Ld(t.type._context),null;case 22:case 23:return Xd(),null;case 24:return null;default:return null}}var Ji=!1,nt=!1,p1=typeof WeakSet=="function"?WeakSet:Set,Q=null;function xs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function Tc(e,t,n){try{n()}catch(r){De(e,t,r)}}var zp=!1;function h1(e,t){if(dc=Aa,e=nv(),Rd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var x;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)d=f,f=x;for(;;){if(f===e)break t;if(d===n&&++u===s&&(a=i),d===o&&++c===r&&(l=i),(x=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=x}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(fc={focusedElem:e,selectionRange:n},Aa=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,_=w.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Kt(t.type,y),_);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(b){De(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return w=zp,zp=!1,w}function Wo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Tc(t,n,o)}s=s.next}while(s!==r)}}function Al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Pc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Xv(e){var t=e.alternate;t!==null&&(e.alternate=null,Xv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vn],delete t[li],delete t[mc],delete t[Yw],delete t[qw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Jv(e){return e.tag===5||e.tag===3||e.tag===4}function $p(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ia));else if(r!==4&&(e=e.child,e!==null))for(Rc(e,t,n),e=e.sibling;e!==null;)Rc(e,t,n),e=e.sibling}function jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(jc(e,t,n),e=e.sibling;e!==null;)jc(e,t,n),e=e.sibling}var Qe=null,Yt=!1;function qn(e,t,n){for(n=n.child;n!==null;)eg(e,t,n),n=n.sibling}function eg(e,t,n){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(kl,n)}catch{}switch(n.tag){case 5:nt||xs(n,t);case 6:var r=Qe,s=Yt;Qe=null,qn(e,t,n),Qe=r,Yt=s,Qe!==null&&(Yt?(e=Qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qe.removeChild(n.stateNode));break;case 18:Qe!==null&&(Yt?(e=Qe,n=n.stateNode,e.nodeType===8?bu(e.parentNode,n):e.nodeType===1&&bu(e,n),ri(e)):bu(Qe,n.stateNode));break;case 4:r=Qe,s=Yt,Qe=n.stateNode.containerInfo,Yt=!0,qn(e,t,n),Qe=r,Yt=s;break;case 0:case 11:case 14:case 15:if(!nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Tc(n,t,i),s=s.next}while(s!==r)}qn(e,t,n);break;case 1:if(!nt&&(xs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,t,a)}qn(e,t,n);break;case 21:qn(e,t,n);break;case 22:n.mode&1?(nt=(r=nt)||n.memoizedState!==null,qn(e,t,n),nt=r):qn(e,t,n);break;default:qn(e,t,n)}}function Vp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new p1),t.forEach(function(r){var s=C1.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Zt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=ze()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*v1(r/1960))-r,10e?16:e,pr===null)var r=!1;else{if(e=pr,pr=null,Qa=0,ve&6)throw Error(L(331));var s=ve;for(ve|=4,Q=e.current;Q!==null;){var o=Q,i=o.child;if(Q.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lze()-Yd?Wr(e,0):Gd|=n),bt(e,t)}function lg(e,t){t===0&&(e.mode&1?(t=Wi,Wi<<=1,!(Wi&130023424)&&(Wi=4194304)):t=1);var n=dt();e=$n(e,t),e!==null&&(Ti(e,t,n),bt(e,n))}function b1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lg(e,n)}function C1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),lg(e,n)}var ug;ug=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wt.current)xt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xt=!1,c1(e,t,n);xt=!!(e.flags&131072)}else xt=!1,Re&&t.flags&1048576&&pv(t,za,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ga(e,t),e=t.pendingProps;var s=Ws(t,rt.current);Ps(t,n),s=Bd(null,t,r,e,s,n);var o=Wd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_t(r)?(o=!0,Da(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Fd(t),s.updater=jl,t.stateNode=s,s._reactInternals=t,_c(t,r,e,n),t=kc(null,t,r,!0,o,n)):(t.tag=0,Re&&o&&jd(t),lt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ga(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=S1(r),e=Kt(r,e),s){case 0:t=Cc(null,t,r,e,n);break e;case 1:t=Lp(null,t,r,e,n);break e;case 11:t=Mp(null,t,r,e,n);break e;case 14:t=Ip(null,t,r,Kt(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Kt(r,s),Cc(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Kt(r,s),Lp(e,t,r,s,n);case 3:e:{if(Zv(t),e===null)throw Error(L(387));r=t.pendingProps,o=t.memoizedState,s=o.element,xv(e,t),Ua(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Qs(Error(L(423)),t),t=Dp(e,t,r,n,s);break e}else if(r!==s){s=Qs(Error(L(424)),t),t=Dp(e,t,r,n,s);break e}else for(Tt=yr(t.stateNode.containerInfo.firstChild),Pt=t,Re=!0,qt=null,n=gv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hs(),r===s){t=Vn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return wv(t),e===null&&yc(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,pc(r,s)?i=null:o!==null&&pc(r,o)&&(t.flags|=32),Hv(e,t),lt(e,t,i,n),t.child;case 6:return e===null&&yc(t),null;case 13:return Kv(e,t,n);case 4:return zd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zs(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Kt(r,s),Mp(e,t,r,s,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,Ce($a,r._currentValue),r._currentValue=i,o!==null)if(tn(o.value,i)){if(o.children===s.children&&!wt.current){t=Vn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Ln(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),xc(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(L(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),xc(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}lt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ps(t,n),s=Ut(s),r=r(s),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,s=Kt(r,t.pendingProps),s=Kt(r.type,s),Ip(e,t,r,s,n);case 15:return Bv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Kt(r,s),ga(e,t),t.tag=1,_t(r)?(e=!0,Da(t)):e=!1,Ps(t,n),$v(t,r,s),_c(t,r,s,n),kc(null,t,r,!0,e,n);case 19:return Qv(e,t,n);case 22:return Wv(e,t,n)}throw Error(L(156,t.tag))};function cg(e,t){return Dm(e,t)}function k1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,n,r){return new k1(e,t,n,r)}function ef(e){return e=e.prototype,!(!e||!e.isReactComponent)}function S1(e){if(typeof e=="function")return ef(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xd)return 11;if(e===wd)return 14}return 2}function br(e,t){var n=e.alternate;return n===null?(n=zt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wa(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")ef(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case cs:return Hr(n.children,s,o,t);case yd:i=8,s|=8;break;case Hu:return e=zt(12,n,t,s|2),e.elementType=Hu,e.lanes=o,e;case Zu:return e=zt(13,n,t,s),e.elementType=Zu,e.lanes=o,e;case Ku:return e=zt(19,n,t,s),e.elementType=Ku,e.lanes=o,e;case wm:return Ml(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ym:i=10;break e;case xm:i=9;break e;case xd:i=11;break e;case wd:i=14;break e;case tr:i=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=zt(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function Hr(e,t,n,r){return e=zt(7,e,r,t),e.lanes=n,e}function Ml(e,t,n,r){return e=zt(22,e,r,t),e.elementType=wm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ru(e,t,n){return e=zt(6,e,null,t),e.lanes=n,e}function ju(e,t,n){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function E1(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=du(0),this.expirationTimes=du(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=du(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function tf(e,t,n,r,s,o,i,a,l){return e=new E1(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=zt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fd(o),e}function N1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hg)}catch(e){console.error(e)}}hg(),hm.exports=At;var Ai=hm.exports;const of=tm(Ai);var mg,Gp=Ai;mg=Gp.createRoot,Gp.hydrateRoot;const A1=1,O1=1e6;let Au=0;function M1(){return Au=(Au+1)%Number.MAX_SAFE_INTEGER,Au.toString()}const Ou=new Map,Yp=e=>{if(Ou.has(e))return;const t=setTimeout(()=>{Ou.delete(e),Ko({type:"REMOVE_TOAST",toastId:e})},O1);Ou.set(e,t)},I1=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,A1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Yp(n):e.toasts.forEach(r=>{Yp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},_a=[];let ba={toasts:[]};function Ko(e){ba=I1(ba,e),_a.forEach(t=>{t(ba)})}function L1({...e}){const t=M1(),n=s=>Ko({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Ko({type:"DISMISS_TOAST",toastId:t});return Ko({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function af(){const[e,t]=v.useState(ba);return v.useEffect(()=>(_a.push(t),()=>{const n=_a.indexOf(t);n>-1&&_a.splice(n,1)}),[e]),{...e,toast:L1,dismiss:n=>Ko({type:"DISMISS_TOAST",toastId:n})}}function pe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function D1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function lf(...e){return t=>e.forEach(n=>D1(n,t))}function st(...e){return v.useCallback(lf(...e),e)}function F1(e,t=[]){let n=[];function r(o,i){const a=v.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:d,children:x,...w}=f,y=(d==null?void 0:d[e][l])||a,_=v.useMemo(()=>w,Object.values(w));return p.jsx(y.Provider,{value:_,children:x})}function c(f,d){const x=(d==null?void 0:d[e][l])||a,w=v.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const s=()=>{const o=n.map(i=>v.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,z1(s,...t)]}function z1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Ys=v.forwardRef((e,t)=>{const{children:n,...r}=e,s=v.Children.toArray(n),o=s.find($1);if(o){const i=o.props.children,a=s.map(l=>l===o?v.Children.count(i)>1?v.Children.only(null):v.isValidElement(i)?i.props.children:null:l);return p.jsx(Lc,{...r,ref:t,children:v.isValidElement(i)?v.cloneElement(i,void 0,a):null})}return p.jsx(Lc,{...r,ref:t,children:n})});Ys.displayName="Slot";var Lc=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const s=U1(n);return v.cloneElement(n,{...V1(r,n.props),ref:t?lf(t,s):s})}return v.Children.count(n)>1?v.Children.only(null):null});Lc.displayName="SlotClone";var vg=({children:e})=>p.jsx(p.Fragment,{children:e});function $1(e){return v.isValidElement(e)&&e.type===vg}function V1(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function U1(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uf(e){const t=e+"CollectionProvider",[n,r]=F1(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:w,children:y}=x,_=A.useRef(null),m=A.useRef(new Map).current;return p.jsx(s,{scope:w,itemMap:m,collectionRef:_,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=A.forwardRef((x,w)=>{const{scope:y,children:_}=x,m=o(a,y),h=st(w,m.collectionRef);return p.jsx(Ys,{ref:h,children:_})});l.displayName=a;const u=e+"CollectionItemSlot",c="data-radix-collection-item",f=A.forwardRef((x,w)=>{const{scope:y,children:_,...m}=x,h=A.useRef(null),g=st(w,h),b=o(u,y);return A.useEffect(()=>(b.itemMap.set(h,{ref:h,...m}),()=>void b.itemMap.delete(h))),p.jsx(Ys,{[c]:"",ref:g,children:_})});f.displayName=u;function d(x){const w=o(e+"CollectionConsumer",x);return A.useCallback(()=>{const _=w.collectionRef.current;if(!_)return[];const m=Array.from(_.querySelectorAll(`[${c}]`));return Array.from(w.itemMap.values()).sort((b,C)=>m.indexOf(b.ref.current)-m.indexOf(C.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},d,r]}function cf(e,t=[]){let n=[];function r(o,i){const a=v.createContext(i),l=n.length;n=[...n,i];const u=f=>{var m;const{scope:d,children:x,...w}=f,y=((m=d==null?void 0:d[e])==null?void 0:m[l])||a,_=v.useMemo(()=>w,Object.values(w));return p.jsx(y.Provider,{value:_,children:x})};u.displayName=o+"Provider";function c(f,d){var y;const x=((y=d==null?void 0:d[e])==null?void 0:y[l])||a,w=v.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,c]}const s=()=>{const o=n.map(i=>v.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,B1(s,...t)]}function B1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var W1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ke=W1.reduce((e,t)=>{const n=v.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?Ys:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function qa(e,t){e&&Ai.flushSync(()=>e.dispatchEvent(t))}function Ge(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function H1(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e);v.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Z1="DismissableLayer",Dc="dismissableLayer.update",K1="dismissableLayer.pointerDownOutside",Q1="dismissableLayer.focusOutside",qp,gg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zl=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=v.useContext(gg),[c,f]=v.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=v.useState({}),w=st(t,T=>f(T)),y=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(_),h=c?y.indexOf(c):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,b=h>=m,C=Y1(T=>{const R=T.target,M=[...u.branches].some(D=>D.contains(R));!b||M||(s==null||s(T),i==null||i(T),T.defaultPrevented||a==null||a())},d),E=q1(T=>{const R=T.target;[...u.branches].some(D=>D.contains(R))||(o==null||o(T),i==null||i(T),T.defaultPrevented||a==null||a())},d);return H1(T=>{h===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},d),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(qp=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Xp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=qp)}},[c,d,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Xp())},[c,u]),v.useEffect(()=>{const T=()=>x({});return document.addEventListener(Dc,T),()=>document.removeEventListener(Dc,T)},[]),p.jsx(ke.div,{...l,ref:w,style:{pointerEvents:g?b?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,C.onPointerDownCapture)})});zl.displayName=Z1;var G1="DismissableLayerBranch",yg=v.forwardRef((e,t)=>{const n=v.useContext(gg),r=v.useRef(null),s=st(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),p.jsx(ke.div,{...e,ref:s})});yg.displayName=G1;function Y1(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){xg(K1,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function q1(e,t=globalThis==null?void 0:globalThis.document){const n=Ge(e),r=v.useRef(!1);return v.useEffect(()=>{const s=o=>{o.target&&!r.current&&xg(Q1,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xp(){const e=new CustomEvent(Dc);document.dispatchEvent(e)}function xg(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?qa(s,o):s.dispatchEvent(o)}var X1=zl,J1=yg,nn=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},e_="Portal",wg=v.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=v.useState(!1);nn(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?of.createPortal(p.jsx(ke.div,{...r,ref:t}),i):null});wg.displayName=e_;function t_(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var rs=e=>{const{present:t,children:n}=e,r=n_(t),s=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=st(r.ref,r_(s));return typeof n=="function"||r.isPresent?v.cloneElement(s,{ref:o}):null};rs.displayName="Presence";function n_(e){const[t,n]=v.useState(),r=v.useRef({}),s=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[a,l]=t_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=na(r.current);o.current=a==="mounted"?u:"none"},[a]),nn(()=>{const u=r.current,c=s.current;if(c!==e){const d=o.current,x=na(u);e?l("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),nn(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=x=>{const y=na(r.current).includes(x.animationName);if(x.target===t&&y&&(l("ANIMATION_END"),!s.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},d=x=>{x.target===t&&(o.current=na(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function na(e){return(e==null?void 0:e.animationName)||"none"}function r_(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function df({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=s_({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=Ge(n),l=v.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,l]}function s_({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,s=v.useRef(r),o=Ge(t);return v.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var o_="VisuallyHidden",$l=v.forwardRef((e,t)=>p.jsx(ke.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));$l.displayName=o_;var _g=$l,ff="ToastProvider",[pf,i_,a_]=uf("Toast"),[bg,EN]=cf("Toast",[a_]),[l_,Vl]=bg(ff),Cg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=v.useState(null),[u,c]=v.useState(0),f=v.useRef(!1),d=v.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ff}\`. Expected non-empty \`string\`.`),p.jsx(pf.Provider,{scope:t,children:p.jsx(l_,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:v.useCallback(()=>c(x=>x+1),[]),onToastRemove:v.useCallback(()=>c(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:d,children:i})})};Cg.displayName=ff;var kg="ToastViewport",u_=["F8"],Fc="toast.viewportPause",zc="toast.viewportResume",Sg=v.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=u_,label:s="Notifications ({hotkey})",...o}=e,i=Vl(kg,n),a=i_(n),l=v.useRef(null),u=v.useRef(null),c=v.useRef(null),f=v.useRef(null),d=st(t,f,i.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;v.useEffect(()=>{const _=m=>{var g;r.length!==0&&r.every(b=>m[b]||m.code===b)&&((g=f.current)==null||g.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),v.useEffect(()=>{const _=l.current,m=f.current;if(w&&_&&m){const h=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Fc);m.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(zc);m.dispatchEvent(E),i.isClosePausedRef.current=!1}},b=E=>{!_.contains(E.relatedTarget)&&g()},C=()=>{_.contains(document.activeElement)||g()};return _.addEventListener("focusin",h),_.addEventListener("focusout",b),_.addEventListener("pointermove",h),_.addEventListener("pointerleave",C),window.addEventListener("blur",h),window.addEventListener("focus",g),()=>{_.removeEventListener("focusin",h),_.removeEventListener("focusout",b),_.removeEventListener("pointermove",h),_.removeEventListener("pointerleave",C),window.removeEventListener("blur",h),window.removeEventListener("focus",g)}}},[w,i.isClosePausedRef]);const y=v.useCallback(({tabbingDirection:_})=>{const h=a().map(g=>{const b=g.ref.current,C=[b,...b_(b)];return _==="forwards"?C:C.reverse()});return(_==="forwards"?h.reverse():h).flat()},[a]);return v.useEffect(()=>{const _=f.current;if(_){const m=h=>{var C,E,T;const g=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!g){const R=document.activeElement,M=h.shiftKey;if(h.target===_&&M){(C=u.current)==null||C.focus();return}const O=y({tabbingDirection:M?"backwards":"forwards"}),H=O.findIndex(z=>z===R);Mu(O.slice(H+1))?h.preventDefault():M?(E=u.current)==null||E.focus():(T=c.current)==null||T.focus()}};return _.addEventListener("keydown",m),()=>_.removeEventListener("keydown",m)}},[a,y]),p.jsxs(J1,{ref:l,role:"region","aria-label":s.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&p.jsx($c,{ref:u,onFocusFromOutsideViewport:()=>{const _=y({tabbingDirection:"forwards"});Mu(_)}}),p.jsx(pf.Slot,{scope:n,children:p.jsx(ke.ol,{tabIndex:-1,...o,ref:d})}),w&&p.jsx($c,{ref:c,onFocusFromOutsideViewport:()=>{const _=y({tabbingDirection:"backwards"});Mu(_)}})]})});Sg.displayName=kg;var Eg="ToastFocusProxy",$c=v.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Vl(Eg,n);return p.jsx($l,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});$c.displayName=Eg;var Ul="Toast",c_="toast.swipeStart",d_="toast.swipeMove",f_="toast.swipeCancel",p_="toast.swipeEnd",Ng=v.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=df({prop:r,defaultProp:s,onChange:o});return p.jsx(rs,{present:n||a,children:p.jsx(v_,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Ge(e.onPause),onResume:Ge(e.onResume),onSwipeStart:pe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:pe(e.onSwipeMove,u=>{const{x:c,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:pe(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:pe(e.onSwipeEnd,u=>{const{x:c,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});Ng.displayName=Ul;var[h_,m_]=bg(Ul,{onClose(){}}),v_=v.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:x,...w}=e,y=Vl(Ul,n),[_,m]=v.useState(null),h=st(t,z=>m(z)),g=v.useRef(null),b=v.useRef(null),C=s||y.duration,E=v.useRef(0),T=v.useRef(C),R=v.useRef(0),{onToastAdd:M,onToastRemove:D}=y,X=Ge(()=>{var J;(_==null?void 0:_.contains(document.activeElement))&&((J=y.viewport)==null||J.focus()),i()}),O=v.useCallback(z=>{!z||z===1/0||(window.clearTimeout(R.current),E.current=new Date().getTime(),R.current=window.setTimeout(X,z))},[X]);v.useEffect(()=>{const z=y.viewport;if(z){const J=()=>{O(T.current),u==null||u()},q=()=>{const ne=new Date().getTime()-E.current;T.current=T.current-ne,window.clearTimeout(R.current),l==null||l()};return z.addEventListener(Fc,q),z.addEventListener(zc,J),()=>{z.removeEventListener(Fc,q),z.removeEventListener(zc,J)}}},[y.viewport,C,l,u,O]),v.useEffect(()=>{o&&!y.isClosePausedRef.current&&O(C)},[o,C,y.isClosePausedRef,O]),v.useEffect(()=>(M(),()=>D()),[M,D]);const H=v.useMemo(()=>_?Mg(_):null,[_]);return y.viewport?p.jsxs(p.Fragment,{children:[H&&p.jsx(g_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),p.jsx(h_,{scope:n,onClose:X,children:Ai.createPortal(p.jsx(pf.ItemSlot,{scope:n,children:p.jsx(X1,{asChild:!0,onEscapeKeyDown:pe(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||X(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(ke.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":y.swipeDirection,...w,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:pe(e.onKeyDown,z=>{z.key==="Escape"&&(a==null||a(z.nativeEvent),z.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,X()))}),onPointerDown:pe(e.onPointerDown,z=>{z.button===0&&(g.current={x:z.clientX,y:z.clientY})}),onPointerMove:pe(e.onPointerMove,z=>{if(!g.current)return;const J=z.clientX-g.current.x,q=z.clientY-g.current.y,ne=!!b.current,N=["left","right"].includes(y.swipeDirection),$=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,G=N?$(0,J):0,Z=N?0:$(0,q),ee=z.pointerType==="touch"?10:2,ce={x:G,y:Z},_e={originalEvent:z,delta:ce};ne?(b.current=ce,ra(d_,f,_e,{discrete:!1})):Jp(ce,y.swipeDirection,ee)?(b.current=ce,ra(c_,c,_e,{discrete:!1}),z.target.setPointerCapture(z.pointerId)):(Math.abs(J)>ee||Math.abs(q)>ee)&&(g.current=null)}),onPointerUp:pe(e.onPointerUp,z=>{const J=b.current,q=z.target;if(q.hasPointerCapture(z.pointerId)&&q.releasePointerCapture(z.pointerId),b.current=null,g.current=null,J){const ne=z.currentTarget,N={originalEvent:z,delta:J};Jp(J,y.swipeDirection,y.swipeThreshold)?ra(p_,x,N,{discrete:!0}):ra(f_,d,N,{discrete:!0}),ne.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),g_=e=>{const{__scopeToast:t,children:n,...r}=e,s=Vl(Ul,t),[o,i]=v.useState(!1),[a,l]=v.useState(!1);return w_(()=>i(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:p.jsx(wg,{asChild:!0,children:p.jsx($l,{...r,children:o&&p.jsxs(p.Fragment,{children:[s.label," ",n]})})})},y_="ToastTitle",Tg=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(ke.div,{...r,ref:t})});Tg.displayName=y_;var x_="ToastDescription",Pg=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(ke.div,{...r,ref:t})});Pg.displayName=x_;var Rg="ToastAction",jg=v.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(Og,{altText:n,asChild:!0,children:p.jsx(hf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Rg}\`. Expected non-empty \`string\`.`),null)});jg.displayName=Rg;var Ag="ToastClose",hf=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=m_(Ag,n);return p.jsx(Og,{asChild:!0,children:p.jsx(ke.button,{type:"button",...r,ref:t,onClick:pe(e.onClick,s.onClose)})})});hf.displayName=Ag;var Og=v.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return p.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Mg(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),__(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Mg(r))}}),t}function ra(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?qa(s,o):s.dispatchEvent(o)}var Jp=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function w_(e=()=>{}){const t=Ge(e);nn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function __(e){return e.nodeType===e.ELEMENT_NODE}function b_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var C_=Cg,Ig=Sg,Lg=Ng,Dg=Tg,Fg=Pg,zg=jg,$g=hf;function Vg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,th=Ug,Bl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return th(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const c=n==null?void 0:n[u],f=o==null?void 0:o[u];if(c===null)return null;const d=eh(c)||eh(f);return s[u][d]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...x}=c;return Object.entries(x).every(w=>{let[y,_]=w;return Array.isArray(_)?_.includes({...o,...a}[y]):{...o,...a}[y]===_})?[...u,f,d]:u},[]);return th(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const k_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var S_={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"};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const E_=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>v.createElement("svg",{ref:l,...S_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Bg("lucide",s),...a},[...i.map(([u,c])=>v.createElement(u,c)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ot=(e,t)=>{const n=v.forwardRef(({className:r,...s},o)=>v.createElement(E_,{ref:o,iconNode:t,className:Bg(`lucide-${k_(e)}`,r),...s}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const N_=ot("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const T_=ot("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const P_=ot("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nh=ot("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const R_=ot("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const j_=ot("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A_=ot("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const O_=ot("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const M_=ot("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const I_=ot("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const L_=ot("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const D_=ot("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const F_=ot("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const z_=ot("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wg=ot("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $_=ot("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),mf="-",V_=e=>{const t=B_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(mf);return a[0]===""&&a.length!==1&&a.shift(),Hg(a,t)||U_(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Hg=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Hg(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(mf);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},rh=/^\[(.+)\]$/,U_=e=>{if(rh.test(e)){const t=rh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},B_=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return H_(Object.entries(e.classGroups),n).forEach(([o,i])=>{Vc(i,r,o,t)}),r},Vc=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:sh(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(W_(s)){Vc(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{Vc(i,sh(t,o),n,r)})})},sh=(e,t)=>{let n=e;return t.split(mf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},W_=e=>e.isThemeGetter,H_=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e,Z_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},Zg="!",K_=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,c=0,f;for(let _=0;_c?f-c:void 0;return{modifiers:l,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:i}):i},Q_=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},G_=e=>({cache:Z_(e.cacheSize),parseClassName:K_(e),...V_(e)}),Y_=/\s+/,q_=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(Y_);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:x}=n(u);let w=!!x,y=r(w?d.substring(0,x):d);if(!y){if(!w){a=u+(a.length>0?" "+a:a);continue}if(y=r(d),!y){a=u+(a.length>0?" "+a:a);continue}w=!1}const _=Q_(c).join(":"),m=f?_+Zg:_,h=m+y;if(o.includes(h))continue;o.push(h);const g=s(y,w);for(let b=0;b0?" "+a:a)}return a};function X_(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=G_(u),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=q_(l,n);return s(l,c),c}return function(){return o(X_.apply(null,arguments))}}const Ne=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Qg=/^\[(?:([a-z-]+):)?(.+)\]$/i,eb=/^\d+\/\d+$/,tb=new Set(["px","full","screen"]),nb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rb=/\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$/,sb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ob=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ib=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,En=e=>js(e)||tb.has(e)||eb.test(e),Xn=e=>ao(e,"length",hb),js=e=>!!e&&!Number.isNaN(Number(e)),Iu=e=>ao(e,"number",js),So=e=>!!e&&Number.isInteger(Number(e)),ab=e=>e.endsWith("%")&&js(e.slice(0,-1)),le=e=>Qg.test(e),Jn=e=>nb.test(e),lb=new Set(["length","size","percentage"]),ub=e=>ao(e,lb,Gg),cb=e=>ao(e,"position",Gg),db=new Set(["image","url"]),fb=e=>ao(e,db,vb),pb=e=>ao(e,"",mb),Eo=()=>!0,ao=(e,t,n)=>{const r=Qg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},hb=e=>rb.test(e)&&!sb.test(e),Gg=()=>!1,mb=e=>ob.test(e),vb=e=>ib.test(e),gb=()=>{const e=Ne("colors"),t=Ne("spacing"),n=Ne("blur"),r=Ne("brightness"),s=Ne("borderColor"),o=Ne("borderRadius"),i=Ne("borderSpacing"),a=Ne("borderWidth"),l=Ne("contrast"),u=Ne("grayscale"),c=Ne("hueRotate"),f=Ne("invert"),d=Ne("gap"),x=Ne("gradientColorStops"),w=Ne("gradientColorStopPositions"),y=Ne("inset"),_=Ne("margin"),m=Ne("opacity"),h=Ne("padding"),g=Ne("saturate"),b=Ne("scale"),C=Ne("sepia"),E=Ne("skew"),T=Ne("space"),R=Ne("translate"),M=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",le,t],O=()=>[le,t],H=()=>["",En,Xn],z=()=>["auto",js,le],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",le],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[js,le];return{cacheSize:500,separator:":",theme:{colors:[Eo],spacing:[En,Xn],blur:["none","",Jn,le],brightness:Z(),borderColor:[e],borderRadius:["none","","full",Jn,le],borderSpacing:O(),borderWidth:H(),contrast:Z(),grayscale:$(),hueRotate:Z(),invert:$(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[ab,Xn],inset:X(),margin:X(),opacity:Z(),padding:O(),saturate:Z(),scale:Z(),sepia:$(),skew:Z(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[Jn]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"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"],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:[...J(),le]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",So,le]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",So,le]}],"grid-cols":[{"grid-cols":[Eo]}],"col-start-end":[{col:["auto",{span:["full",So,le]},le]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Eo]}],"row-start-end":[{row:["auto",{span:[So,le]},le]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[Jn]},Jn]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jn,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Iu]}],"font-family":[{font:[Eo]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",le]}],"line-clamp":[{"line-clamp":["none",js,Iu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",En,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",En,Xn]}],"underline-offset":[{"underline-offset":["auto",En,le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),cb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ub]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[En,le]}],"outline-w":[{outline:[En,Xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[En,Xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jn,pb]}],"shadow-color":[{shadow:[Eo]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Jn,le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[So,le]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[En,Xn,Iu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},yb=J_(gb);function we(...e){return yb(Ug(e))}const xb=C_,Yg=v.forwardRef(({className:e,...t},n)=>p.jsx(Ig,{ref:n,className:we("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Yg.displayName=Ig.displayName;const wb=Bl("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),qg=v.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(Lg,{ref:r,className:we(wb({variant:t}),e),...n}));qg.displayName=Lg.displayName;const _b=v.forwardRef(({className:e,...t},n)=>p.jsx(zg,{ref:n,className:we("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));_b.displayName=zg.displayName;const Xg=v.forwardRef(({className:e,...t},n)=>p.jsx($g,{ref:n,className:we("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(Wg,{className:"h-4 w-4"})}));Xg.displayName=$g.displayName;const Jg=v.forwardRef(({className:e,...t},n)=>p.jsx(Dg,{ref:n,className:we("text-sm font-semibold",e),...t}));Jg.displayName=Dg.displayName;const ey=v.forwardRef(({className:e,...t},n)=>p.jsx(Fg,{ref:n,className:we("text-sm opacity-90",e),...t}));ey.displayName=Fg.displayName;function bb(){const{toasts:e}=af();return p.jsxs(xb,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return p.jsxs(qg,{...o,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(Jg,{children:n}),r&&p.jsx(ey,{children:r})]}),s,p.jsx(Xg,{})]},t)}),p.jsx(Yg,{})]})}var oh=["light","dark"],Cb="(prefers-color-scheme: dark)",kb=v.createContext(void 0),Sb={setTheme:e=>{},themes:[]},Eb=()=>{var e;return(e=v.useContext(kb))!=null?e:Sb};v.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let u=o==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=s?oh.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",d=(w,y=!1,_=!0)=>{let m=i?i[w]:w,h=y?w+"|| ''":`'${m}'`,g="";return s&&_&&!y&&oh.includes(w)&&(g+=`d.style.colorScheme = '${w}';`),n==="class"?y||m?g+=`c.add(${h})`:g+="null":m&&(g+=`d[s](n,${h})`),g},x=e?`!function(){${c}${d(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${Cb}',m=window.matchMedia(t);if(m.media!==t||m.matches){${d("dark")}}else{${d("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${d(i?"x[e]":"e",!0)}}${u?"":"else{"+d(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${d(i?"x[e]":"e",!0)}}else{${d(o,!1,!1)};}${f}}catch(t){}}();`;return v.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:x}})});var Nb=e=>{switch(e){case"success":return Rb;case"info":return Ab;case"warning":return jb;case"error":return Ob;default:return null}},Tb=Array(12).fill(0),Pb=({visible:e})=>A.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},A.createElement("div",{className:"sonner-spinner"},Tb.map((t,n)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Rb=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),jb=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.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"})),Ab=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),Ob=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),Mb=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Uc=1,Ib=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Uc++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:s}),s},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0;return r.then(async o=>{if(Db(o)&&!o.ok){s=!1;let i=typeof t.error=="function"?await t.error(`HTTP error! status: ${o.status}`):t.error,a=typeof t.description=="function"?await t.description(`HTTP error! status: ${o.status}`):t.description;this.create({id:n,type:"error",message:i,description:a})}else if(t.success!==void 0){s=!1;let i=typeof t.success=="function"?await t.success(o):t.success,a=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"success",message:i,description:a})}}).catch(async o=>{if(t.error!==void 0){s=!1;let i=typeof t.error=="function"?await t.error(o):t.error,a=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"error",message:i,description:a})}}).finally(()=>{var o;s&&(this.dismiss(n),n=void 0),(o=t.finally)==null||o.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Uc++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},St=new Ib,Lb=(e,t)=>{let n=(t==null?void 0:t.id)||Uc++;return St.addToast({title:e,...t,id:n}),n},Db=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Fb=Lb,zb=()=>St.toasts;Object.assign(Fb,{success:St.success,info:St.info,warning:St.warning,error:St.error,custom:St.custom,message:St.message,promise:St.promise,dismiss:St.dismiss,loading:St.loading},{getHistory:zb});function $b(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}$b(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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;background:var(--gray1);color:var(--gray12);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}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-rich-colors=true][data-sonner-toast][data-type=success],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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 sa(e){return e.label!==void 0}var Vb=3,Ub="32px",Bb=4e3,Wb=356,Hb=14,Zb=20,Kb=200;function Qb(...e){return e.filter(Boolean).join(" ")}var Gb=e=>{var t,n,r,s,o,i,a,l,u,c;let{invert:f,toast:d,unstyled:x,interacting:w,setHeights:y,visibleToasts:_,heights:m,index:h,toasts:g,expanded:b,removeToast:C,defaultRichColors:E,closeButton:T,style:R,cancelButtonStyle:M,actionButtonStyle:D,className:X="",descriptionClassName:O="",duration:H,position:z,gap:J,loadingIcon:q,expandByDefault:ne,classNames:N,icons:$,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:Z,cn:ee}=e,[ce,_e]=A.useState(!1),[it,he]=A.useState(!1),[mt,Mt]=A.useState(!1),[Ht,on]=A.useState(!1),[Or,Kn]=A.useState(0),[an,Qn]=A.useState(0),ho=A.useRef(null),Sn=A.useRef(null),Ii=h===0,k=h+1<=_,S=d.type,P=d.dismissible!==!1,W=d.className||"",U=d.descriptionClassName||"",F=A.useMemo(()=>m.findIndex(ae=>ae.toastId===d.id)||0,[m,d.id]),te=A.useMemo(()=>{var ae;return(ae=d.closeButton)!=null?ae:T},[d.closeButton,T]),ie=A.useMemo(()=>d.duration||H||Bb,[d.duration,H]),Me=A.useRef(0),Se=A.useRef(0),ln=A.useRef(0),Gn=A.useRef(null),[ss,mo]=z.split("-"),Li=A.useMemo(()=>m.reduce((ae,Ee,be)=>be>=F?ae:ae+Ee.height,0),[m,F]),vo=Mb(),su=d.invert||f,os=S==="loading";Se.current=A.useMemo(()=>F*J+Li,[F,Li]),A.useEffect(()=>{_e(!0)},[]),A.useLayoutEffect(()=>{if(!ce)return;let ae=Sn.current,Ee=ae.style.height;ae.style.height="auto";let be=ae.getBoundingClientRect().height;ae.style.height=Ee,Qn(be),y(un=>un.find(cn=>cn.toastId===d.id)?un.map(cn=>cn.toastId===d.id?{...cn,height:be}:cn):[{toastId:d.id,height:be,position:d.position},...un])},[ce,d.title,d.description,y,d.id]);let Yn=A.useCallback(()=>{he(!0),Kn(Se.current),y(ae=>ae.filter(Ee=>Ee.toastId!==d.id)),setTimeout(()=>{C(d)},Kb)},[d,C,y,Se]);A.useEffect(()=>{if(d.promise&&S==="loading"||d.duration===1/0||d.type==="loading")return;let ae,Ee=ie;return b||w||Z&&vo?(()=>{if(ln.current{var be;(be=d.onAutoClose)==null||be.call(d,d),Yn()},Ee)),()=>clearTimeout(ae)},[b,w,ne,d,ie,Yn,d.promise,S,Z,vo]),A.useEffect(()=>{let ae=Sn.current;if(ae){let Ee=ae.getBoundingClientRect().height;return Qn(Ee),y(be=>[{toastId:d.id,height:Ee,position:d.position},...be]),()=>y(be=>be.filter(un=>un.toastId!==d.id))}},[y,d.id]),A.useEffect(()=>{d.delete&&Yn()},[Yn,d.delete]);function sx(){return $!=null&&$.loading?A.createElement("div",{className:"sonner-loader","data-visible":S==="loading"},$.loading):q?A.createElement("div",{className:"sonner-loader","data-visible":S==="loading"},q):A.createElement(Pb,{visible:S==="loading"})}return A.createElement("li",{"aria-live":d.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Sn,className:ee(X,W,N==null?void 0:N.toast,(t=d==null?void 0:d.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[S],(n=d==null?void 0:d.classNames)==null?void 0:n[S]),"data-sonner-toast":"","data-rich-colors":(r=d.richColors)!=null?r:E,"data-styled":!(d.jsx||d.unstyled||x),"data-mounted":ce,"data-promise":!!d.promise,"data-removed":it,"data-visible":k,"data-y-position":ss,"data-x-position":mo,"data-index":h,"data-front":Ii,"data-swiping":mt,"data-dismissible":P,"data-type":S,"data-invert":su,"data-swipe-out":Ht,"data-expanded":!!(b||ne&&ce),style:{"--index":h,"--toasts-before":h,"--z-index":g.length-h,"--offset":`${it?Or:Se.current}px`,"--initial-height":ne?"auto":`${an}px`,...R,...d.style},onPointerDown:ae=>{os||!P||(ho.current=new Date,Kn(Se.current),ae.target.setPointerCapture(ae.pointerId),ae.target.tagName!=="BUTTON"&&(Mt(!0),Gn.current={x:ae.clientX,y:ae.clientY}))},onPointerUp:()=>{var ae,Ee,be,un;if(Ht||!P)return;Gn.current=null;let cn=Number(((ae=Sn.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Di=new Date().getTime()-((Ee=ho.current)==null?void 0:Ee.getTime()),ox=Math.abs(cn)/Di;if(Math.abs(cn)>=Zb||ox>.11){Kn(Se.current),(be=d.onDismiss)==null||be.call(d,d),Yn(),on(!0);return}(un=Sn.current)==null||un.style.setProperty("--swipe-amount","0px"),Mt(!1)},onPointerMove:ae=>{var Ee;if(!Gn.current||!P)return;let be=ae.clientY-Gn.current.y,un=ae.clientX-Gn.current.x,cn=(ss==="top"?Math.min:Math.max)(0,be),Di=ae.pointerType==="touch"?10:2;Math.abs(cn)>Di?(Ee=Sn.current)==null||Ee.style.setProperty("--swipe-amount",`${be}px`):Math.abs(un)>Di&&(Gn.current=null)}},te&&!d.jsx?A.createElement("button",{"aria-label":G,"data-disabled":os,"data-close-button":!0,onClick:os||!P?()=>{}:()=>{var ae;Yn(),(ae=d.onDismiss)==null||ae.call(d,d)},className:ee(N==null?void 0:N.closeButton,(s=d==null?void 0:d.classNames)==null?void 0:s.closeButton)},A.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"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,d.jsx||A.isValidElement(d.title)?d.jsx||d.title:A.createElement(A.Fragment,null,S||d.icon||d.promise?A.createElement("div",{"data-icon":"",className:ee(N==null?void 0:N.icon,(o=d==null?void 0:d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||sx():null,d.type!=="loading"?d.icon||($==null?void 0:$[S])||Nb(S):null):null,A.createElement("div",{"data-content":"",className:ee(N==null?void 0:N.content,(i=d==null?void 0:d.classNames)==null?void 0:i.content)},A.createElement("div",{"data-title":"",className:ee(N==null?void 0:N.title,(a=d==null?void 0:d.classNames)==null?void 0:a.title)},d.title),d.description?A.createElement("div",{"data-description":"",className:ee(O,U,N==null?void 0:N.description,(l=d==null?void 0:d.classNames)==null?void 0:l.description)},d.description):null),A.isValidElement(d.cancel)?d.cancel:d.cancel&&sa(d.cancel)?A.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||M,onClick:ae=>{var Ee,be;sa(d.cancel)&&P&&((be=(Ee=d.cancel).onClick)==null||be.call(Ee,ae),Yn())},className:ee(N==null?void 0:N.cancelButton,(u=d==null?void 0:d.classNames)==null?void 0:u.cancelButton)},d.cancel.label):null,A.isValidElement(d.action)?d.action:d.action&&sa(d.action)?A.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||D,onClick:ae=>{var Ee,be;sa(d.action)&&(ae.defaultPrevented||((be=(Ee=d.action).onClick)==null||be.call(Ee,ae),Yn()))},className:ee(N==null?void 0:N.actionButton,(c=d==null?void 0:d.classNames)==null?void 0:c.actionButton)},d.action.label):null))};function ih(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Yb=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:o,className:i,offset:a,theme:l="light",richColors:u,duration:c,style:f,visibleToasts:d=Vb,toastOptions:x,dir:w=ih(),gap:y=Hb,loadingIcon:_,icons:m,containerAriaLabel:h="Notifications",pauseWhenPageIsHidden:g,cn:b=Qb}=e,[C,E]=A.useState([]),T=A.useMemo(()=>Array.from(new Set([n].concat(C.filter(Z=>Z.position).map(Z=>Z.position)))),[C,n]),[R,M]=A.useState([]),[D,X]=A.useState(!1),[O,H]=A.useState(!1),[z,J]=A.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=A.useRef(null),ne=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=A.useRef(null),$=A.useRef(!1),G=A.useCallback(Z=>{var ee;(ee=C.find(ce=>ce.id===Z.id))!=null&&ee.delete||St.dismiss(Z.id),E(ce=>ce.filter(({id:_e})=>_e!==Z.id))},[C]);return A.useEffect(()=>St.subscribe(Z=>{if(Z.dismiss){E(ee=>ee.map(ce=>ce.id===Z.id?{...ce,delete:!0}:ce));return}setTimeout(()=>{of.flushSync(()=>{E(ee=>{let ce=ee.findIndex(_e=>_e.id===Z.id);return ce!==-1?[...ee.slice(0,ce),{...ee[ce],...Z},...ee.slice(ce+1)]:[Z,...ee]})})})}),[]),A.useEffect(()=>{if(l!=="system"){J(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:Z})=>{J(Z?"dark":"light")})},[l]),A.useEffect(()=>{C.length<=1&&X(!1)},[C]),A.useEffect(()=>{let Z=ee=>{var ce,_e;r.every(it=>ee[it]||ee.code===it)&&(X(!0),(ce=q.current)==null||ce.focus()),ee.code==="Escape"&&(document.activeElement===q.current||(_e=q.current)!=null&&_e.contains(document.activeElement))&&X(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[r]),A.useEffect(()=>{if(q.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,$.current=!1)}},[q.current]),C.length?A.createElement("section",{"aria-label":`${h} ${ne}`,tabIndex:-1},T.map((Z,ee)=>{var ce;let[_e,it]=Z.split("-");return A.createElement("ol",{key:Z,dir:w==="auto"?ih():w,tabIndex:-1,ref:q,className:i,"data-sonner-toaster":!0,"data-theme":z,"data-y-position":_e,"data-x-position":it,style:{"--front-toast-height":`${((ce=R[0])==null?void 0:ce.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||Ub,"--width":`${Wb}px`,"--gap":`${y}px`,...f},onBlur:he=>{$.current&&!he.currentTarget.contains(he.relatedTarget)&&($.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||$.current||($.current=!0,N.current=he.relatedTarget)},onMouseEnter:()=>X(!0),onMouseMove:()=>X(!0),onMouseLeave:()=>{O||X(!1)},onPointerDown:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},C.filter(he=>!he.position&&ee===0||he.position===Z).map((he,mt)=>{var Mt,Ht;return A.createElement(Gb,{key:he.id,icons:m,index:mt,toast:he,defaultRichColors:u,duration:(Mt=x==null?void 0:x.duration)!=null?Mt:c,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:t,visibleToasts:d,closeButton:(Ht=x==null?void 0:x.closeButton)!=null?Ht:o,interacting:O,position:Z,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:G,toasts:C.filter(on=>on.position==he.position),heights:R.filter(on=>on.position==he.position),setHeights:M,expandByDefault:s,gap:y,loadingIcon:_,expanded:D,pauseWhenPageIsHidden:g,cn:b})}))})):null};const qb=({...e})=>{const{theme:t="system"}=Eb();return p.jsx(Yb,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var Xb=fm.useId||(()=>{}),Jb=0;function ty(e){const[t,n]=v.useState(Xb());return nn(()=>{e||n(r=>r??String(Jb++))},[e]),e||(t?`radix-${t}`:"")}const eC=["top","right","bottom","left"],Sr=Math.min,Nt=Math.max,Xa=Math.round,oa=Math.floor,Er=e=>({x:e,y:e}),tC={left:"right",right:"left",bottom:"top",top:"bottom"},nC={start:"end",end:"start"};function Bc(e,t,n){return Nt(e,Sr(t,n))}function Un(e,t){return typeof e=="function"?e(t):e}function Bn(e){return e.split("-")[0]}function lo(e){return e.split("-")[1]}function vf(e){return e==="x"?"y":"x"}function gf(e){return e==="y"?"height":"width"}function Nr(e){return["top","bottom"].includes(Bn(e))?"y":"x"}function yf(e){return vf(Nr(e))}function rC(e,t,n){n===void 0&&(n=!1);const r=lo(e),s=yf(e),o=gf(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Ja(i)),[i,Ja(i)]}function sC(e){const t=Ja(e);return[Wc(e),t,Wc(t)]}function Wc(e){return e.replace(/start|end/g,t=>nC[t])}function oC(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function iC(e,t,n,r){const s=lo(e);let o=oC(Bn(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Wc)))),o}function Ja(e){return e.replace(/left|right|bottom|top/g,t=>tC[t])}function aC(e){return{top:0,right:0,bottom:0,left:0,...e}}function ny(e){return typeof e!="number"?aC(e):{top:e,right:e,bottom:e,left:e}}function el(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ah(e,t,n){let{reference:r,floating:s}=e;const o=Nr(t),i=yf(t),a=gf(i),l=Bn(t),u=o==="y",c=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,d=r[a]/2-s[a]/2;let x;switch(l){case"top":x={x:c,y:r.y-s.height};break;case"bottom":x={x:c,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:f};break;case"left":x={x:r.x-s.width,y:f};break;default:x={x:r.x,y:r.y}}switch(lo(t)){case"start":x[i]-=d*(n&&u?-1:1);break;case"end":x[i]+=d*(n&&u?-1:1);break}return x}const lC=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:f}=ah(u,r,l),d=r,x={},w=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Un(e,t)||{};if(u==null)return{};const f=ny(c),d={x:n,y:r},x=yf(s),w=gf(x),y=await i.getDimensions(u),_=x==="y",m=_?"top":"left",h=_?"bottom":"right",g=_?"clientHeight":"clientWidth",b=o.reference[w]+o.reference[x]-d[x]-o.floating[w],C=d[x]-o.reference[x],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=E?E[g]:0;(!T||!await(i.isElement==null?void 0:i.isElement(E)))&&(T=a.floating[g]||o.floating[w]);const R=b/2-C/2,M=T/2-y[w]/2-1,D=Sr(f[m],M),X=Sr(f[h],M),O=D,H=T-y[w]-X,z=T/2-y[w]/2+R,J=Bc(O,z,H),q=!l.arrow&&lo(s)!=null&&z!==J&&o.reference[w]/2-(zz<=0)){var X,O;const z=(((X=o.flip)==null?void 0:X.index)||0)+1,J=T[z];if(J)return{data:{index:z,overflows:D},reset:{placement:J}};let q=(O=D.filter(ne=>ne.overflows[0]<=0).sort((ne,N)=>ne.overflows[1]-N.overflows[1])[0])==null?void 0:O.placement;if(!q)switch(x){case"bestFit":{var H;const ne=(H=D.filter(N=>{if(E){const $=Nr(N.placement);return $===h||$==="y"}return!0}).map(N=>[N.placement,N.overflows.filter($=>$>0).reduce(($,G)=>$+G,0)]).sort((N,$)=>N[1]-$[1])[0])==null?void 0:H[0];ne&&(q=ne);break}case"initialPlacement":q=a;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function lh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uh(e){return eC.some(t=>e[t]>=0)}const dC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Un(e,t);switch(r){case"referenceHidden":{const o=await mi(t,{...s,elementContext:"reference"}),i=lh(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:uh(i)}}}case"escaped":{const o=await mi(t,{...s,altBoundary:!0}),i=lh(o,n.floating);return{data:{escapedOffsets:i,escaped:uh(i)}}}default:return{}}}}};async function fC(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Bn(n),a=lo(n),l=Nr(n)==="y",u=["left","top"].includes(i)?-1:1,c=o&&l?-1:1,f=Un(t,e);let{mainAxis:d,crossAxis:x,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(x=a==="end"?w*-1:w),l?{x:x*c,y:d*u}:{x:d*u,y:x*c}}const pC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await fC(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},hC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:_=>{let{x:m,y:h}=_;return{x:m,y:h}}},...l}=Un(e,t),u={x:n,y:r},c=await mi(t,l),f=Nr(Bn(s)),d=vf(f);let x=u[d],w=u[f];if(o){const _=d==="y"?"top":"left",m=d==="y"?"bottom":"right",h=x+c[_],g=x-c[m];x=Bc(h,x,g)}if(i){const _=f==="y"?"top":"left",m=f==="y"?"bottom":"right",h=w+c[_],g=w-c[m];w=Bc(h,w,g)}const y=a.fn({...t,[d]:x,[f]:w});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[d]:o,[f]:i}}}}}},mC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Un(e,t),c={x:n,y:r},f=Nr(s),d=vf(f);let x=c[d],w=c[f];const y=Un(a,t),_=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const g=d==="y"?"height":"width",b=o.reference[d]-o.floating[g]+_.mainAxis,C=o.reference[d]+o.reference[g]-_.mainAxis;xC&&(x=C)}if(u){var m,h;const g=d==="y"?"width":"height",b=["top","left"].includes(Bn(s)),C=o.reference[f]-o.floating[g]+(b&&((m=i.offset)==null?void 0:m[f])||0)+(b?0:_.crossAxis),E=o.reference[f]+o.reference[g]+(b?0:((h=i.offset)==null?void 0:h[f])||0)-(b?_.crossAxis:0);wE&&(w=E)}return{[d]:x,[f]:w}}}},vC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...u}=Un(e,t),c=await mi(t,u),f=Bn(s),d=lo(s),x=Nr(s)==="y",{width:w,height:y}=o.floating;let _,m;f==="top"||f==="bottom"?(_=f,m=d===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(m=f,_=d==="end"?"top":"bottom");const h=y-c.top-c.bottom,g=w-c.left-c.right,b=Sr(y-c[_],h),C=Sr(w-c[m],g),E=!t.middlewareData.shift;let T=b,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=g),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=h),E&&!d){const D=Nt(c.left,0),X=Nt(c.right,0),O=Nt(c.top,0),H=Nt(c.bottom,0);x?R=w-2*(D!==0||X!==0?D+X:Nt(c.left,c.right)):T=y-2*(O!==0||H!==0?O+H:Nt(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:T});const M=await i.getDimensions(a.floating);return w!==M.width||y!==M.height?{reset:{rects:!0}}:{}}}};function Wl(){return typeof window<"u"}function uo(e){return ry(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kn(e){var t;return(t=(ry(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ry(e){return Wl()?e instanceof Node||e instanceof Rt(e).Node:!1}function rn(e){return Wl()?e instanceof Element||e instanceof Rt(e).Element:!1}function bn(e){return Wl()?e instanceof HTMLElement||e instanceof Rt(e).HTMLElement:!1}function ch(e){return!Wl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function Oi(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function gC(e){return["table","td","th"].includes(uo(e))}function Hl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function xf(e){const t=wf(),n=rn(e)?sn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function yC(e){let t=Tr(e);for(;bn(t)&&!qs(t);){if(xf(t))return t;if(Hl(t))return null;t=Tr(t)}return null}function wf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function qs(e){return["html","body","#document"].includes(uo(e))}function sn(e){return Rt(e).getComputedStyle(e)}function Zl(e){return rn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tr(e){if(uo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ch(e)&&e.host||kn(e);return ch(t)?t.host:t}function sy(e){const t=Tr(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:bn(t)&&Oi(t)?t:sy(t)}function vi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=sy(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(s);if(o){const a=Hc(i);return t.concat(i,i.visualViewport||[],Oi(s)?s:[],a&&n?vi(a):[])}return t.concat(s,vi(s,[],n))}function Hc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oy(e){const t=sn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=bn(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=Xa(n)!==o||Xa(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function _f(e){return rn(e)?e:e.contextElement}function As(e){const t=_f(e);if(!bn(t))return Er(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=oy(t);let i=(o?Xa(n.width):n.width)/r,a=(o?Xa(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const xC=Er(0);function iy(e){const t=Rt(e);return!wf()||!t.visualViewport?xC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function Xr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=_f(e);let i=Er(1);t&&(r?rn(r)&&(i=As(r)):i=As(e));const a=wC(o,n,r)?iy(o):Er(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,c=s.width/i.x,f=s.height/i.y;if(o){const d=Rt(o),x=r&&rn(r)?Rt(r):r;let w=d,y=Hc(w);for(;y&&r&&x!==w;){const _=As(y),m=y.getBoundingClientRect(),h=sn(y),g=m.left+(y.clientLeft+parseFloat(h.paddingLeft))*_.x,b=m.top+(y.clientTop+parseFloat(h.paddingTop))*_.y;l*=_.x,u*=_.y,c*=_.x,f*=_.y,l+=g,u+=b,w=Rt(y),y=Hc(w)}}return el({width:c,height:f,x:l,y:u})}function _C(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=kn(r),a=t?Hl(t.floating):!1;if(r===i||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Er(1);const c=Er(0),f=bn(r);if((f||!f&&!o)&&((uo(r)!=="body"||Oi(i))&&(l=Zl(r)),bn(r))){const d=Xr(r);u=As(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function bC(e){return Array.from(e.getClientRects())}function Zc(e,t){const n=Zl(e).scrollLeft;return t?t.left+n:Xr(kn(e)).left+n}function CC(e){const t=kn(e),n=Zl(e),r=e.ownerDocument.body,s=Nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Zc(e);const a=-n.scrollTop;return sn(r).direction==="rtl"&&(i+=Nt(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function kC(e,t){const n=Rt(e),r=kn(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=wf();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function SC(e,t){const n=Xr(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=bn(e)?As(e):Er(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=r*o.y;return{width:i,height:a,x:l,y:u}}function dh(e,t,n){let r;if(t==="viewport")r=kC(e,n);else if(t==="document")r=CC(kn(e));else if(rn(t))r=SC(t,n);else{const s=iy(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return el(r)}function ay(e,t){const n=Tr(e);return n===t||!rn(n)||qs(n)?!1:sn(n).position==="fixed"||ay(n,t)}function EC(e,t){const n=t.get(e);if(n)return n;let r=vi(e,[],!1).filter(a=>rn(a)&&uo(a)!=="body"),s=null;const o=sn(e).position==="fixed";let i=o?Tr(e):e;for(;rn(i)&&!qs(i);){const a=sn(i),l=xf(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Oi(i)&&!l&&ay(e,i))?r=r.filter(c=>c!==i):s=a,i=Tr(i)}return t.set(e,r),r}function NC(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Hl(t)?[]:EC(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,c)=>{const f=dh(t,c,s);return u.top=Nt(f.top,u.top),u.right=Sr(f.right,u.right),u.bottom=Sr(f.bottom,u.bottom),u.left=Nt(f.left,u.left),u},dh(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function TC(e){const{width:t,height:n}=oy(e);return{width:t,height:n}}function PC(e,t,n){const r=bn(t),s=kn(t),o=n==="fixed",i=Xr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Er(0);if(r||!r&&!o)if((uo(t)!=="body"||Oi(s))&&(a=Zl(t)),r){const x=Xr(t,!0,o,t);l.x=x.x+t.clientLeft,l.y=x.y+t.clientTop}else s&&(l.x=Zc(s));let u=0,c=0;if(s&&!r&&!o){const x=s.getBoundingClientRect();c=x.top+a.scrollTop,u=x.left+a.scrollLeft-Zc(s,x)}const f=i.left+a.scrollLeft-l.x-u,d=i.top+a.scrollTop-l.y-c;return{x:f,y:d,width:i.width,height:i.height}}function Lu(e){return sn(e).position==="static"}function fh(e,t){if(!bn(e)||sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kn(e)===n&&(n=n.ownerDocument.body),n}function ly(e,t){const n=Rt(e);if(Hl(e))return n;if(!bn(e)){let s=Tr(e);for(;s&&!qs(s);){if(rn(s)&&!Lu(s))return s;s=Tr(s)}return n}let r=fh(e,t);for(;r&&gC(r)&&Lu(r);)r=fh(r,t);return r&&qs(r)&&Lu(r)&&!xf(r)?n:r||yC(e)||n}const RC=async function(e){const t=this.getOffsetParent||ly,n=this.getDimensions,r=await n(e.floating);return{reference:PC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jC(e){return sn(e).direction==="rtl"}const AC={convertOffsetParentRelativeRectToViewportRelativeRect:_C,getDocumentElement:kn,getClippingRect:NC,getOffsetParent:ly,getElementRects:RC,getClientRects:bC,getDimensions:TC,getScale:As,isElement:rn,isRTL:jC};function OC(e,t){let n=null,r;const s=kn(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const x=oa(c),w=oa(s.clientWidth-(u+f)),y=oa(s.clientHeight-(c+d)),_=oa(u),h={rootMargin:-x+"px "+-w+"px "+-y+"px "+-_+"px",threshold:Nt(0,Sr(1,l))||1};let g=!0;function b(C){const E=C[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(b,{...h,root:s.ownerDocument})}catch{n=new IntersectionObserver(b,h)}n.observe(e)}return i(!0),o}function MC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=_f(e),c=s||o?[...u?vi(u):[],...vi(t)]:[];c.forEach(m=>{s&&m.addEventListener("scroll",n,{passive:!0}),o&&m.addEventListener("resize",n)});const f=u&&a?OC(u,n):null;let d=-1,x=null;i&&(x=new ResizeObserver(m=>{let[h]=m;h&&h.target===u&&x&&(x.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=x)==null||g.observe(t)})),n()}),u&&!l&&x.observe(u),x.observe(t));let w,y=l?Xr(e):null;l&&_();function _(){const m=Xr(e);y&&(m.x!==y.x||m.y!==y.y||m.width!==y.width||m.height!==y.height)&&n(),y=m,w=requestAnimationFrame(_)}return n(),()=>{var m;c.forEach(h=>{s&&h.removeEventListener("scroll",n),o&&h.removeEventListener("resize",n)}),f==null||f(),(m=x)==null||m.disconnect(),x=null,l&&cancelAnimationFrame(w)}}const IC=pC,LC=hC,DC=cC,FC=vC,zC=dC,ph=uC,$C=mC,VC=(e,t,n)=>{const r=new Map,s={platform:AC,...n},o={...s.platform,_c:r};return lC(e,t,{...s,platform:o})};var Ca=typeof document<"u"?v.useLayoutEffect:v.useEffect;function tl(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,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tl(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!tl(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function uy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hh(e,t){const n=uy(e);return Math.round(t*n)/n}function Du(e){const t=v.useRef(e);return Ca(()=>{t.current=e}),t}function UC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,x]=v.useState(r);tl(d,r)||x(r);const[w,y]=v.useState(null),[_,m]=v.useState(null),h=v.useCallback(N=>{N!==E.current&&(E.current=N,y(N))},[]),g=v.useCallback(N=>{N!==T.current&&(T.current=N,m(N))},[]),b=o||w,C=i||_,E=v.useRef(null),T=v.useRef(null),R=v.useRef(c),M=l!=null,D=Du(l),X=Du(s),O=Du(u),H=v.useCallback(()=>{if(!E.current||!T.current)return;const N={placement:t,strategy:n,middleware:d};X.current&&(N.platform=X.current),VC(E.current,T.current,N).then($=>{const G={...$,isPositioned:O.current!==!1};z.current&&!tl(R.current,G)&&(R.current=G,Ai.flushSync(()=>{f(G)}))})},[d,t,n,X,O]);Ca(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const z=v.useRef(!1);Ca(()=>(z.current=!0,()=>{z.current=!1}),[]),Ca(()=>{if(b&&(E.current=b),C&&(T.current=C),b&&C){if(D.current)return D.current(b,C,H);H()}},[b,C,H,D,M]);const J=v.useMemo(()=>({reference:E,floating:T,setReference:h,setFloating:g}),[h,g]),q=v.useMemo(()=>({reference:b,floating:C}),[b,C]),ne=v.useMemo(()=>{const N={position:n,left:0,top:0};if(!q.floating)return N;const $=hh(q.floating,c.x),G=hh(q.floating,c.y);return a?{...N,transform:"translate("+$+"px, "+G+"px)",...uy(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:G}},[n,a,q.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:H,refs:J,elements:q,floatingStyles:ne}),[c,H,J,q,ne])}const BC=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ph({element:r.current,padding:s}).fn(n):{}:r?ph({element:r,padding:s}).fn(n):{}}}},WC=(e,t)=>({...IC(e),options:[e,t]}),HC=(e,t)=>({...LC(e),options:[e,t]}),ZC=(e,t)=>({...$C(e),options:[e,t]}),KC=(e,t)=>({...DC(e),options:[e,t]}),QC=(e,t)=>({...FC(e),options:[e,t]}),GC=(e,t)=>({...zC(e),options:[e,t]}),YC=(e,t)=>({...BC(e),options:[e,t]});var qC="Arrow",cy=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return p.jsx(ke.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});cy.displayName=qC;var XC=cy;function JC(e,t=[]){let n=[];function r(o,i){const a=v.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:d,children:x,...w}=f,y=(d==null?void 0:d[e][l])||a,_=v.useMemo(()=>w,Object.values(w));return p.jsx(y.Provider,{value:_,children:x})}function c(f,d){const x=(d==null?void 0:d[e][l])||a,w=v.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const s=()=>{const o=n.map(i=>v.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,ek(s,...t)]}function ek(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function tk(e){const[t,n]=v.useState(void 0);return nn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var dy="Popper",[fy,py]=JC(dy),[NN,hy]=fy(dy),my="PopperAnchor",vy=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=hy(my,n),i=v.useRef(null),a=st(t,i);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:p.jsx(ke.div,{...s,ref:a})});vy.displayName=my;var bf="PopperContent",[nk,rk]=fy(bf),gy=v.forwardRef((e,t)=>{var mt,Mt,Ht,on,Or,Kn;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:x="optimized",onPlaced:w,...y}=e,_=hy(bf,n),[m,h]=v.useState(null),g=st(t,an=>h(an)),[b,C]=v.useState(null),E=tk(b),T=(E==null?void 0:E.width)??0,R=(E==null?void 0:E.height)??0,M=r+(o!=="center"?"-"+o:""),D=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},X=Array.isArray(u)?u:[u],O=X.length>0,H={padding:D,boundary:X.filter(ok),altBoundary:O},{refs:z,floatingStyles:J,placement:q,isPositioned:ne,middlewareData:N}=UC({strategy:"fixed",placement:M,whileElementsMounted:(...an)=>MC(...an,{animationFrame:x==="always"}),elements:{reference:_.anchor},middleware:[WC({mainAxis:s+R,alignmentAxis:i}),l&&HC({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ZC():void 0,...H}),l&&KC({...H}),QC({...H,apply:({elements:an,rects:Qn,availableWidth:ho,availableHeight:Sn})=>{const{width:Ii,height:k}=Qn.reference,S=an.floating.style;S.setProperty("--radix-popper-available-width",`${ho}px`),S.setProperty("--radix-popper-available-height",`${Sn}px`),S.setProperty("--radix-popper-anchor-width",`${Ii}px`),S.setProperty("--radix-popper-anchor-height",`${k}px`)}}),b&&YC({element:b,padding:a}),ik({arrowWidth:T,arrowHeight:R}),d&&GC({strategy:"referenceHidden",...H})]}),[$,G]=wy(q),Z=Ge(w);nn(()=>{ne&&(Z==null||Z())},[ne,Z]);const ee=(mt=N.arrow)==null?void 0:mt.x,ce=(Mt=N.arrow)==null?void 0:Mt.y,_e=((Ht=N.arrow)==null?void 0:Ht.centerOffset)!==0,[it,he]=v.useState();return nn(()=>{m&&he(window.getComputedStyle(m).zIndex)},[m]),p.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ne?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:it,"--radix-popper-transform-origin":[(on=N.transformOrigin)==null?void 0:on.x,(Or=N.transformOrigin)==null?void 0:Or.y].join(" "),...((Kn=N.hide)==null?void 0:Kn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(nk,{scope:n,placedSide:$,onArrowChange:C,arrowX:ee,arrowY:ce,shouldHideArrow:_e,children:p.jsx(ke.div,{"data-side":$,"data-align":G,...y,ref:g,style:{...y.style,animation:ne?void 0:"none"}})})})});gy.displayName=bf;var yy="PopperArrow",sk={top:"bottom",right:"left",bottom:"top",left:"right"},xy=v.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=rk(yy,r),i=sk[o.placedSide];return p.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:p.jsx(XC,{...s,ref:n,style:{...s.style,display:"block"}})})});xy.displayName=yy;function ok(e){return e!==null}var ik=e=>({name:"transformOrigin",options:e,fn(t){var _,m,h;const{placement:n,rects:r,middlewareData:s}=t,i=((_=s.arrow)==null?void 0:_.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=wy(n),f={start:"0%",center:"50%",end:"100%"}[c],d=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,x=(((h=s.arrow)==null?void 0:h.y)??0)+l/2;let w="",y="";return u==="bottom"?(w=i?f:`${d}px`,y=`${-l}px`):u==="top"?(w=i?f:`${d}px`,y=`${r.floating.height+l}px`):u==="right"?(w=`${-l}px`,y=i?f:`${x}px`):u==="left"&&(w=`${r.floating.width+l}px`,y=i?f:`${x}px`),{data:{x:w,y}}}});function wy(e){const[t,n="center"]=e.split("-");return[t,n]}var ak=vy,lk=gy,uk=xy,[Kl,TN]=cf("Tooltip",[py]),Cf=py(),_y="TooltipProvider",ck=700,mh="tooltip.open",[dk,by]=Kl(_y),Cy=e=>{const{__scopeTooltip:t,delayDuration:n=ck,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=v.useState(!0),l=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),p.jsx(dk,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(c=>{l.current=c},[]),disableHoverableContent:s,children:o})};Cy.displayName=_y;var ky="Tooltip",[PN,Ql]=Kl(ky),Kc="TooltipTrigger",fk=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ql(Kc,n),o=by(Kc,n),i=Cf(n),a=v.useRef(null),l=st(t,a,s.onTriggerChange),u=v.useRef(!1),c=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(ak,{asChild:!0,...i,children:p.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:pe(e.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:pe(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:pe(e.onBlur,s.onClose),onClick:pe(e.onClick,s.onClose)})})});fk.displayName=Kc;var pk="TooltipPortal",[RN,hk]=Kl(pk,{forceMount:void 0}),Xs="TooltipContent",Sy=v.forwardRef((e,t)=>{const n=hk(Xs,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Ql(Xs,e.__scopeTooltip);return p.jsx(rs,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Ey,{side:s,...o,ref:t}):p.jsx(mk,{side:s,...o,ref:t})})}),mk=v.forwardRef((e,t)=>{const n=Ql(Xs,e.__scopeTooltip),r=by(Xs,e.__scopeTooltip),s=v.useRef(null),o=st(t,s),[i,a]=v.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:f}=r,d=v.useCallback(()=>{a(null),f(!1)},[f]),x=v.useCallback((w,y)=>{const _=w.currentTarget,m={x:w.clientX,y:w.clientY},h=xk(m,_.getBoundingClientRect()),g=wk(m,h),b=_k(y.getBoundingClientRect()),C=Ck([...g,...b]);a(C),f(!0)},[f]);return v.useEffect(()=>()=>d(),[d]),v.useEffect(()=>{if(l&&c){const w=_=>x(_,c),y=_=>x(_,l);return l.addEventListener("pointerleave",w),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",w),c.removeEventListener("pointerleave",y)}}},[l,c,x,d]),v.useEffect(()=>{if(i){const w=y=>{const _=y.target,m={x:y.clientX,y:y.clientY},h=(l==null?void 0:l.contains(_))||(c==null?void 0:c.contains(_)),g=!bk(m,i);h?d():g&&(d(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,c,i,u,d]),p.jsx(Ey,{...e,ref:o})}),[vk,gk]=Kl(ky,{isInside:!1}),Ey=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=Ql(Xs,n),u=Cf(n),{onClose:c}=l;return v.useEffect(()=>(document.addEventListener(mh,c),()=>document.removeEventListener(mh,c)),[c]),v.useEffect(()=>{if(l.trigger){const f=d=>{const x=d.target;x!=null&&x.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),p.jsx(zl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:p.jsxs(lk,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(vg,{children:r}),p.jsx(vk,{scope:n,isInside:!0,children:p.jsx(_g,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Sy.displayName=Xs;var Ny="TooltipArrow",yk=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Cf(n);return gk(Ny,n).isInside?null:p.jsx(uk,{...s,...r,ref:t})});yk.displayName=Ny;function xk(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wk(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function _k(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function bk(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;or!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(s=!s)}return s}function Ck(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),kk(t)}function kk(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Sk=Cy,Ty=Sy;const Ek=Sk,Nk=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Ty,{ref:r,sideOffset:t,className:we("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Nk.displayName=Ty.displayName;var Gl=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(){}},Yl=typeof window>"u"||"Deno"in globalThis;function Qt(){}function Tk(e,t){return typeof e=="function"?e(t):e}function Pk(e){return typeof e=="number"&&e>=0&&e!==1/0}function Rk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vh(e,t){return typeof e=="function"?e(t):e}function jk(e,t){return typeof e=="function"?e(t):e}function gh(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==kf(i,t.options))return!1}else if(!yi(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function yh(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(gi(t.options.mutationKey)!==gi(o))return!1}else if(!yi(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function kf(e,t){return((t==null?void 0:t.queryKeyHashFn)||gi)(e)}function gi(e){return JSON.stringify(e,(t,n)=>Qc(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function yi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!yi(e[n],t[n])):!1}function Py(e,t){if(e===t)return e;const n=xh(e)&&xh(t);if(n||Qc(e)&&Qc(t)){const r=n?e:Object.keys(e),s=r.length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let l=0;for(let u=0;u{setTimeout(t,e)})}function Ok(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Py(e,t):t}function Mk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ik(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Sf=Symbol();function Ry(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Sf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var $r,ar,Ms,Kh,Lk=(Kh=class extends Gl{constructor(){super();ge(this,$r);ge(this,ar);ge(this,Ms);ue(this,Ms,t=>{if(!Yl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,ar)||this.setEventListener(j(this,Ms))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,ar))==null||t.call(this),ue(this,ar,void 0))}setEventListener(t){var n;ue(this,Ms,t),(n=j(this,ar))==null||n.call(this),ue(this,ar,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){j(this,$r)!==t&&(ue(this,$r,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,$r)=="boolean"?j(this,$r):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$r=new WeakMap,ar=new WeakMap,Ms=new WeakMap,Kh),jy=new Lk,Is,lr,Ls,Qh,Dk=(Qh=class extends Gl{constructor(){super();ge(this,Is,!0);ge(this,lr);ge(this,Ls);ue(this,Ls,t=>{if(!Yl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,lr)||this.setEventListener(j(this,Ls))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,lr))==null||t.call(this),ue(this,lr,void 0))}setEventListener(t){var n;ue(this,Ls,t),(n=j(this,lr))==null||n.call(this),ue(this,lr,t(this.setOnline.bind(this)))}setOnline(t){j(this,Is)!==t&&(ue(this,Is,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return j(this,Is)}},Is=new WeakMap,lr=new WeakMap,Ls=new WeakMap,Qh),nl=new Dk;function Fk(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function zk(e){return Math.min(1e3*2**e,3e4)}function Ay(e){return(e??"online")==="online"?nl.isOnline():!0}var Oy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Fu(e){return e instanceof Oy}function My(e){let t=!1,n=0,r=!1,s;const o=Fk(),i=y=>{var _;r||(d(new Oy(y)),(_=e.abort)==null||_.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>jy.isFocused()&&(e.networkMode==="always"||nl.isOnline())&&e.canRun(),c=()=>Ay(e.networkMode)&&e.canRun(),f=y=>{var _;r||(r=!0,(_=e.onSuccess)==null||_.call(e,y),s==null||s(),o.resolve(y))},d=y=>{var _;r||(r=!0,(_=e.onError)==null||_.call(e,y),s==null||s(),o.reject(y))},x=()=>new Promise(y=>{var _;s=m=>{(r||u())&&y(m)},(_=e.onPause)==null||_.call(e)}).then(()=>{var y;s=void 0,r||(y=e.onContinue)==null||y.call(e)}),w=()=>{if(r)return;let y;const _=n===0?e.initialPromise:void 0;try{y=_??e.fn()}catch(m){y=Promise.reject(m)}Promise.resolve(y).then(f).catch(m=>{var E;if(r)return;const h=e.retry??(Yl?0:3),g=e.retryDelay??zk,b=typeof g=="function"?g(n,m):g,C=h===!0||typeof h=="number"&&nu()?void 0:x()).then(()=>{t?d(m):w()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?w():x().then(w),o)}}function $k(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const o=a=>{t?e.push(a):s(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var ct=$k(),Vr,Gh,Iy=(Gh=class{constructor(){ge(this,Vr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pk(this.gcTime)&&ue(this,Vr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yl?1/0:5*60*1e3))}clearGcTimeout(){j(this,Vr)&&(clearTimeout(j(this,Vr)),ue(this,Vr,void 0))}},Vr=new WeakMap,Gh),Ds,Fs,It,tt,Si,Ur,Gt,Tn,Yh,Vk=(Yh=class extends Iy{constructor(t){super();ge(this,Gt);ge(this,Ds);ge(this,Fs);ge(this,It);ge(this,tt);ge(this,Si);ge(this,Ur);ue(this,Ur,!1),ue(this,Si,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,It,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,Ds,Bk(this.options)),this.state=t.state??j(this,Ds),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...j(this,Si),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,It).remove(this)}setData(t,n){const r=Ok(this.state.data,t,this.options);return Xe(this,Gt,Tn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Xe(this,Gt,Tn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=j(this,tt))==null?void 0:r.promise;return(s=j(this,tt))==null||s.cancel(t),n?n.then(Qt).catch(Qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Ds))}isActive(){return this.observers.some(t=>jk(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Rk(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,It).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(j(this,tt)&&(j(this,Ur)?j(this,tt).cancel({revert:!0}):j(this,tt).cancelRetry()),this.scheduleGc()),j(this,It).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Xe(this,Gt,Tn).call(this,{type:"invalidate"})}fetch(t,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,tt))return j(this,tt).continueRetry(),j(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ue(this,Ur,!0),r.signal)})},o=()=>{const f=Ry(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return s(d),ue(this,Ur,!1),this.options.persister?this.options.persister(f,d,this):f(d)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(i),(l=this.options.behavior)==null||l.onFetch(i,this),ue(this,Fs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Xe(this,Gt,Tn).call(this,{type:"fetch",meta:(c=i.fetchOptions)==null?void 0:c.meta});const a=f=>{var d,x,w,y;Fu(f)&&f.silent||Xe(this,Gt,Tn).call(this,{type:"error",error:f}),Fu(f)||((x=(d=j(this,It).config).onError)==null||x.call(d,f,this),(y=(w=j(this,It).config).onSettled)==null||y.call(w,this.state.data,f,this)),this.scheduleGc()};return ue(this,tt,My({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var d,x,w,y;if(f===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(_){a(_);return}(x=(d=j(this,It).config).onSuccess)==null||x.call(d,f,this),(y=(w=j(this,It).config).onSettled)==null||y.call(w,f,this.state.error,this),this.scheduleGc()},onError:a,onFail:(f,d)=>{Xe(this,Gt,Tn).call(this,{type:"failed",failureCount:f,error:d})},onPause:()=>{Xe(this,Gt,Tn).call(this,{type:"pause"})},onContinue:()=>{Xe(this,Gt,Tn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),j(this,tt).start()}},Ds=new WeakMap,Fs=new WeakMap,It=new WeakMap,tt=new WeakMap,Si=new WeakMap,Ur=new WeakMap,Gt=new WeakSet,Tn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Uk(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Fu(s)&&s.revert&&j(this,Fs)?{...j(this,Fs),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,It).notify({query:this,type:"updated",action:t})})},Yh);function Uk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ay(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Bk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var pn,qh,Wk=(qh=class extends Gl{constructor(t={}){super();ge(this,pn);this.config=t,ue(this,pn,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??kf(s,n);let i=this.get(o);return i||(i=new Vk({cache:this,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){j(this,pn).has(t.queryHash)||(j(this,pn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=j(this,pn).get(t.queryHash);n&&(t.destroy(),n===t&&j(this,pn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,pn).get(t)}getAll(){return[...j(this,pn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>gh(t,r)):n}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pn=new WeakMap,qh),hn,at,Br,mn,er,Xh,Hk=(Xh=class extends Iy{constructor(t){super();ge(this,mn);ge(this,hn);ge(this,at);ge(this,Br);this.mutationId=t.mutationId,ue(this,at,t.mutationCache),ue(this,hn,[]),this.state=t.state||Zk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,hn).includes(t)||(j(this,hn).push(t),this.clearGcTimeout(),j(this,at).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,hn,j(this,hn).filter(n=>n!==t)),this.scheduleGc(),j(this,at).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,hn).length||(this.state.status==="pending"?this.scheduleGc():j(this,at).remove(this))}continue(){var t;return((t=j(this,Br))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,i,a,l,u,c,f,d,x,w,y,_,m,h,g,b,C,E,T;ue(this,Br,My({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{Xe(this,mn,er).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{Xe(this,mn,er).call(this,{type:"pause"})},onContinue:()=>{Xe(this,mn,er).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,at).canRun(this)}));const n=this.state.status==="pending",r=!j(this,Br).canStart();try{if(!n){Xe(this,mn,er).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(s=j(this,at).config).onMutate)==null?void 0:o.call(s,t,this));const M=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t));M!==this.state.context&&Xe(this,mn,er).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const R=await j(this,Br).start();return await((u=(l=j(this,at).config).onSuccess)==null?void 0:u.call(l,R,t,this.state.context,this)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,R,t,this.state.context)),await((x=(d=j(this,at).config).onSettled)==null?void 0:x.call(d,R,null,this.state.variables,this.state.context,this)),await((y=(w=this.options).onSettled)==null?void 0:y.call(w,R,null,t,this.state.context)),Xe(this,mn,er).call(this,{type:"success",data:R}),R}catch(R){try{throw await((m=(_=j(this,at).config).onError)==null?void 0:m.call(_,R,t,this.state.context,this)),await((g=(h=this.options).onError)==null?void 0:g.call(h,R,t,this.state.context)),await((C=(b=j(this,at).config).onSettled)==null?void 0:C.call(b,void 0,R,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,R,t,this.state.context)),R}finally{Xe(this,mn,er).call(this,{type:"error",error:R})}}finally{j(this,at).runNext(this)}}},hn=new WeakMap,at=new WeakMap,Br=new WeakMap,mn=new WeakSet,er=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ct.batch(()=>{j(this,hn).forEach(r=>{r.onMutationUpdate(t)}),j(this,at).notify({mutation:this,type:"updated",action:t})})},Xh);function Zk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kt,Ei,Jh,Kk=(Jh=class extends Gl{constructor(t={}){super();ge(this,kt);ge(this,Ei);this.config=t,ue(this,kt,new Map),ue(this,Ei,Date.now())}build(t,n,r){const s=new Hk({mutationCache:this,mutationId:++Fi(this,Ei)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=ia(t),r=j(this,kt).get(n)??[];r.push(t),j(this,kt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=ia(t);if(j(this,kt).has(n)){const s=(r=j(this,kt).get(n))==null?void 0:r.filter(o=>o!==t);s&&(s.length===0?j(this,kt).delete(n):j(this,kt).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=j(this,kt).get(ia(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=j(this,kt).get(ia(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...j(this,kt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yh(n,r))}findAll(t={}){return this.getAll().filter(n=>yh(t,n))}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(Qt))))}},kt=new WeakMap,Ei=new WeakMap,Jh);function ia(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function _h(e){return{onFetch:(t,n)=>{var c,f,d,x,w;const r=t.options,s=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],i=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const _=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},m=Ry(t.options,t.fetchOptions),h=async(g,b,C)=>{if(y)return Promise.reject();if(b==null&&g.pages.length)return Promise.resolve(g);const E={queryKey:t.queryKey,pageParam:b,direction:C?"backward":"forward",meta:t.options.meta};_(E);const T=await m(E),{maxPages:R}=t.options,M=C?Ik:Mk;return{pages:M(g.pages,T,R),pageParams:M(g.pageParams,b,R)}};if(s&&o.length){const g=s==="backward",b=g?Qk:bh,C={pages:o,pageParams:i},E=b(r,C);a=await h(C,E,g)}else{const g=e??o.length;do{const b=l===0?i[0]??r.initialPageParam:bh(r,a);if(l>0&&b==null)break;a=await h(a,b),l++}while(l{var y,_;return(_=(y=t.options).persister)==null?void 0:_.call(y,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function bh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ie,ur,cr,zs,$s,dr,Vs,Us,em,Gk=(em=class{constructor(e={}){ge(this,Ie);ge(this,ur);ge(this,cr);ge(this,zs);ge(this,$s);ge(this,dr);ge(this,Vs);ge(this,Us);ue(this,Ie,e.queryCache||new Wk),ue(this,ur,e.mutationCache||new Kk),ue(this,cr,e.defaultOptions||{}),ue(this,zs,new Map),ue(this,$s,new Map),ue(this,dr,0)}mount(){Fi(this,dr)._++,j(this,dr)===1&&(ue(this,Vs,jy.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Ie).onFocus())})),ue(this,Us,nl.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Ie).onOnline())})))}unmount(){var e,t;Fi(this,dr)._--,j(this,dr)===0&&((e=j(this,Vs))==null||e.call(this),ue(this,Vs,void 0),(t=j(this,Us))==null||t.call(this),ue(this,Us,void 0))}isFetching(e){return j(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,ur).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,Ie).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=j(this,Ie).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(vh(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return j(this,Ie).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=j(this,Ie).get(r.queryHash),o=s==null?void 0:s.state.data,i=Tk(t,o);if(i!==void 0)return j(this,Ie).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return ct.batch(()=>j(this,Ie).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,Ie).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=j(this,Ie);ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=j(this,Ie),r={type:"active",...e};return ct.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=ct.batch(()=>j(this,Ie).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Qt).catch(Qt)}invalidateQueries(e={},t={}){return ct.batch(()=>{if(j(this,Ie).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=ct.batch(()=>j(this,Ie).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Qt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Qt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=j(this,Ie).build(this,t);return n.isStaleByTime(vh(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qt).catch(Qt)}fetchInfiniteQuery(e){return e.behavior=_h(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qt).catch(Qt)}ensureInfiniteQueryData(e){return e.behavior=_h(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nl.isOnline()?j(this,ur).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Ie)}getMutationCache(){return j(this,ur)}getDefaultOptions(){return j(this,cr)}setDefaultOptions(e){ue(this,cr,e)}setQueryDefaults(e,t){j(this,zs).set(gi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,zs).values()];let n={};return t.forEach(r=>{yi(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){j(this,$s).set(gi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,$s).values()];let n={};return t.forEach(r=>{yi(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,cr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=kf(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.enabled!==!0&&t.queryFn===Sf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,cr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,Ie).clear(),j(this,ur).clear()}},Ie=new WeakMap,ur=new WeakMap,cr=new WeakMap,zs=new WeakMap,$s=new WeakMap,dr=new WeakMap,Vs=new WeakMap,Us=new WeakMap,em),Yk=v.createContext(void 0),qk=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(Yk.Provider,{value:e,children:t}));/** * @remix-run/router v1.20.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function xi(){return xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Ly(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Jk(){return Math.random().toString(36).substr(2,8)}function kh(e,t){return{usr:e.state,key:e.key,idx:t}}function Gc(e,t,n,r){return n===void 0&&(n=null),xi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?co(t):t,{state:n,key:t&&t.key||r||Jk()})}function Dy(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function co(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function eS(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=hr.Pop,l=null,u=c();u==null&&(u=0,i.replaceState(xi({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function f(){a=hr.Pop;let _=c(),m=_==null?null:_-u;u=_,l&&l({action:a,location:y.location,delta:m})}function d(_,m){a=hr.Push;let h=Gc(y.location,_,m);u=c()+1;let g=kh(h,u),b=y.createHref(h);try{i.pushState(g,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(b)}o&&l&&l({action:a,location:y.location,delta:1})}function x(_,m){a=hr.Replace;let h=Gc(y.location,_,m);u=c();let g=kh(h,u),b=y.createHref(h);i.replaceState(g,"",b),o&&l&&l({action:a,location:y.location,delta:0})}function w(_){let m=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof _=="string"?_:Dy(_);return h=h.replace(/ $/,"%20"),He(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let y={get action(){return a},get location(){return e(s,i)},listen(_){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Ch,f),l=_,()=>{s.removeEventListener(Ch,f),l=null}},createHref(_){return t(s,_)},createURL:w,encodeLocation(_){let m=w(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:x,go(_){return i.go(_)}};return y}var Sh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Sh||(Sh={}));function tS(e,t,n){return n===void 0&&(n="/"),nS(e,t,n,!1)}function nS(e,t,n,r){let s=typeof t=="string"?co(t):t,o=$y(s.pathname||"/",n);if(o==null)return null;let i=Fy(e);rS(i);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(He(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Zr([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(He(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Fy(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:cS(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of zy(o.path))s(o,i,l)}),t}function zy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=zy(r.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function rS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dS(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sS=/^:[\w-]+$/,oS=3,iS=2,aS=1,lS=10,uS=-2,Eh=e=>e==="*";function cS(e,t){let n=e.split("/"),r=n.length;return n.some(Eh)&&(r+=uS),t&&(r+=iS),n.filter(s=>!Eh(s)).reduce((s,o)=>s+(sS.test(o)?oS:o===""?aS:lS),r)}function dS(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function fS(e,t,n){let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a{let{paramName:d,isOptional:x}=c;if(d==="*"){let y=a[f]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[f];return x&&!w?u[d]=void 0:u[d]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function pS(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ly(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function hS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ly(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function $y(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function mS(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?co(e):e;return{pathname:n?n.startsWith("/")?n:vS(n,t):t,search:_S(r),hash:bS(s)}}function vS(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function zu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function gS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yS(e,t){let n=gS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xS(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=co(e):(s=xi({},e),He(!s.pathname||!s.pathname.includes("?"),zu("?","pathname","search",s)),He(!s.pathname||!s.pathname.includes("#"),zu("#","pathname","hash",s)),He(!s.search||!s.search.includes("#"),zu("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),f-=1;s.pathname=d.join("/")}a=f>=0?t[f]:"/"}let l=mS(s,a),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Zr=e=>e.join("/").replace(/\/\/+/g,"/"),wS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_S=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function CS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Vy=["post","put","patch","delete"];new Set(Vy);const kS=["get",...Vy];new Set(kS);/** * React Router v6.27.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),v.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=xS(u,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Zr([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,i,o,e])}function TS(e,t){return PS(e,t)}function PS(e,t,n,r){Jl()||He(!1);let{navigator:s}=v.useContext(ql),{matches:o}=v.useContext(fo),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=Nf(),c;if(t){var f;let _=typeof t=="string"?co(t):t;l==="/"||(f=_.pathname)!=null&&f.startsWith(l)||He(!1),c=_}else c=u;let d=c.pathname||"/",x=d;if(l!=="/"){let _=l.replace(/^\//,"").split("/");x="/"+d.replace(/^\//,"").split("/").slice(_.length).join("/")}let w=tS(e,{pathname:x}),y=MS(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:Zr([l,s.encodeLocation?s.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:Zr([l,s.encodeLocation?s.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,n,r);return t&&y?v.createElement(Xl.Provider,{value:{location:wi({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:hr.Pop}},y):y}function RS(){let e=FS(),t=CS(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:s},n):null,null)}const jS=v.createElement(RS,null);class AS extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(fo.Provider,{value:this.props.routeContext},v.createElement(Uy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function OS(e){let{routeContext:t,match:n,children:r}=e,s=v.useContext(Ef);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(fo.Provider,{value:t},r)}function MS(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||He(!1),i=i.slice(0,Math.min(i.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((c,f,d)=>{let x,w=!1,y=null,_=null;n&&(x=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||jS,l&&(u<0&&d===0?(w=!0,_=null):u===d&&(w=!0,_=f.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,d+1)),h=()=>{let g;return x?g=y:w?g=_:f.route.Component?g=v.createElement(f.route.Component,null):f.route.element?g=f.route.element:g=c,v.createElement(OS,{match:f,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:g})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?v.createElement(AS,{location:n.location,revalidation:n.revalidation,component:y,error:x,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var Wy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wy||{}),rl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(rl||{});function IS(e){let t=v.useContext(Ef);return t||He(!1),t}function LS(e){let t=v.useContext(SS);return t||He(!1),t}function DS(e){let t=v.useContext(fo);return t||He(!1),t}function Hy(e){let t=DS(),n=t.matches[t.matches.length-1];return n.route.id||He(!1),n.route.id}function FS(){var e;let t=v.useContext(Uy),n=LS(rl.UseRouteError),r=Hy(rl.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function zS(){let{router:e}=IS(Wy.UseNavigateStable),t=Hy(rl.UseNavigateStable),n=v.useRef(!1);return By(()=>{n.current=!0}),v.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,wi({fromRouteId:t},o)))},[e,t])}function ka(e){He(!1)}function $S(e){let{basename:t="/",children:n=null,location:r,navigationType:s=hr.Pop,navigator:o,static:i=!1,future:a}=e;Jl()&&He(!1);let l=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:l,navigator:o,static:i,future:wi({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=co(r));let{pathname:c="/",search:f="",hash:d="",state:x=null,key:w="default"}=r,y=v.useMemo(()=>{let _=$y(c,l);return _==null?null:{location:{pathname:_,search:f,hash:d,state:x,key:w},navigationType:s}},[l,c,f,d,x,w,s]);return y==null?null:v.createElement(ql.Provider,{value:u},v.createElement(Xl.Provider,{children:n,value:y}))}function VS(e){let{children:t,location:n}=e;return TS(Yc(t),n)}new Promise(()=>{});function Yc(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,s)=>{if(!v.isValidElement(r))return;let o=[...t,s];if(r.type===v.Fragment){n.push.apply(n,Yc(r.props.children,o));return}r.type!==ka&&He(!1),!r.props.index||!r.props.children||He(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Yc(r.props.children,o)),n.push(i)}),n}/** * React Router DOM v6.27.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const US="6";try{window.__reactRouterVersion=US}catch{}const BS="startTransition",Th=fm[BS];function WS(e){let{basename:t,children:n,future:r,window:s}=e,o=v.useRef();o.current==null&&(o.current=Xk({window:s,v5Compat:!0}));let i=o.current,[a,l]=v.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},c=v.useCallback(f=>{u&&Th?Th(()=>l(f)):l(f)},[l,u]);return v.useLayoutEffect(()=>i.listen(c),[i,c]),v.createElement($S,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}var Ph;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ph||(Ph={}));var Rh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Rh||(Rh={}));const HS=Bl("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),wn=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?Ys:"button";return p.jsx(i,{className:we(HS({variant:t,size:n,className:e})),ref:o,...s})});wn.displayName="Button";const ZS=()=>{const e=()=>{const n=document.getElementById("plans");n&&n.scrollIntoView({behavior:"smooth"})},t=()=>{const n=document.getElementById("contato");n&&n.scrollIntoView({behavior:"smooth"})};return p.jsxs("div",{className:"relative min-h-[90vh] flex items-center overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary-dark/5 via-primary/10 to-secondary-light/20"}),p.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1zbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0zNiAxOGMzLjMxNCAwIDYtMi42ODYgNi02cy0yLjY4Ni02LTYtNi02IDIuNjg2LTYgNiAyLjY4NiA2IDYgNnptMCAwIiBzdHJva2U9IiNjY2MiIHN0cm9rZS13aWR0aD0iMiIvPjwvZz48L3N2Zz4=')] opacity-10"}),p.jsx("div",{className:"container mx-auto px-4 relative",children:p.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[p.jsxs("div",{className:"space-y-8",children:[p.jsx("div",{className:"inline-block",children:p.jsx("img",{src:"/lovable-uploads/f81f2439-6d87-4ffe-9369-8376db87c75b.png",alt:"Facil Telecom Logo",className:"h-16 mb-8"})}),p.jsxs("h1",{className:"text-5xl lg:text-7xl font-bold text-primary",children:["Internet de",p.jsx("span",{className:"text-secondary",children:" alta velocidade"})," para você"]}),p.jsx("p",{className:"text-xl text-gray-600",children:"Conecte-se ao futuro com a Facil Telecom. Planos sob medida para sua necessidade com a melhor tecnologia do mercado."}),p.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[p.jsxs(wn,{size:"lg",className:"bg-primary hover:bg-primary-dark text-white",onClick:e,children:["Ver Planos",p.jsx(N_,{className:"ml-2 h-5 w-5"})]}),p.jsx(wn,{size:"lg",variant:"outline",className:"border-primary text-primary hover:bg-primary/10",onClick:t,children:"Fale Conosco"})]}),p.jsxs("div",{className:"grid grid-cols-3 gap-6 pt-8 border-t border-gray-100",children:[p.jsxs("div",{children:[p.jsx("div",{className:"text-3xl font-bold text-primary",children:"1,000+"}),p.jsx("div",{className:"text-sm text-gray-600",children:"Clientes Ativos"})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-3xl font-bold text-primary",children:"99.99%"}),p.jsx("div",{className:"text-sm text-gray-600",children:"Uptime"})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-3xl font-bold text-primary",children:"24/7"}),p.jsx("div",{className:"text-sm text-gray-600",children:"Suporte"})]})]})]}),p.jsxs("div",{className:"relative hidden lg:block",children:[p.jsx("div",{className:"absolute -top-20 -right-20 w-64 h-64 bg-secondary/20 rounded-full blur-3xl"}),p.jsx("div",{className:"absolute -bottom-20 -left-20 w-64 h-64 bg-primary/20 rounded-full blur-3xl"}),p.jsxs("div",{className:"relative animate-float",children:[p.jsx("img",{src:"https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d",alt:"Pessoa usando laptop",className:"rounded-2xl shadow-2xl"}),p.jsxs("div",{className:"absolute -bottom-4 -right-4 bg-white/90 backdrop-blur-sm p-6 rounded-2xl shadow-lg border border-gray-100",children:[p.jsx("p",{className:"text-2xl font-bold text-secondary",children:"500Mb"}),p.jsx("p",{className:"text-gray-600",children:"Velocidade média"})]})]})]})]})})]})},sl=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:we("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));sl.displayName="Card";const Zy=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:we("flex flex-col space-y-1.5 p-6",e),...t}));Zy.displayName="CardHeader";const Ky=v.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:we("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ky.displayName="CardTitle";const Qy=v.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:we("text-sm text-muted-foreground",e),...t}));Qy.displayName="CardDescription";const Gy=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:we("p-6 pt-0",e),...t}));Gy.displayName="CardContent";const Yy=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:we("flex items-center p-6 pt-0",e),...t}));Yy.displayName="CardFooter";const KS=[{name:"Básico",price:"79,90",speed:"250",features:["Suporte Exclusivo","Internet alta velocidade sem limitações"],popular:!1},{name:"Plus",price:"89,90",speed:"400",features:["Wi-Fi Grátis","Suporte Exclusivo","Internet alta velocidade sem limitações"],popular:!0},{name:"Premium",price:"99,90",speed:"500",features:["Wi-Fi Grátis","Suporte Exclusivo","Internet alta velocidade sem limitações"],popular:!1}],QS=()=>{const e=()=>{const t=document.getElementById("contato");t&&t.scrollIntoView({behavior:"smooth"})};return p.jsx("section",{id:"plans",className:"py-20 bg-gradient-to-b from-white via-primary/5 to-white",children:p.jsxs("div",{className:"container mx-auto px-4",children:[p.jsxs("div",{className:"text-center mb-16",children:[p.jsx("h2",{className:"text-4xl font-bold text-primary mb-4",children:"Escolha o plano ideal para você"}),p.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Oferecemos diferentes opções de velocidade para atender suas necessidades"}),p.jsx("p",{className:"text-gray-500 text-sm mt-4",children:"*Planos sujeitos a análise de viabilidade."})]}),p.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:KS.map(t=>p.jsxs(sl,{className:`relative transition-all duration-300 hover:-translate-y-1 ${t.popular?"border-secondary shadow-lg scale-105":"border-gray-200 hover:border-primary/20"}`,children:[t.popular&&p.jsx("span",{className:"absolute -top-4 left-1/2 -translate-x-1/2 bg-secondary text-white px-4 py-1 rounded-full text-sm font-medium",children:"Mais Popular"}),p.jsxs(Zy,{children:[p.jsx(Ky,{className:"text-2xl text-primary",children:t.name}),p.jsxs(Qy,{children:[p.jsxs("span",{className:"text-3xl font-bold text-gray-900",children:["R$ ",t.price]}),p.jsx("span",{className:"text-gray-500",children:"/mês"})]})]}),p.jsxs(Gy,{children:[p.jsxs("p",{className:"text-4xl font-bold text-secondary mb-6",children:[t.speed,p.jsx("span",{className:"text-xl font-normal text-gray-500",children:"Mb"})]}),p.jsx("ul",{className:"space-y-4",children:t.features.map(n=>p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx(T_,{className:"h-5 w-5 text-secondary"}),p.jsx("span",{className:"text-gray-600",children:n})]},n))})]}),p.jsx(Yy,{children:p.jsx(wn,{className:`w-full ${t.popular?"bg-secondary hover:bg-secondary-dark text-white":"bg-primary hover:bg-primary-dark text-white"}`,onClick:e,children:"Assinar Agora"})})]},t.name))})]})})},GS=[{icon:z_,title:"Conexão Estável",description:"Internet sem interrupções e com desempenho máximo"},{icon:D_,title:"Máxima Segurança",description:"Sua conexão é protegida contra ameaças cibernéticas"},{icon:j_,title:"Suporte 24/7",description:"Suporte técnico disponível 24 horas por dia, 7 dias por semana"},{icon:$_,title:"Ultra Velocidade",description:"Velocidade de download impressionante para arquivos grandes"}],YS=()=>p.jsxs("section",{className:"py-20 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-white via-primary/5 to-white"}),p.jsxs("div",{className:"container mx-auto px-4 relative",children:[p.jsxs("div",{className:"text-center mb-16",children:[p.jsx("h2",{className:"text-4xl font-bold text-primary mb-4",children:"Por que escolher a Facil Telecom?"}),p.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Descubra as vantagens de ter a melhor internet da região"})]}),p.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:GS.map((e,t)=>p.jsxs("div",{className:"p-6 rounded-2xl bg-white shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border border-gray-100",children:[p.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-primary/10 to-secondary/10 rounded-xl flex items-center justify-center mb-4",children:p.jsx(e.icon,{className:"h-6 w-6 text-primary"})}),p.jsx("h3",{className:"text-xl font-semibold text-primary mb-2",children:e.title}),p.jsx("p",{className:"text-gray-600",children:e.description})]},e.title))})]})]}),qS=()=>p.jsx("footer",{className:"bg-primary text-white",children:p.jsxs("div",{className:"container mx-auto px-4 py-12",children:[p.jsxs("div",{className:"grid md:grid-cols-4 gap-8",children:[p.jsxs("div",{children:[p.jsx("h3",{className:"text-xl font-bold mb-4",children:"Facil Telecom"}),p.jsx("p",{className:"text-gray-200",children:"Sua provedora de internet de alta velocidade"})]}),p.jsxs("div",{children:[p.jsx("h4",{className:"text-lg font-semibold mb-4",children:"Links Rápidos"}),p.jsxs("ul",{className:"space-y-2",children:[p.jsx("li",{children:p.jsx("a",{href:"#planos",className:"text-gray-200 hover:text-secondary transition-colors",children:"Planos"})}),p.jsx("li",{children:p.jsx("a",{href:"#sobre",className:"text-gray-200 hover:text-secondary transition-colors",children:"Sobre Nós"})}),p.jsx("li",{children:p.jsx("a",{href:"#cobertura",className:"text-gray-200 hover:text-secondary transition-colors",children:"Cobertura"})}),p.jsx("li",{children:p.jsx("a",{href:"#contato",className:"text-gray-200 hover:text-secondary transition-colors",children:"Contato"})})]})]}),p.jsxs("div",{children:[p.jsx("h4",{className:"text-lg font-semibold mb-4",children:"Contato"}),p.jsxs("ul",{className:"space-y-3 text-gray-200",children:[p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx(O_,{className:"h-5 w-5 text-secondary"}),"comercial@faciltelecom.com.br"]}),p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx(I_,{className:"h-5 w-5 text-secondary"}),"73 3263-5020"]}),p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx(nh,{className:"h-5 w-5 text-secondary"}),"Seg-Sex: 8h às 19h"]}),p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx(nh,{className:"h-5 w-5 text-secondary"}),"Sáb: 8h às 17h"]})]})]}),p.jsxs("div",{children:[p.jsx("h4",{className:"text-lg font-semibold mb-4",children:"Redes Sociais"}),p.jsxs("div",{className:"flex space-x-4",children:[p.jsx("a",{href:"#",className:"text-gray-200 hover:text-secondary transition-colors","aria-label":"Facebook",children:p.jsx(R_,{className:"h-6 w-6"})}),p.jsx("a",{href:"#",className:"text-gray-200 hover:text-secondary transition-colors","aria-label":"Instagram",children:p.jsx(A_,{className:"h-6 w-6"})}),p.jsx("a",{href:"#",className:"text-gray-200 hover:text-secondary transition-colors","aria-label":"Twitter",children:p.jsx(F_,{className:"h-6 w-6"})})]})]})]}),p.jsx("div",{className:"border-t border-gray-700 mt-12 pt-8 text-center text-gray-200",children:p.jsx("p",{children:"© 2025 Facil Telecom. Todos os direitos reservados."})})]})});var XS=v.createContext(void 0);function JS(e){const t=v.useContext(XS);return e||t||"ltr"}function eE(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var po="NavigationMenu",[Tf,qy,tE]=uf(po),[qc,nE,rE]=uf(po),[Pf,jN]=cf(po,[tE,rE]),[sE,Wt]=Pf(po),[oE,iE]=Pf(po),Xy=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:o,delayDuration:i=200,skipDelayDuration:a=300,orientation:l="horizontal",dir:u,...c}=e,[f,d]=v.useState(null),x=st(t,M=>d(M)),w=JS(u),y=v.useRef(0),_=v.useRef(0),m=v.useRef(0),[h,g]=v.useState(!0),[b="",C]=df({prop:r,onChange:M=>{const D=M!=="",X=a>0;D?(window.clearTimeout(m.current),X&&g(!1)):(window.clearTimeout(m.current),m.current=window.setTimeout(()=>g(!0),a)),s==null||s(M)},defaultProp:o}),E=v.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>C(""),150)},[C]),T=v.useCallback(M=>{window.clearTimeout(_.current),C(M)},[C]),R=v.useCallback(M=>{b===M?window.clearTimeout(_.current):y.current=window.setTimeout(()=>{window.clearTimeout(_.current),C(M)},i)},[b,C,i]);return v.useEffect(()=>()=>{window.clearTimeout(y.current),window.clearTimeout(_.current),window.clearTimeout(m.current)},[]),p.jsx(e0,{scope:n,isRootMenu:!0,value:b,dir:w,orientation:l,rootNavigationMenu:f,onTriggerEnter:M=>{window.clearTimeout(y.current),h?R(M):T(M)},onTriggerLeave:()=>{window.clearTimeout(y.current),E()},onContentEnter:()=>window.clearTimeout(_.current),onContentLeave:E,onItemSelect:M=>{C(D=>D===M?"":M)},onItemDismiss:()=>C(""),children:p.jsx(ke.nav,{"aria-label":"Main","data-orientation":l,dir:w,...c,ref:x})})});Xy.displayName=po;var Jy="NavigationMenuSub",aE=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",...a}=e,l=Wt(Jy,n),[u="",c]=df({prop:r,onChange:s,defaultProp:o});return p.jsx(e0,{scope:n,isRootMenu:!1,value:u,dir:l.dir,orientation:i,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:f=>c(f),onItemSelect:f=>c(f),onItemDismiss:()=>c(""),children:p.jsx(ke.div,{"data-orientation":i,...a,ref:t})})});aE.displayName=Jy;var e0=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:s,orientation:o,children:i,value:a,onItemSelect:l,onItemDismiss:u,onTriggerEnter:c,onTriggerLeave:f,onContentEnter:d,onContentLeave:x}=e,[w,y]=v.useState(null),[_,m]=v.useState(new Map),[h,g]=v.useState(null);return p.jsx(sE,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:a,previousValue:eE(a),baseId:ty(),dir:s,orientation:o,viewport:w,onViewportChange:y,indicatorTrack:h,onIndicatorTrackChange:g,onTriggerEnter:Ge(c),onTriggerLeave:Ge(f),onContentEnter:Ge(d),onContentLeave:Ge(x),onItemSelect:Ge(l),onItemDismiss:Ge(u),onViewportContentChange:v.useCallback((b,C)=>{m(E=>(E.set(b,C),new Map(E)))},[]),onViewportContentRemove:v.useCallback(b=>{m(C=>C.has(b)?(C.delete(b),new Map(C)):C)},[]),children:p.jsx(Tf.Provider,{scope:t,children:p.jsx(oE,{scope:t,items:_,children:i})})})},t0="NavigationMenuList",n0=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,s=Wt(t0,n),o=p.jsx(ke.ul,{"data-orientation":s.orientation,...r,ref:t});return p.jsx(ke.div,{style:{position:"relative"},ref:s.onIndicatorTrackChange,children:p.jsx(Tf.Slot,{scope:n,children:s.isRootMenu?p.jsx(f0,{asChild:!0,children:o}):o})})});n0.displayName=t0;var r0="NavigationMenuItem",[lE,s0]=Pf(r0),o0=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...s}=e,o=ty(),i=r||o||"LEGACY_REACT_AUTO_VALUE",a=v.useRef(null),l=v.useRef(null),u=v.useRef(null),c=v.useRef(()=>{}),f=v.useRef(!1),d=v.useCallback((w="start")=>{if(a.current){c.current();const y=Jc(a.current);y.length&&Af(w==="start"?y:y.reverse())}},[]),x=v.useCallback(()=>{if(a.current){const w=Jc(a.current);w.length&&(c.current=mE(w))}},[]);return p.jsx(lE,{scope:n,value:i,triggerRef:l,contentRef:a,focusProxyRef:u,wasEscapeCloseRef:f,onEntryKeyDown:d,onFocusProxyEnter:d,onRootContentClose:x,onContentFocusOutside:x,children:p.jsx(ke.li,{...s,ref:t})})});o0.displayName=r0;var Xc="NavigationMenuTrigger",i0=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...s}=e,o=Wt(Xc,e.__scopeNavigationMenu),i=s0(Xc,e.__scopeNavigationMenu),a=v.useRef(null),l=st(a,i.triggerRef,t),u=h0(o.baseId,i.value),c=m0(o.baseId,i.value),f=v.useRef(!1),d=v.useRef(!1),x=i.value===o.value;return p.jsxs(p.Fragment,{children:[p.jsx(Tf.ItemSlot,{scope:n,value:i.value,children:p.jsx(p0,{asChild:!0,children:p.jsx(ke.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":Of(x),"aria-expanded":x,"aria-controls":c,...s,ref:l,onPointerEnter:pe(e.onPointerEnter,()=>{d.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:pe(e.onPointerMove,ol(()=>{r||d.current||i.wasEscapeCloseRef.current||f.current||(o.onTriggerEnter(i.value),f.current=!0)})),onPointerLeave:pe(e.onPointerLeave,ol(()=>{r||(o.onTriggerLeave(),f.current=!1)})),onClick:pe(e.onClick,()=>{o.onItemSelect(i.value),d.current=x}),onKeyDown:pe(e.onKeyDown,w=>{const _={horizontal:"ArrowDown",vertical:o.dir==="rtl"?"ArrowLeft":"ArrowRight"}[o.orientation];x&&w.key===_&&(i.onEntryKeyDown(),w.preventDefault())})})})}),x&&p.jsxs(p.Fragment,{children:[p.jsx(_g,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:w=>{const y=i.contentRef.current,_=w.relatedTarget,m=_===a.current,h=y==null?void 0:y.contains(_);(m||!h)&&i.onFocusProxyEnter(m?"start":"end")}}),o.viewport&&p.jsx("span",{"aria-owns":c})]})]})});i0.displayName=Xc;var uE="NavigationMenuLink",jh="navigationMenu.linkSelect",a0=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:s,...o}=e;return p.jsx(p0,{asChild:!0,children:p.jsx(ke.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...o,ref:t,onClick:pe(e.onClick,i=>{const a=i.target,l=new CustomEvent(jh,{bubbles:!0,cancelable:!0});if(a.addEventListener(jh,u=>s==null?void 0:s(u),{once:!0}),qa(a,l),!l.defaultPrevented&&!i.metaKey){const u=new CustomEvent(Sa,{bubbles:!0,cancelable:!0});qa(a,u)}},{checkForDefaultPrevented:!1})})})});a0.displayName=uE;var Rf="NavigationMenuIndicator",l0=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Wt(Rf,e.__scopeNavigationMenu),o=!!s.value;return s.indicatorTrack?of.createPortal(p.jsx(rs,{present:n||o,children:p.jsx(cE,{...r,ref:t})}),s.indicatorTrack):null});l0.displayName=Rf;var cE=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,s=Wt(Rf,n),o=qy(n),[i,a]=v.useState(null),[l,u]=v.useState(null),c=s.orientation==="horizontal",f=!!s.value;v.useEffect(()=>{var y;const w=(y=o().find(_=>_.value===s.value))==null?void 0:y.ref.current;w&&a(w)},[o,s.value]);const d=()=>{i&&u({size:c?i.offsetWidth:i.offsetHeight,offset:c?i.offsetLeft:i.offsetTop})};return ed(i,d),ed(s.indicatorTrack,d),l?p.jsx(ke.div,{"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":s.orientation,...r,ref:t,style:{position:"absolute",...c?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...r.style}}):null}),Js="NavigationMenuContent",u0=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Wt(Js,e.__scopeNavigationMenu),o=s0(Js,e.__scopeNavigationMenu),i=st(o.contentRef,t),a=o.value===s.value,l={value:o.value,triggerRef:o.triggerRef,focusProxyRef:o.focusProxyRef,wasEscapeCloseRef:o.wasEscapeCloseRef,onContentFocusOutside:o.onContentFocusOutside,onRootContentClose:o.onRootContentClose,...r};return s.viewport?p.jsx(dE,{forceMount:n,...l,ref:i}):p.jsx(rs,{present:n||a,children:p.jsx(c0,{"data-state":Of(a),...l,ref:i,onPointerEnter:pe(e.onPointerEnter,s.onContentEnter),onPointerLeave:pe(e.onPointerLeave,ol(s.onContentLeave)),style:{pointerEvents:!a&&s.isRootMenu?"none":void 0,...l.style}})})});u0.displayName=Js;var dE=v.forwardRef((e,t)=>{const n=Wt(Js,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:s}=n;return nn(()=>{r(e.value,{ref:t,...e})},[e,t,r]),nn(()=>()=>s(e.value),[e.value,s]),null}),Sa="navigationMenu.rootContentDismiss",c0=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:s,focusProxyRef:o,wasEscapeCloseRef:i,onRootContentClose:a,onContentFocusOutside:l,...u}=e,c=Wt(Js,n),f=v.useRef(null),d=st(f,t),x=h0(c.baseId,r),w=m0(c.baseId,r),y=qy(n),_=v.useRef(null),{onItemDismiss:m}=c;v.useEffect(()=>{const g=f.current;if(c.isRootMenu&&g){const b=()=>{var C;m(),a(),g.contains(document.activeElement)&&((C=s.current)==null||C.focus())};return g.addEventListener(Sa,b),()=>g.removeEventListener(Sa,b)}},[c.isRootMenu,e.value,s,m,a]);const h=v.useMemo(()=>{const b=y().map(D=>D.value);c.dir==="rtl"&&b.reverse();const C=b.indexOf(c.value),E=b.indexOf(c.previousValue),T=r===c.value,R=E===b.indexOf(r);if(!T&&!R)return _.current;const M=(()=>{if(C!==E){if(T&&E!==-1)return C>E?"from-end":"from-start";if(R&&C!==-1)return C>E?"to-start":"to-end"}return null})();return _.current=M,M},[c.previousValue,c.value,c.dir,y,r]);return p.jsx(f0,{asChild:!0,children:p.jsx(zl,{id:w,"aria-labelledby":x,"data-motion":h,"data-orientation":c.orientation,...u,ref:d,disableOutsidePointerEvents:!1,onDismiss:()=>{var b;const g=new Event(Sa,{bubbles:!0,cancelable:!0});(b=f.current)==null||b.dispatchEvent(g)},onFocusOutside:pe(e.onFocusOutside,g=>{var C;l();const b=g.target;(C=c.rootNavigationMenu)!=null&&C.contains(b)&&g.preventDefault()}),onPointerDownOutside:pe(e.onPointerDownOutside,g=>{var T;const b=g.target,C=y().some(R=>{var M;return(M=R.ref.current)==null?void 0:M.contains(b)}),E=c.isRootMenu&&((T=c.viewport)==null?void 0:T.contains(b));(C||E||!c.isRootMenu)&&g.preventDefault()}),onKeyDown:pe(e.onKeyDown,g=>{var E;const b=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!b){const T=Jc(g.currentTarget),R=document.activeElement,M=T.findIndex(O=>O===R),X=g.shiftKey?T.slice(0,M).reverse():T.slice(M+1,T.length);Af(X)?g.preventDefault():(E=o.current)==null||E.focus()}}),onEscapeKeyDown:pe(e.onEscapeKeyDown,g=>{i.current=!0})})})}),jf="NavigationMenuViewport",d0=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=!!Wt(jf,e.__scopeNavigationMenu).value;return p.jsx(rs,{present:n||o,children:p.jsx(fE,{...r,ref:t})})});d0.displayName=jf;var fE=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...s}=e,o=Wt(jf,n),i=st(t,o.onViewportChange),a=iE(Js,e.__scopeNavigationMenu),[l,u]=v.useState(null),[c,f]=v.useState(null),d=l?(l==null?void 0:l.width)+"px":void 0,x=l?(l==null?void 0:l.height)+"px":void 0,w=!!o.value,y=w?o.value:o.previousValue;return ed(c,()=>{c&&u({width:c.offsetWidth,height:c.offsetHeight})}),p.jsx(ke.div,{"data-state":Of(w),"data-orientation":o.orientation,...s,ref:i,style:{pointerEvents:!w&&o.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":d,"--radix-navigation-menu-viewport-height":x,...s.style},onPointerEnter:pe(e.onPointerEnter,o.onContentEnter),onPointerLeave:pe(e.onPointerLeave,ol(o.onContentLeave)),children:Array.from(a.items).map(([m,{ref:h,forceMount:g,...b}])=>{const C=y===m;return p.jsx(rs,{present:g||C,children:p.jsx(c0,{...b,ref:lf(h,E=>{C&&E&&f(E)})})},m)})})}),pE="FocusGroup",f0=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,s=Wt(pE,n);return p.jsx(qc.Provider,{scope:n,children:p.jsx(qc.Slot,{scope:n,children:p.jsx(ke.div,{dir:s.dir,...r,ref:t})})})}),Ah=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],hE="FocusGroupItem",p0=v.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,s=nE(n),o=Wt(hE,n);return p.jsx(qc.ItemSlot,{scope:n,children:p.jsx(ke.button,{...r,ref:t,onKeyDown:pe(e.onKeyDown,i=>{if(["Home","End",...Ah].includes(i.key)){let l=s().map(f=>f.ref.current);if([o.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),Ah.includes(i.key)){const f=l.indexOf(i.currentTarget);l=l.slice(f+1)}setTimeout(()=>Af(l)),i.preventDefault()}})})})});function Jc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Af(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function mE(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function ed(e,t){const n=Ge(t);nn(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}function Of(e){return e?"open":"closed"}function h0(e,t){return`${e}-trigger-${t}`}function m0(e,t){return`${e}-content-${t}`}function ol(e){return t=>t.pointerType==="mouse"?e(t):void 0}var v0=Xy,g0=n0,vE=o0,y0=i0,gE=a0,x0=l0,w0=u0,_0=d0;const b0=v.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(v0,{ref:r,className:we("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,p.jsx(k0,{})]}));b0.displayName=v0.displayName;const C0=v.forwardRef(({className:e,...t},n)=>p.jsx(g0,{ref:n,className:we("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));C0.displayName=g0.displayName;const aa=vE,yE=Bl("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),xE=v.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(y0,{ref:r,className:we(yE(),"group",e),...n,children:[t," ",p.jsx(P_,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));xE.displayName=y0.displayName;const wE=v.forwardRef(({className:e,...t},n)=>p.jsx(w0,{ref:n,className:we("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));wE.displayName=w0.displayName;const la=gE,k0=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{className:we("absolute left-0 top-full flex justify-center"),children:p.jsx(_0,{className:we("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));k0.displayName=_0.displayName;const _E=v.forwardRef(({className:e,...t},n)=>p.jsx(x0,{ref:n,className:we("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:p.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));_E.displayName=x0.displayName;const S0=()=>{const[e,t]=v.useState(!1),n=ES(),r=s=>{const o=document.getElementById(s);o&&o.scrollIntoView({behavior:"smooth"})};return p.jsx("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-white border-b border-gray-200 shadow-sm",children:p.jsxs("div",{className:"container mx-auto px-4",children:[p.jsxs("div",{className:"flex items-center justify-between h-16",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx("img",{src:"/lovable-uploads/f81f2439-6d87-4ffe-9369-8376db87c75b.png",alt:"Facil Telecom Logo",className:"h-8",onClick:()=>n("/"),style:{cursor:"pointer"}})}),p.jsx("div",{className:"hidden md:block",children:p.jsx(b0,{children:p.jsxs(C0,{className:"space-x-4",children:[p.jsx(aa,{children:p.jsx(la,{className:"text-gray-600 hover:text-primary",onClick:()=>r("planos"),children:"Planos"})}),p.jsx(aa,{children:p.jsx(la,{className:"text-gray-600 hover:text-primary",onClick:()=>r("beneficios"),children:"Benefícios"})}),p.jsx(aa,{children:p.jsx(la,{className:"text-gray-600 hover:text-primary",onClick:()=>r("cobertura"),children:"Cobertura"})}),p.jsx(aa,{children:p.jsx(la,{className:"text-gray-600 hover:text-primary",onClick:()=>r("contato"),children:"Contato"})})]})})}),p.jsx("div",{className:"hidden md:block",children:p.jsx(wn,{className:"bg-secondary hover:bg-secondary-dark text-white",onClick:()=>n("/area-cliente"),children:"Área do Cliente"})}),p.jsx("div",{className:"md:hidden",children:p.jsx(wn,{variant:"ghost",size:"icon",onClick:()=>t(!e),className:"text-gray-600",children:e?p.jsx(Wg,{className:"h-6 w-6"}):p.jsx(M_,{className:"h-6 w-6"})})})]}),e&&p.jsx("div",{className:"md:hidden py-4",children:p.jsxs("div",{className:"flex flex-col space-y-4",children:[p.jsx("a",{onClick:()=>r("planos"),className:"text-gray-600 hover:text-primary px-3 py-2",children:"Planos"}),p.jsx("a",{onClick:()=>r("beneficios"),className:"text-gray-600 hover:text-primary px-3 py-2",children:"Benefícios"}),p.jsx("a",{onClick:()=>r("cobertura"),className:"text-gray-600 hover:text-primary px-3 py-2",children:"Cobertura"}),p.jsx("a",{onClick:()=>r("contato"),className:"text-gray-600 hover:text-primary px-3 py-2",children:"Contato"}),p.jsx(wn,{className:"bg-secondary hover:bg-secondary-dark text-white w-full",onClick:()=>n("/area-cliente"),children:"Área do Cliente"})]})})]})})};var Mi=e=>e.type==="checkbox",zr=e=>e instanceof Date,ut=e=>e==null;const E0=e=>typeof e=="object";var $e=e=>!ut(e)&&!Array.isArray(e)&&E0(e)&&!zr(e),N0=e=>$e(e)&&e.target?Mi(e.target)?e.target.checked:e.target.value:e,bE=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,T0=(e,t)=>e.has(bE(t)),CE=e=>{const t=e.constructor&&e.constructor.prototype;return $e(t)&&t.hasOwnProperty("isPrototypeOf")},Mf=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function vt(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Mf&&(e instanceof Blob||e instanceof FileList))&&(n||$e(e)))if(t=n?[]:{},!n&&!CE(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=vt(e[r]));else return e;return t}var eu=e=>Array.isArray(e)?e.filter(Boolean):[],Fe=e=>e===void 0,V=(e,t,n)=>{if(!t||!$e(e))return n;const r=eu(t.split(/[,[\].]+?/)).reduce((s,o)=>ut(s)?s:s[o],e);return Fe(r)||r===e?Fe(e[t])?n:e[t]:r},Lt=e=>typeof e=="boolean",If=e=>/^\w*$/.test(e),P0=e=>eu(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ye=(e,t,n)=>{let r=-1;const s=If(t)?[t]:P0(t),o=s.length,i=o-1;for(;++rA.useContext(R0),kE=e=>{const{children:t,...n}=e;return A.createElement(R0.Provider,{value:n},t)};var j0=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Xt.all&&(t._proxyFormState[i]=!r||Xt.all),n&&(n[i]=!0),e[i]}});return s},gt=e=>$e(e)&&!Object.keys(e).length,A0=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return gt(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Xt.all))},Qo=e=>Array.isArray(e)?e:[e],O0=(e,t,n)=>!e||!t||e===t||Qo(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Lf(e){const t=A.useRef(e);t.current=e,A.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function SE(e){const t=tu(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=A.useState(n._formState),l=A.useRef(!0),u=A.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=A.useRef(s);return c.current=s,Lf({disabled:r,next:f=>l.current&&O0(c.current,f.name,o)&&A0(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),A.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),j0(i,n,u.current,!1)}var gn=e=>typeof e=="string",M0=(e,t,n,r,s)=>gn(e)?(r&&t.watch.add(e),V(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),V(n,o))):(r&&(t.watchAll=!0),n);function EE(e){const t=tu(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=A.useRef(r);a.current=r,Lf({disabled:o,subject:n._subjects.values,next:c=>{O0(a.current,c.name,i)&&u(vt(M0(a.current,n._names,c.values||n._formValues,!1,s)))}});const[l,u]=A.useState(n._getWatch(r,s));return A.useEffect(()=>n._removeUnmounted()),l}function NE(e){const t=tu(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=T0(s._names.array,n),a=EE({control:s,name:n,defaultValue:V(s._formValues,n,V(s._defaultValues,n,e.defaultValue)),exact:!0}),l=SE({control:s,name:n,exact:!0}),u=A.useRef(s.register(n,{...e.rules,value:a,...Lt(e.disabled)?{disabled:e.disabled}:{}}));return A.useEffect(()=>{const c=s._options.shouldUnregister||o,f=(d,x)=>{const w=V(s._fields,d);w&&w._f&&(w._f.mount=x)};if(f(n,!0),c){const d=vt(V(s._options.defaultValues,n));ye(s._defaultValues,n,d),Fe(V(s._formValues,n))&&ye(s._formValues,n,d)}return()=>{(i?c&&!s._state.action:c)?s.unregister(n):f(n,!1)}},[n,s,i,o]),A.useEffect(()=>{V(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:V(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Lt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:A.useCallback(c=>u.current.onChange({target:{value:N0(c),name:n},type:il.CHANGE}),[n]),onBlur:A.useCallback(()=>u.current.onBlur({target:{value:V(s._formValues,n),name:n},type:il.BLUR}),[n,s]),ref:A.useCallback(c=>{const f=V(s._fields,n);f&&c&&(f._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:d=>c.setCustomValidity(d),reportValidity:()=>c.reportValidity()})},[s._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!V(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!V(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!V(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!V(l.validatingFields,n)},error:{enumerable:!0,get:()=>V(l.errors,n)}})}}const TE=e=>e.render(NE(e));var I0=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Oh=e=>({isOnSubmit:!e||e===Xt.onSubmit,isOnBlur:e===Xt.onBlur,isOnChange:e===Xt.onChange,isOnAll:e===Xt.all,isOnTouch:e===Xt.onTouched}),Mh=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Go=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=V(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(Go(a,t))break}else if($e(a)&&Go(a,t))break}}};var PE=(e,t,n)=>{const r=Qo(V(e,n));return ye(r,"root",t[n]),ye(e,n,r),e},Df=e=>e.type==="file",Mn=e=>typeof e=="function",al=e=>{if(!Mf)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ea=e=>gn(e),Ff=e=>e.type==="radio",ll=e=>e instanceof RegExp;const Ih={value:!1,isValid:!1},Lh={value:!0,isValid:!0};var L0=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&&!Fe(e[0].attributes.value)?Fe(e[0].value)||e[0].value===""?Lh:{value:e[0].value,isValid:!0}:Lh:Ih}return Ih};const Dh={isValid:!1,value:null};var D0=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Dh):Dh;function Fh(e,t,n="validate"){if(Ea(e)||Array.isArray(e)&&e.every(Ea)||Lt(e)&&!e)return{type:n,message:Ea(e)?e:"",ref:t}}var as=e=>$e(e)&&!ll(e)?e:{value:e,message:""},zh=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:u,min:c,max:f,pattern:d,validate:x,name:w,valueAsNumber:y,mount:_,disabled:m}=e._f,h=V(t,w);if(!_||m)return{};const g=i?i[0]:o,b=O=>{r&&g.reportValidity&&(g.setCustomValidity(Lt(O)?"":O||""),g.reportValidity())},C={},E=Ff(o),T=Mi(o),R=E||T,M=(y||Df(o))&&Fe(o.value)&&Fe(h)||al(o)&&o.value===""||h===""||Array.isArray(h)&&!h.length,D=I0.bind(null,w,n,C),X=(O,H,z,J=Nn.maxLength,q=Nn.minLength)=>{const ne=O?H:z;C[w]={type:O?J:q,message:ne,ref:o,...D(O?J:q,ne)}};if(s?!Array.isArray(h)||!h.length:a&&(!R&&(M||ut(h))||Lt(h)&&!h||T&&!L0(i).isValid||E&&!D0(i).isValid)){const{value:O,message:H}=Ea(a)?{value:!!a,message:a}:as(a);if(O&&(C[w]={type:Nn.required,message:H,ref:g,...D(Nn.required,H)},!n))return b(H),C}if(!M&&(!ut(c)||!ut(f))){let O,H;const z=as(f),J=as(c);if(!ut(h)&&!isNaN(h)){const q=o.valueAsNumber||h&&+h;ut(z.value)||(O=q>z.value),ut(J.value)||(H=qnew Date(new Date().toDateString()+" "+G),N=o.type=="time",$=o.type=="week";gn(z.value)&&h&&(O=N?ne(h)>ne(z.value):$?h>z.value:q>new Date(z.value)),gn(J.value)&&h&&(H=N?ne(h)+O.value,J=!ut(H.value)&&h.length<+H.value;if((z||J)&&(X(z,O.message,H.message),!n))return b(C[w].message),C}if(d&&!M&&gn(h)){const{value:O,message:H}=as(d);if(ll(O)&&!h.match(O)&&(C[w]={type:Nn.pattern,message:H,ref:o,...D(Nn.pattern,H)},!n))return b(H),C}if(x){if(Mn(x)){const O=await x(h,t),H=Fh(O,g);if(H&&(C[w]={...H,...D(Nn.validate,H.message)},!n))return b(H.message),C}else if($e(x)){let O={};for(const H in x){if(!gt(O)&&!n)break;const z=Fh(await x[H](h,t),g,H);z&&(O={...z,...D(H,z.message)},b(z.message),n&&(C[w]=O))}if(!gt(O)&&(C[w]={ref:g,...O},!n))return C}}return b(!0),C};function RE(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},td=e=>ut(e)||!E0(e);function ir(e,t){if(td(e)||td(t))return e===t;if(zr(e)&&zr(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(zr(o)&&zr(i)||$e(o)&&$e(i)||Array.isArray(o)&&Array.isArray(i)?!ir(o,i):o!==i)return!1}}return!0}var F0=e=>e.type==="select-multiple",AE=e=>Ff(e)||Mi(e),Vu=e=>al(e)&&e.isConnected,z0=e=>{for(const t in e)if(Mn(e[t]))return!0;return!1};function ul(e,t={}){const n=Array.isArray(e);if($e(e)||n)for(const r in e)Array.isArray(e[r])||$e(e[r])&&!z0(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ul(e[r],t[r])):ut(e[r])||(t[r]=!0);return t}function $0(e,t,n){const r=Array.isArray(e);if($e(e)||r)for(const s in e)Array.isArray(e[s])||$e(e[s])&&!z0(e[s])?Fe(t)||td(n[s])?n[s]=Array.isArray(e[s])?ul(e[s],[]):{...ul(e[s])}:$0(e[s],ut(t)?{}:t[s],n[s]):n[s]=!ir(e[s],t[s]);return n}var No=(e,t)=>$0(e,t,ul(t)),V0=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Fe(e)?e:t?e===""?NaN:e&&+e:n&&gn(e)?new Date(e):r?r(e):e;function Uu(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Df(t)?t.files:Ff(t)?D0(e.refs).value:F0(t)?[...t.selectedOptions].map(({value:n})=>n):Mi(t)?L0(e.refs).value:V0(Fe(t.value)?e.ref.value:t.value,e)}var OE=(e,t,n,r)=>{const s={};for(const o of e){const i=V(t,o);i&&ye(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},To=e=>Fe(e)?e:ll(e)?e.source:$e(e)?ll(e.value)?e.value.source:e.value:e;const $h="AsyncFunction";var ME=e=>(!e||!e.validate)&&!!(Mn(e.validate)&&e.validate.constructor.name===$h||$e(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===$h)),IE=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Vh(e,t,n){const r=V(e,n);if(r||If(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=V(t,o),a=V(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var LE=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,DE=(e,t)=>!eu(V(e,t)).length&&Ue(e,t);const FE={mode:Xt.onSubmit,reValidateMode:Xt.onChange,shouldFocusError:!0};function zE(e={}){let t={...FE,...e},n={submitCount:0,isDirty:!1,isLoading:Mn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=$e(t.defaultValues)||$e(t.values)?vt(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:vt(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:$u(),array:$u(),state:$u()},d=Oh(t.mode),x=Oh(t.reValidateMode),w=t.criteriaMode===Xt.all,y=k=>S=>{clearTimeout(u),u=setTimeout(k,S)},_=async k=>{if(!e.disabled&&(c.isValid||k)){const S=t.resolver?gt((await R()).errors):await D(r,!0);S!==n.isValid&&f.state.next({isValid:S})}},m=(k,S)=>{!e.disabled&&(c.isValidating||c.validatingFields)&&((k||Array.from(a.mount)).forEach(P=>{P&&(S?ye(n.validatingFields,P,S):Ue(n.validatingFields,P))}),f.state.next({validatingFields:n.validatingFields,isValidating:!gt(n.validatingFields)}))},h=(k,S=[],P,W,U=!0,F=!0)=>{if(W&&P&&!e.disabled){if(i.action=!0,F&&Array.isArray(V(r,k))){const te=P(V(r,k),W.argA,W.argB);U&&ye(r,k,te)}if(F&&Array.isArray(V(n.errors,k))){const te=P(V(n.errors,k),W.argA,W.argB);U&&ye(n.errors,k,te),DE(n.errors,k)}if(c.touchedFields&&F&&Array.isArray(V(n.touchedFields,k))){const te=P(V(n.touchedFields,k),W.argA,W.argB);U&&ye(n.touchedFields,k,te)}c.dirtyFields&&(n.dirtyFields=No(s,o)),f.state.next({name:k,isDirty:O(k,S),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ye(o,k,S)},g=(k,S)=>{ye(n.errors,k,S),f.state.next({errors:n.errors})},b=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,S,P,W)=>{const U=V(r,k);if(U){const F=V(o,k,Fe(P)?V(s,k):P);Fe(F)||W&&W.defaultChecked||S?ye(o,k,S?F:Uu(U._f)):J(k,F),i.mount&&_()}},E=(k,S,P,W,U)=>{let F=!1,te=!1;const ie={name:k};if(!e.disabled){const Me=!!(V(r,k)&&V(r,k)._f&&V(r,k)._f.disabled);if(!P||W){c.isDirty&&(te=n.isDirty,n.isDirty=ie.isDirty=O(),F=te!==ie.isDirty);const Se=Me||ir(V(s,k),S);te=!!(!Me&&V(n.dirtyFields,k)),Se||Me?Ue(n.dirtyFields,k):ye(n.dirtyFields,k,!0),ie.dirtyFields=n.dirtyFields,F=F||c.dirtyFields&&te!==!Se}if(P){const Se=V(n.touchedFields,k);Se||(ye(n.touchedFields,k,P),ie.touchedFields=n.touchedFields,F=F||c.touchedFields&&Se!==P)}F&&U&&f.state.next(ie)}return F?ie:{}},T=(k,S,P,W)=>{const U=V(n.errors,k),F=c.isValid&&Lt(S)&&n.isValid!==S;if(e.delayError&&P?(l=y(()=>g(k,P)),l(e.delayError)):(clearTimeout(u),l=null,P?ye(n.errors,k,P):Ue(n.errors,k)),(P?!ir(U,P):U)||!gt(W)||F){const te={...W,...F&&Lt(S)?{isValid:S}:{},errors:n.errors,name:k};n={...n,...te},f.state.next(te)}},R=async k=>{m(k,!0);const S=await t.resolver(o,t.context,OE(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return m(k),S},M=async k=>{const{errors:S}=await R(k);if(k)for(const P of k){const W=V(S,P);W?ye(n.errors,P,W):Ue(n.errors,P)}else n.errors=S;return S},D=async(k,S,P={valid:!0})=>{for(const W in k){const U=k[W];if(U){const{_f:F,...te}=U;if(F){const ie=a.array.has(F.name),Me=U._f&&ME(U._f);Me&&c.validatingFields&&m([W],!0);const Se=await zh(U,o,w,t.shouldUseNativeValidation&&!S,ie);if(Me&&c.validatingFields&&m([W]),Se[F.name]&&(P.valid=!1,S))break;!S&&(V(Se,F.name)?ie?PE(n.errors,Se,F.name):ye(n.errors,F.name,Se[F.name]):Ue(n.errors,F.name))}!gt(te)&&await D(te,S,P)}}return P.valid},X=()=>{for(const k of a.unMount){const S=V(r,k);S&&(S._f.refs?S._f.refs.every(P=>!Vu(P)):!Vu(S._f.ref))&&he(k)}a.unMount=new Set},O=(k,S)=>!e.disabled&&(k&&S&&ye(o,k,S),!ir(Z(),s)),H=(k,S,P)=>M0(k,a,{...i.mount?o:Fe(S)?s:gn(k)?{[k]:S}:S},P,S),z=k=>eu(V(i.mount?o:s,k,e.shouldUnregister?V(s,k,[]):[])),J=(k,S,P={})=>{const W=V(r,k);let U=S;if(W){const F=W._f;F&&(!F.disabled&&ye(o,k,V0(S,F)),U=al(F.ref)&&ut(S)?"":S,F0(F.ref)?[...F.ref.options].forEach(te=>te.selected=U.includes(te.value)):F.refs?Mi(F.ref)?F.refs.length>1?F.refs.forEach(te=>(!te.defaultChecked||!te.disabled)&&(te.checked=Array.isArray(U)?!!U.find(ie=>ie===te.value):U===te.value)):F.refs[0]&&(F.refs[0].checked=!!U):F.refs.forEach(te=>te.checked=te.value===U):Df(F.ref)?F.ref.value="":(F.ref.value=U,F.ref.type||f.values.next({name:k,values:{...o}})))}(P.shouldDirty||P.shouldTouch)&&E(k,U,P.shouldTouch,P.shouldDirty,!0),P.shouldValidate&&G(k)},q=(k,S,P)=>{for(const W in S){const U=S[W],F=`${k}.${W}`,te=V(r,F);(a.array.has(k)||$e(U)||te&&!te._f)&&!zr(U)?q(F,U,P):J(F,U,P)}},ne=(k,S,P={})=>{const W=V(r,k),U=a.array.has(k),F=vt(S);ye(o,k,F),U?(f.array.next({name:k,values:{...o}}),(c.isDirty||c.dirtyFields)&&P.shouldDirty&&f.state.next({name:k,dirtyFields:No(s,o),isDirty:O(k,F)})):W&&!W._f&&!ut(F)?q(k,F,P):J(k,F,P),Mh(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},N=async k=>{i.mount=!0;const S=k.target;let P=S.name,W=!0;const U=V(r,P),F=()=>S.type?Uu(U._f):N0(k),te=ie=>{W=Number.isNaN(ie)||zr(ie)&&isNaN(ie.getTime())||ir(ie,V(o,P,ie))};if(U){let ie,Me;const Se=F(),ln=k.type===il.BLUR||k.type===il.FOCUS_OUT,Gn=!IE(U._f)&&!t.resolver&&!V(n.errors,P)&&!U._f.deps||LE(ln,V(n.touchedFields,P),n.isSubmitted,x,d),ss=Mh(P,a,ln);ye(o,P,Se),ln?(U._f.onBlur&&U._f.onBlur(k),l&&l(0)):U._f.onChange&&U._f.onChange(k);const mo=E(P,Se,ln,!1),Li=!gt(mo)||ss;if(!ln&&f.values.next({name:P,type:k.type,values:{...o}}),Gn)return c.isValid&&(e.mode==="onBlur"?ln&&_():_()),Li&&f.state.next({name:P,...ss?{}:mo});if(!ln&&ss&&f.state.next({...n}),t.resolver){const{errors:vo}=await R([P]);if(te(Se),W){const su=Vh(n.errors,r,P),os=Vh(vo,r,su.name||P);ie=os.error,P=os.name,Me=gt(vo)}}else m([P],!0),ie=(await zh(U,o,w,t.shouldUseNativeValidation))[P],m([P]),te(Se),W&&(ie?Me=!1:c.isValid&&(Me=await D(r,!0)));W&&(U._f.deps&&G(U._f.deps),T(P,Me,ie,mo))}},$=(k,S)=>{if(V(n.errors,S)&&k.focus)return k.focus(),1},G=async(k,S={})=>{let P,W;const U=Qo(k);if(t.resolver){const F=await M(Fe(k)?k:U);P=gt(F),W=k?!U.some(te=>V(F,te)):P}else k?(W=(await Promise.all(U.map(async F=>{const te=V(r,F);return await D(te&&te._f?{[F]:te}:te)}))).every(Boolean),!(!W&&!n.isValid)&&_()):W=P=await D(r);return f.state.next({...!gn(k)||c.isValid&&P!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:P}:{},errors:n.errors}),S.shouldFocus&&!W&&Go(r,$,k?U:a.mount),W},Z=k=>{const S={...i.mount?o:s};return Fe(k)?S:gn(k)?V(S,k):k.map(P=>V(S,P))},ee=(k,S)=>({invalid:!!V((S||n).errors,k),isDirty:!!V((S||n).dirtyFields,k),error:V((S||n).errors,k),isValidating:!!V(n.validatingFields,k),isTouched:!!V((S||n).touchedFields,k)}),ce=k=>{k&&Qo(k).forEach(S=>Ue(n.errors,S)),f.state.next({errors:k?n.errors:{}})},_e=(k,S,P)=>{const W=(V(r,k,{_f:{}})._f||{}).ref,U=V(n.errors,k)||{},{ref:F,message:te,type:ie,...Me}=U;ye(n.errors,k,{...Me,...S,ref:W}),f.state.next({name:k,errors:n.errors,isValid:!1}),P&&P.shouldFocus&&W&&W.focus&&W.focus()},it=(k,S)=>Mn(k)?f.values.subscribe({next:P=>k(H(void 0,S),P)}):H(k,S,!0),he=(k,S={})=>{for(const P of k?Qo(k):a.mount)a.mount.delete(P),a.array.delete(P),S.keepValue||(Ue(r,P),Ue(o,P)),!S.keepError&&Ue(n.errors,P),!S.keepDirty&&Ue(n.dirtyFields,P),!S.keepTouched&&Ue(n.touchedFields,P),!S.keepIsValidating&&Ue(n.validatingFields,P),!t.shouldUnregister&&!S.keepDefaultValue&&Ue(s,P);f.values.next({values:{...o}}),f.state.next({...n,...S.keepDirty?{isDirty:O()}:{}}),!S.keepIsValid&&_()},mt=({disabled:k,name:S,field:P,fields:W,value:U})=>{if(Lt(k)&&i.mount||k){const F=k?void 0:Fe(U)?Uu(P?P._f:V(W,S)._f):U;ye(o,S,F),E(S,F,!1,!1,!0)}},Mt=(k,S={})=>{let P=V(r,k);const W=Lt(S.disabled)||Lt(e.disabled);return ye(r,k,{...P||{},_f:{...P&&P._f?P._f:{ref:{name:k}},name:k,mount:!0,...S}}),a.mount.add(k),P?mt({field:P,disabled:Lt(S.disabled)?S.disabled:e.disabled,name:k,value:S.value}):C(k,!0,S.value),{...W?{disabled:S.disabled||e.disabled}:{},...t.progressive?{required:!!S.required,min:To(S.min),max:To(S.max),minLength:To(S.minLength),maxLength:To(S.maxLength),pattern:To(S.pattern)}:{},name:k,onChange:N,onBlur:N,ref:U=>{if(U){Mt(k,S),P=V(r,k);const F=Fe(U.value)&&U.querySelectorAll&&U.querySelectorAll("input,select,textarea")[0]||U,te=AE(F),ie=P._f.refs||[];if(te?ie.find(Me=>Me===F):F===P._f.ref)return;ye(r,k,{_f:{...P._f,...te?{refs:[...ie.filter(Vu),F,...Array.isArray(V(s,k))?[{}]:[]],ref:{type:F.type,name:k}}:{ref:F}}}),C(k,!1,void 0,F)}else P=V(r,k,{}),P._f&&(P._f.mount=!1),(t.shouldUnregister||S.shouldUnregister)&&!(T0(a.array,k)&&i.action)&&a.unMount.add(k)}}},Ht=()=>t.shouldFocusError&&Go(r,$,a.mount),on=k=>{Lt(k)&&(f.state.next({disabled:k}),Go(r,(S,P)=>{const W=V(r,P);W&&(S.disabled=W._f.disabled||k,Array.isArray(W._f.refs)&&W._f.refs.forEach(U=>{U.disabled=W._f.disabled||k}))},0,!1))},Or=(k,S)=>async P=>{let W;P&&(P.preventDefault&&P.preventDefault(),P.persist&&P.persist());let U=vt(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:F,values:te}=await R();n.errors=F,U=te}else await D(r);if(Ue(n.errors,"root"),gt(n.errors)){f.state.next({errors:{}});try{await k(U,P)}catch(F){W=F}}else S&&await S({...n.errors},P),Ht(),setTimeout(Ht);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:gt(n.errors)&&!W,submitCount:n.submitCount+1,errors:n.errors}),W)throw W},Kn=(k,S={})=>{V(r,k)&&(Fe(S.defaultValue)?ne(k,vt(V(s,k))):(ne(k,S.defaultValue),ye(s,k,vt(S.defaultValue))),S.keepTouched||Ue(n.touchedFields,k),S.keepDirty||(Ue(n.dirtyFields,k),n.isDirty=S.defaultValue?O(k,vt(V(s,k))):O()),S.keepError||(Ue(n.errors,k),c.isValid&&_()),f.state.next({...n}))},an=(k,S={})=>{const P=k?vt(k):s,W=vt(P),U=gt(k),F=U?s:W;if(S.keepDefaultValues||(s=P),!S.keepValues){if(S.keepDirtyValues){const te=new Set([...a.mount,...Object.keys(No(s,o))]);for(const ie of Array.from(te))V(n.dirtyFields,ie)?ye(F,ie,V(o,ie)):ne(ie,V(F,ie))}else{if(Mf&&Fe(k))for(const te of a.mount){const ie=V(r,te);if(ie&&ie._f){const Me=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(al(Me)){const Se=Me.closest("form");if(Se){Se.reset();break}}}}r={}}o=e.shouldUnregister?S.keepDefaultValues?vt(s):{}:vt(F),f.array.next({values:{...F}}),f.values.next({values:{...F}})}a={mount:S.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!c.isValid||!!S.keepIsValid||!!S.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:S.keepSubmitCount?n.submitCount:0,isDirty:U?!1:S.keepDirty?n.isDirty:!!(S.keepDefaultValues&&!ir(k,s)),isSubmitted:S.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:U?{}:S.keepDirtyValues?S.keepDefaultValues&&o?No(s,o):n.dirtyFields:S.keepDefaultValues&&k?No(s,k):S.keepDirty?n.dirtyFields:{},touchedFields:S.keepTouched?n.touchedFields:{},errors:S.keepErrors?n.errors:{},isSubmitSuccessful:S.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Qn=(k,S)=>an(Mn(k)?k(o):k,S);return{control:{register:Mt,unregister:he,getFieldState:ee,handleSubmit:Or,setError:_e,_executeSchema:R,_getWatch:H,_getDirty:O,_updateValid:_,_removeUnmounted:X,_updateFieldArray:h,_updateDisabledField:mt,_getFieldArray:z,_reset:an,_resetDefaultValues:()=>Mn(t.defaultValues)&&t.defaultValues().then(k=>{Qn(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:on,_subjects:f,_proxyFormState:c,_setErrors:b,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:G,register:Mt,handleSubmit:Or,watch:it,setValue:ne,getValues:Z,reset:Qn,resetField:Kn,clearErrors:ce,unregister:he,setError:_e,setFocus:(k,S={})=>{const P=V(r,k),W=P&&P._f;if(W){const U=W.refs?W.refs[0]:W.ref;U.focus&&(U.focus(),S.shouldSelect&&U.select())}},getFieldState:ee}}function U0(e={}){const t=A.useRef(),n=A.useRef(),[r,s]=A.useState({isDirty:!1,isValidating:!1,isLoading:Mn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Mn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...zE(e),formState:r});const o=t.current.control;return o._options=e,Lf({subject:o._subjects.state,next:i=>{A0(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),A.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),A.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),A.useEffect(()=>{e.values&&!ir(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),A.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),A.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),A.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),A.useEffect(()=>{t.current&&(t.current.watch=t.current.watch.bind({}))},[r]),t.current.formState=j0(r,o),t.current}const Uh=(e,t,n)=>{if(e&&"reportValidity"in e){const r=V(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},B0=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Uh(r.ref,n,e):r.refs&&r.refs.forEach(s=>Uh(s,n,e))}},$E=(e,t)=>{t.shouldUseNativeValidation&&B0(e,t);const n={};for(const r in e){const s=V(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(VE(t.names||Object.keys(e),r)){const i=Object.assign({},V(n,r));ye(i,"root",o),ye(n,r,i)}else ye(n,r,o)}return n},VE=(e,t)=>e.some(n=>n.startsWith(t+"."));var UE=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var l=n[i].types,u=l&&l[r.code];n[i]=I0(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},W0=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&B0({},o),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:$E(UE(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},me;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(me||(me={}));var Bh;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Bh||(Bh={}));const K=me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rr=e=>{switch(typeof e){case"undefined":return K.undefined;case"string":return K.string;case"number":return isNaN(e)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(e)?K.array:e===null?K.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?K.promise:typeof Map<"u"&&e instanceof Map?K.map:typeof Set<"u"&&e instanceof Set?K.set:typeof Date<"u"&&e instanceof Date?K.date:K.object;default:return K.unknown}},I=me.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 Vt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};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(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;ln.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Vt.create=e=>new Vt(e);const _i=(e,t)=>{let n;switch(e.code){case I.invalid_type:e.received===K.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,me.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:n=`Unrecognized key(s) in object: ${me.joinValues(e.keys,", ")}`;break;case I.invalid_union:n="Invalid input";break;case I.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${me.joinValues(e.options)}`;break;case I.invalid_enum_value:n=`Invalid enum value. Expected ${me.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:n="Invalid function arguments";break;case I.invalid_return_type:n="Invalid function return type";break;case I.invalid_date:n="Invalid date";break;case I.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}"`:me.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case I.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==="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 I.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 I.custom:n="Invalid input";break;case I.invalid_intersection_types:n="Intersection results could not be merged";break;case I.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:n="Number must be finite";break;default:n=t.defaultError,me.assertNever(e)}return{message:n}};let BE=_i;function nd(){return BE}const rd=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}};function B(e,t){const n=nd(),r=rd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===_i?void 0:_i].filter(s=>!!s)});e.common.issues.push(r)}class ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return se;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return ft.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return se;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const se=Object.freeze({status:"aborted"}),Oo=e=>({status:"dirty",value:e}),Ct=e=>({status:"valid",value:e}),Wh=e=>e.status==="aborted",Hh=e=>e.status==="dirty",eo=e=>e.status==="valid",cl=e=>typeof Promise<"u"&&e instanceof Promise;function dl(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function H0(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Y;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Y||(Y={}));var Mo,Io;class Cn{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Zh=(e,t)=>{if(eo(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 Vt(e.common.issues);return this._error=n,this._error}}};function oe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var l,u;const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class de{get description(){return this._def.description}_getType(t){return rr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ft,ctx:{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(cl(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 r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Zh(s,o)}"~validate"(t){var n,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:s});return eo(o)?{value:o.value}:{issues:s.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(o=>eo(o)?{value:o.value}:{issues:s.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(cl(s)?s:Promise.resolve(s));return Zh(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:I.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Hn({schema:this,typeName:re.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 Dn.create(this,this._def)}nullable(){return es.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _n.create(this)}promise(){return Ci.create(this,this._def)}or(t){return hl.create([this,t],this._def)}and(t){return ml.create(this,t,this._def)}transform(t){return new Hn({...oe(this._def),schema:this,typeName:re.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new wl({...oe(this._def),innerType:this,defaultValue:n,typeName:re.ZodDefault})}brand(){return new G0({typeName:re.ZodBranded,type:this,...oe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _l({...oe(this._def),innerType:this,catchValue:n,typeName:re.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return nu.create(this,t)}readonly(){return bl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const WE=/^c[^\s-]{8,}$/i,HE=/^[0-9a-z]+$/,ZE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,KE=/^[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,QE=/^[a-z0-9_-]{21}$/i,GE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,YE=/^[-+]?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)?)??$/,qE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,XE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Bu;const JE=/^(?:(?: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])$/,eN=/^(?:(?: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])$/,tN=/^(([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]))$/,nN=/^(([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])$/,rN=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sN=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Z0="((\\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])))",oN=new RegExp(`^${Z0}$`);function K0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function iN(e){return new RegExp(`^${K0(e)}$`)}function aN(e){let t=`${Z0}T${K0(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 lN(e,t){return!!((t==="v4"||!t)&&JE.test(e)||(t==="v6"||!t)&&tN.test(e))}function uN(e,t){if(!GE.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||t&&s.alg!==t)}catch{return!1}}function cN(e,t){return!!((t==="v4"||!t)&&eN.test(e)||(t==="v6"||!t)&&nN.test(e))}class In extends de{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==K.string){const o=this._getOrReturnCtx(t);return B(o,{code:I.invalid_type,expected:K.string,received:o.parsedType}),se}const r=new ft;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(s=this._getOrReturnCtx(t,s),B(s,{code:I.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.lengtht.test(s),{validation:n,code:I.invalid_string,...Y.errToObj(r)})}_addCheck(t){return new In({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Y.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Y.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Y.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Y.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Y.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Y.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Y.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Y.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Y.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Y.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Y.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Y.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Y.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Y.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Y.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Y.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Y.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Y.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Y.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Y.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Y.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Y.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Y.errToObj(n)})}nonempty(t){return this.min(1,Y.errToObj(t))}trim(){return new In({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new In({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new In({...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{var t;return new In({checks:[],typeName:re.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...oe(e)})};function dN(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class to extends de{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)!==K.number){const o=this._getOrReturnCtx(t);return B(o,{code:I.invalid_type,expected:K.number,received:o.parsedType}),se}let r;const s=new ft;for(const o of this._def.checks)o.kind==="int"?me.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),B(r,{code:I.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),B(r,{code:I.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?dN(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),B(r,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),B(r,{code:I.not_finite,message:o.message}),s.dirty()):me.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Y.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Y.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Y.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Y.toString(n))}setLimit(t,n,r,s){return new to({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y.toString(s)}]})}_addCheck(t){return new to({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Y.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Y.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Y.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Y.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Y.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Y.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Y.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Y.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Y.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.valuet.kind==="int"||t.kind==="multipleOf"&&me.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew to({checks:[],typeName:re.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...oe(e)});class no extends de{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)!==K.bigint)return this._getInvalidInput(t);let r;const s=new ft;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),B(r,{code:I.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),B(r,{code:I.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):me.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:K.bigint,received:n.parsedType}),se}gte(t,n){return this.setLimit("min",t,!0,Y.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Y.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Y.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Y.toString(n))}setLimit(t,n,r,s){return new no({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y.toString(s)}]})}_addCheck(t){return new no({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Y.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Y.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Y.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Y.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Y.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{var t;return new no({checks:[],typeName:re.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...oe(e)})};class sd extends de{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==K.boolean){const r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:K.boolean,received:r.parsedType}),se}return Ct(t.data)}}sd.create=e=>new sd({typeName:re.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...oe(e)});class bi extends de{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==K.date){const o=this._getOrReturnCtx(t);return B(o,{code:I.invalid_type,expected:K.date,received:o.parsedType}),se}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return B(o,{code:I.invalid_date}),se}const r=new ft;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(s=this._getOrReturnCtx(t,s),B(s,{code:I.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):me.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new bi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Y.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Y.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.valuenew bi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:re.ZodDate,...oe(e)});class od extends de{_parse(t){if(this._getType(t)!==K.symbol){const r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:K.symbol,received:r.parsedType}),se}return Ct(t.data)}}od.create=e=>new od({typeName:re.ZodSymbol,...oe(e)});class fl extends de{_parse(t){if(this._getType(t)!==K.undefined){const r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:K.undefined,received:r.parsedType}),se}return Ct(t.data)}}fl.create=e=>new fl({typeName:re.ZodUndefined,...oe(e)});class pl extends de{_parse(t){if(this._getType(t)!==K.null){const r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:K.null,received:r.parsedType}),se}return Ct(t.data)}}pl.create=e=>new pl({typeName:re.ZodNull,...oe(e)});class id extends de{constructor(){super(...arguments),this._any=!0}_parse(t){return Ct(t.data)}}id.create=e=>new id({typeName:re.ZodAny,...oe(e)});class Os extends de{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ct(t.data)}}Os.create=e=>new Os({typeName:re.ZodUnknown,...oe(e)});class Pr extends de{_parse(t){const n=this._getOrReturnCtx(t);return B(n,{code:I.invalid_type,expected:K.never,received:n.parsedType}),se}}Pr.create=e=>new Pr({typeName:re.ZodNever,...oe(e)});class ad extends de{_parse(t){if(this._getType(t)!==K.undefined){const r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:K.void,received:r.parsedType}),se}return Ct(t.data)}}ad.create=e=>new ad({typeName:re.ZodVoid,...oe(e)});class _n extends de{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==K.array)return B(n,{code:I.invalid_type,expected:K.array,received:n.parsedType}),se;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(B(n,{code:I.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>ft.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new Cn(n,i,n.path,a)));return ft.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new _n({...this._def,minLength:{value:t,message:Y.toString(n)}})}max(t,n){return new _n({...this._def,maxLength:{value:t,message:Y.toString(n)}})}length(t,n){return new _n({...this._def,exactLength:{value:t,message:Y.toString(n)}})}nonempty(t){return this.min(1,t)}}_n.create=(e,t)=>new _n({type:e,minLength:null,maxLength:null,exactLength:null,typeName:re.ZodArray,...oe(t)});function ls(e){if(e instanceof Le){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Dn.create(ls(r))}return new Le({...e._def,shape:()=>t})}else return e instanceof _n?new _n({...e._def,type:ls(e.element)}):e instanceof Dn?Dn.create(ls(e.unwrap())):e instanceof es?es.create(ls(e.unwrap())):e instanceof Wn?Wn.create(e.items.map(t=>ls(t))):e}class Le extends de{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=me.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==K.object){const u=this._getOrReturnCtx(t);return B(u,{code:I.invalid_type,expected:K.object,received:u.parsedType}),se}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Pr&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const c=o[u],f=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cn(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Pr){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:s.data[c]}});else if(u==="strict")a.length>0&&(B(s,{code:I.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const f=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(s,f,s.path,c)),alwaysSet:c in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key,d=await c.value;u.push({key:f,value:d,alwaysSet:c.alwaysSet})}return u}).then(u=>ft.mergeObjectSync(r,u)):ft.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Y.errToObj,new Le({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Y.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Le({...this._def,unknownKeys:"strip"})}passthrough(){return new Le({...this._def,unknownKeys:"passthrough"})}extend(t){return new Le({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Le({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:re.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Le({...this._def,catchall:t})}pick(t){const n={};return me.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Le({...this._def,shape:()=>n})}omit(t){const n={};return me.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Le({...this._def,shape:()=>n})}deepPartial(){return ls(this)}partial(t){const n={};return me.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Le({...this._def,shape:()=>n})}required(t){const n={};return me.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Dn;)o=o._def.innerType;n[r]=o}}),new Le({...this._def,shape:()=>n})}keyof(){return Q0(me.objectKeys(this.shape))}}Le.create=(e,t)=>new Le({shape:()=>e,unknownKeys:"strip",catchall:Pr.create(),typeName:re.ZodObject,...oe(t)});Le.strictCreate=(e,t)=>new Le({shape:()=>e,unknownKeys:"strict",catchall:Pr.create(),typeName:re.ZodObject,...oe(t)});Le.lazycreate=(e,t)=>new Le({shape:e,unknownKeys:"strip",catchall:Pr.create(),typeName:re.ZodObject,...oe(t)});class hl extends de{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Vt(a.ctx.common.issues));return B(n,{code:I.invalid_union,unionErrors:i}),se}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Vt(l));return B(n,{code:I.invalid_union,unionErrors:a}),se}}get options(){return this._def.options}}hl.create=(e,t)=>new hl({options:e,typeName:re.ZodUnion,...oe(t)});const Pn=e=>e instanceof gl?Pn(e.schema):e instanceof Hn?Pn(e.innerType()):e instanceof yl?[e.value]:e instanceof Jr?e.options:e instanceof xl?me.objectValues(e.enum):e instanceof wl?Pn(e._def.innerType):e instanceof fl?[void 0]:e instanceof pl?[null]:e instanceof Dn?[void 0,...Pn(e.unwrap())]:e instanceof es?[null,...Pn(e.unwrap())]:e instanceof G0||e instanceof bl?Pn(e.unwrap()):e instanceof _l?Pn(e._def.innerType):[];class zf extends de{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==K.object)return B(n,{code:I.invalid_type,expected:K.object,received:n.parsedType}),se;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(B(n,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=Pn(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new zf({typeName:re.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...oe(r)})}}function ld(e,t){const n=rr(e),r=rr(t);if(e===t)return{valid:!0,data:e};if(n===K.object&&r===K.object){const s=me.objectKeys(t),o=me.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=ld(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===K.array&&r===K.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{if(Wh(o)||Wh(i))return se;const a=ld(o.value,i.value);return a.valid?((Hh(o)||Hh(i))&&n.dirty(),{status:n.value,value:a.data}):(B(r,{code:I.invalid_intersection_types}),se)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ml.create=(e,t,n)=>new ml({left:e,right:t,typeName:re.ZodIntersection,...oe(n)});class Wn extends de{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==K.array)return B(r,{code:I.invalid_type,expected:K.array,received:r.parsedType}),se;if(r.data.lengththis._def.items.length&&(B(r,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>ft.mergeArray(n,i)):ft.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Wn({...this._def,rest:t})}}Wn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Wn({items:e,typeName:re.ZodTuple,rest:null,...oe(t)})};class vl extends de{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==K.object)return B(r,{code:I.invalid_type,expected:K.object,received:r.parsedType}),se;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ft.mergeObjectAsync(n,s):ft.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof de?new vl({keyType:t,valueType:n,typeName:re.ZodRecord,...oe(r)}):new vl({keyType:In.create(),valueType:t,typeName:re.ZodRecord,...oe(n)})}}class ud extends de{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==K.map)return B(r,{code:I.invalid_type,expected:K.map,received:r.parsedType}),se;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new Cn(r,a,r.path,[u,"key"])),value:o._parse(new Cn(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return se;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return se;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}ud.create=(e,t,n)=>new ud({valueType:t,keyType:e,typeName:re.ZodMap,...oe(n)});class ro extends de{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==K.set)return B(r,{code:I.invalid_type,expected:K.set,received:r.parsedType}),se;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(B(r,{code:I.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(l){const u=new Set;for(const c of l){if(c.status==="aborted")return se;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>o._parse(new Cn(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new ro({...this._def,minSize:{value:t,message:Y.toString(n)}})}max(t,n){return new ro({...this._def,maxSize:{value:t,message:Y.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ro.create=(e,t)=>new ro({valueType:e,minSize:null,maxSize:null,typeName:re.ZodSet,...oe(t)});class Yo extends de{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==K.function)return B(n,{code:I.invalid_type,expected:K.function,received:n.parsedType}),se;function r(a,l){return rd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nd(),_i].filter(u=>!!u),issueData:{code:I.invalid_arguments,argumentsError:l}})}function s(a,l){return rd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nd(),_i].filter(u=>!!u),issueData:{code:I.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ci){const a=this;return Ct(async function(...l){const u=new Vt([]),c=await a._def.args.parseAsync(l,o).catch(x=>{throw u.addIssue(r(l,x)),u}),f=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(f,o).catch(x=>{throw u.addIssue(s(f,x)),u})})}else{const a=this;return Ct(function(...l){const u=a._def.args.safeParse(l,o);if(!u.success)throw new Vt([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(c,o);if(!f.success)throw new Vt([s(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Yo({...this._def,args:Wn.create(t).rest(Os.create())})}returns(t){return new Yo({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Yo({args:t||Wn.create([]).rest(Os.create()),returns:n||Os.create(),typeName:re.ZodFunction,...oe(r)})}}class gl extends de{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})}}gl.create=(e,t)=>new gl({getter:e,typeName:re.ZodLazy,...oe(t)});class yl extends de{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return B(n,{received:n.data,code:I.invalid_literal,expected:this._def.value}),se}return{status:"valid",value:t.data}}get value(){return this._def.value}}yl.create=(e,t)=>new yl({value:e,typeName:re.ZodLiteral,...oe(t)});function Q0(e,t){return new Jr({values:e,typeName:re.ZodEnum,...oe(t)})}class Jr extends de{constructor(){super(...arguments),Mo.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return B(n,{expected:me.joinValues(r),received:n.parsedType,code:I.invalid_type}),se}if(dl(this,Mo)||H0(this,Mo,new Set(this._def.values)),!dl(this,Mo).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return B(n,{received:n.data,code:I.invalid_enum_value,options:r}),se}return Ct(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 Jr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Jr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Mo=new WeakMap;Jr.create=Q0;class xl extends de{constructor(){super(...arguments),Io.set(this,void 0)}_parse(t){const n=me.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==K.string&&r.parsedType!==K.number){const s=me.objectValues(n);return B(r,{expected:me.joinValues(s),received:r.parsedType,code:I.invalid_type}),se}if(dl(this,Io)||H0(this,Io,new Set(me.getValidEnumValues(this._def.values))),!dl(this,Io).has(t.data)){const s=me.objectValues(n);return B(r,{received:r.data,code:I.invalid_enum_value,options:s}),se}return Ct(t.data)}get enum(){return this._def.values}}Io=new WeakMap;xl.create=(e,t)=>new xl({values:e,typeName:re.ZodNativeEnum,...oe(t)});class Ci extends de{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==K.promise&&n.common.async===!1)return B(n,{code:I.invalid_type,expected:K.promise,received:n.parsedType}),se;const r=n.parsedType===K.promise?n.data:Promise.resolve(n.data);return Ct(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ci.create=(e,t)=>new Ci({type:e,typeName:re.ZodPromise,...oe(t)});class Hn extends de{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{B(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return se;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?se:l.status==="dirty"||n.value==="dirty"?Oo(l.value):l});{if(n.value==="aborted")return se;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?se:a.status==="dirty"||n.value==="dirty"?Oo(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?se:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?se:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!eo(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>eo(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);me.assertNever(s)}}Hn.create=(e,t,n)=>new Hn({schema:e,typeName:re.ZodEffects,effect:t,...oe(n)});Hn.createWithPreprocess=(e,t,n)=>new Hn({schema:t,effect:{type:"preprocess",transform:e},typeName:re.ZodEffects,...oe(n)});class Dn extends de{_parse(t){return this._getType(t)===K.undefined?Ct(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Dn.create=(e,t)=>new Dn({innerType:e,typeName:re.ZodOptional,...oe(t)});class es extends de{_parse(t){return this._getType(t)===K.null?Ct(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}es.create=(e,t)=>new es({innerType:e,typeName:re.ZodNullable,...oe(t)});class wl extends de{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===K.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}wl.create=(e,t)=>new wl({innerType:e,typeName:re.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...oe(t)});class _l extends de{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return cl(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Vt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Vt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_l.create=(e,t)=>new _l({innerType:e,typeName:re.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...oe(t)});class cd extends de{_parse(t){if(this._getType(t)!==K.nan){const r=this._getOrReturnCtx(t);return B(r,{code:I.invalid_type,expected:K.nan,received:r.parsedType}),se}return{status:"valid",value:t.data}}}cd.create=e=>new cd({typeName:re.ZodNaN,...oe(e)});class G0 extends de{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class nu extends de{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?se:o.status==="dirty"?(n.dirty(),Oo(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?se:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new nu({in:t,out:n,typeName:re.ZodPipeline})}}class bl extends de{_parse(t){const n=this._def.innerType._parse(t),r=s=>(eo(s)&&(s.value=Object.freeze(s.value)),s);return cl(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}bl.create=(e,t)=>new bl({innerType:e,typeName:re.ZodReadonly,...oe(t)});Le.lazycreate;var re;(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"})(re||(re={}));const Lo=In.create;to.create;cd.create;no.create;sd.create;bi.create;od.create;fl.create;pl.create;id.create;Os.create;Pr.create;ad.create;_n.create;const Y0=Le.create;Le.strictCreate;hl.create;zf.create;ml.create;Wn.create;vl.create;ud.create;ro.create;Yo.create;gl.create;yl.create;Jr.create;xl.create;Ci.create;Hn.create;Dn.create;es.create;Hn.createWithPreprocess;nu.create;var fN="Label",q0=v.forwardRef((e,t)=>p.jsx(ke.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));q0.displayName=fN;var X0=q0;const pN=Bl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J0=v.forwardRef(({className:e,...t},n)=>p.jsx(X0,{ref:n,className:we(pN(),e),...t}));J0.displayName=X0.displayName;const ex=kE,tx=v.createContext({}),Do=({...e})=>p.jsx(tx.Provider,{value:{name:e.name},children:p.jsx(TE,{...e})}),ru=()=>{const e=v.useContext(tx),t=v.useContext(nx),{getFieldState:n,formState:r}=tu(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within ");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},nx=v.createContext({}),_s=v.forwardRef(({className:e,...t},n)=>{const r=v.useId();return p.jsx(nx.Provider,{value:{id:r},children:p.jsx("div",{ref:n,className:we("space-y-2",e),...t})})});_s.displayName="FormItem";const bs=v.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=ru();return p.jsx(J0,{ref:n,className:we(r&&"text-destructive",e),htmlFor:s,...t})});bs.displayName="FormLabel";const Cs=v.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=ru();return p.jsx(Ys,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});Cs.displayName="FormControl";const hN=v.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=ru();return p.jsx("p",{ref:n,id:r,className:we("text-sm text-muted-foreground",e),...t})});hN.displayName="FormDescription";const ks=v.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=ru(),i=s?String(s==null?void 0:s.message):t;return i?p.jsx("p",{ref:r,id:o,className:we("text-sm font-medium text-destructive",e),...n,children:i}):null});ks.displayName="FormMessage";const qo=v.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:we("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));qo.displayName="Input";const rx=v.forwardRef(({className:e,...t},n)=>p.jsx("textarea",{className:we("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));rx.displayName="Textarea";const mN=Y0({name:Lo().min(2,"Nome deve ter pelo menos 2 caracteres").max(100,"Nome muito longo").regex(/^[a-zA-ZÀ-ÿ\s]*$/,"Nome deve conter apenas letras"),city:Lo().min(2,"Cidade deve ter pelo menos 2 caracteres").max(100,"Nome da cidade muito longo").regex(/^[a-zA-ZÀ-ÿ\s]*$/,"Cidade deve conter apenas letras"),phone:Lo().min(10,"Número de telefone inválido").max(15,"Número de telefone inválido").regex(/^[0-9()-\s]*$/,"Formato de telefone inválido"),message:Lo().min(10,"Mensagem deve ter pelo menos 10 caracteres").max(500,"Mensagem muito longa")}),vN=()=>{const{toast:e}=af(),t=U0({resolver:W0(mN),defaultValues:{name:"",city:"",phone:"",message:""}}),n=r=>{try{const s=r.message.replace(/[<>]/g,""),o=`Olá, vim pelo o site.%0A Nome: ${r.name}%0A Cidade: ${r.city}%0A Telefone: ${r.phone}%0A Mensagem: ${s}`;window.open(`https://wa.me/5573981022704?text=${encodeURIComponent(o)}`,"_blank"),e({title:"Mensagem enviada!",description:"Você será redirecionado para o WhatsApp.",duration:5e3}),t.reset()}catch{e({title:"Erro ao enviar mensagem",description:"Por favor, tente novamente.",variant:"destructive"})}};return p.jsxs("div",{className:"w-full max-w-xl mx-auto p-8 bg-white rounded-xl shadow-lg border border-gray-100",children:[p.jsxs("div",{className:"mb-8 text-center space-y-4",children:[p.jsx("h2",{className:"text-4xl font-bold text-primary",children:"Entre em Contato"}),p.jsx("p",{className:"text-gray-500",children:"Estamos aqui para ajudar você. Entre em contato e responderemos em breve!"})]}),p.jsx(ex,{...t,children:p.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-6",children:[p.jsx(Do,{control:t.control,name:"name",render:({field:r})=>p.jsxs(_s,{children:[p.jsx(bs,{children:"Nome"}),p.jsx(Cs,{children:p.jsx(qo,{placeholder:"Seu nome completo",...r,className:"transition-all duration-200 focus:ring-2 focus:ring-primary/20"})}),p.jsx(ks,{})]})}),p.jsx(Do,{control:t.control,name:"city",render:({field:r})=>p.jsxs(_s,{children:[p.jsx(bs,{children:"Cidade"}),p.jsx(Cs,{children:p.jsx(qo,{placeholder:"Sua cidade",...r,className:"transition-all duration-200 focus:ring-2 focus:ring-primary/20"})}),p.jsx(ks,{})]})}),p.jsx(Do,{control:t.control,name:"phone",render:({field:r})=>p.jsxs(_s,{children:[p.jsx(bs,{children:"Telefone"}),p.jsx(Cs,{children:p.jsx(qo,{placeholder:"(00) 00000-0000",...r,className:"transition-all duration-200 focus:ring-2 focus:ring-primary/20",type:"tel"})}),p.jsx(ks,{})]})}),p.jsx(Do,{control:t.control,name:"message",render:({field:r})=>p.jsxs(_s,{children:[p.jsx(bs,{children:"Mensagem"}),p.jsx(Cs,{children:p.jsx(rx,{placeholder:"Digite sua mensagem aqui...",className:"min-h-[120px] transition-all duration-200 focus:ring-2 focus:ring-primary/20",...r})}),p.jsx(ks,{})]})}),p.jsxs(wn,{type:"submit",className:"w-full bg-primary hover:bg-primary-dark transition-colors duration-200 shadow-lg",children:[p.jsx(L_,{className:"mr-2 h-5 w-5"}),"Enviar via WhatsApp"]})]})})]})},gN=()=>p.jsxs("div",{className:"min-h-screen bg-white",children:[p.jsx(S0,{}),p.jsxs("div",{className:"pt-16",children:[p.jsx(ZS,{}),p.jsx("div",{id:"planos",children:p.jsx(QS,{})}),p.jsx("div",{id:"beneficios",children:p.jsx(YS,{})}),p.jsx("div",{className:"py-16 bg-gray-50",id:"contato",children:p.jsx(vN,{})}),p.jsx(qS,{})]})]}),yN=()=>{const e=Nf();return v.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),p.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},ki=e=>e.replace(/\D/g,""),xN=e=>{if(e=ki(e),e.length!==11||e.split("").every(s=>s===e[0]))return!1;let t=0;for(let s=0;s<9;s++)t+=parseInt(e[s])*(10-s);let n=11-t%11;n>9&&(n=0),t=0;for(let s=0;s<10;s++)t+=parseInt(e[s])*(11-s);let r=11-t%11;return r>9&&(r=0),e[9]===String(n)&&e[10]===String(r)},wN=e=>{if(e=ki(e),e.length!==14||e.split("").every(o=>o===e[0]))return!1;let t=0,n=2;for(let o=11;o>=0;o--)t+=parseInt(e[o])*n,n=n===9?2:n+1;const r=t%11<2?0:11-t%11;t=0,n=2;for(let o=12;o>=0;o--)t+=parseInt(e[o])*n,n=n===9?2:n+1;const s=t%11<2?0:11-t%11;return e[12]===String(r)&&e[13]===String(s)},_N=Y0({document:Lo().refine(e=>{const t=ki(e);return t.length===11||t.length===14},"Documento deve ter 11 (CPF) ou 14 (CNPJ) dígitos").refine(e=>{const t=ki(e);return xN(t)||wN(t)},"Documento inválido")}),bN=()=>{const[e,t]=v.useState(!1),{toast:n}=af(),[r,s]=v.useState(0),[o,i]=v.useState(null),a=U0({resolver:W0(_N),defaultValues:{document:""}}),l=async u=>{var d;const c=ki(u.document),f=Date.now();if(f-r<2e3){n({title:"Aguarde um momento",description:"Por favor, aguarde alguns segundos antes de fazer uma nova busca",variant:"destructive"});return}s(f),t(!0);try{const x=await fetch(`https://gerenet.facilnettelecom.com.br/ws_ura_json.php?acao=consulta_cpf_cnpj&nome=S&cpf_cnpj=${c}&chave=4cvuPWtMJDKBLOaTBmmF49IRrd1Iqh`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({cpf_cnpj:c})});if(!x.ok)throw new Error("Erro na consulta de CPF/CNPJ");const w=await x.json();if(w.status!=="ok"||!((d=w.results)!=null&&d.length)){n({title:"Erro",description:"Cliente não encontrado",variant:"destructive"});return}const y=w.results[0],_=y.nome||y.nome_cliente||y.cliente||y.razao_social||"Nome não identificado",m=await fetch(`https://gerenet.facilnettelecom.com.br/ws_ura_json.php?acao=boletos_em_aberto&gerar_pdf=S&cpf_cnpj=${c}&chave=4cvuPWtMJDKBLOaTBmmF49IRrd1Iqh`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({cpf_cnpj:c})});if(!m.ok)throw new Error("Erro ao buscar boletos");const h=await m.json();if(!h.results||h.results.length===0){n({title:"Nenhum Boleto Encontrado",description:`Sou o cliente ${c} e gostaria de mais informações sobre boletos.`,variant:"destructive"}),setTimeout(()=>{window.open(`https://wa.me/5573981022704?text=Sou o cliente ${c} e gostaria de mais informações sobre boletos.`,"_blank")},2e3);return}const g=h.results[0],b={valor:g.valor,vencimento:g.vencimento,linha_digitavel:g.linha_digitavel,link:g.link,cpf_cnpj:c,nome:_};i(b),n({title:"Boleto Gerado",description:`Cliente: ${_} - Valor: ${g.valor}, Vencimento: ${g.vencimento}`})}catch(x){console.error("Erro:",x),n({title:"Erro",description:"Ocorreu um erro ao buscar os dados",variant:"destructive"})}finally{t(!1)}};return p.jsxs("div",{className:"min-h-screen bg-gray-50",children:[p.jsx(S0,{}),p.jsxs("div",{className:"container mx-auto px-4 pt-24",children:[p.jsx("h1",{className:"text-3xl font-bold text-center mb-8",children:"Área do Cliente"}),p.jsx("div",{className:"max-w-md mx-auto mb-8",children:p.jsx(sl,{className:"p-6 shadow-lg rounded-lg",children:p.jsx(ex,{...a,children:p.jsxs("form",{onSubmit:a.handleSubmit(l),className:"space-y-4",children:[p.jsx(Do,{control:a.control,name:"document",render:({field:u})=>p.jsxs(_s,{children:[p.jsx(bs,{children:"CPF/CNPJ"}),p.jsx(Cs,{children:p.jsx(qo,{placeholder:"Digite seu CPF ou CNPJ",maxLength:18,pattern:"\\d*",inputMode:"numeric",autoComplete:"off",...u,onChange:c=>{const f=c.target.value.replace(/\D/g,"");u.onChange(f)}})}),p.jsx(ks,{})]})}),p.jsx(wn,{type:"submit",className:"w-full bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded",children:e?"Buscando...":"Buscar Faturas"})]})})})}),o&&p.jsx("div",{className:"space-y-4",children:p.jsxs(sl,{className:"p-4 shadow-lg rounded-lg",children:[p.jsx("h2",{className:"font-medium mb-3",children:"Boleto Detalhes"}),o.nome&&p.jsx("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg border-l-4 border-blue-500",children:p.jsxs("p",{className:"font-semibold text-lg text-blue-800",children:["Cliente: ",o.nome]})}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("p",{children:[p.jsx("strong",{children:"Valor:"})," ",o.valor]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Vencimento:"})," ",o.vencimento]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Linha Digitável:"})," ",o.linha_digitavel]}),p.jsx("p",{children:p.jsx("a",{href:o.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline hover:text-blue-700",children:"Visualizar Boleto PDF"})})]})]})}),o&&p.jsx("div",{className:"flex justify-center mt-4",children:p.jsx(wn,{onClick:()=>{const u=`Sou cliente ${o.cpf_cnpj} efetuei o pagamento e quero enviar o comprovante.`,c=`https://wa.me/5573981022704?text=${encodeURIComponent(u)}`;window.open(c,"_blank","noopener,noreferrer")},className:"bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded",children:"Enviar Comprovante"})})]})]})},CN=new Gk,kN=()=>p.jsx(qk,{client:CN,children:p.jsxs(Ek,{children:[p.jsx(bb,{}),p.jsx(qb,{}),p.jsx(WS,{children:p.jsxs(VS,{children:[p.jsx(ka,{path:"/",element:p.jsx(gN,{})}),p.jsx(ka,{path:"/area-cliente",element:p.jsx(bN,{})}),p.jsx(ka,{path:"*",element:p.jsx(yN,{})})]})})]})});mg(document.getElementById("root")).render(p.jsx(kN,{}));