Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/adflow.picotech.app/public_html/frontend/dist/assets/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var cg=e=>{throw TypeError(e)};var Cd=(e,t,n)=>t.has(e)||cg("Cannot "+n);var E=(e,t,n)=>(Cd(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?cg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),X=(e,t,n,r)=>(Cd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ge=(e,t,n)=>(Cd(e,t,"access private method"),n);var Pl=(e,t,n,r)=>({set _(a){X(e,t,a,n)},get _(){return E(e,t,r)}});function kC(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)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(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function ny(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ry={exports:{}},vu={},sy={exports:{}},we={};/**
* @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 Zi=Symbol.for("react.element"),TC=Symbol.for("react.portal"),AC=Symbol.for("react.fragment"),_C=Symbol.for("react.strict_mode"),MC=Symbol.for("react.profiler"),OC=Symbol.for("react.provider"),DC=Symbol.for("react.context"),IC=Symbol.for("react.forward_ref"),LC=Symbol.for("react.suspense"),FC=Symbol.for("react.memo"),$C=Symbol.for("react.lazy"),ug=Symbol.iterator;function zC(e){return e===null||typeof e!="object"?null:(e=ug&&e[ug]||e["@@iterator"],typeof e=="function"?e:null)}var ay={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oy=Object.assign,iy={};function So(e,t,n){this.props=e,this.context=t,this.refs=iy,this.updater=n||ay}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 ly(){}ly.prototype=So.prototype;function op(e,t,n){this.props=e,this.context=t,this.refs=iy,this.updater=n||ay}var ip=op.prototype=new ly;ip.constructor=op;oy(ip,So.prototype);ip.isPureReactComponent=!0;var dg=Array.isArray,cy=Object.prototype.hasOwnProperty,lp={current:null},uy={key:!0,ref:!0,__self:!0,__source:!0};function dy(e,t,n){var r,a={},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)cy.call(t,r)&&!uy.hasOwnProperty(r)&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)a[r]===void 0&&(a[r]=l[r]);return{$$typeof:Zi,type:e,key:o,ref:i,props:a,_owner:lp.current}}function BC(e,t){return{$$typeof:Zi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function cp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zi}function UC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var fg=/\/+/g;function Ed(e,t){return typeof e=="object"&&e!==null&&e.key!=null?UC(""+e.key):t.toString(36)}function nc(e,t,n,r,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Zi:case TC:i=!0}}if(i)return i=e,a=a(i),e=r===""?"."+Ed(i,0):r,dg(a)?(n="",e!=null&&(n=e.replace(fg,"$&/")+"/"),nc(a,t,n,"",function(u){return u})):a!=null&&(cp(a)&&(a=BC(a,n+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(fg,"$&/")+"/")+e)),t.push(a)),1;if(i=0,r=r===""?".":r+":",dg(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+Ed(o,l);i+=nc(o,t,n,c,a)}else if(c=zC(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+Ed(o,l++),i+=nc(o,t,n,c,a);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function kl(e,t,n){if(e==null)return e;var r=[],a=0;return nc(e,r,"","",function(o){return t.call(n,o,a++)}),r}function VC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lt={current:null},rc={transition:null},HC={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:rc,ReactCurrentOwner:lp};function fy(){throw Error("act(...) is not supported in production builds of React.")}we.Children={map:kl,forEach:function(e,t,n){kl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return kl(e,function(){t++}),t},toArray:function(e){return kl(e,function(t){return t})||[]},only:function(e){if(!cp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=So;we.Fragment=AC;we.Profiler=MC;we.PureComponent=op;we.StrictMode=_C;we.Suspense=LC;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HC;we.act=fy;we.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=oy({},e.props),a=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=lp.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)cy.call(t,c)&&!uy.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Zi,type:e.type,key:a,ref:o,props:r,_owner:i}};we.createContext=function(e){return e={$$typeof:DC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:OC,_context:e},e.Consumer=e};we.createElement=dy;we.createFactory=function(e){var t=dy.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:IC,render:e}};we.isValidElement=cp;we.lazy=function(e){return{$$typeof:$C,_payload:{_status:-1,_result:e},_init:VC}};we.memo=function(e,t){return{$$typeof:FC,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=rc.transition;rc.transition={};try{e()}finally{rc.transition=t}};we.unstable_act=fy;we.useCallback=function(e,t){return Lt.current.useCallback(e,t)};we.useContext=function(e){return Lt.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};we.useEffect=function(e,t){return Lt.current.useEffect(e,t)};we.useId=function(){return Lt.current.useId()};we.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};we.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return Lt.current.useMemo(e,t)};we.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};we.useRef=function(e){return Lt.current.useRef(e)};we.useState=function(e){return Lt.current.useState(e)};we.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};we.useTransition=function(){return Lt.current.useTransition()};we.version="18.3.1";sy.exports=we;var d=sy.exports;const B=ny(d),up=kC({__proto__:null,default:B},[d]);/**
* @license React
* react-jsx-runtime.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 WC=d,qC=Symbol.for("react.element"),KC=Symbol.for("react.fragment"),GC=Object.prototype.hasOwnProperty,QC=WC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,YC={key:!0,ref:!0,__self:!0,__source:!0};function hy(e,t,n){var r,a={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)GC.call(t,r)&&!YC.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:qC,type:e,key:o,ref:i,props:a,_owner:QC.current}}vu.Fragment=KC;vu.jsx=hy;vu.jsxs=hy;ry.exports=vu;var s=ry.exports,py={exports:{}},pn={},my={exports:{}},gy={};/**
* @license React
* scheduler.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.
*/(function(e){function t(A,k){var $=A.length;A.push(k);e:for(;0<$;){var G=$-1>>>1,T=A[G];if(0<a(T,k))A[G]=k,A[$]=T,$=G;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var k=A[0],$=A.pop();if($!==k){A[0]=$;e:for(var G=0,T=A.length,K=T>>>1;G<K;){var H=2*(G+1)-1,Ne=A[H],_e=H+1,U=A[_e];if(0>a(Ne,$))_e<T&&0>a(U,Ne)?(A[G]=U,A[_e]=$,G=_e):(A[G]=Ne,A[H]=$,G=H);else if(_e<T&&0>a(U,$))A[G]=U,A[_e]=$,G=_e;else break e}}return k}function a(A,k){var $=A.sortIndex-k.sortIndex;return $!==0?$:A.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],f=1,h=null,p=3,m=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(A){for(var k=n(u);k!==null;){if(k.callback===null)r(u);else if(k.startTime<=A)r(u),k.sortIndex=k.expirationTime,t(c,k);else break;k=n(u)}}function b(A){if(x=!1,j(A),!y)if(n(c)!==null)y=!0,z(N);else{var k=n(u);k!==null&&Q(b,k.startTime-A)}}function N(A,k){y=!1,x&&(x=!1,w(P),P=-1),m=!0;var $=p;try{for(j(k),h=n(c);h!==null&&(!(h.expirationTime>k)||A&&!O());){var G=h.callback;if(typeof G=="function"){h.callback=null,p=h.priorityLevel;var T=G(h.expirationTime<=k);k=e.unstable_now(),typeof T=="function"?h.callback=T:h===n(c)&&r(c),j(k)}else r(c);h=n(c)}if(h!==null)var K=!0;else{var H=n(u);H!==null&&Q(b,H.startTime-k),K=!1}return K}finally{h=null,p=$,m=!1}}var S=!1,C=null,P=-1,R=5,M=-1;function O(){return!(e.unstable_now()-M<R)}function D(){if(C!==null){var A=e.unstable_now();M=A;var k=!0;try{k=C(!0,A)}finally{k?Z():(S=!1,C=null)}}else S=!1}var Z;if(typeof g=="function")Z=function(){g(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,re=I.port2;I.port1.onmessage=D,Z=function(){re.postMessage(null)}}else Z=function(){v(D,0)};function z(A){C=A,S||(S=!0,Z())}function Q(A,k){P=v(function(){A(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,z(N))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(A){switch(p){case 1:case 2:case 3:var k=3;break;default:k=p}var $=p;p=k;try{return A()}finally{p=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,k){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var $=p;p=A;try{return k()}finally{p=$}},e.unstable_scheduleCallback=function(A,k,$){var G=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?G+$:G):$=G,A){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=$+T,A={id:f++,callback:k,priorityLevel:A,startTime:$,expirationTime:T,sortIndex:-1},$>G?(A.sortIndex=$,t(u,A),n(c)===null&&A===n(u)&&(x?(w(P),P=-1):x=!0,Q(b,$-G))):(A.sortIndex=T,t(c,A),y||m||(y=!0,z(N))),A},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(A){var k=p;return function(){var $=p;p=k;try{return A.apply(this,arguments)}finally{p=$}}}})(gy);my.exports=gy;var XC=my.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 JC=d,hn=XC;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xy=new Set,wi={};function ma(e,t){co(e,t),co(e+"Capture",t)}function co(e,t){for(wi[e]=t,e=0;e<t.length;e++)xy.add(t[e])}var Sr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nf=Object.prototype.hasOwnProperty,ZC=/^[: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]*$/,hg={},pg={};function eE(e){return Nf.call(pg,e)?!0:Nf.call(hg,e)?!1:ZC.test(e)?pg[e]=!0:(hg[e]=!0,!1)}function tE(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 nE(e,t,n,r){if(t===null||typeof t>"u"||tE(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 Ft(e,t,n,r,a,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var mt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mt[e]=new Ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mt[t]=new Ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mt[e]=new Ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mt[e]=new Ft(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){mt[e]=new Ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mt[e]=new Ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mt[e]=new Ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mt[e]=new Ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mt[e]=new Ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var dp=/[\-:]([a-z])/g;function fp(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(dp,fp);mt[t]=new Ft(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(dp,fp);mt[t]=new Ft(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(dp,fp);mt[t]=new Ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!1,!1)});mt.xlinkHref=new Ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function hp(e,t,n,r){var a=mt.hasOwnProperty(t)?mt[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(nE(t,n,a,r)&&(n=null),r||a===null?eE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,r=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ar=JC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Tl=Symbol.for("react.element"),ka=Symbol.for("react.portal"),Ta=Symbol.for("react.fragment"),pp=Symbol.for("react.strict_mode"),Sf=Symbol.for("react.profiler"),vy=Symbol.for("react.provider"),yy=Symbol.for("react.context"),mp=Symbol.for("react.forward_ref"),Cf=Symbol.for("react.suspense"),Ef=Symbol.for("react.suspense_list"),gp=Symbol.for("react.memo"),Kr=Symbol.for("react.lazy"),wy=Symbol.for("react.offscreen"),mg=Symbol.iterator;function Uo(e){return e===null||typeof e!="object"?null:(e=mg&&e[mg]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Rd;function ri(e){if(Rd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rd=t&&t[1]||""}return`
`+Rd+e}var Pd=!1;function kd(e,t){if(!e||Pd)return"";Pd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var a=u.stack.split(`
`),o=r.stack.split(`
`),i=a.length-1,l=o.length-1;1<=i&&0<=l&&a[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(a[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||a[i]!==o[l]){var c=`
`+a[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{Pd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ri(e):""}function rE(e){switch(e.tag){case 5:return ri(e.type);case 16:return ri("Lazy");case 13:return ri("Suspense");case 19:return ri("SuspenseList");case 0:case 2:case 15:return e=kd(e.type,!1),e;case 11:return e=kd(e.type.render,!1),e;case 1:return e=kd(e.type,!0),e;default:return""}}function Rf(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 Ta:return"Fragment";case ka:return"Portal";case Sf:return"Profiler";case pp:return"StrictMode";case Cf:return"Suspense";case Ef:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yy:return(e.displayName||"Context")+".Consumer";case vy:return(e._context.displayName||"Context")+".Provider";case mp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gp:return t=e.displayName||null,t!==null?t:Rf(e.type)||"Memo";case Kr:t=e._payload,e=e._init;try{return Rf(e(t))}catch{}}return null}function sE(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 Rf(t);case 8:return t===pp?"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 js(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aE(e){var t=jy(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 a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.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 Al(e){e._valueTracker||(e._valueTracker=aE(e))}function by(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ac(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 Pf(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=js(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 Ny(e,t){t=t.checked,t!=null&&hp(e,"checked",t,!1)}function kf(e,t){Ny(e,t);var n=js(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")?Tf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tf(e,t.type,js(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xg(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 Tf(e,t,n){(t!=="number"||Ac(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var si=Array.isArray;function Ba(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+js(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Af(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function vg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(F(92));if(si(n)){if(1<n.length)throw Error(F(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:js(n)}}function Sy(e,t){var n=js(t.value),r=js(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function yg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Cy(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function _f(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Cy(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _l,Ey=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(_l=_l||document.createElement("div"),_l.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_l.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ji(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ui={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},oE=["Webkit","ms","Moz","O"];Object.keys(ui).forEach(function(e){oE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ui[t]=ui[e]})});function Ry(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ui.hasOwnProperty(e)&&ui[e]?(""+t).trim():t+"px"}function Py(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=Ry(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var iE=Ge({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 Mf(e,t){if(t){if(iE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function Of(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 Df=null;function xp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var If=null,Ua=null,Va=null;function wg(e){if(e=nl(e)){if(typeof If!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Nu(t),If(e.stateNode,e.type,t))}}function ky(e){Ua?Va?Va.push(e):Va=[e]:Ua=e}function Ty(){if(Ua){var e=Ua,t=Va;if(Va=Ua=null,wg(e),t)for(e=0;e<t.length;e++)wg(t[e])}}function Ay(e,t){return e(t)}function _y(){}var Td=!1;function My(e,t,n){if(Td)return e(t,n);Td=!0;try{return Ay(e,t,n)}finally{Td=!1,(Ua!==null||Va!==null)&&(_y(),Ty())}}function bi(e,t){var n=e.stateNode;if(n===null)return null;var r=Nu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var Lf=!1;if(Sr)try{var Vo={};Object.defineProperty(Vo,"passive",{get:function(){Lf=!0}}),window.addEventListener("test",Vo,Vo),window.removeEventListener("test",Vo,Vo)}catch{Lf=!1}function lE(e,t,n,r,a,o,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var di=!1,_c=null,Mc=!1,Ff=null,cE={onError:function(e){di=!0,_c=e}};function uE(e,t,n,r,a,o,i,l,c){di=!1,_c=null,lE.apply(cE,arguments)}function dE(e,t,n,r,a,o,i,l,c){if(uE.apply(this,arguments),di){if(di){var u=_c;di=!1,_c=null}else throw Error(F(198));Mc||(Mc=!0,Ff=u)}}function ga(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Oy(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function jg(e){if(ga(e)!==e)throw Error(F(188))}function fE(e){var t=e.alternate;if(!t){if(t=ga(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return jg(a),e;if(o===r)return jg(a),t;o=o.sibling}throw Error(F(188))}if(n.return!==r.return)n=a,r=o;else{for(var i=!1,l=a.child;l;){if(l===n){i=!0,n=a,r=o;break}if(l===r){i=!0,r=a,n=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===n){i=!0,n=o,r=a;break}if(l===r){i=!0,r=o,n=a;break}l=l.sibling}if(!i)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function Dy(e){return e=fE(e),e!==null?Iy(e):null}function Iy(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Iy(e);if(t!==null)return t;e=e.sibling}return null}var Ly=hn.unstable_scheduleCallback,bg=hn.unstable_cancelCallback,hE=hn.unstable_shouldYield,pE=hn.unstable_requestPaint,Je=hn.unstable_now,mE=hn.unstable_getCurrentPriorityLevel,vp=hn.unstable_ImmediatePriority,Fy=hn.unstable_UserBlockingPriority,Oc=hn.unstable_NormalPriority,gE=hn.unstable_LowPriority,$y=hn.unstable_IdlePriority,yu=null,rr=null;function xE(e){if(rr&&typeof rr.onCommitFiberRoot=="function")try{rr.onCommitFiberRoot(yu,e,void 0,(e.current.flags&128)===128)}catch{}}var Fn=Math.clz32?Math.clz32:wE,vE=Math.log,yE=Math.LN2;function wE(e){return e>>>=0,e===0?32:31-(vE(e)/yE|0)|0}var Ml=64,Ol=4194304;function ai(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 Dc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~a;l!==0?r=ai(l):(o&=i,o!==0&&(r=ai(o)))}else i=n&~a,i!==0?r=ai(i):o!==0&&(r=ai(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Fn(t),a=1<<n,r|=e[n],t&=~a;return r}function jE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Fn(o),l=1<<i,c=a[i];c===-1?(!(l&n)||l&r)&&(a[i]=jE(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function $f(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function zy(){var e=Ml;return Ml<<=1,!(Ml&4194240)&&(Ml=64),e}function Ad(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function el(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fn(t),e[t]=n}function NE(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<n;){var a=31-Fn(n),o=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~o}}function yp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fn(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var De=0;function By(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Uy,wp,Vy,Hy,Wy,zf=!1,Dl=[],ds=null,fs=null,hs=null,Ni=new Map,Si=new Map,Qr=[],SE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ng(e,t){switch(e){case"focusin":case"focusout":ds=null;break;case"dragenter":case"dragleave":fs=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":Ni.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Si.delete(t.pointerId)}}function Ho(e,t,n,r,a,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},t!==null&&(t=nl(t),t!==null&&wp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function CE(e,t,n,r,a){switch(t){case"focusin":return ds=Ho(ds,e,t,n,r,a),!0;case"dragenter":return fs=Ho(fs,e,t,n,r,a),!0;case"mouseover":return hs=Ho(hs,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return Ni.set(o,Ho(Ni.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,Si.set(o,Ho(Si.get(o)||null,e,t,n,r,a)),!0}return!1}function qy(e){var t=$s(e.target);if(t!==null){var n=ga(t);if(n!==null){if(t=n.tag,t===13){if(t=Oy(n),t!==null){e.blockedOn=t,Wy(e.priority,function(){Vy(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Df=r,n.target.dispatchEvent(r),Df=null}else return t=nl(n),t!==null&&wp(t),e.blockedOn=n,!1;t.shift()}return!0}function Sg(e,t,n){sc(e)&&n.delete(t)}function EE(){zf=!1,ds!==null&&sc(ds)&&(ds=null),fs!==null&&sc(fs)&&(fs=null),hs!==null&&sc(hs)&&(hs=null),Ni.forEach(Sg),Si.forEach(Sg)}function Wo(e,t){e.blockedOn===t&&(e.blockedOn=null,zf||(zf=!0,hn.unstable_scheduleCallback(hn.unstable_NormalPriority,EE)))}function Ci(e){function t(a){return Wo(a,e)}if(0<Dl.length){Wo(Dl[0],e);for(var n=1;n<Dl.length;n++){var r=Dl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ds!==null&&Wo(ds,e),fs!==null&&Wo(fs,e),hs!==null&&Wo(hs,e),Ni.forEach(t),Si.forEach(t),n=0;n<Qr.length;n++)r=Qr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qr.length&&(n=Qr[0],n.blockedOn===null);)qy(n),n.blockedOn===null&&Qr.shift()}var Ha=Ar.ReactCurrentBatchConfig,Ic=!0;function RE(e,t,n,r){var a=De,o=Ha.transition;Ha.transition=null;try{De=1,jp(e,t,n,r)}finally{De=a,Ha.transition=o}}function PE(e,t,n,r){var a=De,o=Ha.transition;Ha.transition=null;try{De=4,jp(e,t,n,r)}finally{De=a,Ha.transition=o}}function jp(e,t,n,r){if(Ic){var a=Bf(e,t,n,r);if(a===null)Bd(e,t,r,Lc,n),Ng(e,r);else if(CE(a,e,t,n,r))r.stopPropagation();else if(Ng(e,r),t&4&&-1<SE.indexOf(e)){for(;a!==null;){var o=nl(a);if(o!==null&&Uy(o),o=Bf(e,t,n,r),o===null&&Bd(e,t,r,Lc,n),o===a)break;a=o}a!==null&&r.stopPropagation()}else Bd(e,t,r,null,n)}}var Lc=null;function Bf(e,t,n,r){if(Lc=null,e=xp(r),e=$s(e),e!==null)if(t=ga(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Oy(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Lc=e,null}function Ky(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(mE()){case vp:return 1;case Fy:return 4;case Oc:case gE:return 16;case $y:return 536870912;default:return 16}default:return 16}}var is=null,bp=null,ac=null;function Gy(){if(ac)return ac;var e,t=bp,n=t.length,r,a="value"in is?is.value:is.textContent,o=a.length;for(e=0;e<n&&t[e]===a[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===a[o-r];r++);return ac=a.slice(e,1<r?1-r:void 0)}function oc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Il(){return!0}function Cg(){return!1}function mn(e){function t(n,r,a,o,i){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Il:Cg,this.isPropagationStopped=Cg,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Il)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Il)},persist:function(){},isPersistent:Il}),t}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=mn(Co),tl=Ge({},Co,{view:0,detail:0}),kE=mn(tl),_d,Md,qo,wu=Ge({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==qo&&(qo&&e.type==="mousemove"?(_d=e.screenX-qo.screenX,Md=e.screenY-qo.screenY):Md=_d=0,qo=e),_d)},movementY:function(e){return"movementY"in e?e.movementY:Md}}),Eg=mn(wu),TE=Ge({},wu,{dataTransfer:0}),AE=mn(TE),_E=Ge({},tl,{relatedTarget:0}),Od=mn(_E),ME=Ge({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),OE=mn(ME),DE=Ge({},Co,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),IE=mn(DE),LE=Ge({},Co,{data:0}),Rg=mn(LE),FE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$E={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zE[e])?!!t[e]:!1}function Sp(){return BE}var UE=Ge({},tl,{key:function(e){if(e.key){var t=FE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$E[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sp,charCode:function(e){return e.type==="keypress"?oc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),VE=mn(UE),HE=Ge({},wu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pg=mn(HE),WE=Ge({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sp}),qE=mn(WE),KE=Ge({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),GE=mn(KE),QE=Ge({},wu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),YE=mn(QE),XE=[9,13,27,32],Cp=Sr&&"CompositionEvent"in window,fi=null;Sr&&"documentMode"in document&&(fi=document.documentMode);var JE=Sr&&"TextEvent"in window&&!fi,Qy=Sr&&(!Cp||fi&&8<fi&&11>=fi),kg=" ",Tg=!1;function Yy(e,t){switch(e){case"keyup":return XE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Aa=!1;function ZE(e,t){switch(e){case"compositionend":return Xy(t);case"keypress":return t.which!==32?null:(Tg=!0,kg);case"textInput":return e=t.data,e===kg&&Tg?null:e;default:return null}}function e2(e,t){if(Aa)return e==="compositionend"||!Cp&&Yy(e,t)?(e=Gy(),ac=bp=is=null,Aa=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Qy&&t.locale!=="ko"?null:t.data;default:return null}}var t2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ag(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!t2[e.type]:t==="textarea"}function Jy(e,t,n,r){ky(r),t=Fc(t,"onChange"),0<t.length&&(n=new Np("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hi=null,Ei=null;function n2(e){cw(e,0)}function ju(e){var t=Oa(e);if(by(t))return e}function r2(e,t){if(e==="change")return t}var Zy=!1;if(Sr){var Dd;if(Sr){var Id="oninput"in document;if(!Id){var _g=document.createElement("div");_g.setAttribute("oninput","return;"),Id=typeof _g.oninput=="function"}Dd=Id}else Dd=!1;Zy=Dd&&(!document.documentMode||9<document.documentMode)}function Mg(){hi&&(hi.detachEvent("onpropertychange",ew),Ei=hi=null)}function ew(e){if(e.propertyName==="value"&&ju(Ei)){var t=[];Jy(t,Ei,e,xp(e)),My(n2,t)}}function s2(e,t,n){e==="focusin"?(Mg(),hi=t,Ei=n,hi.attachEvent("onpropertychange",ew)):e==="focusout"&&Mg()}function a2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ju(Ei)}function o2(e,t){if(e==="click")return ju(t)}function i2(e,t){if(e==="input"||e==="change")return ju(t)}function l2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bn=typeof Object.is=="function"?Object.is:l2;function Ri(e,t){if(Bn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!Nf.call(t,a)||!Bn(e[a],t[a]))return!1}return!0}function Og(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dg(e,t){var n=Og(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=Og(n)}}function tw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nw(){for(var e=window,t=Ac();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ac(e.document)}return t}function Ep(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 c2(e){var t=nw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tw(n.ownerDocument.documentElement,n)){if(r!==null&&Ep(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 a=n.textContent.length,o=Math.min(r.start,a);r=r.end===void 0?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=Dg(n,o);var i=Dg(n,r);a&&i&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(a.node,a.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var u2=Sr&&"documentMode"in document&&11>=document.documentMode,_a=null,Uf=null,pi=null,Vf=!1;function Ig(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vf||_a==null||_a!==Ac(r)||(r=_a,"selectionStart"in r&&Ep(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}),pi&&Ri(pi,r)||(pi=r,r=Fc(Uf,"onSelect"),0<r.length&&(t=new Np("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_a)))}function Ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ma={animationend:Ll("Animation","AnimationEnd"),animationiteration:Ll("Animation","AnimationIteration"),animationstart:Ll("Animation","AnimationStart"),transitionend:Ll("Transition","TransitionEnd")},Ld={},rw={};Sr&&(rw=document.createElement("div").style,"AnimationEvent"in window||(delete Ma.animationend.animation,delete Ma.animationiteration.animation,delete Ma.animationstart.animation),"TransitionEvent"in window||delete Ma.transitionend.transition);function bu(e){if(Ld[e])return Ld[e];if(!Ma[e])return e;var t=Ma[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rw)return Ld[e]=t[n];return e}var sw=bu("animationend"),aw=bu("animationiteration"),ow=bu("animationstart"),iw=bu("transitionend"),lw=new Map,Lg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Cs(e,t){lw.set(e,t),ma(t,[e])}for(var Fd=0;Fd<Lg.length;Fd++){var $d=Lg[Fd],d2=$d.toLowerCase(),f2=$d[0].toUpperCase()+$d.slice(1);Cs(d2,"on"+f2)}Cs(sw,"onAnimationEnd");Cs(aw,"onAnimationIteration");Cs(ow,"onAnimationStart");Cs("dblclick","onDoubleClick");Cs("focusin","onFocus");Cs("focusout","onBlur");Cs(iw,"onTransitionEnd");co("onMouseEnter",["mouseout","mouseover"]);co("onMouseLeave",["mouseout","mouseover"]);co("onPointerEnter",["pointerout","pointerover"]);co("onPointerLeave",["pointerout","pointerover"]);ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ma("onBeforeInput",["compositionend","keypress","textInput","paste"]);ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),h2=new Set("cancel close invalid load scroll toggle".split(" ").concat(oi));function Fg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,dE(r,t,void 0,e),e.currentTarget=null}function cw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&a.isPropagationStopped())break e;Fg(a,l,u),o=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&a.isPropagationStopped())break e;Fg(a,l,u),o=c}}}if(Mc)throw e=Ff,Mc=!1,Ff=null,e}function $e(e,t){var n=t[Gf];n===void 0&&(n=t[Gf]=new Set);var r=e+"__bubble";n.has(r)||(uw(t,e,2,!1),n.add(r))}function zd(e,t,n){var r=0;t&&(r|=4),uw(n,e,r,t)}var Fl="_reactListening"+Math.random().toString(36).slice(2);function Pi(e){if(!e[Fl]){e[Fl]=!0,xy.forEach(function(n){n!=="selectionchange"&&(h2.has(n)||zd(n,!1,e),zd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fl]||(t[Fl]=!0,zd("selectionchange",!1,t))}}function uw(e,t,n,r){switch(Ky(t)){case 1:var a=RE;break;case 4:a=PE;break;default:a=jp}n=a.bind(null,t,n,e),a=void 0,!Lf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Bd(e,t,n,r,a){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===a||l.nodeType===8&&l.parentNode===a)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;i=i.return}for(;l!==null;){if(i=$s(l),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}l=l.parentNode}}r=r.return}My(function(){var u=o,f=xp(n),h=[];e:{var p=lw.get(e);if(p!==void 0){var m=Np,y=e;switch(e){case"keypress":if(oc(n)===0)break e;case"keydown":case"keyup":m=VE;break;case"focusin":y="focus",m=Od;break;case"focusout":y="blur",m=Od;break;case"beforeblur":case"afterblur":m=Od;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Eg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=AE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=qE;break;case sw:case aw:case ow:m=OE;break;case iw:m=GE;break;case"scroll":m=kE;break;case"wheel":m=YE;break;case"copy":case"cut":case"paste":m=IE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Pg}var x=(t&4)!==0,v=!x&&e==="scroll",w=x?p!==null?p+"Capture":null:p;x=[];for(var g=u,j;g!==null;){j=g;var b=j.stateNode;if(j.tag===5&&b!==null&&(j=b,w!==null&&(b=bi(g,w),b!=null&&x.push(ki(g,b,j)))),v)break;g=g.return}0<x.length&&(p=new m(p,y,null,n,f),h.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==Df&&(y=n.relatedTarget||n.fromElement)&&($s(y)||y[Cr]))break e;if((m||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,m?(y=n.relatedTarget||n.toElement,m=u,y=y?$s(y):null,y!==null&&(v=ga(y),y!==v||y.tag!==5&&y.tag!==6)&&(y=null)):(m=null,y=u),m!==y)){if(x=Eg,b="onMouseLeave",w="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=Pg,b="onPointerLeave",w="onPointerEnter",g="pointer"),v=m==null?p:Oa(m),j=y==null?p:Oa(y),p=new x(b,g+"leave",m,n,f),p.target=v,p.relatedTarget=j,b=null,$s(f)===u&&(x=new x(w,g+"enter",y,n,f),x.target=j,x.relatedTarget=v,b=x),v=b,m&&y)t:{for(x=m,w=y,g=0,j=x;j;j=Sa(j))g++;for(j=0,b=w;b;b=Sa(b))j++;for(;0<g-j;)x=Sa(x),g--;for(;0<j-g;)w=Sa(w),j--;for(;g--;){if(x===w||w!==null&&x===w.alternate)break t;x=Sa(x),w=Sa(w)}x=null}else x=null;m!==null&&$g(h,p,m,x,!1),y!==null&&v!==null&&$g(h,v,y,x,!0)}}e:{if(p=u?Oa(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var N=r2;else if(Ag(p))if(Zy)N=i2;else{N=a2;var S=s2}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(N=o2);if(N&&(N=N(e,u))){Jy(h,N,n,f);break e}S&&S(e,p,u),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&Tf(p,"number",p.value)}switch(S=u?Oa(u):window,e){case"focusin":(Ag(S)||S.contentEditable==="true")&&(_a=S,Uf=u,pi=null);break;case"focusout":pi=Uf=_a=null;break;case"mousedown":Vf=!0;break;case"contextmenu":case"mouseup":case"dragend":Vf=!1,Ig(h,n,f);break;case"selectionchange":if(u2)break;case"keydown":case"keyup":Ig(h,n,f)}var C;if(Cp)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Aa?Yy(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Qy&&n.locale!=="ko"&&(Aa||P!=="onCompositionStart"?P==="onCompositionEnd"&&Aa&&(C=Gy()):(is=f,bp="value"in is?is.value:is.textContent,Aa=!0)),S=Fc(u,P),0<S.length&&(P=new Rg(P,e,null,n,f),h.push({event:P,listeners:S}),C?P.data=C:(C=Xy(n),C!==null&&(P.data=C)))),(C=JE?ZE(e,n):e2(e,n))&&(u=Fc(u,"onBeforeInput"),0<u.length&&(f=new Rg("onBeforeInput","beforeinput",null,n,f),h.push({event:f,listeners:u}),f.data=C))}cw(h,t)})}function ki(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fc(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,o=a.stateNode;a.tag===5&&o!==null&&(a=o,o=bi(e,n),o!=null&&r.unshift(ki(e,o,a)),o=bi(e,t),o!=null&&r.push(ki(e,o,a))),e=e.return}return r}function Sa(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $g(e,t,n,r,a){for(var o=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,a?(c=bi(n,o),c!=null&&i.unshift(ki(n,c,l))):a||(c=bi(n,o),c!=null&&i.push(ki(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var p2=/\r\n?/g,m2=/\u0000|\uFFFD/g;function zg(e){return(typeof e=="string"?e:""+e).replace(p2,`
`).replace(m2,"")}function $l(e,t,n){if(t=zg(t),zg(e)!==t&&n)throw Error(F(425))}function $c(){}var Hf=null,Wf=null;function qf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kf=typeof setTimeout=="function"?setTimeout:void 0,g2=typeof clearTimeout=="function"?clearTimeout:void 0,Bg=typeof Promise=="function"?Promise:void 0,x2=typeof queueMicrotask=="function"?queueMicrotask:typeof Bg<"u"?function(e){return Bg.resolve(null).then(e).catch(v2)}:Kf;function v2(e){setTimeout(function(){throw e})}function Ud(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),Ci(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);Ci(t)}function ps(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ug(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Eo=Math.random().toString(36).slice(2),er="__reactFiber$"+Eo,Ti="__reactProps$"+Eo,Cr="__reactContainer$"+Eo,Gf="__reactEvents$"+Eo,y2="__reactListeners$"+Eo,w2="__reactHandles$"+Eo;function $s(e){var t=e[er];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cr]||n[er]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ug(e);e!==null;){if(n=e[er])return n;e=Ug(e)}return t}e=n,n=e.parentNode}return null}function nl(e){return e=e[er]||e[Cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Oa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function Nu(e){return e[Ti]||null}var Qf=[],Da=-1;function Es(e){return{current:e}}function ze(e){0>Da||(e.current=Qf[Da],Qf[Da]=null,Da--)}function Le(e,t){Da++,Qf[Da]=e.current,e.current=t}var bs={},Rt=Es(bs),Gt=Es(!1),ta=bs;function uo(e,t){var n=e.type.contextTypes;if(!n)return bs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in n)a[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Qt(e){return e=e.childContextTypes,e!=null}function zc(){ze(Gt),ze(Rt)}function Vg(e,t,n){if(Rt.current!==bs)throw Error(F(168));Le(Rt,t),Le(Gt,n)}function dw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(F(108,sE(e)||"Unknown",a));return Ge({},n,r)}function Bc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bs,ta=Rt.current,Le(Rt,e),Le(Gt,Gt.current),!0}function Hg(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=dw(e,t,ta),r.__reactInternalMemoizedMergedChildContext=e,ze(Gt),ze(Rt),Le(Rt,e)):ze(Gt),Le(Gt,n)}var xr=null,Su=!1,Vd=!1;function fw(e){xr===null?xr=[e]:xr.push(e)}function j2(e){Su=!0,fw(e)}function Rs(){if(!Vd&&xr!==null){Vd=!0;var e=0,t=De;try{var n=xr;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}xr=null,Su=!1}catch(a){throw xr!==null&&(xr=xr.slice(e+1)),Ly(vp,Rs),a}finally{De=t,Vd=!1}}return null}var Ia=[],La=0,Uc=null,Vc=0,vn=[],yn=0,na=null,wr=1,jr="";function Is(e,t){Ia[La++]=Vc,Ia[La++]=Uc,Uc=e,Vc=t}function hw(e,t,n){vn[yn++]=wr,vn[yn++]=jr,vn[yn++]=na,na=e;var r=wr;e=jr;var a=32-Fn(r)-1;r&=~(1<<a),n+=1;var o=32-Fn(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,wr=1<<32-Fn(t)+a|n<<a|r,jr=o+e}else wr=1<<o|n<<a|r,jr=e}function Rp(e){e.return!==null&&(Is(e,1),hw(e,1,0))}function Pp(e){for(;e===Uc;)Uc=Ia[--La],Ia[La]=null,Vc=Ia[--La],Ia[La]=null;for(;e===na;)na=vn[--yn],vn[yn]=null,jr=vn[--yn],vn[yn]=null,wr=vn[--yn],vn[yn]=null}var un=null,sn=null,He=!1,Ln=null;function pw(e,t){var n=wn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Wg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,un=e,sn=ps(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,un=e,sn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=na!==null?{id:wr,overflow:jr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=wn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,un=e,sn=null,!0):!1;default:return!1}}function Yf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xf(e){if(He){var t=sn;if(t){var n=t;if(!Wg(e,t)){if(Yf(e))throw Error(F(418));t=ps(n.nextSibling);var r=un;t&&Wg(e,t)?pw(r,n):(e.flags=e.flags&-4097|2,He=!1,un=e)}}else{if(Yf(e))throw Error(F(418));e.flags=e.flags&-4097|2,He=!1,un=e}}}function qg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;un=e}function zl(e){if(e!==un)return!1;if(!He)return qg(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!qf(e.type,e.memoizedProps)),t&&(t=sn)){if(Yf(e))throw mw(),Error(F(418));for(;t;)pw(e,t),t=ps(t.nextSibling)}if(qg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){sn=ps(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}sn=null}}else sn=un?ps(e.stateNode.nextSibling):null;return!0}function mw(){for(var e=sn;e;)e=ps(e.nextSibling)}function fo(){sn=un=null,He=!1}function kp(e){Ln===null?Ln=[e]:Ln.push(e)}var b2=Ar.ReactCurrentBatchConfig;function Ko(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(F(309));var r=n.stateNode}if(!r)throw Error(F(147,e));var a=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var l=a.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(F(284));if(!n._owner)throw Error(F(290,e))}return e}function Bl(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Kg(e){var t=e._init;return t(e._payload)}function gw(e){function t(w,g){if(e){var j=w.deletions;j===null?(w.deletions=[g],w.flags|=16):j.push(g)}}function n(w,g){if(!e)return null;for(;g!==null;)t(w,g),g=g.sibling;return null}function r(w,g){for(w=new Map;g!==null;)g.key!==null?w.set(g.key,g):w.set(g.index,g),g=g.sibling;return w}function a(w,g){return w=vs(w,g),w.index=0,w.sibling=null,w}function o(w,g,j){return w.index=j,e?(j=w.alternate,j!==null?(j=j.index,j<g?(w.flags|=2,g):j):(w.flags|=2,g)):(w.flags|=1048576,g)}function i(w){return e&&w.alternate===null&&(w.flags|=2),w}function l(w,g,j,b){return g===null||g.tag!==6?(g=Yd(j,w.mode,b),g.return=w,g):(g=a(g,j),g.return=w,g)}function c(w,g,j,b){var N=j.type;return N===Ta?f(w,g,j.props.children,b,j.key):g!==null&&(g.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Kr&&Kg(N)===g.type)?(b=a(g,j.props),b.ref=Ko(w,g,j),b.return=w,b):(b=hc(j.type,j.key,j.props,null,w.mode,b),b.ref=Ko(w,g,j),b.return=w,b)}function u(w,g,j,b){return g===null||g.tag!==4||g.stateNode.containerInfo!==j.containerInfo||g.stateNode.implementation!==j.implementation?(g=Xd(j,w.mode,b),g.return=w,g):(g=a(g,j.children||[]),g.return=w,g)}function f(w,g,j,b,N){return g===null||g.tag!==7?(g=Zs(j,w.mode,b,N),g.return=w,g):(g=a(g,j),g.return=w,g)}function h(w,g,j){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Yd(""+g,w.mode,j),g.return=w,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Tl:return j=hc(g.type,g.key,g.props,null,w.mode,j),j.ref=Ko(w,null,g),j.return=w,j;case ka:return g=Xd(g,w.mode,j),g.return=w,g;case Kr:var b=g._init;return h(w,b(g._payload),j)}if(si(g)||Uo(g))return g=Zs(g,w.mode,j,null),g.return=w,g;Bl(w,g)}return null}function p(w,g,j,b){var N=g!==null?g.key:null;if(typeof j=="string"&&j!==""||typeof j=="number")return N!==null?null:l(w,g,""+j,b);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Tl:return j.key===N?c(w,g,j,b):null;case ka:return j.key===N?u(w,g,j,b):null;case Kr:return N=j._init,p(w,g,N(j._payload),b)}if(si(j)||Uo(j))return N!==null?null:f(w,g,j,b,null);Bl(w,j)}return null}function m(w,g,j,b,N){if(typeof b=="string"&&b!==""||typeof b=="number")return w=w.get(j)||null,l(g,w,""+b,N);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Tl:return w=w.get(b.key===null?j:b.key)||null,c(g,w,b,N);case ka:return w=w.get(b.key===null?j:b.key)||null,u(g,w,b,N);case Kr:var S=b._init;return m(w,g,j,S(b._payload),N)}if(si(b)||Uo(b))return w=w.get(j)||null,f(g,w,b,N,null);Bl(g,b)}return null}function y(w,g,j,b){for(var N=null,S=null,C=g,P=g=0,R=null;C!==null&&P<j.length;P++){C.index>P?(R=C,C=null):R=C.sibling;var M=p(w,C,j[P],b);if(M===null){C===null&&(C=R);break}e&&C&&M.alternate===null&&t(w,C),g=o(M,g,P),S===null?N=M:S.sibling=M,S=M,C=R}if(P===j.length)return n(w,C),He&&Is(w,P),N;if(C===null){for(;P<j.length;P++)C=h(w,j[P],b),C!==null&&(g=o(C,g,P),S===null?N=C:S.sibling=C,S=C);return He&&Is(w,P),N}for(C=r(w,C);P<j.length;P++)R=m(C,w,P,j[P],b),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?P:R.key),g=o(R,g,P),S===null?N=R:S.sibling=R,S=R);return e&&C.forEach(function(O){return t(w,O)}),He&&Is(w,P),N}function x(w,g,j,b){var N=Uo(j);if(typeof N!="function")throw Error(F(150));if(j=N.call(j),j==null)throw Error(F(151));for(var S=N=null,C=g,P=g=0,R=null,M=j.next();C!==null&&!M.done;P++,M=j.next()){C.index>P?(R=C,C=null):R=C.sibling;var O=p(w,C,M.value,b);if(O===null){C===null&&(C=R);break}e&&C&&O.alternate===null&&t(w,C),g=o(O,g,P),S===null?N=O:S.sibling=O,S=O,C=R}if(M.done)return n(w,C),He&&Is(w,P),N;if(C===null){for(;!M.done;P++,M=j.next())M=h(w,M.value,b),M!==null&&(g=o(M,g,P),S===null?N=M:S.sibling=M,S=M);return He&&Is(w,P),N}for(C=r(w,C);!M.done;P++,M=j.next())M=m(C,w,P,M.value,b),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?P:M.key),g=o(M,g,P),S===null?N=M:S.sibling=M,S=M);return e&&C.forEach(function(D){return t(w,D)}),He&&Is(w,P),N}function v(w,g,j,b){if(typeof j=="object"&&j!==null&&j.type===Ta&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case Tl:e:{for(var N=j.key,S=g;S!==null;){if(S.key===N){if(N=j.type,N===Ta){if(S.tag===7){n(w,S.sibling),g=a(S,j.props.children),g.return=w,w=g;break e}}else if(S.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Kr&&Kg(N)===S.type){n(w,S.sibling),g=a(S,j.props),g.ref=Ko(w,S,j),g.return=w,w=g;break e}n(w,S);break}else t(w,S);S=S.sibling}j.type===Ta?(g=Zs(j.props.children,w.mode,b,j.key),g.return=w,w=g):(b=hc(j.type,j.key,j.props,null,w.mode,b),b.ref=Ko(w,g,j),b.return=w,w=b)}return i(w);case ka:e:{for(S=j.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===j.containerInfo&&g.stateNode.implementation===j.implementation){n(w,g.sibling),g=a(g,j.children||[]),g.return=w,w=g;break e}else{n(w,g);break}else t(w,g);g=g.sibling}g=Xd(j,w.mode,b),g.return=w,w=g}return i(w);case Kr:return S=j._init,v(w,g,S(j._payload),b)}if(si(j))return y(w,g,j,b);if(Uo(j))return x(w,g,j,b);Bl(w,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,g!==null&&g.tag===6?(n(w,g.sibling),g=a(g,j),g.return=w,w=g):(n(w,g),g=Yd(j,w.mode,b),g.return=w,w=g),i(w)):n(w,g)}return v}var ho=gw(!0),xw=gw(!1),Hc=Es(null),Wc=null,Fa=null,Tp=null;function Ap(){Tp=Fa=Wc=null}function _p(e){var t=Hc.current;ze(Hc),e._currentValue=t}function Jf(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 Wa(e,t){Wc=e,Tp=Fa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Wt=!0),e.firstContext=null)}function Sn(e){var t=e._currentValue;if(Tp!==e)if(e={context:e,memoizedValue:t,next:null},Fa===null){if(Wc===null)throw Error(F(308));Fa=e,Wc.dependencies={lanes:0,firstContext:e}}else Fa=Fa.next=e;return t}var zs=null;function Mp(e){zs===null?zs=[e]:zs.push(e)}function vw(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,Mp(t)):(n.next=a.next,a.next=n),t.interleaved=n,Er(e,r)}function Er(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 Gr=!1;function Op(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yw(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 br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ms(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Er(e,n)}return a=r.interleaved,a===null?(t.next=t,Mp(r)):(t.next=a.next,a.next=t),r.interleaved=t,Er(e,n)}function ic(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,yp(e,n)}}function Gg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=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?a=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?a=o=t:o=o.next=t}else a=o=t;n={baseState:r.baseState,firstBaseUpdate:a,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 qc(e,t,n,r){var a=e.updateQueue;Gr=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==i&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=c))}if(o!==null){var h=a.baseState;i=0,f=u=c=null,l=o;do{var p=l.lane,m=l.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(p=t,m=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){h=y.call(m,h,p);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,p=typeof y=="function"?y.call(m,h,p):y,p==null)break e;h=Ge({},h,p);break e;case 2:Gr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=m,c=h):f=f.next=m,i|=p;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;p=l,l=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(f===null&&(c=h),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=f,t=a.shared.interleaved,t!==null){a=t;do i|=a.lane,a=a.next;while(a!==t)}else o===null&&(a.shared.lanes=0);sa|=i,e.lanes=i,e.memoizedState=h}}function Qg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=n,typeof a!="function")throw Error(F(191,a));a.call(r)}}}var rl={},sr=Es(rl),Ai=Es(rl),_i=Es(rl);function Bs(e){if(e===rl)throw Error(F(174));return e}function Dp(e,t){switch(Le(_i,t),Le(Ai,e),Le(sr,rl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_f(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_f(t,e)}ze(sr),Le(sr,t)}function po(){ze(sr),ze(Ai),ze(_i)}function ww(e){Bs(_i.current);var t=Bs(sr.current),n=_f(t,e.type);t!==n&&(Le(Ai,e),Le(sr,n))}function Ip(e){Ai.current===e&&(ze(sr),ze(Ai))}var We=Es(0);function Kc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hd=[];function Lp(){for(var e=0;e<Hd.length;e++)Hd[e]._workInProgressVersionPrimary=null;Hd.length=0}var lc=Ar.ReactCurrentDispatcher,Wd=Ar.ReactCurrentBatchConfig,ra=0,qe=null,ot=null,dt=null,Gc=!1,mi=!1,Mi=0,N2=0;function yt(){throw Error(F(321))}function Fp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bn(e[n],t[n]))return!1;return!0}function $p(e,t,n,r,a,o){if(ra=o,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,lc.current=e===null||e.memoizedState===null?R2:P2,e=n(r,a),mi){o=0;do{if(mi=!1,Mi=0,25<=o)throw Error(F(301));o+=1,dt=ot=null,t.updateQueue=null,lc.current=k2,e=n(r,a)}while(mi)}if(lc.current=Qc,t=ot!==null&&ot.next!==null,ra=0,dt=ot=qe=null,Gc=!1,t)throw Error(F(300));return e}function zp(){var e=Mi!==0;return Mi=0,e}function Yn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?qe.memoizedState=dt=e:dt=dt.next=e,dt}function Cn(){if(ot===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=dt===null?qe.memoizedState:dt.next;if(t!==null)dt=t,ot=e;else{if(e===null)throw Error(F(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},dt===null?qe.memoizedState=dt=e:dt=dt.next=e}return dt}function Oi(e,t){return typeof t=="function"?t(e):t}function qd(e){var t=Cn(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=ot,a=r.baseQueue,o=n.pending;if(o!==null){if(a!==null){var i=a.next;a.next=o.next,o.next=i}r.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,r=r.baseState;var l=i=null,c=null,u=o;do{var f=u.lane;if((ra&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,i=r):c=c.next=h,qe.lanes|=f,sa|=f}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=l,Bn(r,t.memoizedState)||(Wt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){a=e;do o=a.lane,qe.lanes|=o,sa|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kd(e){var t=Cn(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var i=a=a.next;do o=e(o,i.action),i=i.next;while(i!==a);Bn(o,t.memoizedState)||(Wt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function jw(){}function bw(e,t){var n=qe,r=Cn(),a=t(),o=!Bn(r.memoizedState,a);if(o&&(r.memoizedState=a,Wt=!0),r=r.queue,Bp(Cw.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||dt!==null&&dt.memoizedState.tag&1){if(n.flags|=2048,Di(9,Sw.bind(null,n,r,a,t),void 0,null),ft===null)throw Error(F(349));ra&30||Nw(n,t,a)}return a}function Nw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Sw(e,t,n,r){t.value=n,t.getSnapshot=r,Ew(t)&&Rw(e)}function Cw(e,t,n){return n(function(){Ew(t)&&Rw(e)})}function Ew(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bn(e,n)}catch{return!0}}function Rw(e){var t=Er(e,1);t!==null&&$n(t,e,1,-1)}function Yg(e){var t=Yn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:e},t.queue=e,e=e.dispatch=E2.bind(null,qe,e),[t.memoizedState,e]}function Di(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Pw(){return Cn().memoizedState}function cc(e,t,n,r){var a=Yn();qe.flags|=e,a.memoizedState=Di(1|t,n,void 0,r===void 0?null:r)}function Cu(e,t,n,r){var a=Cn();r=r===void 0?null:r;var o=void 0;if(ot!==null){var i=ot.memoizedState;if(o=i.destroy,r!==null&&Fp(r,i.deps)){a.memoizedState=Di(t,n,o,r);return}}qe.flags|=e,a.memoizedState=Di(1|t,n,o,r)}function Xg(e,t){return cc(8390656,8,e,t)}function Bp(e,t){return Cu(2048,8,e,t)}function kw(e,t){return Cu(4,2,e,t)}function Tw(e,t){return Cu(4,4,e,t)}function Aw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _w(e,t,n){return n=n!=null?n.concat([e]):null,Cu(4,4,Aw.bind(null,t,e),n)}function Up(){}function Mw(e,t){var n=Cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ow(e,t){var n=Cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Dw(e,t,n){return ra&21?(Bn(n,t)||(n=zy(),qe.lanes|=n,sa|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Wt=!0),e.memoizedState=n)}function S2(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=Wd.transition;Wd.transition={};try{e(!1),t()}finally{De=n,Wd.transition=r}}function Iw(){return Cn().memoizedState}function C2(e,t,n){var r=xs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Lw(e))Fw(t,n);else if(n=vw(e,t,n,r),n!==null){var a=It();$n(n,e,r,a),$w(n,t,r)}}function E2(e,t,n){var r=xs(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lw(e))Fw(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,n);if(a.hasEagerState=!0,a.eagerState=l,Bn(l,i)){var c=t.interleaved;c===null?(a.next=a,Mp(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}n=vw(e,t,a,r),n!==null&&(a=It(),$n(n,e,r,a),$w(n,t,r))}}function Lw(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Fw(e,t){mi=Gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $w(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yp(e,n)}}var Qc={readContext:Sn,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},R2={readContext:Sn,useCallback:function(e,t){return Yn().memoizedState=[e,t===void 0?null:t],e},useContext:Sn,useEffect:Xg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cc(4194308,4,Aw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cc(4194308,4,e,t)},useInsertionEffect:function(e,t){return cc(4,2,e,t)},useMemo:function(e,t){var n=Yn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yn();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=C2.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=Yn();return e={current:e},t.memoizedState=e},useState:Yg,useDebugValue:Up,useDeferredValue:function(e){return Yn().memoizedState=e},useTransition:function(){var e=Yg(!1),t=e[0];return e=S2.bind(null,e[1]),Yn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,a=Yn();if(He){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),ft===null)throw Error(F(349));ra&30||Nw(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Xg(Cw.bind(null,r,o,e),[e]),r.flags|=2048,Di(9,Sw.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Yn(),t=ft.identifierPrefix;if(He){var n=jr,r=wr;n=(r&~(1<<32-Fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Mi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=N2++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},P2={readContext:Sn,useCallback:Mw,useContext:Sn,useEffect:Bp,useImperativeHandle:_w,useInsertionEffect:kw,useLayoutEffect:Tw,useMemo:Ow,useReducer:qd,useRef:Pw,useState:function(){return qd(Oi)},useDebugValue:Up,useDeferredValue:function(e){var t=Cn();return Dw(t,ot.memoizedState,e)},useTransition:function(){var e=qd(Oi)[0],t=Cn().memoizedState;return[e,t]},useMutableSource:jw,useSyncExternalStore:bw,useId:Iw,unstable_isNewReconciler:!1},k2={readContext:Sn,useCallback:Mw,useContext:Sn,useEffect:Bp,useImperativeHandle:_w,useInsertionEffect:kw,useLayoutEffect:Tw,useMemo:Ow,useReducer:Kd,useRef:Pw,useState:function(){return Kd(Oi)},useDebugValue:Up,useDeferredValue:function(e){var t=Cn();return ot===null?t.memoizedState=e:Dw(t,ot.memoizedState,e)},useTransition:function(){var e=Kd(Oi)[0],t=Cn().memoizedState;return[e,t]},useMutableSource:jw,useSyncExternalStore:bw,useId:Iw,unstable_isNewReconciler:!1};function Mn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Zf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Eu={isMounted:function(e){return(e=e._reactInternals)?ga(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=It(),a=xs(e),o=br(r,a);o.payload=t,n!=null&&(o.callback=n),t=ms(e,o,a),t!==null&&($n(t,e,a,r),ic(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=It(),a=xs(e),o=br(r,a);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ms(e,o,a),t!==null&&($n(t,e,a,r),ic(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=It(),r=xs(e),a=br(n,r);a.tag=2,t!=null&&(a.callback=t),t=ms(e,a,r),t!==null&&($n(t,e,r,n),ic(t,e,r))}};function Jg(e,t,n,r,a,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ri(n,r)||!Ri(a,o):!0}function zw(e,t,n){var r=!1,a=bs,o=t.contextType;return typeof o=="object"&&o!==null?o=Sn(o):(a=Qt(t)?ta:Rt.current,r=t.contextTypes,o=(r=r!=null)?uo(e,a):bs),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Eu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function Zg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Eu.enqueueReplaceState(t,t.state,null)}function eh(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Op(e);var o=t.contextType;typeof o=="object"&&o!==null?a.context=Sn(o):(o=Qt(t)?ta:Rt.current,a.context=uo(e,o)),a.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Zf(e,t,o,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Eu.enqueueReplaceState(a,a.state,null),qc(e,n,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function mo(e,t){try{var n="",r=t;do n+=rE(r),r=r.return;while(r);var a=n}catch(o){a=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:a,digest:null}}function Gd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function th(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var T2=typeof WeakMap=="function"?WeakMap:Map;function Bw(e,t,n){n=br(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xc||(Xc=!0,dh=r),th(e,t)},n}function Uw(e,t,n){n=br(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){th(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){th(e,t),typeof r!="function"&&(gs===null?gs=new Set([this]):gs.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function ex(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new T2;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=H2.bind(null,e,t,n),t.then(e,e))}function tx(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function nx(e,t,n,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=br(-1,1),t.tag=2,ms(n,t,1))),n.lanes|=1),e)}var A2=Ar.ReactCurrentOwner,Wt=!1;function Tt(e,t,n,r){t.child=e===null?xw(t,null,n,r):ho(t,e.child,n,r)}function rx(e,t,n,r,a){n=n.render;var o=t.ref;return Wa(t,a),r=$p(e,t,n,r,o,a),n=zp(),e!==null&&!Wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Rr(e,t,a)):(He&&n&&Rp(t),t.flags|=1,Tt(e,t,r,a),t.child)}function sx(e,t,n,r,a){if(e===null){var o=n.type;return typeof o=="function"&&!Yp(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Vw(e,t,o,r,a)):(e=hc(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&a)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ri,n(i,r)&&e.ref===t.ref)return Rr(e,t,a)}return t.flags|=1,e=vs(o,r),e.ref=t.ref,e.return=t,t.child=e}function Vw(e,t,n,r,a){if(e!==null){var o=e.memoizedProps;if(Ri(o,r)&&e.ref===t.ref)if(Wt=!1,t.pendingProps=r=o,(e.lanes&a)!==0)e.flags&131072&&(Wt=!0);else return t.lanes=e.lanes,Rr(e,t,a)}return nh(e,t,n,r,a)}function Hw(e,t,n){var r=t.pendingProps,a=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(za,nn),nn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(za,nn),nn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Le(za,nn),nn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Le(za,nn),nn|=r;return Tt(e,t,a,n),t.child}function Ww(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function nh(e,t,n,r,a){var o=Qt(n)?ta:Rt.current;return o=uo(t,o),Wa(t,a),n=$p(e,t,n,r,o,a),r=zp(),e!==null&&!Wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Rr(e,t,a)):(He&&r&&Rp(t),t.flags|=1,Tt(e,t,n,a),t.child)}function ax(e,t,n,r,a){if(Qt(n)){var o=!0;Bc(t)}else o=!1;if(Wa(t,a),t.stateNode===null)uc(e,t),zw(t,n,r),eh(t,n,r,a),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Sn(u):(u=Qt(n)?ta:Rt.current,u=uo(t,u));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&Zg(t,i,r,u),Gr=!1;var p=t.memoizedState;i.state=p,qc(t,r,i,a),c=t.memoizedState,l!==r||p!==c||Gt.current||Gr?(typeof f=="function"&&(Zf(t,n,f,r),c=t.memoizedState),(l=Gr||Jg(t,n,l,r,p,c,u))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,yw(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Mn(t.type,l),i.props=u,h=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Sn(c):(c=Qt(n)?ta:Rt.current,c=uo(t,c));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==h||p!==c)&&Zg(t,i,r,c),Gr=!1,p=t.memoizedState,i.state=p,qc(t,r,i,a);var y=t.memoizedState;l!==h||p!==y||Gt.current||Gr?(typeof m=="function"&&(Zf(t,n,m,r),y=t.memoizedState),(u=Gr||Jg(t,n,u,r,p,y,c)||!1)?(f||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,y,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,y,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),i.props=r,i.state=y,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return rh(e,t,n,r,o,a)}function rh(e,t,n,r,a,o){Ww(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return a&&Hg(t,n,!1),Rr(e,t,o);r=t.stateNode,A2.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=ho(t,e.child,null,o),t.child=ho(t,null,l,o)):Tt(e,t,l,o),t.memoizedState=r.state,a&&Hg(t,n,!0),t.child}function qw(e){var t=e.stateNode;t.pendingContext?Vg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Vg(e,t.context,!1),Dp(e,t.containerInfo)}function ox(e,t,n,r,a){return fo(),kp(a),t.flags|=256,Tt(e,t,n,r),t.child}var sh={dehydrated:null,treeContext:null,retryLane:0};function ah(e){return{baseLanes:e,cachePool:null,transitions:null}}function Kw(e,t,n){var r=t.pendingProps,a=We.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Le(We,a&1),e===null)return Xf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=ku(i,r,0,null),e=Zs(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ah(n),t.memoizedState=sh,e):Vp(t,i));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return _2(e,t,i,r,l,a,n);if(o){o=r.fallback,i=t.mode,a=e.child,l=a.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=vs(a,c),r.subtreeFlags=a.subtreeFlags&14680064),l!==null?o=vs(l,o):(o=Zs(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?ah(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=sh,r}return o=e.child,e=o.sibling,r=vs(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Vp(e,t){return t=ku({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ul(e,t,n,r){return r!==null&&kp(r),ho(t,e.child,null,n),e=Vp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _2(e,t,n,r,a,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Gd(Error(F(422))),Ul(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,a=t.mode,r=ku({mode:"visible",children:r.children},a,0,null),o=Zs(o,a,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ho(t,e.child,null,i),t.child.memoizedState=ah(i),t.memoizedState=sh,o);if(!(t.mode&1))return Ul(e,t,i,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(F(419)),r=Gd(o,r,void 0),Ul(e,t,i,r)}if(l=(i&e.childLanes)!==0,Wt||l){if(r=ft,r!==null){switch(i&-i){case 4:a=2;break;case 16:a=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(r.suspendedLanes|i)?0:a,a!==0&&a!==o.retryLane&&(o.retryLane=a,Er(e,a),$n(r,e,a,-1))}return Qp(),r=Gd(Error(F(421))),Ul(e,t,i,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=W2.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,sn=ps(a.nextSibling),un=t,He=!0,Ln=null,e!==null&&(vn[yn++]=wr,vn[yn++]=jr,vn[yn++]=na,wr=e.id,jr=e.overflow,na=t),t=Vp(t,r.children),t.flags|=4096,t)}function ix(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Jf(e.return,t,n)}function Qd(e,t,n,r,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function Gw(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(Tt(e,t,r.children,n),r=We.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ix(e,n,t);else if(e.tag===19)ix(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Le(We,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Kc(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Qd(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Kc(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Qd(t,!0,n,null,o);break;case"together":Qd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function uc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sa|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=vs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=vs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function M2(e,t,n){switch(t.tag){case 3:qw(t),fo();break;case 5:ww(t);break;case 1:Qt(t.type)&&Bc(t);break;case 4:Dp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Le(Hc,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Le(We,We.current&1),t.flags|=128,null):n&t.child.childLanes?Kw(e,t,n):(Le(We,We.current&1),e=Rr(e,t,n),e!==null?e.sibling:null);Le(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Gw(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Le(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,Hw(e,t,n)}return Rr(e,t,n)}var Qw,oh,Yw,Xw;Qw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};oh=function(){};Yw=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Bs(sr.current);var o=null;switch(n){case"input":a=Pf(e,a),r=Pf(e,r),o=[];break;case"select":a=Ge({},a,{value:void 0}),r=Ge({},r,{value:void 0}),o=[];break;case"textarea":a=Af(e,a),r=Af(e,r),o=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=$c)}Mf(n,r);var i;n=null;for(u in a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var l=a[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(wi.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=a!=null?a[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(wi.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&$e("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Xw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Go(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function wt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function O2(e,t,n){var r=t.pendingProps;switch(Pp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(t),null;case 1:return Qt(t.type)&&zc(),wt(t),null;case 3:return r=t.stateNode,po(),ze(Gt),ze(Rt),Lp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(zl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ln!==null&&(ph(Ln),Ln=null))),oh(e,t),wt(t),null;case 5:Ip(t);var a=Bs(_i.current);if(n=t.type,e!==null&&t.stateNode!=null)Yw(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return wt(t),null}if(e=Bs(sr.current),zl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[er]=t,r[Ti]=o,e=(t.mode&1)!==0,n){case"dialog":$e("cancel",r),$e("close",r);break;case"iframe":case"object":case"embed":$e("load",r);break;case"video":case"audio":for(a=0;a<oi.length;a++)$e(oi[a],r);break;case"source":$e("error",r);break;case"img":case"image":case"link":$e("error",r),$e("load",r);break;case"details":$e("toggle",r);break;case"input":gg(r,o),$e("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},$e("invalid",r);break;case"textarea":vg(r,o),$e("invalid",r)}Mf(n,o),a=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&$l(r.textContent,l,e),a=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&$l(r.textContent,l,e),a=["children",""+l]):wi.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&$e("scroll",r)}switch(n){case"input":Al(r),xg(r,o,!0);break;case"textarea":Al(r),yg(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=$c)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Cy(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/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[er]=t,e[Ti]=r,Qw(e,t,!1,!1),t.stateNode=e;e:{switch(i=Of(n,r),n){case"dialog":$e("cancel",e),$e("close",e),a=r;break;case"iframe":case"object":case"embed":$e("load",e),a=r;break;case"video":case"audio":for(a=0;a<oi.length;a++)$e(oi[a],e);a=r;break;case"source":$e("error",e),a=r;break;case"img":case"image":case"link":$e("error",e),$e("load",e),a=r;break;case"details":$e("toggle",e),a=r;break;case"input":gg(e,r),a=Pf(e,r),$e("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=Ge({},r,{value:void 0}),$e("invalid",e);break;case"textarea":vg(e,r),a=Af(e,r),$e("invalid",e);break;default:a=r}Mf(n,a),l=a;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?Py(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Ey(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&ji(e,c):typeof c=="number"&&ji(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(wi.hasOwnProperty(o)?c!=null&&o==="onScroll"&&$e("scroll",e):c!=null&&hp(e,o,c,i))}switch(n){case"input":Al(e),xg(e,r,!1);break;case"textarea":Al(e),yg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+js(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Ba(e,!!r.multiple,o,!1):r.defaultValue!=null&&Ba(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=$c)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return wt(t),null;case 6:if(e&&t.stateNode!=null)Xw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(n=Bs(_i.current),Bs(sr.current),zl(t)){if(r=t.stateNode,n=t.memoizedProps,r[er]=t,(o=r.nodeValue!==n)&&(e=un,e!==null))switch(e.tag){case 3:$l(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$l(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[er]=t,t.stateNode=r}return wt(t),null;case 13:if(ze(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&sn!==null&&t.mode&1&&!(t.flags&128))mw(),fo(),t.flags|=98560,o=!1;else if(o=zl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(F(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(F(317));o[er]=t}else fo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;wt(t),o=!1}else Ln!==null&&(ph(Ln),Ln=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||We.current&1?lt===0&&(lt=3):Qp())),t.updateQueue!==null&&(t.flags|=4),wt(t),null);case 4:return po(),oh(e,t),e===null&&Pi(t.stateNode.containerInfo),wt(t),null;case 10:return _p(t.type._context),wt(t),null;case 17:return Qt(t.type)&&zc(),wt(t),null;case 19:if(ze(We),o=t.memoizedState,o===null)return wt(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)Go(o,!1);else{if(lt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Kc(e),i!==null){for(t.flags|=128,Go(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Le(We,We.current&1|2),t.child}e=e.sibling}o.tail!==null&&Je()>go&&(t.flags|=128,r=!0,Go(o,!1),t.lanes=4194304)}else{if(!r)if(e=Kc(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Go(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!He)return wt(t),null}else 2*Je()-o.renderingStartTime>go&&n!==1073741824&&(t.flags|=128,r=!0,Go(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=Je(),t.sibling=null,n=We.current,Le(We,r?n&1|2:n&1),t):(wt(t),null);case 22:case 23:return Gp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?nn&1073741824&&(wt(t),t.subtreeFlags&6&&(t.flags|=8192)):wt(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function D2(e,t){switch(Pp(t),t.tag){case 1:return Qt(t.type)&&zc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return po(),ze(Gt),ze(Rt),Lp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ip(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));fo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return po(),null;case 10:return _p(t.type._context),null;case 22:case 23:return Gp(),null;case 24:return null;default:return null}}var Vl=!1,bt=!1,I2=typeof WeakSet=="function"?WeakSet:Set,se=null;function $a(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function ih(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var lx=!1;function L2(e,t){if(Hf=Ic,e=nw(),Ep(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 a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==n||a!==0&&h.nodeType!==3||(l=i+a),h!==o||r!==0&&h.nodeType!==3||(c=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++u===a&&(l=i),p===o&&++f===r&&(c=i),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wf={focusedElem:e,selectionRange:n},Ic=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,v=y.memoizedState,w=t.stateNode,g=w.getSnapshotBeforeUpdate(t.elementType===t.type?x:Mn(t.type,x),v);w.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var j=t.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(b){Ye(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return y=lx,lx=!1,y}function gi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&ih(t,n,o)}a=a.next}while(a!==r)}}function Ru(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 lh(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 Jw(e){var t=e.alternate;t!==null&&(e.alternate=null,Jw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[er],delete t[Ti],delete t[Gf],delete t[y2],delete t[w2])),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 Zw(e){return e.tag===5||e.tag===3||e.tag===4}function cx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zw(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 ch(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=$c));else if(r!==4&&(e=e.child,e!==null))for(ch(e,t,n),e=e.sibling;e!==null;)ch(e,t,n),e=e.sibling}function uh(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(uh(e,t,n),e=e.sibling;e!==null;)uh(e,t,n),e=e.sibling}var ht=null,In=!1;function zr(e,t,n){for(n=n.child;n!==null;)e0(e,t,n),n=n.sibling}function e0(e,t,n){if(rr&&typeof rr.onCommitFiberUnmount=="function")try{rr.onCommitFiberUnmount(yu,n)}catch{}switch(n.tag){case 5:bt||$a(n,t);case 6:var r=ht,a=In;ht=null,zr(e,t,n),ht=r,In=a,ht!==null&&(In?(e=ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ht.removeChild(n.stateNode));break;case 18:ht!==null&&(In?(e=ht,n=n.stateNode,e.nodeType===8?Ud(e.parentNode,n):e.nodeType===1&&Ud(e,n),Ci(e)):Ud(ht,n.stateNode));break;case 4:r=ht,a=In,ht=n.stateNode.containerInfo,In=!0,zr(e,t,n),ht=r,In=a;break;case 0:case 11:case 14:case 15:if(!bt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&ih(n,t,i),a=a.next}while(a!==r)}zr(e,t,n);break;case 1:if(!bt&&($a(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ye(n,t,l)}zr(e,t,n);break;case 21:zr(e,t,n);break;case 22:n.mode&1?(bt=(r=bt)||n.memoizedState!==null,zr(e,t,n),bt=r):zr(e,t,n);break;default:zr(e,t,n)}}function ux(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new I2),t.forEach(function(r){var a=q2.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function Tn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r];try{var o=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:ht=l.stateNode,In=!1;break e;case 3:ht=l.stateNode.containerInfo,In=!0;break e;case 4:ht=l.stateNode.containerInfo,In=!0;break e}l=l.return}if(ht===null)throw Error(F(160));e0(o,i,a),ht=null,In=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(u){Ye(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)t0(t,e),t=t.sibling}function t0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tn(t,e),Gn(e),r&4){try{gi(3,e,e.return),Ru(3,e)}catch(x){Ye(e,e.return,x)}try{gi(5,e,e.return)}catch(x){Ye(e,e.return,x)}}break;case 1:Tn(t,e),Gn(e),r&512&&n!==null&&$a(n,n.return);break;case 5:if(Tn(t,e),Gn(e),r&512&&n!==null&&$a(n,n.return),e.flags&32){var a=e.stateNode;try{ji(a,"")}catch(x){Ye(e,e.return,x)}}if(r&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Ny(a,o),Of(l,i);var u=Of(l,o);for(i=0;i<c.length;i+=2){var f=c[i],h=c[i+1];f==="style"?Py(a,h):f==="dangerouslySetInnerHTML"?Ey(a,h):f==="children"?ji(a,h):hp(a,f,h,u)}switch(l){case"input":kf(a,o);break;case"textarea":Sy(a,o);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?Ba(a,!!o.multiple,m,!1):p!==!!o.multiple&&(o.defaultValue!=null?Ba(a,!!o.multiple,o.defaultValue,!0):Ba(a,!!o.multiple,o.multiple?[]:"",!1))}a[Ti]=o}catch(x){Ye(e,e.return,x)}}break;case 6:if(Tn(t,e),Gn(e),r&4){if(e.stateNode===null)throw Error(F(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(x){Ye(e,e.return,x)}}break;case 3:if(Tn(t,e),Gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ci(t.containerInfo)}catch(x){Ye(e,e.return,x)}break;case 4:Tn(t,e),Gn(e);break;case 13:Tn(t,e),Gn(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(qp=Je())),r&4&&ux(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(bt=(u=bt)||f,Tn(t,e),bt=u):Tn(t,e),Gn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(se=e,f=e.child;f!==null;){for(h=se=f;se!==null;){switch(p=se,m=p.child,p.tag){case 0:case 11:case 14:case 15:gi(4,p,p.return);break;case 1:$a(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){Ye(r,n,x)}}break;case 5:$a(p,p.return);break;case 22:if(p.memoizedState!==null){fx(h);continue}}m!==null?(m.return=p,se=m):fx(h)}f=f.sibling}e:for(f=null,h=e;;){if(h.tag===5){if(f===null){f=h;try{a=h.stateNode,u?(o=a.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,c=h.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Ry("display",i))}catch(x){Ye(e,e.return,x)}}}else if(h.tag===6){if(f===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(x){Ye(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Tn(t,e),Gn(e),r&4&&ux(e);break;case 21:break;default:Tn(t,e),Gn(e)}}function Gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Zw(n)){var r=n;break e}n=n.return}throw Error(F(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(ji(a,""),r.flags&=-33);var o=cx(e);uh(e,o,a);break;case 3:case 4:var i=r.stateNode.containerInfo,l=cx(e);ch(e,l,i);break;default:throw Error(F(161))}}catch(c){Ye(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function F2(e,t,n){se=e,n0(e)}function n0(e,t,n){for(var r=(e.mode&1)!==0;se!==null;){var a=se,o=a.child;if(a.tag===22&&r){var i=a.memoizedState!==null||Vl;if(!i){var l=a.alternate,c=l!==null&&l.memoizedState!==null||bt;l=Vl;var u=bt;if(Vl=i,(bt=c)&&!u)for(se=a;se!==null;)i=se,c=i.child,i.tag===22&&i.memoizedState!==null?hx(a):c!==null?(c.return=i,se=c):hx(a);for(;o!==null;)se=o,n0(o),o=o.sibling;se=a,Vl=l,bt=u}dx(e)}else a.subtreeFlags&8772&&o!==null?(o.return=a,se=o):dx(e)}}function dx(e){for(;se!==null;){var t=se;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:bt||Ru(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!bt)if(n===null)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Mn(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Qg(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Qg(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var h=f.dehydrated;h!==null&&Ci(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}bt||t.flags&512&&lh(t)}catch(p){Ye(t,t.return,p)}}if(t===e){se=null;break}if(n=t.sibling,n!==null){n.return=t.return,se=n;break}se=t.return}}function fx(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var n=t.sibling;if(n!==null){n.return=t.return,se=n;break}se=t.return}}function hx(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ru(4,t)}catch(c){Ye(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(c){Ye(t,a,c)}}var o=t.return;try{lh(t)}catch(c){Ye(t,o,c)}break;case 5:var i=t.return;try{lh(t)}catch(c){Ye(t,i,c)}}}catch(c){Ye(t,t.return,c)}if(t===e){se=null;break}var l=t.sibling;if(l!==null){l.return=t.return,se=l;break}se=t.return}}var $2=Math.ceil,Yc=Ar.ReactCurrentDispatcher,Hp=Ar.ReactCurrentOwner,bn=Ar.ReactCurrentBatchConfig,ke=0,ft=null,nt=null,pt=0,nn=0,za=Es(0),lt=0,Ii=null,sa=0,Pu=0,Wp=0,xi=null,Ht=null,qp=0,go=1/0,gr=null,Xc=!1,dh=null,gs=null,Hl=!1,ls=null,Jc=0,vi=0,fh=null,dc=-1,fc=0;function It(){return ke&6?Je():dc!==-1?dc:dc=Je()}function xs(e){return e.mode&1?ke&2&&pt!==0?pt&-pt:b2.transition!==null?(fc===0&&(fc=zy()),fc):(e=De,e!==0||(e=window.event,e=e===void 0?16:Ky(e.type)),e):1}function $n(e,t,n,r){if(50<vi)throw vi=0,fh=null,Error(F(185));el(e,n,r),(!(ke&2)||e!==ft)&&(e===ft&&(!(ke&2)&&(Pu|=n),lt===4&&Yr(e,pt)),Yt(e,r),n===1&&ke===0&&!(t.mode&1)&&(go=Je()+500,Su&&Rs()))}function Yt(e,t){var n=e.callbackNode;bE(e,t);var r=Dc(e,e===ft?pt:0);if(r===0)n!==null&&bg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&bg(n),t===1)e.tag===0?j2(px.bind(null,e)):fw(px.bind(null,e)),x2(function(){!(ke&6)&&Rs()}),n=null;else{switch(By(r)){case 1:n=vp;break;case 4:n=Fy;break;case 16:n=Oc;break;case 536870912:n=$y;break;default:n=Oc}n=u0(n,r0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function r0(e,t){if(dc=-1,fc=0,ke&6)throw Error(F(327));var n=e.callbackNode;if(qa()&&e.callbackNode!==n)return null;var r=Dc(e,e===ft?pt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Zc(e,r);else{t=r;var a=ke;ke|=2;var o=a0();(ft!==e||pt!==t)&&(gr=null,go=Je()+500,Js(e,t));do try{U2();break}catch(l){s0(e,l)}while(!0);Ap(),Yc.current=o,ke=a,nt!==null?t=0:(ft=null,pt=0,t=lt)}if(t!==0){if(t===2&&(a=$f(e),a!==0&&(r=a,t=hh(e,a))),t===1)throw n=Ii,Js(e,0),Yr(e,r),Yt(e,Je()),n;if(t===6)Yr(e,r);else{if(a=e.current.alternate,!(r&30)&&!z2(a)&&(t=Zc(e,r),t===2&&(o=$f(e),o!==0&&(r=o,t=hh(e,o))),t===1))throw n=Ii,Js(e,0),Yr(e,r),Yt(e,Je()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(F(345));case 2:Ls(e,Ht,gr);break;case 3:if(Yr(e,r),(r&130023424)===r&&(t=qp+500-Je(),10<t)){if(Dc(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){It(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Kf(Ls.bind(null,e,Ht,gr),t);break}Ls(e,Ht,gr);break;case 4:if(Yr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var i=31-Fn(r);o=1<<i,i=t[i],i>a&&(a=i),r&=~o}if(r=a,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*$2(r/1960))-r,10<r){e.timeoutHandle=Kf(Ls.bind(null,e,Ht,gr),r);break}Ls(e,Ht,gr);break;case 5:Ls(e,Ht,gr);break;default:throw Error(F(329))}}}return Yt(e,Je()),e.callbackNode===n?r0.bind(null,e):null}function hh(e,t){var n=xi;return e.current.memoizedState.isDehydrated&&(Js(e,t).flags|=256),e=Zc(e,t),e!==2&&(t=Ht,Ht=n,t!==null&&ph(t)),e}function ph(e){Ht===null?Ht=e:Ht.push.apply(Ht,e)}function z2(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!Bn(o(),a))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yr(e,t){for(t&=~Wp,t&=~Pu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Fn(t),r=1<<n;e[n]=-1,t&=~r}}function px(e){if(ke&6)throw Error(F(327));qa();var t=Dc(e,0);if(!(t&1))return Yt(e,Je()),null;var n=Zc(e,t);if(e.tag!==0&&n===2){var r=$f(e);r!==0&&(t=r,n=hh(e,r))}if(n===1)throw n=Ii,Js(e,0),Yr(e,t),Yt(e,Je()),n;if(n===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ls(e,Ht,gr),Yt(e,Je()),null}function Kp(e,t){var n=ke;ke|=1;try{return e(t)}finally{ke=n,ke===0&&(go=Je()+500,Su&&Rs())}}function aa(e){ls!==null&&ls.tag===0&&!(ke&6)&&qa();var t=ke;ke|=1;var n=bn.transition,r=De;try{if(bn.transition=null,De=1,e)return e()}finally{De=r,bn.transition=n,ke=t,!(ke&6)&&Rs()}}function Gp(){nn=za.current,ze(za)}function Js(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,g2(n)),nt!==null)for(n=nt.return;n!==null;){var r=n;switch(Pp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zc();break;case 3:po(),ze(Gt),ze(Rt),Lp();break;case 5:Ip(r);break;case 4:po();break;case 13:ze(We);break;case 19:ze(We);break;case 10:_p(r.type._context);break;case 22:case 23:Gp()}n=n.return}if(ft=e,nt=e=vs(e.current,null),pt=nn=t,lt=0,Ii=null,Wp=Pu=sa=0,Ht=xi=null,zs!==null){for(t=0;t<zs.length;t++)if(n=zs[t],r=n.interleaved,r!==null){n.interleaved=null;var a=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=a,r.next=i}n.pending=r}zs=null}return e}function s0(e,t){do{var n=nt;try{if(Ap(),lc.current=Qc,Gc){for(var r=qe.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Gc=!1}if(ra=0,dt=ot=qe=null,mi=!1,Mi=0,Hp.current=null,n===null||n.return===null){lt=1,Ii=t,nt=null;break}e:{var o=e,i=n.return,l=n,c=t;if(t=pt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=l,h=f.tag;if(!(f.mode&1)&&(h===0||h===11||h===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=tx(i);if(m!==null){m.flags&=-257,nx(m,i,l,o,t),m.mode&1&&ex(o,u,t),t=m,c=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(c),t.updateQueue=x}else y.add(c);break e}else{if(!(t&1)){ex(o,u,t),Qp();break e}c=Error(F(426))}}else if(He&&l.mode&1){var v=tx(i);if(v!==null){!(v.flags&65536)&&(v.flags|=256),nx(v,i,l,o,t),kp(mo(c,l));break e}}o=c=mo(c,l),lt!==4&&(lt=2),xi===null?xi=[o]:xi.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var w=Bw(o,c,t);Gg(o,w);break e;case 1:l=c;var g=o.type,j=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(gs===null||!gs.has(j)))){o.flags|=65536,t&=-t,o.lanes|=t;var b=Uw(o,l,t);Gg(o,b);break e}}o=o.return}while(o!==null)}i0(n)}catch(N){t=N,nt===n&&n!==null&&(nt=n=n.return);continue}break}while(!0)}function a0(){var e=Yc.current;return Yc.current=Qc,e===null?Qc:e}function Qp(){(lt===0||lt===3||lt===2)&&(lt=4),ft===null||!(sa&268435455)&&!(Pu&268435455)||Yr(ft,pt)}function Zc(e,t){var n=ke;ke|=2;var r=a0();(ft!==e||pt!==t)&&(gr=null,Js(e,t));do try{B2();break}catch(a){s0(e,a)}while(!0);if(Ap(),ke=n,Yc.current=r,nt!==null)throw Error(F(261));return ft=null,pt=0,lt}function B2(){for(;nt!==null;)o0(nt)}function U2(){for(;nt!==null&&!hE();)o0(nt)}function o0(e){var t=c0(e.alternate,e,nn);e.memoizedProps=e.pendingProps,t===null?i0(e):nt=t,Hp.current=null}function i0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=D2(n,t),n!==null){n.flags&=32767,nt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{lt=6,nt=null;return}}else if(n=O2(n,t,nn),n!==null){nt=n;return}if(t=t.sibling,t!==null){nt=t;return}nt=t=e}while(t!==null);lt===0&&(lt=5)}function Ls(e,t,n){var r=De,a=bn.transition;try{bn.transition=null,De=1,V2(e,t,n,r)}finally{bn.transition=a,De=r}return null}function V2(e,t,n,r){do qa();while(ls!==null);if(ke&6)throw Error(F(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(NE(e,o),e===ft&&(nt=ft=null,pt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Hl||(Hl=!0,u0(Oc,function(){return qa(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=bn.transition,bn.transition=null;var i=De;De=1;var l=ke;ke|=4,Hp.current=null,L2(e,n),t0(n,e),c2(Wf),Ic=!!Hf,Wf=Hf=null,e.current=n,F2(n),pE(),ke=l,De=i,bn.transition=o}else e.current=n;if(Hl&&(Hl=!1,ls=e,Jc=a),o=e.pendingLanes,o===0&&(gs=null),xE(n.stateNode),Yt(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(Xc)throw Xc=!1,e=dh,dh=null,e;return Jc&1&&e.tag!==0&&qa(),o=e.pendingLanes,o&1?e===fh?vi++:(vi=0,fh=e):vi=0,Rs(),null}function qa(){if(ls!==null){var e=By(Jc),t=bn.transition,n=De;try{if(bn.transition=null,De=16>e?16:e,ls===null)var r=!1;else{if(e=ls,ls=null,Jc=0,ke&6)throw Error(F(331));var a=ke;for(ke|=4,se=e.current;se!==null;){var o=se,i=o.child;if(se.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(se=u;se!==null;){var f=se;switch(f.tag){case 0:case 11:case 15:gi(8,f,o)}var h=f.child;if(h!==null)h.return=f,se=h;else for(;se!==null;){f=se;var p=f.sibling,m=f.return;if(Jw(f),f===u){se=null;break}if(p!==null){p.return=m,se=p;break}se=m}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var v=x.sibling;x.sibling=null,x=v}while(x!==null)}}se=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,se=i;else e:for(;se!==null;){if(o=se,o.flags&2048)switch(o.tag){case 0:case 11:case 15:gi(9,o,o.return)}var w=o.sibling;if(w!==null){w.return=o.return,se=w;break e}se=o.return}}var g=e.current;for(se=g;se!==null;){i=se;var j=i.child;if(i.subtreeFlags&2064&&j!==null)j.return=i,se=j;else e:for(i=g;se!==null;){if(l=se,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Ru(9,l)}}catch(N){Ye(l,l.return,N)}if(l===i){se=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,se=b;break e}se=l.return}}if(ke=a,Rs(),rr&&typeof rr.onPostCommitFiberRoot=="function")try{rr.onPostCommitFiberRoot(yu,e)}catch{}r=!0}return r}finally{De=n,bn.transition=t}}return!1}function mx(e,t,n){t=mo(n,t),t=Bw(e,t,1),e=ms(e,t,1),t=It(),e!==null&&(el(e,1,t),Yt(e,t))}function Ye(e,t,n){if(e.tag===3)mx(e,e,n);else for(;t!==null;){if(t.tag===3){mx(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(gs===null||!gs.has(r))){e=mo(n,e),e=Uw(t,e,1),t=ms(t,e,1),e=It(),t!==null&&(el(t,1,e),Yt(t,e));break}}t=t.return}}function H2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=It(),e.pingedLanes|=e.suspendedLanes&n,ft===e&&(pt&n)===n&&(lt===4||lt===3&&(pt&130023424)===pt&&500>Je()-qp?Js(e,0):Wp|=n),Yt(e,t)}function l0(e,t){t===0&&(e.mode&1?(t=Ol,Ol<<=1,!(Ol&130023424)&&(Ol=4194304)):t=1);var n=It();e=Er(e,t),e!==null&&(el(e,t,n),Yt(e,n))}function W2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),l0(e,n)}function q2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),l0(e,n)}var c0;c0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)Wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Wt=!1,M2(e,t,n);Wt=!!(e.flags&131072)}else Wt=!1,He&&t.flags&1048576&&hw(t,Vc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;uc(e,t),e=t.pendingProps;var a=uo(t,Rt.current);Wa(t,n),a=$p(null,t,r,e,a,n);var o=zp();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qt(r)?(o=!0,Bc(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Op(t),a.updater=Eu,t.stateNode=a,a._reactInternals=t,eh(t,r,e,n),t=rh(null,t,r,!0,o,n)):(t.tag=0,He&&o&&Rp(t),Tt(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(uc(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=G2(r),e=Mn(r,e),a){case 0:t=nh(null,t,r,e,n);break e;case 1:t=ax(null,t,r,e,n);break e;case 11:t=rx(null,t,r,e,n);break e;case 14:t=sx(null,t,r,Mn(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Mn(r,a),nh(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Mn(r,a),ax(e,t,r,a,n);case 3:e:{if(qw(t),e===null)throw Error(F(387));r=t.pendingProps,o=t.memoizedState,a=o.element,yw(e,t),qc(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){a=mo(Error(F(423)),t),t=ox(e,t,r,n,a);break e}else if(r!==a){a=mo(Error(F(424)),t),t=ox(e,t,r,n,a);break e}else for(sn=ps(t.stateNode.containerInfo.firstChild),un=t,He=!0,Ln=null,n=xw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fo(),r===a){t=Rr(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return ww(t),e===null&&Xf(t),r=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,i=a.children,qf(r,a)?i=null:o!==null&&qf(r,o)&&(t.flags|=32),Ww(e,t),Tt(e,t,i,n),t.child;case 6:return e===null&&Xf(t),null;case 13:return Kw(e,t,n);case 4:return Dp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ho(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Mn(r,a),rx(e,t,r,a,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,o=t.memoizedProps,i=a.value,Le(Hc,r._currentValue),r._currentValue=i,o!==null)if(Bn(o.value,i)){if(o.children===a.children&&!Gt.current){t=Rr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=br(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Jf(o.return,n,t),l.lanes|=n;break}c=c.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(F(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Jf(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}Tt(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,Wa(t,n),a=Sn(a),r=r(a),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,a=Mn(r,t.pendingProps),a=Mn(r.type,a),sx(e,t,r,a,n);case 15:return Vw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Mn(r,a),uc(e,t),t.tag=1,Qt(r)?(e=!0,Bc(t)):e=!1,Wa(t,n),zw(t,r,a),eh(t,r,a,n),rh(null,t,r,!0,e,n);case 19:return Gw(e,t,n);case 22:return Hw(e,t,n)}throw Error(F(156,t.tag))};function u0(e,t){return Ly(e,t)}function K2(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 wn(e,t,n,r){return new K2(e,t,n,r)}function Yp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function G2(e){if(typeof e=="function")return Yp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mp)return 11;if(e===gp)return 14}return 2}function vs(e,t){var n=e.alternate;return n===null?(n=wn(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 hc(e,t,n,r,a,o){var i=2;if(r=e,typeof e=="function")Yp(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ta:return Zs(n.children,a,o,t);case pp:i=8,a|=8;break;case Sf:return e=wn(12,n,t,a|2),e.elementType=Sf,e.lanes=o,e;case Cf:return e=wn(13,n,t,a),e.elementType=Cf,e.lanes=o,e;case Ef:return e=wn(19,n,t,a),e.elementType=Ef,e.lanes=o,e;case wy:return ku(n,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vy:i=10;break e;case yy:i=9;break e;case mp:i=11;break e;case gp:i=14;break e;case Kr:i=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=wn(i,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Zs(e,t,n,r){return e=wn(7,e,r,t),e.lanes=n,e}function ku(e,t,n,r){return e=wn(22,e,r,t),e.elementType=wy,e.lanes=n,e.stateNode={isHidden:!1},e}function Yd(e,t,n){return e=wn(6,e,null,t),e.lanes=n,e}function Xd(e,t,n){return t=wn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Q2(e,t,n,r,a){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=Ad(0),this.expirationTimes=Ad(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ad(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Xp(e,t,n,r,a,o,i,l,c){return e=new Q2(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=wn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Op(o),e}function Y2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ka,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function d0(e){if(!e)return bs;e=e._reactInternals;e:{if(ga(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Qt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var n=e.type;if(Qt(n))return dw(e,n,t)}return t}function f0(e,t,n,r,a,o,i,l,c){return e=Xp(n,r,!0,e,a,o,i,l,c),e.context=d0(null),n=e.current,r=It(),a=xs(n),o=br(r,a),o.callback=t??null,ms(n,o,a),e.current.lanes=a,el(e,a,r),Yt(e,r),e}function Tu(e,t,n,r){var a=t.current,o=It(),i=xs(a);return n=d0(n),t.context===null?t.context=n:t.pendingContext=n,t=br(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ms(a,t,i),e!==null&&($n(e,a,i,o),ic(e,a,i)),i}function eu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function gx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Jp(e,t){gx(e,t),(e=e.alternate)&&gx(e,t)}function X2(){return null}var h0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Zp(e){this._internalRoot=e}Au.prototype.render=Zp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));Tu(e,t,null,null)};Au.prototype.unmount=Zp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;aa(function(){Tu(null,e,null,null)}),t[Cr]=null}};function Au(e){this._internalRoot=e}Au.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qr.length&&t!==0&&t<Qr[n].priority;n++);Qr.splice(n,0,e),n===0&&qy(e)}};function em(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xx(){}function J2(e,t,n,r,a){if(a){if(typeof r=="function"){var o=r;r=function(){var u=eu(i);o.call(u)}}var i=f0(t,r,e,0,null,!1,!1,"",xx);return e._reactRootContainer=i,e[Cr]=i.current,Pi(e.nodeType===8?e.parentNode:e),aa(),i}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var l=r;r=function(){var u=eu(c);l.call(u)}}var c=Xp(e,0,!1,null,null,!1,!1,"",xx);return e._reactRootContainer=c,e[Cr]=c.current,Pi(e.nodeType===8?e.parentNode:e),aa(function(){Tu(t,c,n,r)}),c}function Mu(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o;if(typeof a=="function"){var l=a;a=function(){var c=eu(i);l.call(c)}}Tu(t,i,e,a)}else i=J2(n,t,e,a,r);return eu(i)}Uy=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ai(t.pendingLanes);n!==0&&(yp(t,n|1),Yt(t,Je()),!(ke&6)&&(go=Je()+500,Rs()))}break;case 13:aa(function(){var r=Er(e,1);if(r!==null){var a=It();$n(r,e,1,a)}}),Jp(e,1)}};wp=function(e){if(e.tag===13){var t=Er(e,134217728);if(t!==null){var n=It();$n(t,e,134217728,n)}Jp(e,134217728)}};Vy=function(e){if(e.tag===13){var t=xs(e),n=Er(e,t);if(n!==null){var r=It();$n(n,e,t,r)}Jp(e,t)}};Hy=function(){return De};Wy=function(e,t){var n=De;try{return De=e,t()}finally{De=n}};If=function(e,t,n){switch(t){case"input":if(kf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=Nu(r);if(!a)throw Error(F(90));by(r),kf(r,a)}}}break;case"textarea":Sy(e,n);break;case"select":t=n.value,t!=null&&Ba(e,!!n.multiple,t,!1)}};Ay=Kp;_y=aa;var Z2={usingClientEntryPoint:!1,Events:[nl,Oa,Nu,ky,Ty,Kp]},Qo={findFiberByHostInstance:$s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},eR={bundleType:Qo.bundleType,version:Qo.version,rendererPackageName:Qo.rendererPackageName,rendererConfig:Qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ar.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Dy(e),e===null?null:e.stateNode},findFiberByHostInstance:Qo.findFiberByHostInstance||X2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wl.isDisabled&&Wl.supportsFiber)try{yu=Wl.inject(eR),rr=Wl}catch{}}pn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z2;pn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!em(t))throw Error(F(200));return Y2(e,t,null,n)};pn.createRoot=function(e,t){if(!em(e))throw Error(F(299));var n=!1,r="",a=h0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Xp(e,1,!1,null,null,n,!1,r,a),e[Cr]=t.current,Pi(e.nodeType===8?e.parentNode:e),new Zp(t)};pn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=Dy(t),e=e===null?null:e.stateNode,e};pn.flushSync=function(e){return aa(e)};pn.hydrate=function(e,t,n){if(!_u(t))throw Error(F(200));return Mu(null,e,t,!0,n)};pn.hydrateRoot=function(e,t,n){if(!em(e))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,a=!1,o="",i=h0;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=f0(t,null,e,1,n??null,a,!1,o,i),e[Cr]=t.current,Pi(e),r)for(e=0;e<r.length;e++)n=r[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Au(t)};pn.render=function(e,t,n){if(!_u(t))throw Error(F(200));return Mu(null,e,t,!1,n)};pn.unmountComponentAtNode=function(e){if(!_u(e))throw Error(F(40));return e._reactRootContainer?(aa(function(){Mu(null,null,e,!1,function(){e._reactRootContainer=null,e[Cr]=null})}),!0):!1};pn.unstable_batchedUpdates=Kp;pn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_u(n))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return Mu(e,t,n,!1,r)};pn.version="18.3.1-next-f1338f8080-20240426";function p0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p0)}catch(e){console.error(e)}}p0(),py.exports=pn;var xa=py.exports;const m0=ny(xa);var g0,vx=xa;g0=vx.createRoot,vx.hydrateRoot;const tR=1,nR=1e6;let Jd=0;function rR(){return Jd=(Jd+1)%Number.MAX_SAFE_INTEGER,Jd.toString()}const Zd=new Map,yx=e=>{if(Zd.has(e))return;const t=setTimeout(()=>{Zd.delete(e),yi({type:"REMOVE_TOAST",toastId:e})},nR);Zd.set(e,t)},sR=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,tR)};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?yx(n):e.toasts.forEach(r=>{yx(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)}}},pc=[];let mc={toasts:[]};function yi(e){mc=sR(mc,e),pc.forEach(t=>{t(mc)})}function aR({...e}){const t=rR(),n=a=>yi({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>yi({type:"DISMISS_TOAST",toastId:t});return yi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function tm(){const[e,t]=d.useState(mc);return d.useEffect(()=>(pc.push(t),()=>{const n=pc.indexOf(t);n>-1&&pc.splice(n,1)}),[e]),{...e,toast:aR,dismiss:n=>yi({type:"DISMISS_TOAST",toastId:n})}}function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function wx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ou(...e){return t=>{let n=!1;const r=e.map(a=>{const o=wx(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():wx(e[a],null)}}}}function ve(...e){return d.useCallback(Ou(...e),e)}function oR(e,t){const n=d.createContext(t),r=o=>{const{children:i,...l}=o,c=d.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function a(o){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function $t(e,t=[]){let n=[];function r(o,i){const l=d.createContext(i),c=n.length;n=[...n,i];const u=h=>{var w;const{scope:p,children:m,...y}=h,x=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=d.useMemo(()=>y,Object.values(y));return s.jsx(x.Provider,{value:v,children:m})};u.displayName=o+"Provider";function f(h,p){var x;const m=((x=p==null?void 0:p[e])==null?void 0:x[c])||l,y=d.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,f]}const a=()=>{const o=n.map(i=>d.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,iR(a,...t)]}function iR(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function oa(e){const t=lR(e),n=d.forwardRef((r,a)=>{const{children:o,...i}=r,l=d.Children.toArray(o),c=l.find(cR);if(c){const u=c.props.children,f=l.map(h=>h===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return s.jsx(t,{...i,ref:a,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var Ro=oa("Slot");function lR(e){const t=d.forwardRef((n,r)=>{const{children:a,...o}=n;if(d.isValidElement(a)){const i=dR(a),l=uR(o,a.props);return a.type!==d.Fragment&&(l.ref=r?Ou(r,i):i),d.cloneElement(a,l)}return d.Children.count(a)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var x0=Symbol("radix.slottable");function v0(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=x0,t}function cR(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x0}function uR(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...l)=>{const c=o(...l);return a(...l),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function dR(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Du(e){const t=e+"CollectionProvider",[n,r]=$t(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:v,children:w}=x,g=B.useRef(null),j=B.useRef(new Map).current;return s.jsx(a,{scope:v,itemMap:j,collectionRef:g,children:w})};i.displayName=t;const l=e+"CollectionSlot",c=oa(l),u=B.forwardRef((x,v)=>{const{scope:w,children:g}=x,j=o(l,w),b=ve(v,j.collectionRef);return s.jsx(c,{ref:b,children:g})});u.displayName=l;const f=e+"CollectionItemSlot",h="data-radix-collection-item",p=oa(f),m=B.forwardRef((x,v)=>{const{scope:w,children:g,...j}=x,b=B.useRef(null),N=ve(v,b),S=o(f,w);return B.useEffect(()=>(S.itemMap.set(b,{ref:b,...j}),()=>void S.itemMap.delete(b))),s.jsx(p,{[h]:"",ref:N,children:g})});m.displayName=f;function y(x){const v=o(e+"CollectionConsumer",x);return B.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const j=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((S,C)=>j.indexOf(S.ref.current)-j.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},y,r]}var fR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ce=fR.reduce((e,t)=>{const n=oa(`Primitive.${t}`),r=d.forwardRef((a,o)=>{const{asChild:i,...l}=a,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function nm(e,t){e&&xa.flushSync(()=>e.dispatchEvent(t))}function tn(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function hR(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e);d.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var pR="DismissableLayer",mh="dismissableLayer.update",mR="dismissableLayer.pointerDownOutside",gR="dismissableLayer.focusOutside",jx,y0=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Po=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...c}=e,u=d.useContext(y0),[f,h]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=d.useState({}),y=ve(t,C=>h(C)),x=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(v),g=f?x.indexOf(f):-1,j=u.layersWithOutsidePointerEventsDisabled.size>0,b=g>=w,N=vR(C=>{const P=C.target,R=[...u.branches].some(M=>M.contains(P));!b||R||(a==null||a(C),i==null||i(C),C.defaultPrevented||l==null||l())},p),S=yR(C=>{const P=C.target;[...u.branches].some(M=>M.contains(P))||(o==null||o(C),i==null||i(C),C.defaultPrevented||l==null||l())},p);return hR(C=>{g===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jx=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),bx(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=jx)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),bx())},[f,u]),d.useEffect(()=>{const C=()=>m({});return document.addEventListener(mh,C),()=>document.removeEventListener(mh,C)},[]),s.jsx(ce.div,{...c,ref:y,style:{pointerEvents:j?b?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,S.onFocusCapture),onBlurCapture:W(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,N.onPointerDownCapture)})});Po.displayName=pR;var xR="DismissableLayerBranch",w0=d.forwardRef((e,t)=>{const n=d.useContext(y0),r=d.useRef(null),a=ve(t,r);return d.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),s.jsx(ce.div,{...e,ref:a})});w0.displayName=xR;function vR(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e),r=d.useRef(!1),a=d.useRef(()=>{});return d.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){j0(mR,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yR(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e),r=d.useRef(!1);return d.useEffect(()=>{const a=o=>{o.target&&!r.current&&j0(gR,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bx(){const e=new CustomEvent(mh);document.dispatchEvent(e)}function j0(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?nm(a,o):a.dispatchEvent(o)}var wR=Po,jR=w0,gt=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},bR="Portal",sl=d.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,o]=d.useState(!1);gt(()=>o(!0),[]);const i=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?m0.createPortal(s.jsx(ce.div,{...r,ref:t}),i):null});sl.displayName=bR;function NR(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var En=e=>{const{present:t,children:n}=e,r=SR(t),a=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),o=ve(r.ref,CR(a));return typeof n=="function"||r.isPresent?d.cloneElement(a,{ref:o}):null};En.displayName="Presence";function SR(e){const[t,n]=d.useState(),r=d.useRef(null),a=d.useRef(e),o=d.useRef("none"),i=e?"mounted":"unmounted",[l,c]=NR(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=ql(r.current);o.current=l==="mounted"?u:"none"},[l]),gt(()=>{const u=r.current,f=a.current;if(f!==e){const p=o.current,m=ql(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),gt(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=m=>{const x=ql(r.current).includes(m.animationName);if(m.target===t&&x&&(c("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=m=>{m.target===t&&(o.current=ql(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ql(e){return(e==null?void 0:e.animationName)||"none"}function CR(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ER=up[" useInsertionEffect ".trim().toString()]||gt;function ir({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=RR({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:a;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const h=f.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const u=d.useCallback(f=>{var h;if(l){const p=PR(f)?f(e):f;p!==e&&((h=i.current)==null||h.call(i,p))}else o(f)},[l,e,o,i]);return[c,u]}function RR({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),a=d.useRef(n),o=d.useRef(t);return ER(()=>{o.current=t},[t]),d.useEffect(()=>{var i;a.current!==n&&((i=o.current)==null||i.call(o,n),a.current=n)},[n,a]),[n,r,o]}function PR(e){return typeof e=="function"}var b0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),kR="VisuallyHidden",Iu=d.forwardRef((e,t)=>s.jsx(ce.span,{...e,ref:t,style:{...b0,...e.style}}));Iu.displayName=kR;var TR=Iu,rm="ToastProvider",[sm,AR,_R]=Du("Toast"),[N0,p5]=$t("Toast",[_R]),[MR,Lu]=N0(rm),S0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:i}=e,[l,c]=d.useState(null),[u,f]=d.useState(0),h=d.useRef(!1),p=d.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${rm}\`. Expected non-empty \`string\`.`),s.jsx(sm.Provider,{scope:t,children:s.jsx(MR,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:d.useCallback(()=>f(m=>m+1),[]),onToastRemove:d.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:i})})};S0.displayName=rm;var C0="ToastViewport",OR=["F8"],gh="toast.viewportPause",xh="toast.viewportResume",E0=d.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=OR,label:a="Notifications ({hotkey})",...o}=e,i=Lu(C0,n),l=AR(n),c=d.useRef(null),u=d.useRef(null),f=d.useRef(null),h=d.useRef(null),p=ve(t,h,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;d.useEffect(()=>{const v=w=>{var j;r.length!==0&&r.every(b=>w[b]||w.code===b)&&((j=h.current)==null||j.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),d.useEffect(()=>{const v=c.current,w=h.current;if(y&&v&&w){const g=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(gh);w.dispatchEvent(S),i.isClosePausedRef.current=!0}},j=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(xh);w.dispatchEvent(S),i.isClosePausedRef.current=!1}},b=S=>{!v.contains(S.relatedTarget)&&j()},N=()=>{v.contains(document.activeElement)||j()};return v.addEventListener("focusin",g),v.addEventListener("focusout",b),v.addEventListener("pointermove",g),v.addEventListener("pointerleave",N),window.addEventListener("blur",g),window.addEventListener("focus",j),()=>{v.removeEventListener("focusin",g),v.removeEventListener("focusout",b),v.removeEventListener("pointermove",g),v.removeEventListener("pointerleave",N),window.removeEventListener("blur",g),window.removeEventListener("focus",j)}}},[y,i.isClosePausedRef]);const x=d.useCallback(({tabbingDirection:v})=>{const g=l().map(j=>{const b=j.ref.current,N=[b,...KR(b)];return v==="forwards"?N:N.reverse()});return(v==="forwards"?g.reverse():g).flat()},[l]);return d.useEffect(()=>{const v=h.current;if(v){const w=g=>{var N,S,C;const j=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!j){const P=document.activeElement,R=g.shiftKey;if(g.target===v&&R){(N=u.current)==null||N.focus();return}const D=x({tabbingDirection:R?"backwards":"forwards"}),Z=D.findIndex(I=>I===P);ef(D.slice(Z+1))?g.preventDefault():R?(S=u.current)==null||S.focus():(C=f.current)==null||C.focus()}};return v.addEventListener("keydown",w),()=>v.removeEventListener("keydown",w)}},[l,x]),s.jsxs(jR,{ref:c,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&s.jsx(vh,{ref:u,onFocusFromOutsideViewport:()=>{const v=x({tabbingDirection:"forwards"});ef(v)}}),s.jsx(sm.Slot,{scope:n,children:s.jsx(ce.ol,{tabIndex:-1,...o,ref:p})}),y&&s.jsx(vh,{ref:f,onFocusFromOutsideViewport:()=>{const v=x({tabbingDirection:"backwards"});ef(v)}})]})});E0.displayName=C0;var R0="ToastFocusProxy",vh=d.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=Lu(R0,n);return s.jsx(Iu,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const l=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&r()}})});vh.displayName=R0;var al="Toast",DR="toast.swipeStart",IR="toast.swipeMove",LR="toast.swipeCancel",FR="toast.swipeEnd",P0=d.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...i}=e,[l,c]=ir({prop:r,defaultProp:a??!0,onChange:o,caller:al});return s.jsx(En,{present:n||l,children:s.jsx(BR,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:tn(e.onPause),onResume:tn(e.onResume),onSwipeStart:W(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(e.onSwipeMove,u=>{const{x:f,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:W(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:W(e.onSwipeEnd,u=>{const{x:f,y:h}=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",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});P0.displayName=al;var[$R,zR]=N0(al,{onClose(){}}),BR=d.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:m,...y}=e,x=Lu(al,n),[v,w]=d.useState(null),g=ve(t,I=>w(I)),j=d.useRef(null),b=d.useRef(null),N=a||x.duration,S=d.useRef(0),C=d.useRef(N),P=d.useRef(0),{onToastAdd:R,onToastRemove:M}=x,O=tn(()=>{var re;(v==null?void 0:v.contains(document.activeElement))&&((re=x.viewport)==null||re.focus()),i()}),D=d.useCallback(I=>{!I||I===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout(O,I))},[O]);d.useEffect(()=>{const I=x.viewport;if(I){const re=()=>{D(C.current),u==null||u()},z=()=>{const Q=new Date().getTime()-S.current;C.current=C.current-Q,window.clearTimeout(P.current),c==null||c()};return I.addEventListener(gh,z),I.addEventListener(xh,re),()=>{I.removeEventListener(gh,z),I.removeEventListener(xh,re)}}},[x.viewport,N,c,u,D]),d.useEffect(()=>{o&&!x.isClosePausedRef.current&&D(N)},[o,N,x.isClosePausedRef,D]),d.useEffect(()=>(R(),()=>M()),[R,M]);const Z=d.useMemo(()=>v?D0(v):null,[v]);return x.viewport?s.jsxs(s.Fragment,{children:[Z&&s.jsx(UR,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Z}),s.jsx($R,{scope:n,onClose:O,children:xa.createPortal(s.jsx(sm.ItemSlot,{scope:n,children:s.jsx(wR,{asChild:!0,onEscapeKeyDown:W(l,()=>{x.isFocusedToastEscapeKeyDownRef.current||O(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(ce.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":x.swipeDirection,...y,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:W(e.onPointerDown,I=>{I.button===0&&(j.current={x:I.clientX,y:I.clientY})}),onPointerMove:W(e.onPointerMove,I=>{if(!j.current)return;const re=I.clientX-j.current.x,z=I.clientY-j.current.y,Q=!!b.current,A=["left","right"].includes(x.swipeDirection),k=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,$=A?k(0,re):0,G=A?0:k(0,z),T=I.pointerType==="touch"?10:2,K={x:$,y:G},H={originalEvent:I,delta:K};Q?(b.current=K,Kl(IR,h,H,{discrete:!1})):Nx(K,x.swipeDirection,T)?(b.current=K,Kl(DR,f,H,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(re)>T||Math.abs(z)>T)&&(j.current=null)}),onPointerUp:W(e.onPointerUp,I=>{const re=b.current,z=I.target;if(z.hasPointerCapture(I.pointerId)&&z.releasePointerCapture(I.pointerId),b.current=null,j.current=null,re){const Q=I.currentTarget,A={originalEvent:I,delta:re};Nx(re,x.swipeDirection,x.swipeThreshold)?Kl(FR,m,A,{discrete:!0}):Kl(LR,p,A,{discrete:!0}),Q.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),UR=e=>{const{__scopeToast:t,children:n,...r}=e,a=Lu(al,t),[o,i]=d.useState(!1),[l,c]=d.useState(!1);return WR(()=>i(!0)),d.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(sl,{asChild:!0,children:s.jsx(Iu,{...r,children:o&&s.jsxs(s.Fragment,{children:[a.label," ",n]})})})},VR="ToastTitle",k0=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(ce.div,{...r,ref:t})});k0.displayName=VR;var HR="ToastDescription",T0=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(ce.div,{...r,ref:t})});T0.displayName=HR;var A0="ToastAction",_0=d.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(O0,{altText:n,asChild:!0,children:s.jsx(am,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${A0}\`. Expected non-empty \`string\`.`),null)});_0.displayName=A0;var M0="ToastClose",am=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=zR(M0,n);return s.jsx(O0,{asChild:!0,children:s.jsx(ce.button,{type:"button",...r,ref:t,onClick:W(e.onClick,a.onClose)})})});am.displayName=M0;var O0=d.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return s.jsx(ce.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function D0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qR(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...D0(r))}}),t}function Kl(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?nm(a,o):a.dispatchEvent(o)}var Nx=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function WR(e=()=>{}){const t=tn(e);gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qR(e){return e.nodeType===e.ELEMENT_NODE}function KR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ef(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var GR=S0,I0=E0,L0=P0,F0=k0,$0=T0,z0=_0,B0=am;function U0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=U0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function V0(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=U0(e))&&(r&&(r+=" "),r+=t);return r}const Sx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Cx=V0,va=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(u=>{const f=n==null?void 0:n[u],h=o==null?void 0:o[u];if(f===null)return null;const p=Sx(f)||Sx(h);return a[u][p]}),l=n&&Object.entries(n).reduce((u,f)=>{let[h,p]=f;return p===void 0||(u[h]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:h,className:p,...m}=f;return Object.entries(m).every(y=>{let[x,v]=y;return Array.isArray(v)?v.includes({...o,...l}[x]):{...o,...l}[x]===v})?[...u,h,p]:u},[]);return Cx(e,i,c,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 QR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),H0=(...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 YR={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 XR=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...l},c)=>d.createElement("svg",{ref:c,...YR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:H0("lucide",a),...l},[...i.map(([u,f])=>d.createElement(u,f)),...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 le=(e,t)=>{const n=d.forwardRef(({className:r,...a},o)=>d.createElement(XR,{ref:o,iconNode:t,className:H0(`lucide-${QR(e)}`,r),...a}));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 W0=le("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @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 JR=le("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 ZR=le("BellOff",[["path",{d:"M8.7 3A6 6 0 0 1 18 8a21.3 21.3 0 0 0 .6 5",key:"o7mx20"}],["path",{d:"M17 17H3s3-2 3-9a4.67 4.67 0 0 1 .3-1.7",key:"16f1lm"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @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 q0=le("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
* @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 K0=le("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @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 G0=le("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 Q0=le("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 om=le("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @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 Fu=le("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @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 eP=le("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @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 Li=le("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @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 xt=le("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @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 tP=le("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
* @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 xo=le("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @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 Y0=le("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @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 X0=le("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 J0=le("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @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 yh=le("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
* @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 nP=le("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @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 vo=le("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
* @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 $u=le("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @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 im=le("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
* @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 tf=le("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @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 gc=le("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @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 rP=le("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @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 Z0=le("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
* @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 zu=le("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @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 sP=le("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @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 yo=le("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
* @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 Ex=le("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @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 aP=le("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @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 oP=le("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @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 nf=le("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
* @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=le("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @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 iP=le("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @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 Rx=le("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
* @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 lP=le("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/**
* @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 cP=le("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
* @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 ej=le("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
* @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 wh=le("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
* @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 tj=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @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 Fi=le("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @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 Bu=le("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @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 nj=le("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @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 Uu=le("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 jh=le("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
* @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 uP=le("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @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 dP=le("Tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);/**
* @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 Vu=le("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
* @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 ol=le("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
* @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 Pr=le("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @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 Px=le("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);/**
* @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 rj=le("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @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 sj=le("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @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 aj=le("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/**
* @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 lm=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),cm="-",fP=e=>{const t=pP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const l=i.split(cm);return l[0]===""&&l.length!==1&&l.shift(),oj(l,t)||hP(i)},getConflictingClassGroupIds:(i,l)=>{const c=n[i]||[];return l&&r[i]?[...c,...r[i]]:c}}},oj=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?oj(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(cm);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId},kx=/^\[(.+)\]$/,hP=e=>{if(kx.test(e)){const t=kx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gP(Object.entries(e.classGroups),n).forEach(([o,i])=>{bh(i,r,o,t)}),r},bh=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:Tx(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(mP(a)){bh(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,i])=>{bh(i,Tx(t,o),n,r)})})},Tx=(e,t)=>{let n=e;return t.split(cm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},mP=e=>e.isThemeGetter,gP=(e,t)=>t?e.map(([n,r])=>{const a=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[n,a]}):e,xP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(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 a(o,i),i},set(o,i){n.has(o)?n.set(o,i):a(o,i)}}},ij="!",vP=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],o=t.length,i=l=>{const c=[];let u=0,f=0,h;for(let v=0;v<l.length;v++){let w=l[v];if(u===0){if(w===a&&(r||l.slice(v,v+o)===t)){c.push(l.slice(f,v)),f=v+o;continue}if(w==="/"){h=v;continue}}w==="["?u++:w==="]"&&u--}const p=c.length===0?l:l.substring(f),m=p.startsWith(ij),y=m?p.substring(1):p,x=h&&h>f?h-f:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:x}};return n?l=>n({className:l,parseClassName:i}):i},yP=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},wP=e=>({cache:xP(e.cacheSize),parseClassName:vP(e),...fP(e)}),jP=/\s+/,bP=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],i=e.trim().split(jP);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:f,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}=n(u);let y=!!m,x=r(y?p.substring(0,m):p);if(!x){if(!y){l=u+(l.length>0?" "+l:l);continue}if(x=r(p),!x){l=u+(l.length>0?" "+l:l);continue}y=!1}const v=yP(f).join(":"),w=h?v+ij:v,g=w+x;if(o.includes(g))continue;o.push(g);const j=a(x,y);for(let b=0;b<j.length;++b){const N=j[b];o.push(w+N)}l=u+(l.length>0?" "+l:l)}return l};function NP(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=lj(t))&&(r&&(r+=" "),r+=n);return r}const lj=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=lj(e[r]))&&(n&&(n+=" "),n+=t);return n};function SP(e,...t){let n,r,a,o=i;function i(c){const u=t.reduce((f,h)=>h(f),e());return n=wP(u),r=n.cache.get,a=n.cache.set,o=l,l(c)}function l(c){const u=r(c);if(u)return u;const f=bP(c,n);return a(c,f),f}return function(){return o(NP.apply(null,arguments))}}const Fe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cj=/^\[(?:([a-z-]+):)?(.+)\]$/i,CP=/^\d+\/\d+$/,EP=new Set(["px","full","screen"]),RP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PP=/\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$/,kP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,TP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pr=e=>Ka(e)||EP.has(e)||CP.test(e),Br=e=>ko(e,"length",$P),Ka=e=>!!e&&!Number.isNaN(Number(e)),rf=e=>ko(e,"number",Ka),Yo=e=>!!e&&Number.isInteger(Number(e)),_P=e=>e.endsWith("%")&&Ka(e.slice(0,-1)),me=e=>cj.test(e),Ur=e=>RP.test(e),MP=new Set(["length","size","percentage"]),OP=e=>ko(e,MP,uj),DP=e=>ko(e,"position",uj),IP=new Set(["image","url"]),LP=e=>ko(e,IP,BP),FP=e=>ko(e,"",zP),Xo=()=>!0,ko=(e,t,n)=>{const r=cj.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},$P=e=>PP.test(e)&&!kP.test(e),uj=()=>!1,zP=e=>TP.test(e),BP=e=>AP.test(e),UP=()=>{const e=Fe("colors"),t=Fe("spacing"),n=Fe("blur"),r=Fe("brightness"),a=Fe("borderColor"),o=Fe("borderRadius"),i=Fe("borderSpacing"),l=Fe("borderWidth"),c=Fe("contrast"),u=Fe("grayscale"),f=Fe("hueRotate"),h=Fe("invert"),p=Fe("gap"),m=Fe("gradientColorStops"),y=Fe("gradientColorStopPositions"),x=Fe("inset"),v=Fe("margin"),w=Fe("opacity"),g=Fe("padding"),j=Fe("saturate"),b=Fe("scale"),N=Fe("sepia"),S=Fe("skew"),C=Fe("space"),P=Fe("translate"),R=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",me,t],D=()=>[me,t],Z=()=>["",pr,Br],I=()=>["auto",Ka,me],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",me],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[Ka,me];return{cacheSize:500,separator:":",theme:{colors:[Xo],spacing:[pr,Br],blur:["none","",Ur,me],brightness:G(),borderColor:[e],borderRadius:["none","","full",Ur,me],borderSpacing:D(),borderWidth:Z(),contrast:G(),grayscale:k(),hueRotate:G(),invert:k(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[_P,Br],inset:O(),margin:O(),opacity:G(),padding:D(),saturate:G(),scale:G(),sepia:k(),skew:G(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[Ur]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...re(),me]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yo,me]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",Yo,me]}],"grid-cols":[{"grid-cols":[Xo]}],"col-start-end":[{col:["auto",{span:["full",Yo,me]},me]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Xo]}],"row-start-end":[{row:["auto",{span:[Yo,me]},me]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,t]}],"min-w":[{"min-w":[me,t,"min","max","fit"]}],"max-w":[{"max-w":[me,t,"none","full","min","max","fit","prose",{screen:[Ur]},Ur]}],h:[{h:[me,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ur,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rf]}],"font-family":[{font:[Xo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",me]}],"line-clamp":[{"line-clamp":["none",Ka,rf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pr,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pr,Br]}],"underline-offset":[{"underline-offset":["auto",pr,me]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],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",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),DP]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OP]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LP]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:z()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[pr,me]}],"outline-w":[{outline:[pr,Br]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[pr,Br]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ur,FP]}],"shadow-color":[{shadow:[Xo]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ur,me]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[j]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"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",me]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Yo,me]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],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",me]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pr,Br,rf]}],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"]}}},VP=SP(UP);function L(...e){return VP(V0(e))}const HP=GR,dj=d.forwardRef(({className:e,...t},n)=>s.jsx(I0,{ref:n,className:L("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}));dj.displayName=I0.displayName;const WP=va("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"}}),fj=d.forwardRef(({className:e,variant:t,...n},r)=>s.jsx(L0,{ref:r,className:L(WP({variant:t}),e),...n}));fj.displayName=L0.displayName;const qP=d.forwardRef(({className:e,...t},n)=>s.jsx(z0,{ref:n,className:L("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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));qP.displayName=z0.displayName;const hj=d.forwardRef(({className:e,...t},n)=>s.jsx(B0,{ref:n,className:L("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(lm,{className:"h-4 w-4"})}));hj.displayName=B0.displayName;const pj=d.forwardRef(({className:e,...t},n)=>s.jsx(F0,{ref:n,className:L("text-sm font-semibold",e),...t}));pj.displayName=F0.displayName;const mj=d.forwardRef(({className:e,...t},n)=>s.jsx($0,{ref:n,className:L("text-sm opacity-90",e),...t}));mj.displayName=$0.displayName;function KP(){const{toasts:e}=tm();return s.jsxs(HP,{children:[e.map(function({id:t,title:n,description:r,action:a,...o}){return s.jsxs(fj,{...o,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(pj,{children:n}),r&&s.jsx(mj,{children:r})]}),a,s.jsx(hj,{})]},t)}),s.jsx(dj,{})]})}var Ax=["light","dark"],GP="(prefers-color-scheme: dark)",QP=d.createContext(void 0),YP={setTheme:e=>{},themes:[]},XP=()=>{var e;return(e=d.useContext(QP))!=null?e:YP};d.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:o,value:i,attrs:l,nonce:c})=>{let u=o==="system",f=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=a?Ax.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(y,x=!1,v=!0)=>{let w=i?i[y]:y,g=x?y+"|| ''":`'${w}'`,j="";return a&&v&&!x&&Ax.includes(y)&&(j+=`d.style.colorScheme = '${y}';`),n==="class"?x||w?j+=`c.add(${g})`:j+="null":w&&(j+=`d[s](n,${g})`),j},m=e?`!function(){${f}${p(e)}}()`:r?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${GP}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${u?"":"else{"+p(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${h}}catch(t){}}();`;return d.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var JP=e=>{switch(e){case"success":return tk;case"info":return rk;case"warning":return nk;case"error":return sk;default:return null}},ZP=Array(12).fill(0),ek=({visible:e,className:t})=>B.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},B.createElement("div",{className:"sonner-spinner"},ZP.map((n,r)=>B.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),tk=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.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"})),nk=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},B.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"})),rk=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.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"})),sk=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.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"})),ak=B.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"},B.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),B.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ok=()=>{let[e,t]=B.useState(document.hidden);return B.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Nh=1,ik=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,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Nh++,o=this.toasts.find(l=>l.id===a),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:n}),{...l,...e,id:a,dismissible:i,title:n}):l):this.addToast({title:n,...r,dismissible:i,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(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(),a=n!==void 0,o,i=r.then(async c=>{if(o=["resolve",c],B.isValidElement(c))a=!1,this.create({id:n,type:"default",message:c});else if(ck(c)&&!c.ok){a=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:f})}else if(t.success!==void 0){a=!1;let u=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:f})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){a=!1;let u=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:f})}}).finally(()=>{var c;a&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>i.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Nh++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Vt=new ik,lk=(e,t)=>{let n=(t==null?void 0:t.id)||Nh++;return Vt.addToast({title:e,...t,id:n}),n},ck=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",uk=lk,dk=()=>Vt.toasts,fk=()=>Vt.getActiveToasts(),Te=Object.assign(uk,{success:Vt.success,info:Vt.info,warning:Vt.warning,error:Vt.error,custom:Vt.custom,message:Vt.message,promise:Vt.promise,dismiss:Vt.dismiss,loading:Vt.loading},{getHistory:dk,getToasts:fk});function hk(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))}hk(`: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;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-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;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}[data-sonner-toast] [data-close-button]{background:var(--gray1)}: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:-50%;right:-50%;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-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-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-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 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-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[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 Gl(e){return e.label!==void 0}var pk=3,mk="32px",gk="16px",_x=4e3,xk=356,vk=14,yk=20,wk=200;function An(...e){return e.filter(Boolean).join(" ")}function jk(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var bk=e=>{var t,n,r,a,o,i,l,c,u,f,h;let{invert:p,toast:m,unstyled:y,interacting:x,setHeights:v,visibleToasts:w,heights:g,index:j,toasts:b,expanded:N,removeToast:S,defaultRichColors:C,closeButton:P,style:R,cancelButtonStyle:M,actionButtonStyle:O,className:D="",descriptionClassName:Z="",duration:I,position:re,gap:z,loadingIcon:Q,expandByDefault:A,classNames:k,icons:$,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:T}=e,[K,H]=B.useState(null),[Ne,_e]=B.useState(null),[U,Se]=B.useState(!1),[Ce,je]=B.useState(!1),[be,Ee]=B.useState(!1),[ut,at]=B.useState(!1),[ur,Kn]=B.useState(!1),[dr,As]=B.useState(0),[Ir,Nl]=B.useState(0),_s=B.useRef(m.duration||I||_x),Sl=B.useRef(null),fr=B.useRef(null),bd=j===0,Nd=j+1<=w,vt=m.type,hr=m.dismissible!==!1,Cl=m.className||"",El=m.descriptionClassName||"",Ms=B.useMemo(()=>g.findIndex(he=>he.toastId===m.id)||0,[g,m.id]),zo=B.useMemo(()=>{var he;return(he=m.closeButton)!=null?he:P},[m.closeButton,P]),Rl=B.useMemo(()=>m.duration||I||_x,[m.duration,I]),Bo=B.useRef(0),Y=B.useRef(0),Xe=B.useRef(0),Be=B.useRef(null),[Os,EC]=re.split("-"),ig=B.useMemo(()=>g.reduce((he,Ie,Ue)=>Ue>=Ms?he:he+Ie.height,0),[g,Ms]),lg=ok(),RC=m.invert||p,Sd=vt==="loading";Y.current=B.useMemo(()=>Ms*z+ig,[Ms,ig]),B.useEffect(()=>{_s.current=Rl},[Rl]),B.useEffect(()=>{Se(!0)},[]),B.useEffect(()=>{let he=fr.current;if(he){let Ie=he.getBoundingClientRect().height;return Nl(Ie),v(Ue=>[{toastId:m.id,height:Ie,position:m.position},...Ue]),()=>v(Ue=>Ue.filter(Rn=>Rn.toastId!==m.id))}},[v,m.id]),B.useLayoutEffect(()=>{if(!U)return;let he=fr.current,Ie=he.style.height;he.style.height="auto";let Ue=he.getBoundingClientRect().height;he.style.height=Ie,Nl(Ue),v(Rn=>Rn.find(Pn=>Pn.toastId===m.id)?Rn.map(Pn=>Pn.toastId===m.id?{...Pn,height:Ue}:Pn):[{toastId:m.id,height:Ue,position:m.position},...Rn])},[U,m.title,m.description,v,m.id]);let Lr=B.useCallback(()=>{je(!0),As(Y.current),v(he=>he.filter(Ie=>Ie.toastId!==m.id)),setTimeout(()=>{S(m)},wk)},[m,S,v,Y]);B.useEffect(()=>{if(m.promise&&vt==="loading"||m.duration===1/0||m.type==="loading")return;let he;return N||x||T&&lg?(()=>{if(Xe.current<Bo.current){let Ie=new Date().getTime()-Bo.current;_s.current=_s.current-Ie}Xe.current=new Date().getTime()})():_s.current!==1/0&&(Bo.current=new Date().getTime(),he=setTimeout(()=>{var Ie;(Ie=m.onAutoClose)==null||Ie.call(m,m),Lr()},_s.current)),()=>clearTimeout(he)},[N,x,m,vt,T,lg,Lr]),B.useEffect(()=>{m.delete&&Lr()},[Lr,m.delete]);function PC(){var he,Ie,Ue;return $!=null&&$.loading?B.createElement("div",{className:An(k==null?void 0:k.loader,(he=m==null?void 0:m.classNames)==null?void 0:he.loader,"sonner-loader"),"data-visible":vt==="loading"},$.loading):Q?B.createElement("div",{className:An(k==null?void 0:k.loader,(Ie=m==null?void 0:m.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":vt==="loading"},Q):B.createElement(ek,{className:An(k==null?void 0:k.loader,(Ue=m==null?void 0:m.classNames)==null?void 0:Ue.loader),visible:vt==="loading"})}return B.createElement("li",{tabIndex:0,ref:fr,className:An(D,Cl,k==null?void 0:k.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[vt],(n=m==null?void 0:m.classNames)==null?void 0:n[vt]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:C,"data-styled":!(m.jsx||m.unstyled||y),"data-mounted":U,"data-promise":!!m.promise,"data-swiped":ur,"data-removed":Ce,"data-visible":Nd,"data-y-position":Os,"data-x-position":EC,"data-index":j,"data-front":bd,"data-swiping":be,"data-dismissible":hr,"data-type":vt,"data-invert":RC,"data-swipe-out":ut,"data-swipe-direction":Ne,"data-expanded":!!(N||A&&U),style:{"--index":j,"--toasts-before":j,"--z-index":b.length-j,"--offset":`${Ce?dr:Y.current}px`,"--initial-height":A?"auto":`${Ir}px`,...R,...m.style},onDragEnd:()=>{Ee(!1),H(null),Be.current=null},onPointerDown:he=>{Sd||!hr||(Sl.current=new Date,As(Y.current),he.target.setPointerCapture(he.pointerId),he.target.tagName!=="BUTTON"&&(Ee(!0),Be.current={x:he.clientX,y:he.clientY}))},onPointerUp:()=>{var he,Ie,Ue,Rn;if(ut||!hr)return;Be.current=null;let Pn=Number(((he=fr.current)==null?void 0:he.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fr=Number(((Ie=fr.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ds=new Date().getTime()-((Ue=Sl.current)==null?void 0:Ue.getTime()),kn=K==="x"?Pn:Fr,$r=Math.abs(kn)/Ds;if(Math.abs(kn)>=yk||$r>.11){As(Y.current),(Rn=m.onDismiss)==null||Rn.call(m,m),_e(K==="x"?Pn>0?"right":"left":Fr>0?"down":"up"),Lr(),at(!0),Kn(!1);return}Ee(!1),H(null)},onPointerMove:he=>{var Ie,Ue,Rn,Pn;if(!Be.current||!hr||((Ie=window.getSelection())==null?void 0:Ie.toString().length)>0)return;let Fr=he.clientY-Be.current.y,Ds=he.clientX-Be.current.x,kn=(Ue=e.swipeDirections)!=null?Ue:jk(re);!K&&(Math.abs(Ds)>1||Math.abs(Fr)>1)&&H(Math.abs(Ds)>Math.abs(Fr)?"x":"y");let $r={x:0,y:0};K==="y"?(kn.includes("top")||kn.includes("bottom"))&&(kn.includes("top")&&Fr<0||kn.includes("bottom")&&Fr>0)&&($r.y=Fr):K==="x"&&(kn.includes("left")||kn.includes("right"))&&(kn.includes("left")&&Ds<0||kn.includes("right")&&Ds>0)&&($r.x=Ds),(Math.abs($r.x)>0||Math.abs($r.y)>0)&&Kn(!0),(Rn=fr.current)==null||Rn.style.setProperty("--swipe-amount-x",`${$r.x}px`),(Pn=fr.current)==null||Pn.style.setProperty("--swipe-amount-y",`${$r.y}px`)}},zo&&!m.jsx?B.createElement("button",{"aria-label":G,"data-disabled":Sd,"data-close-button":!0,onClick:Sd||!hr?()=>{}:()=>{var he;Lr(),(he=m.onDismiss)==null||he.call(m,m)},className:An(k==null?void 0:k.closeButton,(a=m==null?void 0:m.classNames)==null?void 0:a.closeButton)},(o=$==null?void 0:$.close)!=null?o:ak):null,m.jsx||d.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:B.createElement(B.Fragment,null,vt||m.icon||m.promise?B.createElement("div",{"data-icon":"",className:An(k==null?void 0:k.icon,(i=m==null?void 0:m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||PC():null,m.type!=="loading"?m.icon||($==null?void 0:$[vt])||JP(vt):null):null,B.createElement("div",{"data-content":"",className:An(k==null?void 0:k.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},B.createElement("div",{"data-title":"",className:An(k==null?void 0:k.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?B.createElement("div",{"data-description":"",className:An(Z,El,k==null?void 0:k.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),d.isValidElement(m.cancel)?m.cancel:m.cancel&&Gl(m.cancel)?B.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||M,onClick:he=>{var Ie,Ue;Gl(m.cancel)&&hr&&((Ue=(Ie=m.cancel).onClick)==null||Ue.call(Ie,he),Lr())},className:An(k==null?void 0:k.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,d.isValidElement(m.action)?m.action:m.action&&Gl(m.action)?B.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||O,onClick:he=>{var Ie,Ue;Gl(m.action)&&((Ue=(Ie=m.action).onClick)==null||Ue.call(Ie,he),!he.defaultPrevented&&Lr())},className:An(k==null?void 0:k.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function Mx(){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}function Nk(e,t){let n={};return[e,t].forEach((r,a)=>{let o=a===1,i=o?"--mobile-offset":"--offset",l=o?gk:mk;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=l:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var Sk=d.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:i,className:l,offset:c,mobileOffset:u,theme:f="light",richColors:h,duration:p,style:m,visibleToasts:y=pk,toastOptions:x,dir:v=Mx(),gap:w=vk,loadingIcon:g,icons:j,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:N}=e,[S,C]=B.useState([]),P=B.useMemo(()=>Array.from(new Set([r].concat(S.filter(T=>T.position).map(T=>T.position)))),[S,r]),[R,M]=B.useState([]),[O,D]=B.useState(!1),[Z,I]=B.useState(!1),[re,z]=B.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=B.useRef(null),A=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=B.useRef(null),$=B.useRef(!1),G=B.useCallback(T=>{C(K=>{var H;return(H=K.find(Ne=>Ne.id===T.id))!=null&&H.delete||Vt.dismiss(T.id),K.filter(({id:Ne})=>Ne!==T.id)})},[]);return B.useEffect(()=>Vt.subscribe(T=>{if(T.dismiss){C(K=>K.map(H=>H.id===T.id?{...H,delete:!0}:H));return}setTimeout(()=>{m0.flushSync(()=>{C(K=>{let H=K.findIndex(Ne=>Ne.id===T.id);return H!==-1?[...K.slice(0,H),{...K[H],...T},...K.slice(H+1)]:[T,...K]})})})}),[]),B.useEffect(()=>{if(f!=="system"){z(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let T=window.matchMedia("(prefers-color-scheme: dark)");try{T.addEventListener("change",({matches:K})=>{z(K?"dark":"light")})}catch{T.addListener(({matches:H})=>{try{z(H?"dark":"light")}catch(Ne){console.error(Ne)}})}},[f]),B.useEffect(()=>{S.length<=1&&D(!1)},[S]),B.useEffect(()=>{let T=K=>{var H,Ne;a.every(_e=>K[_e]||K.code===_e)&&(D(!0),(H=Q.current)==null||H.focus()),K.code==="Escape"&&(document.activeElement===Q.current||(Ne=Q.current)!=null&&Ne.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[a]),B.useEffect(()=>{if(Q.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,$.current=!1)}},[Q.current]),B.createElement("section",{ref:t,"aria-label":`${b} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((T,K)=>{var H;let[Ne,_e]=T.split("-");return S.length?B.createElement("ol",{key:T,dir:v==="auto"?Mx():v,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-theme":re,"data-y-position":Ne,"data-lifted":O&&S.length>1&&!o,"data-x-position":_e,style:{"--front-toast-height":`${((H=R[0])==null?void 0:H.height)||0}px`,"--width":`${xk}px`,"--gap":`${w}px`,...m,...Nk(c,u)},onBlur:U=>{$.current&&!U.currentTarget.contains(U.relatedTarget)&&($.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||$.current||($.current=!0,k.current=U.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{Z||D(!1)},onDragEnd:()=>D(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},S.filter(U=>!U.position&&K===0||U.position===T).map((U,Se)=>{var Ce,je;return B.createElement(bk,{key:U.id,icons:j,index:Se,toast:U,defaultRichColors:h,duration:(Ce=x==null?void 0:x.duration)!=null?Ce:p,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:n,visibleToasts:y,closeButton:(je=x==null?void 0:x.closeButton)!=null?je:i,interacting:Z,position:T,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:S.filter(be=>be.position==U.position),heights:R.filter(be=>be.position==U.position),setHeights:M,expandByDefault:o,gap:w,loadingIcon:g,expanded:O,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const Ck=({...e})=>{const{theme:t="system"}=XP();return s.jsx(Sk,{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 Ek=up[" useId ".trim().toString()]||(()=>{}),Rk=0;function zn(e){const[t,n]=d.useState(Ek());return gt(()=>{e||n(r=>r??String(Rk++))},[e]),e||(t?`radix-${t}`:"")}const Pk=["top","right","bottom","left"],Ns=Math.min,rn=Math.max,tu=Math.round,Ql=Math.floor,ar=e=>({x:e,y:e}),kk={left:"right",right:"left",bottom:"top",top:"bottom"},Tk={start:"end",end:"start"};function Sh(e,t,n){return rn(e,Ns(t,n))}function kr(e,t){return typeof e=="function"?e(t):e}function Tr(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function um(e){return e==="x"?"y":"x"}function dm(e){return e==="y"?"height":"width"}const Ak=new Set(["top","bottom"]);function nr(e){return Ak.has(Tr(e))?"y":"x"}function fm(e){return um(nr(e))}function _k(e,t,n){n===void 0&&(n=!1);const r=To(e),a=fm(e),o=dm(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nu(i)),[i,nu(i)]}function Mk(e){const t=nu(e);return[Ch(e),t,Ch(t)]}function Ch(e){return e.replace(/start|end/g,t=>Tk[t])}const Ox=["left","right"],Dx=["right","left"],Ok=["top","bottom"],Dk=["bottom","top"];function Ik(e,t,n){switch(e){case"top":case"bottom":return n?t?Dx:Ox:t?Ox:Dx;case"left":case"right":return t?Ok:Dk;default:return[]}}function Lk(e,t,n,r){const a=To(e);let o=Ik(Tr(e),n==="start",r);return a&&(o=o.map(i=>i+"-"+a),t&&(o=o.concat(o.map(Ch)))),o}function nu(e){return e.replace(/left|right|bottom|top/g,t=>kk[t])}function Fk(e){return{top:0,right:0,bottom:0,left:0,...e}}function gj(e){return typeof e!="number"?Fk(e):{top:e,right:e,bottom:e,left:e}}function ru(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Ix(e,t,n){let{reference:r,floating:a}=e;const o=nr(t),i=fm(t),l=dm(i),c=Tr(t),u=o==="y",f=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,p=r[l]/2-a[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-a.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-a.width,y:h};break;default:m={x:r.x,y:r.y}}switch(To(t)){case"start":m[i]-=p*(n&&u?-1:1);break;case"end":m[i]+=p*(n&&u?-1:1);break}return m}const $k=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,l=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:h}=Ix(u,r,c),p=r,m={},y=0;for(let x=0;x<l.length;x++){const{name:v,fn:w}=l[x],{x:g,y:j,data:b,reset:N}=await w({x:f,y:h,initialPlacement:r,placement:p,strategy:a,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=g??f,h=j??h,m={...m,[v]:{...m[v],...b}},N&&y<=50&&(y++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:f,y:h}=Ix(u,p,c)),x=-1)}return{x:f,y:h,placement:p,strategy:a,middlewareData:m}};async function $i(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:m=0}=kr(t,e),y=gj(m),v=l[p?h==="floating"?"reference":"floating":h],w=ru(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),g=h==="floating"?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),b=await(o.isElement==null?void 0:o.isElement(j))?await(o.getScale==null?void 0:o.getScale(j))||{x:1,y:1}:{x:1,y:1},N=ru(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:j,strategy:c}):g);return{top:(w.top-N.top+y.top)/b.y,bottom:(N.bottom-w.bottom+y.bottom)/b.y,left:(w.left-N.left+y.left)/b.x,right:(N.right-w.right+y.right)/b.x}}const zk=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=kr(e,t)||{};if(u==null)return{};const h=gj(f),p={x:n,y:r},m=fm(a),y=dm(m),x=await i.getDimensions(u),v=m==="y",w=v?"top":"left",g=v?"bottom":"right",j=v?"clientHeight":"clientWidth",b=o.reference[y]+o.reference[m]-p[m]-o.floating[y],N=p[m]-o.reference[m],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let C=S?S[j]:0;(!C||!await(i.isElement==null?void 0:i.isElement(S)))&&(C=l.floating[j]||o.floating[y]);const P=b/2-N/2,R=C/2-x[y]/2-1,M=Ns(h[w],R),O=Ns(h[g],R),D=M,Z=C-x[y]-O,I=C/2-x[y]/2+P,re=Sh(D,I,Z),z=!c.arrow&&To(a)!=null&&I!==re&&o.reference[y]/2-(I<D?M:O)-x[y]/2<0,Q=z?I<D?I-D:I-Z:0;return{[m]:p[m]+Q,data:{[m]:re,centerOffset:I-re-Q,...z&&{alignmentOffset:Q}},reset:z}}}),Bk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...v}=kr(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Tr(a),g=nr(l),j=Tr(l)===l,b=await(c.isRTL==null?void 0:c.isRTL(u.floating)),N=p||(j||!x?[nu(l)]:Mk(l)),S=y!=="none";!p&&S&&N.push(...Lk(l,x,y,b));const C=[l,...N],P=await $i(t,v),R=[];let M=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&R.push(P[w]),h){const I=_k(a,i,b);R.push(P[I[0]],P[I[1]])}if(M=[...M,{placement:a,overflows:R}],!R.every(I=>I<=0)){var O,D;const I=(((O=o.flip)==null?void 0:O.index)||0)+1,re=C[I];if(re&&(!(h==="alignment"?g!==nr(re):!1)||M.every(A=>A.overflows[0]>0&&nr(A.placement)===g)))return{data:{index:I,overflows:M},reset:{placement:re}};let z=(D=M.filter(Q=>Q.overflows[0]<=0).sort((Q,A)=>Q.overflows[1]-A.overflows[1])[0])==null?void 0:D.placement;if(!z)switch(m){case"bestFit":{var Z;const Q=(Z=M.filter(A=>{if(S){const k=nr(A.placement);return k===g||k==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(k=>k>0).reduce((k,$)=>k+$,0)]).sort((A,k)=>A[1]-k[1])[0])==null?void 0:Z[0];Q&&(z=Q);break}case"initialPlacement":z=l;break}if(a!==z)return{reset:{placement:z}}}return{}}}};function Lx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fx(e){return Pk.some(t=>e[t]>=0)}const Uk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=kr(e,t);switch(r){case"referenceHidden":{const o=await $i(t,{...a,elementContext:"reference"}),i=Lx(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fx(i)}}}case"escaped":{const o=await $i(t,{...a,altBoundary:!0}),i=Lx(o,n.floating);return{data:{escapedOffsets:i,escaped:Fx(i)}}}default:return{}}}}},xj=new Set(["left","top"]);async function Vk(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=Tr(n),l=To(n),c=nr(n)==="y",u=xj.has(i)?-1:1,f=o&&c?-1:1,h=kr(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(m=l==="end"?y*-1:y),c?{x:m*f,y:p*u}:{x:p*u,y:m*f}}const Hk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:l}=t,c=await Vk(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}},Wk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:v=>{let{x:w,y:g}=v;return{x:w,y:g}}},...c}=kr(e,t),u={x:n,y:r},f=await $i(t,c),h=nr(Tr(a)),p=um(h);let m=u[p],y=u[h];if(o){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",g=m+f[v],j=m-f[w];m=Sh(g,m,j)}if(i){const v=h==="y"?"top":"left",w=h==="y"?"bottom":"right",g=y+f[v],j=y-f[w];y=Sh(g,y,j)}const x=l.fn({...t,[p]:m,[h]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:o,[h]:i}}}}}},qk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=kr(e,t),f={x:n,y:r},h=nr(a),p=um(h);let m=f[p],y=f[h];const x=kr(l,t),v=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const j=p==="y"?"height":"width",b=o.reference[p]-o.floating[j]+v.mainAxis,N=o.reference[p]+o.reference[j]-v.mainAxis;m<b?m=b:m>N&&(m=N)}if(u){var w,g;const j=p==="y"?"width":"height",b=xj.has(Tr(a)),N=o.reference[h]-o.floating[j]+(b&&((w=i.offset)==null?void 0:w[h])||0)+(b?0:v.crossAxis),S=o.reference[h]+o.reference[j]+(b?0:((g=i.offset)==null?void 0:g[h])||0)-(b?v.crossAxis:0);y<N?y=N:y>S&&(y=S)}return{[p]:m,[h]:y}}}},Kk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:l}=t,{apply:c=()=>{},...u}=kr(e,t),f=await $i(t,u),h=Tr(a),p=To(a),m=nr(a)==="y",{width:y,height:x}=o.floating;let v,w;h==="top"||h==="bottom"?(v=h,w=p===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(w=h,v=p==="end"?"top":"bottom");const g=x-f.top-f.bottom,j=y-f.left-f.right,b=Ns(x-f[v],g),N=Ns(y-f[w],j),S=!t.middlewareData.shift;let C=b,P=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=j),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=g),S&&!p){const M=rn(f.left,0),O=rn(f.right,0),D=rn(f.top,0),Z=rn(f.bottom,0);m?P=y-2*(M!==0||O!==0?M+O:rn(f.left,f.right)):C=x-2*(D!==0||Z!==0?D+Z:rn(f.top,f.bottom))}await c({...t,availableWidth:P,availableHeight:C});const R=await i.getDimensions(l.floating);return y!==R.width||x!==R.height?{reset:{rects:!0}}:{}}}};function Hu(){return typeof window<"u"}function Ao(e){return vj(e)?(e.nodeName||"").toLowerCase():"#document"}function dn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(vj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vj(e){return Hu()?e instanceof Node||e instanceof dn(e).Node:!1}function Un(e){return Hu()?e instanceof Element||e instanceof dn(e).Element:!1}function lr(e){return Hu()?e instanceof HTMLElement||e instanceof dn(e).HTMLElement:!1}function $x(e){return!Hu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dn(e).ShadowRoot}const Gk=new Set(["inline","contents"]);function il(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Gk.has(a)}const Qk=new Set(["table","td","th"]);function Yk(e){return Qk.has(Ao(e))}const Xk=[":popover-open",":modal"];function Wu(e){return Xk.some(t=>{try{return e.matches(t)}catch{return!1}})}const Jk=["transform","translate","scale","rotate","perspective"],Zk=["transform","translate","scale","rotate","perspective","filter"],eT=["paint","layout","strict","content"];function hm(e){const t=pm(),n=Un(e)?Vn(e):e;return Jk.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Zk.some(r=>(n.willChange||"").includes(r))||eT.some(r=>(n.contain||"").includes(r))}function tT(e){let t=Ss(e);for(;lr(t)&&!wo(t);){if(hm(t))return t;if(Wu(t))return null;t=Ss(t)}return null}function pm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nT=new Set(["html","body","#document"]);function wo(e){return nT.has(Ao(e))}function Vn(e){return dn(e).getComputedStyle(e)}function qu(e){return Un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ss(e){if(Ao(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$x(e)&&e.host||cr(e);return $x(t)?t.host:t}function yj(e){const t=Ss(e);return wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:lr(t)&&il(t)?t:yj(t)}function zi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=yj(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),i=dn(a);if(o){const l=Eh(i);return t.concat(i,i.visualViewport||[],il(a)?a:[],l&&n?zi(l):[])}return t.concat(a,zi(a,[],n))}function Eh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wj(e){const t=Vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=lr(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=tu(n)!==o||tu(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}function mm(e){return Un(e)?e:e.contextElement}function Ga(e){const t=mm(e);if(!lr(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=wj(t);let i=(o?tu(n.width):n.width)/r,l=(o?tu(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const rT=ar(0);function jj(e){const t=dn(e);return!pm()||!t.visualViewport?rT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sT(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==dn(e)?!1:t}function ia(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=mm(e);let i=ar(1);t&&(r?Un(r)&&(i=Ga(r)):i=Ga(e));const l=sT(o,n,r)?jj(o):ar(0);let c=(a.left+l.x)/i.x,u=(a.top+l.y)/i.y,f=a.width/i.x,h=a.height/i.y;if(o){const p=dn(o),m=r&&Un(r)?dn(r):r;let y=p,x=Eh(y);for(;x&&r&&m!==y;){const v=Ga(x),w=x.getBoundingClientRect(),g=Vn(x),j=w.left+(x.clientLeft+parseFloat(g.paddingLeft))*v.x,b=w.top+(x.clientTop+parseFloat(g.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,h*=v.y,c+=j,u+=b,y=dn(x),x=Eh(y)}}return ru({width:f,height:h,x:c,y:u})}function gm(e,t){const n=qu(e).scrollLeft;return t?t.left+n:ia(cr(e)).left+n}function bj(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:gm(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function aT(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",i=cr(r),l=t?Wu(t.floating):!1;if(r===i||l&&o)return n;let c={scrollLeft:0,scrollTop:0},u=ar(1);const f=ar(0),h=lr(r);if((h||!h&&!o)&&((Ao(r)!=="body"||il(i))&&(c=qu(r)),lr(r))){const m=ia(r);u=Ga(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=i&&!h&&!o?bj(i,c,!0):ar(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function oT(e){return Array.from(e.getClientRects())}function iT(e){const t=cr(e),n=qu(e),r=e.ownerDocument.body,a=rn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=rn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gm(e);const l=-n.scrollTop;return Vn(r).direction==="rtl"&&(i+=rn(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:l}}function lT(e,t){const n=dn(e),r=cr(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){o=a.width,i=a.height;const u=pm();(!u||u&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:l,y:c}}const cT=new Set(["absolute","fixed"]);function uT(e,t){const n=ia(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=lr(e)?Ga(e):ar(1),i=e.clientWidth*o.x,l=e.clientHeight*o.y,c=a*o.x,u=r*o.y;return{width:i,height:l,x:c,y:u}}function zx(e,t,n){let r;if(t==="viewport")r=lT(e,n);else if(t==="document")r=iT(cr(e));else if(Un(t))r=uT(t,n);else{const a=jj(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ru(r)}function Nj(e,t){const n=Ss(e);return n===t||!Un(n)||wo(n)?!1:Vn(n).position==="fixed"||Nj(n,t)}function dT(e,t){const n=t.get(e);if(n)return n;let r=zi(e,[],!1).filter(l=>Un(l)&&Ao(l)!=="body"),a=null;const o=Vn(e).position==="fixed";let i=o?Ss(e):e;for(;Un(i)&&!wo(i);){const l=Vn(i),c=hm(i);!c&&l.position==="fixed"&&(a=null),(o?!c&&!a:!c&&l.position==="static"&&!!a&&cT.has(a.position)||il(i)&&!c&&Nj(e,i))?r=r.filter(f=>f!==i):a=l,i=Ss(i)}return t.set(e,r),r}function fT(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const i=[...n==="clippingAncestors"?Wu(t)?[]:dT(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,f)=>{const h=zx(t,f,a);return u.top=rn(h.top,u.top),u.right=Ns(h.right,u.right),u.bottom=Ns(h.bottom,u.bottom),u.left=rn(h.left,u.left),u},zx(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function hT(e){const{width:t,height:n}=wj(e);return{width:t,height:n}}function pT(e,t,n){const r=lr(t),a=cr(t),o=n==="fixed",i=ia(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=ar(0);function u(){c.x=gm(a)}if(r||!r&&!o)if((Ao(t)!=="body"||il(a))&&(l=qu(t)),r){const m=ia(t,!0,o,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else a&&u();o&&!r&&a&&u();const f=a&&!r&&!o?bj(a,l):ar(0),h=i.left+l.scrollLeft-c.x-f.x,p=i.top+l.scrollTop-c.y-f.y;return{x:h,y:p,width:i.width,height:i.height}}function sf(e){return Vn(e).position==="static"}function Bx(e,t){if(!lr(e)||Vn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cr(e)===n&&(n=n.ownerDocument.body),n}function Sj(e,t){const n=dn(e);if(Wu(e))return n;if(!lr(e)){let a=Ss(e);for(;a&&!wo(a);){if(Un(a)&&!sf(a))return a;a=Ss(a)}return n}let r=Bx(e,t);for(;r&&Yk(r)&&sf(r);)r=Bx(r,t);return r&&wo(r)&&sf(r)&&!hm(r)?n:r||tT(e)||n}const mT=async function(e){const t=this.getOffsetParent||Sj,n=this.getDimensions,r=await n(e.floating);return{reference:pT(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gT(e){return Vn(e).direction==="rtl"}const xT={convertOffsetParentRelativeRectToViewportRelativeRect:aT,getDocumentElement:cr,getClippingRect:fT,getOffsetParent:Sj,getElementRects:mT,getClientRects:oT,getDimensions:hT,getScale:Ga,isElement:Un,isRTL:gT};function Cj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vT(e,t){let n=null,r;const a=cr(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:f,top:h,width:p,height:m}=u;if(l||t(),!p||!m)return;const y=Ql(h),x=Ql(a.clientWidth-(f+p)),v=Ql(a.clientHeight-(h+m)),w=Ql(f),j={rootMargin:-y+"px "+-x+"px "+-v+"px "+-w+"px",threshold:rn(0,Ns(1,c))||1};let b=!0;function N(S){const C=S[0].intersectionRatio;if(C!==c){if(!b)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!Cj(u,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(N,{...j,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,j)}n.observe(e)}return i(!0),o}function yT(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=mm(e),f=a||o?[...u?zi(u):[],...zi(t)]:[];f.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const h=u&&l?vT(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(w=>{let[g]=w;g&&g.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var j;(j=m)==null||j.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let y,x=c?ia(e):null;c&&v();function v(){const w=ia(e);x&&!Cj(x,w)&&n(),x=w,y=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(g=>{a&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,c&&cancelAnimationFrame(y)}}const wT=Hk,jT=Wk,bT=Bk,NT=Kk,ST=Uk,Ux=zk,CT=qk,ET=(e,t,n)=>{const r=new Map,a={platform:xT,...n},o={...a.platform,_c:r};return $k(e,t,{...a,platform:o})};var RT=typeof document<"u",PT=function(){},xc=RT?d.useLayoutEffect:PT;function su(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,a;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(!su(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!su(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ej(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vx(e,t){const n=Ej(e);return Math.round(t*n)/n}function af(e){const t=d.useRef(e);return xc(()=>{t.current=e}),t}function kT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,h]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=d.useState(r);su(p,r)||m(r);const[y,x]=d.useState(null),[v,w]=d.useState(null),g=d.useCallback(A=>{A!==S.current&&(S.current=A,x(A))},[]),j=d.useCallback(A=>{A!==C.current&&(C.current=A,w(A))},[]),b=o||y,N=i||v,S=d.useRef(null),C=d.useRef(null),P=d.useRef(f),R=c!=null,M=af(c),O=af(a),D=af(u),Z=d.useCallback(()=>{if(!S.current||!C.current)return;const A={placement:t,strategy:n,middleware:p};O.current&&(A.platform=O.current),ET(S.current,C.current,A).then(k=>{const $={...k,isPositioned:D.current!==!1};I.current&&!su(P.current,$)&&(P.current=$,xa.flushSync(()=>{h($)}))})},[p,t,n,O,D]);xc(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[u]);const I=d.useRef(!1);xc(()=>(I.current=!0,()=>{I.current=!1}),[]),xc(()=>{if(b&&(S.current=b),N&&(C.current=N),b&&N){if(M.current)return M.current(b,N,Z);Z()}},[b,N,Z,M,R]);const re=d.useMemo(()=>({reference:S,floating:C,setReference:g,setFloating:j}),[g,j]),z=d.useMemo(()=>({reference:b,floating:N}),[b,N]),Q=d.useMemo(()=>{const A={position:n,left:0,top:0};if(!z.floating)return A;const k=Vx(z.floating,f.x),$=Vx(z.floating,f.y);return l?{...A,transform:"translate("+k+"px, "+$+"px)",...Ej(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:$}},[n,l,z.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:Z,refs:re,elements:z,floatingStyles:Q}),[f,Z,re,z,Q])}const TT=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ux({element:r.current,padding:a}).fn(n):{}:r?Ux({element:r,padding:a}).fn(n):{}}}},AT=(e,t)=>({...wT(e),options:[e,t]}),_T=(e,t)=>({...jT(e),options:[e,t]}),MT=(e,t)=>({...CT(e),options:[e,t]}),OT=(e,t)=>({...bT(e),options:[e,t]}),DT=(e,t)=>({...NT(e),options:[e,t]}),IT=(e,t)=>({...ST(e),options:[e,t]}),LT=(e,t)=>({...TT(e),options:[e,t]});var FT="Arrow",Rj=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return s.jsx(ce.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rj.displayName=FT;var $T=Rj;function xm(e){const[t,n]=d.useState(void 0);return gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let i,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var vm="Popper",[Pj,_o]=$t(vm),[zT,kj]=Pj(vm),Tj=e=>{const{__scopePopper:t,children:n}=e,[r,a]=d.useState(null);return s.jsx(zT,{scope:t,anchor:r,onAnchorChange:a,children:n})};Tj.displayName=vm;var Aj="PopperAnchor",_j=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=kj(Aj,n),i=d.useRef(null),l=ve(t,i);return d.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:s.jsx(ce.div,{...a,ref:l})});_j.displayName=Aj;var ym="PopperContent",[BT,UT]=Pj(ym),Mj=d.forwardRef((e,t)=>{var U,Se,Ce,je,be,Ee;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...x}=e,v=kj(ym,n),[w,g]=d.useState(null),j=ve(t,ut=>g(ut)),[b,N]=d.useState(null),S=xm(b),C=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,R=r+(o!=="center"?"-"+o:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(u)?u:[u],D=O.length>0,Z={padding:M,boundary:O.filter(HT),altBoundary:D},{refs:I,floatingStyles:re,placement:z,isPositioned:Q,middlewareData:A}=kT({strategy:"fixed",placement:R,whileElementsMounted:(...ut)=>yT(...ut,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[AT({mainAxis:a+P,alignmentAxis:i}),c&&_T({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?MT():void 0,...Z}),c&&OT({...Z}),DT({...Z,apply:({elements:ut,rects:at,availableWidth:ur,availableHeight:Kn})=>{const{width:dr,height:As}=at.reference,Ir=ut.floating.style;Ir.setProperty("--radix-popper-available-width",`${ur}px`),Ir.setProperty("--radix-popper-available-height",`${Kn}px`),Ir.setProperty("--radix-popper-anchor-width",`${dr}px`),Ir.setProperty("--radix-popper-anchor-height",`${As}px`)}}),b&<({element:b,padding:l}),WT({arrowWidth:C,arrowHeight:P}),p&&IT({strategy:"referenceHidden",...Z})]}),[k,$]=Ij(z),G=tn(y);gt(()=>{Q&&(G==null||G())},[Q,G]);const T=(U=A.arrow)==null?void 0:U.x,K=(Se=A.arrow)==null?void 0:Se.y,H=((Ce=A.arrow)==null?void 0:Ce.centerOffset)!==0,[Ne,_e]=d.useState();return gt(()=>{w&&_e(window.getComputedStyle(w).zIndex)},[w]),s.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:Q?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(je=A.transformOrigin)==null?void 0:je.x,(be=A.transformOrigin)==null?void 0:be.y].join(" "),...((Ee=A.hide)==null?void 0:Ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(BT,{scope:n,placedSide:k,onArrowChange:N,arrowX:T,arrowY:K,shouldHideArrow:H,children:s.jsx(ce.div,{"data-side":k,"data-align":$,...x,ref:j,style:{...x.style,animation:Q?void 0:"none"}})})})});Mj.displayName=ym;var Oj="PopperArrow",VT={top:"bottom",right:"left",bottom:"top",left:"right"},Dj=d.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=UT(Oj,r),i=VT[o.placedSide];return s.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:s.jsx($T,{...a,ref:n,style:{...a.style,display:"block"}})})});Dj.displayName=Oj;function HT(e){return e!==null}var WT=e=>({name:"transformOrigin",options:e,fn(t){var v,w,g;const{placement:n,rects:r,middlewareData:a}=t,i=((v=a.arrow)==null?void 0:v.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Ij(n),h={start:"0%",center:"50%",end:"100%"}[f],p=(((w=a.arrow)==null?void 0:w.x)??0)+l/2,m=(((g=a.arrow)==null?void 0:g.y)??0)+c/2;let y="",x="";return u==="bottom"?(y=i?h:`${p}px`,x=`${-c}px`):u==="top"?(y=i?h:`${p}px`,x=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,x=i?h:`${m}px`):u==="left"&&(y=`${r.floating.width+c}px`,x=i?h:`${m}px`),{data:{x:y,y:x}}}});function Ij(e){const[t,n="center"]=e.split("-");return[t,n]}var wm=Tj,jm=_j,bm=Mj,Nm=Dj,[Ku,m5]=$t("Tooltip",[_o]),Gu=_o(),Lj="TooltipProvider",qT=700,Rh="tooltip.open",[KT,Sm]=Ku(Lj),Fj=e=>{const{__scopeTooltip:t,delayDuration:n=qT,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,i=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(KT,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:a,children:o})};Fj.displayName=Lj;var Bi="Tooltip",[GT,Qu]=Ku(Bi),$j=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:i,delayDuration:l}=e,c=Sm(Bi,e.__scopeTooltip),u=Gu(t),[f,h]=d.useState(null),p=zn(),m=d.useRef(0),y=i??c.disableHoverableContent,x=l??c.delayDuration,v=d.useRef(!1),[w,g]=ir({prop:r,defaultProp:a??!1,onChange:C=>{C?(c.onOpen(),document.dispatchEvent(new CustomEvent(Rh))):c.onClose(),o==null||o(C)},caller:Bi}),j=d.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),b=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,g(!0)},[g]),N=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g(!1)},[g]),S=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,g(!0),m.current=0},x)},[x,g]);return d.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(wm,{...u,children:s.jsx(GT,{scope:t,contentId:p,open:w,stateAttribute:j,trigger:f,onTriggerChange:h,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:d.useCallback(()=>{y?N():(window.clearTimeout(m.current),m.current=0)},[N,y]),onOpen:b,onClose:N,disableHoverableContent:y,children:n})})};$j.displayName=Bi;var Ph="TooltipTrigger",zj=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Qu(Ph,n),o=Sm(Ph,n),i=Gu(n),l=d.useRef(null),c=ve(t,l,a.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),h=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),s.jsx(jm,{asChild:!0,...i,children:s.jsx(ce.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:c,onPointerMove:W(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:W(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:W(e.onBlur,a.onClose),onClick:W(e.onClick,a.onClose)})})});zj.displayName=Ph;var QT="TooltipPortal",[g5,YT]=Ku(QT,{forceMount:void 0}),jo="TooltipContent",Bj=d.forwardRef((e,t)=>{const n=YT(jo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=Qu(jo,e.__scopeTooltip);return s.jsx(En,{present:r||i.open,children:i.disableHoverableContent?s.jsx(Uj,{side:a,...o,ref:t}):s.jsx(XT,{side:a,...o,ref:t})})}),XT=d.forwardRef((e,t)=>{const n=Qu(jo,e.__scopeTooltip),r=Sm(jo,e.__scopeTooltip),a=d.useRef(null),o=ve(t,a),[i,l]=d.useState(null),{trigger:c,onClose:u}=n,f=a.current,{onPointerInTransitChange:h}=r,p=d.useCallback(()=>{l(null),h(!1)},[h]),m=d.useCallback((y,x)=>{const v=y.currentTarget,w={x:y.clientX,y:y.clientY},g=nA(w,v.getBoundingClientRect()),j=rA(w,g),b=sA(x.getBoundingClientRect()),N=oA([...j,...b]);l(N),h(!0)},[h]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(c&&f){const y=v=>m(v,f),x=v=>m(v,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",x),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",x)}}},[c,f,m,p]),d.useEffect(()=>{if(i){const y=x=>{const v=x.target,w={x:x.clientX,y:x.clientY},g=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),j=!aA(w,i);g?p():j&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,i,u,p]),s.jsx(Uj,{...e,ref:o})}),[JT,ZT]=Ku(Bi,{isInside:!1}),eA=v0("TooltipContent"),Uj=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...l}=e,c=Qu(jo,n),u=Gu(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Rh,f),()=>document.removeEventListener(Rh,f)),[f]),d.useEffect(()=>{if(c.trigger){const h=p=>{const m=p.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,f]),s.jsx(Po,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:s.jsxs(bm,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[s.jsx(eA,{children:r}),s.jsx(JT,{scope:n,isInside:!0,children:s.jsx(TR,{id:c.contentId,role:"tooltip",children:a||r})})]})})});Bj.displayName=jo;var Vj="TooltipArrow",tA=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Gu(n);return ZT(Vj,n).isInside?null:s.jsx(Nm,{...a,...r,ref:t})});tA.displayName=Vj;function nA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rA(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 sA(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function aA(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o],c=t[i],u=l.x,f=l.y,h=c.x,p=c.y;f>r!=p>r&&n<(h-u)*(r-f)/(p-f)+u&&(a=!a)}return a}function oA(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),iA(t)}function iA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))n.pop();else break}n.push(a)}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 lA=Fj,cA=$j,uA=zj,Hj=Bj;const Wj=lA,dA=cA,fA=uA,qj=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(Hj,{ref:r,sideOffset:t,className:L("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}));qj.displayName=Hj.displayName;var Mo=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(){}},la=typeof window>"u"||"Deno"in globalThis;function At(){}function hA(e,t){return typeof e=="function"?e(t):e}function kh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Kj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ys(e,t){return typeof e=="function"?e(t):e}function xn(e,t){return typeof e=="function"?e(t):e}function Hx(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:i,stale:l}=e;if(i){if(r){if(t.queryHash!==Cm(i,t.options))return!1}else if(!Ui(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||o&&!o(t))}function Wx(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(ca(t.options.mutationKey)!==ca(o))return!1}else if(!Ui(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function Cm(e,t){return((t==null?void 0:t.queryKeyHashFn)||ca)(e)}function ca(e){return JSON.stringify(e,(t,n)=>Th(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Ui(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ui(e[n],t[n])):!1}function Gj(e,t){if(e===t)return e;const n=qx(e)&&qx(t);if(n||Th(e)&&Th(t)){const r=n?e:Object.keys(e),a=r.length,o=n?t:Object.keys(t),i=o.length,l=n?[]:{},c=new Set(r);let u=0;for(let f=0;f<i;f++){const h=n?f:o[f];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=Gj(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return a===i&&u===a?e:l}return t}function au(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function qx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Th(e){if(!Kx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Kx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Kx(e){return Object.prototype.toString.call(e)==="[object Object]"}function pA(e){return new Promise(t=>{setTimeout(t,e)})}function Ah(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Gj(e,t):t}function mA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function gA(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Em=Symbol();function Qj(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Em?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Yj(e,t){return typeof e=="function"?e(...t):!!e}var Vs,Xr,Xa,qv,xA=(qv=class extends Mo{constructor(){super();ue(this,Vs);ue(this,Xr);ue(this,Xa);X(this,Xa,t=>{if(!la&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,Xr)||this.setEventListener(E(this,Xa))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Xr))==null||t.call(this),X(this,Xr,void 0))}setEventListener(t){var n;X(this,Xa,t),(n=E(this,Xr))==null||n.call(this),X(this,Xr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,Vs)!==t&&(X(this,Vs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,Vs)=="boolean"?E(this,Vs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Vs=new WeakMap,Xr=new WeakMap,Xa=new WeakMap,qv),Rm=new xA,Ja,Jr,Za,Kv,vA=(Kv=class extends Mo{constructor(){super();ue(this,Ja,!0);ue(this,Jr);ue(this,Za);X(this,Za,t=>{if(!la&&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(){E(this,Jr)||this.setEventListener(E(this,Za))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Jr))==null||t.call(this),X(this,Jr,void 0))}setEventListener(t){var n;X(this,Za,t),(n=E(this,Jr))==null||n.call(this),X(this,Jr,t(this.setOnline.bind(this)))}setOnline(t){E(this,Ja)!==t&&(X(this,Ja,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,Ja)}},Ja=new WeakMap,Jr=new WeakMap,Za=new WeakMap,Kv),ou=new vA;function _h(){let e,t;const n=new Promise((a,o)=>{e=a,t=o});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}function yA(e){return Math.min(1e3*2**e,3e4)}function Xj(e){return(e??"online")==="online"?ou.isOnline():!0}var Jj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function of(e){return e instanceof Jj}function Zj(e){let t=!1,n=0,r=!1,a;const o=_h(),i=x=>{var v;r||(p(new Jj(x)),(v=e.abort)==null||v.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>Rm.isFocused()&&(e.networkMode==="always"||ou.isOnline())&&e.canRun(),f=()=>Xj(e.networkMode)&&e.canRun(),h=x=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,x),a==null||a(),o.resolve(x))},p=x=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,x),a==null||a(),o.reject(x))},m=()=>new Promise(x=>{var v;a=w=>{(r||u())&&x(w)},(v=e.onPause)==null||v.call(e)}).then(()=>{var x;a=void 0,r||(x=e.onContinue)==null||x.call(e)}),y=()=>{if(r)return;let x;const v=n===0?e.initialPromise:void 0;try{x=v??e.fn()}catch(w){x=Promise.reject(w)}Promise.resolve(x).then(h).catch(w=>{var S;if(r)return;const g=e.retry??(la?0:3),j=e.retryDelay??yA,b=typeof j=="function"?j(n,w):j,N=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,w);if(t||!N){p(w);return}n++,(S=e.onFail)==null||S.call(e,n,w),pA(b).then(()=>u()?void 0:m()).then(()=>{t?p(w):y()})})};return{promise:o,cancel:i,continue:()=>(a==null||a(),o),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?y():m().then(y),o)}}var wA=e=>setTimeout(e,0);function jA(){let e=[],t=0,n=l=>{l()},r=l=>{l()},a=wA;const o=l=>{t?e.push(l):a(()=>{n(l)})},i=()=>{const l=e;e=[],l.length&&a(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||i()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{a=l}}}var it=jA(),Hs,Gv,eb=(Gv=class{constructor(){ue(this,Hs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kh(this.gcTime)&&X(this,Hs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(la?1/0:5*60*1e3))}clearGcTimeout(){E(this,Hs)&&(clearTimeout(E(this,Hs)),X(this,Hs,void 0))}},Hs=new WeakMap,Gv),eo,Ws,gn,qs,jt,Qi,Ks,On,mr,Qv,bA=(Qv=class extends eb{constructor(t){super();ue(this,On);ue(this,eo);ue(this,Ws);ue(this,gn);ue(this,qs);ue(this,jt);ue(this,Qi);ue(this,Ks);X(this,Ks,!1),X(this,Qi,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,qs,t.client),X(this,gn,E(this,qs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,eo,NA(this.options)),this.state=t.state??E(this,eo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,jt))==null?void 0:t.promise}setOptions(t){this.options={...E(this,Qi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,gn).remove(this)}setData(t,n){const r=Ah(this.state.data,t,this.options);return ge(this,On,mr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ge(this,On,mr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=E(this,jt))==null?void 0:r.promise;return(a=E(this,jt))==null||a.cancel(t),n?n.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,eo))}isActive(){return this.observers.some(t=>xn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Em||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ys(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Kj(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,jt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,jt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,gn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,jt)&&(E(this,Ks)?E(this,jt).cancel({revert:!0}):E(this,jt).cancelRetry()),this.scheduleGc()),E(this,gn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ge(this,On,mr).call(this,{type:"invalidate"})}fetch(t,n){var u,f,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,jt))return E(this,jt).continueRetry(),E(this,jt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(m=>m.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,a=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(X(this,Ks,!0),r.signal)})},o=()=>{const p=Qj(this.options,n),y=(()=>{const x={client:E(this,qs),queryKey:this.queryKey,meta:this.meta};return a(x),x})();return X(this,Ks,!1),this.options.persister?this.options.persister(p,y,this):p(y)},l=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:E(this,qs),state:this.state,fetchFn:o};return a(p),p})();(u=this.options.behavior)==null||u.onFetch(l,this),X(this,Ws,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&ge(this,On,mr).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=p=>{var m,y,x,v;of(p)&&p.silent||ge(this,On,mr).call(this,{type:"error",error:p}),of(p)||((y=(m=E(this,gn).config).onError)==null||y.call(m,p,this),(v=(x=E(this,gn).config).onSettled)==null||v.call(x,this.state.data,p,this)),this.scheduleGc()};return X(this,jt,Zj({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var m,y,x,v;if(p===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(w){c(w);return}(y=(m=E(this,gn).config).onSuccess)==null||y.call(m,p,this),(v=(x=E(this,gn).config).onSettled)==null||v.call(x,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,m)=>{ge(this,On,mr).call(this,{type:"failed",failureCount:p,error:m})},onPause:()=>{ge(this,On,mr).call(this,{type:"pause"})},onContinue:()=>{ge(this,On,mr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),E(this,jt).start()}},eo=new WeakMap,Ws=new WeakMap,gn=new WeakMap,qs=new WeakMap,jt=new WeakMap,Qi=new WeakMap,Ks=new WeakMap,On=new WeakSet,mr=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,...tb(r.data,this.options),fetchMeta:t.meta??null};case"success":return X(this,Ws,void 0),{...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 a=t.error;return of(a)&&a.revert&&E(this,Ws)?{...E(this,Ws),fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),it.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,gn).notify({query:this,type:"updated",action:t})})},Qv);function tb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function NA(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 Xn,Yv,SA=(Yv=class extends Mo{constructor(t={}){super();ue(this,Xn);this.config=t,X(this,Xn,new Map)}build(t,n,r){const a=n.queryKey,o=n.queryHash??Cm(a,n);let i=this.get(o);return i||(i=new bA({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(i)),i}add(t){E(this,Xn).has(t.queryHash)||(E(this,Xn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,Xn).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,Xn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){it.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Xn).get(t)}getAll(){return[...E(this,Xn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Hx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Hx(t,r)):n}notify(t){it.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){it.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Xn=new WeakMap,Yv),Jn,Pt,Gs,Zn,Hr,Xv,CA=(Xv=class extends eb{constructor(t){super();ue(this,Zn);ue(this,Jn);ue(this,Pt);ue(this,Gs);this.mutationId=t.mutationId,X(this,Pt,t.mutationCache),X(this,Jn,[]),this.state=t.state||nb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Jn).includes(t)||(E(this,Jn).push(t),this.clearGcTimeout(),E(this,Pt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,Jn,E(this,Jn).filter(n=>n!==t)),this.scheduleGc(),E(this,Pt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Jn).length||(this.state.status==="pending"?this.scheduleGc():E(this,Pt).remove(this))}continue(){var t;return((t=E(this,Gs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,l,c,u,f,h,p,m,y,x,v,w,g,j,b,N,S,C,P;const n=()=>{ge(this,Zn,Hr).call(this,{type:"continue"})};X(this,Gs,Zj({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{ge(this,Zn,Hr).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{ge(this,Zn,Hr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Pt).canRun(this)}));const r=this.state.status==="pending",a=!E(this,Gs).canStart();try{if(r)n();else{ge(this,Zn,Hr).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=E(this,Pt).config).onMutate)==null?void 0:i.call(o,t,this));const M=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));M!==this.state.context&&ge(this,Zn,Hr).call(this,{type:"pending",context:M,variables:t,isPaused:a})}const R=await E(this,Gs).start();return await((f=(u=E(this,Pt).config).onSuccess)==null?void 0:f.call(u,R,t,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,R,t,this.state.context)),await((y=(m=E(this,Pt).config).onSettled)==null?void 0:y.call(m,R,null,this.state.variables,this.state.context,this)),await((v=(x=this.options).onSettled)==null?void 0:v.call(x,R,null,t,this.state.context)),ge(this,Zn,Hr).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(w=E(this,Pt).config).onError)==null?void 0:g.call(w,R,t,this.state.context,this)),await((b=(j=this.options).onError)==null?void 0:b.call(j,R,t,this.state.context)),await((S=(N=E(this,Pt).config).onSettled)==null?void 0:S.call(N,void 0,R,this.state.variables,this.state.context,this)),await((P=(C=this.options).onSettled)==null?void 0:P.call(C,void 0,R,t,this.state.context)),R}finally{ge(this,Zn,Hr).call(this,{type:"error",error:R})}}finally{E(this,Pt).runNext(this)}}},Jn=new WeakMap,Pt=new WeakMap,Gs=new WeakMap,Zn=new WeakSet,Hr=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),it.batch(()=>{E(this,Jn).forEach(r=>{r.onMutationUpdate(t)}),E(this,Pt).notify({mutation:this,type:"updated",action:t})})},Xv);function nb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vr,Dn,Yi,Jv,EA=(Jv=class extends Mo{constructor(t={}){super();ue(this,vr);ue(this,Dn);ue(this,Yi);this.config=t,X(this,vr,new Set),X(this,Dn,new Map),X(this,Yi,0)}build(t,n,r){const a=new CA({mutationCache:this,mutationId:++Pl(this,Yi)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){E(this,vr).add(t);const n=Yl(t);if(typeof n=="string"){const r=E(this,Dn).get(n);r?r.push(t):E(this,Dn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,vr).delete(t)){const n=Yl(t);if(typeof n=="string"){const r=E(this,Dn).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&E(this,Dn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yl(t);if(typeof n=="string"){const r=E(this,Dn).get(n),a=r==null?void 0:r.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Yl(t);if(typeof n=="string"){const a=(r=E(this,Dn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){it.batch(()=>{E(this,vr).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,vr).clear(),E(this,Dn).clear()})}getAll(){return Array.from(E(this,vr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wx(n,r))}findAll(t={}){return this.getAll().filter(n=>Wx(t,n))}notify(t){it.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return it.batch(()=>Promise.all(t.map(n=>n.continue().catch(At))))}},vr=new WeakMap,Dn=new WeakMap,Yi=new WeakMap,Jv);function Yl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Gx(e){return{onFetch:(t,n)=>{var f,h,p,m,y;const r=t.options,a=(p=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],i=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let x=!1;const v=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},w=Qj(t.options,t.fetchOptions),g=async(j,b,N)=>{if(x)return Promise.reject();if(b==null&&j.pages.length)return Promise.resolve(j);const C=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:b,direction:N?"backward":"forward",meta:t.options.meta};return v(O),O})(),P=await w(C),{maxPages:R}=t.options,M=N?gA:mA;return{pages:M(j.pages,P,R),pageParams:M(j.pageParams,b,R)}};if(a&&o.length){const j=a==="backward",b=j?RA:Qx,N={pages:o,pageParams:i},S=b(r,N);l=await g(N,S,j)}else{const j=e??o.length;do{const b=c===0?i[0]??r.initialPageParam:Qx(r,l);if(c>0&&b==null)break;l=await g(l,b),c++}while(c<j)}return l};t.options.persister?t.fetchFn=()=>{var x,v;return(v=(x=t.options).persister)==null?void 0:v.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Qx(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 RA(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 Qe,Zr,es,to,no,ts,ro,so,Zv,PA=(Zv=class{constructor(e={}){ue(this,Qe);ue(this,Zr);ue(this,es);ue(this,to);ue(this,no);ue(this,ts);ue(this,ro);ue(this,so);X(this,Qe,e.queryCache||new SA),X(this,Zr,e.mutationCache||new EA),X(this,es,e.defaultOptions||{}),X(this,to,new Map),X(this,no,new Map),X(this,ts,0)}mount(){Pl(this,ts)._++,E(this,ts)===1&&(X(this,ro,Rm.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Qe).onFocus())})),X(this,so,ou.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Qe).onOnline())})))}unmount(){var e,t;Pl(this,ts)._--,E(this,ts)===0&&((e=E(this,ro))==null||e.call(this),X(this,ro,void 0),(t=E(this,so))==null||t.call(this),X(this,so,void 0))}isFetching(e){return E(this,Qe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Zr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Qe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=E(this,Qe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ys(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return E(this,Qe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=E(this,Qe).get(r.queryHash),o=a==null?void 0:a.state.data,i=hA(t,o);if(i!==void 0)return E(this,Qe).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return it.batch(()=>E(this,Qe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Qe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,Qe);it.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,Qe);return it.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=it.batch(()=>E(this,Qe).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(At).catch(At)}invalidateQueries(e,t={}){return it.batch(()=>(E(this,Qe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=it.batch(()=>E(this,Qe).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(At)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(At)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,Qe).build(this,t);return n.isStaleByTime(ys(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(At).catch(At)}fetchInfiniteQuery(e){return e.behavior=Gx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(At).catch(At)}ensureInfiniteQueryData(e){return e.behavior=Gx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ou.isOnline()?E(this,Zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Qe)}getMutationCache(){return E(this,Zr)}getDefaultOptions(){return E(this,es)}setDefaultOptions(e){X(this,es,e)}setQueryDefaults(e,t){E(this,to).set(ca(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,to).values()],n={};return t.forEach(r=>{Ui(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){E(this,no).set(ca(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,no).values()],n={};return t.forEach(r=>{Ui(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,es).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Em&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,es).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Qe).clear(),E(this,Zr).clear()}},Qe=new WeakMap,Zr=new WeakMap,es=new WeakMap,to=new WeakMap,no=new WeakMap,ts=new WeakMap,ro=new WeakMap,so=new WeakMap,Zv),Bt,Re,Xi,kt,Qs,ao,ns,rs,Ji,oo,io,Ys,Xs,ss,lo,Me,ii,Mh,Oh,Dh,Ih,Lh,Fh,$h,rb,ey,kA=(ey=class extends Mo{constructor(t,n){super();ue(this,Me);ue(this,Bt);ue(this,Re);ue(this,Xi);ue(this,kt);ue(this,Qs);ue(this,ao);ue(this,ns);ue(this,rs);ue(this,Ji);ue(this,oo);ue(this,io);ue(this,Ys);ue(this,Xs);ue(this,ss);ue(this,lo,new Set);this.options=n,X(this,Bt,t),X(this,rs,null),X(this,ns,_h()),this.options.experimental_prefetchInRender||E(this,ns).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,Re).addObserver(this),Yx(E(this,Re),this.options)?ge(this,Me,ii).call(this):this.updateResult(),ge(this,Me,Ih).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zh(E(this,Re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zh(E(this,Re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ge(this,Me,Lh).call(this),ge(this,Me,Fh).call(this),E(this,Re).removeObserver(this)}setOptions(t){const n=this.options,r=E(this,Re);if(this.options=E(this,Bt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xn(this.options.enabled,E(this,Re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ge(this,Me,$h).call(this),E(this,Re).setOptions(this.options),n._defaulted&&!au(this.options,n)&&E(this,Bt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,Re),observer:this});const a=this.hasListeners();a&&Xx(E(this,Re),r,this.options,n)&&ge(this,Me,ii).call(this),this.updateResult(),a&&(E(this,Re)!==r||xn(this.options.enabled,E(this,Re))!==xn(n.enabled,E(this,Re))||ys(this.options.staleTime,E(this,Re))!==ys(n.staleTime,E(this,Re)))&&ge(this,Me,Mh).call(this);const o=ge(this,Me,Oh).call(this);a&&(E(this,Re)!==r||xn(this.options.enabled,E(this,Re))!==xn(n.enabled,E(this,Re))||o!==E(this,ss))&&ge(this,Me,Dh).call(this,o)}getOptimisticResult(t){const n=E(this,Bt).getQueryCache().build(E(this,Bt),t),r=this.createResult(n,t);return AA(this,r)&&(X(this,kt,r),X(this,ao,this.options),X(this,Qs,E(this,Re).state)),r}getCurrentResult(){return E(this,kt)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),Reflect.get(r,a))})}trackProp(t){E(this,lo).add(t)}getCurrentQuery(){return E(this,Re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=E(this,Bt).defaultQueryOptions(t),r=E(this,Bt).getQueryCache().build(E(this,Bt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ge(this,Me,ii).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,kt)))}createResult(t,n){var R;const r=E(this,Re),a=this.options,o=E(this,kt),i=E(this,Qs),l=E(this,ao),u=t!==r?t.state:E(this,Xi),{state:f}=t;let h={...f},p=!1,m;if(n._optimisticResults){const M=this.hasListeners(),O=!M&&Yx(t,n),D=M&&Xx(t,r,n,a);(O||D)&&(h={...h,...tb(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:x,status:v}=h;m=h.data;let w=!1;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let M;o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(M=o.data,w=!0):M=typeof n.placeholderData=="function"?n.placeholderData((R=E(this,io))==null?void 0:R.state.data,E(this,io)):n.placeholderData,M!==void 0&&(v="success",m=Ah(o==null?void 0:o.data,M,n),p=!0)}if(n.select&&m!==void 0&&!w)if(o&&m===(i==null?void 0:i.data)&&n.select===E(this,Ji))m=E(this,oo);else try{X(this,Ji,n.select),m=n.select(m),m=Ah(o==null?void 0:o.data,m,n),X(this,oo,m),X(this,rs,null)}catch(M){X(this,rs,M)}E(this,rs)&&(y=E(this,rs),m=E(this,oo),x=Date.now(),v="error");const g=h.fetchStatus==="fetching",j=v==="pending",b=v==="error",N=j&&g,S=m!==void 0,P={status:v,fetchStatus:h.fetchStatus,isPending:j,isSuccess:v==="success",isError:b,isInitialLoading:N,isLoading:N,data:m,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!j,isLoadingError:b&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&S,isStale:Pm(t,n),refetch:this.refetch,promise:E(this,ns),isEnabled:xn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=Z=>{P.status==="error"?Z.reject(P.error):P.data!==void 0&&Z.resolve(P.data)},O=()=>{const Z=X(this,ns,P.promise=_h());M(Z)},D=E(this,ns);switch(D.status){case"pending":t.queryHash===r.queryHash&&M(D);break;case"fulfilled":(P.status==="error"||P.data!==D.value)&&O();break;case"rejected":(P.status!=="error"||P.error!==D.reason)&&O();break}}return P}updateResult(){const t=E(this,kt),n=this.createResult(E(this,Re),this.options);if(X(this,Qs,E(this,Re).state),X(this,ao,this.options),E(this,Qs).data!==void 0&&X(this,io,E(this,Re)),au(n,t))return;X(this,kt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!E(this,lo).size)return!0;const i=new Set(o??E(this,lo));return this.options.throwOnError&&i.add("error"),Object.keys(E(this,kt)).some(l=>{const c=l;return E(this,kt)[c]!==t[c]&&i.has(c)})};ge(this,Me,rb).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ge(this,Me,Ih).call(this)}},Bt=new WeakMap,Re=new WeakMap,Xi=new WeakMap,kt=new WeakMap,Qs=new WeakMap,ao=new WeakMap,ns=new WeakMap,rs=new WeakMap,Ji=new WeakMap,oo=new WeakMap,io=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,ss=new WeakMap,lo=new WeakMap,Me=new WeakSet,ii=function(t){ge(this,Me,$h).call(this);let n=E(this,Re).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(At)),n},Mh=function(){ge(this,Me,Lh).call(this);const t=ys(this.options.staleTime,E(this,Re));if(la||E(this,kt).isStale||!kh(t))return;const r=Kj(E(this,kt).dataUpdatedAt,t)+1;X(this,Ys,setTimeout(()=>{E(this,kt).isStale||this.updateResult()},r))},Oh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,Re)):this.options.refetchInterval)??!1},Dh=function(t){ge(this,Me,Fh).call(this),X(this,ss,t),!(la||xn(this.options.enabled,E(this,Re))===!1||!kh(E(this,ss))||E(this,ss)===0)&&X(this,Xs,setInterval(()=>{(this.options.refetchIntervalInBackground||Rm.isFocused())&&ge(this,Me,ii).call(this)},E(this,ss)))},Ih=function(){ge(this,Me,Mh).call(this),ge(this,Me,Dh).call(this,ge(this,Me,Oh).call(this))},Lh=function(){E(this,Ys)&&(clearTimeout(E(this,Ys)),X(this,Ys,void 0))},Fh=function(){E(this,Xs)&&(clearInterval(E(this,Xs)),X(this,Xs,void 0))},$h=function(){const t=E(this,Bt).getQueryCache().build(E(this,Bt),this.options);if(t===E(this,Re))return;const n=E(this,Re);X(this,Re,t),X(this,Xi,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},rb=function(t){it.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(E(this,kt))}),E(this,Bt).getQueryCache().notify({query:E(this,Re),type:"observerResultsUpdated"})})},ey);function TA(e,t){return xn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Yx(e,t){return TA(e,t)||e.state.data!==void 0&&zh(e,t,t.refetchOnMount)}function zh(e,t,n){if(xn(t.enabled,e)!==!1&&ys(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Pm(e,t)}return!1}function Xx(e,t,n,r){return(e!==t||xn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Pm(e,n)}function Pm(e,t){return xn(t.enabled,e)!==!1&&e.isStaleByTime(ys(t.staleTime,e))}function AA(e,t){return!au(e.getCurrentResult(),t)}var as,os,Ut,yr,Nr,vc,Bh,ty,_A=(ty=class extends Mo{constructor(n,r){super();ue(this,Nr);ue(this,as);ue(this,os);ue(this,Ut);ue(this,yr);X(this,as,n),this.setOptions(r),this.bindMethods(),ge(this,Nr,vc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=E(this,as).defaultMutationOptions(n),au(this.options,r)||E(this,as).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,Ut),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ca(r.mutationKey)!==ca(this.options.mutationKey)?this.reset():((a=E(this,Ut))==null?void 0:a.state.status)==="pending"&&E(this,Ut).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=E(this,Ut))==null||n.removeObserver(this)}onMutationUpdate(n){ge(this,Nr,vc).call(this),ge(this,Nr,Bh).call(this,n)}getCurrentResult(){return E(this,os)}reset(){var n;(n=E(this,Ut))==null||n.removeObserver(this),X(this,Ut,void 0),ge(this,Nr,vc).call(this),ge(this,Nr,Bh).call(this)}mutate(n,r){var a;return X(this,yr,r),(a=E(this,Ut))==null||a.removeObserver(this),X(this,Ut,E(this,as).getMutationCache().build(E(this,as),this.options)),E(this,Ut).addObserver(this),E(this,Ut).execute(n)}},as=new WeakMap,os=new WeakMap,Ut=new WeakMap,yr=new WeakMap,Nr=new WeakSet,vc=function(){var r;const n=((r=E(this,Ut))==null?void 0:r.state)??nb();X(this,os,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Bh=function(n){it.batch(()=>{var r,a,o,i,l,c,u,f;if(E(this,yr)&&this.hasListeners()){const h=E(this,os).variables,p=E(this,os).context;(n==null?void 0:n.type)==="success"?((a=(r=E(this,yr)).onSuccess)==null||a.call(r,n.data,h,p),(i=(o=E(this,yr)).onSettled)==null||i.call(o,n.data,null,h,p)):(n==null?void 0:n.type)==="error"&&((c=(l=E(this,yr)).onError)==null||c.call(l,n.error,h,p),(f=(u=E(this,yr)).onSettled)==null||f.call(u,void 0,n.error,h,p))}this.listeners.forEach(h=>{h(E(this,os))})})},ty),sb=d.createContext(void 0),_r=e=>{const t=d.useContext(sb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MA=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(sb.Provider,{value:e,children:t})),ab=d.createContext(!1),OA=()=>d.useContext(ab);ab.Provider;function DA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var IA=d.createContext(DA()),LA=()=>d.useContext(IA),FA=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},$A=e=>{d.useEffect(()=>{e.clearReset()},[e])},zA=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||Yj(n,[e.error,r])),BA=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},UA=(e,t)=>e.isLoading&&e.isFetching&&!t,VA=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Jx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function HA(e,t,n){var h,p,m,y,x;const r=OA(),a=LA(),o=_r(),i=o.defaultQueryOptions(e);(p=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,i),i._optimisticResults=r?"isRestoring":"optimistic",BA(i),FA(i,a),$A(a);const l=!o.getQueryCache().get(i.queryHash),[c]=d.useState(()=>new t(o,i)),u=c.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(v=>{const w=f?c.subscribe(it.batchCalls(v)):At;return c.updateResult(),w},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d.useEffect(()=>{c.setOptions(i)},[i,c]),VA(i,u))throw Jx(i,c,a);if(zA({result:u,errorResetBoundary:a,throwOnError:i.throwOnError,query:o.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((y=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||y.call(m,i,u),i.experimental_prefetchInRender&&!la&&UA(u,r)){const v=l?Jx(i,c,a):(x=o.getQueryCache().get(i.queryHash))==null?void 0:x.promise;v==null||v.catch(At).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?u:c.trackResult(u)}function Ae(e,t){return HA(e,kA)}function tt(e,t){const n=_r(),[r]=d.useState(()=>new _A(n,e));d.useEffect(()=>{r.setOptions(e)},[r,e]);const a=d.useSyncExternalStore(d.useCallback(i=>r.subscribe(it.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=d.useCallback((i,l)=>{r.mutate(i,l).catch(At)},[r]);if(a.error&&Yj(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}/**
* @remix-run/router v1.23.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 Vi(){return Vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vi.apply(this,arguments)}var cs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(cs||(cs={}));const Zx="popstate";function WA(e){e===void 0&&(e={});function t(r,a){let{pathname:o,search:i,hash:l}=r.location;return Uh("",{pathname:o,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:iu(a)}return KA(t,n,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ob(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qA(){return Math.random().toString(36).substr(2,8)}function ev(e,t){return{usr:e.state,key:e.key,idx:t}}function Uh(e,t,n,r){return n===void 0&&(n=null),Vi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Oo(t):t,{state:n,key:t&&t.key||r||qA()})}function iu(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 Oo(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 KA(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:o=!1}=r,i=a.history,l=cs.Pop,c=null,u=f();u==null&&(u=0,i.replaceState(Vi({},i.state,{idx:u}),""));function f(){return(i.state||{idx:null}).idx}function h(){l=cs.Pop;let v=f(),w=v==null?null:v-u;u=v,c&&c({action:l,location:x.location,delta:w})}function p(v,w){l=cs.Push;let g=Uh(x.location,v,w);u=f()+1;let j=ev(g,u),b=x.createHref(g);try{i.pushState(j,"",b)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(b)}o&&c&&c({action:l,location:x.location,delta:1})}function m(v,w){l=cs.Replace;let g=Uh(x.location,v,w);u=f();let j=ev(g,u),b=x.createHref(g);i.replaceState(j,"",b),o&&c&&c({action:l,location:x.location,delta:0})}function y(v){let w=a.location.origin!=="null"?a.location.origin:a.location.href,g=typeof v=="string"?v:iu(v);return g=g.replace(/ $/,"%20"),Ke(w,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,w)}let x={get action(){return l},get location(){return e(a,i)},listen(v){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(Zx,h),c=v,()=>{a.removeEventListener(Zx,h),c=null}},createHref(v){return t(a,v)},createURL:y,encodeLocation(v){let w=y(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:m,go(v){return i.go(v)}};return x}var tv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tv||(tv={}));function GA(e,t,n){return n===void 0&&(n="/"),QA(e,t,n,!1)}function QA(e,t,n,r){let a=typeof t=="string"?Oo(t):t,o=bo(a.pathname||"/",n);if(o==null)return null;let i=ib(e);YA(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=i_(o);l=a_(i[c],u,r)}return l}function ib(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let a=(o,i,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(Ke(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=ws([r,c.relativePath]),f=n.concat(c);o.children&&o.children.length>0&&(Ke(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ib(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:r_(u,o.index),routesMeta:f})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,i);else for(let c of lb(o.path))a(o,i,c)}),t}function lb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let i=lb(r.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),a&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function YA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:s_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const XA=/^:[\w-]+$/,JA=3,ZA=2,e_=1,t_=10,n_=-2,nv=e=>e==="*";function r_(e,t){let n=e.split("/"),r=n.length;return n.some(nv)&&(r+=n_),t&&(r+=ZA),n.filter(a=>!nv(a)).reduce((a,o)=>a+(XA.test(o)?JA:o===""?e_:t_),r)}function s_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function a_(e,t,n){let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,f=o==="/"?t:t.slice(o.length)||"/",h=lu({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),p=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=lu({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!h)return null;Object.assign(a,h.params),i.push({params:a,pathname:ws([o,h.pathname]),pathnameBase:d_(ws([o,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(o=ws([o,h.pathnameBase]))}return i}function lu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=o_(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((u,f,h)=>{let{paramName:p,isOptional:m}=f;if(p==="*"){let x=l[h]||"";i=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const y=l[h];return m&&!y?u[p]=void 0:u[p]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function o_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ob(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function i_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ob(!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 bo(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 l_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Oo(e):e;return{pathname:n?n.startsWith("/")?n:c_(n,t):t,search:f_(r),hash:h_(a)}}function c_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function lf(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 <Link to="..."> and the router will parse it for you.'}function u_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function km(e,t){let n=u_(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Tm(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Oo(e):(a=Vi({},e),Ke(!a.pathname||!a.pathname.includes("?"),lf("?","pathname","search",a)),Ke(!a.pathname||!a.pathname.includes("#"),lf("#","pathname","hash",a)),Ke(!a.search||!a.search.includes("#"),lf("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(i==null)l=n;else{let h=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}l=h>=0?t[h]:"/"}let c=l_(a,l),u=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const ws=e=>e.join("/").replace(/\/\/+/g,"/"),d_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),f_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,h_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function p_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const cb=["post","put","patch","delete"];new Set(cb);const m_=["get",...cb];new Set(m_);/**
* React Router v6.30.1
*
* 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 Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hi.apply(this,arguments)}const Yu=d.createContext(null),ub=d.createContext(null),Mr=d.createContext(null),Xu=d.createContext(null),Or=d.createContext({outlet:null,matches:[],isDataRoute:!1}),db=d.createContext(null);function g_(e,t){let{relative:n}=t===void 0?{}:t;Do()||Ke(!1);let{basename:r,navigator:a}=d.useContext(Mr),{hash:o,pathname:i,search:l}=Ju(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:ws([r,i])),a.createHref({pathname:c,search:l,hash:o})}function Do(){return d.useContext(Xu)!=null}function ya(){return Do()||Ke(!1),d.useContext(Xu).location}function fb(e){d.useContext(Mr).static||d.useLayoutEffect(e)}function Ps(){let{isDataRoute:e}=d.useContext(Or);return e?k_():x_()}function x_(){Do()||Ke(!1);let e=d.useContext(Yu),{basename:t,future:n,navigator:r}=d.useContext(Mr),{matches:a}=d.useContext(Or),{pathname:o}=ya(),i=JSON.stringify(km(a,n.v7_relativeSplatPath)),l=d.useRef(!1);return fb(()=>{l.current=!0}),d.useCallback(function(u,f){if(f===void 0&&(f={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=Tm(u,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ws([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,i,o,e])}function hb(){let{matches:e}=d.useContext(Or),t=e[e.length-1];return t?t.params:{}}function Ju(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=d.useContext(Mr),{matches:a}=d.useContext(Or),{pathname:o}=ya(),i=JSON.stringify(km(a,r.v7_relativeSplatPath));return d.useMemo(()=>Tm(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function v_(e,t){return y_(e,t)}function y_(e,t,n,r){Do()||Ke(!1);let{navigator:a}=d.useContext(Mr),{matches:o}=d.useContext(Or),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=ya(),f;if(t){var h;let v=typeof t=="string"?Oo(t):t;c==="/"||(h=v.pathname)!=null&&h.startsWith(c)||Ke(!1),f=v}else f=u;let p=f.pathname||"/",m=p;if(c!=="/"){let v=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(v.length).join("/")}let y=GA(e,{pathname:m}),x=S_(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:ws([c,a.encodeLocation?a.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:ws([c,a.encodeLocation?a.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r);return t&&x?d.createElement(Xu.Provider,{value:{location:Hi({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:cs.Pop}},x):x}function w_(){let e=P_(),t=p_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),n?d.createElement("pre",{style:a},n):null,null)}const j_=d.createElement(w_,null);class b_ extends d.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?d.createElement(Or.Provider,{value:this.props.routeContext},d.createElement(db.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function N_(e){let{routeContext:t,match:n,children:r}=e,a=d.useContext(Yu);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(Or.Provider,{value:t},r)}function S_(e,t,n,r){var a;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,l=(a=n)==null?void 0:a.errors;if(l!=null){let f=i.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);f>=0||Ke(!1),i=i.slice(0,Math.min(i.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<i.length;f++){let h=i[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=f),h.route.id){let{loaderData:p,errors:m}=n,y=h.route.loader&&p[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||y){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((f,h,p)=>{let m,y=!1,x=null,v=null;n&&(m=l&&h.route.id?l[h.route.id]:void 0,x=h.route.errorElement||j_,c&&(u<0&&p===0?(y=!0,v=null):u===p&&(y=!0,v=h.route.hydrateFallbackElement||null)));let w=t.concat(i.slice(0,p+1)),g=()=>{let j;return m?j=x:y?j=v:h.route.Component?j=d.createElement(h.route.Component,null):h.route.element?j=h.route.element:j=f,d.createElement(N_,{match:h,routeContext:{outlet:f,matches:w,isDataRoute:n!=null},children:j})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?d.createElement(b_,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:g(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):g()},null)}var pb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pb||{}),cu=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}(cu||{});function C_(e){let t=d.useContext(Yu);return t||Ke(!1),t}function E_(e){let t=d.useContext(ub);return t||Ke(!1),t}function R_(e){let t=d.useContext(Or);return t||Ke(!1),t}function mb(e){let t=R_(),n=t.matches[t.matches.length-1];return n.route.id||Ke(!1),n.route.id}function P_(){var e;let t=d.useContext(db),n=E_(cu.UseRouteError),r=mb(cu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function k_(){let{router:e}=C_(pb.UseNavigateStable),t=mb(cu.UseNavigateStable),n=d.useRef(!1);return fb(()=>{n.current=!0}),d.useCallback(function(a,o){o===void 0&&(o={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Hi({fromRouteId:t},o)))},[e,t])}function T_(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function A_(e){let{to:t,replace:n,state:r,relative:a}=e;Do()||Ke(!1);let{future:o,static:i}=d.useContext(Mr),{matches:l}=d.useContext(Or),{pathname:c}=ya(),u=Ps(),f=Tm(t,km(l,o.v7_relativeSplatPath),c,a==="path"),h=JSON.stringify(f);return d.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:a}),[u,h,a,n,r]),null}function et(e){Ke(!1)}function __(e){let{basename:t="/",children:n=null,location:r,navigationType:a=cs.Pop,navigator:o,static:i=!1,future:l}=e;Do()&&Ke(!1);let c=t.replace(/^\/*/,"/"),u=d.useMemo(()=>({basename:c,navigator:o,static:i,future:Hi({v7_relativeSplatPath:!1},l)}),[c,l,o,i]);typeof r=="string"&&(r=Oo(r));let{pathname:f="/",search:h="",hash:p="",state:m=null,key:y="default"}=r,x=d.useMemo(()=>{let v=bo(f,c);return v==null?null:{location:{pathname:v,search:h,hash:p,state:m,key:y},navigationType:a}},[c,f,h,p,m,y,a]);return x==null?null:d.createElement(Mr.Provider,{value:u},d.createElement(Xu.Provider,{children:n,value:x}))}function gb(e){let{children:t,location:n}=e;return v_(Vh(t),n)}new Promise(()=>{});function Vh(e,t){t===void 0&&(t=[]);let n=[];return d.Children.forEach(e,(r,a)=>{if(!d.isValidElement(r))return;let o=[...t,a];if(r.type===d.Fragment){n.push.apply(n,Vh(r.props.children,o));return}r.type!==et&&Ke(!1),!r.props.index||!r.props.children||Ke(!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=Vh(r.props.children,o)),n.push(i)}),n}/**
* React Router DOM v6.30.1
*
* 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 uu(){return uu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uu.apply(this,arguments)}function xb(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function M_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function O_(e,t){return e.button===0&&(!t||t==="_self")&&!M_(e)}const D_=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],I_=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],L_="6";try{window.__reactRouterVersion=L_}catch{}const F_=d.createContext({isTransitioning:!1}),$_="startTransition",rv=up[$_];function z_(e){let{basename:t,children:n,future:r,window:a}=e,o=d.useRef();o.current==null&&(o.current=WA({window:a,v5Compat:!0}));let i=o.current,[l,c]=d.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},f=d.useCallback(h=>{u&&rv?rv(()=>c(h)):c(h)},[c,u]);return d.useLayoutEffect(()=>i.listen(f),[i,f]),d.useEffect(()=>T_(r),[r]),d.createElement(__,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i,future:r})}const B_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",U_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mt=d.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:o,replace:i,state:l,target:c,to:u,preventScrollReset:f,viewTransition:h}=t,p=xb(t,D_),{basename:m}=d.useContext(Mr),y,x=!1;if(typeof u=="string"&&U_.test(u)&&(y=u,B_))try{let j=new URL(window.location.href),b=u.startsWith("//")?new URL(j.protocol+u):new URL(u),N=bo(b.pathname,m);b.origin===j.origin&&N!=null?u=N+b.search+b.hash:x=!0}catch{}let v=g_(u,{relative:a}),w=W_(u,{replace:i,state:l,target:c,preventScrollReset:f,relative:a,viewTransition:h});function g(j){r&&r(j),j.defaultPrevented||w(j)}return d.createElement("a",uu({},p,{href:y||v,onClick:x||o?r:g,ref:n,target:c}))}),V_=d.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:c,viewTransition:u,children:f}=t,h=xb(t,I_),p=Ju(c,{relative:h.relative}),m=ya(),y=d.useContext(ub),{navigator:x,basename:v}=d.useContext(Mr),w=y!=null&&q_(p)&&u===!0,g=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,j=m.pathname,b=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(j=j.toLowerCase(),b=b?b.toLowerCase():null,g=g.toLowerCase()),b&&v&&(b=bo(b,v)||b);const N=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let S=j===g||!i&&j.startsWith(g)&&j.charAt(N)==="/",C=b!=null&&(b===g||!i&&b.startsWith(g)&&b.charAt(g.length)==="/"),P={isActive:S,isPending:C,isTransitioning:w},R=S?r:void 0,M;typeof o=="function"?M=o(P):M=[o,S?"active":null,C?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let O=typeof l=="function"?l(P):l;return d.createElement(Mt,uu({},h,{"aria-current":R,className:M,ref:n,style:O,to:c,viewTransition:u}),typeof f=="function"?f(P):f)});var Hh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Hh||(Hh={}));var sv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sv||(sv={}));function H_(e){let t=d.useContext(Yu);return t||Ke(!1),t}function W_(e,t){let{target:n,replace:r,state:a,preventScrollReset:o,relative:i,viewTransition:l}=t===void 0?{}:t,c=Ps(),u=ya(),f=Ju(e,{relative:i});return d.useCallback(h=>{if(O_(h,n)){h.preventDefault();let p=r!==void 0?r:iu(u)===iu(f);c(e,{replace:p,state:a,preventScrollReset:o,relative:i,viewTransition:l})}},[u,c,f,r,a,n,e,o,i,l])}function q_(e,t){t===void 0&&(t={});let n=d.useContext(F_);n==null&&Ke(!1);let{basename:r}=H_(Hh.useViewTransitionState),a=Ju(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=bo(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=bo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return lu(a.pathname,i)!=null||lu(a.pathname,o)!=null}const cf=768;function K_(){const[e,t]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${cf-1}px)`),r=()=>{t(window.innerWidth<cf)};return n.addEventListener("change",r),t(window.innerWidth<cf),()=>n.removeEventListener("change",r)},[]),!!e}const Am=va("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"}}),q=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const i=r?Ro:"button";return s.jsx(i,{className:L(Am({variant:t,size:n,className:e})),ref:o,...a})});q.displayName="Button";const xe=d.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:L("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}));xe.displayName="Input";var G_="Separator",av="horizontal",Q_=["horizontal","vertical"],vb=d.forwardRef((e,t)=>{const{decorative:n,orientation:r=av,...a}=e,o=Y_(r)?r:av,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return s.jsx(ce.div,{"data-orientation":o,...l,...a,ref:t})});vb.displayName=G_;function Y_(e){return Q_.includes(e)}var yb=vb;const Ve=d.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>s.jsx(yb,{ref:a,decorative:n,orientation:t,className:L("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ve.displayName=yb.displayName;var uf="focusScope.autoFocusOnMount",df="focusScope.autoFocusOnUnmount",ov={bubbles:!1,cancelable:!0},X_="FocusScope",Zu=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[l,c]=d.useState(null),u=tn(a),f=tn(o),h=d.useRef(null),p=ve(t,x=>c(x)),m=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let x=function(j){if(m.paused||!l)return;const b=j.target;l.contains(b)?h.current=b:Wr(h.current,{select:!0})},v=function(j){if(m.paused||!l)return;const b=j.relatedTarget;b!==null&&(l.contains(b)||Wr(h.current,{select:!0}))},w=function(j){if(document.activeElement===document.body)for(const N of j)N.removedNodes.length>0&&Wr(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",v);const g=new MutationObserver(w);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),g.disconnect()}}},[r,l,m.paused]),d.useEffect(()=>{if(l){lv.add(m);const x=document.activeElement;if(!l.contains(x)){const w=new CustomEvent(uf,ov);l.addEventListener(uf,u),l.dispatchEvent(w),w.defaultPrevented||(J_(rM(wb(l)),{select:!0}),document.activeElement===x&&Wr(l))}return()=>{l.removeEventListener(uf,u),setTimeout(()=>{const w=new CustomEvent(df,ov);l.addEventListener(df,f),l.dispatchEvent(w),w.defaultPrevented||Wr(x??document.body,{select:!0}),l.removeEventListener(df,f),lv.remove(m)},0)}}},[l,u,f,m]);const y=d.useCallback(x=>{if(!n&&!r||m.paused)return;const v=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,w=document.activeElement;if(v&&w){const g=x.currentTarget,[j,b]=Z_(g);j&&b?!x.shiftKey&&w===b?(x.preventDefault(),n&&Wr(j,{select:!0})):x.shiftKey&&w===j&&(x.preventDefault(),n&&Wr(b,{select:!0})):w===g&&x.preventDefault()}},[n,r,m.paused]);return s.jsx(ce.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Zu.displayName=X_;function J_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wr(r,{select:t}),document.activeElement!==n)return}function Z_(e){const t=wb(e),n=iv(t,e),r=iv(t.reverse(),e);return[n,r]}function wb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iv(e,t){for(const n of e)if(!eM(n,{upTo:t}))return n}function eM(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tM(e){return e instanceof HTMLInputElement&&"select"in e}function Wr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tM(e)&&t&&e.select()}}var lv=nM();function nM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=cv(e,t),e.unshift(t)},remove(t){var n;e=cv(e,t),(n=e[0])==null||n.resume()}}}function cv(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rM(e){return e.filter(t=>t.tagName!=="A")}var ff=0;function _m(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??uv()),document.body.insertAdjacentElement("beforeend",e[1]??uv()),ff++,()=>{ff===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ff--}},[])}function uv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var tr=function(){return tr=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},tr.apply(this,arguments)};function jb(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function sM(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var yc="right-scroll-bar-position",wc="width-before-scroll-bar",aM="with-scroll-bars-hidden",oM="--removed-body-scroll-bar-size";function hf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function iM(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var lM=typeof window<"u"?d.useLayoutEffect:d.useEffect,dv=new WeakMap;function cM(e,t){var n=iM(null,function(r){return e.forEach(function(a){return hf(a,r)})});return lM(function(){var r=dv.get(n);if(r){var a=new Set(r),o=new Set(e),i=n.current;a.forEach(function(l){o.has(l)||hf(l,null)}),o.forEach(function(l){a.has(l)||hf(l,i)})}dv.set(n,e)},[e]),n}function uM(e){return e}function dM(e,t){t===void 0&&(t=uM);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(o),i=n}var c=function(){var f=i;i=[],f.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return a}function fM(e){e===void 0&&(e={});var t=dM(null);return t.options=tr({async:!0,ssr:!1},e),t}var bb=function(e){var t=e.sideCar,n=jb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,tr({},n))};bb.isSideCarExport=!0;function hM(e,t){return e.useMedium(t),bb}var Nb=fM(),pf=function(){},ed=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:pf,onWheelCapture:pf,onTouchMoveCapture:pf}),a=r[0],o=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,h=e.shards,p=e.sideCar,m=e.noRelative,y=e.noIsolation,x=e.inert,v=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,j=e.gapMode,b=jb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,S=cM([n,t]),C=tr(tr({},b),a);return d.createElement(d.Fragment,null,f&&d.createElement(N,{sideCar:Nb,removeScrollBar:u,shards:h,noRelative:m,noIsolation:y,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:j}),i?d.cloneElement(d.Children.only(l),tr(tr({},C),{ref:S})):d.createElement(g,tr({},C,{className:c,ref:S}),l))});ed.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ed.classNames={fullWidth:wc,zeroRight:yc};var pM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pM();return t&&e.setAttribute("nonce",t),e}function gM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vM=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mM())&&(gM(t,n),xM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yM=function(){var e=vM();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Sb=function(){var e=yM(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},wM={left:0,top:0,right:0,gap:0},mf=function(e){return parseInt(e||"",10)||0},jM=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[mf(n),mf(r),mf(a)]},bM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wM;var t=jM(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},NM=Sb(),Qa="data-scroll-locked",SM=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
.`.concat(aM,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(l,"px ").concat(r,`;
}
body[`).concat(Qa,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(a,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(yc,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(wc,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(yc," .").concat(yc,` {
right: 0 `).concat(r,`;
}
.`).concat(wc," .").concat(wc,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(Qa,`] {
`).concat(oM,": ").concat(l,`px;
}
`)},fv=function(){var e=parseInt(document.body.getAttribute(Qa)||"0",10);return isFinite(e)?e:0},CM=function(){d.useEffect(function(){return document.body.setAttribute(Qa,(fv()+1).toString()),function(){var e=fv()-1;e<=0?document.body.removeAttribute(Qa):document.body.setAttribute(Qa,e.toString())}},[])},EM=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;CM();var o=d.useMemo(function(){return bM(a)},[a]);return d.createElement(NM,{styles:SM(o,!t,a,n?"":"!important")})},Wh=!1;if(typeof window<"u")try{var Xl=Object.defineProperty({},"passive",{get:function(){return Wh=!0,!0}});window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{Wh=!1}var Ca=Wh?{passive:!1}:!1,RM=function(e){return e.tagName==="TEXTAREA"},Cb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!RM(e)&&n[t]==="visible")},PM=function(e){return Cb(e,"overflowY")},kM=function(e){return Cb(e,"overflowX")},hv=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Eb(e,r);if(a){var o=Rb(e,r),i=o[1],l=o[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TM=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},AM=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Eb=function(e,t){return e==="v"?PM(t):kM(t)},Rb=function(e,t){return e==="v"?TM(t):AM(t)},_M=function(e,t){return e==="h"&&t==="rtl"?-1:1},MM=function(e,t,n,r,a){var o=_M(e,window.getComputedStyle(t).direction),i=o*r,l=n.target,c=t.contains(l),u=!1,f=i>0,h=0,p=0;do{if(!l)break;var m=Rb(e,l),y=m[0],x=m[1],v=m[2],w=x-v-o*y;(y||w)&&Eb(e,l)&&(h+=w,p+=y);var g=l.parentNode;l=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&(Math.abs(h)<1||!a)||!f&&(Math.abs(p)<1||!a))&&(u=!0),u},Jl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pv=function(e){return[e.deltaX,e.deltaY]},mv=function(e){return e&&"current"in e?e.current:e},OM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},DM=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},IM=0,Ea=[];function LM(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),a=d.useState(IM++)[0],o=d.useState(Sb)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=sM([e.lockRef.current],(e.shards||[]).map(mv),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=d.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!i.current.allowPinchZoom;var w=Jl(x),g=n.current,j="deltaX"in x?x.deltaX:g[0]-w[0],b="deltaY"in x?x.deltaY:g[1]-w[1],N,S=x.target,C=Math.abs(j)>Math.abs(b)?"h":"v";if("touches"in x&&C==="h"&&S.type==="range")return!1;var P=hv(C,S);if(!P)return!0;if(P?N=C:(N=C==="v"?"h":"v",P=hv(C,S)),!P)return!1;if(!r.current&&"changedTouches"in x&&(j||b)&&(r.current=N),!N)return!0;var R=r.current||N;return MM(R,v,x,R==="h"?j:b,!0)},[]),c=d.useCallback(function(x){var v=x;if(!(!Ea.length||Ea[Ea.length-1]!==o)){var w="deltaY"in v?pv(v):Jl(v),g=t.current.filter(function(N){return N.name===v.type&&(N.target===v.target||v.target===N.shadowParent)&&OM(N.delta,w)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var j=(i.current.shards||[]).map(mv).filter(Boolean).filter(function(N){return N.contains(v.target)}),b=j.length>0?l(v,j[0]):!i.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(x,v,w,g){var j={name:x,delta:v,target:w,should:g,shadowParent:FM(w)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(b){return b!==j})},1)},[]),f=d.useCallback(function(x){n.current=Jl(x),r.current=void 0},[]),h=d.useCallback(function(x){u(x.type,pv(x),x.target,l(x,e.lockRef.current))},[]),p=d.useCallback(function(x){u(x.type,Jl(x),x.target,l(x,e.lockRef.current))},[]);d.useEffect(function(){return Ea.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ca),document.addEventListener("touchmove",c,Ca),document.addEventListener("touchstart",f,Ca),function(){Ea=Ea.filter(function(x){return x!==o}),document.removeEventListener("wheel",c,Ca),document.removeEventListener("touchmove",c,Ca),document.removeEventListener("touchstart",f,Ca)}},[]);var m=e.removeScrollBar,y=e.inert;return d.createElement(d.Fragment,null,y?d.createElement(o,{styles:DM(a)}):null,m?d.createElement(EM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function FM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $M=hM(Nb,LM);var td=d.forwardRef(function(e,t){return d.createElement(ed,tr({},e,{ref:t,sideCar:$M}))});td.classNames=ed.classNames;var zM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ra=new WeakMap,Zl=new WeakMap,ec={},gf=0,Pb=function(e){return e&&(e.host||Pb(e.parentNode))},BM=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Pb(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},UM=function(e,t,n,r){var a=BM(t,Array.isArray(e)?e:[e]);ec[n]||(ec[n]=new WeakMap);var o=ec[n],i=[],l=new Set,c=new Set(a),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};a.forEach(u);var f=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(l.has(p))f(p);else try{var m=p.getAttribute(r),y=m!==null&&m!=="false",x=(Ra.get(p)||0)+1,v=(o.get(p)||0)+1;Ra.set(p,x),o.set(p,v),i.push(p),x===1&&y&&Zl.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return f(t),l.clear(),gf++,function(){i.forEach(function(h){var p=Ra.get(h)-1,m=o.get(h)-1;Ra.set(h,p),o.set(h,m),p||(Zl.has(h)||h.removeAttribute(r),Zl.delete(h)),m||h.removeAttribute(n)}),gf--,gf||(Ra=new WeakMap,Ra=new WeakMap,Zl=new WeakMap,ec={})}},Mm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=zM(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),UM(r,a,n,"aria-hidden")):function(){return null}},nd="Dialog",[kb,Tb]=$t(nd),[VM,Hn]=kb(nd),Ab=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,l=d.useRef(null),c=d.useRef(null),[u,f]=ir({prop:r,defaultProp:a??!1,onChange:o,caller:nd});return s.jsx(VM,{scope:t,triggerRef:l,contentRef:c,contentId:zn(),titleId:zn(),descriptionId:zn(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(h=>!h),[f]),modal:i,children:n})};Ab.displayName=nd;var _b="DialogTrigger",Mb=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Hn(_b,n),o=ve(t,a.triggerRef);return s.jsx(ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Im(a.open),...r,ref:o,onClick:W(e.onClick,a.onOpenToggle)})});Mb.displayName=_b;var Om="DialogPortal",[HM,Ob]=kb(Om,{forceMount:void 0}),Db=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Hn(Om,t);return s.jsx(HM,{scope:t,forceMount:n,children:d.Children.map(r,i=>s.jsx(En,{present:n||o.open,children:s.jsx(sl,{asChild:!0,container:a,children:i})}))})};Db.displayName=Om;var du="DialogOverlay",Ib=d.forwardRef((e,t)=>{const n=Ob(du,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Hn(du,e.__scopeDialog);return o.modal?s.jsx(En,{present:r||o.open,children:s.jsx(qM,{...a,ref:t})}):null});Ib.displayName=du;var WM=oa("DialogOverlay.RemoveScroll"),qM=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Hn(du,n);return s.jsx(td,{as:WM,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(ce.div,{"data-state":Im(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ua="DialogContent",Lb=d.forwardRef((e,t)=>{const n=Ob(ua,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Hn(ua,e.__scopeDialog);return s.jsx(En,{present:r||o.open,children:o.modal?s.jsx(KM,{...a,ref:t}):s.jsx(GM,{...a,ref:t})})});Lb.displayName=ua;var KM=d.forwardRef((e,t)=>{const n=Hn(ua,e.__scopeDialog),r=d.useRef(null),a=ve(t,n.contentRef,r);return d.useEffect(()=>{const o=r.current;if(o)return Mm(o)},[]),s.jsx(Fb,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:W(e.onFocusOutside,o=>o.preventDefault())})}),GM=d.forwardRef((e,t)=>{const n=Hn(ua,e.__scopeDialog),r=d.useRef(!1),a=d.useRef(!1);return s.jsx(Fb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Fb=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,l=Hn(ua,n),c=d.useRef(null),u=ve(t,c);return _m(),s.jsxs(s.Fragment,{children:[s.jsx(Zu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:s.jsx(Po,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Im(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(YM,{titleId:l.titleId}),s.jsx(JM,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Dm="DialogTitle",$b=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Hn(Dm,n);return s.jsx(ce.h2,{id:a.titleId,...r,ref:t})});$b.displayName=Dm;var zb="DialogDescription",Bb=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Hn(zb,n);return s.jsx(ce.p,{id:a.descriptionId,...r,ref:t})});Bb.displayName=zb;var Ub="DialogClose",Vb=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Hn(Ub,n);return s.jsx(ce.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>a.onOpenChange(!1))})});Vb.displayName=Ub;function Im(e){return e?"open":"closed"}var Hb="DialogTitleWarning",[QM,Wb]=oR(Hb,{contentName:ua,titleName:Dm,docsSlug:"dialog"}),YM=({titleId:e})=>{const t=Wb(Hb),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},XM="DialogDescriptionWarning",JM=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wb(XM).contentName}}.`;return d.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Lm=Ab,ZM=Mb,Fm=Db,ll=Ib,cl=Lb,ul=$b,dl=Bb,rd=Vb;const eO=Lm,tO=Fm,qb=d.forwardRef(({className:e,...t},n)=>s.jsx(ll,{className:L("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));qb.displayName=ll.displayName;const nO=va("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Kb=d.forwardRef(({side:e="right",className:t,children:n,...r},a)=>s.jsxs(tO,{children:[s.jsx(qb,{}),s.jsxs(cl,{ref:a,className:L(nO({side:e}),t),...r,children:[n,s.jsxs(rd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(lm,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Kb.displayName=cl.displayName;const rO=d.forwardRef(({className:e,...t},n)=>s.jsx(ul,{ref:n,className:L("text-lg font-semibold text-foreground",e),...t}));rO.displayName=ul.displayName;const sO=d.forwardRef(({className:e,...t},n)=>s.jsx(dl,{ref:n,className:L("text-sm text-muted-foreground",e),...t}));sO.displayName=dl.displayName;function gv({className:e,...t}){return s.jsx("div",{className:L("animate-pulse rounded-md bg-muted",e),...t})}const aO="sidebar:state",oO=60*60*24*7,iO="16rem",lO="18rem",cO="3rem",uO="b",Gb=d.createContext(null);function fl(){const e=d.useContext(Gb);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Qb=d.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...i},l)=>{const c=K_(),[u,f]=d.useState(!1),[h,p]=d.useState(e),m=t??h,y=d.useCallback(g=>{const j=typeof g=="function"?g(m):g;n?n(j):p(j),document.cookie=`${aO}=${j}; path=/; max-age=${oO}`},[n,m]),x=d.useCallback(()=>c?f(g=>!g):y(g=>!g),[c,y,f]);d.useEffect(()=>{const g=j=>{j.key===uO&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),x())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[x]);const v=m?"expanded":"collapsed",w=d.useMemo(()=>({state:v,open:m,setOpen:y,isMobile:c,openMobile:u,setOpenMobile:f,toggleSidebar:x}),[v,m,y,c,u,f,x]);return s.jsx(Gb.Provider,{value:w,children:s.jsx(Wj,{delayDuration:0,children:s.jsx("div",{style:{"--sidebar-width":iO,"--sidebar-width-icon":cO,...a},className:L("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:o})})})});Qb.displayName="SidebarProvider";const Yb=d.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o},i)=>{const{isMobile:l,state:c,openMobile:u,setOpenMobile:f}=fl();return n==="none"?s.jsx("div",{className:L("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...o,children:a}):l?s.jsx(eO,{open:u,onOpenChange:f,...o,children:s.jsx(Kb,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":lO},side:e,children:s.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):s.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":c==="collapsed"?n:"","data-variant":t,"data-side":e,children:[s.jsx("div",{className:L("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),s.jsx("div",{className:L("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:s.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});Yb.displayName="Sidebar";const Xb=d.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:a}=fl();return s.jsxs(q,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:L("h-7 w-7",e),onClick:o=>{t==null||t(o),a()},...n,children:[s.jsx(cP,{}),s.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Xb.displayName="SidebarTrigger";const dO=d.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=fl();return s.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:L("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});dO.displayName="SidebarRail";const fO=d.forwardRef(({className:e,...t},n)=>s.jsx("main",{ref:n,className:L("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));fO.displayName="SidebarInset";const hO=d.forwardRef(({className:e,...t},n)=>s.jsx(xe,{ref:n,"data-sidebar":"input",className:L("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));hO.displayName="SidebarInput";const pO=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"header",className:L("flex flex-col gap-2 p-2",e),...t}));pO.displayName="SidebarHeader";const mO=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"footer",className:L("flex flex-col gap-2 p-2",e),...t}));mO.displayName="SidebarFooter";const gO=d.forwardRef(({className:e,...t},n)=>s.jsx(Ve,{ref:n,"data-sidebar":"separator",className:L("mx-2 w-auto bg-sidebar-border",e),...t}));gO.displayName="SidebarSeparator";const Jb=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"content",className:L("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Jb.displayName="SidebarContent";const jc=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"group",className:L("relative flex w-full min-w-0 flex-col p-2",e),...t}));jc.displayName="SidebarGroup";const qh=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ro:"div";return s.jsx(a,{ref:r,"data-sidebar":"group-label",className:L("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});qh.displayName="SidebarGroupLabel";const xO=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ro:"button";return s.jsx(a,{ref:r,"data-sidebar":"group-action",className:L("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});xO.displayName="SidebarGroupAction";const bc=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"group-content",className:L("w-full text-sm",e),...t}));bc.displayName="SidebarGroupContent";const Nc=d.forwardRef(({className:e,...t},n)=>s.jsx("ul",{ref:n,"data-sidebar":"menu",className:L("flex w-full min-w-0 flex-col gap-1",e),...t}));Nc.displayName="SidebarMenu";const Sc=d.forwardRef(({className:e,...t},n)=>s.jsx("li",{ref:n,"data-sidebar":"menu-item",className:L("group/menu-item relative",e),...t}));Sc.displayName="SidebarMenuItem";const vO=va("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Cc=d.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...i},l)=>{const c=e?Ro:"button",{isMobile:u,state:f}=fl(),h=s.jsx(c,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:L(vO({variant:n,size:r}),o),...i});return a?(typeof a=="string"&&(a={children:a}),s.jsxs(dA,{children:[s.jsx(fA,{asChild:!0,children:h}),s.jsx(qj,{side:"right",align:"center",hidden:f!=="collapsed"||u,...a})]})):h});Cc.displayName="SidebarMenuButton";const yO=d.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},a)=>{const o=t?Ro:"button";return s.jsx(o,{ref:a,"data-sidebar":"menu-action",className:L("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});yO.displayName="SidebarMenuAction";const wO=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:L("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));wO.displayName="SidebarMenuBadge";const jO=d.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const a=d.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return s.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:L("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&s.jsx(gv,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),s.jsx(gv,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});jO.displayName="SidebarMenuSkeleton";const bO=d.forwardRef(({className:e,...t},n)=>s.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:L("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));bO.displayName="SidebarMenuSub";const NO=d.forwardRef(({...e},t)=>s.jsx("li",{ref:t,...e}));NO.displayName="SidebarMenuSubItem";const SO=d.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...a},o)=>{const i=e?Ro:"a";return s.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:L("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...a})});SO.displayName="SidebarMenuSubButton";const Ec=d.forwardRef(({className:e,activeClassName:t,pendingClassName:n,to:r,...a},o)=>s.jsx(V_,{ref:o,to:r,className:({isActive:i,isPending:l})=>L(e,i&&t,l&&n),...a}));Ec.displayName="NavLink";function Zb(e,t){return function(){return e.apply(t,arguments)}}const{toString:CO}=Object.prototype,{getPrototypeOf:$m}=Object,{iterator:sd,toStringTag:e1}=Symbol,ad=(e=>t=>{const n=CO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wn=e=>(e=e.toLowerCase(),t=>ad(t)===e),od=e=>t=>typeof t===e,{isArray:Io}=Array,No=od("undefined");function hl(e){return e!==null&&!No(e)&&e.constructor!==null&&!No(e.constructor)&&Xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const t1=Wn("ArrayBuffer");function EO(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&t1(e.buffer),t}const RO=od("string"),Xt=od("function"),n1=od("number"),pl=e=>e!==null&&typeof e=="object",PO=e=>e===!0||e===!1,Rc=e=>{if(ad(e)!=="object")return!1;const t=$m(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(e1 in e)&&!(sd in e)},kO=e=>{if(!pl(e)||hl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},TO=Wn("Date"),AO=Wn("File"),_O=Wn("Blob"),MO=Wn("FileList"),OO=e=>pl(e)&&Xt(e.pipe),DO=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Xt(e.append)&&((t=ad(e))==="formdata"||t==="object"&&Xt(e.toString)&&e.toString()==="[object FormData]"))},IO=Wn("URLSearchParams"),[LO,FO,$O,zO]=["ReadableStream","Request","Response","Headers"].map(Wn),BO=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ml(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Io(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(hl(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let l;for(r=0;r<i;r++)l=o[r],t.call(null,e[l],l,e)}}function r1(e,t){if(hl(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Us=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,s1=e=>!No(e)&&e!==Us;function Kh(){const{caseless:e,skipUndefined:t}=s1(this)&&this||{},n={},r=(a,o)=>{const i=e&&r1(n,o)||o;Rc(n[i])&&Rc(a)?n[i]=Kh(n[i],a):Rc(a)?n[i]=Kh({},a):Io(a)?n[i]=a.slice():(!t||!No(a))&&(n[i]=a)};for(let a=0,o=arguments.length;a<o;a++)arguments[a]&&ml(arguments[a],r);return n}const UO=(e,t,n,{allOwnKeys:r}={})=>(ml(t,(a,o)=>{n&&Xt(a)?e[o]=Zb(a,n):e[o]=a},{allOwnKeys:r}),e),VO=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),HO=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},WO=(e,t,n,r)=>{let a,o,i;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&$m(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qO=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},KO=e=>{if(!e)return null;if(Io(e))return e;let t=e.length;if(!n1(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},GO=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$m(Uint8Array)),QO=(e,t)=>{const r=(e&&e[sd]).call(e);let a;for(;(a=r.next())&&!a.done;){const o=a.value;t.call(e,o[0],o[1])}},YO=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},XO=Wn("HTMLFormElement"),JO=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),xv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ZO=Wn("RegExp"),a1=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ml(n,(a,o)=>{let i;(i=t(a,o,e))!==!1&&(r[o]=i||a)}),Object.defineProperties(e,r)},eD=e=>{a1(e,(t,n)=>{if(Xt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Xt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},tD=(e,t)=>{const n={},r=a=>{a.forEach(o=>{n[o]=!0})};return Io(e)?r(e):r(String(e).split(t)),n},nD=()=>{},rD=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function sD(e){return!!(e&&Xt(e.append)&&e[e1]==="FormData"&&e[sd])}const aD=e=>{const t=new Array(10),n=(r,a)=>{if(pl(r)){if(t.indexOf(r)>=0)return;if(hl(r))return r;if(!("toJSON"in r)){t[a]=r;const o=Io(r)?[]:{};return ml(r,(i,l)=>{const c=n(i,a+1);!No(c)&&(o[l]=c)}),t[a]=void 0,o}}return r};return n(e,0)},oD=Wn("AsyncFunction"),iD=e=>e&&(pl(e)||Xt(e))&&Xt(e.then)&&Xt(e.catch),o1=((e,t)=>e?setImmediate:t?((n,r)=>(Us.addEventListener("message",({source:a,data:o})=>{a===Us&&o===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Us.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Xt(Us.postMessage)),lD=typeof queueMicrotask<"u"?queueMicrotask.bind(Us):typeof process<"u"&&process.nextTick||o1,cD=e=>e!=null&&Xt(e[sd]),_={isArray:Io,isArrayBuffer:t1,isBuffer:hl,isFormData:DO,isArrayBufferView:EO,isString:RO,isNumber:n1,isBoolean:PO,isObject:pl,isPlainObject:Rc,isEmptyObject:kO,isReadableStream:LO,isRequest:FO,isResponse:$O,isHeaders:zO,isUndefined:No,isDate:TO,isFile:AO,isBlob:_O,isRegExp:ZO,isFunction:Xt,isStream:OO,isURLSearchParams:IO,isTypedArray:GO,isFileList:MO,forEach:ml,merge:Kh,extend:UO,trim:BO,stripBOM:VO,inherits:HO,toFlatObject:WO,kindOf:ad,kindOfTest:Wn,endsWith:qO,toArray:KO,forEachEntry:QO,matchAll:YO,isHTMLForm:XO,hasOwnProperty:xv,hasOwnProp:xv,reduceDescriptors:a1,freezeMethods:eD,toObjectSet:tD,toCamelCase:JO,noop:nD,toFiniteNumber:rD,findKey:r1,global:Us,isContextDefined:s1,isSpecCompliantForm:sD,toJSONObject:aD,isAsyncFn:oD,isThenable:iD,setImmediate:o1,asap:lD,isIterable:cD};function pe(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}_.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_.toJSONObject(this.config),code:this.code,status:this.status}}});const i1=pe.prototype,l1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{l1[e]={value:e}});Object.defineProperties(pe,l1);Object.defineProperty(i1,"isAxiosError",{value:!0});pe.from=(e,t,n,r,a,o)=>{const i=Object.create(i1);_.toFlatObject(e,i,function(f){return f!==Error.prototype},u=>u!=="isAxiosError");const l=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return pe.call(i,l,c,n,r,a),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const uD=null;function Gh(e){return _.isPlainObject(e)||_.isArray(e)}function c1(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function vv(e,t,n){return e?e.concat(t).map(function(a,o){return a=c1(a),!n&&o?"["+a+"]":a}).join(n?".":""):t}function dD(e){return _.isArray(e)&&!e.some(Gh)}const fD=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function id(e,t,n){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!_.isUndefined(v[x])});const r=n.metaTokens,a=n.visitor||f,o=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(t);if(!_.isFunction(a))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(_.isDate(y))return y.toISOString();if(_.isBoolean(y))return y.toString();if(!c&&_.isBlob(y))throw new pe("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(y)||_.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,x,v){let w=y;if(y&&!v&&typeof y=="object"){if(_.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=JSON.stringify(y);else if(_.isArray(y)&&dD(y)||(_.isFileList(y)||_.endsWith(x,"[]"))&&(w=_.toArray(y)))return x=c1(x),w.forEach(function(j,b){!(_.isUndefined(j)||j===null)&&t.append(i===!0?vv([x],b,o):i===null?x:x+"[]",u(j))}),!1}return Gh(y)?!0:(t.append(vv(v,x,o),u(y)),!1)}const h=[],p=Object.assign(fD,{defaultVisitor:f,convertValue:u,isVisitable:Gh});function m(y,x){if(!_.isUndefined(y)){if(h.indexOf(y)!==-1)throw Error("Circular reference detected in "+x.join("."));h.push(y),_.forEach(y,function(w,g){(!(_.isUndefined(w)||w===null)&&a.call(t,w,_.isString(g)?g.trim():g,x,p))===!0&&m(w,x?x.concat(g):[g])}),h.pop()}}if(!_.isObject(e))throw new TypeError("data must be an object");return m(e),t}function yv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function zm(e,t){this._pairs=[],e&&id(e,this,t)}const u1=zm.prototype;u1.append=function(t,n){this._pairs.push([t,n])};u1.toString=function(t){const n=t?function(r){return t.call(this,r,yv)}:yv;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function hD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function d1(e,t,n){if(!t)return e;const r=n&&n.encode||hD;_.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let o;if(a?o=a(t,n):o=_.isURLSearchParams(t)?t.toString():new zm(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class wv{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_.forEach(this.handlers,function(r){r!==null&&t(r)})}}const f1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pD=typeof URLSearchParams<"u"?URLSearchParams:zm,mD=typeof FormData<"u"?FormData:null,gD=typeof Blob<"u"?Blob:null,xD={isBrowser:!0,classes:{URLSearchParams:pD,FormData:mD,Blob:gD},protocols:["http","https","file","blob","url","data"]},Bm=typeof window<"u"&&typeof document<"u",Qh=typeof navigator=="object"&&navigator||void 0,vD=Bm&&(!Qh||["ReactNative","NativeScript","NS"].indexOf(Qh.product)<0),yD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wD=Bm&&window.location.href||"http://localhost",jD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bm,hasStandardBrowserEnv:vD,hasStandardBrowserWebWorkerEnv:yD,navigator:Qh,origin:wD},Symbol.toStringTag,{value:"Module"})),Nt={...jD,...xD};function bD(e,t){return id(e,new Nt.classes.URLSearchParams,{visitor:function(n,r,a,o){return Nt.isNode&&_.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function ND(e){return _.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function SD(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}function h1(e){function t(n,r,a,o){let i=n[o++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),c=o>=n.length;return i=!i&&_.isArray(a)?a.length:i,c?(_.hasOwnProp(a,i)?a[i]=[a[i],r]:a[i]=r,!l):((!a[i]||!_.isObject(a[i]))&&(a[i]=[]),t(n,r,a[i],o)&&_.isArray(a[i])&&(a[i]=SD(a[i])),!l)}if(_.isFormData(e)&&_.isFunction(e.entries)){const n={};return _.forEachEntry(e,(r,a)=>{t(ND(r),a,n,0)}),n}return null}function CD(e,t,n){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const gl={transitional:f1,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,o=_.isObject(t);if(o&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return a?JSON.stringify(h1(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t)||_.isReadableStream(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return bD(t,this.formSerializer).toString();if((l=_.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return id(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||a?(n.setContentType("application/json",!1),CD(t)):t}],transformResponse:[function(t){const n=this.transitional||gl.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(_.isResponse(t)||_.isReadableStream(t))return t;if(t&&_.isString(t)&&(r&&!this.responseType||a)){const i=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(l){if(i)throw l.name==="SyntaxError"?pe.from(l,pe.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],e=>{gl.headers[e]={}});const ED=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RD=e=>{const t={};let n,r,a;return e&&e.split(`
`).forEach(function(i){a=i.indexOf(":"),n=i.substring(0,a).trim().toLowerCase(),r=i.substring(a+1).trim(),!(!n||t[n]&&ED[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},jv=Symbol("internals");function Jo(e){return e&&String(e).trim().toLowerCase()}function Pc(e){return e===!1||e==null?e:_.isArray(e)?e.map(Pc):String(e)}function PD(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const kD=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xf(e,t,n,r,a){if(_.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!_.isString(t)){if(_.isString(r))return t.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(t)}}function TD(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function AD(e,t){const n=_.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,o,i){return this[r].call(this,t,a,o,i)},configurable:!0})})}class Jt{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function o(l,c,u){const f=Jo(c);if(!f)throw new Error("header name must be a non-empty string");const h=_.findKey(a,f);(!h||a[h]===void 0||u===!0||u===void 0&&a[h]!==!1)&&(a[h||c]=Pc(l))}const i=(l,c)=>_.forEach(l,(u,f)=>o(u,f,c));if(_.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(_.isString(t)&&(t=t.trim())&&!kD(t))i(RD(t),n);else if(_.isObject(t)&&_.isIterable(t)){let l={},c,u;for(const f of t){if(!_.isArray(f))throw TypeError("Object iterator must return a key-value pair");l[u=f[0]]=(c=l[u])?_.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}i(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Jo(t),t){const r=_.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return PD(a);if(_.isFunction(n))return n.call(this,a,r);if(_.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Jo(t),t){const r=_.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||xf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function o(i){if(i=Jo(i),i){const l=_.findKey(r,i);l&&(!n||xf(r,r[l],l,n))&&(delete r[l],a=!0)}}return _.isArray(t)?t.forEach(o):o(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const o=n[r];(!t||xf(this,this[o],o,t,!0))&&(delete this[o],a=!0)}return a}normalize(t){const n=this,r={};return _.forEach(this,(a,o)=>{const i=_.findKey(r,o);if(i){n[i]=Pc(a),delete n[o];return}const l=t?TD(o):String(o).trim();l!==o&&delete n[o],n[l]=Pc(a),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&_.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[jv]=this[jv]={accessors:{}}).accessors,a=this.prototype;function o(i){const l=Jo(i);r[l]||(AD(a,i),r[l]=!0)}return _.isArray(t)?t.forEach(o):o(t),this}}Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(Jt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_.freezeMethods(Jt);function vf(e,t){const n=this||gl,r=t||n,a=Jt.from(r.headers);let o=r.data;return _.forEach(e,function(l){o=l.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function p1(e){return!!(e&&e.__CANCEL__)}function Lo(e,t,n){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,n),this.name="CanceledError"}_.inherits(Lo,pe,{__CANCEL__:!0});function m1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pe("Request failed with status code "+n.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function _D(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function MD(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[o];i||(i=u),n[a]=c,r[a]=u;let h=o,p=0;for(;h!==a;)p+=n[h++],h=h%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),u-i<t)return;const m=f&&u-f;return m?Math.round(p*1e3/m):void 0}}function OD(e,t){let n=0,r=1e3/t,a,o;const i=(u,f=Date.now())=>{n=f,a=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const f=Date.now(),h=f-n;h>=r?i(u,f):(a=u,o||(o=setTimeout(()=>{o=null,i(a)},r-h)))},()=>a&&i(a)]}const fu=(e,t,n=3)=>{let r=0;const a=MD(50,250);return OD(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,c=i-r,u=a(c),f=i<=l;r=i;const h={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&f?(l-i)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},n)},bv=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Nv=e=>(...t)=>_.asap(()=>e(...t)),DD=Nt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Nt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,ID=Nt.hasStandardBrowserEnv?{write(e,t,n,r,a,o,i){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];_.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),_.isString(r)&&l.push(`path=${r}`),_.isString(a)&&l.push(`domain=${a}`),o===!0&&l.push("secure"),_.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function LD(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function FD(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function g1(e,t,n){let r=!LD(t);return e&&(r||n==!1)?FD(e,t):t}const Sv=e=>e instanceof Jt?{...e}:e;function da(e,t){t=t||{};const n={};function r(u,f,h,p){return _.isPlainObject(u)&&_.isPlainObject(f)?_.merge.call({caseless:p},u,f):_.isPlainObject(f)?_.merge({},f):_.isArray(f)?f.slice():f}function a(u,f,h,p){if(_.isUndefined(f)){if(!_.isUndefined(u))return r(void 0,u,h,p)}else return r(u,f,h,p)}function o(u,f){if(!_.isUndefined(f))return r(void 0,f)}function i(u,f){if(_.isUndefined(f)){if(!_.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function l(u,f,h){if(h in t)return r(u,f);if(h in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,f,h)=>a(Sv(u),Sv(f),h,!0)};return _.forEach(Object.keys({...e,...t}),function(f){const h=c[f]||a,p=h(e[f],t[f],f);_.isUndefined(p)&&h!==l||(n[f]=p)}),n}const x1=e=>{const t=da({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:l}=t;if(t.headers=i=Jt.from(i),t.url=d1(g1(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),_.isFormData(n)){if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(_.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([f,h])=>{u.includes(f.toLowerCase())&&i.set(f,h)})}}if(Nt.hasStandardBrowserEnv&&(r&&_.isFunction(r)&&(r=r(t)),r||r!==!1&&DD(t.url))){const c=a&&o&&ID.read(o);c&&i.set(a,c)}return t},$D=typeof XMLHttpRequest<"u",zD=$D&&function(e){return new Promise(function(n,r){const a=x1(e);let o=a.data;const i=Jt.from(a.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=a,f,h,p,m,y;function x(){m&&m(),y&&y(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function w(){if(!v)return;const j=Jt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),N={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:j,config:e,request:v};m1(function(C){n(C),x()},function(C){r(C),x()},N),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new pe("Request aborted",pe.ECONNABORTED,e,v)),v=null)},v.onerror=function(b){const N=b&&b.message?b.message:"Network Error",S=new pe(N,pe.ERR_NETWORK,e,v);S.event=b||null,r(S),v=null},v.ontimeout=function(){let b=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const N=a.transitional||f1;a.timeoutErrorMessage&&(b=a.timeoutErrorMessage),r(new pe(b,N.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,v)),v=null},o===void 0&&i.setContentType(null),"setRequestHeader"in v&&_.forEach(i.toJSON(),function(b,N){v.setRequestHeader(N,b)}),_.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&l!=="json"&&(v.responseType=a.responseType),u&&([p,y]=fu(u,!0),v.addEventListener("progress",p)),c&&v.upload&&([h,m]=fu(c),v.upload.addEventListener("progress",h),v.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(f=j=>{v&&(r(!j||j.type?new Lo(null,e,v):j),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const g=_D(a.url);if(g&&Nt.protocols.indexOf(g)===-1){r(new pe("Unsupported protocol "+g+":",pe.ERR_BAD_REQUEST,e));return}v.send(o||null)})},BD=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const o=function(u){if(!a){a=!0,l();const f=u instanceof Error?u:this.reason;r.abort(f instanceof pe?f:new Lo(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,o(new pe(`timeout ${t} of ms exceeded`,pe.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>_.asap(l),c}},UD=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},VD=async function*(e,t){for await(const n of HD(e))yield*UD(n,t)},HD=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Cv=(e,t,n,r)=>{const a=VD(e,t);let o=0,i,l=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await a.next();if(u){l(),c.close();return}let h=f.byteLength;if(n){let p=o+=h;n(p)}c.enqueue(new Uint8Array(f))}catch(u){throw l(u),u}},cancel(c){return l(c),a.return()}},{highWaterMark:2})},Ev=64*1024,{isFunction:tc}=_,WD=(({Request:e,Response:t})=>({Request:e,Response:t}))(_.global),{ReadableStream:Rv,TextEncoder:Pv}=_.global,kv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},qD=e=>{e=_.merge.call({skipUndefined:!0},WD,e);const{fetch:t,Request:n,Response:r}=e,a=t?tc(t):typeof fetch=="function",o=tc(n),i=tc(r);if(!a)return!1;const l=a&&tc(Rv),c=a&&(typeof Pv=="function"?(y=>x=>y.encode(x))(new Pv):async y=>new Uint8Array(await new n(y).arrayBuffer())),u=o&&l&&kv(()=>{let y=!1;const x=new n(Nt.origin,{body:new Rv,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!x}),f=i&&l&&kv(()=>_.isReadableStream(new r("").body)),h={stream:f&&(y=>y.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!h[y]&&(h[y]=(x,v)=>{let w=x&&x[y];if(w)return w.call(x);throw new pe(`Response type '${y}' is not supported`,pe.ERR_NOT_SUPPORT,v)})});const p=async y=>{if(y==null)return 0;if(_.isBlob(y))return y.size;if(_.isSpecCompliantForm(y))return(await new n(Nt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(_.isArrayBufferView(y)||_.isArrayBuffer(y))return y.byteLength;if(_.isURLSearchParams(y)&&(y=y+""),_.isString(y))return(await c(y)).byteLength},m=async(y,x)=>{const v=_.toFiniteNumber(y.getContentLength());return v??p(x)};return async y=>{let{url:x,method:v,data:w,signal:g,cancelToken:j,timeout:b,onDownloadProgress:N,onUploadProgress:S,responseType:C,headers:P,withCredentials:R="same-origin",fetchOptions:M}=x1(y),O=t||fetch;C=C?(C+"").toLowerCase():"text";let D=BD([g,j&&j.toAbortSignal()],b),Z=null;const I=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let re;try{if(S&&u&&v!=="get"&&v!=="head"&&(re=await m(P,w))!==0){let G=new n(x,{method:"POST",body:w,duplex:"half"}),T;if(_.isFormData(w)&&(T=G.headers.get("content-type"))&&P.setContentType(T),G.body){const[K,H]=bv(re,fu(Nv(S)));w=Cv(G.body,Ev,K,H)}}_.isString(R)||(R=R?"include":"omit");const z=o&&"credentials"in n.prototype,Q={...M,signal:D,method:v.toUpperCase(),headers:P.normalize().toJSON(),body:w,duplex:"half",credentials:z?R:void 0};Z=o&&new n(x,Q);let A=await(o?O(Z,M):O(x,Q));const k=f&&(C==="stream"||C==="response");if(f&&(N||k&&I)){const G={};["status","statusText","headers"].forEach(Ne=>{G[Ne]=A[Ne]});const T=_.toFiniteNumber(A.headers.get("content-length")),[K,H]=N&&bv(T,fu(Nv(N),!0))||[];A=new r(Cv(A.body,Ev,K,()=>{H&&H(),I&&I()}),G)}C=C||"text";let $=await h[_.findKey(h,C)||"text"](A,y);return!k&&I&&I(),await new Promise((G,T)=>{m1(G,T,{data:$,headers:Jt.from(A.headers),status:A.status,statusText:A.statusText,config:y,request:Z})})}catch(z){throw I&&I(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,y,Z),{cause:z.cause||z}):pe.from(z,z&&z.code,y,Z)}}},KD=new Map,v1=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,o=[r,a,n];let i=o.length,l=i,c,u,f=KD;for(;l--;)c=o[l],u=f.get(c),u===void 0&&f.set(c,u=l?new Map:qD(t)),f=u;return u};v1();const Um={http:uD,xhr:zD,fetch:{get:v1}};_.forEach(Um,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Tv=e=>`- ${e}`,GD=e=>_.isFunction(e)||e===null||e===!1;function QD(e,t){e=_.isArray(e)?e:[e];const{length:n}=e;let r,a;const o={};for(let i=0;i<n;i++){r=e[i];let l;if(a=r,!GD(r)&&(a=Um[(l=String(r)).toLowerCase()],a===void 0))throw new pe(`Unknown adapter '${l}'`);if(a&&(_.isFunction(a)||(a=a.get(t))))break;o[l||"#"+i]=a}if(!a){const i=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?i.length>1?`since :
`+i.map(Tv).join(`
`):" "+Tv(i[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return a}const y1={getAdapter:QD,adapters:Um};function yf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Lo(null,e)}function Av(e){return yf(e),e.headers=Jt.from(e.headers),e.data=vf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),y1.getAdapter(e.adapter||gl.adapter,e)(e).then(function(r){return yf(e),r.data=vf.call(e,e.transformResponse,r),r.headers=Jt.from(r.headers),r},function(r){return p1(r)||(yf(e),r&&r.response&&(r.response.data=vf.call(e,e.transformResponse,r.response),r.response.headers=Jt.from(r.response.headers))),Promise.reject(r)})}const w1="1.13.2",ld={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ld[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const _v={};ld.transitional=function(t,n,r){function a(o,i){return"[Axios v"+w1+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,l)=>{if(t===!1)throw new pe(a(i," has been removed"+(n?" in "+n:"")),pe.ERR_DEPRECATED);return n&&!_v[i]&&(_v[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};ld.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function YD(e,t,n){if(typeof e!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const l=e[o],c=l===void 0||i(l,o,e);if(c!==!0)throw new pe("option "+o+" must be "+c,pe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pe("Unknown option "+o,pe.ERR_BAD_OPTION)}}const kc={assertOptions:YD,validators:ld},Qn=kc.validators;class ea{constructor(t){this.defaults=t||{},this.interceptors={request:new wv,response:new wv}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=da(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&kc.assertOptions(r,{silentJSONParsing:Qn.transitional(Qn.boolean),forcedJSONParsing:Qn.transitional(Qn.boolean),clarifyTimeoutError:Qn.transitional(Qn.boolean)},!1),a!=null&&(_.isFunction(a)?n.paramsSerializer={serialize:a}:kc.assertOptions(a,{encode:Qn.function,serialize:Qn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),kc.assertOptions(n,{baseUrl:Qn.spelling("baseURL"),withXsrfToken:Qn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&_.merge(o.common,o[n.method]);o&&_.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Jt.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(c=c&&x.synchronous,l.unshift(x.fulfilled,x.rejected))});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let f,h=0,p;if(!c){const y=[Av.bind(this),void 0];for(y.unshift(...l),y.push(...u),p=y.length,f=Promise.resolve(n);h<p;)f=f.then(y[h++],y[h++]);return f}p=l.length;let m=n;for(;h<p;){const y=l[h++],x=l[h++];try{m=y(m)}catch(v){x.call(this,v);break}}try{f=Av.call(this,m)}catch(y){return Promise.reject(y)}for(h=0,p=u.length;h<p;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=da(this.defaults,t);const n=g1(t.baseURL,t.url,t.allowAbsoluteUrls);return d1(n,t.params,t.paramsSerializer)}}_.forEach(["delete","get","head","options"],function(t){ea.prototype[t]=function(n,r){return this.request(da(r||{},{method:t,url:n,data:(r||{}).data}))}});_.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,l){return this.request(da(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ea.prototype[t]=n(),ea.prototype[t+"Form"]=n(!0)});class Vm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,l){r.reason||(r.reason=new Lo(o,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Vm(function(a){t=a}),cancel:t}}}function XD(e){return function(n){return e.apply(null,n)}}function JD(e){return _.isObject(e)&&e.isAxiosError===!0}const Yh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Yh).forEach(([e,t])=>{Yh[t]=e});function j1(e){const t=new ea(e),n=Zb(ea.prototype.request,t);return _.extend(n,ea.prototype,t,{allOwnKeys:!0}),_.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return j1(da(e,a))},n}const Ze=j1(gl);Ze.Axios=ea;Ze.CanceledError=Lo;Ze.CancelToken=Vm;Ze.isCancel=p1;Ze.VERSION=w1;Ze.toFormData=id;Ze.AxiosError=pe;Ze.Cancel=Ze.CanceledError;Ze.all=function(t){return Promise.all(t)};Ze.spread=XD;Ze.isAxiosError=JD;Ze.mergeConfig=da;Ze.AxiosHeaders=Jt;Ze.formToJSON=e=>h1(_.isHTMLForm(e)?new FormData(e):e);Ze.getAdapter=y1.getAdapter;Ze.HttpStatusCode=Yh;Ze.default=Ze;const J=Ze.create({baseURL:"https://adflow.picotech.app/api/api",headers:{"Content-Type":"application/json"},withCredentials:!0,withXSRFToken:!0}),ZD=Ze.create({baseURL:"https://adflow.picotech.app/api",withCredentials:!0}),wf=()=>ZD.get("/sanctum/csrf-cookie");J.interceptors.request.use(e=>e,e=>Promise.reject(e));J.interceptors.response.use(e=>e,e=>{var t;return(t=e.response)==null||t.status,Promise.reject(e)});const e4=async e=>(await J.post("/campaigns",e)).data,t4=async()=>{const e=await J.get("/campaigns");return Array.isArray(e.data)?e.data:[]},b1=async e=>(await J.get(`/campaigns/${e}`)).data,N1=async(e,t)=>(await J.put(`/campaigns/${e}`,t)).data,n4=async e=>{await J.delete(`/campaigns/${e}`)},r4=async e=>(await J.post(`/campaigns/${e}/duplicate`)).data,s4=[{title:"Dashboard",url:"/",icon:oP},{title:"Create Campaign",url:"/create-campaign",icon:tP},{title:"Top-up",url:"/top-up",icon:aj},{title:"Reports",url:"/reports",icon:K0},{title:"Your Account",url:"/account",icon:rP},{title:"Settings",url:"/settings",icon:nj}],a4=[{title:"Account Pool",url:"/admin/account-pool",icon:nP},{title:"User Mappings",url:"/admin/user-mappings",icon:sj},{title:"Revenue Dashboard",url:"/admin/revenue",icon:ol},{title:"Audit Logs",url:"/admin/audit-logs",icon:Uu}];function o4({role:e="customer"}){const{state:t}=fl(),n=t==="collapsed",{data:r=[]}=Ae({queryKey:["campaigns"],queryFn:t4,enabled:e==="customer",initialData:[]}),a=e==="admin"?a4:s4,o=e==="admin"?"Administration":"Customer";return s.jsx(Yb,{collapsible:"icon",className:"border-r border-sidebar-border",children:s.jsxs(Jb,{children:[s.jsx("div",{className:"px-4 py-6",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-8 w-8 rounded-lg bg-primary flex items-center justify-center",children:s.jsx("span",{className:"text-primary-foreground font-bold text-sm",children:"HA"})}),!n&&s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-sm font-semibold text-sidebar-foreground",children:"HilltopAds"}),s.jsx("span",{className:"text-xs text-sidebar-foreground/60",children:"Platform"})]})]})}),s.jsxs(jc,{children:[s.jsx(qh,{children:o}),s.jsx(bc,{children:s.jsx(Nc,{children:a.map(i=>s.jsx(Sc,{children:s.jsx(Cc,{asChild:!0,tooltip:i.title,children:s.jsxs(Ec,{to:i.url,end:i.url==="/",className:"hover:bg-sidebar-accent",activeClassName:"bg-sidebar-accent text-sidebar-accent-foreground font-medium",children:[s.jsx(i.icon,{className:"h-4 w-4"}),s.jsx("span",{children:i.title})]})})},i.title))})})]}),e==="customer"&&Array.isArray(r)&&r.length>0&&s.jsxs(jc,{children:[s.jsx(qh,{children:"My Campaigns"}),s.jsx(bc,{children:s.jsx(Nc,{children:r==null?void 0:r.map(i=>s.jsx(Sc,{children:s.jsx(Cc,{asChild:!0,tooltip:i.name,children:s.jsxs(Ec,{to:`/campaigns/${i.id}`,className:"hover:bg-sidebar-accent",activeClassName:"bg-sidebar-accent text-sidebar-accent-foreground font-medium",children:[s.jsx(Vu,{className:"h-4 w-4"}),s.jsx("span",{children:i.name})]})})},i.id))})})]}),s.jsx(jc,{className:"mt-auto",children:s.jsx(bc,{children:s.jsx(Nc,{children:s.jsx(Sc,{children:s.jsx(Cc,{asChild:!0,tooltip:"Settings",children:s.jsxs(Ec,{to:"/settings",className:"hover:bg-sidebar-accent",activeClassName:"bg-sidebar-accent text-sidebar-accent-foreground font-medium",children:[s.jsx(nj,{className:"h-4 w-4"}),s.jsx("span",{children:"Settings"})]})})})})})})]})})}var i4=d.createContext(void 0);function xl(e){const t=d.useContext(i4);return e||t||"ltr"}var jf="rovingFocusGroup.onEntryFocus",l4={bubbles:!1,cancelable:!0},vl="RovingFocusGroup",[Xh,S1,c4]=Du(vl),[u4,Fo]=$t(vl,[c4]),[d4,f4]=u4(vl),C1=d.forwardRef((e,t)=>s.jsx(Xh.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Xh.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(h4,{...e,ref:t})})}));C1.displayName=vl;var h4=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...h}=e,p=d.useRef(null),m=ve(t,p),y=xl(o),[x,v]=ir({prop:i,defaultProp:l??null,onChange:c,caller:vl}),[w,g]=d.useState(!1),j=tn(u),b=S1(n),N=d.useRef(!1),[S,C]=d.useState(0);return d.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(jf,j),()=>P.removeEventListener(jf,j)},[j]),s.jsx(d4,{scope:n,orientation:r,dir:y,loop:a,currentTabStopId:x,onItemFocus:d.useCallback(P=>v(P),[v]),onItemShiftTab:d.useCallback(()=>g(!0),[]),onFocusableItemAdd:d.useCallback(()=>C(P=>P+1),[]),onFocusableItemRemove:d.useCallback(()=>C(P=>P-1),[]),children:s.jsx(ce.div,{tabIndex:w||S===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{N.current=!0}),onFocus:W(e.onFocus,P=>{const R=!N.current;if(P.target===P.currentTarget&&R&&!w){const M=new CustomEvent(jf,l4);if(P.currentTarget.dispatchEvent(M),!M.defaultPrevented){const O=b().filter(z=>z.focusable),D=O.find(z=>z.active),Z=O.find(z=>z.id===x),re=[D,Z,...O].filter(Boolean).map(z=>z.ref.current);P1(re,f)}}N.current=!1}),onBlur:W(e.onBlur,()=>g(!1))})})}),E1="RovingFocusGroupItem",R1=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:i,...l}=e,c=zn(),u=o||c,f=f4(E1,n),h=f.currentTabStopId===u,p=S1(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:x}=f;return d.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),s.jsx(Xh.ItemSlot,{scope:n,id:u,focusable:r,active:a,children:s.jsx(ce.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:W(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:W(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:W(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=g4(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let j=p().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")j.reverse();else if(w==="prev"||w==="next"){w==="prev"&&j.reverse();const b=j.indexOf(v.currentTarget);j=f.loop?x4(j,b+1):j.slice(b+1)}setTimeout(()=>P1(j))}}),children:typeof i=="function"?i({isCurrentTabStop:h,hasTabStop:x!=null}):i})})});R1.displayName=E1;var p4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function m4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function g4(e,t,n){const r=m4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return p4[r]}function P1(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function x4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hm=C1,Wm=R1,Jh=["Enter"," "],v4=["ArrowDown","PageUp","Home"],k1=["ArrowUp","PageDown","End"],y4=[...v4,...k1],w4={ltr:[...Jh,"ArrowRight"],rtl:[...Jh,"ArrowLeft"]},j4={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yl="Menu",[Wi,b4,N4]=Du(yl),[wa,T1]=$t(yl,[N4,_o,Fo]),cd=_o(),A1=Fo(),[S4,ja]=wa(yl),[C4,wl]=wa(yl),_1=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=e,l=cd(t),[c,u]=d.useState(null),f=d.useRef(!1),h=tn(o),p=xl(a);return d.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),s.jsx(wm,{...l,children:s.jsx(S4,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:s.jsx(C4,{scope:t,onClose:d.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};_1.displayName=yl;var E4="MenuAnchor",qm=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=cd(n);return s.jsx(jm,{...a,...r,ref:t})});qm.displayName=E4;var Km="MenuPortal",[R4,M1]=wa(Km,{forceMount:void 0}),O1=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=ja(Km,t);return s.jsx(R4,{scope:t,forceMount:n,children:s.jsx(En,{present:n||o.open,children:s.jsx(sl,{asChild:!0,container:a,children:r})})})};O1.displayName=Km;var Nn="MenuContent",[P4,Gm]=wa(Nn),D1=d.forwardRef((e,t)=>{const n=M1(Nn,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=ja(Nn,e.__scopeMenu),i=wl(Nn,e.__scopeMenu);return s.jsx(Wi.Provider,{scope:e.__scopeMenu,children:s.jsx(En,{present:r||o.open,children:s.jsx(Wi.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(k4,{...a,ref:t}):s.jsx(T4,{...a,ref:t})})})})}),k4=d.forwardRef((e,t)=>{const n=ja(Nn,e.__scopeMenu),r=d.useRef(null),a=ve(t,r);return d.useEffect(()=>{const o=r.current;if(o)return Mm(o)},[]),s.jsx(Qm,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),T4=d.forwardRef((e,t)=>{const n=ja(Nn,e.__scopeMenu);return s.jsx(Qm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),A4=oa("MenuContent.ScrollLock"),Qm=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:y,...x}=e,v=ja(Nn,n),w=wl(Nn,n),g=cd(n),j=A1(n),b=b4(n),[N,S]=d.useState(null),C=d.useRef(null),P=ve(t,C,v.onContentChange),R=d.useRef(0),M=d.useRef(""),O=d.useRef(0),D=d.useRef(null),Z=d.useRef("right"),I=d.useRef(0),re=y?td:d.Fragment,z=y?{as:A4,allowPinchZoom:!0}:void 0,Q=k=>{var U,Se;const $=M.current+k,G=b().filter(Ce=>!Ce.disabled),T=document.activeElement,K=(U=G.find(Ce=>Ce.ref.current===T))==null?void 0:U.textValue,H=G.map(Ce=>Ce.textValue),Ne=V4(H,$,K),_e=(Se=G.find(Ce=>Ce.textValue===Ne))==null?void 0:Se.ref.current;(function Ce(je){M.current=je,window.clearTimeout(R.current),je!==""&&(R.current=window.setTimeout(()=>Ce(""),1e3))})($),_e&&setTimeout(()=>_e.focus())};d.useEffect(()=>()=>window.clearTimeout(R.current),[]),_m();const A=d.useCallback(k=>{var G,T;return Z.current===((G=D.current)==null?void 0:G.side)&&W4(k,(T=D.current)==null?void 0:T.area)},[]);return s.jsx(P4,{scope:n,searchRef:M,onItemEnter:d.useCallback(k=>{A(k)&&k.preventDefault()},[A]),onItemLeave:d.useCallback(k=>{var $;A(k)||(($=C.current)==null||$.focus(),S(null))},[A]),onTriggerLeave:d.useCallback(k=>{A(k)&&k.preventDefault()},[A]),pointerGraceTimerRef:O,onPointerGraceIntentChange:d.useCallback(k=>{D.current=k},[]),children:s.jsx(re,{...z,children:s.jsx(Zu,{asChild:!0,trapped:a,onMountAutoFocus:W(o,k=>{var $;k.preventDefault(),($=C.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(Po,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:m,children:s.jsx(Hm,{asChild:!0,...j,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:S,onEntryFocus:W(c,k=>{w.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(bm,{role:"menu","aria-orientation":"vertical","data-state":X1(v.open),"data-radix-menu-content":"",dir:w.dir,...g,...x,ref:P,style:{outline:"none",...x.style},onKeyDown:W(x.onKeyDown,k=>{const G=k.target.closest("[data-radix-menu-content]")===k.currentTarget,T=k.ctrlKey||k.altKey||k.metaKey,K=k.key.length===1;G&&(k.key==="Tab"&&k.preventDefault(),!T&&K&&Q(k.key));const H=C.current;if(k.target!==H||!y4.includes(k.key))return;k.preventDefault();const _e=b().filter(U=>!U.disabled).map(U=>U.ref.current);k1.includes(k.key)&&_e.reverse(),B4(_e)}),onBlur:W(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(R.current),M.current="")}),onPointerMove:W(e.onPointerMove,qi(k=>{const $=k.target,G=I.current!==k.clientX;if(k.currentTarget.contains($)&&G){const T=k.clientX>I.current?"right":"left";Z.current=T,I.current=k.clientX}}))})})})})})})});D1.displayName=Nn;var _4="MenuGroup",Ym=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(ce.div,{role:"group",...r,ref:t})});Ym.displayName=_4;var M4="MenuLabel",I1=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(ce.div,{...r,ref:t})});I1.displayName=M4;var hu="MenuItem",Mv="menu.itemSelect",ud=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=d.useRef(null),i=wl(hu,e.__scopeMenu),l=Gm(hu,e.__scopeMenu),c=ve(t,o),u=d.useRef(!1),f=()=>{const h=o.current;if(!n&&h){const p=new CustomEvent(Mv,{bubbles:!0,cancelable:!0});h.addEventListener(Mv,m=>r==null?void 0:r(m),{once:!0}),nm(h,p),p.defaultPrevented?u.current=!1:i.onClose()}};return s.jsx(L1,{...a,ref:c,disabled:n,onClick:W(e.onClick,f),onPointerDown:h=>{var p;(p=e.onPointerDown)==null||p.call(e,h),u.current=!0},onPointerUp:W(e.onPointerUp,h=>{var p;u.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:W(e.onKeyDown,h=>{const p=l.searchRef.current!=="";n||p&&h.key===" "||Jh.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});ud.displayName=hu;var L1=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,i=Gm(hu,n),l=A1(n),c=d.useRef(null),u=ve(t,c),[f,h]=d.useState(!1),[p,m]=d.useState("");return d.useEffect(()=>{const y=c.current;y&&m((y.textContent??"").trim())},[o.children]),s.jsx(Wi.ItemSlot,{scope:n,disabled:r,textValue:a??p,children:s.jsx(Wm,{asChild:!0,...l,focusable:!r,children:s.jsx(ce.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:W(e.onPointerMove,qi(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,qi(y=>i.onItemLeave(y))),onFocus:W(e.onFocus,()=>h(!0)),onBlur:W(e.onBlur,()=>h(!1))})})})}),O4="MenuCheckboxItem",F1=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return s.jsx(V1,{scope:e.__scopeMenu,checked:n,children:s.jsx(ud,{role:"menuitemcheckbox","aria-checked":pu(n)?"mixed":n,...a,ref:t,"data-state":Jm(n),onSelect:W(a.onSelect,()=>r==null?void 0:r(pu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});F1.displayName=O4;var $1="MenuRadioGroup",[D4,I4]=wa($1,{value:void 0,onValueChange:()=>{}}),z1=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=tn(r);return s.jsx(D4,{scope:e.__scopeMenu,value:n,onValueChange:o,children:s.jsx(Ym,{...a,ref:t})})});z1.displayName=$1;var B1="MenuRadioItem",U1=d.forwardRef((e,t)=>{const{value:n,...r}=e,a=I4(B1,e.__scopeMenu),o=n===a.value;return s.jsx(V1,{scope:e.__scopeMenu,checked:o,children:s.jsx(ud,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Jm(o),onSelect:W(r.onSelect,()=>{var i;return(i=a.onValueChange)==null?void 0:i.call(a,n)},{checkForDefaultPrevented:!1})})})});U1.displayName=B1;var Xm="MenuItemIndicator",[V1,L4]=wa(Xm,{checked:!1}),H1=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=L4(Xm,n);return s.jsx(En,{present:r||pu(o.checked)||o.checked===!0,children:s.jsx(ce.span,{...a,ref:t,"data-state":Jm(o.checked)})})});H1.displayName=Xm;var F4="MenuSeparator",W1=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(ce.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});W1.displayName=F4;var $4="MenuArrow",q1=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=cd(n);return s.jsx(Nm,{...a,...r,ref:t})});q1.displayName=$4;var z4="MenuSub",[v5,K1]=wa(z4),li="MenuSubTrigger",G1=d.forwardRef((e,t)=>{const n=ja(li,e.__scopeMenu),r=wl(li,e.__scopeMenu),a=K1(li,e.__scopeMenu),o=Gm(li,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),s.jsx(qm,{asChild:!0,...u,children:s.jsx(L1,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":X1(n.open),...e,ref:Ou(t,a.onTriggerChange),onClick:h=>{var p;(p=e.onClick)==null||p.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,qi(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:W(e.onPointerLeave,qi(h=>{var m,y;f();const p=(m=n.content)==null?void 0:m.getBoundingClientRect();if(p){const x=(y=n.content)==null?void 0:y.dataset.side,v=x==="right",w=v?-5:5,g=p[v?"left":"right"],j=p[v?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+w,y:h.clientY},{x:g,y:p.top},{x:j,y:p.top},{x:j,y:p.bottom},{x:g,y:p.bottom}],side:x}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,h=>{var m;const p=o.searchRef.current!=="";e.disabled||p&&h.key===" "||w4[r.dir].includes(h.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),h.preventDefault())})})})});G1.displayName=li;var Q1="MenuSubContent",Y1=d.forwardRef((e,t)=>{const n=M1(Nn,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=ja(Nn,e.__scopeMenu),i=wl(Nn,e.__scopeMenu),l=K1(Q1,e.__scopeMenu),c=d.useRef(null),u=ve(t,c);return s.jsx(Wi.Provider,{scope:e.__scopeMenu,children:s.jsx(En,{present:r||o.open,children:s.jsx(Wi.Slot,{scope:e.__scopeMenu,children:s.jsx(Qm,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var h;i.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:W(e.onFocusOutside,f=>{f.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:W(e.onKeyDown,f=>{var m;const h=f.currentTarget.contains(f.target),p=j4[i.dir].includes(f.key);h&&p&&(o.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Y1.displayName=Q1;function X1(e){return e?"open":"closed"}function pu(e){return e==="indeterminate"}function Jm(e){return pu(e)?"indeterminate":e?"checked":"unchecked"}function B4(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function U4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function V4(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=U4(e,Math.max(o,0));a.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function H4(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o],c=t[i],u=l.x,f=l.y,h=c.x,p=c.y;f>r!=p>r&&n<(h-u)*(r-f)/(p-f)+u&&(a=!a)}return a}function W4(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return H4(n,t)}function qi(e){return t=>t.pointerType==="mouse"?e(t):void 0}var q4=_1,K4=qm,G4=O1,Q4=D1,Y4=Ym,X4=I1,J4=ud,Z4=F1,eI=z1,tI=U1,nI=H1,rI=W1,sI=q1,aI=G1,oI=Y1,dd="DropdownMenu",[iI,y5]=$t(dd,[T1]),zt=T1(),[lI,J1]=iI(dd),Z1=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,c=zt(t),u=d.useRef(null),[f,h]=ir({prop:a,defaultProp:o??!1,onChange:i,caller:dd});return s.jsx(lI,{scope:t,triggerId:zn(),triggerRef:u,contentId:zn(),open:f,onOpenChange:h,onOpenToggle:d.useCallback(()=>h(p=>!p),[h]),modal:l,children:s.jsx(q4,{...c,open:f,onOpenChange:h,dir:r,modal:l,children:n})})};Z1.displayName=dd;var eN="DropdownMenuTrigger",tN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=J1(eN,n),i=zt(n);return s.jsx(K4,{asChild:!0,...i,children:s.jsx(ce.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Ou(t,o.triggerRef),onPointerDown:W(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:W(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});tN.displayName=eN;var cI="DropdownMenuPortal",nN=e=>{const{__scopeDropdownMenu:t,...n}=e,r=zt(t);return s.jsx(G4,{...r,...n})};nN.displayName=cI;var rN="DropdownMenuContent",sN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=J1(rN,n),o=zt(n),i=d.useRef(!1);return s.jsx(Q4,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,l=>{var c;i.current||(c=a.triggerRef.current)==null||c.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:W(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!a.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sN.displayName=rN;var uI="DropdownMenuGroup",dI=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(Y4,{...a,...r,ref:t})});dI.displayName=uI;var fI="DropdownMenuLabel",aN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(X4,{...a,...r,ref:t})});aN.displayName=fI;var hI="DropdownMenuItem",oN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(J4,{...a,...r,ref:t})});oN.displayName=hI;var pI="DropdownMenuCheckboxItem",iN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(Z4,{...a,...r,ref:t})});iN.displayName=pI;var mI="DropdownMenuRadioGroup",gI=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(eI,{...a,...r,ref:t})});gI.displayName=mI;var xI="DropdownMenuRadioItem",lN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(tI,{...a,...r,ref:t})});lN.displayName=xI;var vI="DropdownMenuItemIndicator",cN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(nI,{...a,...r,ref:t})});cN.displayName=vI;var yI="DropdownMenuSeparator",uN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(rI,{...a,...r,ref:t})});uN.displayName=yI;var wI="DropdownMenuArrow",jI=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(sI,{...a,...r,ref:t})});jI.displayName=wI;var bI="DropdownMenuSubTrigger",dN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(aI,{...a,...r,ref:t})});dN.displayName=bI;var NI="DropdownMenuSubContent",fN=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zt(n);return s.jsx(oI,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fN.displayName=NI;var SI=Z1,CI=tN,EI=nN,hN=sN,pN=aN,mN=oN,gN=iN,xN=lN,vN=cN,yN=uN,wN=dN,jN=fN;const fd=SI,hd=CI,RI=d.forwardRef(({className:e,inset:t,children:n,...r},a)=>s.jsxs(wN,{ref:a,className:L("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,s.jsx(Fu,{className:"ml-auto h-4 w-4"})]}));RI.displayName=wN.displayName;const PI=d.forwardRef(({className:e,...t},n)=>s.jsx(jN,{ref:n,className:L("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));PI.displayName=jN.displayName;const jl=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(EI,{children:s.jsx(hN,{ref:r,sideOffset:t,className:L("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));jl.displayName=hN.displayName;const Et=d.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(mN,{ref:r,className:L("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));Et.displayName=mN.displayName;const kI=d.forwardRef(({className:e,children:t,checked:n,...r},a)=>s.jsxs(gN,{ref:a,className:L("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(vN,{children:s.jsx(G0,{className:"h-4 w-4"})})}),t]}));kI.displayName=gN.displayName;const TI=d.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(xN,{ref:r,className:L("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(vN,{children:s.jsx(Y0,{className:"h-2 w-2 fill-current"})})}),t]}));TI.displayName=xN.displayName;const bN=d.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(pN,{ref:r,className:L("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));bN.displayName=pN.displayName;const Zh=d.forwardRef(({className:e,...t},n)=>s.jsx(yN,{ref:n,className:L("-mx-1 my-1 h-px bg-muted",e),...t}));Zh.displayName=yN.displayName;const NN=d.createContext(void 0),ba=()=>{const e=d.useContext(NN);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},AI=({children:e})=>{const[t,n]=d.useState(null),[r,a]=d.useState(!0);d.useEffect(()=>{(async()=>{try{const h=await J.get("/user");n(h.data)}catch{n(null)}a(!1)})()},[]);const u={user:t,login:async(f,h,p)=>{await wf();const m=await J.post("/login",{email:f,password:h,type:p}),{user:y}=m.data;n(y)},register:async(f,h,p,m)=>{await wf();const y=await J.post("/register",{name:f,email:h,password:p,password_confirmation:m}),{user:x}=y.data;n(x)},logout:async()=>{try{await J.post("/logout")}catch{}n(null)},forgotPassword:async f=>{await wf(),await J.post("/forgot-password",{email:f})},isAuthenticated:!!t,loading:r};return s.jsx(NN.Provider,{value:u,children:e})};function _I(){const{user:e,logout:t}=ba(),n=async()=>{await t()};return s.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:s.jsxs("div",{className:"flex h-16 items-center gap-4 px-4",children:[s.jsx(Xb,{}),s.jsx("div",{className:"flex-1 flex items-center gap-4",children:s.jsxs("div",{className:"relative w-full max-w-md",children:[s.jsx(Bu,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(xe,{type:"search",placeholder:"Search campaigns, accounts...",className:"pl-10 bg-muted/50"})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(q,{variant:"ghost",size:"icon",className:"relative",children:[s.jsx(q0,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-1 right-1 h-2 w-2 bg-accent rounded-full"})]}),s.jsxs(fd,{children:[s.jsx(hd,{asChild:!0,children:s.jsx(q,{variant:"ghost",size:"icon",children:s.jsx(rj,{className:"h-5 w-5"})})}),s.jsxs(jl,{align:"end",className:"w-56",children:[s.jsx(bN,{children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-medium",children:(e==null?void 0:e.name)||"User"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e==null?void 0:e.email})]})}),s.jsx(Zh,{}),s.jsx(Et,{children:"Profile"}),s.jsx(Et,{children:"Billing"}),s.jsx(Et,{children:"Settings"}),s.jsx(Zh,{}),s.jsx(Et,{className:"text-destructive",onClick:n,children:"Sign out"})]})]})]})]})})}const MI=({children:e})=>{const{isAuthenticated:t,loading:n}=ba();return n?s.jsx("div",{children:"Loading..."}):t?s.jsx(s.Fragment,{children:e}):s.jsx(A_,{to:"/login",replace:!0})},ae=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:L("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ae.displayName="Card";const oe=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:L("flex flex-col space-y-1.5 p-6",e),...t}));oe.displayName="CardHeader";const ne=d.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:L("text-2xl font-semibold leading-none tracking-tight",e),...t}));ne.displayName="CardTitle";const ie=d.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:L("text-sm text-muted-foreground",e),...t}));ie.displayName="CardDescription";const fe=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:L("p-6 pt-0",e),...t}));fe.displayName="CardContent";const OI=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:L("flex items-center p-6 pt-0",e),...t}));OI.displayName="CardFooter";function us({title:e,value:t,change:n,changeType:r="neutral",icon:a,iconBg:o="bg-primary/10"}){return s.jsx(ae,{className:"shadow-sm hover:shadow-md transition-shadow",children:s.jsx(fe,{className:"p-6",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e}),s.jsx("p",{className:"text-2xl font-bold text-card-foreground mt-2",children:t}),n&&s.jsx("p",{className:L("text-xs font-medium mt-2",r==="positive"&&"text-success",r==="negative"&&"text-destructive",r==="neutral"&&"text-muted-foreground"),children:n})]}),s.jsx("div",{className:L("p-3 rounded-lg",o),children:s.jsx(a,{className:"h-5 w-5 text-primary"})})]})})})}const DI=va("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ye({className:e,variant:t,...n}){return s.jsx("div",{className:L(DI({variant:t}),e),...n})}const Zt=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:n,className:L("w-full caption-bottom text-sm",e),...t})}));Zt.displayName="Table";const fn=d.forwardRef(({className:e,...t},n)=>s.jsx("thead",{ref:n,className:L("[&_tr]:border-b",e),...t}));fn.displayName="TableHeader";const en=d.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:L("[&_tr:last-child]:border-0",e),...t}));en.displayName="TableBody";const II=d.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:L("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));II.displayName="TableFooter";const Pe=d.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:L("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));Pe.displayName="TableRow";const te=d.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:L("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));te.displayName="TableHead";const V=d.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:L("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));V.displayName="TableCell";const LI=d.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:L("mt-4 text-sm text-muted-foreground",e),...t}));LI.displayName="TableCaption";function FI(){var i,l,c,u,f,h,p,m,y,x,v,w;const{data:e,isLoading:t,error:n}=Ae({queryKey:["dashboard-kpis"],queryFn:()=>J.get("/dashboard/kpis").then(g=>g.data),retry:!1}),{data:r,isLoading:a,error:o}=Ae({queryKey:["dashboard-campaigns"],queryFn:()=>J.get("/dashboard/campaigns").then(g=>g.data),retry:!1});return t||a?s.jsx("div",{children:"Loading..."}):n||o?s.jsx("div",{children:"Error loading dashboard data. Please try refreshing the page."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Dashboard"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Welcome back! Here's your account overview."})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(q,{asChild:!0,children:s.jsx(Mt,{to:"/create-campaign",children:"Create Campaign"})}),s.jsx(q,{variant:"outline",asChild:!0,children:s.jsx(Mt,{to:"/top-up",children:"Top-up"})})]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsx(us,{title:"Available Balance",value:((i=e==null?void 0:e.available_balance)==null?void 0:i.value)||"$0.00",change:((l=e==null?void 0:e.available_balance)==null?void 0:l.change)||"",changeType:((c=e==null?void 0:e.available_balance)==null?void 0:c.change_type)||"neutral",icon:aj}),s.jsx(us,{title:"Active Campaigns",value:((u=e==null?void 0:e.active_campaigns)==null?void 0:u.value)||"0",change:((f=e==null?void 0:e.active_campaigns)==null?void 0:f.change)||"",changeType:((h=e==null?void 0:e.active_campaigns)==null?void 0:h.change_type)||"neutral",icon:Vu}),s.jsx(us,{title:"Today's Spend",value:((p=e==null?void 0:e.todays_spend)==null?void 0:p.value)||"$0.00",change:((m=e==null?void 0:e.todays_spend)==null?void 0:m.change)||"",changeType:((y=e==null?void 0:e.todays_spend)==null?void 0:y.change_type)||"neutral",icon:vo}),s.jsx(us,{title:"Est. Profit",value:((x=e==null?void 0:e.estimated_profit)==null?void 0:x.value)||"$0.00",change:((v=e==null?void 0:e.estimated_profit)==null?void 0:v.change)||"",changeType:((w=e==null?void 0:e.estimated_profit)==null?void 0:w.change_type)||"neutral",icon:ol})]}),e!=null&&e.account_status?s.jsxs(ae,{className:"shadow-sm",children:[s.jsx(oe,{className:"border-b border-border bg-muted/30",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-lg bg-success/10 flex items-center justify-center",children:s.jsx("div",{className:"h-3 w-3 rounded-full bg-success animate-pulse"})}),s.jsxs("div",{children:[s.jsx(ne,{className:"text-lg",children:"Your Ad Account"}),s.jsxs(ie,{className:"text-sm",children:["Account ",e.account_status.alias," is ready"]})]})]}),s.jsx(ye,{className:"bg-success/10 text-success hover:bg-success/20",children:e.account_status.status})]})}),s.jsxs(fe,{className:"pt-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Your campaigns are running on a dedicated ad account. Credentials are securely stored — you're ready to create and manage campaigns."}),s.jsx("div",{className:"flex gap-2 mt-4",children:s.jsx(q,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(Mt,{to:"/account",children:"View Details"})})})]})]}):s.jsxs(ae,{className:"shadow-sm",children:[s.jsx(oe,{className:"border-b border-border bg-muted/30",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-lg bg-yellow-500/10 flex items-center justify-center",children:s.jsx("div",{className:"h-3 w-3 rounded-full bg-yellow-500"})}),s.jsxs("div",{children:[s.jsx(ne,{className:"text-lg",children:"No Account Assigned"}),s.jsx(ie,{className:"text-sm",children:"Pending assignment"})]})]}),s.jsx(ye,{variant:"outline",className:"text-yellow-600 border-yellow-200 bg-yellow-50",children:"Pending"})]})}),s.jsx(fe,{className:"pt-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"You don't have an ad account assigned yet. Please contact support or wait for an administrator to assign one to you."})})]}),s.jsxs(ae,{className:"shadow-sm",children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Recent Campaigns"}),s.jsx(ie,{children:"Monitor your active and recent advertising campaigns"})]}),s.jsx(fe,{children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Campaign"}),s.jsx(te,{children:"Status"}),s.jsx(te,{children:"Daily Cap"}),s.jsx(te,{children:"Spend"}),s.jsx(te,{children:"Impressions"}),s.jsx(te,{children:"Clicks"}),s.jsx(te,{children:"CTR"}),s.jsx(te,{className:"text-right",children:"Actions"})]})}),s.jsx(en,{children:r==null?void 0:r.map(g=>s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:s.jsx(Mt,{to:`/campaigns/${g.id}`,className:"hover:text-primary transition-colors",children:g.name})}),s.jsx(V,{children:s.jsx(ye,{variant:g.status==="active"?"default":"secondary",className:g.status==="active"?"bg-success/10 text-success hover:bg-success/20":"",children:g.status==="active"?s.jsxs(s.Fragment,{children:[s.jsx(wh,{className:"h-3 w-3 mr-1"})," Active"]}):s.jsxs(s.Fragment,{children:[s.jsx(ej,{className:"h-3 w-3 mr-1"})," Paused"]})})}),s.jsx(V,{children:g.daily_cap}),s.jsx(V,{children:g.spend}),s.jsx(V,{children:g.impressions}),s.jsx(V,{children:g.clicks}),s.jsx(V,{children:g.ctr}),s.jsx(V,{className:"text-right",children:s.jsxs(fd,{children:[s.jsx(hd,{asChild:!0,children:s.jsx(q,{variant:"ghost",size:"icon",children:s.jsx(im,{className:"h-4 w-4"})})}),s.jsxs(jl,{align:"end",children:[s.jsx(Et,{children:"View Details"}),s.jsx(Et,{children:"Edit"}),s.jsx(Et,{children:"Duplicate"}),s.jsx(Et,{children:g.status==="active"?"Pause":"Resume"})]})]})})]},g.id))})]})})]})]})}var pd="Tabs",[$I,w5]=$t(pd,[Fo]),SN=Fo(),[zI,Zm]=$I(pd),CN=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=xl(l),[h,p]=ir({prop:r,onChange:a,defaultProp:o??"",caller:pd});return s.jsx(zI,{scope:n,baseId:zn(),value:h,onValueChange:p,orientation:i,dir:f,activationMode:c,children:s.jsx(ce.div,{dir:f,"data-orientation":i,...u,ref:t})})});CN.displayName=pd;var EN="TabsList",RN=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=Zm(EN,n),i=SN(n);return s.jsx(Hm,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:s.jsx(ce.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});RN.displayName=EN;var PN="TabsTrigger",kN=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,i=Zm(PN,n),l=SN(n),c=_N(i.baseId,r),u=MN(i.baseId,r),f=r===i.value;return s.jsx(Wm,{asChild:!0,...l,focusable:!a,active:f,children:s.jsx(ce.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...o,ref:t,onMouseDown:W(e.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?i.onValueChange(r):h.preventDefault()}),onKeyDown:W(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&i.onValueChange(r)}),onFocus:W(e.onFocus,()=>{const h=i.activationMode!=="manual";!f&&!a&&h&&i.onValueChange(r)})})})});kN.displayName=PN;var TN="TabsContent",AN=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...i}=e,l=Zm(TN,n),c=_N(l.baseId,r),u=MN(l.baseId,r),f=r===l.value,h=d.useRef(f);return d.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),s.jsx(En,{present:a||f,children:({present:p})=>s.jsx(ce.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:p&&o})})});AN.displayName=TN;function _N(e,t){return`${e}-trigger-${t}`}function MN(e,t){return`${e}-content-${t}`}var BI=CN,ON=RN,DN=kN,IN=AN;const md=BI,bl=d.forwardRef(({className:e,...t},n)=>s.jsx(ON,{ref:n,className:L("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));bl.displayName=ON.displayName;const St=d.forwardRef(({className:e,...t},n)=>s.jsx(DN,{ref:n,className:L("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));St.displayName=DN.displayName;const Ct=d.forwardRef(({className:e,...t},n)=>s.jsx(IN,{ref:n,className:L("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ct.displayName=IN.displayName;function UI(){var y,x,v,w,g,j,b,N,S,C,P,R,M;const{id:e}=hb(),t=Ps(),[n,r]=d.useState(null),[a,o]=d.useState(!0),[i,l]=d.useState(!1),c=_r();d.useEffect(()=>{(async()=>{if(e)try{const D=await b1(e);r(D)}catch(D){console.error("Failed to fetch campaign details",D)}finally{o(!1)}})()},[e]);const u=async()=>{if(!n)return;const O=n.status==="active"?"paused":"active";try{l(!0);const D=await N1(n.id,{status:O});r({...n,status:D.status}),c.invalidateQueries({queryKey:["campaigns"]})}catch(D){console.error("Failed to update status",D)}finally{l(!1)}},f=async()=>{if(!(!n||!confirm("Are you sure you want to delete this campaign?")))try{l(!0),await n4(n.id),c.invalidateQueries({queryKey:["campaigns"]}),t("/dashboard")}catch(O){console.error("Failed to delete campaign",O),l(!1)}},h=async()=>{if(n)try{l(!0);const O=await r4(n.id);c.invalidateQueries({queryKey:["campaigns"]}),t(`/campaigns/${O.id}`)}catch(O){console.error("Failed to duplicate campaign",O),l(!1)}};if(a)return s.jsx("div",{children:"Loading..."});if(!n)return s.jsx("div",{children:"Campaign not found"});const p=((y=n.performances)==null?void 0:y.map(O=>({date:O.date,spend:Number(O.spend),impressions:Number(O.impressions)})))||[],m=((x=n.audit_logs)==null?void 0:x.map(O=>{var D;return{action:O.action,user:((D=O.user)==null?void 0:D.name)||"System",timestamp:O.created_at}}))||[];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(q,{variant:"ghost",size:"icon",asChild:!0,children:s.jsx(Mt,{to:"/dashboard",children:s.jsx(W0,{className:"h-4 w-4"})})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:n.name}),s.jsxs("p",{className:"text-muted-foreground mt-1",children:["Campaign ID: ",n.id]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(q,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(Mt,{to:`/campaigns/${n.id}/edit`,children:[s.jsx(uP,{className:"h-4 w-4 mr-2"}),"Edit"]})}),s.jsxs(q,{variant:"outline",size:"sm",onClick:h,disabled:i,children:[s.jsx(J0,{className:"h-4 w-4 mr-2"}),"Duplicate"]}),s.jsx(q,{variant:"outline",size:"sm",onClick:f,disabled:i,className:"text-destructive hover:text-destructive",children:"Delete"}),s.jsx(q,{size:"sm",onClick:u,disabled:i,children:n.status==="active"?s.jsxs(s.Fragment,{children:[s.jsx(ej,{className:"h-4 w-4 mr-2"}),"Pause"]}):s.jsxs(s.Fragment,{children:[s.jsx(wh,{className:"h-4 w-4 mr-2"}),"Resume"]})})]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsxs(ie,{className:"flex items-center gap-2",children:[s.jsx(vo,{className:"h-4 w-4"}),"Total Spend"]}),s.jsxs(ne,{className:"text-2xl",children:["$",((v=n.aggregates)==null?void 0:v.spend)||0]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Base: $",((w=n.aggregates)==null?void 0:w.spend)||0," | Markup: $0.00"]})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsxs(ie,{className:"flex items-center gap-2",children:[s.jsx(gc,{className:"h-4 w-4"}),"Impressions"]}),s.jsx(ne,{className:"text-2xl",children:((g=n.aggregates)==null?void 0:g.impressions)||0})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsxs(ie,{className:"flex items-center gap-2",children:[s.jsx(lP,{className:"h-4 w-4"}),"Clicks"]}),s.jsx(ne,{className:"text-2xl",children:((j=n.aggregates)==null?void 0:j.clicks)||0}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["CTR: ",((b=n.aggregates)==null?void 0:b.ctr)||0,"%"]})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsxs(ie,{className:"flex items-center gap-2",children:[s.jsx(ol,{className:"h-4 w-4"}),"Conversions"]}),s.jsx(ne,{className:"text-2xl",children:((N=n.aggregates)==null?void 0:N.conversions)||0}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["CPC: $",((S=n.aggregates)==null?void 0:S.cpc)||0]})]})})]}),s.jsxs(md,{defaultValue:"overview",className:"space-y-4",children:[s.jsxs(bl,{children:[s.jsx(St,{value:"overview",children:"Overview"}),s.jsx(St,{value:"performance",children:"Performance"}),s.jsx(St,{value:"targeting",children:"Targeting"}),s.jsx(St,{value:"billing",children:"Billing"}),s.jsx(St,{value:"audit",children:"Audit Log"})]}),s.jsx(Ct,{value:"overview",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsx(oe,{children:s.jsx(ne,{children:"Campaign Details"})}),s.jsx(fe,{className:"space-y-4",children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Status"}),s.jsxs(ye,{className:"mt-1 bg-success/10 text-success hover:bg-success/20",children:[s.jsx(wh,{className:"h-3 w-3 mr-1"}),n.status]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Ad Account"}),s.jsx("p",{className:"mt-1 font-mono text-sm",children:"N/A"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Landing URL"}),s.jsx("a",{href:n.landing_url,target:"_blank",rel:"noopener noreferrer",className:"mt-1 text-sm text-primary hover:underline",children:n.landing_url})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Created At"}),s.jsx("p",{className:"mt-1 text-sm",children:new Date(n.created_at).toLocaleDateString()})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Daily Cap"}),s.jsxs("p",{className:"mt-1 text-sm font-medium",children:["$",n.daily_budget||0]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Budget"}),s.jsxs("p",{className:"mt-1 text-sm font-medium",children:["$",n.total_budget||0]})]})]})})]})}),s.jsx(Ct,{value:"performance",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Performance Chart"}),s.jsx(ie,{children:"Daily spend and impressions over time"})]}),s.jsx(fe,{children:s.jsx("div",{className:"h-[300px] flex items-end justify-around gap-2",children:p.map(O=>s.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-full bg-primary/20 rounded-t",style:{height:`${O.spend/500*100}%`}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:O.date})]},O.date))})})]})}),s.jsx(Ct,{value:"targeting",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsx(oe,{children:s.jsx(ne,{children:"Targeting Settings"})}),s.jsxs(fe,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Countries"}),s.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:((C=n.geo_targeting)==null?void 0:C.map(O=>s.jsx(ye,{variant:"secondary",children:O},O)))||s.jsx("span",{className:"text-sm text-muted-foreground",children:"All Countries"})})]}),s.jsx(Ve,{}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Devices"}),s.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:((P=n.device_targeting)==null?void 0:P.map(O=>s.jsx(ye,{variant:"secondary",children:O},O)))||s.jsx("span",{className:"text-sm text-muted-foreground",children:"All Devices"})})]}),s.jsx(Ve,{}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Frequency Cap"}),s.jsx("p",{className:"mt-1 text-sm",children:"N/A"})]})]})]})}),s.jsx(Ct,{value:"billing",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Billing Breakdown"}),s.jsx(ie,{children:"Cost structure and fees"})]}),s.jsx(fe,{children:s.jsx(Zt,{children:s.jsxs(en,{children:[s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:"Base Ad Cost"}),s.jsxs(V,{className:"text-right",children:["$",((R=n.aggregates)==null?void 0:R.spend)||0]})]}),s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:"Platform Markup (11.5%)"}),s.jsx(V,{className:"text-right",children:"$0.00"})]}),s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:"Top-up Fee (5%)"}),s.jsx(V,{className:"text-right",children:"Included in markup"})]}),s.jsxs(Pe,{className:"border-t-2",children:[s.jsx(V,{className:"font-bold",children:"Total Customer Cost"}),s.jsxs(V,{className:"text-right font-bold",children:["$",((M=n.aggregates)==null?void 0:M.spend)||0]})]})]})})})]})}),s.jsx(Ct,{value:"audit",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Audit Trail"}),s.jsx(ie,{children:"Complete history of campaign changes"})]}),s.jsx(fe,{children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Action"}),s.jsx(te,{children:"User"}),s.jsx(te,{children:"Timestamp"})]})}),s.jsx(en,{children:m.map((O,D)=>s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:O.action}),s.jsx(V,{children:O.user}),s.jsx(V,{className:"text-muted-foreground",children:O.timestamp})]},D))})]})})]})})]})]})}var VI="Label",LN=d.forwardRef((e,t)=>s.jsx(ce.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));LN.displayName=VI;var FN=LN;const HI=va("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ee=d.forwardRef(({className:e,...t},n)=>s.jsx(FN,{ref:n,className:L(HI(),e),...t}));ee.displayName=FN.displayName;const eg=d.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:L("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}));eg.displayName="Textarea";function Ov(e,[t,n]){return Math.min(n,Math.max(t,e))}function tg(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var WI=[" ","Enter","ArrowUp","ArrowDown"],qI=[" ","Enter"],fa="Select",[gd,xd,KI]=Du(fa),[$o,j5]=$t(fa,[KI,_o]),vd=_o(),[GI,ks]=$o(fa),[QI,YI]=$o(fa),$N=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:h,disabled:p,required:m,form:y}=e,x=vd(t),[v,w]=d.useState(null),[g,j]=d.useState(null),[b,N]=d.useState(!1),S=xl(u),[C,P]=ir({prop:r,defaultProp:a??!1,onChange:o,caller:fa}),[R,M]=ir({prop:i,defaultProp:l,onChange:c,caller:fa}),O=d.useRef(null),D=v?y||!!v.closest("form"):!0,[Z,I]=d.useState(new Set),re=Array.from(Z).map(z=>z.props.value).join(";");return s.jsx(wm,{...x,children:s.jsxs(GI,{required:m,scope:t,trigger:v,onTriggerChange:w,valueNode:g,onValueNodeChange:j,valueNodeHasChildren:b,onValueNodeHasChildrenChange:N,contentId:zn(),value:R,onValueChange:M,open:C,onOpenChange:P,dir:S,triggerPointerDownPosRef:O,disabled:p,children:[s.jsx(gd.Provider,{scope:t,children:s.jsx(QI,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(z=>{I(Q=>new Set(Q).add(z))},[]),onNativeOptionRemove:d.useCallback(z=>{I(Q=>{const A=new Set(Q);return A.delete(z),A})},[]),children:n})}),D?s.jsxs(cS,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:h,value:R,onChange:z=>M(z.target.value),disabled:p,form:y,children:[R===void 0?s.jsx("option",{value:""}):null,Array.from(Z)]},re):null]})})};$N.displayName=fa;var zN="SelectTrigger",BN=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=vd(n),i=ks(zN,n),l=i.disabled||r,c=ve(t,i.onTriggerChange),u=xd(n),f=d.useRef("touch"),[h,p,m]=dS(x=>{const v=u().filter(j=>!j.disabled),w=v.find(j=>j.value===i.value),g=fS(v,x,w);g!==void 0&&i.onValueChange(g.value)}),y=x=>{l||(i.onOpenChange(!0),m()),x&&(i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return s.jsx(jm,{asChild:!0,...o,children:s.jsx(ce.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":uS(i.value)?"":void 0,...a,ref:c,onClick:W(a.onClick,x=>{x.currentTarget.focus(),f.current!=="mouse"&&y(x)}),onPointerDown:W(a.onPointerDown,x=>{f.current=x.pointerType;const v=x.target;v.hasPointerCapture(x.pointerId)&&v.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(y(x),x.preventDefault())}),onKeyDown:W(a.onKeyDown,x=>{const v=h.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(v&&x.key===" ")&&WI.includes(x.key)&&(y(),x.preventDefault())})})})});BN.displayName=zN;var UN="SelectValue",VN=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...l}=e,c=ks(UN,n),{onValueNodeHasChildrenChange:u}=c,f=o!==void 0,h=ve(t,c.onValueNodeChange);return gt(()=>{u(f)},[u,f]),s.jsx(ce.span,{...l,ref:h,style:{pointerEvents:"none"},children:uS(c.value)?s.jsx(s.Fragment,{children:i}):o})});VN.displayName=UN;var XI="SelectIcon",HN=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return s.jsx(ce.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});HN.displayName=XI;var JI="SelectPortal",WN=e=>s.jsx(sl,{asChild:!0,...e});WN.displayName=JI;var ha="SelectContent",qN=d.forwardRef((e,t)=>{const n=ks(ha,e.__scopeSelect),[r,a]=d.useState();if(gt(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?xa.createPortal(s.jsx(KN,{scope:e.__scopeSelect,children:s.jsx(gd.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),o):null}return s.jsx(GN,{...e,ref:t})});qN.displayName=ha;var _n=10,[KN,Ts]=$o(ha),ZI="SelectContentImpl",eL=oa("SelectContent.RemoveScroll"),GN=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:x,avoidCollisions:v,...w}=e,g=ks(ha,n),[j,b]=d.useState(null),[N,S]=d.useState(null),C=ve(t,U=>b(U)),[P,R]=d.useState(null),[M,O]=d.useState(null),D=xd(n),[Z,I]=d.useState(!1),re=d.useRef(!1);d.useEffect(()=>{if(j)return Mm(j)},[j]),_m();const z=d.useCallback(U=>{const[Se,...Ce]=D().map(Ee=>Ee.ref.current),[je]=Ce.slice(-1),be=document.activeElement;for(const Ee of U)if(Ee===be||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===Se&&N&&(N.scrollTop=0),Ee===je&&N&&(N.scrollTop=N.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==be))return},[D,N]),Q=d.useCallback(()=>z([P,j]),[z,P,j]);d.useEffect(()=>{Z&&Q()},[Z,Q]);const{onOpenChange:A,triggerPointerDownPosRef:k}=g;d.useEffect(()=>{if(j){let U={x:0,y:0};const Se=je=>{var be,Ee;U={x:Math.abs(Math.round(je.pageX)-(((be=k.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(je.pageY)-(((Ee=k.current)==null?void 0:Ee.y)??0))}},Ce=je=>{U.x<=10&&U.y<=10?je.preventDefault():j.contains(je.target)||A(!1),document.removeEventListener("pointermove",Se),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[j,A,k]),d.useEffect(()=>{const U=()=>A(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[A]);const[$,G]=dS(U=>{const Se=D().filter(be=>!be.disabled),Ce=Se.find(be=>be.ref.current===document.activeElement),je=fS(Se,U,Ce);je&&setTimeout(()=>je.ref.current.focus())}),T=d.useCallback((U,Se,Ce)=>{const je=!re.current&&!Ce;(g.value!==void 0&&g.value===Se||je)&&(R(U),je&&(re.current=!0))},[g.value]),K=d.useCallback(()=>j==null?void 0:j.focus(),[j]),H=d.useCallback((U,Se,Ce)=>{const je=!re.current&&!Ce;(g.value!==void 0&&g.value===Se||je)&&O(U)},[g.value]),Ne=r==="popper"?ep:QN,_e=Ne===ep?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:x,avoidCollisions:v}:{};return s.jsx(KN,{scope:n,content:j,viewport:N,onViewportChange:S,itemRefCallback:T,selectedItem:P,onItemLeave:K,itemTextRefCallback:H,focusSelectedItem:Q,selectedItemText:M,position:r,isPositioned:Z,searchRef:$,children:s.jsx(td,{as:eL,allowPinchZoom:!0,children:s.jsx(Zu,{asChild:!0,trapped:g.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:W(a,U=>{var Se;(Se=g.trigger)==null||Se.focus({preventScroll:!0}),U.preventDefault()}),children:s.jsx(Po,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:s.jsx(Ne,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:U=>U.preventDefault(),...w,..._e,onPlaced:()=>I(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:W(w.onKeyDown,U=>{const Se=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!Se&&U.key.length===1&&G(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let je=D().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(U.key)&&(je=je.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const be=U.target,Ee=je.indexOf(be);je=je.slice(Ee+1)}setTimeout(()=>z(je)),U.preventDefault()}})})})})})})});GN.displayName=ZI;var tL="SelectItemAlignedPosition",QN=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=ks(ha,n),i=Ts(ha,n),[l,c]=d.useState(null),[u,f]=d.useState(null),h=ve(t,C=>f(C)),p=xd(n),m=d.useRef(!1),y=d.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:g}=i,j=d.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&x&&v&&w){const C=o.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),R=o.valueNode.getBoundingClientRect(),M=w.getBoundingClientRect();if(o.dir!=="rtl"){const be=M.left-P.left,Ee=R.left-be,ut=C.left-Ee,at=C.width+ut,ur=Math.max(at,P.width),Kn=window.innerWidth-_n,dr=Ov(Ee,[_n,Math.max(_n,Kn-ur)]);l.style.minWidth=at+"px",l.style.left=dr+"px"}else{const be=P.right-M.right,Ee=window.innerWidth-R.right-be,ut=window.innerWidth-C.right-Ee,at=C.width+ut,ur=Math.max(at,P.width),Kn=window.innerWidth-_n,dr=Ov(Ee,[_n,Math.max(_n,Kn-ur)]);l.style.minWidth=at+"px",l.style.right=dr+"px"}const O=p(),D=window.innerHeight-_n*2,Z=x.scrollHeight,I=window.getComputedStyle(u),re=parseInt(I.borderTopWidth,10),z=parseInt(I.paddingTop,10),Q=parseInt(I.borderBottomWidth,10),A=parseInt(I.paddingBottom,10),k=re+z+Z+A+Q,$=Math.min(v.offsetHeight*5,k),G=window.getComputedStyle(x),T=parseInt(G.paddingTop,10),K=parseInt(G.paddingBottom,10),H=C.top+C.height/2-_n,Ne=D-H,_e=v.offsetHeight/2,U=v.offsetTop+_e,Se=re+z+U,Ce=k-Se;if(Se<=H){const be=O.length>0&&v===O[O.length-1].ref.current;l.style.bottom="0px";const Ee=u.clientHeight-x.offsetTop-x.offsetHeight,ut=Math.max(Ne,_e+(be?K:0)+Ee+Q),at=Se+ut;l.style.height=at+"px"}else{const be=O.length>0&&v===O[0].ref.current;l.style.top="0px";const ut=Math.max(H,re+x.offsetTop+(be?T:0)+_e)+Ce;l.style.height=ut+"px",x.scrollTop=Se-H+x.offsetTop}l.style.margin=`${_n}px 0`,l.style.minHeight=$+"px",l.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,l,u,x,v,w,o.dir,r]);gt(()=>j(),[j]);const[b,N]=d.useState();gt(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const S=d.useCallback(C=>{C&&y.current===!0&&(j(),g==null||g(),y.current=!1)},[j,g]);return s.jsx(rL,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:S,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:s.jsx(ce.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});QN.displayName=tL;var nL="SelectPopperPosition",ep=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=_n,...o}=e,i=vd(n);return s.jsx(bm,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ep.displayName=nL;var[rL,ng]=$o(ha,{}),tp="SelectViewport",YN=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Ts(tp,n),i=ng(tp,n),l=ve(t,o.onViewportChange),c=d.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(gd.Slot,{scope:n,children:s.jsx(ce.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:W(a.onScroll,u=>{const f=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&h){const m=Math.abs(c.current-f.scrollTop);if(m>0){const y=window.innerHeight-_n*2,x=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),w=Math.max(x,v);if(w<y){const g=w+m,j=Math.min(y,g),b=g-j;h.style.height=j+"px",h.style.bottom==="0px"&&(f.scrollTop=b>0?b:0,h.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});YN.displayName=tp;var XN="SelectGroup",[sL,aL]=$o(XN),oL=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=zn();return s.jsx(sL,{scope:n,id:a,children:s.jsx(ce.div,{role:"group","aria-labelledby":a,...r,ref:t})})});oL.displayName=XN;var JN="SelectLabel",ZN=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=aL(JN,n);return s.jsx(ce.div,{id:a.id,...r,ref:t})});ZN.displayName=JN;var mu="SelectItem",[iL,eS]=$o(mu),tS=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,l=ks(mu,n),c=Ts(mu,n),u=l.value===r,[f,h]=d.useState(o??""),[p,m]=d.useState(!1),y=ve(t,g=>{var j;return(j=c.itemRefCallback)==null?void 0:j.call(c,g,r,a)}),x=zn(),v=d.useRef("touch"),w=()=>{a||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(iL,{scope:n,value:r,disabled:a,textId:x,isSelected:u,onItemTextChange:d.useCallback(g=>{h(j=>j||((g==null?void 0:g.textContent)??"").trim())},[]),children:s.jsx(gd.ItemSlot,{scope:n,value:r,disabled:a,textValue:f,children:s.jsx(ce.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:y,onFocus:W(i.onFocus,()=>m(!0)),onBlur:W(i.onBlur,()=>m(!1)),onClick:W(i.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:W(i.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:W(i.onPointerDown,g=>{v.current=g.pointerType}),onPointerMove:W(i.onPointerMove,g=>{var j;v.current=g.pointerType,a?(j=c.onItemLeave)==null||j.call(c):v.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(i.onPointerLeave,g=>{var j;g.currentTarget===document.activeElement&&((j=c.onItemLeave)==null||j.call(c))}),onKeyDown:W(i.onKeyDown,g=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(qI.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});tS.displayName=mu;var ci="SelectItemText",nS=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=ks(ci,n),l=Ts(ci,n),c=eS(ci,n),u=YI(ci,n),[f,h]=d.useState(null),p=ve(t,w=>h(w),c.onItemTextChange,w=>{var g;return(g=l.itemTextRefCallback)==null?void 0:g.call(l,w,c.value,c.disabled)}),m=f==null?void 0:f.textContent,y=d.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return gt(()=>(x(y),()=>v(y)),[x,v,y]),s.jsxs(s.Fragment,{children:[s.jsx(ce.span,{id:c.textId,...o,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?xa.createPortal(o.children,i.valueNode):null]})});nS.displayName=ci;var rS="SelectItemIndicator",sS=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return eS(rS,n).isSelected?s.jsx(ce.span,{"aria-hidden":!0,...r,ref:t}):null});sS.displayName=rS;var np="SelectScrollUpButton",aS=d.forwardRef((e,t)=>{const n=Ts(np,e.__scopeSelect),r=ng(np,e.__scopeSelect),[a,o]=d.useState(!1),i=ve(t,r.onScrollButtonChange);return gt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(iS,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});aS.displayName=np;var rp="SelectScrollDownButton",oS=d.forwardRef((e,t)=>{const n=Ts(rp,e.__scopeSelect),r=ng(rp,e.__scopeSelect),[a,o]=d.useState(!1),i=ve(t,r.onScrollButtonChange);return gt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;o(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(iS,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});oS.displayName=rp;var iS=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Ts("SelectScrollButton",n),i=d.useRef(null),l=xd(n),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),gt(()=>{var f;const u=l().find(h=>h.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(ce.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:W(a.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:W(a.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:W(a.onPointerLeave,()=>{c()})})}),lL="SelectSeparator",lS=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(ce.div,{"aria-hidden":!0,...r,ref:t})});lS.displayName=lL;var sp="SelectArrow",cL=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=vd(n),o=ks(sp,n),i=Ts(sp,n);return o.open&&i.position==="popper"?s.jsx(Nm,{...a,...r,ref:t}):null});cL.displayName=sp;var uL="SelectBubbleInput",cS=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=d.useRef(null),o=ve(r,a),i=tg(t);return d.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const h=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(h)}},[i,t]),s.jsx(ce.select,{...n,style:{...b0,...n.style},ref:o,defaultValue:t})});cS.displayName=uL;function uS(e){return e===""||e===void 0}function dS(e){const t=tn(e),n=d.useRef(""),r=d.useRef(0),a=d.useCallback(i=>{const l=n.current+i;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),o=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function fS(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=dL(e,Math.max(o,0));a.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function dL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fL=$N,hS=BN,hL=VN,pL=HN,mL=WN,pS=qN,gL=YN,mS=ZN,gS=tS,xL=nS,vL=sS,xS=aS,vS=oS,yS=lS;const qt=fL,Kt=hL,Ot=d.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(hS,{ref:r,className:L("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(pL,{asChild:!0,children:s.jsx(Q0,{className:"h-4 w-4 opacity-50"})})]}));Ot.displayName=hS.displayName;const wS=d.forwardRef(({className:e,...t},n)=>s.jsx(xS,{ref:n,className:L("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(eP,{className:"h-4 w-4"})}));wS.displayName=xS.displayName;const jS=d.forwardRef(({className:e,...t},n)=>s.jsx(vS,{ref:n,className:L("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Q0,{className:"h-4 w-4"})}));jS.displayName=vS.displayName;const Dt=d.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>s.jsx(mL,{children:s.jsxs(pS,{ref:a,className:L("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(wS,{}),s.jsx(gL,{className:L("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(jS,{})]})}));Dt.displayName=pS.displayName;const yL=d.forwardRef(({className:e,...t},n)=>s.jsx(mS,{ref:n,className:L("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));yL.displayName=mS.displayName;const de=d.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(gS,{ref:r,className:L("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(vL,{children:s.jsx(G0,{className:"h-4 w-4"})})}),s.jsx(xL,{children:t})]}));de.displayName=gS.displayName;const wL=d.forwardRef(({className:e,...t},n)=>s.jsx(yS,{ref:n,className:L("-mx-1 my-1 h-px bg-muted",e),...t}));wL.displayName=yS.displayName;var rg="Progress",sg=100,[jL,b5]=$t(rg),[bL,NL]=jL(rg),bS=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:o=SL,...i}=e;(a||a===0)&&!Dv(a)&&console.error(CL(`${a}`,"Progress"));const l=Dv(a)?a:sg;r!==null&&!Iv(r,l)&&console.error(EL(`${r}`,"Progress"));const c=Iv(r,l)?r:null,u=gu(c)?o(c,l):void 0;return s.jsx(bL,{scope:n,value:c,max:l,children:s.jsx(ce.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":gu(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":CS(c,l),"data-value":c??void 0,"data-max":l,...i,ref:t})})});bS.displayName=rg;var NS="ProgressIndicator",SS=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=NL(NS,n);return s.jsx(ce.div,{"data-state":CS(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});SS.displayName=NS;function SL(e,t){return`${Math.round(e/t*100)}%`}function CS(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function gu(e){return typeof e=="number"}function Dv(e){return gu(e)&&!isNaN(e)&&e>0}function Iv(e,t){return gu(e)&&!isNaN(e)&&e<=t&&e>=0}function CL(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${sg}\`.`}function EL(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${sg} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var ES=bS,RL=SS;const ag=d.forwardRef(({className:e,value:t,...n},r)=>s.jsx(ES,{ref:r,className:L("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:s.jsx(RL,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));ag.displayName=ES.displayName;const Lv=[{id:1,title:"Campaign Basics",icon:Vu},{id:2,title:"Creatives",icon:yo},{id:3,title:"Targeting & Budget",icon:zu},{id:4,title:"Review & Confirm",icon:xt}];function PL(){var x,v;const{id:e}=hb(),t=_r(),[n,r]=d.useState(1),a=Ps(),[o,i]=d.useState(!1),[l,c]=d.useState(!0),[u,f]=d.useState({name:"",landing_url:"",type:"",description:"",creatives:[],geo_targeting:[],device_targeting:[],daily_budget:"",total_budget:"",bidding_strategy:""});d.useEffect(()=>{(async()=>{var g,j;if(e)try{const b=await b1(e);f({name:b.name,landing_url:b.landing_url,type:b.type,description:b.description||"",creatives:b.creatives||[],geo_targeting:b.geo_targeting||[],device_targeting:b.device_targeting||[],daily_budget:((g=b.daily_budget)==null?void 0:g.toString())||"",total_budget:((j=b.total_budget)==null?void 0:j.toString())||"",bidding_strategy:b.bidding_strategy||""})}catch(b){console.error("Failed to fetch campaign details",b),Te.error("Failed to load campaign data.")}finally{c(!1)}})()},[e]);const h=(w,g)=>{f(j=>({...j,[w]:g}))},p=async()=>{if(n<4)r(n+1);else try{i(!0);const w={...u,daily_budget:Number(u.daily_budget),total_budget:Number(u.total_budget)};e&&(await N1(Number(e),w),t.invalidateQueries({queryKey:["campaigns"]}),Te.success("Campaign updated successfully!"),a(`/campaigns/${e}`))}catch(w){console.error(w),Te.error("Failed to update campaign. Please try again.")}finally{i(!1)}},m=()=>{n>1&&r(n-1)},y=n/4*100;return l?s.jsx("div",{children:"Loading..."}):s.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Edit Campaign"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Update your advertising campaign details"})]}),s.jsxs(ae,{className:"shadow-sm",children:[s.jsxs(oe,{className:"border-b border-border",children:[s.jsx("div",{className:"flex items-center justify-between mb-4",children:Lv.map((w,g)=>s.jsxs("div",{className:"flex items-center flex-1",children:[s.jsxs("div",{className:`flex items-center gap-2 ${n>=w.id?"text-primary":"text-muted-foreground"}`,children:[s.jsx("div",{className:`h-8 w-8 rounded-full flex items-center justify-center border-2 transition-colors ${n>=w.id?"border-primary bg-primary/10":"border-border"}`,children:n>w.id?s.jsx(xt,{className:"h-4 w-4"}):s.jsx(w.icon,{className:"h-4 w-4"})}),s.jsx("span",{className:"text-sm font-medium hidden md:inline",children:w.title})]}),g<Lv.length-1&&s.jsx("div",{className:`h-0.5 flex-1 mx-2 ${n>w.id?"bg-primary":"bg-border"}`})]},w.id))}),s.jsx(ag,{value:y,className:"h-1"})]}),s.jsxs(fe,{className:"pt-6",children:[n===1&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Campaign Basics"}),s.jsx(ie,{children:"Tell us about your campaign and what you want to achieve"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"campaign-name",children:"Campaign Name *"}),s.jsx(xe,{id:"campaign-name",placeholder:"e.g., Summer Sale 2024",value:u.name,onChange:w=>h("name",w.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"landing-url",children:"Landing Page URL *"}),s.jsx(xe,{id:"landing-url",type:"url",placeholder:"https://yoursite.com/landing",value:u.landing_url,onChange:w=>h("landing_url",w.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"campaign-type",children:"Campaign Type *"}),s.jsxs(qt,{value:u.type,onValueChange:w=>h("type",w),children:[s.jsx(Ot,{id:"campaign-type",children:s.jsx(Kt,{placeholder:"Select campaign type"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"display",children:"Display Ads"}),s.jsx(de,{value:"native",children:"Native Ads"}),s.jsx(de,{value:"video",children:"Video Ads"}),s.jsx(de,{value:"popunder",children:"Popunder"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"description",children:"Campaign Description"}),s.jsx(eg,{id:"description",placeholder:"Brief description of your campaign goals...",rows:3,value:u.description,onChange:w=>h("description",w.target.value)})]})]})]}),n===2&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Upload Creatives"}),s.jsx(ie,{children:"Add images or videos for your campaign"}),s.jsxs("div",{className:"border-2 border-dashed border-border rounded-lg p-12 text-center hover:border-primary transition-colors cursor-pointer",children:[s.jsx(yo,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm font-medium mb-1",children:"Drop files here or click to upload"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"PNG, JPG, GIF up to 5MB • 300x250, 728x90, 160x600"})]}),s.jsx("div",{className:"grid grid-cols-3 gap-4",children:[1,2].map(w=>s.jsx("div",{className:"relative aspect-square rounded-lg border border-border bg-muted/30 p-4 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx(yo,{className:"h-8 w-8 mx-auto text-muted-foreground mb-2"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Creative ",w]})]})},w))})]}),n===3&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Targeting & Budget"}),s.jsx(ie,{children:"Define your audience and budget parameters"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"geo",children:"Geographic Targeting"}),s.jsxs(qt,{value:((x=u.geo_targeting)==null?void 0:x[0])||"",onValueChange:w=>h("geo_targeting",[w]),children:[s.jsx(Ot,{id:"geo",children:s.jsx(Kt,{placeholder:"Select countries"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"us",children:"United States"}),s.jsx(de,{value:"uk",children:"United Kingdom"}),s.jsx(de,{value:"bd",children:"Bangladesh"}),s.jsx(de,{value:"all",children:"All Countries"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"device",children:"Device Targeting"}),s.jsxs(qt,{value:((v=u.device_targeting)==null?void 0:v[0])||"",onValueChange:w=>h("device_targeting",[w]),children:[s.jsx(Ot,{id:"device",children:s.jsx(Kt,{placeholder:"Select devices"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"all",children:"All Devices"}),s.jsx(de,{value:"mobile",children:"Mobile Only"}),s.jsx(de,{value:"desktop",children:"Desktop Only"}),s.jsx(de,{value:"tablet",children:"Tablet Only"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"daily-cap",children:"Daily Budget Cap"}),s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:"$"}),s.jsx(xe,{id:"daily-cap",type:"number",placeholder:"500",className:"pl-7",value:u.daily_budget,onChange:w=>h("daily_budget",w.target.value)})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"total-budget",children:"Total Budget"}),s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:"$"}),s.jsx(xe,{id:"total-budget",type:"number",placeholder:"5000",className:"pl-7",value:u.total_budget,onChange:w=>h("total_budget",w.target.value)})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"bidding",children:"Bidding Strategy"}),s.jsxs(qt,{value:u.bidding_strategy,onValueChange:w=>h("bidding_strategy",w),children:[s.jsx(Ot,{id:"bidding",children:s.jsx(Kt,{placeholder:"Select bidding strategy"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"cpm",children:"CPM (Cost Per Mille)"}),s.jsx(de,{value:"cpc",children:"CPC (Cost Per Click)"}),s.jsx(de,{value:"cpa",children:"CPA (Cost Per Action)"})]})]})]})]}),n===4&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Review & Confirm"}),s.jsx(ie,{children:"Review your campaign details before updating"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs(ae,{className:"bg-muted/30",children:[s.jsx(oe,{children:s.jsx(ne,{className:"text-lg",children:"Cost Breakdown"})}),s.jsxs(fe,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Base Ad Cost"}),s.jsx("span",{className:"font-medium",children:"$450.00"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Platform Markup (12%)"}),s.jsx("span",{className:"font-medium",children:"$54.00"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Top-up Fee (5%)"}),s.jsx("span",{className:"font-medium",children:"$25.20"})]}),s.jsx("div",{className:"h-px bg-border my-2"}),s.jsxs("div",{className:"flex justify-between font-semibold",children:[s.jsx("span",{children:"Total Daily Cost"}),s.jsx("span",{className:"text-primary",children:"$529.20"})]})]})]}),s.jsxs(ae,{className:"bg-muted/30",children:[s.jsx(oe,{children:s.jsx(ne,{className:"text-lg",children:"Campaign Summary"})}),s.jsxs(fe,{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Campaign Type"}),s.jsx("span",{className:"font-medium",children:u.type||"Not selected"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Targeting"}),s.jsx("span",{className:"font-medium",children:"United States, All Devices"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Ad Account"}),s.jsx("span",{className:"font-medium",children:u.name||"Not assigned"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Required Balance"}),s.jsx("span",{className:"font-medium text-primary",children:"$529.20"})]})]})]}),s.jsxs("div",{className:"bg-success/10 border border-success/20 rounded-lg p-4 flex items-start gap-3",children:[s.jsx(xt,{className:"h-5 w-5 text-success mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-success",children:"Sufficient Balance Available"}),s.jsx("p",{className:"text-xs text-success/80 mt-1",children:"Your current balance ($4,250.00) covers this campaign."})]})]})]})]})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(q,{variant:"outline",onClick:m,disabled:n===1||o,children:[s.jsx(om,{className:"h-4 w-4 mr-2"}),"Previous"]}),s.jsx(q,{onClick:p,disabled:o,children:n===4?o?"Updating...":"Update Campaign":s.jsxs(s.Fragment,{children:["Next",s.jsx(Fu,{className:"h-4 w-4 ml-2"})]})})]})]})}const Fv=[{id:1,title:"Campaign Basics",icon:Vu},{id:2,title:"Creatives",icon:yo},{id:3,title:"Targeting & Budget",icon:zu},{id:4,title:"Review & Confirm",icon:xt}];function kL(){const[e,t]=d.useState(1),n=Ps(),[r,a]=d.useState(!1),[o,i]=d.useState({name:"",landing_url:"",type:"",description:"",creatives:[],geo_targeting:[],device_targeting:[],daily_budget:"",total_budget:"",bidding_strategy:""}),l=(p,m)=>{i(y=>({...y,[p]:m}))},c=_r(),u=async()=>{if(e<4)t(e+1);else try{a(!0);const p={...o,daily_budget:Number(o.daily_budget),total_budget:Number(o.total_budget)};await e4(p),c.invalidateQueries({queryKey:["campaigns"]}),Te.success("Campaign created successfully!"),n("/campaigns")}catch(p){console.error(p),Te.error("Failed to create campaign. Please try again.")}finally{a(!1)}},f=()=>{e>1&&t(e-1)},h=e/4*100;return s.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Create New Campaign"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Set up your advertising campaign in 4 simple steps"})]}),s.jsxs(ae,{className:"shadow-sm",children:[s.jsxs(oe,{className:"border-b border-border",children:[s.jsx("div",{className:"flex items-center justify-between mb-4",children:Fv.map((p,m)=>s.jsxs("div",{className:"flex items-center flex-1",children:[s.jsxs("div",{className:`flex items-center gap-2 ${e>=p.id?"text-primary":"text-muted-foreground"}`,children:[s.jsx("div",{className:`h-8 w-8 rounded-full flex items-center justify-center border-2 transition-colors ${e>=p.id?"border-primary bg-primary/10":"border-border"}`,children:e>p.id?s.jsx(xt,{className:"h-4 w-4"}):s.jsx(p.icon,{className:"h-4 w-4"})}),s.jsx("span",{className:"text-sm font-medium hidden md:inline",children:p.title})]}),m<Fv.length-1&&s.jsx("div",{className:`h-0.5 flex-1 mx-2 ${e>p.id?"bg-primary":"bg-border"}`})]},p.id))}),s.jsx(ag,{value:h,className:"h-1"})]}),s.jsxs(fe,{className:"pt-6",children:[e===1&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Campaign Basics"}),s.jsx(ie,{children:"Tell us about your campaign and what you want to achieve"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"campaign-name",children:"Campaign Name *"}),s.jsx(xe,{id:"campaign-name",placeholder:"e.g., Summer Sale 2024",value:o.name,onChange:p=>l("name",p.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"landing-url",children:"Landing Page URL *"}),s.jsx(xe,{id:"landing-url",type:"url",placeholder:"https://yoursite.com/landing",value:o.landing_url,onChange:p=>l("landing_url",p.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"campaign-type",children:"Campaign Type *"}),s.jsxs(qt,{value:o.type,onValueChange:p=>l("type",p),children:[s.jsx(Ot,{id:"campaign-type",children:s.jsx(Kt,{placeholder:"Select campaign type"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"display",children:"Display Ads"}),s.jsx(de,{value:"native",children:"Native Ads"}),s.jsx(de,{value:"video",children:"Video Ads"}),s.jsx(de,{value:"popunder",children:"Popunder"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"description",children:"Campaign Description"}),s.jsx(eg,{id:"description",placeholder:"Brief description of your campaign goals...",rows:3,value:o.description,onChange:p=>l("description",p.target.value)})]})]})]}),e===2&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Upload Creatives"}),s.jsx(ie,{children:"Add images or videos for your campaign"}),s.jsxs("div",{className:"border-2 border-dashed border-border rounded-lg p-12 text-center hover:border-primary transition-colors cursor-pointer",children:[s.jsx(yo,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm font-medium mb-1",children:"Drop files here or click to upload"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"PNG, JPG, GIF up to 5MB • 300x250, 728x90, 160x600"})]}),s.jsx("div",{className:"grid grid-cols-3 gap-4",children:[1,2].map(p=>s.jsx("div",{className:"relative aspect-square rounded-lg border border-border bg-muted/30 p-4 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx(yo,{className:"h-8 w-8 mx-auto text-muted-foreground mb-2"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Creative ",p]})]})},p))})]}),e===3&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Targeting & Budget"}),s.jsx(ie,{children:"Define your audience and budget parameters"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"geo",children:"Geographic Targeting"}),s.jsxs(qt,{onValueChange:p=>l("geo_targeting",[p]),children:[s.jsx(Ot,{id:"geo",children:s.jsx(Kt,{placeholder:"Select countries"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"us",children:"United States"}),s.jsx(de,{value:"uk",children:"United Kingdom"}),s.jsx(de,{value:"bd",children:"Bangladesh"}),s.jsx(de,{value:"all",children:"All Countries"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"device",children:"Device Targeting"}),s.jsxs(qt,{onValueChange:p=>l("device_targeting",[p]),children:[s.jsx(Ot,{id:"device",children:s.jsx(Kt,{placeholder:"Select devices"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"all",children:"All Devices"}),s.jsx(de,{value:"mobile",children:"Mobile Only"}),s.jsx(de,{value:"desktop",children:"Desktop Only"}),s.jsx(de,{value:"tablet",children:"Tablet Only"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"daily-cap",children:"Daily Budget Cap"}),s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:"$"}),s.jsx(xe,{id:"daily-cap",type:"number",placeholder:"500",className:"pl-7",value:o.daily_budget,onChange:p=>l("daily_budget",p.target.value)})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"total-budget",children:"Total Budget"}),s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:"$"}),s.jsx(xe,{id:"total-budget",type:"number",placeholder:"5000",className:"pl-7",value:o.total_budget,onChange:p=>l("total_budget",p.target.value)})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"bidding",children:"Bidding Strategy"}),s.jsxs(qt,{value:o.bidding_strategy,onValueChange:p=>l("bidding_strategy",p),children:[s.jsx(Ot,{id:"bidding",children:s.jsx(Kt,{placeholder:"Select bidding strategy"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"cpm",children:"CPM (Cost Per Mille)"}),s.jsx(de,{value:"cpc",children:"CPC (Cost Per Click)"}),s.jsx(de,{value:"cpa",children:"CPA (Cost Per Action)"})]})]})]})]}),e===4&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ne,{className:"text-xl",children:"Review & Confirm"}),s.jsx(ie,{children:"Review your campaign details before submitting"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs(ae,{className:"bg-muted/30",children:[s.jsx(oe,{children:s.jsx(ne,{className:"text-lg",children:"Cost Breakdown"})}),s.jsxs(fe,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Base Ad Cost"}),s.jsx("span",{className:"font-medium",children:"$450.00"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Platform Markup (12%)"}),s.jsx("span",{className:"font-medium",children:"$54.00"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Top-up Fee (5%)"}),s.jsx("span",{className:"font-medium",children:"$25.20"})]}),s.jsx("div",{className:"h-px bg-border my-2"}),s.jsxs("div",{className:"flex justify-between font-semibold",children:[s.jsx("span",{children:"Total Daily Cost"}),s.jsx("span",{className:"text-primary",children:"$529.20"})]})]})]}),s.jsxs(ae,{className:"bg-muted/30",children:[s.jsx(oe,{children:s.jsx(ne,{className:"text-lg",children:"Campaign Summary"})}),s.jsxs(fe,{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Campaign Type"}),s.jsx("span",{className:"font-medium",children:o.type||"Not selected"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Targeting"}),s.jsx("span",{className:"font-medium",children:"United States, All Devices"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Ad Account"}),s.jsx("span",{className:"font-medium",children:o.name||"Not assigned"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Required Balance"}),s.jsx("span",{className:"font-medium text-primary",children:"$529.20"})]})]})]}),s.jsxs("div",{className:"bg-success/10 border border-success/20 rounded-lg p-4 flex items-start gap-3",children:[s.jsx(xt,{className:"h-5 w-5 text-success mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm font-medium text-success",children:"Sufficient Balance Available"}),s.jsx("p",{className:"text-xs text-success/80 mt-1",children:"Your current balance ($4,250.00) covers this campaign."})]})]})]})]})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(q,{variant:"outline",onClick:f,disabled:e===1||r,children:[s.jsx(om,{className:"h-4 w-4 mr-2"}),"Previous"]}),s.jsx(q,{onClick:u,disabled:r,children:e===4?r?"Creating...":"Create Campaign":s.jsxs(s.Fragment,{children:["Next",s.jsx(Fu,{className:"h-4 w-4 ml-2"})]})})]})]})}var og="Radio",[TL,RS]=$t(og),[AL,_L]=TL(og),PS=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:a=!1,required:o,disabled:i,value:l="on",onCheck:c,form:u,...f}=e,[h,p]=d.useState(null),m=ve(t,v=>p(v)),y=d.useRef(!1),x=h?u||!!h.closest("form"):!0;return s.jsxs(AL,{scope:n,checked:a,disabled:i,children:[s.jsx(ce.button,{type:"button",role:"radio","aria-checked":a,"data-state":_S(a),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:W(e.onClick,v=>{a||c==null||c(),x&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),x&&s.jsx(AS,{control:h,bubbles:!y.current,name:r,value:l,checked:a,required:o,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});PS.displayName=og;var kS="RadioIndicator",TS=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...a}=e,o=_L(kS,n);return s.jsx(En,{present:r||o.checked,children:s.jsx(ce.span,{"data-state":_S(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t})})});TS.displayName=kS;var ML="RadioBubbleInput",AS=d.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const i=d.useRef(null),l=ve(i,o),c=tg(n),u=xm(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const h=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&m){const y=new Event("click",{bubbles:r});m.call(f,n),f.dispatchEvent(y)}},[c,n,r]),s.jsx(ce.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});AS.displayName=ML;function _S(e){return e?"checked":"unchecked"}var OL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],yd="RadioGroup",[DL,N5]=$t(yd,[Fo,RS]),MS=Fo(),OS=RS(),[IL,LL]=DL(yd),DS=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:a,value:o,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:h,...p}=e,m=MS(n),y=xl(u),[x,v]=ir({prop:o,defaultProp:a??null,onChange:h,caller:yd});return s.jsx(IL,{scope:n,name:r,required:i,disabled:l,value:x,onValueChange:v,children:s.jsx(Hm,{asChild:!0,...m,orientation:c,dir:y,loop:f,children:s.jsx(ce.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:y,...p,ref:t})})})});DS.displayName=yd;var IS="RadioGroupItem",LS=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...a}=e,o=LL(IS,n),i=o.disabled||r,l=MS(n),c=OS(n),u=d.useRef(null),f=ve(t,u),h=o.value===a.value,p=d.useRef(!1);return d.useEffect(()=>{const m=x=>{OL.includes(x.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",y)}},[]),s.jsx(Wm,{asChild:!0,...l,focusable:!i,active:h,children:s.jsx(PS,{disabled:i,required:o.required,checked:h,...c,...a,name:o.name,ref:f,onCheck:()=>o.onValueChange(a.value),onKeyDown:W(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:W(a.onFocus,()=>{var m;p.current&&((m=u.current)==null||m.click())})})})});LS.displayName=IS;var FL="RadioGroupIndicator",FS=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,a=OS(n);return s.jsx(TS,{...a,...r,ref:t})});FS.displayName=FL;var $S=DS,zS=LS,$L=FS;const BS=d.forwardRef(({className:e,...t},n)=>s.jsx($S,{className:L("grid gap-2",e),...t,ref:n}));BS.displayName=$S.displayName;const ap=d.forwardRef(({className:e,...t},n)=>s.jsx(zS,{ref:n,className:L("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx($L,{className:"flex items-center justify-center",children:s.jsx(Y0,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ap.displayName=zS.displayName;const zL=va("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),rt=d.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:L(zL({variant:t}),e),...n}));rt.displayName="Alert";const Ki=d.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:L("mb-1 font-medium leading-none tracking-tight",e),...t}));Ki.displayName="AlertTitle";const st=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:L("text-sm [&_p]:leading-relaxed",e),...t}));st.displayName="AlertDescription";const Tc={getWallet:async()=>(await J.get("/wallet")).data,topUp:async e=>(await J.post("/wallet/top-up",{amount:e})).data,getTransactions:async()=>(await J.get("/transactions")).data};function BL(){const[e,t]=d.useState(""),[n,r]=d.useState("card"),[a,o]=d.useState(null),[i,l]=d.useState([]),[c,u]=d.useState(!1),{toast:f}=tm();d.useEffect(()=>{h()},[]);const h=async()=>{try{const[v,w]=await Promise.all([Tc.getWallet(),Tc.getTransactions()]);o(v),l(w.slice(0,5))}catch(v){console.error("Failed to fetch wallet data",v)}},p=async()=>{u(!0);try{await Tc.topUp(parseFloat(e)),f({title:"Top-up Requested",description:"Your top-up request has been submitted for approval."}),t(""),h()}catch{f({title:"Error",description:"Failed to request top-up. Please try again.",variant:"destructive"})}finally{u(!1)}},m=v=>{const w=v*.05,g=n==="mb-global"?v*.02:0,j=v+w+g;return{topupFee:w,cardFee:g,total:j}},y=parseFloat(e)||0,x=m(y);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Top-up Balance"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Add funds to your account to run campaigns"})]}),s.jsxs(rt,{children:[s.jsx(Li,{className:"h-4 w-4"}),s.jsxs(Ki,{children:["Current Balance: $",(a==null?void 0:a.balance)||"0.00"]}),s.jsx(st,{children:"Your available balance is sufficient for active campaigns. Top-up to create new campaigns or increase spending limits."})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Add Funds"}),s.jsx(ie,{children:"Choose amount and payment method"})]}),s.jsxs(fe,{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"amount",children:"Amount (USD)"}),s.jsxs("div",{className:"relative",children:[s.jsx(vo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(xe,{id:"amount",type:"number",placeholder:"0.00",value:e,onChange:v=>t(v.target.value),className:"pl-10",min:"10",step:"10"})]}),s.jsx("div",{className:"flex gap-2 mt-2",children:[100,500,1e3,5e3].map(v=>s.jsxs(q,{variant:"outline",size:"sm",onClick:()=>t(v.toString()),children:["$",v]},v))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(ee,{children:"Payment Method"}),s.jsxs(BS,{value:n,onValueChange:r,children:[s.jsxs("div",{className:"flex items-center space-x-3 border rounded-lg p-4 cursor-pointer hover:bg-muted/50",children:[s.jsx(ap,{value:"card",id:"card"}),s.jsxs(ee,{htmlFor:"card",className:"flex-1 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yh,{className:"h-4 w-4"}),s.jsx("span",{className:"font-medium",children:"Credit / Debit Card"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Standard processing"})]})]}),s.jsxs("div",{className:"flex items-center space-x-3 border rounded-lg p-4 cursor-pointer hover:bg-muted/50",children:[s.jsx(ap,{value:"mb-global",id:"mb-global"}),s.jsxs(ee,{htmlFor:"mb-global",className:"flex-1 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yh,{className:"h-4 w-4"}),s.jsx("span",{className:"font-medium",children:"MB Global Evo Card"}),s.jsx(ye,{variant:"secondary",className:"text-xs",children:"+2% fee"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"International card processing"})]})]})]})]}),y>=10&&s.jsx(ae,{className:"bg-muted/50",children:s.jsxs(fe,{className:"pt-6 space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Amount"}),s.jsxs("span",{className:"font-medium",children:["$",y.toFixed(2)]})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Top-up Fee (5%)"}),s.jsxs("span",{className:"font-medium",children:["$",x.topupFee.toFixed(2)]})]}),x.cardFee>0&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Card Processing Fee (2%)"}),s.jsxs("span",{className:"font-medium",children:["$",x.cardFee.toFixed(2)]})]}),s.jsx("div",{className:"border-t border-border pt-2 mt-2",children:s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold",children:"Total Charge"}),s.jsxs("span",{className:"font-semibold text-lg",children:["$",x.total.toFixed(2)]})]})})]})}),s.jsx(q,{className:"w-full",size:"lg",disabled:y<10||c,onClick:p,children:c?"Processing...":s.jsxs(s.Fragment,{children:[s.jsx(vo,{className:"h-4 w-4 mr-2"}),"Top-up $",x.total.toFixed(2)]})}),s.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"Funds will be available immediately after payment confirmation"})]})]}),s.jsxs(ae,{className:"flex flex-col",children:[s.jsx(oe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ne,{children:"Recent Transactions"}),s.jsx(ie,{children:"Your top-up history"})]}),s.jsx(q,{variant:"ghost",size:"sm",asChild:!0,children:s.jsxs(Mt,{to:"/transactions",children:["View All ",s.jsx(JR,{className:"ml-2 h-4 w-4"})]})})]})}),s.jsx(fe,{className:"flex-1",children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"ID"}),s.jsx(te,{children:"Amount"}),s.jsx(te,{children:"Status"}),s.jsx(te,{children:"Date"})]})}),s.jsx(en,{children:i.length===0?s.jsx(Pe,{children:s.jsx(V,{colSpan:4,className:"text-center text-muted-foreground py-8",children:"No transactions found"})}):i.map(v=>s.jsxs(Pe,{children:[s.jsxs(V,{className:"font-mono text-xs",children:["TXN-",v.id]}),s.jsxs(V,{className:"font-medium",children:["$",v.amount]}),s.jsx(V,{children:v.status==="completed"?s.jsxs(ye,{className:"bg-success/10 text-success hover:bg-success/20",children:[s.jsx(xt,{className:"h-3 w-3 mr-1"}),"Completed"]}):v.status==="pending"?s.jsxs(ye,{variant:"secondary",children:[s.jsx(X0,{className:"h-3 w-3 mr-1"}),"Pending"]}):s.jsx(ye,{variant:"destructive",children:"Failed"})}),s.jsx(V,{className:"text-xs text-muted-foreground",children:new Date(v.created_at).toLocaleDateString()})]},v.id))})]})})]})]})]})}function UL(){const[e,t]=d.useState([]),[n,r]=d.useState(!0);d.useEffect(()=>{a()},[]);const a=async()=>{try{const i=await Tc.getTransactions();t(i)}catch(i){console.error("Failed to fetch transactions",i)}finally{r(!1)}},o=i=>{switch(i){case"completed":return s.jsxs(ye,{className:"bg-success/10 text-success hover:bg-success/20",children:[s.jsx(xt,{className:"h-3 w-3 mr-1"}),"Completed"]});case"pending":return s.jsxs(ye,{variant:"secondary",children:[s.jsx(X0,{className:"h-3 w-3 mr-1"}),"Pending"]});case"failed":return s.jsxs(ye,{variant:"destructive",children:[s.jsx(xo,{className:"h-3 w-3 mr-1"}),"Failed"]});default:return s.jsx(ye,{children:i})}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(q,{variant:"ghost",size:"icon",asChild:!0,children:s.jsx(Mt,{to:"/top-up",children:s.jsx(W0,{className:"h-4 w-4"})})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"All Transactions"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Complete transaction history"})]})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Transaction History"}),s.jsx(ie,{children:"All your top-up transactions"})]}),s.jsx(fe,{children:n?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading..."}):e.length===0?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No transactions found"}):s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Transaction ID"}),s.jsx(te,{children:"Amount"}),s.jsx(te,{children:"Type"}),s.jsx(te,{children:"Status"}),s.jsx(te,{children:"Description"}),s.jsx(te,{children:"Date"})]})}),s.jsx(en,{children:e.map(i=>s.jsxs(Pe,{children:[s.jsxs(V,{className:"font-mono text-xs",children:["TXN-",i.id]}),s.jsxs(V,{className:"font-medium",children:["$",i.amount]}),s.jsx(V,{children:s.jsx(ye,{variant:i.type==="credit"?"default":"outline",children:i.type})}),s.jsx(V,{children:o(i.status)}),s.jsx(V,{className:"text-sm text-muted-foreground",children:i.description||"-"}),s.jsx(V,{className:"text-xs text-muted-foreground",children:new Date(i.created_at).toLocaleString()})]},i.id))})]})})]})]})}const Zo={async getKpis(e={}){return(await J.get("/reports/kpis",{params:e})).data},async getCampaignPerformance(e={}){return(await J.get("/reports/campaign-performance",{params:e})).data},async getGeoBreakdown(e={}){return(await J.get("/reports/geo-breakdown",{params:e})).data},async getDeviceBreakdown(e={}){return(await J.get("/reports/device-breakdown",{params:e})).data},async exportReport(e){const t=await J.get("/reports/export",{params:e,responseType:"blob"}),n=window.URL.createObjectURL(new Blob([t.data])),r=document.createElement("a");r.href=n;const a=e.date_range||"7d",i=`report_${e.report_type}_${a}_${new Date().toISOString().split("T")[0]}.csv`;r.setAttribute("download",i),document.body.appendChild(r),r.click(),r.remove(),window.URL.revokeObjectURL(n)}};function VL(){var v,w,g,j,b,N,S,C,P;const[e,t]=d.useState("7d"),[n,r]=d.useState("all"),[a,o]=d.useState("campaigns"),{data:i}=Ae({queryKey:["campaigns"],queryFn:()=>J.get("/campaigns").then(R=>R.data)}),{data:l,isLoading:c}=Ae({queryKey:["reports-kpis",e,n],queryFn:()=>Zo.getKpis({date_range:e,campaign_id:n})}),{data:u,isLoading:f}=Ae({queryKey:["reports-campaign-performance",e,n],queryFn:()=>Zo.getCampaignPerformance({date_range:e,campaign_id:n})}),{data:h,isLoading:p}=Ae({queryKey:["reports-geo-breakdown",e,n],queryFn:()=>Zo.getGeoBreakdown({date_range:e,campaign_id:n})}),{data:m,isLoading:y}=Ae({queryKey:["reports-device-breakdown",e,n],queryFn:()=>Zo.getDeviceBreakdown({date_range:e,campaign_id:n})}),x=async()=>{let R="campaign";switch(a){case"geo":R="geo";break;case"device":R="device";break;default:R="campaign"}await Zo.exportReport({date_range:e,campaign_id:n,report_type:R})};return c||f||p||y?s.jsx("div",{className:"flex items-center justify-center h-96",children:"Loading reports..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Reports"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Analyze your campaign performance and ROI"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(q,{variant:"outline",children:[s.jsx(Z0,{className:"h-4 w-4 mr-2"}),"Filters"]}),s.jsxs(q,{variant:"outline",onClick:x,children:[s.jsx($u,{className:"h-4 w-4 mr-2"}),"Export"]})]})]}),s.jsxs("div",{className:"flex gap-4",children:[s.jsxs(qt,{value:e,onValueChange:t,children:[s.jsx(Ot,{className:"w-[180px]",children:s.jsx(Kt,{placeholder:"Date range"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"24h",children:"Last 24 hours"}),s.jsx(de,{value:"7d",children:"Last 7 days"}),s.jsx(de,{value:"30d",children:"Last 30 days"}),s.jsx(de,{value:"90d",children:"Last 90 days"}),s.jsx(de,{value:"custom",children:"Custom range"})]})]}),s.jsxs(qt,{value:n,onValueChange:r,children:[s.jsx(Ot,{className:"w-[200px]",children:s.jsx(Kt,{placeholder:"Campaign"})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"all",children:"All Campaigns"}),(v=i==null?void 0:i.data)==null?void 0:v.map(R=>s.jsx(de,{value:R.id.toString(),children:R.name},R.id))]})]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Total Spend"}),s.jsx(ne,{className:"text-2xl",children:((w=l==null?void 0:l.total_spend)==null?void 0:w.value)||"$0.00"}),s.jsx("p",{className:"text-xs text-success",children:((g=l==null?void 0:l.total_spend)==null?void 0:g.change)||""})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Total Impressions"}),s.jsx(ne,{className:"text-2xl",children:((j=l==null?void 0:l.total_impressions)==null?void 0:j.value)||"0"}),s.jsx("p",{className:"text-xs text-success",children:((b=l==null?void 0:l.total_impressions)==null?void 0:b.change)||""})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Total Clicks"}),s.jsx(ne,{className:"text-2xl",children:((N=l==null?void 0:l.total_clicks)==null?void 0:N.value)||"0"}),s.jsx("p",{className:"text-xs text-success",children:((S=l==null?void 0:l.total_clicks)==null?void 0:S.change)||""})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Avg. ROI"}),s.jsx(ne,{className:"text-2xl",children:((C=l==null?void 0:l.avg_roi)==null?void 0:C.value)||"0x"}),s.jsx("p",{className:"text-xs text-success",children:((P=l==null?void 0:l.avg_roi)==null?void 0:P.change)||""})]})})]}),s.jsxs(md,{defaultValue:"campaigns",className:"space-y-4",onValueChange:o,children:[s.jsxs(bl,{children:[s.jsxs(St,{value:"campaigns",children:[s.jsx(K0,{className:"h-4 w-4 mr-2"}),"Campaigns"]}),s.jsxs(St,{value:"geo",children:[s.jsx(zu,{className:"h-4 w-4 mr-2"}),"Geography"]}),s.jsxs(St,{value:"device",children:[s.jsx(jh,{className:"h-4 w-4 mr-2"}),"Devices"]}),s.jsxs(St,{value:"roi",children:[s.jsx(ol,{className:"h-4 w-4 mr-2"}),"ROI Analysis"]})]}),s.jsx(Ct,{value:"campaigns",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Campaign Performance"}),s.jsx(ie,{children:"Compare metrics across all campaigns"})]}),s.jsx(fe,{children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Campaign"}),s.jsx(te,{children:"Spend"}),s.jsx(te,{children:"Impressions"}),s.jsx(te,{children:"Clicks"}),s.jsx(te,{children:"CTR"}),s.jsx(te,{children:"Conversions"}),s.jsx(te,{children:"ROI"})]})}),s.jsx(en,{children:u==null?void 0:u.map(R=>s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:R.campaign}),s.jsx(V,{children:R.spend}),s.jsx(V,{children:R.impressions}),s.jsx(V,{children:R.clicks}),s.jsx(V,{children:R.ctr}),s.jsx(V,{children:R.conversions}),s.jsx(V,{children:s.jsx(ye,{className:"bg-success/10 text-success hover:bg-success/20",children:R.roi})})]},R.campaign))})]})})]})}),s.jsx(Ct,{value:"geo",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Geographic Performance"}),s.jsx(ie,{children:"Performance breakdown by country"})]}),s.jsx(fe,{children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Country"}),s.jsx(te,{children:"Spend"}),s.jsx(te,{children:"Impressions"}),s.jsx(te,{children:"Clicks"}),s.jsx(te,{children:"Conversions"})]})}),s.jsx(en,{children:h==null?void 0:h.map(R=>s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:R.country}),s.jsx(V,{children:R.spend}),s.jsx(V,{children:R.impressions}),s.jsx(V,{children:R.clicks}),s.jsx(V,{children:R.conversions})]},R.country))})]})})]})}),s.jsx(Ct,{value:"device",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Device Performance"}),s.jsx(ie,{children:"Spending and conversion by device type"})]}),s.jsx(fe,{children:s.jsx("div",{className:"space-y-4",children:m==null?void 0:m.map(R=>s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(jh,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:R.device})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"font-medium",children:R.spend}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[R.conversions," conversions"]})]})]}),s.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary",style:{width:R.percentage}})})]},R.device))})})]})}),s.jsx(Ct,{value:"roi",className:"space-y-4",children:s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"ROI Analysis"}),s.jsx(ie,{children:"Return on investment breakdown"})]}),s.jsx(fe,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Total Investment"}),s.jsx(ne,{className:"text-xl",children:"$4,800.30"})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Estimated Revenue"}),s.jsx(ne,{className:"text-xl",children:"$16,321.02"})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Net Profit"}),s.jsx(ne,{className:"text-xl text-success",children:"$11,520.72"})]})})]}),s.jsxs("div",{className:"h-[200px] flex items-end justify-around gap-2",children:[s.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-full bg-primary rounded-t",style:{height:"30%"}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Investment"})]}),s.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-full bg-success rounded-t",style:{height:"100%"}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Revenue"})]}),s.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2",children:[s.jsx("div",{className:"w-full bg-accent rounded-t",style:{height:"70%"}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Profit"})]})]})]})})]})})]})]})}function HL(){const{data:e,isLoading:t}=Ae({queryKey:["account-info"],queryFn:()=>J.get("/account/info").then(n=>n.data)});return Ae({queryKey:["account-statistics"],queryFn:()=>J.get("/account/statistics").then(n=>n.data)}),t?s.jsx("div",{children:"Loading..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Your Ad Account"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your dedicated advertising account"})]}),s.jsxs(rt,{children:[s.jsx(xt,{className:"h-4 w-4"}),s.jsx(Ki,{children:"Account Active & Ready"}),s.jsx(st,{children:"Your ad account is fully operational. Credentials are securely stored — you're ready to create and manage campaigns."})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(ae,{children:[s.jsx(oe,{className:"border-b border-border bg-muted/30",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-12 w-12 rounded-lg bg-success/10 flex items-center justify-center",children:s.jsx("div",{className:"h-4 w-4 rounded-full bg-success animate-pulse"})}),s.jsxs("div",{children:[s.jsx(ne,{className:"text-xl",children:(e==null?void 0:e.alias)||"Loading..."}),s.jsx(ie,{children:"Ad Account"})]})]}),s.jsxs(ye,{className:"bg-success/10 text-success hover:bg-success/20",children:[s.jsx(xt,{className:"h-3 w-3 mr-1"}),(e==null?void 0:e.status)||"Loading..."]})]})}),s.jsxs(fe,{className:"pt-6 space-y-4",children:[s.jsxs("div",{className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Account Alias"}),s.jsx("p",{className:"mt-1 font-mono text-lg font-medium",children:(e==null?void 0:e.alias)||"Loading..."})]}),s.jsx(Ve,{}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Status"}),s.jsx("p",{className:"mt-1 text-sm",children:"Active and running campaigns"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Created"}),s.jsx("p",{className:"mt-1 text-sm",children:(e==null?void 0:e.created_at)||"Loading..."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Assigned"}),s.jsx("p",{className:"mt-1 text-sm",children:(e==null?void 0:e.assigned_on)||"Loading..."})]})]}),s.jsx(Ve,{}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Last Synchronized"}),s.jsxs("div",{className:"flex items-center justify-between mt-1",children:[s.jsx("p",{className:"text-sm",children:(e==null?void 0:e.last_sync)||"Loading..."}),s.jsxs(q,{variant:"ghost",size:"sm",children:[s.jsx(Fi,{className:"h-3 w-3 mr-1"}),"Sync Now"]})]})]})]}),s.jsxs(rt,{variant:"default",className:"mt-4",children:[s.jsx(Li,{className:"h-4 w-4"}),s.jsx(Ki,{children:"Secure Credentials"}),s.jsx(st,{children:"Your API keys and credentials are encrypted and securely stored. They are never displayed in the interface."})]})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ae,{children:[s.jsx(oe,{children:s.jsx(ne,{children:"Account Statistics"})}),s.jsxs(fe,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Available Balance"}),s.jsx("span",{className:"text-2xl font-bold",children:(e==null?void 0:e.balance)||"$0.00"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Active Campaigns"}),s.jsx("span",{className:"text-2xl font-bold",children:(e==null?void 0:e.active_campaigns)||"0"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Lifetime Spend"}),s.jsx("span",{className:"text-2xl font-bold",children:(e==null?void 0:e.lifetime_spend)||"$0.00"})]})]})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Account Actions"}),s.jsx(ie,{children:"Manage your account settings"})]}),s.jsxs(fe,{className:"space-y-3",children:[s.jsxs(q,{variant:"outline",className:"w-full justify-start",children:[s.jsx(Fi,{className:"h-4 w-4 mr-2"}),"Sync Account Balance"]}),s.jsx(q,{variant:"outline",className:"w-full justify-start",disabled:!0,children:"Request Account Change"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Need a different account? Contact support to request an account reassignment."})]})]}),s.jsxs(ae,{children:[s.jsx(oe,{children:s.jsx(ne,{children:"Billing Information"})}),s.jsxs(fe,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Monthly Account Fee"}),s.jsx("span",{className:"font-medium",children:"Included"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Next Invoice"}),s.jsx("span",{className:"font-medium",children:"Feb 1, 2024"})]}),s.jsx(q,{variant:"outline",className:"w-full",size:"sm",children:"View Billing History"})]})]})]})]})]})}var wd="Switch",[WL,S5]=$t(wd),[qL,KL]=WL(wd),US=d.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...h}=e,[p,m]=d.useState(null),y=ve(t,j=>m(j)),x=d.useRef(!1),v=p?f||!!p.closest("form"):!0,[w,g]=ir({prop:a,defaultProp:o??!1,onChange:u,caller:wd});return s.jsxs(qL,{scope:n,checked:w,disabled:l,children:[s.jsx(ce.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":qS(w),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:y,onClick:W(e.onClick,j=>{g(b=>!b),v&&(x.current=j.isPropagationStopped(),x.current||j.stopPropagation())})}),v&&s.jsx(WS,{control:p,bubbles:!x.current,name:r,value:c,checked:w,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});US.displayName=wd;var VS="SwitchThumb",HS=d.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=KL(VS,n);return s.jsx(ce.span,{"data-state":qS(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});HS.displayName=VS;var GL="SwitchBubbleInput",WS=d.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const i=d.useRef(null),l=ve(i,o),c=tg(n),u=xm(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const h=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&m){const y=new Event("click",{bubbles:r});m.call(f,n),f.dispatchEvent(y)}},[c,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});WS.displayName=GL;function qS(e){return e?"checked":"unchecked"}var KS=US,QL=HS;const qr=d.forwardRef(({className:e,...t},n)=>s.jsx(KS,{className:L("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:s.jsx(QL,{className:L("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));qr.displayName=KS.displayName;const jn=Lm,YL=Fm,GS=d.forwardRef(({className:e,...t},n)=>s.jsx(ll,{ref:n,className:L("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));GS.displayName=ll.displayName;const an=d.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(YL,{children:[s.jsx(GS,{}),s.jsxs(cl,{ref:r,className:L("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,s.jsxs(rd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(lm,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));an.displayName=cl.displayName;const on=({className:e,...t})=>s.jsx("div",{className:L("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});on.displayName="DialogHeader";const or=({className:e,...t})=>s.jsx("div",{className:L("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});or.displayName="DialogFooter";const ln=d.forwardRef(({className:e,...t},n)=>s.jsx(ul,{ref:n,className:L("text-lg font-semibold leading-none tracking-tight",e),...t}));ln.displayName=ul.displayName;const cn=d.forwardRef(({className:e,...t},n)=>s.jsx(dl,{ref:n,className:L("text-sm text-muted-foreground",e),...t}));cn.displayName=dl.displayName;const ct="/settings",XL=async()=>(await J.get(`${ct}/profile`)).data,JL=async e=>(await J.put(`${ct}/profile`,e)).data,ZL=async()=>(await J.get(`${ct}/preferences`)).data,eF=async e=>(await J.put(`${ct}/preferences`,e)).data,tF=async()=>(await J.get(`${ct}/notifications`)).data,nF=async e=>(await J.put(`${ct}/notifications`,e)).data,rF=async()=>(await J.get(`${ct}/billing`)).data,sF=async()=>(await J.get(`${ct}/payment-methods`)).data,aF=async()=>(await J.get(`${ct}/fees`)).data,oF=async()=>(await J.get(`${ct}/security`)).data,iF=async()=>(await J.post(`${ct}/security/2fa/setup`)).data,lF=async e=>(await J.post(`${ct}/security/2fa/verify`,{code:e})).data,cF=async e=>(await J.post(`${ct}/security/2fa/disable`,{code:e})).data,uF=async e=>(await J.post(`${ct}/security/recovery-codes/regenerate`,{code:e})).data,dF=async e=>(await J.post(`${ct}/security/password`,e)).data,fF=async()=>(await J.get(`${ct}/security/sessions`)).data,hF=async e=>{await J.delete(`${ct}/security/sessions/${e}`)},pF=async()=>(await J.get(`${ct}/account/download`)).data,mF=async()=>(await J.post(`${ct}/account/delete`)).data;function gF({open:e,onOpenChange:t,qrCodeUrl:n,secret:r,isLoading:a,onVerify:o,verificationStatus:i="idle",errorMessage:l}){const[c,u]=d.useState(""),f=()=>{c.length===6&&o(c)},h=m=>{const y=m.target.value.replace(/\D/g,"").slice(0,6);u(y)},p=m=>{m.key==="Enter"&&c.length===6&&f()};return s.jsx(jn,{open:e,onOpenChange:t,children:s.jsxs(an,{className:"sm:max-w-[500px]",children:[s.jsxs(on,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:s.jsx(Uu,{className:"h-5 w-5 text-primary"})}),s.jsx(ln,{children:"Enable Two-Factor Authentication"})]}),s.jsx(cn,{children:"Secure your account with an extra layer of protection"})]}),s.jsxs("div",{className:"space-y-6 py-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary text-primary-foreground text-sm font-semibold",children:"1"}),s.jsx("h4",{className:"font-semibold",children:"Scan QR Code"})]}),s.jsx("p",{className:"text-sm text-muted-foreground ml-8",children:"Open Google Authenticator and scan this QR code"}),a&&!n?s.jsx("div",{className:"flex items-center justify-center h-[200px] bg-muted rounded-lg ml-8",children:s.jsx(_t,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):n?s.jsx("div",{className:"ml-8 p-4 bg-muted rounded-lg inline-block",children:s.jsx("img",{src:n,alt:"2FA QR Code",className:"w-[200px] h-[200px]"})}):null]}),r&&s.jsxs("div",{className:"space-y-2 ml-8",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Can't scan? Enter this code manually:"}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("code",{className:"flex-1 px-3 py-2 bg-muted rounded-md text-sm font-mono",children:r})})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary text-primary-foreground text-sm font-semibold",children:"2"}),s.jsx("h4",{className:"font-semibold",children:"Verify Setup"})]}),s.jsx("p",{className:"text-sm text-muted-foreground ml-8",children:"Enter the 6-digit code from your authenticator app"}),s.jsxs("div",{className:"ml-8 space-y-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"verification-code",children:"Verification Code"}),s.jsx(xe,{id:"verification-code",type:"text",inputMode:"numeric",placeholder:"000000",value:c,onChange:h,onKeyPress:p,maxLength:6,className:"text-center text-2xl tracking-widest font-mono",disabled:i==="verifying"||i==="success",autoFocus:!0})]}),i==="error"&&l&&s.jsxs(rt,{variant:"destructive",children:[s.jsx(xo,{className:"h-4 w-4"}),s.jsx(st,{children:l})]}),i==="success"&&s.jsxs(rt,{className:"border-green-500 bg-green-50 text-green-900",children:[s.jsx(xt,{className:"h-4 w-4 text-green-600"}),s.jsx(st,{children:"Two-factor authentication enabled successfully!"})]}),s.jsx(q,{onClick:f,disabled:c.length!==6||i==="verifying"||i==="success",className:"w-full",children:i==="verifying"?s.jsxs(s.Fragment,{children:[s.jsx(_t,{className:"mr-2 h-4 w-4 animate-spin"}),"Verifying..."]}):i==="success"?s.jsxs(s.Fragment,{children:[s.jsx(xt,{className:"mr-2 h-4 w-4"}),"Verified"]}):"Verify and Enable"})]})]})]})]})})}function xF({open:e,onOpenChange:t,onDisable:n,isLoading:r,error:a}){const[o,i]=d.useState(""),l=()=>{o.length===6&&n(o)},c=h=>{const p=h.target.value.replace(/\D/g,"").slice(0,6);i(p)},u=h=>{h.key==="Enter"&&o.length===6&&l()},f=h=>{r||(i(""),t(h))};return s.jsx(jn,{open:e,onOpenChange:f,children:s.jsxs(an,{className:"sm:max-w-[450px]",children:[s.jsxs(on,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-2 bg-destructive/10 rounded-lg",children:s.jsx(Pr,{className:"h-5 w-5 text-destructive"})}),s.jsx(ln,{children:"Disable Two-Factor Authentication"})]}),s.jsx(cn,{children:"Are you sure you want to disable 2FA? Your account will be less secure."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs(rt,{variant:"destructive",className:"bg-destructive/5",children:[s.jsx(Pr,{className:"h-4 w-4"}),s.jsx(st,{children:"Disabling two-factor authentication will make your account more vulnerable to unauthorized access."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"disable-code",children:"Enter Verification Code"}),s.jsx(xe,{id:"disable-code",type:"text",inputMode:"numeric",placeholder:"000000",value:o,onChange:c,onKeyPress:u,maxLength:6,className:"text-center text-2xl tracking-widest font-mono",disabled:r,autoFocus:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter the 6-digit code from your authenticator app to confirm"})]}),a&&s.jsxs(rt,{variant:"destructive",children:[s.jsx(xo,{className:"h-4 w-4"}),s.jsx(st,{children:a})]})]}),s.jsxs(or,{children:[s.jsx(q,{variant:"outline",onClick:()=>f(!1),disabled:r,children:"Cancel"}),s.jsx(q,{variant:"destructive",onClick:l,disabled:o.length!==6||r,children:r?s.jsxs(s.Fragment,{children:[s.jsx(_t,{className:"mr-2 h-4 w-4 animate-spin"}),"Disabling..."]}):"Disable 2FA"})]})]})})}function vF({open:e,onOpenChange:t,recoveryCodes:n=[],onRegenerate:r,isRegenerating:a=!1,regenerateError:o}){const[i,l]=d.useState(!1),[c,u]=d.useState(""),[f,h]=d.useState(!1),p=()=>{const v=n.join(`
`);navigator.clipboard.writeText(v),Te.success("Recovery codes copied to clipboard")},m=()=>{const v=n.join(`
`),w=new Blob([v],{type:"text/plain"}),g=URL.createObjectURL(w),j=document.createElement("a");j.href=g,j.download="recovery-codes.txt",document.body.appendChild(j),j.click(),document.body.removeChild(j),URL.revokeObjectURL(g),Te.success("Recovery codes downloaded")},y=()=>{c.length===6&&r&&(r(c),u(""))},x=()=>{!f&&n.length>0&&!confirm("Have you saved your recovery codes? You won't be able to see them again.")||(l(!1),u(""),h(!1),t(!1))};return s.jsx(jn,{open:e,onOpenChange:x,children:s.jsxs(an,{className:"sm:max-w-[600px]",children:[s.jsxs(on,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:s.jsx(Uu,{className:"h-5 w-5 text-primary"})}),s.jsx(ln,{children:"Recovery Codes"})]}),s.jsx(cn,{children:"Save these codes in a secure location. Each code can only be used once."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs(rt,{children:[s.jsx(Pr,{className:"h-4 w-4"}),s.jsx(st,{children:"Store these codes securely. You'll need them to access your account if you lose your authenticator device."})]}),n.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(ee,{children:"Your Recovery Codes"}),s.jsx("div",{className:"grid grid-cols-2 gap-2 p-4 bg-muted rounded-lg",children:n.map((v,w)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-background rounded border font-mono text-sm",children:[s.jsxs("span",{className:"text-muted-foreground",children:[w+1,"."]}),s.jsx("span",{className:"font-semibold",children:v})]},w))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(q,{variant:"outline",size:"sm",onClick:p,className:"flex-1",children:[s.jsx(J0,{className:"h-4 w-4 mr-2"}),"Copy All"]}),s.jsxs(q,{variant:"outline",size:"sm",onClick:m,className:"flex-1",children:[s.jsx($u,{className:"h-4 w-4 mr-2"}),"Download"]})]}),s.jsxs("div",{className:"flex items-start gap-2 p-3 bg-muted rounded-lg",children:[s.jsx("input",{type:"checkbox",id:"saved-confirm",checked:f,onChange:v=>h(v.target.checked),className:"mt-1"}),s.jsx("label",{htmlFor:"saved-confirm",className:"text-sm cursor-pointer",children:"I have saved these recovery codes in a secure location"})]})]}),r&&s.jsx("div",{className:"space-y-3 pt-4 border-t",children:i?s.jsxs("div",{className:"space-y-3",children:[s.jsxs(rt,{variant:"destructive",className:"bg-destructive/5",children:[s.jsx(Pr,{className:"h-4 w-4"}),s.jsx(st,{children:"Regenerating will invalidate all previous recovery codes"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"regen-code",children:"Enter 2FA Code to Confirm"}),s.jsx(xe,{id:"regen-code",type:"text",inputMode:"numeric",placeholder:"000000",value:c,onChange:v=>u(v.target.value.replace(/\D/g,"").slice(0,6)),maxLength:6,className:"text-center text-xl tracking-widest font-mono",disabled:a})]}),o&&s.jsxs(rt,{variant:"destructive",children:[s.jsx(xo,{className:"h-4 w-4"}),s.jsx(st,{children:o})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(q,{variant:"outline",onClick:()=>{l(!1),u("")},disabled:a,className:"flex-1",children:"Cancel"}),s.jsx(q,{onClick:y,disabled:c.length!==6||a,className:"flex-1",children:a?s.jsxs(s.Fragment,{children:[s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}),"Regenerating..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Fi,{className:"h-4 w-4 mr-2"}),"Regenerate"]})})]})]}):s.jsxs(q,{variant:"outline",onClick:()=>l(!0),className:"w-full",children:[s.jsx(Fi,{className:"h-4 w-4 mr-2"}),"Regenerate Recovery Codes"]})})]}),s.jsx(or,{children:s.jsx(q,{onClick:x,disabled:!f&&n.length>0,children:f||n.length===0?"Close":"I've Saved My Codes"})})]})})}function yF({open:e,onOpenChange:t,onChangePassword:n,isLoading:r,error:a}){const[o,i]=d.useState(""),[l,c]=d.useState(""),[u,f]=d.useState(""),[h,p]=d.useState(!1),[m,y]=d.useState(!1),[x,v]=d.useState(!1),g=(C=>{if(C.length===0)return{strength:0,label:"",color:""};if(C.length<8)return{strength:1,label:"Weak",color:"bg-red-500"};let P=1;return C.length>=12&&P++,/[a-z]/.test(C)&&/[A-Z]/.test(C)&&P++,/[0-9]/.test(C)&&P++,/[^a-zA-Z0-9]/.test(C)&&P++,P<=2?{strength:2,label:"Fair",color:"bg-orange-500"}:P===3?{strength:3,label:"Good",color:"bg-yellow-500"}:{strength:4,label:"Strong",color:"bg-green-500"}})(l),j=l===u&&u.length>0,b=o.length>0&&l.length>=8&&j,N=()=>{b&&n({current_password:o,new_password:l,new_password_confirmation:u})},S=()=>{r||(i(""),c(""),f(""),t(!1))};return s.jsx(jn,{open:e,onOpenChange:S,children:s.jsxs(an,{className:"sm:max-w-[450px]",children:[s.jsxs(on,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:s.jsx(iP,{className:"h-5 w-5 text-primary"})}),s.jsx(ln,{children:"Change Password"})]}),s.jsx(cn,{children:"Update your password to keep your account secure"})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"current-password",children:"Current Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(xe,{id:"current-password",type:h?"text":"password",value:o,onChange:C=>i(C.target.value),disabled:r,placeholder:"Enter current password"}),s.jsx("button",{type:"button",onClick:()=>p(!h),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:h?s.jsx(tf,{className:"h-4 w-4"}):s.jsx(gc,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"new-password",children:"New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(xe,{id:"new-password",type:m?"text":"password",value:l,onChange:C=>c(C.target.value),disabled:r,placeholder:"Enter new password (min 8 characters)"}),s.jsx("button",{type:"button",onClick:()=>y(!m),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:m?s.jsx(tf,{className:"h-4 w-4"}):s.jsx(gc,{className:"h-4 w-4"})})]}),l.length>0&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"flex gap-1",children:[1,2,3,4].map(C=>s.jsx("div",{className:`h-1 flex-1 rounded-full ${C<=g.strength?g.color:"bg-muted"}`},C))}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Password strength: ",s.jsx("span",{className:"font-medium",children:g.label})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"confirm-password",children:"Confirm New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(xe,{id:"confirm-password",type:x?"text":"password",value:u,onChange:C=>f(C.target.value),disabled:r,placeholder:"Confirm new password"}),s.jsx("button",{type:"button",onClick:()=>v(!x),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:x?s.jsx(tf,{className:"h-4 w-4"}):s.jsx(gc,{className:"h-4 w-4"})})]}),u.length>0&&s.jsx("div",{className:"flex items-center gap-2 text-sm",children:j?s.jsxs(s.Fragment,{children:[s.jsx(xt,{className:"h-4 w-4 text-green-500"}),s.jsx("span",{className:"text-green-600",children:"Passwords match"})]}):s.jsxs(s.Fragment,{children:[s.jsx(xo,{className:"h-4 w-4 text-red-500"}),s.jsx("span",{className:"text-red-600",children:"Passwords don't match"})]})})]}),a&&s.jsxs(rt,{variant:"destructive",children:[s.jsx(xo,{className:"h-4 w-4"}),s.jsx(st,{children:a})]})]}),s.jsxs(or,{children:[s.jsx(q,{variant:"outline",onClick:S,disabled:r,children:"Cancel"}),s.jsx(q,{onClick:N,disabled:!b||r,children:r?s.jsxs(s.Fragment,{children:[s.jsx(_t,{className:"mr-2 h-4 w-4 animate-spin"}),"Updating..."]}):"Update Password"})]})]})})}function wF({open:e,onOpenChange:t,sessions:n,currentSessionId:r,onRevokeSession:a,isRevoking:o}){const[i,l]=d.useState(null),c=m=>{const y=m.toLowerCase();return y.includes("mobile")||y.includes("android")||y.includes("iphone")?s.jsx(jh,{className:"h-5 w-5"}):y.includes("tablet")||y.includes("ipad")?s.jsx(dP,{className:"h-5 w-5"}):s.jsx(Rx,{className:"h-5 w-5"})},u=m=>{const y=m.toLowerCase();return y.includes("chrome")?"Chrome":y.includes("firefox")?"Firefox":y.includes("safari")?"Safari":y.includes("edge")?"Edge":y.includes("opera")?"Opera":"Unknown Browser"},f=m=>{const y=m.toLowerCase();return y.includes("windows")?"Windows":y.includes("mac")?"macOS":y.includes("linux")?"Linux":y.includes("android")?"Android":y.includes("iphone")||y.includes("ipad")?"iOS":"Unknown Device"},h=m=>{const y=new Date(m),v=new Date().getTime()-y.getTime(),w=Math.floor(v/6e4);if(w<1)return"Just now";if(w<60)return`${w} minute${w>1?"s":""} ago`;const g=Math.floor(w/60);if(g<24)return`${g} hour${g>1?"s":""} ago`;const j=Math.floor(g/24);return`${j} day${j>1?"s":""} ago`},p=m=>{confirm("Are you sure you want to revoke this session? You will be logged out from that device.")&&(l(m),a(m))};return s.jsx(jn,{open:e,onOpenChange:t,children:s.jsxs(an,{className:"sm:max-w-[600px]",children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Active Sessions"}),s.jsx(cn,{children:"Manage devices that are currently logged into your account"})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[n.length===0?s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Rx,{className:"h-12 w-12 mx-auto text-muted-foreground mb-3"}),s.jsx("p",{className:"text-muted-foreground",children:"No active sessions found"})]}):s.jsx("div",{className:"space-y-3",children:n.map(m=>{const y=m.id===r,x=i===m.id&&o;return s.jsx("div",{className:`p-4 border rounded-lg ${y?"border-primary bg-primary/5":""}`,children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex gap-3 flex-1",children:[s.jsx("div",{className:"text-muted-foreground mt-1",children:c(m.user_agent)}),s.jsxs("div",{className:"flex-1 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("p",{className:"font-medium",children:[u(m.user_agent)," on ",f(m.user_agent)]}),y&&s.jsxs(ye,{variant:"default",className:"text-xs",children:[s.jsx(xt,{className:"h-3 w-3 mr-1"}),"Current"]})]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["IP: ",m.ip_address]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last active: ",h(m.last_activity)]})]})]}),!y&&s.jsx(q,{variant:"outline",size:"sm",onClick:()=>p(m.id),disabled:x,children:x?s.jsxs(s.Fragment,{children:[s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}),"Revoking..."]}):"Revoke"})]})},m.id)})}),s.jsxs(rt,{children:[s.jsx(Pr,{className:"h-4 w-4"}),s.jsx(st,{children:"If you see a session you don't recognize, revoke it immediately and change your password."})]})]})]})})}function jF(){const e=_r(),[t,n]=d.useState("general"),[r,a]=d.useState(!1),[o,i]=d.useState(!1),[l,c]=d.useState(!1),[u,f]=d.useState(!1),[h,p]=d.useState(!1),[m,y]=d.useState(),[x,v]=d.useState(),[w,g]=d.useState([]),[j,b]=d.useState("idle"),[N,S]=d.useState(),[C,P]=d.useState(),[R,M]=d.useState(),[O,D]=d.useState(),[Z,I]=d.useState(!1),{data:re,isLoading:z}=Ae({queryKey:["profile"],queryFn:XL}),{data:Q}=Ae({queryKey:["preferences"],queryFn:ZL}),A=tt({mutationFn:eF,onSuccess:()=>{e.invalidateQueries({queryKey:["preferences"]}),Te.success("Preferences updated successfully")}}),{data:k}=Ae({queryKey:["notificationSettings"],queryFn:tF}),$=tt({mutationFn:nF,onSuccess:()=>{e.invalidateQueries({queryKey:["notificationSettings"]}),Te.success("Notification settings updated")}}),{data:G}=Ae({queryKey:["billingInfo"],queryFn:rF}),{data:T}=Ae({queryKey:["paymentMethods"],queryFn:sF}),{data:K}=Ae({queryKey:["feeStructure"],queryFn:aF}),{data:H}=Ae({queryKey:["securitySettings"],queryFn:oF}),Ne=tt({mutationFn:iF,onSuccess:Y=>{y(Y.qr_code_url),v(Y.secret),a(!0)},onError:()=>{Te.error("Failed to setup 2FA")}}),_e=tt({mutationFn:lF,onMutate:()=>{b("verifying"),S(void 0)},onSuccess:Y=>{b("success"),e.invalidateQueries({queryKey:["securitySettings"]}),Te.success("Two-factor authentication enabled successfully!"),Y.recovery_codes&&Y.recovery_codes.length>0?(g(Y.recovery_codes),setTimeout(()=>{a(!1),b("idle"),y(void 0),v(void 0),c(!0)},1500)):setTimeout(()=>{a(!1),b("idle"),y(void 0),v(void 0)},1500)},onError:Y=>{var Xe,Be;b("error"),S(((Be=(Xe=Y.response)==null?void 0:Xe.data)==null?void 0:Be.message)||"Invalid verification code")}}),U=tt({mutationFn:cF,onSuccess:()=>{e.invalidateQueries({queryKey:["securitySettings"]}),Te.success("Two-factor authentication disabled"),i(!1),P(void 0)},onError:Y=>{var Xe,Be;P(((Be=(Xe=Y.response)==null?void 0:Xe.data)==null?void 0:Be.message)||"Invalid verification code")}}),Se=tt({mutationFn:uF,onSuccess:Y=>{Y.recovery_codes&&Y.recovery_codes.length>0&&(g(Y.recovery_codes),Te.success("Recovery codes regenerated successfully"),M(void 0))},onError:Y=>{var Xe,Be;M(((Be=(Xe=Y.response)==null?void 0:Xe.data)==null?void 0:Be.message)||"Invalid verification code")}}),Ce=tt({mutationFn:dF,onSuccess:()=>{e.invalidateQueries({queryKey:["securitySettings"]}),Te.success("Password changed successfully"),f(!1),D(void 0)},onError:Y=>{var Xe,Be;D(((Be=(Xe=Y.response)==null?void 0:Xe.data)==null?void 0:Be.message)||"Failed to change password")}}),{data:je=[],refetch:be}=Ae({queryKey:["activeSessions"],queryFn:fF,enabled:h}),Ee=tt({mutationFn:hF,onSuccess:()=>{Te.success("Session revoked successfully"),be()},onError:()=>{Te.error("Failed to revoke session")}}),ut=Y=>{A.mutate({theme:Y?"dark":"light"})},at=(Y,Xe)=>{$.mutate({[Y]:Xe})},ur=()=>{Ne.mutate()},Kn=Y=>{_e.mutate(Y)},dr=Y=>{U.mutate(Y)},As=()=>{c(!0)},Ir=Y=>{Se.mutate(Y)},Nl=Y=>{Ce.mutate(Y)},_s=Y=>{Ee.mutate(Y)},Sl=async()=>{try{const Y=await pF(),Xe=new Blob([JSON.stringify(Y,null,2)],{type:"application/json"}),Be=URL.createObjectURL(Xe),Os=document.createElement("a");Os.href=Be,Os.download=`account-data-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(Os),Os.click(),document.body.removeChild(Os),URL.revokeObjectURL(Be),Te.success("Account data downloaded successfully")}catch{Te.error("Failed to download account data")}},fr=()=>{I(!0)},bd=async()=>{try{await mF(),Te.success("Account deletion requested. You will receive a confirmation email."),I(!1)}catch{Te.error("Failed to request account deletion")}},[Nd,vt]=d.useState(!1),[hr,Cl]=d.useState(""),[El,Ms]=d.useState(""),zo=tt({mutationFn:JL,onSuccess:()=>{e.invalidateQueries({queryKey:["profile"]}),Te.success("Profile updated successfully"),vt(!1)},onError:Y=>{var Xe,Be;Te.error(((Be=(Xe=Y.response)==null?void 0:Xe.data)==null?void 0:Be.message)||"Failed to update profile")}}),Rl=()=>{re&&(Cl(re.name),Ms(re.email),vt(!0))},Bo=()=>{zo.mutate({name:hr,email:El})};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Settings"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your account and platform preferences"})]}),s.jsxs(md,{value:t,onValueChange:n,className:"space-y-4",children:[s.jsxs(bl,{children:[s.jsxs(St,{value:"general",children:[s.jsx(rj,{className:"h-4 w-4 mr-2"}),"General"]}),s.jsxs(St,{value:"notifications",children:[s.jsx(q0,{className:"h-4 w-4 mr-2"}),"Notifications"]}),s.jsxs(St,{value:"billing",children:[s.jsx(vo,{className:"h-4 w-4 mr-2"}),"Billing"]}),s.jsxs(St,{value:"security",children:[s.jsx(Uu,{className:"h-4 w-4 mr-2"}),"Security"]})]}),s.jsxs(Ct,{value:"general",className:"space-y-4",children:[s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Profile Settings"}),s.jsx(ie,{children:"Manage your account information"})]}),s.jsx(fe,{className:"space-y-4",children:z?s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Full Name"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:(re==null?void 0:re.name)||"N/A"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Email Address"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:(re==null?void 0:re.email)||"N/A"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Account Type"}),s.jsx(ye,{children:(re==null?void 0:re.type)||"Customer"})]}),s.jsx(q,{variant:"outline",className:"mt-4",onClick:Rl,children:"Edit Profile"})]})})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Preferences"}),s.jsx(ie,{children:"Customize your experience"})]}),s.jsxs(fe,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Dark Mode"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Use dark theme"})]}),s.jsx(qr,{checked:(Q==null?void 0:Q.theme)==="dark",onCheckedChange:ut})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Language"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:(Q==null?void 0:Q.language)==="en"?"English (US)":Q==null?void 0:Q.language})]}),s.jsxs(q,{variant:"outline",size:"sm",children:[s.jsx(zu,{className:"h-4 w-4 mr-2"}),"Change"]})]})]})]})]}),s.jsxs(Ct,{value:"notifications",className:"space-y-4",children:[s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Email Notifications"}),s.jsx(ie,{children:"Choose what emails you want to receive"})]}),s.jsxs(fe,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Campaign Status Updates"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Get notified when campaigns start, pause, or end"})]}),s.jsx(qr,{checked:(k==null?void 0:k.campaign_status_updates)??!0,onCheckedChange:Y=>at("campaign_status_updates",Y)})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Budget Alerts"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Alerts when campaigns reach 80% of daily cap"})]}),s.jsx(qr,{checked:(k==null?void 0:k.budget_alerts)??!0,onCheckedChange:Y=>at("budget_alerts",Y)})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Low Balance Warnings"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Notify when balance falls below threshold"})]}),s.jsx(qr,{checked:(k==null?void 0:k.low_balance_warnings)??!0,onCheckedChange:Y=>at("low_balance_warnings",Y)})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Weekly Performance Reports"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Summary of campaign performance every Monday"})]}),s.jsx(qr,{checked:(k==null?void 0:k.weekly_reports)??!1,onCheckedChange:Y=>at("weekly_reports",Y)})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Marketing Updates"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Platform updates and new features"})]}),s.jsx(qr,{checked:(k==null?void 0:k.marketing_updates)??!1,onCheckedChange:Y=>at("marketing_updates",Y)})]})]})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Push Notifications"}),s.jsx(ie,{children:"In-app notification preferences"})]}),s.jsx(fe,{className:"space-y-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Browser Notifications"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive push notifications in browser"})]}),s.jsx(qr,{checked:(k==null?void 0:k.browser_notifications)??!1,onCheckedChange:Y=>at("browser_notifications",Y)})]})})]})]}),s.jsxs(Ct,{value:"billing",className:"space-y-4",children:[s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Billing Information"}),s.jsx(ie,{children:"Manage payment methods and invoices"})]}),s.jsxs(fe,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Current Balance"}),s.jsx("p",{className:"text-2xl font-bold",children:(G==null?void 0:G.balance)||"$0.00"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Payment Methods"}),s.jsx("div",{className:"space-y-2",children:T&&T.length>0?T.map(Y=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"font-medium",children:[Y.type==="credit_card"?"Credit Card":"Bank Account"," ending in ",Y.last_four]}),Y.expiry_month&&Y.expiry_year&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Expires ",Y.expiry_month,"/",Y.expiry_year]})]}),Y.is_default&&s.jsx(ye,{children:"Default"})]},Y.id)):s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Credit Card ending in 4242"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Expires 12/2025"})]}),s.jsx(ye,{children:"Default"})]})}),s.jsx(q,{variant:"outline",size:"sm",children:"Add Payment Method"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Invoices"}),s.jsx(q,{variant:"outline",size:"sm",children:"View Invoice History"})]})]})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Fee Structure"}),s.jsx(ie,{children:"Current platform fees (display only)"})]}),s.jsxs(fe,{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Platform Markup"}),s.jsx("span",{className:"font-medium",children:(K==null?void 0:K.platform_markup)||"11.5%"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Top-up Fee"}),s.jsx("span",{className:"font-medium",children:(K==null?void 0:K.topup_fee)||"5.0%"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"MB Global Card Fee"}),s.jsx("span",{className:"font-medium",children:(K==null?void 0:K.card_fee)||"2.0%"})]})]})]})]}),s.jsxs(Ct,{value:"security",className:"space-y-4",children:[s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Security Settings"}),s.jsx(ie,{children:"Protect your account"})]}),s.jsxs(fe,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{children:"Two-Factor Authentication"}),H!=null&&H.two_factor_enabled?s.jsxs(ye,{className:"bg-green-500 hover:bg-green-600",children:[s.jsx(xt,{className:"h-3 w-3 mr-1"}),"Enabled"]}):s.jsx(ye,{variant:"secondary",children:"Disabled"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add an extra layer of security with Google Authenticator"})]}),s.jsx(q,{variant:"outline",size:"sm",onClick:H!=null&&H.two_factor_enabled?()=>i(!0):ur,disabled:Ne.isPending,children:H!=null&&H.two_factor_enabled?"Disable":"Enable"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Recovery Codes"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Backup codes to access your account if you lose your authenticator"})]}),s.jsxs(q,{variant:"outline",size:"sm",onClick:As,disabled:!(H!=null&&H.two_factor_enabled),children:[s.jsx(aP,{className:"h-4 w-4 mr-2"}),"View Codes"]})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Change Password"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Last changed ",(H==null?void 0:H.password_changed_at)||"Never"]})]}),s.jsx(q,{variant:"outline",size:"sm",onClick:()=>f(!0),children:"Update"})]}),s.jsx(Ve,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Active Sessions"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage devices logged into your account"})]}),s.jsx(q,{variant:"outline",size:"sm",onClick:()=>p(!0),children:"View"})]})]})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Account Actions"}),s.jsx(ie,{children:"Manage your account status"})]}),s.jsxs(fe,{className:"space-y-3",children:[s.jsx(q,{variant:"outline",className:"w-full justify-start",onClick:Sl,children:"Download Account Data"}),s.jsx(q,{variant:"outline",className:"w-full justify-start text-destructive hover:text-destructive",onClick:fr,children:"Delete Account"})]})]})]})]}),s.jsx(jn,{open:Nd,onOpenChange:vt,children:s.jsxs(an,{className:"sm:max-w-[425px]",children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Edit Profile"}),s.jsx(cn,{children:"Make changes to your profile here. Click save when you're done."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"name",className:"text-right",children:"Name"}),s.jsx(xe,{id:"name",value:hr,onChange:Y=>Cl(Y.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"email",className:"text-right",children:"Email"}),s.jsx(xe,{id:"email",value:El,onChange:Y=>Ms(Y.target.value),className:"col-span-3"})]})]}),s.jsx(or,{children:s.jsx(q,{type:"submit",onClick:Bo,disabled:zo.isPending,children:zo.isPending?"Saving...":"Save changes"})})]})}),s.jsx(gF,{open:r,onOpenChange:a,qrCodeUrl:m,secret:x,isLoading:Ne.isPending,onVerify:Kn,verificationStatus:j,errorMessage:N}),s.jsx(xF,{open:o,onOpenChange:i,onDisable:dr,isLoading:U.isPending,error:C}),s.jsx(vF,{open:l,onOpenChange:c,recoveryCodes:w,onRegenerate:Ir,isRegenerating:Se.isPending,regenerateError:R}),s.jsx(yF,{open:u,onOpenChange:f,onChangePassword:Nl,isLoading:Ce.isPending,error:O}),s.jsx(wF,{open:h,onOpenChange:p,sessions:je,onRevokeSession:_s,isRevoking:Ee.isPending}),s.jsx(jn,{open:Z,onOpenChange:I,children:s.jsxs(an,{className:"sm:max-w-[450px]",children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Delete Account"}),s.jsx(cn,{children:"Are you sure you want to delete your account? This action cannot be undone."})]}),s.jsx("div",{className:"py-4",children:s.jsxs(rt,{variant:"destructive",children:[s.jsx(Pr,{className:"h-4 w-4"}),s.jsxs(st,{children:[s.jsx("strong",{children:"Warning:"})," Deleting your account will permanently remove all your data, including campaigns, transactions, and settings. This action is irreversible."]})]})}),s.jsxs(or,{children:[s.jsx(q,{variant:"outline",onClick:()=>I(!1),children:"Cancel"}),s.jsx(q,{variant:"destructive",onClick:bd,children:"Delete My Account"})]})]})})]})}const Na="/admin/account-pool",QS=async e=>(await J.get(Na,{params:e})).data,bF=async()=>(await J.get(`${Na}/stats`)).data,NF=async e=>(await J.post(Na,e)).data,SF=async e=>(await J.delete(`${Na}/${e}`)).data,CF=async e=>(await J.post(`${Na}/${e}/sync`)).data,EF=async()=>(await J.post(`${Na}/sync-all`)).data,RF=async e=>(await J.post(`${Na}/${e}/unassign`)).data,PF=async()=>QS({status:"available"});function kF(){const e=_r(),[t,n]=d.useState(""),[r,a]=d.useState(!1),[o,i]=d.useState({alias:"",hilltop_id:"",balance:"",notes:""}),{data:l=[],isLoading:c}=Ae({queryKey:["accountPool",t],queryFn:()=>QS({search:t})}),{data:u}=Ae({queryKey:["accountPoolStats"],queryFn:bF}),f=tt({mutationFn:NF,onSuccess:()=>{e.invalidateQueries({queryKey:["accountPool"]}),e.invalidateQueries({queryKey:["accountPoolStats"]}),Te.success("Account added successfully"),a(!1),i({alias:"",hilltop_id:"",balance:"",notes:""})},onError:S=>{var C,P;Te.error(((P=(C=S.response)==null?void 0:C.data)==null?void 0:P.message)||"Failed to add account")}}),h=tt({mutationFn:CF,onSuccess:()=>{e.invalidateQueries({queryKey:["accountPool"]}),Te.success("Account synced successfully")},onError:()=>{Te.error("Failed to sync account")}}),p=tt({mutationFn:EF,onSuccess:()=>{e.invalidateQueries({queryKey:["accountPool"]}),Te.success("All accounts synced successfully")},onError:()=>{Te.error("Failed to sync accounts")}}),m=tt({mutationFn:SF,onSuccess:()=>{e.invalidateQueries({queryKey:["accountPool"]}),e.invalidateQueries({queryKey:["accountPoolStats"]}),Te.success("Account deleted successfully")},onError:S=>{var C,P;Te.error(((P=(C=S.response)==null?void 0:C.data)==null?void 0:P.message)||"Failed to delete account")}}),y=tt({mutationFn:RF,onSuccess:()=>{e.invalidateQueries({queryKey:["accountPool"]}),e.invalidateQueries({queryKey:["accountPoolStats"]}),Te.success("Account unassigned successfully")},onError:()=>{Te.error("Failed to unassign account")}}),x=()=>{f.mutate({alias:o.alias,hilltop_id:o.hilltop_id,balance:o.balance?parseFloat(o.balance):void 0,notes:o.notes||void 0})},v=S=>{h.mutate(S)},w=()=>{p.mutate()},g=S=>{confirm("Are you sure you want to delete this account?")&&m.mutate(S)},j=S=>{confirm("Are you sure you want to unassign this account?")&&y.mutate(S)},b=S=>{if(!S)return"Never";const C=new Date(S),R=new Date().getTime()-C.getTime(),M=Math.floor(R/6e4);if(M<1)return"Just now";if(M<60)return`${M} min${M>1?"s":""} ago`;const O=Math.floor(M/60);if(O<24)return`${O} hour${O>1?"s":""} ago`;const D=Math.floor(O/24);return`${D} day${D>1?"s":""} ago`},N=(u==null?void 0:u.available)||0;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Account Pool Manager"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your HilltopAds account inventory"})]}),s.jsxs(q,{onClick:()=>a(!0),children:[s.jsx(tj,{className:"h-4 w-4 mr-2"}),"Add Account"]})]}),N<5&&s.jsxs(rt,{variant:"destructive",children:[s.jsx(Li,{className:"h-4 w-4"}),s.jsx(Ki,{children:"Low Account Pool Alert"}),s.jsxs(st,{children:["Only ",N," accounts available. Consider adding more accounts to prevent assignment delays."]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Total Accounts"}),s.jsx(ne,{className:"text-3xl",children:(u==null?void 0:u.total)||0})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Available"}),s.jsx(ne,{className:"text-3xl text-success",children:(u==null?void 0:u.available)||0})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Assigned"}),s.jsx(ne,{className:"text-3xl text-primary",children:(u==null?void 0:u.assigned)||0})]})})]}),s.jsxs(ae,{className:"shadow-sm",children:[s.jsxs(oe,{className:"border-b border-border",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ne,{children:"HilltopAds Accounts"}),s.jsx(ie,{children:"View and manage all accounts in your pool"})]}),s.jsxs(q,{variant:"outline",size:"sm",onClick:w,disabled:p.isPending,children:[p.isPending?s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}):s.jsx(Fi,{className:"h-4 w-4 mr-2"}),"Sync All"]})]}),s.jsxs("div",{className:"relative mt-4",children:[s.jsx(Bu,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(xe,{placeholder:"Search by alias, user, or ID...",value:t,onChange:S=>n(S.target.value),className:"pl-10"})]})]}),s.jsx(fe,{className:"p-0",children:c?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(_t,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx("p",{className:"text-muted-foreground",children:"No accounts found"}),s.jsx(q,{variant:"link",onClick:()=>a(!0),children:"Add your first account"})]}):s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Alias"}),s.jsx(te,{children:"HilltopAds ID"}),s.jsx(te,{children:"Status"}),s.jsx(te,{children:"Assigned User"}),s.jsx(te,{children:"Balance"}),s.jsx(te,{children:"Last Sync"}),s.jsx(te,{className:"text-right",children:"Actions"})]})}),s.jsx(en,{children:l.map(S=>{var C;return s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:S.alias}),s.jsx(V,{className:"font-mono text-sm text-muted-foreground",children:S.hilltop_id}),s.jsx(V,{children:s.jsx(ye,{variant:S.status==="available"?"secondary":"default",className:S.status==="available"?"":"bg-primary/10 text-primary hover:bg-primary/20",children:S.status})}),s.jsx(V,{children:((C=S.assigned_user)==null?void 0:C.email)||s.jsx("span",{className:"text-muted-foreground italic",children:"Unassigned"})}),s.jsxs(V,{className:"font-medium",children:["$",S.balance]}),s.jsx(V,{className:"text-sm text-muted-foreground",children:b(S.last_synced_at)}),s.jsx(V,{className:"text-right",children:s.jsxs(fd,{children:[s.jsx(hd,{asChild:!0,children:s.jsx(q,{variant:"ghost",size:"icon",children:s.jsx(im,{className:"h-4 w-4"})})}),s.jsxs(jl,{align:"end",children:[s.jsx(Et,{onClick:()=>v(S.id),children:"Sync Balance"}),S.status==="assigned"&&s.jsx(Et,{onClick:()=>j(S.id),children:"Unassign"}),s.jsx(Et,{onClick:()=>g(S.id),className:"text-destructive",children:"Delete"})]})]})})]},S.id)})})]})})]}),s.jsx(jn,{open:r,onOpenChange:a,children:s.jsxs(an,{children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Add New Account"}),s.jsx(cn,{children:"Add a new HilltopAds account to your pool"})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"alias",children:"Account Alias *"}),s.jsx(xe,{id:"alias",placeholder:"YourHilltopAds-001",value:o.alias,onChange:S=>i({...o,alias:S.target.value})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"hilltop_id",children:"HilltopAds ID *"}),s.jsx(xe,{id:"hilltop_id",placeholder:"ha_****2a8f",value:o.hilltop_id,onChange:S=>i({...o,hilltop_id:S.target.value})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"balance",children:"Initial Balance (optional)"}),s.jsx(xe,{id:"balance",type:"number",step:"0.01",placeholder:"0.00",value:o.balance,onChange:S=>i({...o,balance:S.target.value})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"notes",children:"Notes (optional)"}),s.jsx(xe,{id:"notes",placeholder:"Add any notes...",value:o.notes,onChange:S=>i({...o,notes:S.target.value})})]})]}),s.jsxs(or,{children:[s.jsx(q,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),s.jsx(q,{onClick:x,disabled:!o.alias||!o.hilltop_id||f.isPending,children:f.isPending?s.jsxs(s.Fragment,{children:[s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}),"Adding..."]}):"Add Account"})]})]})})]})}var YS="AlertDialog",[TF,C5]=$t(YS,[Tb]),Dr=Tb(),XS=e=>{const{__scopeAlertDialog:t,...n}=e,r=Dr(t);return s.jsx(Lm,{...r,...n,modal:!0})};XS.displayName=YS;var AF="AlertDialogTrigger",_F=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Dr(n);return s.jsx(ZM,{...a,...r,ref:t})});_F.displayName=AF;var MF="AlertDialogPortal",JS=e=>{const{__scopeAlertDialog:t,...n}=e,r=Dr(t);return s.jsx(Fm,{...r,...n})};JS.displayName=MF;var OF="AlertDialogOverlay",ZS=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Dr(n);return s.jsx(ll,{...a,...r,ref:t})});ZS.displayName=OF;var Ya="AlertDialogContent",[DF,IF]=TF(Ya),LF=v0("AlertDialogContent"),eC=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,o=Dr(n),i=d.useRef(null),l=ve(t,i),c=d.useRef(null);return s.jsx(QM,{contentName:Ya,titleName:tC,docsSlug:"alert-dialog",children:s.jsx(DF,{scope:n,cancelRef:c,children:s.jsxs(cl,{role:"alertdialog",...o,...a,ref:l,onOpenAutoFocus:W(a.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[s.jsx(LF,{children:r}),s.jsx($F,{contentRef:i})]})})})});eC.displayName=Ya;var tC="AlertDialogTitle",nC=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Dr(n);return s.jsx(ul,{...a,...r,ref:t})});nC.displayName=tC;var rC="AlertDialogDescription",sC=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Dr(n);return s.jsx(dl,{...a,...r,ref:t})});sC.displayName=rC;var FF="AlertDialogAction",aC=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Dr(n);return s.jsx(rd,{...a,...r,ref:t})});aC.displayName=FF;var oC="AlertDialogCancel",iC=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=IF(oC,n),o=Dr(n),i=ve(t,a);return s.jsx(rd,{...o,...r,ref:i})});iC.displayName=oC;var $F=({contentRef:e})=>{const t=`\`${Ya}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Ya}\` by passing a \`${rC}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ya}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},zF=XS,BF=JS,lC=ZS,cC=eC,uC=aC,dC=iC,fC=nC,hC=sC;const UF=zF,VF=BF,pC=d.forwardRef(({className:e,...t},n)=>s.jsx(lC,{className:L("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));pC.displayName=lC.displayName;const mC=d.forwardRef(({className:e,...t},n)=>s.jsxs(VF,{children:[s.jsx(pC,{}),s.jsx(cC,{ref:n,className:L("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));mC.displayName=cC.displayName;const gC=({className:e,...t})=>s.jsx("div",{className:L("flex flex-col space-y-2 text-center sm:text-left",e),...t});gC.displayName="AlertDialogHeader";const xC=({className:e,...t})=>s.jsx("div",{className:L("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xC.displayName="AlertDialogFooter";const vC=d.forwardRef(({className:e,...t},n)=>s.jsx(fC,{ref:n,className:L("text-lg font-semibold",e),...t}));vC.displayName=fC.displayName;const yC=d.forwardRef(({className:e,...t},n)=>s.jsx(hC,{ref:n,className:L("text-sm text-muted-foreground",e),...t}));yC.displayName=hC.displayName;const wC=d.forwardRef(({className:e,...t},n)=>s.jsx(uC,{ref:n,className:L(Am(),e),...t}));wC.displayName=uC.displayName;const jC=d.forwardRef(({className:e,...t},n)=>s.jsx(dC,{ref:n,className:L(Am({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));jC.displayName=dC.displayName;const HF=async e=>{const t=e?{search:e}:{};return(await J.get("/admin/user-mappings",{params:t})).data},WF=async()=>(await J.get("/admin/user-mappings/stats",{})).data,qF=async e=>(await J.post("/admin/user-mappings",e,{})).data,KF=async(e,t)=>(await J.post(`/admin/user-mappings/${e}/bind`,t,{})).data,GF=async e=>(await J.post(`/admin/user-mappings/${e}/unbind`,{},{})).data,QF=async(e,t)=>(await J.post(`/admin/user-mappings/${e}/rebind`,t,{})).data,YF=async e=>(await J.get(`/admin/user-mappings/${e}/audit-history`,{})).data;function XF(){const[e,t]=d.useState(""),[n,r]=d.useState(!1),[a,o]=d.useState(!1),[i,l]=d.useState(!1),[c,u]=d.useState(!1),[f,h]=d.useState(!1),[p,m]=d.useState(null),[y,x]=d.useState({name:"",email:"",password:""}),[v,w]=d.useState(""),{toast:g}=tm(),j=_r(),{data:b=[],isLoading:N}=Ae({queryKey:["userMappings",e],queryFn:()=>HF(e)}),{data:S}=Ae({queryKey:["userMappingStats"],queryFn:WF}),{data:C=[]}=Ae({queryKey:["availableAccounts"],queryFn:PF}),{data:P,isLoading:R}=Ae({queryKey:["auditHistory",p==null?void 0:p.id],queryFn:()=>p?YF(p.id):null,enabled:!!p&&f}),M=tt({mutationFn:qF,onSuccess:T=>{j.invalidateQueries({queryKey:["userMappings"]}),j.invalidateQueries({queryKey:["userMappingStats"]}),r(!1),x({name:"",email:"",password:""}),g({title:"Success",description:T.message})},onError:T=>{var K,H;g({title:"Error",description:((H=(K=T.response)==null?void 0:K.data)==null?void 0:H.message)||"Failed to create user",variant:"destructive"})}}),O=tt({mutationFn:({userId:T,accountId:K})=>KF(T,{account_id:K}),onSuccess:T=>{j.invalidateQueries({queryKey:["userMappings"]}),j.invalidateQueries({queryKey:["userMappingStats"]}),j.invalidateQueries({queryKey:["availableAccounts"]}),o(!1),w(""),g({title:"Success",description:T.message})},onError:T=>{var K,H;g({title:"Error",description:((H=(K=T.response)==null?void 0:K.data)==null?void 0:H.message)||"Failed to bind account",variant:"destructive"})}}),D=tt({mutationFn:GF,onSuccess:T=>{j.invalidateQueries({queryKey:["userMappings"]}),j.invalidateQueries({queryKey:["userMappingStats"]}),j.invalidateQueries({queryKey:["availableAccounts"]}),u(!1),g({title:"Success",description:T.message})},onError:T=>{var K,H;g({title:"Error",description:((H=(K=T.response)==null?void 0:K.data)==null?void 0:H.message)||"Failed to unbind account",variant:"destructive"})}}),Z=tt({mutationFn:({userId:T,accountId:K})=>QF(T,{account_id:K}),onSuccess:T=>{j.invalidateQueries({queryKey:["userMappings"]}),j.invalidateQueries({queryKey:["availableAccounts"]}),l(!1),w(""),g({title:"Success",description:T.message})},onError:T=>{var K,H;g({title:"Error",description:((H=(K=T.response)==null?void 0:K.data)==null?void 0:H.message)||"Failed to rebind account",variant:"destructive"})}}),I=()=>{M.mutate(y)},re=()=>{p&&v&&O.mutate({userId:p.id,accountId:parseInt(v)})},z=()=>{p&&D.mutate(p.id)},Q=()=>{p&&v&&Z.mutate({userId:p.id,accountId:parseInt(v)})},A=T=>{m(T),o(!0)},k=T=>{m(T),l(!0)},$=T=>{m(T),u(!0)},G=T=>{m(T),h(!0)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"User Account Mappings"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage user to HilltopAds account assignments"})]}),s.jsxs(q,{onClick:()=>r(!0),children:[s.jsx(tj,{className:"h-4 w-4 mr-2"}),"Create User"]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Total Users"}),s.jsx(ne,{className:"text-3xl",children:(S==null?void 0:S.totalUsers)||0})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Bound Users"}),s.jsx(ne,{className:"text-3xl text-success",children:(S==null?void 0:S.boundUsers)||0})]})}),s.jsx(ae,{children:s.jsxs(oe,{className:"pb-3",children:[s.jsx(ie,{children:"Unbound Users"}),s.jsx(ne,{className:"text-3xl text-warning",children:(S==null?void 0:S.unboundUsers)||0})]})})]}),s.jsxs(ae,{className:"shadow-sm",children:[s.jsxs(oe,{className:"border-b border-border",children:[s.jsxs("div",{children:[s.jsx(ne,{children:"User Mappings"}),s.jsx(ie,{children:"View and manage user account assignments"})]}),s.jsxs("div",{className:"relative mt-4",children:[s.jsx(Bu,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(xe,{placeholder:"Search by user name, email, or account...",value:e,onChange:T=>t(T.target.value),className:"pl-10"})]})]}),s.jsx(fe,{className:"p-0",children:N?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(_t,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"User"}),s.jsx(te,{children:"Email"}),s.jsx(te,{children:"HilltopAds Account"}),s.jsx(te,{children:"Status"}),s.jsx(te,{children:"Bound At"}),s.jsx(te,{children:"Campaigns"}),s.jsx(te,{children:"Total Spend"}),s.jsx(te,{className:"text-right",children:"Actions"})]})}),s.jsx(en,{children:b.length===0?s.jsx(Pe,{children:s.jsx(V,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"No users found"})}):b.map(T=>s.jsxs(Pe,{children:[s.jsx(V,{className:"font-medium",children:T.userName}),s.jsx(V,{className:"text-muted-foreground",children:T.userEmail}),s.jsx(V,{children:T.accountAlias?s.jsx("span",{className:"font-mono text-sm",children:T.accountAlias}):s.jsx("span",{className:"text-muted-foreground italic",children:"Not assigned"})}),s.jsx(V,{children:s.jsx(ye,{variant:T.bindStatus==="bound"?"default":"secondary",className:T.bindStatus==="bound"?"bg-success/10 text-success hover:bg-success/20":"",children:T.bindStatus==="bound"?s.jsxs(s.Fragment,{children:[s.jsx(nf,{className:"h-3 w-3 mr-1"}),"Bound"]}):s.jsxs(s.Fragment,{children:[s.jsx(Px,{className:"h-3 w-3 mr-1"}),"Unbound"]})})}),s.jsx(V,{className:"text-sm text-muted-foreground",children:T.bindTime||"—"}),s.jsx(V,{children:T.campaigns}),s.jsxs(V,{className:"font-medium",children:["$",T.totalSpend]}),s.jsx(V,{className:"text-right",children:s.jsxs(fd,{children:[s.jsx(hd,{asChild:!0,children:s.jsx(q,{variant:"ghost",size:"icon",children:s.jsx(im,{className:"h-4 w-4"})})}),s.jsxs(jl,{align:"end",children:[s.jsxs(Et,{onClick:()=>G(T),children:[s.jsx(sP,{className:"h-4 w-4 mr-2"}),"View Audit History"]}),T.bindStatus==="bound"?s.jsxs(s.Fragment,{children:[s.jsxs(Et,{className:"text-warning",onClick:()=>$(T),children:[s.jsx(Px,{className:"h-4 w-4 mr-2"}),"Unbind Account"]}),s.jsxs(Et,{onClick:()=>k(T),children:[s.jsx(nf,{className:"h-4 w-4 mr-2"}),"Rebind to Different Account"]})]}):s.jsxs(Et,{onClick:()=>A(T),children:[s.jsx(nf,{className:"h-4 w-4 mr-2"}),"Bind Account"]})]})]})})]},T.id))})]})})]}),s.jsx(jn,{open:n,onOpenChange:r,children:s.jsxs(an,{children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Create New User"}),s.jsx(cn,{children:"Add a new customer user to the system"})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"name",children:"Name"}),s.jsx(xe,{id:"name",value:y.name,onChange:T=>x({...y,name:T.target.value}),placeholder:"John Doe"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email"}),s.jsx(xe,{id:"email",type:"email",value:y.email,onChange:T=>x({...y,email:T.target.value}),placeholder:"john@example.com"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password",children:"Password"}),s.jsx(xe,{id:"password",type:"password",value:y.password,onChange:T=>x({...y,password:T.target.value}),placeholder:"••••••••"})]})]}),s.jsxs(or,{children:[s.jsx(q,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),s.jsxs(q,{onClick:I,disabled:M.isPending,children:[M.isPending&&s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}),"Create User"]})]})]})}),s.jsx(jn,{open:a,onOpenChange:o,children:s.jsxs(an,{children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Bind HilltopAds Account"}),s.jsxs(cn,{children:["Select an available HilltopAds account to bind to ",p==null?void 0:p.userName]})]}),s.jsx("div",{className:"space-y-4 py-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"account",children:"HilltopAds Account"}),s.jsxs(qt,{value:v,onValueChange:w,children:[s.jsx(Ot,{children:s.jsx(Kt,{placeholder:"Select an account"})}),s.jsx(Dt,{children:C.map(T=>s.jsxs(de,{value:T.id.toString(),children:[T.alias," (Balance: $",T.balance,")"]},T.id))})]})]})}),s.jsxs(or,{children:[s.jsx(q,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),s.jsxs(q,{onClick:re,disabled:O.isPending||!v,children:[O.isPending&&s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}),"Bind Account"]})]})]})}),s.jsx(jn,{open:i,onOpenChange:l,children:s.jsxs(an,{children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Rebind to Different Account"}),s.jsxs(cn,{children:["Select a new HilltopAds account to bind to ",p==null?void 0:p.userName]})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Current Account"}),s.jsx(xe,{value:(p==null?void 0:p.accountAlias)||"",disabled:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"new-account",children:"New HilltopAds Account"}),s.jsxs(qt,{value:v,onValueChange:w,children:[s.jsx(Ot,{children:s.jsx(Kt,{placeholder:"Select an account"})}),s.jsx(Dt,{children:C.map(T=>s.jsxs(de,{value:T.id.toString(),children:[T.alias," (Balance: $",T.balance,")"]},T.id))})]})]})]}),s.jsxs(or,{children:[s.jsx(q,{variant:"outline",onClick:()=>l(!1),children:"Cancel"}),s.jsxs(q,{onClick:Q,disabled:Z.isPending||!v,children:[Z.isPending&&s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}),"Rebind Account"]})]})]})}),s.jsx(UF,{open:c,onOpenChange:u,children:s.jsxs(mC,{children:[s.jsxs(gC,{children:[s.jsx(vC,{children:"Unbind Account"}),s.jsxs(yC,{children:['Are you sure you want to unbind the account "',p==null?void 0:p.accountAlias,'" from'," ",p==null?void 0:p.userName,"? This action will make the account available for other users."]})]}),s.jsxs(xC,{children:[s.jsx(jC,{children:"Cancel"}),s.jsxs(wC,{onClick:z,disabled:D.isPending,children:[D.isPending&&s.jsx(_t,{className:"h-4 w-4 mr-2 animate-spin"}),"Unbind Account"]})]})]})}),s.jsx(jn,{open:f,onOpenChange:h,children:s.jsxs(an,{className:"max-w-2xl",children:[s.jsxs(on,{children:[s.jsx(ln,{children:"Audit History"}),s.jsxs(cn,{children:["Account binding history for ",P==null?void 0:P.user.name," (",P==null?void 0:P.user.email,")"]})]}),s.jsx("div",{className:"py-4",children:R?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(_t,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):P!=null&&P.audits&&P.audits.length>0?s.jsx("div",{className:"space-y-4",children:P.audits.map(T=>s.jsx("div",{className:"border-l-2 border-primary pl-4 pb-4",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium capitalize",children:T.action}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[T.action==="bind"&&`Bound to ${T.details.account_alias}`,T.action==="unbind"&&`Unbound from ${T.details.account_alias}`,T.action==="rebind"&&`Rebound from ${T.details.old_account_alias} to ${T.details.new_account_alias}`]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:T.timeAgo}),s.jsx("p",{className:"text-xs text-muted-foreground",children:T.timestamp})]})]})},T.id))}):s.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No audit history available"})})]})})]})}function JF(){var m,y,x,v,w,g,j,b,N,S,C,P;const[e,t]=d.useState("7d"),{data:n,isLoading:r}=Ae({queryKey:["admin-revenue-kpis",e],queryFn:()=>J.get(`/admin/revenue-dashboard/kpis?period=${e}`).then(R=>R.data)}),{data:a,isLoading:o}=Ae({queryKey:["admin-revenue-streams",e],queryFn:()=>J.get(`/admin/revenue-dashboard/revenue-streams?period=${e}`).then(R=>R.data)}),{data:i,isLoading:l}=Ae({queryKey:["admin-top-customers",e],queryFn:()=>J.get(`/admin/revenue-dashboard/top-customers?period=${e}`).then(R=>R.data)}),{data:c,isLoading:u}=Ae({queryKey:["admin-top-campaigns",e],queryFn:()=>J.get(`/admin/revenue-dashboard/top-campaigns?period=${e}`).then(R=>R.data)}),{data:f,isLoading:h}=Ae({queryKey:["admin-anomalies"],queryFn:()=>J.get("/admin/revenue-dashboard/anomalies").then(R=>R.data)}),p=async()=>{try{const R=await J.get(`/admin/revenue-dashboard/export?period=${e}`,{responseType:"blob"}),M=window.URL.createObjectURL(new Blob([R.data])),O=document.createElement("a");O.href=M,O.setAttribute("download",`revenue-report-${e}.csv`),document.body.appendChild(O),O.click(),O.remove()}catch(R){console.error("Export failed:",R)}};return r||o||l||u||h?s.jsx("div",{children:"Loading..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Revenue Dashboard"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Monitor revenue streams and profit margins"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(qt,{value:e,onValueChange:t,children:[s.jsx(Ot,{className:"w-[150px]",children:s.jsx(Kt,{})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"24h",children:"Last 24 hours"}),s.jsx(de,{value:"7d",children:"Last 7 days"}),s.jsx(de,{value:"30d",children:"Last 30 days"}),s.jsx(de,{value:"90d",children:"Last 90 days"})]})]}),s.jsxs(q,{variant:"outline",onClick:p,children:[s.jsx($u,{className:"h-4 w-4 mr-2"}),"Export"]})]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsx(us,{title:"Total Revenue",value:((m=n==null?void 0:n.total_revenue)==null?void 0:m.value)||"$0.00",change:((y=n==null?void 0:n.total_revenue)==null?void 0:y.change)||"",changeType:((x=n==null?void 0:n.total_revenue)==null?void 0:x.change_type)||"neutral",icon:vo}),s.jsx(us,{title:"Net Profit",value:((v=n==null?void 0:n.net_profit)==null?void 0:v.value)||"$0.00",change:((w=n==null?void 0:n.net_profit)==null?void 0:w.change)||"",changeType:((g=n==null?void 0:n.net_profit)==null?void 0:g.change_type)||"neutral",icon:ol}),s.jsx(us,{title:"Markup Revenue",value:((j=n==null?void 0:n.markup_revenue)==null?void 0:j.value)||"$0.00",change:((b=n==null?void 0:n.markup_revenue)==null?void 0:b.change)||"",changeType:((N=n==null?void 0:n.markup_revenue)==null?void 0:N.change_type)||"neutral",icon:yh}),s.jsx(us,{title:"Active Customers",value:((S=n==null?void 0:n.active_customers)==null?void 0:S.value)||"0",change:((C=n==null?void 0:n.active_customers)==null?void 0:C.change)||"",changeType:((P=n==null?void 0:n.active_customers)==null?void 0:P.change_type)||"neutral",icon:sj})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Revenue Streams (Daily)"}),s.jsx(ie,{children:"Breakdown of all revenue sources"})]}),s.jsx(fe,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"h-[300px] flex items-end justify-around gap-2",children:a==null?void 0:a.map(R=>s.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2",children:[s.jsxs("div",{className:"w-full flex flex-col-reverse",children:[s.jsx("div",{className:"w-full bg-primary",style:{height:`${R.topup/50}px`}}),s.jsx("div",{className:"w-full bg-accent",style:{height:`${R.markup/50}px`}}),s.jsx("div",{className:"w-full bg-success",style:{height:`${R.card_fees/50}px`}}),s.jsx("div",{className:"w-full bg-warning",style:{height:`${R.service_fees/50}px`}})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:R.date})]},R.date))}),s.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-3 w-3 rounded-sm bg-primary"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Top-up Revenue"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-3 w-3 rounded-sm bg-accent"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Markup"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-3 w-3 rounded-sm bg-success"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Card Fees"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-3 w-3 rounded-sm bg-warning"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Service Fees"})]})]})]})})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Top Customers by Revenue"}),s.jsx(ie,{children:"Highest spending customers this period"})]}),s.jsx(fe,{children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Customer"}),s.jsx(te,{children:"Spend"}),s.jsx(te,{children:"Profit"}),s.jsx(te,{children:"Campaigns"})]})}),s.jsx(en,{children:i==null?void 0:i.map(R=>s.jsxs(Pe,{children:[s.jsx(V,{children:s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:R.name}),s.jsx("p",{className:"text-xs text-muted-foreground",children:R.email})]})}),s.jsx(V,{className:"font-medium",children:R.spend}),s.jsx(V,{className:"font-medium text-success",children:R.profit}),s.jsx(V,{children:R.campaigns})]},R.email))})]})})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Top Campaigns by Spend"}),s.jsx(ie,{children:"Highest performing campaigns"})]}),s.jsx(fe,{children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Campaign"}),s.jsx(te,{children:"Spend"}),s.jsx(te,{children:"Profit"}),s.jsx(te,{children:"Margin"})]})}),s.jsx(en,{children:c==null?void 0:c.map(R=>s.jsxs(Pe,{children:[s.jsx(V,{children:s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:R.name}),s.jsx("p",{className:"text-xs text-muted-foreground",children:R.customer})]})}),s.jsx(V,{className:"font-medium",children:R.spend}),s.jsx(V,{className:"font-medium text-success",children:R.profit}),s.jsx(V,{children:s.jsx(ye,{className:"bg-success/10 text-success hover:bg-success/20",children:R.margin})})]},R.name))})]})})]})]}),s.jsxs(ae,{children:[s.jsxs(oe,{children:[s.jsxs(ne,{className:"flex items-center gap-2",children:[s.jsx(Pr,{className:"h-5 w-5 text-warning"}),"Cost Anomalies"]}),s.jsx(ie,{children:"Unusual spending patterns detected"})]}),s.jsx(fe,{children:s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Type"}),s.jsx(te,{children:"Campaign"}),s.jsx(te,{children:"Customer"}),s.jsx(te,{children:"Amount"}),s.jsx(te,{children:"Expected"}),s.jsx(te,{children:"Detected"})]})}),s.jsx(en,{children:f==null?void 0:f.map((R,M)=>s.jsxs(Pe,{children:[s.jsx(V,{children:s.jsx(ye,{variant:R.type==="Spike"?"default":"secondary",children:R.type})}),s.jsx(V,{className:"font-medium",children:R.campaign}),s.jsx(V,{className:"text-muted-foreground",children:R.customer}),s.jsx(V,{className:"font-medium",children:R.amount}),s.jsx(V,{className:"text-muted-foreground",children:R.threshold}),s.jsx(V,{className:"text-xs text-muted-foreground",children:R.detected})]},M))})]})})]})]})}const ei={getAuditLogs:async e=>(await J.get("/admin/audit-logs",{params:e})).data,getSystemAlerts:async()=>(await J.get("/admin/system-alerts")).data,acknowledgeAlert:async e=>(await J.post(`/admin/system-alerts/${e}/acknowledge`)).data,markAllAlertsRead:async()=>{await J.post("/admin/system-alerts/mark-all-read")},exportAuditLogs:async e=>(await J.get("/admin/audit-logs/export",{params:e,responseType:"blob"})).data};function qn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function pa(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const bC=6048e5,ZF=864e5;let e3={};function jd(){return e3}function Gi(e,t){var l,c,u,f;const n=jd(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,a=qn(e),o=a.getDay(),i=(o<r?7:0)+o-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function xu(e){return Gi(e,{weekStartsOn:1})}function NC(e){const t=qn(e),n=t.getFullYear(),r=pa(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=xu(r),o=pa(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=xu(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function $v(e){const t=qn(e);return t.setHours(0,0,0,0),t}function zv(e){const t=qn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function t3(e,t){const n=$v(e),r=$v(t),a=+n-zv(n),o=+r-zv(r);return Math.round((a-o)/ZF)}function n3(e){const t=NC(e),n=pa(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),xu(n)}function r3(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function s3(e){if(!r3(e)&&typeof e!="number")return!1;const t=qn(e);return!isNaN(Number(t))}function a3(e){const t=qn(e),n=pa(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const o3={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i3=(e,t,n)=>{let r;const a=o3[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function bf(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const l3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},c3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},u3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d3={date:bf({formats:l3,defaultWidth:"full"}),time:bf({formats:c3,defaultWidth:"full"}),dateTime:bf({formats:u3,defaultWidth:"full"})},f3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},h3=(e,t,n,r)=>f3[e];function ti(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):i;a=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const p3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},m3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},g3={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},x3={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},v3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},y3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},w3=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},j3={ordinalNumber:w3,era:ti({values:p3,defaultWidth:"wide"}),quarter:ti({values:m3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ti({values:g3,defaultWidth:"wide"}),day:ti({values:x3,defaultWidth:"wide"}),dayPeriod:ti({values:v3,defaultWidth:"wide",formattingValues:y3,defaultFormattingWidth:"wide"})};function ni(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?N3(l,h=>h.test(i)):b3(l,h=>h.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function b3(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function N3(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function S3(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const l=t.slice(a.length);return{value:i,rest:l}}}const C3=/^(\d+)(th|st|nd|rd)?/i,E3=/\d+/i,R3={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},P3={any:[/^b/i,/^(a|c)/i]},k3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},T3={any:[/1/i,/2/i,/3/i,/4/i]},A3={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_3={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},M3={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},O3={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},D3={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},I3={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},L3={ordinalNumber:S3({matchPattern:C3,parsePattern:E3,valueCallback:e=>parseInt(e,10)}),era:ni({matchPatterns:R3,defaultMatchWidth:"wide",parsePatterns:P3,defaultParseWidth:"any"}),quarter:ni({matchPatterns:k3,defaultMatchWidth:"wide",parsePatterns:T3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ni({matchPatterns:A3,defaultMatchWidth:"wide",parsePatterns:_3,defaultParseWidth:"any"}),day:ni({matchPatterns:M3,defaultMatchWidth:"wide",parsePatterns:O3,defaultParseWidth:"any"}),dayPeriod:ni({matchPatterns:D3,defaultMatchWidth:"any",parsePatterns:I3,defaultParseWidth:"any"})},F3={code:"en-US",formatDistance:i3,formatLong:d3,formatRelative:h3,localize:j3,match:L3,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $3(e){const t=qn(e);return t3(t,a3(t))+1}function z3(e){const t=qn(e),n=+xu(t)-+n3(t);return Math.round(n/bC)+1}function SC(e,t){var f,h,p,m;const n=qn(e),r=n.getFullYear(),a=jd(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(p=a.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,i=pa(e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const l=Gi(i,t),c=pa(e,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const u=Gi(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function B3(e,t){var l,c,u,f;const n=jd(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,a=SC(e,t),o=pa(e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Gi(o,t)}function U3(e,t){const n=qn(e),r=+Gi(n,t)-+B3(n,t);return Math.round(r/bC)+1}function Oe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Vr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Oe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Oe(n+1,2)},d(e,t){return Oe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Oe(e.getHours()%12||12,t.length)},H(e,t){return Oe(e.getHours(),t.length)},m(e,t){return Oe(e.getMinutes(),t.length)},s(e,t){return Oe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return Oe(a,t.length)}},Pa={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Bv={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Vr.y(e,t)},Y:function(e,t,n,r){const a=SC(e,r),o=a>0?a:1-a;if(t==="YY"){const i=o%100;return Oe(i,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Oe(o,t.length)},R:function(e,t){const n=NC(e);return Oe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Oe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Oe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Oe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Vr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Oe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=U3(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):Oe(a,t.length)},I:function(e,t,n){const r=z3(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Oe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Vr.d(e,t)},D:function(e,t,n){const r=$3(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Oe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Oe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Oe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Oe(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Pa.noon:r===0?a=Pa.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Pa.evening:r>=12?a=Pa.afternoon:r>=4?a=Pa.morning:a=Pa.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Vr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Vr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Oe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Oe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Vr.s(e,t)},S:function(e,t){return Vr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Vv(r);case"XXXX":case"XX":return Fs(r);case"XXXXX":case"XXX":default:return Fs(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Vv(r);case"xxxx":case"xx":return Fs(r);case"xxxxx":case"xxx":default:return Fs(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Uv(r,":");case"OOOO":default:return"GMT"+Fs(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Uv(r,":");case"zzzz":default:return"GMT"+Fs(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Oe(r,t.length)},T:function(e,t,n){const r=e.getTime();return Oe(r,t.length)}};function Uv(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+Oe(o,2)}function Vv(e,t){return e%60===0?(e>0?"-":"+")+Oe(Math.abs(e)/60,2):Fs(e,t)}function Fs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Oe(Math.trunc(r/60),2),o=Oe(r%60,2);return n+a+t+o}const Hv=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},CC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},V3=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Hv(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Hv(r,t)).replace("{{time}}",CC(a,t))},H3={p:CC,P:V3},W3=/^D+$/,q3=/^Y+$/,K3=["D","DD","YY","YYYY"];function G3(e){return W3.test(e)}function Q3(e){return q3.test(e)}function Y3(e,t,n){const r=X3(e,t,n);if(console.warn(r),K3.includes(e))throw new RangeError(r)}function X3(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const J3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e5=/^'([^]*?)'?$/,t5=/''/g,n5=/[a-zA-Z]/;function Wv(e,t,n){var f,h,p,m;const r=jd(),a=r.locale??F3,o=r.firstWeekContainsDate??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=r.weekStartsOn??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,l=qn(e);if(!s3(l))throw new RangeError("Invalid time value");let c=t.match(Z3).map(y=>{const x=y[0];if(x==="p"||x==="P"){const v=H3[x];return v(y,a.formatLong)}return y}).join("").match(J3).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const x=y[0];if(x==="'")return{isToken:!1,value:r5(y)};if(Bv[x])return{isToken:!0,value:y};if(x.match(n5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const u={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return c.map(y=>{if(!y.isToken)return y.value;const x=y.value;(Q3(x)||G3(x))&&Y3(x,t,String(e));const v=Bv[x[0]];return v(l,x,a.localize,u)}).join("")}function r5(e){const t=e.match(e5);return t?t[1].replace(t5,"'"):e}function s5(){const[e,t]=d.useState(""),[n,r]=d.useState("all"),[a,o]=d.useState(1),i=_r(),{data:l,isLoading:c}=Ae({queryKey:["auditLogs",a,e,n],queryFn:()=>ei.getAuditLogs({page:a,search:e,status:n==="all"?void 0:n})}),{data:u,isLoading:f}=Ae({queryKey:["systemAlerts"],queryFn:ei.getSystemAlerts}),h=tt({mutationFn:ei.acknowledgeAlert,onSuccess:()=>{i.invalidateQueries({queryKey:["systemAlerts"]})}}),p=tt({mutationFn:ei.markAllAlertsRead,onSuccess:()=>{i.invalidateQueries({queryKey:["systemAlerts"]})}}),m=g=>{switch(g){case"critical":return s.jsx(Li,{className:"h-4 w-4 text-destructive"});case"warning":return s.jsx(Pr,{className:"h-4 w-4 text-warning"});case"info":return s.jsx(Ex,{className:"h-4 w-4 text-primary"});default:return s.jsx(Ex,{className:"h-4 w-4"})}},y=g=>{switch(g){case"critical":return s.jsx(ye,{variant:"destructive",children:"Critical"});case"warning":return s.jsx(ye,{className:"bg-warning/10 text-warning hover:bg-warning/20",children:"Warning"});case"info":return s.jsx(ye,{variant:"secondary",children:"Info"});default:return s.jsx(ye,{children:"Unknown"})}},x=g=>{var j,b,N;return g.entity_type==="campaign"&&g.campaign?g.campaign.name:g.entity_type==="user_mapping"&&g.hilltop_account?g.hilltop_account.alias:(j=g.details)!=null&&j.name?g.details.name:(b=g.details)!=null&&b.email?g.details.email:(N=g.details)!=null&&N.alias?g.details.alias:g.entity_type},v=(u==null?void 0:u.filter(g=>!g.acknowledged).length)||0,w=async()=>{try{const g=await ei.exportAuditLogs({search:e,status:n==="all"?void 0:n}),j=window.URL.createObjectURL(g),b=document.createElement("a");b.href=j,b.setAttribute("download",`audit-logs-${new Date().toISOString()}.csv`),document.body.appendChild(b),b.click(),b.remove()}catch(g){console.error("Failed to export logs:",g)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Audit Logs & Alerts"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Monitor system activity and security events"})]}),s.jsxs(md,{defaultValue:"logs",className:"space-y-4",children:[s.jsxs(bl,{children:[s.jsx(St,{value:"logs",children:"Audit Logs"}),s.jsxs(St,{value:"alerts",children:["Alerts",v>0&&s.jsx(ye,{variant:"destructive",className:"ml-2 h-5 w-5 rounded-full p-0 flex items-center justify-center",children:v})]})]}),s.jsx(Ct,{value:"logs",className:"space-y-4",children:s.jsxs(ae,{className:"shadow-sm",children:[s.jsxs(oe,{className:"border-b border-border",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ne,{children:"System Audit Log"}),s.jsx(ie,{children:"Immutable record of all system activities"})]}),s.jsxs(q,{variant:"outline",size:"sm",onClick:w,children:[s.jsx($u,{className:"h-4 w-4 mr-2"}),"Export CSV"]})]}),s.jsxs("div",{className:"flex gap-4 mt-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(Bu,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(xe,{placeholder:"Search logs by user, action, resource...",value:e,onChange:g=>{t(g.target.value),o(1)},className:"pl-10"})]}),s.jsxs(qt,{value:n,onValueChange:g=>{r(g),o(1)},children:[s.jsx(Ot,{className:"w-[150px]",children:s.jsx(Kt,{})}),s.jsxs(Dt,{children:[s.jsx(de,{value:"all",children:"All Status"}),s.jsx(de,{value:"success",children:"Success"}),s.jsx(de,{value:"error",children:"Error"}),s.jsx(de,{value:"warning",children:"Warning"})]})]}),s.jsx(q,{variant:"outline",size:"icon",children:s.jsx(Z0,{className:"h-4 w-4"})})]})]}),s.jsxs(fe,{className:"p-0",children:[s.jsxs(Zt,{children:[s.jsx(fn,{children:s.jsxs(Pe,{children:[s.jsx(te,{children:"Timestamp"}),s.jsx(te,{children:"User"}),s.jsx(te,{children:"Action"}),s.jsx(te,{children:"Resource"}),s.jsx(te,{children:"Details"}),s.jsx(te,{children:"Status"})]})}),s.jsx(en,{children:c?s.jsx(Pe,{children:s.jsx(V,{colSpan:6,className:"text-center py-8",children:"Loading logs..."})}):(l==null?void 0:l.data.length)===0?s.jsx(Pe,{children:s.jsx(V,{colSpan:6,className:"text-center py-8",children:"No logs found"})}):l==null?void 0:l.data.map(g=>s.jsxs(Pe,{children:[s.jsx(V,{className:"text-xs text-muted-foreground font-mono",children:Wv(new Date(g.created_at),"yyyy-MM-dd HH:mm:ss")}),s.jsx(V,{className:"text-sm",children:g.user?s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-medium",children:g.user.name}),s.jsx("span",{className:"text-xs text-muted-foreground",children:g.user.email})]}):s.jsx("span",{className:"text-muted-foreground italic",children:"System"})}),s.jsx(V,{className:"font-medium",children:g.action}),s.jsx(V,{className:"text-sm",children:s.jsx(ye,{variant:"outline",className:"font-mono",children:x(g)})}),s.jsx(V,{className:"text-xs font-mono max-w-[300px] truncate",title:JSON.stringify(g.details,null,2),children:JSON.stringify(g.details)}),s.jsx(V,{children:g.status==="success"?s.jsxs(ye,{className:"bg-success/10 text-success hover:bg-success/20",children:[s.jsx(xt,{className:"h-3 w-3 mr-1"}),"Success"]}):g.status==="error"?s.jsxs(ye,{variant:"destructive",children:[s.jsx(Li,{className:"h-3 w-3 mr-1"}),"Error"]}):s.jsxs(ye,{className:"bg-warning/10 text-warning hover:bg-warning/20",children:[s.jsx(Pr,{className:"h-3 w-3 mr-1"}),g.status]})})]},g.id))})]}),l&&l.last_page>1&&s.jsxs("div",{className:"flex items-center justify-end space-x-2 p-4 border-t",children:[s.jsxs(q,{variant:"outline",size:"sm",onClick:()=>o(g=>Math.max(1,g-1)),disabled:a===1,children:[s.jsx(om,{className:"h-4 w-4"}),"Previous"]}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",a," of ",l.last_page]}),s.jsxs(q,{variant:"outline",size:"sm",onClick:()=>o(g=>Math.min(l.last_page,g+1)),disabled:a===l.last_page,children:["Next",s.jsx(Fu,{className:"h-4 w-4"})]})]})]})]})}),s.jsx(Ct,{value:"alerts",className:"space-y-4",children:s.jsxs(ae,{className:"shadow-sm",children:[s.jsx(oe,{className:"border-b border-border",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ne,{children:"System Alerts"}),s.jsx(ie,{children:"Notifications requiring attention"})]}),s.jsx(q,{variant:"outline",size:"sm",onClick:()=>p.mutate(),disabled:v===0,children:"Mark All as Read"})]})}),s.jsx(fe,{className:"p-0",children:s.jsx("div",{className:"divide-y divide-border",children:f?s.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Loading alerts..."}):(u==null?void 0:u.length)===0?s.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"No alerts found"}):u==null?void 0:u.map(g=>s.jsx("div",{className:`p-4 hover:bg-muted/50 transition-colors ${g.acknowledged?"":"bg-muted/30"}`,children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"mt-1",children:m(g.severity)}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h4",{className:"font-medium",children:g.title}),y(g.severity)]}),s.jsx("div",{className:"flex items-center gap-2",children:g.acknowledged?s.jsxs(ye,{variant:"outline",className:"text-xs",children:[s.jsx(xt,{className:"h-3 w-3 mr-1"}),"Acknowledged"]}):s.jsxs(q,{variant:"ghost",size:"sm",onClick:()=>h.mutate(g.id),children:[s.jsx(ZR,{className:"h-4 w-4 mr-2"}),"Acknowledge"]})})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:g.message}),s.jsx("p",{className:"text-xs text-muted-foreground",children:Wv(new Date(g.created_at),"yyyy-MM-dd HH:mm:ss")})]})]})},g.id))})})]})})]})]})}const a5=()=>{const e=ya();return d.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),s.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),s.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},o5=()=>{const[e,t]=d.useState(""),[n,r]=d.useState(""),[a,o]=d.useState(""),[i,l]=d.useState(!1),c=Ps(),{login:u}=ba(),f=async h=>{var p,m;h.preventDefault(),o(""),l(!0);try{await u(e,n,"customer"),l(!1),c("/")}catch(y){o(((m=(p=y.response)==null?void 0:p.data)==null?void 0:m.message)||"Login failed")}finally{l(!1)}};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsxs(ae,{className:"w-full max-w-md",children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Login"}),s.jsx(ie,{children:"Enter your credentials to access your account"})]}),s.jsxs(fe,{children:[s.jsxs("form",{onSubmit:f,className:"space-y-4",children:[a&&s.jsx(rt,{variant:"destructive",children:s.jsx(st,{children:a})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email"}),s.jsx(xe,{id:"email",type:"email",value:e,onChange:h=>t(h.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password",children:"Password"}),s.jsx(xe,{id:"password",type:"password",value:n,onChange:h=>r(h.target.value),required:!0})]}),s.jsx(q,{type:"submit",className:"w-full",disabled:i,children:i?"Logging in...":"Login"})]}),s.jsxs("div",{className:"mt-4 text-center space-y-2",children:[s.jsx(Mt,{to:"/forgot-password",className:"text-sm text-muted-foreground hover:underline",children:"Forgot password?"}),s.jsxs("div",{className:"text-sm",children:["Don't have an account?"," ",s.jsx(Mt,{to:"/register",className:"text-primary hover:underline",children:"Register"})]})]})]})]})})},i5=()=>{const[e,t]=d.useState(""),[n,r]=d.useState(""),[a,o]=d.useState(""),[i,l]=d.useState(!1),c=Ps(),{login:u}=ba(),f=async h=>{var p,m;h.preventDefault(),o(""),l(!0);try{await u(e,n,"admin"),c("/")}catch(y){o(((m=(p=y.response)==null?void 0:p.data)==null?void 0:m.message)||"Login failed")}finally{l(!1)}};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsxs(ae,{className:"w-full max-w-md",children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Admin Login"}),s.jsx(ie,{children:"Enter your admin credentials to access the admin panel"})]}),s.jsxs(fe,{children:[s.jsxs("form",{onSubmit:f,className:"space-y-4",children:[a&&s.jsx(rt,{variant:"destructive",children:s.jsx(st,{children:a})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email"}),s.jsx(xe,{id:"email",type:"email",value:e,onChange:h=>t(h.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password",children:"Password"}),s.jsx(xe,{id:"password",type:"password",value:n,onChange:h=>r(h.target.value),required:!0})]}),s.jsx(q,{type:"submit",className:"w-full",disabled:i,children:i?"Logging in...":"Login"})]}),s.jsxs("div",{className:"mt-4 text-center space-y-2",children:[s.jsx(Mt,{to:"/forgot-password",className:"text-sm text-muted-foreground hover:underline",children:"Forgot password?"}),s.jsx("div",{className:"text-sm",children:s.jsx(Mt,{to:"/",className:"text-primary hover:underline",children:"Back to Customer Login"})})]})]})]})})},l5=()=>{const[e,t]=d.useState(""),[n,r]=d.useState(""),[a,o]=d.useState(""),[i,l]=d.useState(""),[c,u]=d.useState(""),[f,h]=d.useState(!1),p=Ps(),{register:m}=ba(),y=async x=>{var v,w;if(x.preventDefault(),u(""),h(!0),a!==i){u("Passwords do not match"),h(!1);return}try{await m(e,n,a,i),p("/")}catch(g){u(((w=(v=g.response)==null?void 0:v.data)==null?void 0:w.message)||"Registration failed")}finally{h(!1)}};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsxs(ae,{className:"w-full max-w-md",children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Register"}),s.jsx(ie,{children:"Create a new account"})]}),s.jsxs(fe,{children:[s.jsxs("form",{onSubmit:y,className:"space-y-4",children:[c&&s.jsx(rt,{variant:"destructive",children:s.jsx(st,{children:c})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"name",children:"Name"}),s.jsx(xe,{id:"name",type:"text",value:e,onChange:x=>t(x.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email"}),s.jsx(xe,{id:"email",type:"email",value:n,onChange:x=>r(x.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password",children:"Password"}),s.jsx(xe,{id:"password",type:"password",value:a,onChange:x=>o(x.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password_confirmation",children:"Confirm Password"}),s.jsx(xe,{id:"password_confirmation",type:"password",value:i,onChange:x=>l(x.target.value),required:!0})]}),s.jsx(q,{type:"submit",className:"w-full",disabled:f,children:f?"Registering...":"Register"})]}),s.jsx("div",{className:"mt-4 text-center",children:s.jsxs("div",{className:"text-sm",children:["Already have an account?"," ",s.jsx(Mt,{to:"/login",className:"text-primary hover:underline",children:"Login"})]})})]})]})})},c5=()=>{const[e,t]=d.useState(""),[n,r]=d.useState(""),[a,o]=d.useState(""),[i,l]=d.useState(!1),{forgotPassword:c}=ba(),u=async f=>{var h,p;f.preventDefault(),o(""),r(""),l(!0);try{await c(e),r("Reset link sent to your email")}catch(m){o(((p=(h=m.response)==null?void 0:h.data)==null?void 0:p.message)||"Failed to send reset link")}finally{l(!1)}};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsxs(ae,{className:"w-full max-w-md",children:[s.jsxs(oe,{children:[s.jsx(ne,{children:"Forgot Password"}),s.jsx(ie,{children:"Enter your email to receive a password reset link"})]}),s.jsxs(fe,{children:[s.jsxs("form",{onSubmit:u,className:"space-y-4",children:[a&&s.jsx(rt,{variant:"destructive",children:s.jsx(st,{children:a})}),n&&s.jsx(rt,{children:s.jsx(st,{children:n})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email"}),s.jsx(xe,{id:"email",type:"email",value:e,onChange:f=>t(f.target.value),required:!0})]}),s.jsx(q,{type:"submit",className:"w-full",disabled:i,children:i?"Sending...":"Send Reset Link"})]}),s.jsx("div",{className:"mt-4 text-center",children:s.jsxs("div",{className:"text-sm",children:["Remember your password?"," ",s.jsx(Mt,{to:"/login",className:"text-primary hover:underline",children:"Login"})]})})]})]})})},u5=new PA,d5=()=>{const{user:e}=ba(),t=(e==null?void 0:e.type)==="admin"?"admin":"customer";return s.jsx(Qb,{children:s.jsxs("div",{className:"flex min-h-screen w-full",children:[s.jsx(o4,{role:t}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx(_I,{}),s.jsx("main",{className:"flex-1 p-6 bg-background",children:s.jsxs(gb,{children:[s.jsx(et,{path:"/",element:s.jsx(FI,{})}),s.jsx(et,{path:"/campaigns/:id",element:s.jsx(UI,{})}),s.jsx(et,{path:"/campaigns/:id/edit",element:s.jsx(PL,{})}),s.jsx(et,{path:"/create-campaign",element:s.jsx(kL,{})}),s.jsx(et,{path:"/top-up",element:s.jsx(BL,{})}),s.jsx(et,{path:"/transactions",element:s.jsx(UL,{})}),s.jsx(et,{path:"/reports",element:s.jsx(VL,{})}),s.jsx(et,{path:"/account",element:s.jsx(HL,{})}),s.jsx(et,{path:"/settings",element:s.jsx(jF,{})}),s.jsx(et,{path:"/admin/account-pool",element:s.jsx(kF,{})}),s.jsx(et,{path:"/admin/user-mappings",element:s.jsx(XF,{})}),s.jsx(et,{path:"/admin/revenue",element:s.jsx(JF,{})}),s.jsx(et,{path:"/admin/audit-logs",element:s.jsx(s5,{})}),s.jsx(et,{path:"*",element:s.jsx(a5,{})})]})})]})]})})},f5=()=>s.jsx(MA,{client:u5,children:s.jsx(AI,{children:s.jsxs(Wj,{children:[s.jsx(KP,{}),s.jsx(Ck,{}),s.jsx(z_,{children:s.jsxs(gb,{children:[s.jsx(et,{path:"/login",element:s.jsx(o5,{})}),s.jsx(et,{path:"/admin/login",element:s.jsx(i5,{})}),s.jsx(et,{path:"/register",element:s.jsx(l5,{})}),s.jsx(et,{path:"/forgot-password",element:s.jsx(c5,{})}),s.jsx(et,{path:"/*",element:s.jsx(MI,{children:s.jsx(d5,{})})})]})})]})})});g0(document.getElementById("root")).render(s.jsx(f5,{}));
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0129 ]-- |